@orbcharts/plugins-basic 3.0.0-alpha.25 → 3.0.0-alpha.26

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
- (function(it,rr){typeof exports=="object"&&typeof module<"u"?rr(exports):typeof define=="function"&&define.amd?define(["exports"],rr):(it=typeof globalThis<"u"?globalThis:it||self,rr(it["orbcharts-plugins-basic"]={}))})(this,function(it){"use strict";const rr={lineCurve:"curveLinear",lineWidth:2},Sh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Th={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Dh={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},Ph={barWidth:0,barGroupPadding:10,barRadius:!1},kh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Eh={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},As={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Nh=As,Lh={};function bt(t,n){return t==null||n==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function Ch(t,n){return t==null||n==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function To(t){let n,e,r;t.length!==2?(n=bt,e=(u,c)=>bt(t(u),c),r=(u,c)=>t(u)-c):(n=t===bt||t===Ch?t:S2,e=t,r=t);function i(u,c,s=0,f=u.length){if(s<f){if(n(c,c)!==0)return f;do{const h=s+f>>>1;e(u[h],c)<0?s=h+1:f=h}while(s<f)}return s}function o(u,c,s=0,f=u.length){if(s<f){if(n(c,c)!==0)return f;do{const h=s+f>>>1;e(u[h],c)<=0?s=h+1:f=h}while(s<f)}return s}function a(u,c,s=0,f=u.length){const h=i(u,c,s,f-1);return h>s&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:o}}function S2(){return 0}function Do(t){return t===null?NaN:+t}function*T2(t,n){if(n===void 0)for(let e of t)e!=null&&(e=+e)>=e&&(yield e);else{let e=-1;for(let r of t)(r=n(r,++e,t))!=null&&(r=+r)>=r&&(yield r)}}const Ih=To(bt),Rh=Ih.right,D2=Ih.left,P2=To(Do).center,Ae=Rh;function k2(t,n){if(!((n=+n)>=0))throw new RangeError("invalid r");let e=t.length;if(!((e=Math.floor(e))>=0))throw new RangeError("invalid length");if(!e||!n)return t;const r=Ms(n),i=t.slice();return r(t,i,0,e,1),r(i,t,0,e,1),r(t,i,0,e,1),t}const Fh=Oh(Ms),E2=Oh(N2);function Oh(t){return function(n,e,r=e){if(!((e=+e)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=n;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!e&&!r)return n;const u=e&&t(e),c=r&&t(r),s=i.slice();return u&&c?(ir(u,s,i,o,a),ir(u,i,s,o,a),ir(u,s,i,o,a),or(c,i,s,o,a),or(c,s,i,o,a),or(c,i,s,o,a)):u?(ir(u,i,s,o,a),ir(u,s,i,o,a),ir(u,i,s,o,a)):c&&(or(c,i,s,o,a),or(c,s,i,o,a),or(c,i,s,o,a)),n}}function ir(t,n,e,r,i){for(let o=0,a=r*i;o<a;)t(n,e,o,o+=r,1)}function or(t,n,e,r,i){for(let o=0,a=r*i;o<r;++o)t(n,e,o,o+a,r)}function N2(t){const n=Ms(t);return(e,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,n(e,r,i+0,o+0,a),n(e,r,i+1,o+1,a),n(e,r,i+2,o+2,a),n(e,r,i+3,o+3,a)}}function Ms(t){const n=Math.floor(t);if(n===t)return L2(t);const e=t-n,r=2*t+1;return(i,o,a,u,c)=>{if(!((u-=c)>=a))return;let s=n*o[a];const f=c*n,h=f+c;for(let l=a,p=a+f;l<p;l+=c)s+=o[Math.min(u,l)];for(let l=a,p=u;l<=p;l+=c)s+=o[Math.min(u,l+f)],i[l]=(s+e*(o[Math.max(a,l-h)]+o[Math.min(u,l+h)]))/r,s-=o[Math.max(a,l-f)]}}function L2(t){const n=2*t+1;return(e,r,i,o,a)=>{if(!((o-=a)>=i))return;let u=t*r[i];const c=a*t;for(let s=i,f=i+c;s<f;s+=a)u+=r[Math.min(o,s)];for(let s=i,f=o;s<=f;s+=a)u+=r[Math.min(o,s+c)],e[s]=u/n,u-=r[Math.max(i,s-c)]}}function Po(t,n){let e=0;if(n===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++e;else{let r=-1;for(let i of t)(i=n(i,++r,t))!=null&&(i=+i)>=i&&++e}return e}function C2(t){return t.length|0}function I2(t){return!(t>0)}function R2(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function F2(t){return n=>t(...n)}function O2(...t){const n=typeof t[t.length-1]=="function"&&F2(t.pop());t=t.map(R2);const e=t.map(C2),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||e.some(I2))return o;for(;;){o.push(i.map((u,c)=>t[c][u]));let a=r;for(;++i[a]===e[a];){if(a===0)return n?o.map(n):o;i[a--]=0}}}function z2(t,n){var e=0,r=0;return Float64Array.from(t,n===void 0?i=>e+=+i||0:i=>e+=+n(i,r++,t)||0)}function zh(t,n){let e=0,r,i=0,o=0;if(n===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++e,o+=r*(a-i));else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(u=+u)>=u&&(r=u-i,i+=r/++e,o+=r*(u-i))}if(e>1)return o/(e-1)}function Gh(t,n){const e=zh(t,n);return e&&Math.sqrt(e)}function ni(t,n){let e,r;if(n===void 0)for(const i of t)i!=null&&(e===void 0?i>=i&&(e=r=i):(e>i&&(e=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=n(o,++i,t))!=null&&(e===void 0?o>=o&&(e=r=o):(e>o&&(e=o),r<o&&(r=o)))}return[e,r]}class Dt{constructor(){this._partials=new Float64Array(32),this._n=0}add(n){const e=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=e[i],a=n+o,u=Math.abs(n)<Math.abs(o)?n-(a-o):o-(a-n);u&&(e[r++]=u),n=a}return e[r]=n,this._n=r+1,this}valueOf(){const n=this._partials;let e=this._n,r,i,o,a=0;if(e>0){for(a=n[--e];e>0&&(r=a,i=n[--e],a=r+i,o=i-(a-r),!o););e>0&&(o<0&&n[e-1]<0||o>0&&n[e-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function G2(t,n){const e=new Dt;if(n===void 0)for(let r of t)(r=+r)&&e.add(r);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&e.add(i)}return+e}function U2(t,n){const e=new Dt;let r=-1;return Float64Array.from(t,n===void 0?i=>e.add(+i||0):i=>e.add(+n(i,++r,t)||0))}class ei extends Map{constructor(n,e=Bh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),n!=null)for(const[r,i]of n)this.set(r,i)}get(n){return super.get($s(this,n))}has(n){return super.has($s(this,n))}set(n,e){return super.set(Uh(this,n),e)}delete(n){return super.delete(Yh(this,n))}}class Me extends Set{constructor(n,e=Bh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),n!=null)for(const r of n)this.add(r)}has(n){return super.has($s(this,n))}add(n){return super.add(Uh(this,n))}delete(n){return super.delete(Yh(this,n))}}function $s({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function Uh({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function Yh({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function Bh(t){return t!==null&&typeof t=="object"?t.valueOf():t}function ar(t){return t}function qh(t,...n){return ur(t,ar,ar,n)}function Hh(t,...n){return ur(t,Array.from,ar,n)}function Wh(t,n){for(let e=1,r=n.length;e<r;++e)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function Y2(t,...n){return Wh(Hh(t,...n),n)}function B2(t,n,...e){return Wh(Vh(t,n,...e),e)}function Xh(t,n,...e){return ur(t,ar,n,e)}function Vh(t,n,...e){return ur(t,Array.from,n,e)}function q2(t,...n){return ur(t,ar,jh,n)}function H2(t,...n){return ur(t,Array.from,jh,n)}function jh(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function ur(t,n,e,r){return function i(o,a){if(a>=r.length)return e(o);const u=new ei,c=r[a++];let s=-1;for(const f of o){const h=c(f,++s,o),l=u.get(h);l?l.push(f):u.set(h,[f])}for(const[f,h]of u)u.set(f,i(h,a));return n(u)}(t,0)}function Zh(t,n){return Array.from(n,e=>t[e])}function Ss(t,...n){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&e.length!==2||n.length>1){const r=Uint32Array.from(t,(i,o)=>o);return n.length>1?(n=n.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of n){const u=sr(a[i],a[o]);if(u)return u}})):(e=t.map(e),r.sort((i,o)=>sr(e[i],e[o]))),Zh(t,r)}return t.sort(Ts(e))}function Ts(t=bt){if(t===bt)return sr;if(typeof t!="function")throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||r===0?r:(t(e,e)===0)-(t(n,n)===0)}}function sr(t,n){return(t==null||!(t>=t))-(n==null||!(n>=n))||(t<n?-1:t>n?1:0)}function W2(t,n,e){return(n.length!==2?Ss(Xh(t,n,e),([r,i],[o,a])=>bt(i,a)||bt(r,o)):Ss(qh(t,e),([r,i],[o,a])=>n(i,a)||bt(r,o))).map(([r])=>r)}var X2=Array.prototype,V2=X2.slice;function Ds(t){return()=>t}const j2=Math.sqrt(50),Z2=Math.sqrt(10),K2=Math.sqrt(2);function ko(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=j2?10:o>=Z2?5:o>=K2?2:1;let u,c,s;return i<0?(s=Math.pow(10,-i)/a,u=Math.round(t*s),c=Math.round(n*s),u/s<t&&++u,c/s>n&&--c,s=-s):(s=Math.pow(10,i)*a,u=Math.round(t/s),c=Math.round(n/s),u*s<t&&++u,c*s>n&&--c),c<u&&.5<=e&&e<2?ko(t,n,e*2):[u,c,s]}function $e(t,n,e){if(n=+n,t=+t,e=+e,!(e>0))return[];if(t===n)return[t];const r=n<t,[i,o,a]=r?ko(n,t,e):ko(t,n,e);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(r)if(a<0)for(let s=0;s<u;++s)c[s]=(o-s)/-a;else for(let s=0;s<u;++s)c[s]=(o-s)*a;else if(a<0)for(let s=0;s<u;++s)c[s]=(i+s)/-a;else for(let s=0;s<u;++s)c[s]=(i+s)*a;return c}function Se(t,n,e){return n=+n,t=+t,e=+e,ko(t,n,e)[2]}function Eo(t,n,e){n=+n,t=+t,e=+e;const r=n<t,i=r?Se(n,t,e):Se(t,n,e);return(r?-1:1)*(i<0?1/-i:i)}function Ps(t,n,e){let r;for(;;){const i=Se(t,n,e);if(i===r||i===0||!isFinite(i))return[t,n];i>0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function ks(t){return Math.max(1,Math.ceil(Math.log(Po(t))/Math.LN2)+1)}function Kh(){var t=ar,n=ni,e=ks;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,u,c,s=new Array(a);for(o=0;o<a;++o)s[o]=t(i[o],o,i);var f=n(s),h=f[0],l=f[1],p=e(s,h,l);if(!Array.isArray(p)){const _=l,v=+p;if(n===ni&&([h,l]=Ps(h,l,v)),p=$e(h,l,v),p[0]<=h&&(c=Se(h,l,v)),p[p.length-1]>=l)if(_>=l&&n===ni){const w=Se(h,l,v);isFinite(w)&&(w>0?l=(Math.floor(l/w)+1)*w:w<0&&(l=(Math.ceil(l*-w)+1)/-w))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=h;)++g;for(;p[m-1]>l;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var y=new Array(d+1),x;for(o=0;o<=d;++o)x=y[o]=[],x.x0=o>0?p[o-1]:h,x.x1=o<d?p[o]:l;if(isFinite(c)){if(c>0)for(o=0;o<a;++o)(u=s[o])!=null&&h<=u&&u<=l&&y[Math.min(d,Math.floor((u-h)/c))].push(i[o]);else if(c<0){for(o=0;o<a;++o)if((u=s[o])!=null&&h<=u&&u<=l){const _=Math.floor((h-u)*c);y[Math.min(d,_+(p[_]<=u))].push(i[o])}}}else for(o=0;o<a;++o)(u=s[o])!=null&&h<=u&&u<=l&&y[Ae(p,u,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Ds(i),r):t},r.domain=function(i){return arguments.length?(n=typeof i=="function"?i:Ds([i[0],i[1]]),r):n},r.thresholds=function(i){return arguments.length?(e=typeof i=="function"?i:Ds(Array.isArray(i)?V2.call(i):i),r):e},r}function ri(t,n){let e;if(n===void 0)for(const r of t)r!=null&&(e<r||e===void 0&&r>=r)&&(e=r);else{let r=-1;for(let i of t)(i=n(i,++r,t))!=null&&(e<i||e===void 0&&i>=i)&&(e=i)}return e}function Es(t,n){let e,r=-1,i=-1;if(n===void 0)for(const o of t)++i,o!=null&&(e<o||e===void 0&&o>=o)&&(e=o,r=i);else for(let o of t)(o=n(o,++i,t))!=null&&(e<o||e===void 0&&o>=o)&&(e=o,r=i);return r}function No(t,n){let e;if(n===void 0)for(const r of t)r!=null&&(e>r||e===void 0&&r>=r)&&(e=r);else{let r=-1;for(let i of t)(i=n(i,++r,t))!=null&&(e>i||e===void 0&&i>=i)&&(e=i)}return e}function Ns(t,n){let e,r=-1,i=-1;if(n===void 0)for(const o of t)++i,o!=null&&(e>o||e===void 0&&o>=o)&&(e=o,r=i);else for(let o of t)(o=n(o,++i,t))!=null&&(e>o||e===void 0&&o>=o)&&(e=o,r=i);return r}function Lo(t,n,e=0,r=1/0,i){if(n=Math.floor(n),e=Math.floor(Math.max(0,e)),r=Math.floor(Math.min(t.length-1,r)),!(e<=n&&n<=r))return t;for(i=i===void 0?sr:Ts(i);r>e;){if(r-e>600){const c=r-e+1,s=n-e+1,f=Math.log(c),h=.5*Math.exp(2*f/3),l=.5*Math.sqrt(f*h*(c-h)/c)*(s-c/2<0?-1:1),p=Math.max(e,Math.floor(n-s*h/c+l)),d=Math.min(r,Math.floor(n+(c-s)*h/c+l));Lo(t,n,p,d,i)}const o=t[n];let a=e,u=r;for(ii(t,e,n),i(t[r],o)>0&&ii(t,e,r);a<u;){for(ii(t,a,u),++a,--u;i(t[a],o)<0;)++a;for(;i(t[u],o)>0;)--u}i(t[e],o)===0?ii(t,e,u):(++u,ii(t,u,r)),u<=n&&(e=u+1),n<=u&&(r=u-1)}return t}function ii(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function Qh(t,n=bt){let e,r=!1;if(n.length===1){let i;for(const o of t){const a=n(o);(r?bt(a,i)>0:bt(a,a)===0)&&(e=o,i=a,r=!0)}}else for(const i of t)(r?n(i,e)>0:n(i,i)===0)&&(e=i,r=!0);return e}function oi(t,n,e){if(t=Float64Array.from(T2(t,e)),!(!(r=t.length)||isNaN(n=+n))){if(n<=0||r<2)return No(t);if(n>=1)return ri(t);var r,i=(r-1)*n,o=Math.floor(i),a=ri(Lo(t,o).subarray(0,o+1)),u=No(t.subarray(o+1));return a+(u-a)*(i-o)}}function Jh(t,n,e=Do){if(!(!(r=t.length)||isNaN(n=+n))){if(n<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),a=+e(t[o],o,t),u=+e(t[o+1],o+1,t);return a+(u-a)*(i-o)}}function t0(t,n,e=Do){if(!isNaN(n=+n)){if(r=Float64Array.from(t,(u,c)=>Do(e(t[c],c,t))),n<=0)return Ns(r);if(n>=1)return Es(r);var r,i=Uint32Array.from(t,(u,c)=>c),o=r.length-1,a=Math.floor(o*n);return Lo(i,a,0,o,(u,c)=>sr(r[u],r[c])),a=Qh(i.subarray(0,a+1),u=>r[u]),a>=0?a:-1}}function Q2(t,n,e){const r=Po(t),i=oi(t,.75)-oi(t,.25);return r&&i?Math.ceil((e-n)/(2*i*Math.pow(r,-1/3))):1}function J2(t,n,e){const r=Po(t),i=Gh(t);return r&&i?Math.ceil((e-n)*Math.cbrt(r)/(3.49*i)):1}function tx(t,n){let e=0,r=0;if(n===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++e,r+=i);else{let i=-1;for(let o of t)(o=n(o,++i,t))!=null&&(o=+o)>=o&&(++e,r+=o)}if(e)return r/e}function nx(t,n){return oi(t,.5,n)}function ex(t,n){return t0(t,.5,n)}function*rx(t){for(const n of t)yield*n}function Ls(t){return Array.from(rx(t))}function ix(t,n){const e=new ei;if(n===void 0)for(let o of t)o!=null&&o>=o&&e.set(o,(e.get(o)||0)+1);else{let o=-1;for(let a of t)(a=n(a,++o,t))!=null&&a>=a&&e.set(a,(e.get(a)||0)+1)}let r,i=0;for(const[o,a]of e)a>i&&(i=a,r=o);return r}function ox(t,n=ax){const e=[];let r,i=!1;for(const o of t)i&&e.push(n(r,o)),r=o,i=!0;return e}function ax(t,n){return[t,n]}function ue(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=Math.max(0,Math.ceil((n-t)/e))|0,o=new Array(i);++r<i;)o[r]=t+r*e;return o}function ux(t,n=bt){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let e=Array.from(t);const r=new Float64Array(e.length);n.length!==2&&(e=e.map(n),n=bt);const i=(u,c)=>n(e[u],e[c]);let o,a;return t=Uint32Array.from(e,(u,c)=>c),t.sort(n===bt?(u,c)=>sr(e[u],e[c]):Ts(i)),t.forEach((u,c)=>{const s=i(u,o===void 0?u:o);s>=0?((o===void 0||s>0)&&(o=u,a=c),r[u]=a):r[u]=NaN}),r}function sx(t,n=bt){let e,r=!1;if(n.length===1){let i;for(const o of t){const a=n(o);(r?bt(a,i)<0:bt(a,a)===0)&&(e=o,i=a,r=!0)}}else for(const i of t)(r?n(i,e)<0:n(i,i)===0)&&(e=i,r=!0);return e}function n0(t,n=bt){if(n.length===1)return Ns(t,n);let e,r=-1,i=-1;for(const o of t)++i,(r<0?n(o,o)===0:n(o,e)<0)&&(e=o,r=i);return r}function cx(t,n=bt){if(n.length===1)return Es(t,n);let e,r=-1,i=-1;for(const o of t)++i,(r<0?n(o,o)===0:n(o,e)>0)&&(e=o,r=i);return r}function lx(t,n){const e=n0(t,n);return e<0?void 0:e}const fx=e0(Math.random);function e0(t){return function(e,r=0,i=e.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,u=e[o+r];e[o+r]=e[a+r],e[a+r]=u}return e}}function hx(t,n){let e=0;if(n===void 0)for(let r of t)(r=+r)&&(e+=r);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e}function r0(t){if(!(o=t.length))return[];for(var n=-1,e=No(t,px),r=new Array(e);++n<e;)for(var i=-1,o,a=r[n]=new Array(o);++i<o;)a[i]=t[i][n];return r}function px(t){return t.length}function dx(){return r0(arguments)}function gx(t,n){if(typeof n!="function")throw new TypeError("test is not a function");let e=-1;for(const r of t)if(!n(r,++e,t))return!1;return!0}function mx(t,n){if(typeof n!="function")throw new TypeError("test is not a function");let e=-1;for(const r of t)if(n(r,++e,t))return!0;return!1}function yx(t,n){if(typeof n!="function")throw new TypeError("test is not a function");const e=[];let r=-1;for(const i of t)n(i,++r,t)&&e.push(i);return e}function bx(t,n){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof n!="function")throw new TypeError("mapper is not a function");return Array.from(t,(e,r)=>n(e,r,t))}function vx(t,n,e){if(typeof n!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:e}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)e=n(e,o,++a,t);return e}function xx(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function _x(t,...n){t=new Me(t);for(const e of n)for(const r of e)t.delete(r);return t}function wx(t,n){const e=n[Symbol.iterator](),r=new Me;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=e.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function Ax(t,...n){t=new Me(t),n=n.map(Mx);t:for(const e of t)for(const r of n)if(!r.has(e)){t.delete(e);continue t}return t}function Mx(t){return t instanceof Me?t:new Me(t)}function i0(t,n){const e=t[Symbol.iterator](),r=new Set;for(const i of n){const o=o0(i);if(r.has(o))continue;let a,u;for(;{value:a,done:u}=e.next();){if(u)return!1;const c=o0(a);if(r.add(c),Object.is(o,c))break}}return!0}function o0(t){return t!==null&&typeof t=="object"?t.valueOf():t}function $x(t,n){return i0(n,t)}function Sx(...t){const n=new Me;for(const e of t)for(const r of e)n.add(r);return n}function Tx(t){return t}var Co=1,Io=2,Cs=3,ai=4,a0=1e-6;function Dx(t){return"translate("+t+",0)"}function Px(t){return"translate(0,"+t+")"}function kx(t){return n=>+t(n)}function Ex(t,n){return n=Math.max(0,t.bandwidth()-n*2)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function Nx(){return!this.__axis}function Ro(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,s=t===Co||t===ai?-1:1,f=t===ai||t===Io?"x":"y",h=t===Co||t===Cs?Dx:Px;function l(p){var d=r??(n.ticks?n.ticks.apply(n,e):n.domain()),g=i??(n.tickFormat?n.tickFormat.apply(n,e):Tx),m=Math.max(o,0)+u,y=n.range(),x=+y[0]+c,_=+y[y.length-1]+c,v=(n.bandwidth?Ex:kx)(n.copy(),c),w=p.selection?p.selection():p,b=w.selectAll(".domain").data([null]),A=w.selectAll(".tick").data(d,n).order(),M=A.exit(),$=A.enter().append("g").attr("class","tick"),D=A.select("line"),S=A.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge($),D=D.merge($.append("line").attr("stroke","currentColor").attr(f+"2",s*o)),S=S.merge($.append("text").attr("fill","currentColor").attr(f,s*m).attr("dy",t===Co?"0em":t===Cs?"0.71em":"0.32em")),p!==w&&(b=b.transition(p),A=A.transition(p),D=D.transition(p),S=S.transition(p),M=M.transition(p).attr("opacity",a0).attr("transform",function(L){return isFinite(L=v(L))?h(L+c):this.getAttribute("transform")}),$.attr("opacity",a0).attr("transform",function(L){var E=this.parentNode.__axis;return h((E&&isFinite(E=E(L))?E:v(L))+c)})),M.remove(),b.attr("d",t===ai||t===Io?a?"M"+s*a+","+x+"H"+c+"V"+_+"H"+s*a:"M"+c+","+x+"V"+_:a?"M"+x+","+s*a+"V"+c+"H"+_+"V"+s*a:"M"+x+","+c+"H"+_),A.attr("opacity",1).attr("transform",function(L){return h(v(L)+c)}),D.attr(f+"2",s*o),S.attr(f,s*m).text(g),w.filter(Nx).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Io?"start":t===ai?"end":"middle"),w.each(function(){this.__axis=v})}return l.scale=function(p){return arguments.length?(n=p,l):n},l.ticks=function(){return e=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(e=p==null?[]:Array.from(p),l):e.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(i=p,l):i},l.tickSize=function(p){return arguments.length?(o=a=+p,l):o},l.tickSizeInner=function(p){return arguments.length?(o=+p,l):o},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(u=+p,l):u},l.offset=function(p){return arguments.length?(c=+p,l):c},l}function u0(t){return Ro(Co,t)}function Lx(t){return Ro(Io,t)}function Cx(t){return Ro(Cs,t)}function Is(t){return Ro(ai,t)}var Ix={value:()=>{}};function Te(){for(var t=0,n=arguments.length,e={},r;t<n;++t){if(!(r=arguments[t]+"")||r in e||/[\s.]/.test(r))throw new Error("illegal type: "+r);e[r]=[]}return new Fo(e)}function Fo(t){this._=t}function Rx(t,n){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");if(i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}})}Fo.prototype=Te.prototype={constructor:Fo,on:function(t,n){var e=this._,r=Rx(t+"",e),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=Fx(e[i],t.name)))return i;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<a;)if(i=(t=r[o]).type)e[i]=s0(e[i],t.name,n);else if(n==null)for(i in e)e[i]=s0(e[i],t.name,null);return this},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new Fo(t)},call:function(t,n){if((i=arguments.length-2)>0)for(var e=new Array(i),r=0,i,o;r<i;++r)e[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(n,e)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};function Fx(t,n){for(var e=0,r=t.length,i;e<r;++e)if((i=t[e]).name===n)return i.value}function s0(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Ix,t=t.slice(0,r).concat(t.slice(r+1));break}return e!=null&&t.push({name:n,value:e}),t}var Rs="http://www.w3.org/1999/xhtml";const Fs={svg:"http://www.w3.org/2000/svg",xhtml:Rs,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ui(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),Fs.hasOwnProperty(n)?{space:Fs[n],local:t}:t}function Ox(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Rs&&n.documentElement.namespaceURI===Rs?n.createElement(t):n.createElementNS(e,t)}}function zx(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Oo(t){var n=ui(t);return(n.local?zx:Ox)(n)}function Gx(){}function zo(t){return t==null?Gx:function(){return this.querySelector(t)}}function Ux(t){typeof t!="function"&&(t=zo(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],a=o.length,u=r[i]=new Array(a),c,s,f=0;f<a;++f)(c=o[f])&&(s=t.call(c,c.__data__,f,o))&&("__data__"in c&&(s.__data__=c.__data__),u[f]=s);return new Yt(r,this._parents)}function c0(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Yx(){return[]}function Os(t){return t==null?Yx:function(){return this.querySelectorAll(t)}}function Bx(t){return function(){return c0(t.apply(this,arguments))}}function qx(t){typeof t=="function"?t=Bx(t):t=Os(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a=n[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&(r.push(t.call(c,c.__data__,s,a)),i.push(c));return new Yt(r,i)}function zs(t){return function(){return this.matches(t)}}function l0(t){return function(n){return n.matches(t)}}var Hx=Array.prototype.find;function Wx(t){return function(){return Hx.call(this.children,t)}}function Xx(){return this.firstElementChild}function Vx(t){return this.select(t==null?Xx:Wx(typeof t=="function"?t:l0(t)))}var jx=Array.prototype.filter;function Zx(){return Array.from(this.children)}function Kx(t){return function(){return jx.call(this.children,t)}}function Qx(t){return this.selectAll(t==null?Zx:Kx(typeof t=="function"?t:l0(t)))}function Jx(t){typeof t!="function"&&(t=zs(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new Yt(r,this._parents)}function f0(t){return new Array(t.length)}function t_(){return new Yt(this._enter||this._groups.map(f0),this._parents)}function Go(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}Go.prototype={constructor:Go,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function n_(t){return function(){return t}}function e_(t,n,e,r,i,o){for(var a=0,u,c=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new Go(t,o[a]);for(;a<c;++a)(u=n[a])&&(i[a]=u)}function r_(t,n,e,r,i,o,a){var u,c,s=new Map,f=n.length,h=o.length,l=new Array(f),p;for(u=0;u<f;++u)(c=n[u])&&(l[u]=p=a.call(c,c.__data__,u,n)+"",s.has(p)?i[u]=c:s.set(p,c));for(u=0;u<h;++u)p=a.call(t,o[u],u,o)+"",(c=s.get(p))?(r[u]=c,c.__data__=o[u],s.delete(p)):e[u]=new Go(t,o[u]);for(u=0;u<f;++u)(c=n[u])&&s.get(l[u])===c&&(i[u]=c)}function i_(t){return t.__data__}function o_(t,n){if(!arguments.length)return Array.from(this,i_);var e=n?r_:e_,r=this._parents,i=this._groups;typeof t!="function"&&(t=n_(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),s=0;s<o;++s){var f=r[s],h=i[s],l=h.length,p=a_(t.call(f,f&&f.__data__,s,r)),d=p.length,g=u[s]=new Array(d),m=a[s]=new Array(d),y=c[s]=new Array(l);e(f,h,g,m,y,p,n);for(var x=0,_=0,v,w;x<d;++x)if(v=g[x]){for(x>=_&&(_=x+1);!(w=m[_])&&++_<d;);v._next=w||null}}return a=new Yt(a,r),a._enter=u,a._exit=c,a}function a_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function u_(){return new Yt(this._exit||this._groups.map(f0),this._parents)}function s_(t,n,e){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),n!=null&&(i=n(i),i&&(i=i.selection())),e==null?o.remove():e(o),r&&i?r.merge(i).order():i}function c_(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var s=e[c],f=r[c],h=s.length,l=u[c]=new Array(h),p,d=0;d<h;++d)(p=s[d]||f[d])&&(l[d]=p);for(;c<i;++c)u[c]=e[c];return new Yt(u,this._parents)}function l_(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r=t[n],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function f_(t){t||(t=h_);function n(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a=e[o],u=a.length,c=i[o]=new Array(u),s,f=0;f<u;++f)(s=a[f])&&(c[f]=s);c.sort(n)}return new Yt(i,this._parents).order()}function h_(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function p_(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function d_(){return Array.from(this)}function g_(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function m_(){let t=0;for(const n of this)++t;return t}function y_(){return!this.node()}function b_(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i=n[e],o=0,a=i.length,u;o<a;++o)(u=i[o])&&t.call(u,u.__data__,o,i);return this}function v_(t){return function(){this.removeAttribute(t)}}function x_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function __(t,n){return function(){this.setAttribute(t,n)}}function w_(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function A_(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function M_(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function $_(t,n){var e=ui(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?x_:v_:typeof n=="function"?e.local?M_:A_:e.local?w_:__)(e,n))}function Gs(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function S_(t){return function(){this.style.removeProperty(t)}}function T_(t,n,e){return function(){this.style.setProperty(t,n,e)}}function D_(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function P_(t,n,e){return arguments.length>1?this.each((n==null?S_:typeof n=="function"?D_:T_)(t,n,e??"")):De(this.node(),t)}function De(t,n){return t.style.getPropertyValue(n)||Gs(t).getComputedStyle(t,null).getPropertyValue(n)}function k_(t){return function(){delete this[t]}}function E_(t,n){return function(){this[t]=n}}function N_(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function L_(t,n){return arguments.length>1?this.each((n==null?k_:typeof n=="function"?N_:E_)(t,n)):this.node()[t]}function h0(t){return t.trim().split(/^|\s+/)}function Us(t){return t.classList||new p0(t)}function p0(t){this._node=t,this._names=h0(t.getAttribute("class")||"")}p0.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function d0(t,n){for(var e=Us(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function g0(t,n){for(var e=Us(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function C_(t){return function(){d0(this,t)}}function I_(t){return function(){g0(this,t)}}function R_(t,n){return function(){(n.apply(this,arguments)?d0:g0)(this,t)}}function F_(t,n){var e=h0(t+"");if(arguments.length<2){for(var r=Us(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?R_:n?C_:I_)(e,n))}function O_(){this.textContent=""}function z_(t){return function(){this.textContent=t}}function G_(t){return function(){var n=t.apply(this,arguments);this.textContent=n??""}}function U_(t){return arguments.length?this.each(t==null?O_:(typeof t=="function"?G_:z_)(t)):this.node().textContent}function Y_(){this.innerHTML=""}function B_(t){return function(){this.innerHTML=t}}function q_(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n??""}}function H_(t){return arguments.length?this.each(t==null?Y_:(typeof t=="function"?q_:B_)(t)):this.node().innerHTML}function W_(){this.nextSibling&&this.parentNode.appendChild(this)}function X_(){return this.each(W_)}function V_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function j_(){return this.each(V_)}function Z_(t){var n=typeof t=="function"?t:Oo(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function K_(){return null}function Q_(t,n){var e=typeof t=="function"?t:Oo(t),r=n==null?K_:typeof n=="function"?n:zo(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function J_(){var t=this.parentNode;t&&t.removeChild(this)}function tw(){return this.each(J_)}function nw(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ew(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function rw(t){return this.select(t?ew:nw)}function iw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ow(t){return function(n){t.call(this,n,this.__data__)}}function aw(t){return t.trim().split(/^|\s+/).map(function(n){var e="",r=n.indexOf(".");return r>=0&&(e=n.slice(r+1),n=n.slice(0,r)),{type:n,name:e}})}function uw(t){return function(){var n=this.__on;if(n){for(var e=0,r=-1,i=n.length,o;e<i;++e)o=n[e],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):n[++r]=o;++r?n.length=r:delete this.__on}}}function sw(t,n,e){return function(){var r=this.__on,i,o=ow(n);if(r){for(var a=0,u=r.length;a<u;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=e),i.value=n;return}}this.addEventListener(t.type,o,e),i={type:t.type,name:t.name,value:n,listener:o,options:e},r?r.push(i):this.__on=[i]}}function cw(t,n,e){var r=aw(t+""),i,o=r.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,s=u.length,f;c<s;++c)for(i=0,f=u[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=n?sw:uw,i=0;i<o;++i)this.each(u(r[i],n,e));return this}function m0(t,n,e){var r=Gs(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function lw(t,n){return function(){return m0(this,t,n)}}function fw(t,n){return function(){return m0(this,t,n.apply(this,arguments))}}function hw(t,n){return this.each((typeof n=="function"?fw:lw)(t,n))}function*pw(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Ys=[null];function Yt(t,n){this._groups=t,this._parents=n}function Pe(){return new Yt([[document.documentElement]],Ys)}function dw(){return this}Yt.prototype=Pe.prototype={constructor:Yt,select:Ux,selectAll:qx,selectChild:Vx,selectChildren:Qx,filter:Jx,data:o_,enter:t_,exit:u_,join:s_,merge:c_,selection:dw,order:l_,sort:f_,call:p_,nodes:d_,node:g_,size:m_,empty:y_,each:b_,attr:$_,style:P_,property:L_,classed:F_,text:U_,html:H_,raise:X_,lower:j_,append:Z_,insert:Q_,remove:tw,clone:rw,datum:iw,on:cw,dispatch:hw,[Symbol.iterator]:pw};function Z(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Ys)}function gw(t){return Z(Oo(t).call(document.documentElement))}var mw=0;function y0(){return new Bs}function Bs(){this._="@"+(++mw).toString(36)}Bs.prototype=y0.prototype={constructor:Bs,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function b0(t){let n;for(;n=t.sourceEvent;)t=n;return t}function an(t,n){if(t=b0(t),n===void 0&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}}return[t.pageX,t.pageY]}function yw(t,n){return t.target&&(t=b0(t),n===void 0&&(n=t.currentTarget),t=t.touches||[t]),Array.from(t,e=>an(e,n))}function bw(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([c0(t)],Ys)}const vw={passive:!1},si={capture:!0,passive:!1};function qs(t){t.stopImmediatePropagation()}function cr(t){t.preventDefault(),t.stopImmediatePropagation()}function Uo(t){var n=t.document.documentElement,e=Z(t).on("dragstart.drag",cr,si);"onselectstart"in n?e.on("selectstart.drag",cr,si):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Yo(t,n){var e=t.document.documentElement,r=Z(t).on("dragstart.drag",null);n&&(r.on("click.drag",cr,si),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}const Bo=t=>()=>t;function Hs(t,{sourceEvent:n,subject:e,target:r,identifier:i,active:o,x:a,y:u,dx:c,dy:s,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:s,enumerable:!0,configurable:!0},_:{value:f}})}Hs.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function xw(t){return!t.ctrlKey&&!t.button}function _w(){return this.parentNode}function ww(t,n){return n??{x:t.x,y:t.y}}function Aw(){return navigator.maxTouchPoints||"ontouchstart"in this}function v0(){var t=xw,n=_w,e=ww,r=Aw,i={},o=Te("start","drag","end"),a=0,u,c,s,f,h=0;function l(v){v.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,vw).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(v,w){if(!(f||!t.call(this,v,w))){var b=_(this,n.call(this,v,w),v,w,"mouse");b&&(Z(v.view).on("mousemove.drag",d,si).on("mouseup.drag",g,si),Uo(v.view),qs(v),s=!1,u=v.clientX,c=v.clientY,b("start",v))}}function d(v){if(cr(v),!s){var w=v.clientX-u,b=v.clientY-c;s=w*w+b*b>h}i.mouse("drag",v)}function g(v){Z(v.view).on("mousemove.drag mouseup.drag",null),Yo(v.view,s),cr(v),i.mouse("end",v)}function m(v,w){if(t.call(this,v,w)){var b=v.changedTouches,A=n.call(this,v,w),M=b.length,$,D;for($=0;$<M;++$)(D=_(this,A,v,w,b[$].identifier,b[$]))&&(qs(v),D("start",v,b[$]))}}function y(v){var w=v.changedTouches,b=w.length,A,M;for(A=0;A<b;++A)(M=i[w[A].identifier])&&(cr(v),M("drag",v,w[A]))}function x(v){var w=v.changedTouches,b=w.length,A,M;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),A=0;A<b;++A)(M=i[w[A].identifier])&&(qs(v),M("end",v,w[A]))}function _(v,w,b,A,M,$){var D=o.copy(),S=an($||b,w),L,E,T;if((T=e.call(v,new Hs("beforestart",{sourceEvent:b,target:l,identifier:M,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:D}),A))!=null)return L=T.x-S[0]||0,E=T.y-S[1]||0,function k(P,N,C){var R=S,O;switch(P){case"start":i[M]=k,O=a++;break;case"end":delete i[M],--a;case"drag":S=an(C||N,w),O=a;break}D.call(P,v,new Hs(P,{sourceEvent:N,subject:T,target:l,identifier:M,active:O,x:S[0]+L,y:S[1]+E,dx:S[0]-R[0],dy:S[1]-R[1],dispatch:D}),A)}}return l.filter=function(v){return arguments.length?(t=typeof v=="function"?v:Bo(!!v),l):t},l.container=function(v){return arguments.length?(n=typeof v=="function"?v:Bo(v),l):n},l.subject=function(v){return arguments.length?(e=typeof v=="function"?v:Bo(v),l):e},l.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:Bo(!!v),l):r},l.on=function(){var v=o.on.apply(o,arguments);return v===o?l:v},l.clickDistance=function(v){return arguments.length?(h=(v=+v)*v,l):Math.sqrt(h)},l}function lr(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function ci(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function se(){}var ke=.7,fr=1/ke,hr="\\s*([+-]?\\d+)\\s*",li="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mw=/^#([0-9a-f]{3,8})$/,$w=new RegExp(`^rgb\\(${hr},${hr},${hr}\\)$`),Sw=new RegExp(`^rgb\\(${Pn},${Pn},${Pn}\\)$`),Tw=new RegExp(`^rgba\\(${hr},${hr},${hr},${li}\\)$`),Dw=new RegExp(`^rgba\\(${Pn},${Pn},${Pn},${li}\\)$`),Pw=new RegExp(`^hsl\\(${li},${Pn},${Pn}\\)$`),kw=new RegExp(`^hsla\\(${li},${Pn},${Pn},${li}\\)$`),x0={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};lr(se,ce,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:_0,formatHex:_0,formatHex8:Ew,formatHsl:Nw,formatRgb:w0,toString:w0});function _0(){return this.rgb().formatHex()}function Ew(){return this.rgb().formatHex8()}function Nw(){return T0(this).formatHsl()}function w0(){return this.rgb().formatRgb()}function ce(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Mw.exec(t))?(e=n[1].length,n=parseInt(n[1],16),e===6?A0(n):e===3?new Et(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?qo(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?qo(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=$w.exec(t))?new Et(n[1],n[2],n[3],1):(n=Sw.exec(t))?new Et(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Tw.exec(t))?qo(n[1],n[2],n[3],n[4]):(n=Dw.exec(t))?qo(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Pw.exec(t))?S0(n[1],n[2]/100,n[3]/100,1):(n=kw.exec(t))?S0(n[1],n[2]/100,n[3]/100,n[4]):x0.hasOwnProperty(t)?A0(x0[t]):t==="transparent"?new Et(NaN,NaN,NaN,0):null}function A0(t){return new Et(t>>16&255,t>>8&255,t&255,1)}function qo(t,n,e,r){return r<=0&&(t=n=e=NaN),new Et(t,n,e,r)}function Ws(t){return t instanceof se||(t=ce(t)),t?(t=t.rgb(),new Et(t.r,t.g,t.b,t.opacity)):new Et}function pr(t,n,e,r){return arguments.length===1?Ws(t):new Et(t,n,e,r??1)}function Et(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}lr(Et,pr,ci(se,{brighter(t){return t=t==null?fr:Math.pow(fr,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ke:Math.pow(ke,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Et(Ee(this.r),Ee(this.g),Ee(this.b),Ho(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:M0,formatHex:M0,formatHex8:Lw,formatRgb:$0,toString:$0}));function M0(){return`#${Ne(this.r)}${Ne(this.g)}${Ne(this.b)}`}function Lw(){return`#${Ne(this.r)}${Ne(this.g)}${Ne(this.b)}${Ne((isNaN(this.opacity)?1:this.opacity)*255)}`}function $0(){const t=Ho(this.opacity);return`${t===1?"rgb(":"rgba("}${Ee(this.r)}, ${Ee(this.g)}, ${Ee(this.b)}${t===1?")":`, ${t})`}`}function Ho(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ee(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ne(t){return t=Ee(t),(t<16?"0":"")+t.toString(16)}function S0(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new yn(t,n,e,r)}function T0(t){if(t instanceof yn)return new yn(t.h,t.s,t.l,t.opacity);if(t instanceof se||(t=ce(t)),!t)return new yn;if(t instanceof yn)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(n===o?a=(e-r)/u+(e<r)*6:e===o?a=(r-n)/u+2:a=(n-e)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new yn(a,u,c,t.opacity)}function Wo(t,n,e,r){return arguments.length===1?T0(t):new yn(t,n,e,r??1)}function yn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}lr(yn,Wo,ci(se,{brighter(t){return t=t==null?fr:Math.pow(fr,t),new yn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ke:Math.pow(ke,t),new yn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Et(Xs(t>=240?t-240:t+120,i,r),Xs(t,i,r),Xs(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new yn(D0(this.h),Xo(this.s),Xo(this.l),Ho(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=Ho(this.opacity);return`${t===1?"hsl(":"hsla("}${D0(this.h)}, ${Xo(this.s)*100}%, ${Xo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function D0(t){return t=(t||0)%360,t<0?t+360:t}function Xo(t){return Math.max(0,Math.min(1,t||0))}function Xs(t,n,e){return(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)*255}const P0=Math.PI/180,k0=180/Math.PI,Vo=18,E0=.96422,N0=1,L0=.82521,C0=4/29,dr=6/29,I0=3*dr*dr,Cw=dr*dr*dr;function R0(t){if(t instanceof bn)return new bn(t.l,t.a,t.b,t.opacity);if(t instanceof kn)return O0(t);t instanceof Et||(t=Ws(t));var n=Ks(t.r),e=Ks(t.g),r=Ks(t.b),i=Vs((.2225045*n+.7168786*e+.0606169*r)/N0),o,a;return n===e&&e===r?o=a=i:(o=Vs((.4360747*n+.3850649*e+.1430804*r)/E0),a=Vs((.0139322*n+.0971045*e+.7141733*r)/L0)),new bn(116*i-16,500*(o-i),200*(i-a),t.opacity)}function Iw(t,n){return new bn(t,0,0,n??1)}function jo(t,n,e,r){return arguments.length===1?R0(t):new bn(t,n,e,r??1)}function bn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}lr(bn,jo,ci(se,{brighter(t){return new bn(this.l+Vo*(t??1),this.a,this.b,this.opacity)},darker(t){return new bn(this.l-Vo*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return n=E0*js(n),t=N0*js(t),e=L0*js(e),new Et(Zs(3.1338561*n-1.6168667*t-.4906146*e),Zs(-.9787684*n+1.9161415*t+.033454*e),Zs(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}}));function Vs(t){return t>Cw?Math.pow(t,1/3):t/I0+C0}function js(t){return t>dr?t*t*t:I0*(t-C0)}function Zs(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ks(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function F0(t){if(t instanceof kn)return new kn(t.h,t.c,t.l,t.opacity);if(t instanceof bn||(t=R0(t)),t.a===0&&t.b===0)return new kn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*k0;return new kn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Rw(t,n,e,r){return arguments.length===1?F0(t):new kn(e,n,t,r??1)}function Zo(t,n,e,r){return arguments.length===1?F0(t):new kn(t,n,e,r??1)}function kn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function O0(t){if(isNaN(t.h))return new bn(t.l,0,0,t.opacity);var n=t.h*P0;return new bn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}lr(kn,Zo,ci(se,{brighter(t){return new kn(this.h,this.c,this.l+Vo*(t??1),this.opacity)},darker(t){return new kn(this.h,this.c,this.l-Vo*(t??1),this.opacity)},rgb(){return O0(this).rgb()}}));var z0=-.14861,Qs=1.78277,Js=-.29227,Ko=-.90649,fi=1.97294,G0=fi*Ko,U0=fi*Qs,Y0=Qs*Js-Ko*z0;function Fw(t){if(t instanceof Le)return new Le(t.h,t.s,t.l,t.opacity);t instanceof Et||(t=Ws(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Y0*r+G0*n-U0*e)/(Y0+G0-U0),o=r-i,a=(fi*(e-i)-Js*o)/Ko,u=Math.sqrt(a*a+o*o)/(fi*i*(1-i)),c=u?Math.atan2(a,o)*k0-120:NaN;return new Le(c<0?c+360:c,u,i,t.opacity)}function vn(t,n,e,r){return arguments.length===1?Fw(t):new Le(t,n,e,r??1)}function Le(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}lr(Le,vn,ci(se,{brighter(t){return t=t==null?fr:Math.pow(fr,t),new Le(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ke:Math.pow(ke,t),new Le(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*P0,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Et(255*(n+e*(z0*r+Qs*i)),255*(n+e*(Js*r+Ko*i)),255*(n+e*(fi*r)),this.opacity)}}));function B0(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}function q0(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return B0((e-r/n)*n,a,i,o,u)}}function H0(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return B0((e-r/n)*n,i,o,a,u)}}const Qo=t=>()=>t;function W0(t,n){return function(e){return t+e*n}}function Ow(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function Jo(t,n){var e=n-t;return e?W0(t,e>180||e<-180?e-360*Math.round(e/360):e):Qo(isNaN(t)?n:t)}function zw(t){return(t=+t)==1?Nt:function(n,e){return e-n?Ow(n,e,t):Qo(isNaN(n)?e:n)}}function Nt(t,n){var e=n-t;return e?W0(t,e):Qo(isNaN(t)?n:t)}const hi=function t(n){var e=zw(n);function r(i,o){var a=e((i=pr(i)).r,(o=pr(o)).r),u=e(i.g,o.g),c=e(i.b,o.b),s=Nt(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=u(f),i.b=c(f),i.opacity=s(f),i+""}}return r.gamma=t,r}(1);function X0(t){return function(n){var e=n.length,r=new Array(e),i=new Array(e),o=new Array(e),a,u;for(a=0;a<e;++a)u=pr(n[a]),r[a]=u.r||0,i[a]=u.g||0,o[a]=u.b||0;return r=t(r),i=t(i),o=t(o),u.opacity=1,function(c){return u.r=r(c),u.g=i(c),u.b=o(c),u+""}}}var V0=X0(q0),Gw=X0(H0);function tc(t,n){n||(n=[]);var e=t?Math.min(n.length,t.length):0,r=n.slice(),i;return function(o){for(i=0;i<e;++i)r[i]=t[i]*(1-o)+n[i]*o;return r}}function j0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Uw(t,n){return(j0(n)?tc:Z0)(t,n)}function Z0(t,n){var e=n?n.length:0,r=t?Math.min(e,t.length):0,i=new Array(r),o=new Array(e),a;for(a=0;a<r;++a)i[a]=le(t[a],n[a]);for(;a<e;++a)o[a]=n[a];return function(u){for(a=0;a<r;++a)o[a]=i[a](u);return o}}function K0(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function ln(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function Q0(t,n){var e={},r={},i;(t===null||typeof t!="object")&&(t={}),(n===null||typeof n!="object")&&(n={});for(i in n)i in t?e[i]=le(t[i],n[i]):r[i]=n[i];return function(o){for(i in e)r[i]=e[i](o);return r}}var nc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ec=new RegExp(nc.source,"g");function Yw(t){return function(){return t}}function Bw(t){return function(n){return t(n)+""}}function rc(t,n){var e=nc.lastIndex=ec.lastIndex=0,r,i,o,a=-1,u=[],c=[];for(t=t+"",n=n+"";(r=nc.exec(t))&&(i=ec.exec(n));)(o=i.index)>e&&(o=n.slice(e,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,c.push({i:a,x:ln(r,i)})),e=ec.lastIndex;return e<n.length&&(o=n.slice(e),u[a]?u[a]+=o:u[++a]=o),u.length<2?c[0]?Bw(c[0].x):Yw(n):(n=c.length,function(s){for(var f=0,h;f<n;++f)u[(h=c[f]).i]=h.x(s);return u.join("")})}function le(t,n){var e=typeof n,r;return n==null||e==="boolean"?Qo(n):(e==="number"?ln:e==="string"?(r=ce(n))?(n=r,hi):rc:n instanceof ce?hi:n instanceof Date?K0:j0(n)?tc:Array.isArray(n)?Z0:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?Q0:ln)(t,n)}function qw(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}function Hw(t,n){var e=Jo(+t,+n);return function(r){var i=e(r);return i-360*Math.floor(i/360)}}function ta(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}var J0=180/Math.PI,ic={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tp(t,n,e,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,c/=u),t*r<n*e&&(t=-t,n=-n,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*J0,skewX:Math.atan(c)*J0,scaleX:a,scaleY:u}}var na;function Ww(t){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?ic:tp(n.a,n.b,n.c,n.d,n.e,n.f)}function Xw(t){return t==null||(na||(na=document.createElementNS("http://www.w3.org/2000/svg","g")),na.setAttribute("transform",t),!(t=na.transform.baseVal.consolidate()))?ic:(t=t.matrix,tp(t.a,t.b,t.c,t.d,t.e,t.f))}function np(t,n,e,r){function i(s){return s.length?s.pop()+" ":""}function o(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push("translate(",null,n,null,e);d.push({i:g-4,x:ln(s,h)},{i:g-2,x:ln(f,l)})}else(h||l)&&p.push("translate("+h+n+l+e)}function a(s,f,h,l){s!==f?(s-f>180?f+=360:f-s>180&&(s+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ln(s,f)})):f&&h.push(i(h)+"rotate("+f+r)}function u(s,f,h,l){s!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ln(s,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:ln(s,h)},{i:g-2,x:ln(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(s,f){var h=[],l=[];return s=t(s),f=t(f),o(s.translateX,s.translateY,f.translateX,f.translateY,h,l),a(s.rotate,f.rotate,h,l),u(s.skewX,f.skewX,h,l),c(s.scaleX,s.scaleY,f.scaleX,f.scaleY,h,l),s=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var ep=np(Ww,"px, ","px)","deg)"),rp=np(Xw,", ",")",")"),Vw=1e-12;function ip(t){return((t=Math.exp(t))+1/t)/2}function jw(t){return((t=Math.exp(t))-1/t)/2}function Zw(t){return((t=Math.exp(2*t))-1)/(t+1)}const op=function t(n,e,r){function i(o,a){var u=o[0],c=o[1],s=o[2],f=a[0],h=a[1],l=a[2],p=f-u,d=h-c,g=p*p+d*d,m,y;if(g<Vw)y=Math.log(l/s)/n,m=function(A){return[u+A*p,c+A*d,s*Math.exp(n*A*y)]};else{var x=Math.sqrt(g),_=(l*l-s*s+r*g)/(2*s*e*x),v=(l*l-s*s-r*g)/(2*l*e*x),w=Math.log(Math.sqrt(_*_+1)-_),b=Math.log(Math.sqrt(v*v+1)-v);y=(b-w)/n,m=function(A){var M=A*y,$=ip(w),D=s/(e*x)*($*Zw(n*M+w)-jw(w));return[u+D*p,c+D*d,s*$/ip(n*M+w)]}}return m.duration=y*1e3*n/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),u=a*a,c=u*u;return t(a,u,c)},i}(Math.SQRT2,2,4);function ap(t){return function(n,e){var r=t((n=Wo(n)).h,(e=Wo(e)).h),i=Nt(n.s,e.s),o=Nt(n.l,e.l),a=Nt(n.opacity,e.opacity);return function(u){return n.h=r(u),n.s=i(u),n.l=o(u),n.opacity=a(u),n+""}}}const Kw=ap(Jo);var Qw=ap(Nt);function Jw(t,n){var e=Nt((t=jo(t)).l,(n=jo(n)).l),r=Nt(t.a,n.a),i=Nt(t.b,n.b),o=Nt(t.opacity,n.opacity);return function(a){return t.l=e(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function up(t){return function(n,e){var r=t((n=Zo(n)).h,(e=Zo(e)).h),i=Nt(n.c,e.c),o=Nt(n.l,e.l),a=Nt(n.opacity,e.opacity);return function(u){return n.h=r(u),n.c=i(u),n.l=o(u),n.opacity=a(u),n+""}}}const t3=up(Jo);var n3=up(Nt);function sp(t){return function n(e){e=+e;function r(i,o){var a=t((i=vn(i)).h,(o=vn(o)).h),u=Nt(i.s,o.s),c=Nt(i.l,o.l),s=Nt(i.opacity,o.opacity);return function(f){return i.h=a(f),i.s=u(f),i.l=c(Math.pow(f,e)),i.opacity=s(f),i+""}}return r.gamma=n,r}(1)}const e3=sp(Jo);var ea=sp(Nt);function cp(t,n){n===void 0&&(n=t,t=le);for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e<r;)o[e]=t(i,i=n[++e]);return function(a){var u=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[u](a-u)}}function r3(t,n){for(var e=new Array(n),r=0;r<n;++r)e[r]=t(r/(n-1));return e}var gr=0,pi=0,di=0,lp=1e3,ra,gi,ia=0,Ce=0,oa=0,mi=typeof performance=="object"&&performance.now?performance:Date,fp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function yi(){return Ce||(fp(i3),Ce=mi.now()+oa)}function i3(){Ce=0}function bi(){this._call=this._time=this._next=null}bi.prototype=aa.prototype={constructor:bi,restart:function(t,n,e){if(typeof t!="function")throw new TypeError("callback is not a function");e=(e==null?yi():+e)+(n==null?0:+n),!this._next&&gi!==this&&(gi?gi._next=this:ra=this,gi=this),this._call=t,this._time=e,oc()},stop:function(){this._call&&(this._call=null,this._time=1/0,oc())}};function aa(t,n,e){var r=new bi;return r.restart(t,n,e),r}function hp(){yi(),++gr;for(var t=ra,n;t;)(n=Ce-t._time)>=0&&t._call.call(void 0,n),t=t._next;--gr}function pp(){Ce=(ia=mi.now())+oa,gr=pi=0;try{hp()}finally{gr=0,a3(),Ce=0}}function o3(){var t=mi.now(),n=t-ia;n>lp&&(oa-=n,ia=t)}function a3(){for(var t,n=ra,e,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ra=e);gi=t,oc(r)}function oc(t){if(!gr){pi&&(pi=clearTimeout(pi));var n=t-Ce;n>24?(t<1/0&&(pi=setTimeout(pp,t-mi.now()-oa)),di&&(di=clearInterval(di))):(di||(ia=mi.now(),di=setInterval(o3,lp)),gr=1,fp(pp))}}function ac(t,n,e){var r=new bi;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}function u3(t,n,e){var r=new bi,i=n;return n==null?(r.restart(t,n,e),r):(r._restart=r.restart,r.restart=function(o,a,u){a=+a,u=u==null?yi():+u,r._restart(function c(s){s+=i,r._restart(c,i+=a,u),o(s)},a,u)},r.restart(t,n,e),r)}var s3=Te("start","end","cancel","interrupt"),c3=[],dp=0,uc=1,sc=2,ua=3,gp=4,cc=5,sa=6;function ca(t,n,e,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(e in a)return;l3(t,e,{name:n,index:r,group:i,on:s3,tween:c3,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:dp})}function lc(t,n){var e=xn(t,n);if(e.state>dp)throw new Error("too late; already scheduled");return e}function En(t,n){var e=xn(t,n);if(e.state>ua)throw new Error("too late; already running");return e}function xn(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function l3(t,n,e){var r=t.__transition,i;r[n]=e,e.timer=aa(o,0,e.time);function o(s){e.state=uc,e.timer.restart(a,e.delay,e.time),e.delay<=s&&a(s-e.delay)}function a(s){var f,h,l,p;if(e.state!==uc)return c();for(f in r)if(p=r[f],p.name===e.name){if(p.state===ua)return ac(a);p.state===gp?(p.state=sa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<n&&(p.state=sa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(ac(function(){e.state===ua&&(e.state=gp,e.timer.restart(u,e.delay,e.time),u(s))}),e.state=sc,e.on.call("start",t,t.__data__,e.index,e.group),e.state===sc){for(e.state=ua,i=new Array(l=e.tween.length),f=0,h=-1;f<l;++f)(p=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(i[++h]=p);i.length=h+1}}function u(s){for(var f=s<e.duration?e.ease.call(null,s/e.duration):(e.timer.restart(c),e.state=cc,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);e.state===cc&&(e.on.call("end",t,t.__data__,e.index,e.group),c())}function c(){e.state=sa,e.timer.stop(),delete r[n];for(var s in r)return;delete t.__transition}}function Ie(t,n){var e=t.__transition,r,i,o=!0,a;if(e){n=n==null?null:n+"";for(a in e){if((r=e[a]).name!==n){o=!1;continue}i=r.state>sc&&r.state<cc,r.state=sa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete e[a]}o&&delete t.__transition}}function f3(t){return this.each(function(){Ie(this,t)})}function h3(t,n){var e,r;return function(){var i=En(this,t),o=i.tween;if(o!==e){r=e=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===n){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function p3(t,n,e){var r,i;if(typeof e!="function")throw new Error;return function(){var o=En(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},c=0,s=i.length;c<s;++c)if(i[c].name===n){i[c]=u;break}c===s&&i.push(u)}o.tween=i}}function d3(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r=xn(this.node(),e).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((n==null?h3:p3)(e,t,n))}function fc(t,n,e){var r=t._id;return t.each(function(){var i=En(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return xn(i,r).value[n]}}function mp(t,n){var e;return(typeof n=="number"?ln:n instanceof ce?hi:(e=ce(n))?(n=e,hi):rc)(t,n)}function g3(t){return function(){this.removeAttribute(t)}}function m3(t){return function(){this.removeAttributeNS(t.space,t.local)}}function y3(t,n,e){var r,i=e+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=n(r=a,e)}}function b3(t,n,e){var r,i=e+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=n(r=a,e)}}function v3(t,n,e){var r,i,o;return function(){var a,u=e(this),c;return u==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u)))}}function x3(t,n,e){var r,i,o;return function(){var a,u=e(this),c;return u==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u)))}}function _3(t,n){var e=ui(t),r=e==="transform"?rp:mp;return this.attrTween(t,typeof n=="function"?(e.local?x3:v3)(e,r,fc(this,"attr."+t,n)):n==null?(e.local?m3:g3)(e):(e.local?b3:y3)(e,r,n))}function w3(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function A3(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function M3(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&A3(t,o)),e}return i._value=n,i}function $3(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&w3(t,o)),e}return i._value=n,i}function S3(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw new Error;var r=ui(t);return this.tween(e,(r.local?M3:$3)(r,n))}function T3(t,n){return function(){lc(this,t).delay=+n.apply(this,arguments)}}function D3(t,n){return n=+n,function(){lc(this,t).delay=n}}function P3(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?T3:D3)(n,t)):xn(this.node(),n).delay}function k3(t,n){return function(){En(this,t).duration=+n.apply(this,arguments)}}function E3(t,n){return n=+n,function(){En(this,t).duration=n}}function N3(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?k3:E3)(n,t)):xn(this.node(),n).duration}function L3(t,n){if(typeof n!="function")throw new Error;return function(){En(this,t).ease=n}}function C3(t){var n=this._id;return arguments.length?this.each(L3(n,t)):xn(this.node(),n).ease}function I3(t,n){return function(){var e=n.apply(this,arguments);if(typeof e!="function")throw new Error;En(this,t).ease=e}}function R3(t){if(typeof t!="function")throw new Error;return this.each(I3(this._id,t))}function F3(t){typeof t!="function"&&(t=zs(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new Nn(r,this._parents,this._name,this._id)}function O3(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c=n[u],s=e[u],f=c.length,h=a[u]=new Array(f),l,p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=n[u];return new Nn(a,this._parents,this._name,this._id)}function z3(t){return(t+"").trim().split(/^|\s+/).every(function(n){var e=n.indexOf(".");return e>=0&&(n=n.slice(0,e)),!n||n==="start"})}function G3(t,n,e){var r,i,o=z3(n)?lc:En;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}function U3(t,n){var e=this._id;return arguments.length<2?xn(this.node(),e).on.on(t):this.each(G3(e,t,n))}function Y3(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function B3(){return this.on("end.remove",Y3(this._id))}function q3(t){var n=this._name,e=this._id;typeof t!="function"&&(t=zo(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u=r[a],c=u.length,s=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=u[l])&&(h=t.call(f,f.__data__,l,u))&&("__data__"in f&&(h.__data__=f.__data__),s[l]=h,ca(s[l],n,e,l,s,xn(f,e)));return new Nn(o,this._parents,n,e)}function H3(t){var n=this._name,e=this._id;typeof t!="function"&&(t=Os(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var c=r[u],s=c.length,f,h=0;h<s;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=xn(f,e),g=0,m=l.length;g<m;++g)(p=l[g])&&ca(p,n,e,g,l,d);o.push(l),a.push(f)}return new Nn(o,a,n,e)}var W3=Pe.prototype.constructor;function X3(){return new W3(this._groups,this._parents)}function V3(t,n){var e,r,i;return function(){var o=De(this,t),a=(this.style.removeProperty(t),De(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}function yp(t){return function(){this.style.removeProperty(t)}}function j3(t,n,e){var r,i=e+"",o;return function(){var a=De(this,t);return a===i?null:a===r?o:o=n(r=a,e)}}function Z3(t,n,e){var r,i,o;return function(){var a=De(this,t),u=e(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(t),De(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u))}}function K3(t,n){var e,r,i,o="style."+n,a="end."+o,u;return function(){var c=En(this,t),s=c.on,f=c.value[o]==null?u||(u=yp(n)):void 0;(s!==e||i!==f)&&(r=(e=s).copy()).on(a,i=f),c.on=r}}function Q3(t,n,e){var r=(t+="")=="transform"?ep:mp;return n==null?this.styleTween(t,V3(t,r)).on("end.style."+t,yp(t)):typeof n=="function"?this.styleTween(t,Z3(t,r,fc(this,"style."+t,n))).each(K3(this._id,t)):this.styleTween(t,j3(t,r,n),e).on("end.style."+t,null)}function J3(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function t6(t,n,e){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&J3(t,a,e)),r}return o._value=n,o}function n6(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;return this.tween(r,t6(t,n,e??""))}function e6(t){return function(){this.textContent=t}}function r6(t){return function(){var n=t(this);this.textContent=n??""}}function i6(t){return this.tween("text",typeof t=="function"?r6(fc(this,"text",t)):e6(t==null?"":t+""))}function o6(t){return function(n){this.textContent=t.call(this,n)}}function a6(t){var n,e;function r(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&o6(i)),n}return r._value=t,r}function u6(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,a6(t))}function s6(){for(var t=this._name,n=this._id,e=vp(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)if(c=a[s]){var f=xn(c,n);ca(c,t,e,s,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Nn(r,this._parents,t,e)}function c6(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,a){var u={value:a},c={value:function(){--i===0&&o()}};e.each(function(){var s=En(this,r),f=s.on;f!==t&&(n=(t=f).copy(),n._.cancel.push(u),n._.interrupt.push(u),n._.end.push(c)),s.on=n}),i===0&&o()})}var l6=0;function Nn(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function bp(t){return Pe().transition(t)}function vp(){return++l6}var Bn=Pe.prototype;Nn.prototype=bp.prototype={constructor:Nn,select:q3,selectAll:H3,selectChild:Bn.selectChild,selectChildren:Bn.selectChildren,filter:F3,merge:O3,selection:X3,transition:s6,call:Bn.call,nodes:Bn.nodes,node:Bn.node,size:Bn.size,empty:Bn.empty,each:Bn.each,on:U3,attr:_3,attrTween:S3,style:Q3,styleTween:n6,text:i6,textTween:u6,remove:B3,tween:d3,delay:P3,duration:N3,ease:C3,easeVarying:R3,end:c6,[Symbol.iterator]:Bn[Symbol.iterator]};const f6=t=>+t;function h6(t){return t*t}function p6(t){return t*(2-t)}function xp(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function d6(t){return t*t*t}function g6(t){return--t*t*t+1}function vi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var hc=3,m6=function t(n){n=+n;function e(r){return Math.pow(r,n)}return e.exponent=t,e}(hc),y6=function t(n){n=+n;function e(r){return 1-Math.pow(1-r,n)}return e.exponent=t,e}(hc),_p=function t(n){n=+n;function e(r){return((r*=2)<=1?Math.pow(r,n):2-Math.pow(2-r,n))/2}return e.exponent=t,e}(hc),wp=Math.PI,Ap=wp/2;function b6(t){return+t==1?1:1-Math.cos(t*Ap)}function v6(t){return Math.sin(t*Ap)}function Mp(t){return(1-Math.cos(wp*t))/2}function fe(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function x6(t){return fe(1-+t)}function _6(t){return 1-fe(t)}function $p(t){return((t*=2)<=1?fe(1-t):2-fe(t-1))/2}function w6(t){return 1-Math.sqrt(1-t*t)}function A6(t){return Math.sqrt(1- --t*t)}function Sp(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var pc=4/11,M6=6/11,$6=8/11,S6=3/4,T6=9/11,D6=10/11,P6=15/16,k6=21/22,E6=63/64,la=1/pc/pc;function N6(t){return 1-xi(1-t)}function xi(t){return(t=+t)<pc?la*t*t:t<$6?la*(t-=M6)*t+S6:t<D6?la*(t-=T6)*t+P6:la*(t-=k6)*t+E6}function L6(t){return((t*=2)<=1?1-xi(1-t):xi(t-1)+1)/2}var dc=1.70158,C6=function t(n){n=+n;function e(r){return(r=+r)*r*(n*(r-1)+r)}return e.overshoot=t,e}(dc),I6=function t(n){n=+n;function e(r){return--r*r*((r+1)*n+r)+1}return e.overshoot=t,e}(dc),Tp=function t(n){n=+n;function e(r){return((r*=2)<1?r*r*((n+1)*r-n):(r-=2)*r*((n+1)*r+n)+2)/2}return e.overshoot=t,e}(dc),mr=2*Math.PI,gc=1,mc=.3,R6=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=mr);function i(o){return n*fe(- --o)*Math.sin((r-o)/e)}return i.amplitude=function(o){return t(o,e*mr)},i.period=function(o){return t(n,o)},i}(gc,mc),fa=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=mr);function i(o){return 1-n*fe(o=+o)*Math.sin((o+r)/e)}return i.amplitude=function(o){return t(o,e*mr)},i.period=function(o){return t(n,o)},i}(gc,mc),F6=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=mr);function i(o){return((o=o*2-1)<0?n*fe(-o)*Math.sin((r-o)/e):2-n*fe(o)*Math.sin((r+o)/e))/2}return i.amplitude=function(o){return t(o,e*mr)},i.period=function(o){return t(n,o)},i}(gc,mc),O6={time:null,delay:0,duration:250,ease:vi};function z6(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}function G6(t){var n,e;t instanceof Nn?(n=t._id,t=t._name):(n=vp(),(e=O6).time=yi(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&ca(c,t,n,s,a,e||z6(c,n));return new Nn(r,this._parents,t,n)}Pe.prototype.interrupt=f3,Pe.prototype.transition=G6;var U6=[null];function Y6(t,n){var e=t.__transition,r,i;if(e){n=n==null?null:n+"";for(i in e)if((r=e[i]).state>uc&&r.name===n)return new Nn([[t]],U6,n,+i)}return null}const yc=t=>()=>t;function B6(t,{sourceEvent:n,target:e,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function q6(t){t.stopImmediatePropagation()}function bc(t){t.preventDefault(),t.stopImmediatePropagation()}var Dp={name:"drag"},vc={name:"space"},yr={name:"handle"},br={name:"center"};const{abs:Pp,max:Ft,min:Ot}=Math;function kp(t){return[+t[0],+t[1]]}function xc(t){return[kp(t[0]),kp(t[1])]}var ha={name:"x",handles:["w","e"].map(_i),input:function(t,n){return t==null?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},pa={name:"y",handles:["n","s"].map(_i),input:function(t,n){return t==null?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},H6={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(_i),input:function(t){return t==null?null:xc(t)},output:function(t){return t}},qn={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ep={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Np={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},W6={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},X6={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function _i(t){return{type:t}}function V6(t){return!t.ctrlKey&&!t.button}function j6(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Z6(){return navigator.maxTouchPoints||"ontouchstart"in this}function _c(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function K6(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Q6(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function J6(){return wc(ha)}function t5(){return wc(pa)}function n5(){return wc(H6)}function wc(t){var n=j6,e=V6,r=Z6,i=!0,o=Te("start","brush","end"),a=6,u;function c(m){var y=m.property("__brush",g).selectAll(".overlay").data([_i("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",qn.overlay).merge(y).each(function(){var _=_c(this).extent;Z(this).attr("x",_[0][0]).attr("y",_[0][1]).attr("width",_[1][0]-_[0][0]).attr("height",_[1][1]-_[0][1])}),m.selectAll(".selection").data([_i("selection")]).enter().append("rect").attr("class","selection").attr("cursor",qn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=m.selectAll(".handle").data(t.handles,function(_){return _.type});x.exit().remove(),x.enter().append("rect").attr("class",function(_){return"handle handle--"+_.type}).attr("cursor",function(_){return qn[_.type]}),m.each(s).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",l).filter(r).on("touchstart.brush",l).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(m,y,x){m.tween?m.on("start.brush",function(_){f(this,arguments).beforestart().start(_)}).on("interrupt.brush end.brush",function(_){f(this,arguments).end(_)}).tween("brush",function(){var _=this,v=_.__brush,w=f(_,arguments),b=v.selection,A=t.input(typeof y=="function"?y.apply(this,arguments):y,v.extent),M=le(b,A);function $(D){v.selection=D===1&&A===null?null:M(D),s.call(_),w.brush()}return b!==null&&A!==null?$:$(1)}):m.each(function(){var _=this,v=arguments,w=_.__brush,b=t.input(typeof y=="function"?y.apply(_,v):y,w.extent),A=f(_,v).beforestart();Ie(_),w.selection=b===null?null:b,s.call(_),A.start(x).brush(x).end(x)})},c.clear=function(m,y){c.move(m,null,y)};function s(){var m=Z(this),y=_c(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(m,y,x){var _=m.__brush.emitter;return _&&(!x||!_.clean)?_:new h(m,y,x)}function h(m,y,x){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=x}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,x){var _=Z(this.that).datum();o.call(m,this.that,new B6(m,{sourceEvent:y,target:c,selection:t.output(this.state.selection),mode:x,dispatch:o}),_)}};function l(m){if(u&&!m.touches||!e.apply(this,arguments))return;var y=this,x=m.target.__data__.type,_=(i&&m.metaKey?x="overlay":x)==="selection"?Dp:i&&m.altKey?br:yr,v=t===pa?null:W6[x],w=t===ha?null:X6[x],b=_c(y),A=b.extent,M=b.selection,$=A[0][0],D,S,L=A[0][1],E,T,k=A[1][0],P,N,C=A[1][1],R,O,U=0,W=0,lt,ut=v&&w&&i&&m.shiftKey,at,Tt,ct=Array.from(m.touches||[m],j=>{const Mt=j.identifier;return j=an(j,y),j.point0=j.slice(),j.identifier=Mt,j});Ie(y);var $t=f(y,arguments,!0).beforestart();if(x==="overlay"){M&&(lt=!0);const j=[ct[0],ct[1]||ct[0]];b.selection=M=[[D=t===pa?$:Ot(j[0][0],j[1][0]),E=t===ha?L:Ot(j[0][1],j[1][1])],[P=t===pa?k:Ft(j[0][0],j[1][0]),R=t===ha?C:Ft(j[0][1],j[1][1])]],ct.length>1&&At(m)}else D=M[0][0],E=M[0][1],P=M[1][0],R=M[1][1];S=D,T=E,N=P,O=R;var z=Z(y).attr("pointer-events","none"),Q=z.selectAll(".overlay").attr("cursor",qn[x]);if(m.touches)$t.moved=F,$t.ended=ft;else{var rt=Z(m.view).on("mousemove.brush",F,!0).on("mouseup.brush",ft,!0);i&&rt.on("keydown.brush",Jt,!0).on("keyup.brush",tn,!0),Uo(m.view)}s.call(y),$t.start(m,_.name);function F(j){for(const Mt of j.changedTouches||[j])for(const So of ct)So.identifier===Mt.identifier&&(So.cur=an(Mt,y));if(ut&&!at&&!Tt&&ct.length===1){const Mt=ct[0];Pp(Mt.cur[0]-Mt[0])>Pp(Mt.cur[1]-Mt[1])?Tt=!0:at=!0}for(const Mt of ct)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);lt=!0,bc(j),At(j)}function At(j){const Mt=ct[0],So=Mt.point0;var we;switch(U=Mt[0]-So[0],W=Mt[1]-So[1],_){case vc:case Dp:{v&&(U=Ft($-D,Ot(k-P,U)),S=D+U,N=P+U),w&&(W=Ft(L-E,Ot(C-R,W)),T=E+W,O=R+W);break}case yr:{ct[1]?(v&&(S=Ft($,Ot(k,ct[0][0])),N=Ft($,Ot(k,ct[1][0])),v=1),w&&(T=Ft(L,Ot(C,ct[0][1])),O=Ft(L,Ot(C,ct[1][1])),w=1)):(v<0?(U=Ft($-D,Ot(k-D,U)),S=D+U,N=P):v>0&&(U=Ft($-P,Ot(k-P,U)),S=D,N=P+U),w<0?(W=Ft(L-E,Ot(C-E,W)),T=E+W,O=R):w>0&&(W=Ft(L-R,Ot(C-R,W)),T=E,O=R+W));break}case br:{v&&(S=Ft($,Ot(k,D-U*v)),N=Ft($,Ot(k,P+U*v))),w&&(T=Ft(L,Ot(C,E-W*w)),O=Ft(L,Ot(C,R+W*w)));break}}N<S&&(v*=-1,we=D,D=P,P=we,we=S,S=N,N=we,x in Ep&&Q.attr("cursor",qn[x=Ep[x]])),O<T&&(w*=-1,we=E,E=R,R=we,we=T,T=O,O=we,x in Np&&Q.attr("cursor",qn[x=Np[x]])),b.selection&&(M=b.selection),at&&(S=M[0][0],N=M[1][0]),Tt&&(T=M[0][1],O=M[1][1]),(M[0][0]!==S||M[0][1]!==T||M[1][0]!==N||M[1][1]!==O)&&(b.selection=[[S,T],[N,O]],s.call(y),$t.brush(j,_.name))}function ft(j){if(q6(j),j.touches){if(j.touches.length)return;u&&clearTimeout(u),u=setTimeout(function(){u=null},500)}else Yo(j.view,lt),rt.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);z.attr("pointer-events","all"),Q.attr("cursor",qn.overlay),b.selection&&(M=b.selection),K6(M)&&(b.selection=null,s.call(y)),$t.end(j,_.name)}function Jt(j){switch(j.keyCode){case 16:{ut=v&&w;break}case 18:{_===yr&&(v&&(P=N-U*v,D=S+U*v),w&&(R=O-W*w,E=T+W*w),_=br,At(j));break}case 32:{(_===yr||_===br)&&(v<0?P=N-U:v>0&&(D=S-U),w<0?R=O-W:w>0&&(E=T-W),_=vc,Q.attr("cursor",qn.selection),At(j));break}default:return}bc(j)}function tn(j){switch(j.keyCode){case 16:{ut&&(at=Tt=ut=!1,At(j));break}case 18:{_===br&&(v<0?P=N:v>0&&(D=S),w<0?R=O:w>0&&(E=T),_=yr,At(j));break}case 32:{_===vc&&(j.altKey?(v&&(P=N-U*v,D=S+U*v),w&&(R=O-W*w,E=T+W*w),_=br):(v<0?P=N:v>0&&(D=S),w<0?R=O:w>0&&(E=T),_=yr),Q.attr("cursor",qn[x]),At(j));break}default:return}bc(j)}}function p(m){f(this,arguments).moved(m)}function d(m){f(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=xc(n.apply(this,arguments)),m.dim=t,m}return c.extent=function(m){return arguments.length?(n=typeof m=="function"?m:yc(xc(m)),c):n},c.filter=function(m){return arguments.length?(e=typeof m=="function"?m:yc(!!m),c):e},c.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:yc(!!m),c):r},c.handleSize=function(m){return arguments.length?(a=+m,c):a},c.keyModifiers=function(m){return arguments.length?(i=!!m,c):i},c.on=function(){var m=o.on.apply(o,arguments);return m===o?c:m},c}var Lp=Math.abs,vr=Math.cos,xr=Math.sin,Cp=Math.PI,da=Cp/2,Ip=Cp*2,Rp=Math.max,Ac=1e-12;function Mc(t,n){return Array.from({length:n-t},(e,r)=>t+r)}function e5(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}function r5(){return $c(!1,!1)}function i5(){return $c(!1,!0)}function o5(){return $c(!0,!1)}function $c(t,n){var e=0,r=null,i=null,o=null;function a(u){var c=u.length,s=new Array(c),f=Mc(0,c),h=new Array(c*c),l=new Array(c),p=0,d;u=Float64Array.from({length:c*c},n?(g,m)=>u[m%c][m/c|0]:(g,m)=>u[m/c|0][m%c]);for(let g=0;g<c;++g){let m=0;for(let y=0;y<c;++y)m+=u[g*c+y]+t*u[y*c+g];p+=s[g]=m}p=Rp(0,Ip-e*c)/p,d=p?e:Ip/c;{let g=0;r&&f.sort((m,y)=>r(s[m],s[y]));for(const m of f){const y=g;if(t){const x=Mc(~c+1,c).filter(_=>_<0?u[~_*c+m]:u[m*c+_]);i&&x.sort((_,v)=>i(_<0?-u[~_*c+m]:u[m*c+_],v<0?-u[~v*c+m]:u[m*c+v]));for(const _ of x)if(_<0){const v=h[~_*c+m]||(h[~_*c+m]={source:null,target:null});v.target={index:m,startAngle:g,endAngle:g+=u[~_*c+m]*p,value:u[~_*c+m]}}else{const v=h[m*c+_]||(h[m*c+_]={source:null,target:null});v.source={index:m,startAngle:g,endAngle:g+=u[m*c+_]*p,value:u[m*c+_]}}l[m]={index:m,startAngle:y,endAngle:g,value:s[m]}}else{const x=Mc(0,c).filter(_=>u[m*c+_]||u[_*c+m]);i&&x.sort((_,v)=>i(u[m*c+_],u[m*c+v]));for(const _ of x){let v;if(m<_?(v=h[m*c+_]||(h[m*c+_]={source:null,target:null}),v.source={index:m,startAngle:g,endAngle:g+=u[m*c+_]*p,value:u[m*c+_]}):(v=h[_*c+m]||(h[_*c+m]={source:null,target:null}),v.target={index:m,startAngle:g,endAngle:g+=u[m*c+_]*p,value:u[m*c+_]},m===_&&(v.source=v.target)),v.source&&v.target&&v.source.value<v.target.value){const w=v.source;v.source=v.target,v.target=w}}l[m]={index:m,startAngle:y,endAngle:g,value:s[m]}}g+=d}}return h=Object.values(h),h.groups=l,o?h.sort(o):h}return a.padAngle=function(u){return arguments.length?(e=Rp(0,u),a):e},a.sortGroups=function(u){return arguments.length?(r=u,a):r},a.sortSubgroups=function(u){return arguments.length?(i=u,a):i},a.sortChords=function(u){return arguments.length?(u==null?o=null:(o=e5(u))._=u,a):o&&o._},a}const Sc=Math.PI,Tc=2*Sc,Re=1e-6,a5=Tc-Re;function Fp(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=arguments[n]+t[n]}function u5(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Fp;const e=10**n;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*e)/e+r[i]}}let wi=class{constructor(n){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=n==null?Fp:u5(n)}moveTo(n,e){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(n,e){this._append`L${this._x1=+n},${this._y1=+e}`}quadraticCurveTo(n,e,r,i){this._append`Q${+n},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(n,e,r,i,o,a){this._append`C${+n},${+e},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(n,e,r,i,o){if(n=+n,e=+e,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,u=this._y1,c=r-n,s=i-e,f=a-n,h=u-e,l=f*f+h*h;if(this._x1===null)this._append`M${this._x1=n},${this._y1=e}`;else if(l>Re)if(!(Math.abs(h*c-s*f)>Re)||!o)this._append`L${this._x1=n},${this._y1=e}`;else{let p=r-a,d=i-u,g=c*c+s*s,m=p*p+d*d,y=Math.sqrt(g),x=Math.sqrt(l),_=o*Math.tan((Sc-Math.acos((g+l-m)/(2*y*x)))/2),v=_/x,w=_/y;Math.abs(v-1)>Re&&this._append`L${n+v*f},${e+v*h}`,this._append`A${o},${o},0,0,${+(h*p>f*d)},${this._x1=n+w*c},${this._y1=e+w*s}`}}arc(n,e,r,i,o,a){if(n=+n,e=+e,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),c=r*Math.sin(i),s=n+u,f=e+c,h=1^a,l=a?i-o:o-i;this._x1===null?this._append`M${s},${f}`:(Math.abs(this._x1-s)>Re||Math.abs(this._y1-f)>Re)&&this._append`L${s},${f}`,r&&(l<0&&(l=l%Tc+Tc),l>a5?this._append`A${r},${r},0,1,${h},${n-u},${e-c}A${r},${r},0,1,${h},${this._x1=s},${this._y1=f}`:l>Re&&this._append`A${r},${r},0,${+(l>=Sc)},${h},${this._x1=n+r*Math.cos(o)},${this._y1=e+r*Math.sin(o)}`)}rect(n,e,r,i){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Dc(){return new wi}Dc.prototype=wi.prototype;function s5(t=3){return new wi(+t)}var c5=Array.prototype.slice;function Fe(t){return function(){return t}}function l5(t){return t.source}function f5(t){return t.target}function Op(t){return t.radius}function h5(t){return t.startAngle}function p5(t){return t.endAngle}function d5(){return 0}function g5(){return 10}function zp(t){var n=l5,e=f5,r=Op,i=Op,o=h5,a=p5,u=d5,c=null;function s(){var f,h=n.apply(this,arguments),l=e.apply(this,arguments),p=u.apply(this,arguments)/2,d=c5.call(arguments),g=+r.apply(this,(d[0]=h,d)),m=o.apply(this,d)-da,y=a.apply(this,d)-da,x=+i.apply(this,(d[0]=l,d)),_=o.apply(this,d)-da,v=a.apply(this,d)-da;if(c||(c=f=Dc()),p>Ac&&(Lp(y-m)>p*2+Ac?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,Lp(v-_)>p*2+Ac?v>_?(_+=p,v-=p):(_-=p,v+=p):_=v=(_+v)/2),c.moveTo(g*vr(m),g*xr(m)),c.arc(0,0,g,m,y),m!==_||y!==v)if(t){var w=+t.apply(this,arguments),b=x-w,A=(_+v)/2;c.quadraticCurveTo(0,0,b*vr(_),b*xr(_)),c.lineTo(x*vr(A),x*xr(A)),c.lineTo(b*vr(v),b*xr(v))}else c.quadraticCurveTo(0,0,x*vr(_),x*xr(_)),c.arc(0,0,x,_,v);if(c.quadraticCurveTo(0,0,g*vr(m),g*xr(m)),c.closePath(),f)return c=null,f+""||null}return t&&(s.headRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Fe(+f),s):t}),s.radius=function(f){return arguments.length?(r=i=typeof f=="function"?f:Fe(+f),s):r},s.sourceRadius=function(f){return arguments.length?(r=typeof f=="function"?f:Fe(+f),s):r},s.targetRadius=function(f){return arguments.length?(i=typeof f=="function"?f:Fe(+f),s):i},s.startAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Fe(+f),s):o},s.endAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Fe(+f),s):a},s.padAngle=function(f){return arguments.length?(u=typeof f=="function"?f:Fe(+f),s):u},s.source=function(f){return arguments.length?(n=f,s):n},s.target=function(f){return arguments.length?(e=f,s):e},s.context=function(f){return arguments.length?(c=f??null,s):c},s}function m5(){return zp()}function y5(){return zp(g5)}var b5=Array.prototype,Gp=b5.slice;function v5(t,n){return t-n}function x5(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n<e;)r+=t[n-1][1]*t[n][0]-t[n-1][0]*t[n][1];return r}const he=t=>()=>t;function _5(t,n){for(var e=-1,r=n.length,i;++e<r;)if(i=w5(t,n[e]))return i;return 0}function w5(t,n){for(var e=n[0],r=n[1],i=-1,o=0,a=t.length,u=a-1;o<a;u=o++){var c=t[o],s=c[0],f=c[1],h=t[u],l=h[0],p=h[1];if(A5(c,h,n))return 0;f>r!=p>r&&e<(l-s)*(r-f)/(p-f)+s&&(i=-i)}return i}function A5(t,n,e){var r;return M5(t,n,e)&&$5(t[r=+(t[0]===n[0])],e[r],n[r])}function M5(t,n,e){return(n[0]-t[0])*(e[1]-t[1])===(e[0]-t[0])*(n[1]-t[1])}function $5(t,n,e){return t<=n&&n<=e||e<=n&&n<=t}function S5(){}var Hn=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Pc(){var t=1,n=1,e=ks,r=c;function i(s){var f=e(s);if(Array.isArray(f))f=f.slice().sort(v5);else{const h=ni(s,T5);for(f=$e(...Ps(h[0],h[1],f),f);f[f.length-1]>=h[1];)f.pop();for(;f[1]<h[0];)f.shift()}return f.map(h=>o(s,h))}function o(s,f){const h=f==null?NaN:+f;if(isNaN(h))throw new Error(`invalid value: ${f}`);var l=[],p=[];return a(s,h,function(d){r(d,s,h),x5(d)>0?l.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=l.length,y;g<m;++g)if(_5((y=l[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:f,coordinates:l}}function a(s,f,h){var l=new Array,p=new Array,d,g,m,y,x,_;for(d=g=-1,y=Oe(s[0],f),Hn[y<<1].forEach(v);++d<t-1;)m=y,y=Oe(s[d+1],f),Hn[m|y<<1].forEach(v);for(Hn[y<<0].forEach(v);++g<n-1;){for(d=-1,y=Oe(s[g*t+t],f),x=Oe(s[g*t],f),Hn[y<<1|x<<2].forEach(v);++d<t-1;)m=y,y=Oe(s[g*t+t+d+1],f),_=x,x=Oe(s[g*t+d+1],f),Hn[m|y<<1|x<<2|_<<3].forEach(v);Hn[y|x<<3].forEach(v)}for(d=-1,x=s[g*t]>=f,Hn[x<<2].forEach(v);++d<t-1;)_=x,x=Oe(s[g*t+d+1],f),Hn[x<<2|_<<3].forEach(v);Hn[x<<3].forEach(v);function v(w){var b=[w[0][0]+d,w[0][1]+g],A=[w[1][0]+d,w[1][1]+g],M=u(b),$=u(A),D,S;(D=p[M])?(S=l[$])?(delete p[D.end],delete l[S.start],D===S?(D.ring.push(A),h(D.ring)):l[D.start]=p[S.end]={start:D.start,end:S.end,ring:D.ring.concat(S.ring)}):(delete p[D.end],D.ring.push(A),p[D.end=$]=D):(D=l[$])?(S=p[M])?(delete l[D.start],delete p[S.end],D===S?(D.ring.push(A),h(D.ring)):l[S.start]=p[D.end]={start:S.start,end:D.end,ring:S.ring.concat(D.ring)}):(delete l[D.start],D.ring.unshift(b),l[D.start=M]=D):l[M]=p[$]={start:M,end:$,ring:[b,A]}}}function u(s){return s[0]*2+s[1]*(t+1)*4}function c(s,f,h){s.forEach(function(l){var p=l[0],d=l[1],g=p|0,m=d|0,y=kc(f[m*t+g]);p>0&&p<t&&g===p&&(l[0]=Up(p,kc(f[m*t+g-1]),y,h)),d>0&&d<n&&m===d&&(l[1]=Up(d,kc(f[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(s){if(!arguments.length)return[t,n];var f=Math.floor(s[0]),h=Math.floor(s[1]);if(!(f>=0&&h>=0))throw new Error("invalid size");return t=f,n=h,i},i.thresholds=function(s){return arguments.length?(e=typeof s=="function"?s:Array.isArray(s)?he(Gp.call(s)):he(s),i):e},i.smooth=function(s){return arguments.length?(r=s?c:S5,i):r===c},i}function T5(t){return isFinite(t)?t:NaN}function Oe(t,n){return t==null?!1:+t>=n}function kc(t){return t==null||isNaN(t=+t)?-1/0:t}function Up(t,n,e,r){const i=r-n,o=e-n,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function D5(t){return t[0]}function P5(t){return t[1]}function k5(){return 1}function E5(){var t=D5,n=P5,e=k5,r=960,i=500,o=20,a=2,u=o*3,c=r+u*2>>a,s=i+u*2>>a,f=he(20);function h(x){var _=new Float32Array(c*s),v=Math.pow(2,-a),w=-1;for(const E of x){var b=(t(E,++w,x)+u)*v,A=(n(E,w,x)+u)*v,M=+e(E,w,x);if(M&&b>=0&&b<c&&A>=0&&A<s){var $=Math.floor(b),D=Math.floor(A),S=b-$-.5,L=A-D-.5;_[$+D*c]+=(1-S)*(1-L)*M,_[$+1+D*c]+=S*(1-L)*M,_[$+1+(D+1)*c]+=S*L*M,_[$+(D+1)*c]+=(1-S)*L*M}}return Fh({data:_,width:c,height:s},o*v),_}function l(x){var _=h(x),v=f(_),w=Math.pow(2,2*a);return Array.isArray(v)||(v=$e(Number.MIN_VALUE,ri(_)/w,v)),Pc().size([c,s]).thresholds(v.map(b=>b*w))(_).map((b,A)=>(b.value=+v[A],p(b)))}l.contours=function(x){var _=h(x),v=Pc().size([c,s]),w=Math.pow(2,2*a),b=A=>{A=+A;var M=p(v.contour(_,A*w));return M.value=A,M};return Object.defineProperty(b,"max",{get:()=>ri(_)/w}),b};function p(x){return x.coordinates.forEach(d),x}function d(x){x.forEach(g)}function g(x){x.forEach(m)}function m(x){x[0]=x[0]*Math.pow(2,a)-u,x[1]=x[1]*Math.pow(2,a)-u}function y(){return u=o*3,c=r+u*2>>a,s=i+u*2>>a,l}return l.x=function(x){return arguments.length?(t=typeof x=="function"?x:he(+x),l):t},l.y=function(x){return arguments.length?(n=typeof x=="function"?x:he(+x),l):n},l.weight=function(x){return arguments.length?(e=typeof x=="function"?x:he(+x),l):e},l.size=function(x){if(!arguments.length)return[r,i];var _=+x[0],v=+x[1];if(!(_>=0&&v>=0))throw new Error("invalid size");return r=_,i=v,y()},l.cellSize=function(x){if(!arguments.length)return 1<<a;if(!((x=+x)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(x)/Math.LN2),y()},l.thresholds=function(x){return arguments.length?(f=typeof x=="function"?x:Array.isArray(x)?he(Gp.call(x)):he(x),l):f},l.bandwidth=function(x){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((x=+x)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*x*x+1)-1)/2,y()},l}const Wn=11102230246251565e-32,zt=134217729,N5=(3+8*Wn)*Wn;function Ec(t,n,e,r,i){let o,a,u,c,s=n[0],f=r[0],h=0,l=0;f>s==f>-s?(o=s,s=n[++h]):(o=f,f=r[++l]);let p=0;if(h<t&&l<e)for(f>s==f>-s?(a=s+o,u=o-(a-s),s=n[++h]):(a=f+o,u=o-(a-f),f=r[++l]),o=a,u!==0&&(i[p++]=u);h<t&&l<e;)f>s==f>-s?(a=o+s,c=a-o,u=o-(a-c)+(s-c),s=n[++h]):(a=o+f,c=a-o,u=o-(a-c)+(f-c),f=r[++l]),o=a,u!==0&&(i[p++]=u);for(;h<t;)a=o+s,c=a-o,u=o-(a-c)+(s-c),s=n[++h],o=a,u!==0&&(i[p++]=u);for(;l<e;)a=o+f,c=a-o,u=o-(a-c)+(f-c),f=r[++l],o=a,u!==0&&(i[p++]=u);return(o!==0||p===0)&&(i[p++]=o),p}function L5(t,n){let e=n[0];for(let r=1;r<t;r++)e+=n[r];return e}function Ai(t){return new Float64Array(t)}const C5=(3+16*Wn)*Wn,I5=(2+12*Wn)*Wn,R5=(9+64*Wn)*Wn*Wn,_r=Ai(4),Yp=Ai(8),Bp=Ai(12),qp=Ai(16),Bt=Ai(4);function F5(t,n,e,r,i,o,a){let u,c,s,f,h,l,p,d,g,m,y,x,_,v,w,b,A,M;const $=t-i,D=e-i,S=n-o,L=r-o;v=$*L,l=zt*$,p=l-(l-$),d=$-p,l=zt*L,g=l-(l-L),m=L-g,w=d*m-(v-p*g-d*g-p*m),b=S*D,l=zt*S,p=l-(l-S),d=S-p,l=zt*D,g=l-(l-D),m=D-g,A=d*m-(b-p*g-d*g-p*m),y=w-A,h=w-y,_r[0]=w-(y+h)+(h-A),x=v+y,h=x-v,_=v-(x-h)+(y-h),y=_-b,h=_-y,_r[1]=_-(y+h)+(h-b),M=x+y,h=M-x,_r[2]=x-(M-h)+(y-h),_r[3]=M;let E=L5(4,_r),T=I5*a;if(E>=T||-E>=T||(h=t-$,u=t-($+h)+(h-i),h=e-D,s=e-(D+h)+(h-i),h=n-S,c=n-(S+h)+(h-o),h=r-L,f=r-(L+h)+(h-o),u===0&&c===0&&s===0&&f===0)||(T=R5*a+N5*Math.abs(E),E+=$*f+L*u-(S*s+D*c),E>=T||-E>=T))return E;v=u*L,l=zt*u,p=l-(l-u),d=u-p,l=zt*L,g=l-(l-L),m=L-g,w=d*m-(v-p*g-d*g-p*m),b=c*D,l=zt*c,p=l-(l-c),d=c-p,l=zt*D,g=l-(l-D),m=D-g,A=d*m-(b-p*g-d*g-p*m),y=w-A,h=w-y,Bt[0]=w-(y+h)+(h-A),x=v+y,h=x-v,_=v-(x-h)+(y-h),y=_-b,h=_-y,Bt[1]=_-(y+h)+(h-b),M=x+y,h=M-x,Bt[2]=x-(M-h)+(y-h),Bt[3]=M;const k=Ec(4,_r,4,Bt,Yp);v=$*f,l=zt*$,p=l-(l-$),d=$-p,l=zt*f,g=l-(l-f),m=f-g,w=d*m-(v-p*g-d*g-p*m),b=S*s,l=zt*S,p=l-(l-S),d=S-p,l=zt*s,g=l-(l-s),m=s-g,A=d*m-(b-p*g-d*g-p*m),y=w-A,h=w-y,Bt[0]=w-(y+h)+(h-A),x=v+y,h=x-v,_=v-(x-h)+(y-h),y=_-b,h=_-y,Bt[1]=_-(y+h)+(h-b),M=x+y,h=M-x,Bt[2]=x-(M-h)+(y-h),Bt[3]=M;const P=Ec(k,Yp,4,Bt,Bp);v=u*f,l=zt*u,p=l-(l-u),d=u-p,l=zt*f,g=l-(l-f),m=f-g,w=d*m-(v-p*g-d*g-p*m),b=c*s,l=zt*c,p=l-(l-c),d=c-p,l=zt*s,g=l-(l-s),m=s-g,A=d*m-(b-p*g-d*g-p*m),y=w-A,h=w-y,Bt[0]=w-(y+h)+(h-A),x=v+y,h=x-v,_=v-(x-h)+(y-h),y=_-b,h=_-y,Bt[1]=_-(y+h)+(h-b),M=x+y,h=M-x,Bt[2]=x-(M-h)+(y-h),Bt[3]=M;const N=Ec(P,Bp,4,Bt,qp);return qp[N-1]}function ga(t,n,e,r,i,o){const a=(n-o)*(e-i),u=(t-i)*(r-o),c=a-u,s=Math.abs(a+u);return Math.abs(c)>=C5*s?c:-F5(t,n,e,r,i,o,s)}const Hp=Math.pow(2,-52),ma=new Uint32Array(512);class ya{static from(n,e=Y5,r=B5){const i=n.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const u=n[a];o[2*a]=e(u),o[2*a+1]=r(u)}return new ya(o)}constructor(n){const e=n.length>>1;if(e>0&&typeof n[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=n;const r=Math.max(2*e-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:n,_hullPrev:e,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=n.length>>1;let u=1/0,c=1/0,s=-1/0,f=-1/0;for(let $=0;$<a;$++){const D=n[2*$],S=n[2*$+1];D<u&&(u=D),S<c&&(c=S),D>s&&(s=D),S>f&&(f=S),this._ids[$]=$}const h=(u+s)/2,l=(c+f)/2;let p,d,g;for(let $=0,D=1/0;$<a;$++){const S=Nc(h,l,n[2*$],n[2*$+1]);S<D&&(p=$,D=S)}const m=n[2*p],y=n[2*p+1];for(let $=0,D=1/0;$<a;$++){if($===p)continue;const S=Nc(m,y,n[2*$],n[2*$+1]);S<D&&S>0&&(d=$,D=S)}let x=n[2*d],_=n[2*d+1],v=1/0;for(let $=0;$<a;$++){if($===p||$===d)continue;const D=G5(m,y,x,_,n[2*$],n[2*$+1]);D<v&&(g=$,v=D)}let w=n[2*g],b=n[2*g+1];if(v===1/0){for(let S=0;S<a;S++)this._dists[S]=n[2*S]-n[0]||n[2*S+1]-n[1];wr(this._ids,this._dists,0,a-1);const $=new Uint32Array(a);let D=0;for(let S=0,L=-1/0;S<a;S++){const E=this._ids[S],T=this._dists[E];T>L&&($[D++]=E,L=T)}this.hull=$.subarray(0,D),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(ga(m,y,x,_,w,b)<0){const $=d,D=x,S=_;d=g,x=w,_=b,g=$,w=D,b=S}const A=U5(m,y,x,_,w,b);this._cx=A.x,this._cy=A.y;for(let $=0;$<a;$++)this._dists[$]=Nc(n[2*$],n[2*$+1],A.x,A.y);wr(this._ids,this._dists,0,a-1),this._hullStart=p;let M=3;r[p]=e[g]=d,r[d]=e[p]=g,r[g]=e[d]=p,i[p]=0,i[d]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=p,o[this._hashKey(x,_)]=d,o[this._hashKey(w,b)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let $=0,D,S;$<this._ids.length;$++){const L=this._ids[$],E=n[2*L],T=n[2*L+1];if($>0&&Math.abs(E-D)<=Hp&&Math.abs(T-S)<=Hp||(D=E,S=T,L===p||L===d||L===g))continue;let k=0;for(let O=0,U=this._hashKey(E,T);O<this._hashSize&&(k=o[(U+O)%this._hashSize],!(k!==-1&&k!==r[k]));O++);k=e[k];let P=k,N;for(;N=r[P],ga(E,T,n[2*P],n[2*P+1],n[2*N],n[2*N+1])>=0;)if(P=N,P===k){P=-1;break}if(P===-1)continue;let C=this._addTriangle(P,L,r[P],-1,-1,i[P]);i[L]=this._legalize(C+2),i[P]=C,M++;let R=r[P];for(;N=r[R],ga(E,T,n[2*R],n[2*R+1],n[2*N],n[2*N+1])<0;)C=this._addTriangle(R,L,N,i[L],-1,i[R]),i[L]=this._legalize(C+2),r[R]=R,M--,R=N;if(P===k)for(;N=e[P],ga(E,T,n[2*N],n[2*N+1],n[2*P],n[2*P+1])<0;)C=this._addTriangle(N,L,P,-1,i[P],i[N]),this._legalize(C+2),i[N]=C,r[P]=P,M--,P=N;this._hullStart=e[L]=P,r[P]=e[R]=L,r[L]=R,o[this._hashKey(E,T)]=L,o[this._hashKey(n[2*P],n[2*P+1])]=P}this.hull=new Uint32Array(M);for(let $=0,D=this._hullStart;$<M;$++)this.hull[$]=D,D=r[D];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(n,e){return Math.floor(O5(n-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(n){const{_triangles:e,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const u=r[n],c=n-n%3;if(a=c+(n+2)%3,u===-1){if(o===0)break;n=ma[--o];continue}const s=u-u%3,f=c+(n+1)%3,h=s+(u+2)%3,l=e[a],p=e[n],d=e[f],g=e[h];if(z5(i[2*l],i[2*l+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*g],i[2*g+1])){e[n]=g,e[u]=l;const y=r[h];if(y===-1){let _=this._hullStart;do{if(this._hullTri[_]===h){this._hullTri[_]=n;break}_=this._hullPrev[_]}while(_!==this._hullStart)}this._link(n,y),this._link(u,r[a]),this._link(a,h);const x=s+(u+1)%3;o<ma.length&&(ma[o++]=x)}else{if(o===0)break;n=ma[--o]}}return a}_link(n,e){this._halfedges[n]=e,e!==-1&&(this._halfedges[e]=n)}_addTriangle(n,e,r,i,o,a){const u=this.trianglesLen;return this._triangles[u]=n,this._triangles[u+1]=e,this._triangles[u+2]=r,this._link(u,i),this._link(u+1,o),this._link(u+2,a),this.trianglesLen+=3,u}}function O5(t,n){const e=t/(Math.abs(t)+Math.abs(n));return(n>0?3-e:1+e)/4}function Nc(t,n,e,r){const i=t-e,o=n-r;return i*i+o*o}function z5(t,n,e,r,i,o,a,u){const c=t-a,s=n-u,f=e-a,h=r-u,l=i-a,p=o-u,d=c*c+s*s,g=f*f+h*h,m=l*l+p*p;return c*(h*m-g*p)-s*(f*m-g*l)+d*(f*p-h*l)<0}function G5(t,n,e,r,i,o){const a=e-t,u=r-n,c=i-t,s=o-n,f=a*a+u*u,h=c*c+s*s,l=.5/(a*s-u*c),p=(s*f-u*h)*l,d=(a*h-c*f)*l;return p*p+d*d}function U5(t,n,e,r,i,o){const a=e-t,u=r-n,c=i-t,s=o-n,f=a*a+u*u,h=c*c+s*s,l=.5/(a*s-u*c),p=t+(s*f-u*h)*l,d=n+(a*h-c*f)*l;return{x:p,y:d}}function wr(t,n,e,r){if(r-e<=20)for(let i=e+1;i<=r;i++){const o=t[i],a=n[o];let u=i-1;for(;u>=e&&n[t[u]]>a;)t[u+1]=t[u--];t[u+1]=o}else{const i=e+r>>1;let o=e+1,a=r;Mi(t,i,o),n[t[e]]>n[t[r]]&&Mi(t,e,r),n[t[o]]>n[t[r]]&&Mi(t,o,r),n[t[e]]>n[t[o]]&&Mi(t,e,o);const u=t[o],c=n[u];for(;;){do o++;while(n[t[o]]<c);do a--;while(n[t[a]]>c);if(a<o)break;Mi(t,o,a)}t[e+1]=t[a],t[a]=u,r-o+1>=a-e?(wr(t,n,o,r),wr(t,n,e,a-1)):(wr(t,n,e,a-1),wr(t,n,o,r))}}function Mi(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function Y5(t){return t[0]}function B5(t){return t[1]}const Wp=1e-6;class ze{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(n,e){this._+=`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(n,e){this._+=`L${this._x1=+n},${this._y1=+e}`}arc(n,e,r){n=+n,e=+e,r=+r;const i=n+r,o=e;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>Wp||Math.abs(this._y1-o)>Wp)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${n-r},${e}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(n,e,r,i){this._+=`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Lc{constructor(){this._=[]}moveTo(n,e){this._.push([n,e])}closePath(){this._.push(this._[0].slice())}lineTo(n,e){this._.push([n,e])}value(){return this._.length?this._:null}}class Xp{constructor(n,[e,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(e=+e))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=n,this._circumcenters=new Float64Array(n.points.length*2),this.vectors=new Float64Array(n.points.length*2),this.xmax=i,this.xmin=e,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:n,hull:e,triangles:r},vectors:i}=this;let o,a;const u=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,x,_;g<y;g+=3,m+=2){const v=r[g]*2,w=r[g+1]*2,b=r[g+2]*2,A=n[v],M=n[v+1],$=n[w],D=n[w+1],S=n[b],L=n[b+1],E=$-A,T=D-M,k=S-A,P=L-M,N=(E*P-T*k)*2;if(Math.abs(N)<1e-9){if(o===void 0){o=a=0;for(const R of e)o+=n[R*2],a+=n[R*2+1];o/=e.length,a/=e.length}const C=1e9*Math.sign((o-A)*P-(a-M)*k);x=(A+S)/2-C*P,_=(M+L)/2+C*k}else{const C=1/N,R=E*E+T*T,O=k*k+P*P;x=A+(P*R-T*O)*C,_=M+(E*O-k*R)*C}u[m]=x,u[m+1]=_}let c=e[e.length-1],s,f=c*4,h,l=n[2*c],p,d=n[2*c+1];i.fill(0);for(let g=0;g<e.length;++g)c=e[g],s=f,h=l,p=d,f=c*4,l=n[2*c],d=n[2*c+1],i[s+2]=i[f]=p-d,i[s+3]=i[f+1]=l-h}render(n){const e=n==null?n=new ze:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:u}=this;if(o.length<=1)return null;for(let f=0,h=r.length;f<h;++f){const l=r[f];if(l<f)continue;const p=Math.floor(f/3)*2,d=Math.floor(l/3)*2,g=a[p],m=a[p+1],y=a[d],x=a[d+1];this._renderSegment(g,m,y,x,n)}let c,s=o[o.length-1];for(let f=0;f<o.length;++f){c=s,s=o[f];const h=Math.floor(i[s]/3)*2,l=a[h],p=a[h+1],d=c*4,g=this._project(l,p,u[d+2],u[d+3]);g&&this._renderSegment(l,p,g[0],g[1],n)}return e&&e.value()}renderBounds(n){const e=n==null?n=new ze:void 0;return n.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),e&&e.value()}renderCell(n,e){const r=e==null?e=new ze:void 0,i=this._clip(n);if(i===null||!i.length)return;e.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&e.lineTo(i[a],i[a+1]);return e.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:n}}=this;for(let e=0,r=n.length/2;e<r;++e){const i=this.cellPolygon(e);i&&(i.index=e,yield i)}}cellPolygon(n){const e=new Lc;return this.renderCell(n,e),e.value()}_renderSegment(n,e,r,i,o){let a;const u=this._regioncode(n,e),c=this._regioncode(r,i);u===0&&c===0?(o.moveTo(n,e),o.lineTo(r,i)):(a=this._clipSegment(n,e,r,i,u,c))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(n,e,r){return e=+e,e!==e||(r=+r,r!==r)?!1:this.delaunay._step(n,e,r)===n}*neighbors(n){const e=this._clip(n);if(e)for(const r of this.delaunay.neighbors(n)){const i=this._clip(r);if(i){t:for(let o=0,a=e.length;o<a;o+=2)for(let u=0,c=i.length;u<c;u+=2)if(e[o]===i[u]&&e[o+1]===i[u+1]&&e[(o+2)%a]===i[(u+c-2)%c]&&e[(o+3)%a]===i[(u+c-1)%c]){yield r;break t}}}}_cell(n){const{circumcenters:e,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[n];if(a===-1)return null;const u=[];let c=a;do{const s=Math.floor(c/3);if(u.push(e[s*2],e[s*2+1]),c=c%3===2?c-2:c+1,o[c]!==n)break;c=i[c]}while(c!==a&&c!==-1);return u}_clip(n){if(n===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const e=this._cell(n);if(e===null)return null;const{vectors:r}=this,i=n*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(n,e,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(n,e))}_clipFinite(n,e){const r=e.length;let i=null,o,a,u=e[r-2],c=e[r-1],s,f=this._regioncode(u,c),h,l=0;for(let p=0;p<r;p+=2)if(o=u,a=c,u=e[p],c=e[p+1],s=f,f=this._regioncode(u,c),s===0&&f===0)h=l,l=0,i?i.push(u,c):i=[u,c];else{let d,g,m,y,x;if(s===0){if((d=this._clipSegment(o,a,u,c,s,f))===null)continue;[g,m,y,x]=d}else{if((d=this._clipSegment(u,c,o,a,f,s))===null)continue;[y,x,g,m]=d,h=l,l=this._edgecode(g,m),h&&l&&this._edge(n,h,l,i,i.length),i?i.push(g,m):i=[g,m]}h=l,l=this._edgecode(y,x),h&&l&&this._edge(n,h,l,i,i.length),i?i.push(y,x):i=[y,x]}if(i)h=l,l=this._edgecode(i[0],i[1]),h&&l&&this._edge(n,h,l,i,i.length);else if(this.contains(n,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(n,e,r,i,o,a){const u=o<a;for(u&&([n,e,r,i,o,a]=[r,i,n,e,a,o]);;){if(o===0&&a===0)return u?[r,i,n,e]:[n,e,r,i];if(o&a)return null;let c,s,f=o||a;f&8?(c=n+(r-n)*(this.ymax-e)/(i-e),s=this.ymax):f&4?(c=n+(r-n)*(this.ymin-e)/(i-e),s=this.ymin):f&2?(s=e+(i-e)*(this.xmax-n)/(r-n),c=this.xmax):(s=e+(i-e)*(this.xmin-n)/(r-n),c=this.xmin),o?(n=c,e=s,o=this._regioncode(n,e)):(r=c,i=s,a=this._regioncode(r,i))}}_clipInfinite(n,e,r,i,o,a){let u=Array.from(e),c;if((c=this._project(u[0],u[1],r,i))&&u.unshift(c[0],c[1]),(c=this._project(u[u.length-2],u[u.length-1],o,a))&&u.push(c[0],c[1]),u=this._clipFinite(n,u))for(let s=0,f=u.length,h,l=this._edgecode(u[f-2],u[f-1]);s<f;s+=2)h=l,l=this._edgecode(u[s],u[s+1]),h&&l&&(s=this._edge(n,h,l,u,s),f=u.length);else this.contains(n,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(u=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return u}_edge(n,e,r,i,o){for(;e!==r;){let a,u;switch(e){case 5:e=4;continue;case 4:e=6,a=this.xmax,u=this.ymin;break;case 6:e=2;continue;case 2:e=10,a=this.xmax,u=this.ymax;break;case 10:e=8;continue;case 8:e=9,a=this.xmin,u=this.ymax;break;case 9:e=1;continue;case 1:e=5,a=this.xmin,u=this.ymin;break}(i[o]!==a||i[o+1]!==u)&&this.contains(n,a,u)&&(i.splice(o,0,a,u),o+=2)}return o}_project(n,e,r,i){let o=1/0,a,u,c;if(i<0){if(e<=this.ymin)return null;(a=(this.ymin-e)/i)<o&&(c=this.ymin,u=n+(o=a)*r)}else if(i>0){if(e>=this.ymax)return null;(a=(this.ymax-e)/i)<o&&(c=this.ymax,u=n+(o=a)*r)}if(r>0){if(n>=this.xmax)return null;(a=(this.xmax-n)/r)<o&&(u=this.xmax,c=e+(o=a)*i)}else if(r<0){if(n<=this.xmin)return null;(a=(this.xmin-n)/r)<o&&(u=this.xmin,c=e+(o=a)*i)}return[u,c]}_edgecode(n,e){return(n===this.xmin?1:n===this.xmax?2:0)|(e===this.ymin?4:e===this.ymax?8:0)}_regioncode(n,e){return(n<this.xmin?1:n>this.xmax?2:0)|(e<this.ymin?4:e>this.ymax?8:0)}_simplify(n){if(n&&n.length>4){for(let e=0;e<n.length;e+=2){const r=(e+2)%n.length,i=(e+4)%n.length;(n[e]===n[r]&&n[r]===n[i]||n[e+1]===n[r+1]&&n[r+1]===n[i+1])&&(n.splice(r,2),e-=2)}n.length||(n=null)}return n}}const q5=2*Math.PI,Ar=Math.pow;function H5(t){return t[0]}function W5(t){return t[1]}function X5(t){const{triangles:n,coords:e}=t;for(let r=0;r<n.length;r+=3){const i=2*n[r],o=2*n[r+1],a=2*n[r+2];if((e[a]-e[i])*(e[o+1]-e[i+1])-(e[o]-e[i])*(e[a+1]-e[i+1])>1e-10)return!1}return!0}function V5(t,n,e){return[t+Math.sin(t+n)*e,n+Math.cos(t-n)*e]}class Cc{static from(n,e=H5,r=W5,i){return new Cc("length"in n?j5(n,e,r,i):Float64Array.from(Z5(n,e,r,i)))}constructor(n){this._delaunator=new ya(n),this.inedges=new Int32Array(n.length/2),this._hullIndex=new Int32Array(n.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const n=this._delaunator,e=this.points;if(n.hull&&n.hull.length>2&&X5(n)){this.collinear=Int32Array.from({length:e.length/2},(l,p)=>p).sort((l,p)=>e[2*l]-e[2*p]||e[2*l+1]-e[2*p+1]);const c=this.collinear[0],s=this.collinear[this.collinear.length-1],f=[e[2*c],e[2*c+1],e[2*s],e[2*s+1]],h=1e-8*Math.hypot(f[3]-f[1],f[2]-f[0]);for(let l=0,p=e.length/2;l<p;++l){const d=V5(e[2*l],e[2*l+1],h);e[2*l]=d[0],e[2*l+1]=d[1]}this._delaunator=new ya(e)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),u=this._hullIndex.fill(-1);for(let c=0,s=r.length;c<s;++c){const f=o[c%3===2?c-2:c+1];(r[c]===-1||a[f]===-1)&&(a[f]=c)}for(let c=0,s=i.length;c<s;++c)u[i[c]]=c;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(n){return new Xp(this,n)}*neighbors(n){const{inedges:e,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:u}=this;if(u){const h=u.indexOf(n);h>0&&(yield u[h-1]),h<u.length-1&&(yield u[h+1]);return}const c=e[n];if(c===-1)return;let s=c,f=-1;do{if(yield f=a[s],s=s%3===2?s-2:s+1,a[s]!==n)return;if(s=o[s],s===-1){const h=r[(i[n]+1)%r.length];h!==f&&(yield h);return}}while(s!==c)}find(n,e,r=0){if(n=+n,n!==n||(e=+e,e!==e))return-1;const i=r;let o;for(;(o=this._step(r,n,e))>=0&&o!==r&&o!==i;)r=o;return o}_step(n,e,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:u,triangles:c,points:s}=this;if(i[n]===-1||!s.length)return(n+1)%(s.length>>1);let f=n,h=Ar(e-s[n*2],2)+Ar(r-s[n*2+1],2);const l=i[n];let p=l;do{let d=c[p];const g=Ar(e-s[d*2],2)+Ar(r-s[d*2+1],2);if(g<h&&(h=g,f=d),p=p%3===2?p-2:p+1,c[p]!==n)break;if(p=u[p],p===-1){if(p=o[(a[n]+1)%o.length],p!==d&&Ar(e-s[p*2],2)+Ar(r-s[p*2+1],2)<h)return p;break}}while(p!==l);return f}render(n){const e=n==null?n=new ze:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,u=i.length;a<u;++a){const c=i[a];if(c<a)continue;const s=o[a]*2,f=o[c]*2;n.moveTo(r[s],r[s+1]),n.lineTo(r[f],r[f+1])}return this.renderHull(n),e&&e.value()}renderPoints(n,e){e===void 0&&(!n||typeof n.moveTo!="function")&&(e=n,n=null),e=e==null?2:+e;const r=n==null?n=new ze:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const u=i[o],c=i[o+1];n.moveTo(u+e,c),n.arc(u,c,e,0,q5)}return r&&r.value()}renderHull(n){const e=n==null?n=new ze:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;n.moveTo(i[o],i[o+1]);for(let u=1;u<a;++u){const c=2*r[u];n.lineTo(i[c],i[c+1])}return n.closePath(),e&&e.value()}hullPolygon(){const n=new Lc;return this.renderHull(n),n.value()}renderTriangle(n,e){const r=e==null?e=new ze:void 0,{points:i,triangles:o}=this,a=o[n*=3]*2,u=o[n+1]*2,c=o[n+2]*2;return e.moveTo(i[a],i[a+1]),e.lineTo(i[u],i[u+1]),e.lineTo(i[c],i[c+1]),e.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:n}=this;for(let e=0,r=n.length/3;e<r;++e)yield this.trianglePolygon(e)}trianglePolygon(n){const e=new Lc;return this.renderTriangle(n,e),e.value()}}function j5(t,n,e,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const u=t[a];o[a*2]=n.call(r,u,a,t),o[a*2+1]=e.call(r,u,a,t)}return o}function*Z5(t,n,e,r){let i=0;for(const o of t)yield n.call(r,o,i,t),yield e.call(r,o,i,t),++i}var Vp={},Ic={},Rc=34,$i=10,Fc=13;function jp(t){return new Function("d","return {"+t.map(function(n,e){return JSON.stringify(n)+": d["+e+'] || ""'}).join(",")+"}")}function K5(t,n){var e=jp(t);return function(r,i){return n(e(r),i,t)}}function Zp(t){var n=Object.create(null),e=[];return t.forEach(function(r){for(var i in r)i in n||e.push(n[i]=i)}),e}function nn(t,n){var e=t+"",r=e.length;return r<n?new Array(n-r+1).join(0)+e:e}function Q5(t){return t<0?"-"+nn(-t,6):t>9999?"+"+nn(t,6):nn(t,4)}function J5(t){var n=t.getUTCHours(),e=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":Q5(t.getUTCFullYear())+"-"+nn(t.getUTCMonth()+1,2)+"-"+nn(t.getUTCDate(),2)+(i?"T"+nn(n,2)+":"+nn(e,2)+":"+nn(r,2)+"."+nn(i,3)+"Z":r?"T"+nn(n,2)+":"+nn(e,2)+":"+nn(r,2)+"Z":e||n?"T"+nn(n,2)+":"+nn(e,2)+"Z":"")}function ba(t){var n=new RegExp('["'+t+`
2
- \r]`),e=t.charCodeAt(0);function r(h,l){var p,d,g=i(h,function(m,y){if(p)return p(m,y-1);d=m,p=l?K5(m,l):jp(m)});return g.columns=d||[],g}function i(h,l){var p=[],d=h.length,g=0,m=0,y,x=d<=0,_=!1;h.charCodeAt(d-1)===$i&&--d,h.charCodeAt(d-1)===Fc&&--d;function v(){if(x)return Ic;if(_)return _=!1,Vp;var b,A=g,M;if(h.charCodeAt(A)===Rc){for(;g++<d&&h.charCodeAt(g)!==Rc||h.charCodeAt(++g)===Rc;);return(b=g)>=d?x=!0:(M=h.charCodeAt(g++))===$i?_=!0:M===Fc&&(_=!0,h.charCodeAt(g)===$i&&++g),h.slice(A+1,b-1).replace(/""/g,'"')}for(;g<d;){if((M=h.charCodeAt(b=g++))===$i)_=!0;else if(M===Fc)_=!0,h.charCodeAt(g)===$i&&++g;else if(M!==e)continue;return h.slice(A,b)}return x=!0,h.slice(A,d)}for(;(y=v())!==Ic;){for(var w=[];y!==Vp&&y!==Ic;)w.push(y),y=v();l&&(w=l(w,m++))==null||p.push(w)}return p}function o(h,l){return h.map(function(p){return l.map(function(d){return f(p[d])}).join(t)})}function a(h,l){return l==null&&(l=Zp(h)),[l.map(f).join(t)].concat(o(h,l)).join(`
3
- `)}function u(h,l){return l==null&&(l=Zp(h)),o(h,l).join(`
1
+ (function(nt,rr){typeof exports=="object"&&typeof module<"u"?rr(exports):typeof define=="function"&&define.amd?define(["exports"],rr):(nt=typeof globalThis<"u"?globalThis:nt||self,rr(nt["orbcharts-plugins-basic"]={}))})(this,function(nt){"use strict";const rr={lineCurve:"curveLinear",lineWidth:2},Th={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Ph={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Dh={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},kh={barWidth:0,barGroupPadding:10,barRadius:!1},Eh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Nh={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},$s={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Lh=$s,Ch={};function bt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ih(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function To(t){let e,n,r;t.length!==2?(e=bt,n=(u,c)=>bt(t(u),c),r=(u,c)=>t(u)-c):(e=t===bt||t===Ih?t:Ev,n=t,r=t);function i(u,c,s=0,f=u.length){if(s<f){if(e(c,c)!==0)return f;do{const h=s+f>>>1;n(u[h],c)<0?s=h+1:f=h}while(s<f)}return s}function o(u,c,s=0,f=u.length){if(s<f){if(e(c,c)!==0)return f;do{const h=s+f>>>1;n(u[h],c)<=0?s=h+1:f=h}while(s<f)}return s}function a(u,c,s=0,f=u.length){const h=i(u,c,s,f-1);return h>s&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:o}}function Ev(){return 0}function Po(t){return t===null?NaN:+t}function*Nv(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Rh=To(bt),Fh=Rh.right,Lv=Rh.left,Cv=To(Po).center,wn=Fh;function Iv(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=Ms(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const zh=Oh(Ms),Rv=Oh(Fv);function Oh(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const u=n&&t(n),c=r&&t(r),s=i.slice();return u&&c?(ir(u,s,i,o,a),ir(u,i,s,o,a),ir(u,s,i,o,a),or(c,i,s,o,a),or(c,s,i,o,a),or(c,i,s,o,a)):u?(ir(u,i,s,o,a),ir(u,s,i,o,a),ir(u,i,s,o,a)):c&&(or(c,i,s,o,a),or(c,s,i,o,a),or(c,i,s,o,a)),e}}function ir(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function or(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function Fv(t){const e=Ms(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function Ms(t){const e=Math.floor(t);if(e===t)return zv(t);const n=t-e,r=2*t+1;return(i,o,a,u,c)=>{if(!((u-=c)>=a))return;let s=e*o[a];const f=c*e,h=f+c;for(let l=a,p=a+f;l<p;l+=c)s+=o[Math.min(u,l)];for(let l=a,p=u;l<=p;l+=c)s+=o[Math.min(u,l+f)],i[l]=(s+n*(o[Math.max(a,l-h)]+o[Math.min(u,l+h)]))/r,s-=o[Math.max(a,l-f)]}}function zv(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let u=t*r[i];const c=a*t;for(let s=i,f=i+c;s<f;s+=a)u+=r[Math.min(o,s)];for(let s=i,f=o;s<=f;s+=a)u+=r[Math.min(o,s+c)],n[s]=u/e,u-=r[Math.max(i,s-c)]}}function Do(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function Ov(t){return t.length|0}function Gv(t){return!(t>0)}function Uv(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function Yv(t){return e=>t(...e)}function Bv(...t){const e=typeof t[t.length-1]=="function"&&Yv(t.pop());t=t.map(Uv);const n=t.map(Ov),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(Gv))return o;for(;;){o.push(i.map((u,c)=>t[c][u]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function qv(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function Gh(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let u of t)(u=e(u,++a,t))!=null&&(u=+u)>=u&&(r=u-i,i+=r/++n,o+=r*(u-i))}if(n>1)return o/(n-1)}function Uh(t,e){const n=Gh(t,e);return n&&Math.sqrt(n)}function ei(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Pt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,u=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);u&&(n[r++]=u),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function Wv(t,e){const n=new Pt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function Hv(t,e){const n=new Pt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class ni extends Map{constructor(e,n=qh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Ss(this,e))}has(e){return super.has(Ss(this,e))}set(e,n){return super.set(Yh(this,e),n)}delete(e){return super.delete(Bh(this,e))}}class An extends Set{constructor(e,n=qh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(Ss(this,e))}add(e){return super.add(Yh(this,e))}delete(e){return super.delete(Bh(this,e))}}function Ss({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Yh({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Bh({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function qh(t){return t!==null&&typeof t=="object"?t.valueOf():t}function ar(t){return t}function Wh(t,...e){return ur(t,ar,ar,e)}function Hh(t,...e){return ur(t,Array.from,ar,e)}function Xh(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function Xv(t,...e){return Xh(Hh(t,...e),e)}function Vv(t,e,...n){return Xh(jh(t,e,...n),n)}function Vh(t,e,...n){return ur(t,ar,e,n)}function jh(t,e,...n){return ur(t,Array.from,e,n)}function jv(t,...e){return ur(t,ar,Zh,e)}function Zv(t,...e){return ur(t,Array.from,Zh,e)}function Zh(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function ur(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const u=new ni,c=r[a++];let s=-1;for(const f of o){const h=c(f,++s,o),l=u.get(h);l?l.push(f):u.set(h,[f])}for(const[f,h]of u)u.set(f,i(h,a));return e(u)}(t,0)}function Kh(t,e){return Array.from(e,n=>t[n])}function Ts(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const u=sr(a[i],a[o]);if(u)return u}})):(n=t.map(n),r.sort((i,o)=>sr(n[i],n[o]))),Kh(t,r)}return t.sort(Ps(n))}function Ps(t=bt){if(t===bt)return sr;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function sr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function Kv(t,e,n){return(e.length!==2?Ts(Vh(t,e,n),([r,i],[o,a])=>bt(i,a)||bt(r,o)):Ts(Wh(t,n),([r,i],[o,a])=>e(i,a)||bt(r,o))).map(([r])=>r)}var Qv=Array.prototype,Jv=Qv.slice;function Ds(t){return()=>t}const tx=Math.sqrt(50),ex=Math.sqrt(10),nx=Math.sqrt(2);function ko(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=tx?10:o>=ex?5:o>=nx?2:1;let u,c,s;return i<0?(s=Math.pow(10,-i)/a,u=Math.round(t*s),c=Math.round(e*s),u/s<t&&++u,c/s>e&&--c,s=-s):(s=Math.pow(10,i)*a,u=Math.round(t/s),c=Math.round(e/s),u*s<t&&++u,c*s>e&&--c),c<u&&.5<=n&&n<2?ko(t,e,n*2):[u,c,s]}function $n(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?ko(e,t,n):ko(t,e,n);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(r)if(a<0)for(let s=0;s<u;++s)c[s]=(o-s)/-a;else for(let s=0;s<u;++s)c[s]=(o-s)*a;else if(a<0)for(let s=0;s<u;++s)c[s]=(i+s)/-a;else for(let s=0;s<u;++s)c[s]=(i+s)*a;return c}function Mn(t,e,n){return e=+e,t=+t,n=+n,ko(t,e,n)[2]}function Eo(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Mn(e,t,n):Mn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function ks(t,e,n){let r;for(;;){const i=Mn(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function Es(t){return Math.max(1,Math.ceil(Math.log(Do(t))/Math.LN2)+1)}function Qh(){var t=ar,e=ei,n=Es;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,u,c,s=new Array(a);for(o=0;o<a;++o)s[o]=t(i[o],o,i);var f=e(s),h=f[0],l=f[1],p=n(s,h,l);if(!Array.isArray(p)){const v=l,x=+p;if(e===ei&&([h,l]=ks(h,l,x)),p=$n(h,l,x),p[0]<=h&&(c=Mn(h,l,x)),p[p.length-1]>=l)if(v>=l&&e===ei){const A=Mn(h,l,x);isFinite(A)&&(A>0?l=(Math.floor(l/A)+1)*A:A<0&&(l=(Math.ceil(l*-A)+1)/-A))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=h;)++g;for(;p[m-1]>l;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var y=new Array(d+1),_;for(o=0;o<=d;++o)_=y[o]=[],_.x0=o>0?p[o-1]:h,_.x1=o<d?p[o]:l;if(isFinite(c)){if(c>0)for(o=0;o<a;++o)(u=s[o])!=null&&h<=u&&u<=l&&y[Math.min(d,Math.floor((u-h)/c))].push(i[o]);else if(c<0){for(o=0;o<a;++o)if((u=s[o])!=null&&h<=u&&u<=l){const v=Math.floor((h-u)*c);y[Math.min(d,v+(p[v]<=u))].push(i[o])}}}else for(o=0;o<a;++o)(u=s[o])!=null&&h<=u&&u<=l&&y[wn(p,u,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Ds(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Ds([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Ds(Array.isArray(i)?Jv.call(i):i),r):n},r}function ri(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Ns(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function No(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ls(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function Lo(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?sr:Ps(i);r>n;){if(r-n>600){const c=r-n+1,s=e-n+1,f=Math.log(c),h=.5*Math.exp(2*f/3),l=.5*Math.sqrt(f*h*(c-h)/c)*(s-c/2<0?-1:1),p=Math.max(n,Math.floor(e-s*h/c+l)),d=Math.min(r,Math.floor(e+(c-s)*h/c+l));Lo(t,e,p,d,i)}const o=t[e];let a=n,u=r;for(ii(t,n,e),i(t[r],o)>0&&ii(t,n,r);a<u;){for(ii(t,a,u),++a,--u;i(t[a],o)<0;)++a;for(;i(t[u],o)>0;)--u}i(t[n],o)===0?ii(t,n,u):(++u,ii(t,u,r)),u<=e&&(n=u+1),e<=u&&(r=u-1)}return t}function ii(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Jh(t,e=bt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?bt(a,i)>0:bt(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function oi(t,e,n){if(t=Float64Array.from(Nv(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return No(t);if(e>=1)return ri(t);var r,i=(r-1)*e,o=Math.floor(i),a=ri(Lo(t,o).subarray(0,o+1)),u=No(t.subarray(o+1));return a+(u-a)*(i-o)}}function t0(t,e,n=Po){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),u=+n(t[o+1],o+1,t);return a+(u-a)*(i-o)}}function e0(t,e,n=Po){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(u,c)=>Po(n(t[c],c,t))),e<=0)return Ls(r);if(e>=1)return Ns(r);var r,i=Uint32Array.from(t,(u,c)=>c),o=r.length-1,a=Math.floor(o*e);return Lo(i,a,0,o,(u,c)=>sr(r[u],r[c])),a=Jh(i.subarray(0,a+1),u=>r[u]),a>=0?a:-1}}function rx(t,e,n){const r=Do(t),i=oi(t,.75)-oi(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function ix(t,e,n){const r=Do(t),i=Uh(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function ox(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function ax(t,e){return oi(t,.5,e)}function ux(t,e){return e0(t,.5,e)}function*sx(t){for(const e of t)yield*e}function Cs(t){return Array.from(sx(t))}function cx(t,e){const n=new ni;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function lx(t,e=fx){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function fx(t,e){return[t,e]}function an(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function hx(t,e=bt){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=bt);const i=(u,c)=>e(n[u],n[c]);let o,a;return t=Uint32Array.from(n,(u,c)=>c),t.sort(e===bt?(u,c)=>sr(n[u],n[c]):Ps(i)),t.forEach((u,c)=>{const s=i(u,o===void 0?u:o);s>=0?((o===void 0||s>0)&&(o=u,a=c),r[u]=a):r[u]=NaN}),r}function px(t,e=bt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?bt(a,i)<0:bt(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function n0(t,e=bt){if(e.length===1)return Ls(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function dx(t,e=bt){if(e.length===1)return Ns(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function gx(t,e){const n=n0(t,e);return n<0?void 0:n}const mx=r0(Math.random);function r0(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,u=n[o+r];n[o+r]=n[a+r],n[a+r]=u}return n}}function yx(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function i0(t){if(!(o=t.length))return[];for(var e=-1,n=No(t,bx),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function bx(t){return t.length}function vx(){return i0(arguments)}function xx(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function _x(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function wx(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function Ax(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function $x(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function Mx(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Sx(t,...e){t=new An(t);for(const n of e)for(const r of n)t.delete(r);return t}function Tx(t,e){const n=e[Symbol.iterator](),r=new An;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function Px(t,...e){t=new An(t),e=e.map(Dx);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function Dx(t){return t instanceof An?t:new An(t)}function o0(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=a0(i);if(r.has(o))continue;let a,u;for(;{value:a,done:u}=n.next();){if(u)return!1;const c=a0(a);if(r.add(c),Object.is(o,c))break}}return!0}function a0(t){return t!==null&&typeof t=="object"?t.valueOf():t}function kx(t,e){return o0(e,t)}function Ex(...t){const e=new An;for(const n of t)for(const r of n)e.add(r);return e}function Nx(t){return t}var Co=1,Io=2,Is=3,ai=4,u0=1e-6;function Lx(t){return"translate("+t+",0)"}function Cx(t){return"translate(0,"+t+")"}function Ix(t){return e=>+t(e)}function Rx(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Fx(){return!this.__axis}function Ro(t,e){var n=[],r=null,i=null,o=6,a=6,u=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,s=t===Co||t===ai?-1:1,f=t===ai||t===Io?"x":"y",h=t===Co||t===Is?Lx:Cx;function l(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):Nx),m=Math.max(o,0)+u,y=e.range(),_=+y[0]+c,v=+y[y.length-1]+c,x=(e.bandwidth?Rx:Ix)(e.copy(),c),A=p.selection?p.selection():p,b=A.selectAll(".domain").data([null]),w=A.selectAll(".tick").data(d,e).order(),M=w.exit(),$=w.enter().append("g").attr("class","tick"),D=w.select("line"),S=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge($),D=D.merge($.append("line").attr("stroke","currentColor").attr(f+"2",s*o)),S=S.merge($.append("text").attr("fill","currentColor").attr(f,s*m).attr("dy",t===Co?"0em":t===Is?"0.71em":"0.32em")),p!==A&&(b=b.transition(p),w=w.transition(p),D=D.transition(p),S=S.transition(p),M=M.transition(p).attr("opacity",u0).attr("transform",function(N){return isFinite(N=x(N))?h(N+c):this.getAttribute("transform")}),$.attr("opacity",u0).attr("transform",function(N){var E=this.parentNode.__axis;return h((E&&isFinite(E=E(N))?E:x(N))+c)})),M.remove(),b.attr("d",t===ai||t===Io?a?"M"+s*a+","+_+"H"+c+"V"+v+"H"+s*a:"M"+c+","+_+"V"+v:a?"M"+_+","+s*a+"V"+c+"H"+v+"V"+s*a:"M"+_+","+c+"H"+v),w.attr("opacity",1).attr("transform",function(N){return h(x(N)+c)}),D.attr(f+"2",s*o),S.attr(f,s*m).text(g),A.filter(Fx).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Io?"start":t===ai?"end":"middle"),A.each(function(){this.__axis=x})}return l.scale=function(p){return arguments.length?(e=p,l):e},l.ticks=function(){return n=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),l):n.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(i=p,l):i},l.tickSize=function(p){return arguments.length?(o=a=+p,l):o},l.tickSizeInner=function(p){return arguments.length?(o=+p,l):o},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(u=+p,l):u},l.offset=function(p){return arguments.length?(c=+p,l):c},l}function s0(t){return Ro(Co,t)}function zx(t){return Ro(Io,t)}function Ox(t){return Ro(Is,t)}function Rs(t){return Ro(ai,t)}var Gx={value:()=>{}};function Sn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Fo(n)}function Fo(t){this._=t}function Ux(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Fo.prototype=Sn.prototype={constructor:Fo,on:function(t,e){var n=this._,r=Ux(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=Yx(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=c0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=c0(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Fo(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function Yx(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function c0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Gx,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Fs="http://www.w3.org/1999/xhtml";const zs={svg:"http://www.w3.org/2000/svg",xhtml:Fs,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ui(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),zs.hasOwnProperty(e)?{space:zs[e],local:t}:t}function Bx(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Fs&&e.documentElement.namespaceURI===Fs?e.createElement(t):e.createElementNS(n,t)}}function qx(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function zo(t){var e=ui(t);return(e.local?qx:Bx)(e)}function Wx(){}function Oo(t){return t==null?Wx:function(){return this.querySelector(t)}}function Hx(t){typeof t!="function"&&(t=Oo(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=new Array(a),c,s,f=0;f<a;++f)(c=o[f])&&(s=t.call(c,c.__data__,f,o))&&("__data__"in c&&(s.__data__=c.__data__),u[f]=s);return new Yt(r,this._parents)}function l0(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Xx(){return[]}function Os(t){return t==null?Xx:function(){return this.querySelectorAll(t)}}function Vx(t){return function(){return l0(t.apply(this,arguments))}}function jx(t){typeof t=="function"?t=Vx(t):t=Os(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&(r.push(t.call(c,c.__data__,s,a)),i.push(c));return new Yt(r,i)}function Gs(t){return function(){return this.matches(t)}}function f0(t){return function(e){return e.matches(t)}}var Zx=Array.prototype.find;function Kx(t){return function(){return Zx.call(this.children,t)}}function Qx(){return this.firstElementChild}function Jx(t){return this.select(t==null?Qx:Kx(typeof t=="function"?t:f0(t)))}var t_=Array.prototype.filter;function e_(){return Array.from(this.children)}function n_(t){return function(){return t_.call(this.children,t)}}function r_(t){return this.selectAll(t==null?e_:n_(typeof t=="function"?t:f0(t)))}function i_(t){typeof t!="function"&&(t=Gs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new Yt(r,this._parents)}function h0(t){return new Array(t.length)}function o_(){return new Yt(this._enter||this._groups.map(h0),this._parents)}function Go(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Go.prototype={constructor:Go,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 a_(t){return function(){return t}}function u_(t,e,n,r,i,o){for(var a=0,u,c=e.length,s=o.length;a<s;++a)(u=e[a])?(u.__data__=o[a],r[a]=u):n[a]=new Go(t,o[a]);for(;a<c;++a)(u=e[a])&&(i[a]=u)}function s_(t,e,n,r,i,o,a){var u,c,s=new Map,f=e.length,h=o.length,l=new Array(f),p;for(u=0;u<f;++u)(c=e[u])&&(l[u]=p=a.call(c,c.__data__,u,e)+"",s.has(p)?i[u]=c:s.set(p,c));for(u=0;u<h;++u)p=a.call(t,o[u],u,o)+"",(c=s.get(p))?(r[u]=c,c.__data__=o[u],s.delete(p)):n[u]=new Go(t,o[u]);for(u=0;u<f;++u)(c=e[u])&&s.get(l[u])===c&&(i[u]=c)}function c_(t){return t.__data__}function l_(t,e){if(!arguments.length)return Array.from(this,c_);var n=e?s_:u_,r=this._parents,i=this._groups;typeof t!="function"&&(t=a_(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),s=0;s<o;++s){var f=r[s],h=i[s],l=h.length,p=f_(t.call(f,f&&f.__data__,s,r)),d=p.length,g=u[s]=new Array(d),m=a[s]=new Array(d),y=c[s]=new Array(l);n(f,h,g,m,y,p,e);for(var _=0,v=0,x,A;_<d;++_)if(x=g[_]){for(_>=v&&(v=_+1);!(A=m[v])&&++v<d;);x._next=A||null}}return a=new Yt(a,r),a._enter=u,a._exit=c,a}function f_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function h_(){return new Yt(this._exit||this._groups.map(h0),this._parents)}function p_(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function d_(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var s=n[c],f=r[c],h=s.length,l=u[c]=new Array(h),p,d=0;d<h;++d)(p=s[d]||f[d])&&(l[d]=p);for(;c<i;++c)u[c]=n[c];return new Yt(u,this._parents)}function g_(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function m_(t){t||(t=y_);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],u=a.length,c=i[o]=new Array(u),s,f=0;f<u;++f)(s=a[f])&&(c[f]=s);c.sort(e)}return new Yt(i,this._parents).order()}function y_(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function b_(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function v_(){return Array.from(this)}function x_(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function __(){let t=0;for(const e of this)++t;return t}function w_(){return!this.node()}function A_(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,u;o<a;++o)(u=i[o])&&t.call(u,u.__data__,o,i);return this}function $_(t){return function(){this.removeAttribute(t)}}function M_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function S_(t,e){return function(){this.setAttribute(t,e)}}function T_(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function P_(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function D_(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 k_(t,e){var n=ui(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?M_:$_:typeof e=="function"?n.local?D_:P_:n.local?T_:S_)(n,e))}function Us(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function E_(t){return function(){this.style.removeProperty(t)}}function N_(t,e,n){return function(){this.style.setProperty(t,e,n)}}function L_(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function C_(t,e,n){return arguments.length>1?this.each((e==null?E_:typeof e=="function"?L_:N_)(t,e,n??"")):Tn(this.node(),t)}function Tn(t,e){return t.style.getPropertyValue(e)||Us(t).getComputedStyle(t,null).getPropertyValue(e)}function I_(t){return function(){delete this[t]}}function R_(t,e){return function(){this[t]=e}}function F_(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function z_(t,e){return arguments.length>1?this.each((e==null?I_:typeof e=="function"?F_:R_)(t,e)):this.node()[t]}function p0(t){return t.trim().split(/^|\s+/)}function Ys(t){return t.classList||new d0(t)}function d0(t){this._node=t,this._names=p0(t.getAttribute("class")||"")}d0.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 g0(t,e){for(var n=Ys(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function m0(t,e){for(var n=Ys(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function O_(t){return function(){g0(this,t)}}function G_(t){return function(){m0(this,t)}}function U_(t,e){return function(){(e.apply(this,arguments)?g0:m0)(this,t)}}function Y_(t,e){var n=p0(t+"");if(arguments.length<2){for(var r=Ys(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?U_:e?O_:G_)(n,e))}function B_(){this.textContent=""}function q_(t){return function(){this.textContent=t}}function W_(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function H_(t){return arguments.length?this.each(t==null?B_:(typeof t=="function"?W_:q_)(t)):this.node().textContent}function X_(){this.innerHTML=""}function V_(t){return function(){this.innerHTML=t}}function j_(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Z_(t){return arguments.length?this.each(t==null?X_:(typeof t=="function"?j_:V_)(t)):this.node().innerHTML}function K_(){this.nextSibling&&this.parentNode.appendChild(this)}function Q_(){return this.each(K_)}function J_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function tw(){return this.each(J_)}function ew(t){var e=typeof t=="function"?t:zo(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function nw(){return null}function rw(t,e){var n=typeof t=="function"?t:zo(t),r=e==null?nw:typeof e=="function"?e:Oo(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function iw(){var t=this.parentNode;t&&t.removeChild(this)}function ow(){return this.each(iw)}function aw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function uw(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function sw(t){return this.select(t?uw:aw)}function cw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function lw(t){return function(e){t.call(this,e,this.__data__)}}function fw(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function hw(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function pw(t,e,n){return function(){var r=this.__on,i,o=lw(e);if(r){for(var a=0,u=r.length;a<u;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function dw(t,e,n){var r=fw(t+""),i,o=r.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,s=u.length,f;c<s;++c)for(i=0,f=u[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=e?pw:hw,i=0;i<o;++i)this.each(u(r[i],e,n));return this}function y0(t,e,n){var r=Us(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function gw(t,e){return function(){return y0(this,t,e)}}function mw(t,e){return function(){return y0(this,t,e.apply(this,arguments))}}function yw(t,e){return this.each((typeof e=="function"?mw:gw)(t,e))}function*bw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Bs=[null];function Yt(t,e){this._groups=t,this._parents=e}function Pn(){return new Yt([[document.documentElement]],Bs)}function vw(){return this}Yt.prototype=Pn.prototype={constructor:Yt,select:Hx,selectAll:jx,selectChild:Jx,selectChildren:r_,filter:i_,data:l_,enter:o_,exit:h_,join:p_,merge:d_,selection:vw,order:g_,sort:m_,call:b_,nodes:v_,node:x_,size:__,empty:w_,each:A_,attr:k_,style:C_,property:z_,classed:Y_,text:H_,html:Z_,raise:Q_,lower:tw,append:ew,insert:rw,remove:ow,clone:sw,datum:cw,on:dw,dispatch:yw,[Symbol.iterator]:bw};function j(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Bs)}function xw(t){return j(zo(t).call(document.documentElement))}var _w=0;function b0(){return new qs}function qs(){this._="@"+(++_w).toString(36)}qs.prototype=b0.prototype={constructor:qs,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function v0(t){let e;for(;e=t.sourceEvent;)t=e;return t}function oe(t,e){if(t=v0(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function ww(t,e){return t.target&&(t=v0(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>oe(n,e))}function Aw(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([l0(t)],Bs)}const $w={passive:!1},si={capture:!0,passive:!1};function Ws(t){t.stopImmediatePropagation()}function cr(t){t.preventDefault(),t.stopImmediatePropagation()}function Uo(t){var e=t.document.documentElement,n=j(t).on("dragstart.drag",cr,si);"onselectstart"in e?n.on("selectstart.drag",cr,si):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Yo(t,e){var n=t.document.documentElement,r=j(t).on("dragstart.drag",null);e&&(r.on("click.drag",cr,si),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Bo=t=>()=>t;function Hs(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:u,dx:c,dy:s,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:s,enumerable:!0,configurable:!0},_:{value:f}})}Hs.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Mw(t){return!t.ctrlKey&&!t.button}function Sw(){return this.parentNode}function Tw(t,e){return e??{x:t.x,y:t.y}}function Pw(){return navigator.maxTouchPoints||"ontouchstart"in this}function x0(){var t=Mw,e=Sw,n=Tw,r=Pw,i={},o=Sn("start","drag","end"),a=0,u,c,s,f,h=0;function l(x){x.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,$w).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(x,A){if(!(f||!t.call(this,x,A))){var b=v(this,e.call(this,x,A),x,A,"mouse");b&&(j(x.view).on("mousemove.drag",d,si).on("mouseup.drag",g,si),Uo(x.view),Ws(x),s=!1,u=x.clientX,c=x.clientY,b("start",x))}}function d(x){if(cr(x),!s){var A=x.clientX-u,b=x.clientY-c;s=A*A+b*b>h}i.mouse("drag",x)}function g(x){j(x.view).on("mousemove.drag mouseup.drag",null),Yo(x.view,s),cr(x),i.mouse("end",x)}function m(x,A){if(t.call(this,x,A)){var b=x.changedTouches,w=e.call(this,x,A),M=b.length,$,D;for($=0;$<M;++$)(D=v(this,w,x,A,b[$].identifier,b[$]))&&(Ws(x),D("start",x,b[$]))}}function y(x){var A=x.changedTouches,b=A.length,w,M;for(w=0;w<b;++w)(M=i[A[w].identifier])&&(cr(x),M("drag",x,A[w]))}function _(x){var A=x.changedTouches,b=A.length,w,M;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),w=0;w<b;++w)(M=i[A[w].identifier])&&(Ws(x),M("end",x,A[w]))}function v(x,A,b,w,M,$){var D=o.copy(),S=oe($||b,A),N,E,T;if((T=n.call(x,new Hs("beforestart",{sourceEvent:b,target:l,identifier:M,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:D}),w))!=null)return N=T.x-S[0]||0,E=T.y-S[1]||0,function k(P,L,C){var R=S,z;switch(P){case"start":i[M]=k,z=a++;break;case"end":delete i[M],--a;case"drag":S=oe(C||L,A),z=a;break}D.call(P,x,new Hs(P,{sourceEvent:L,subject:T,target:l,identifier:M,active:z,x:S[0]+N,y:S[1]+E,dx:S[0]-R[0],dy:S[1]-R[1],dispatch:D}),w)}}return l.filter=function(x){return arguments.length?(t=typeof x=="function"?x:Bo(!!x),l):t},l.container=function(x){return arguments.length?(e=typeof x=="function"?x:Bo(x),l):e},l.subject=function(x){return arguments.length?(n=typeof x=="function"?x:Bo(x),l):n},l.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:Bo(!!x),l):r},l.on=function(){var x=o.on.apply(o,arguments);return x===o?l:x},l.clickDistance=function(x){return arguments.length?(h=(x=+x)*x,l):Math.sqrt(h)},l}function lr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ci(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function un(){}var Dn=.7,fr=1/Dn,hr="\\s*([+-]?\\d+)\\s*",li="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Dw=/^#([0-9a-f]{3,8})$/,kw=new RegExp(`^rgb\\(${hr},${hr},${hr}\\)$`),Ew=new RegExp(`^rgb\\(${Pe},${Pe},${Pe}\\)$`),Nw=new RegExp(`^rgba\\(${hr},${hr},${hr},${li}\\)$`),Lw=new RegExp(`^rgba\\(${Pe},${Pe},${Pe},${li}\\)$`),Cw=new RegExp(`^hsl\\(${li},${Pe},${Pe}\\)$`),Iw=new RegExp(`^hsla\\(${li},${Pe},${Pe},${li}\\)$`),_0={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};lr(un,sn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:w0,formatHex:w0,formatHex8:Rw,formatHsl:Fw,formatRgb:A0,toString:A0});function w0(){return this.rgb().formatHex()}function Rw(){return this.rgb().formatHex8()}function Fw(){return P0(this).formatHsl()}function A0(){return this.rgb().formatRgb()}function sn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Dw.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?$0(e):n===3?new Et(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?qo(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=kw.exec(t))?new Et(e[1],e[2],e[3],1):(e=Ew.exec(t))?new Et(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Nw.exec(t))?qo(e[1],e[2],e[3],e[4]):(e=Lw.exec(t))?qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Cw.exec(t))?T0(e[1],e[2]/100,e[3]/100,1):(e=Iw.exec(t))?T0(e[1],e[2]/100,e[3]/100,e[4]):_0.hasOwnProperty(t)?$0(_0[t]):t==="transparent"?new Et(NaN,NaN,NaN,0):null}function $0(t){return new Et(t>>16&255,t>>8&255,t&255,1)}function qo(t,e,n,r){return r<=0&&(t=e=n=NaN),new Et(t,e,n,r)}function Xs(t){return t instanceof un||(t=sn(t)),t?(t=t.rgb(),new Et(t.r,t.g,t.b,t.opacity)):new Et}function pr(t,e,n,r){return arguments.length===1?Xs(t):new Et(t,e,n,r??1)}function Et(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}lr(Et,pr,ci(un,{brighter(t){return t=t==null?fr:Math.pow(fr,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Dn:Math.pow(Dn,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Et(kn(this.r),kn(this.g),kn(this.b),Wo(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:M0,formatHex:M0,formatHex8:zw,formatRgb:S0,toString:S0}));function M0(){return`#${En(this.r)}${En(this.g)}${En(this.b)}`}function zw(){return`#${En(this.r)}${En(this.g)}${En(this.b)}${En((isNaN(this.opacity)?1:this.opacity)*255)}`}function S0(){const t=Wo(this.opacity);return`${t===1?"rgb(":"rgba("}${kn(this.r)}, ${kn(this.g)}, ${kn(this.b)}${t===1?")":`, ${t})`}`}function Wo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function kn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function En(t){return t=kn(t),(t<16?"0":"")+t.toString(16)}function T0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new me(t,e,n,r)}function P0(t){if(t instanceof me)return new me(t.h,t.s,t.l,t.opacity);if(t instanceof un||(t=sn(t)),!t)return new me;if(t instanceof me)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,c=(o+i)/2;return u?(e===o?a=(n-r)/u+(n<r)*6:n===o?a=(r-e)/u+2:a=(e-n)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new me(a,u,c,t.opacity)}function Ho(t,e,n,r){return arguments.length===1?P0(t):new me(t,e,n,r??1)}function me(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}lr(me,Ho,ci(un,{brighter(t){return t=t==null?fr:Math.pow(fr,t),new me(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Dn:Math.pow(Dn,t),new me(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,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Et(Vs(t>=240?t-240:t+120,i,r),Vs(t,i,r),Vs(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new me(D0(this.h),Xo(this.s),Xo(this.l),Wo(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=Wo(this.opacity);return`${t===1?"hsl(":"hsla("}${D0(this.h)}, ${Xo(this.s)*100}%, ${Xo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function D0(t){return t=(t||0)%360,t<0?t+360:t}function Xo(t){return Math.max(0,Math.min(1,t||0))}function Vs(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 k0=Math.PI/180,E0=180/Math.PI,Vo=18,N0=.96422,L0=1,C0=.82521,I0=4/29,dr=6/29,R0=3*dr*dr,Ow=dr*dr*dr;function F0(t){if(t instanceof ye)return new ye(t.l,t.a,t.b,t.opacity);if(t instanceof De)return O0(t);t instanceof Et||(t=Xs(t));var e=Qs(t.r),n=Qs(t.g),r=Qs(t.b),i=js((.2225045*e+.7168786*n+.0606169*r)/L0),o,a;return e===n&&n===r?o=a=i:(o=js((.4360747*e+.3850649*n+.1430804*r)/N0),a=js((.0139322*e+.0971045*n+.7141733*r)/C0)),new ye(116*i-16,500*(o-i),200*(i-a),t.opacity)}function Gw(t,e){return new ye(t,0,0,e??1)}function jo(t,e,n,r){return arguments.length===1?F0(t):new ye(t,e,n,r??1)}function ye(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}lr(ye,jo,ci(un,{brighter(t){return new ye(this.l+Vo*(t??1),this.a,this.b,this.opacity)},darker(t){return new ye(this.l-Vo*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=N0*Zs(e),t=L0*Zs(t),n=C0*Zs(n),new Et(Ks(3.1338561*e-1.6168667*t-.4906146*n),Ks(-.9787684*e+1.9161415*t+.033454*n),Ks(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function js(t){return t>Ow?Math.pow(t,1/3):t/R0+I0}function Zs(t){return t>dr?t*t*t:R0*(t-I0)}function Ks(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Qs(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function z0(t){if(t instanceof De)return new De(t.h,t.c,t.l,t.opacity);if(t instanceof ye||(t=F0(t)),t.a===0&&t.b===0)return new De(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*E0;return new De(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Uw(t,e,n,r){return arguments.length===1?z0(t):new De(n,e,t,r??1)}function Zo(t,e,n,r){return arguments.length===1?z0(t):new De(t,e,n,r??1)}function De(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function O0(t){if(isNaN(t.h))return new ye(t.l,0,0,t.opacity);var e=t.h*k0;return new ye(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}lr(De,Zo,ci(un,{brighter(t){return new De(this.h,this.c,this.l+Vo*(t??1),this.opacity)},darker(t){return new De(this.h,this.c,this.l-Vo*(t??1),this.opacity)},rgb(){return O0(this).rgb()}}));var G0=-.14861,Js=1.78277,tc=-.29227,Ko=-.90649,fi=1.97294,U0=fi*Ko,Y0=fi*Js,B0=Js*tc-Ko*G0;function Yw(t){if(t instanceof Nn)return new Nn(t.h,t.s,t.l,t.opacity);t instanceof Et||(t=Xs(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(B0*r+U0*e-Y0*n)/(B0+U0-Y0),o=r-i,a=(fi*(n-i)-tc*o)/Ko,u=Math.sqrt(a*a+o*o)/(fi*i*(1-i)),c=u?Math.atan2(a,o)*E0-120:NaN;return new Nn(c<0?c+360:c,u,i,t.opacity)}function be(t,e,n,r){return arguments.length===1?Yw(t):new Nn(t,e,n,r??1)}function Nn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}lr(Nn,be,ci(un,{brighter(t){return t=t==null?fr:Math.pow(fr,t),new Nn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Dn:Math.pow(Dn,t),new Nn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*k0,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Et(255*(e+n*(G0*r+Js*i)),255*(e+n*(tc*r+Ko*i)),255*(e+n*(fi*r)),this.opacity)}}));function q0(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function W0(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<e-1?t[r+2]:2*o-i;return q0((n-r/e)*e,a,i,o,u)}}function H0(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],u=t[(r+2)%e];return q0((n-r/e)*e,i,o,a,u)}}const Qo=t=>()=>t;function X0(t,e){return function(n){return t+n*e}}function Bw(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Jo(t,e){var n=e-t;return n?X0(t,n>180||n<-180?n-360*Math.round(n/360):n):Qo(isNaN(t)?e:t)}function qw(t){return(t=+t)==1?Nt:function(e,n){return n-e?Bw(e,n,t):Qo(isNaN(e)?n:e)}}function Nt(t,e){var n=e-t;return n?X0(t,n):Qo(isNaN(t)?e:t)}const hi=function t(e){var n=qw(e);function r(i,o){var a=n((i=pr(i)).r,(o=pr(o)).r),u=n(i.g,o.g),c=n(i.b,o.b),s=Nt(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=u(f),i.b=c(f),i.opacity=s(f),i+""}}return r.gamma=t,r}(1);function V0(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,u;for(a=0;a<n;++a)u=pr(e[a]),r[a]=u.r||0,i[a]=u.g||0,o[a]=u.b||0;return r=t(r),i=t(i),o=t(o),u.opacity=1,function(c){return u.r=r(c),u.g=i(c),u.b=o(c),u+""}}}var j0=V0(W0),Ww=V0(H0);function ec(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function Z0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Hw(t,e){return(Z0(e)?ec:K0)(t,e)}function K0(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=cn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(u){for(a=0;a<r;++a)o[a]=i[a](u);return o}}function Q0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ce(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function J0(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=cn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var nc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rc=new RegExp(nc.source,"g");function Xw(t){return function(){return t}}function Vw(t){return function(e){return t(e)+""}}function ic(t,e){var n=nc.lastIndex=rc.lastIndex=0,r,i,o,a=-1,u=[],c=[];for(t=t+"",e=e+"";(r=nc.exec(t))&&(i=rc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,c.push({i:a,x:ce(r,i)})),n=rc.lastIndex;return n<e.length&&(o=e.slice(n),u[a]?u[a]+=o:u[++a]=o),u.length<2?c[0]?Vw(c[0].x):Xw(e):(e=c.length,function(s){for(var f=0,h;f<e;++f)u[(h=c[f]).i]=h.x(s);return u.join("")})}function cn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Qo(e):(n==="number"?ce:n==="string"?(r=sn(e))?(e=r,hi):ic:e instanceof sn?hi:e instanceof Date?Q0:Z0(e)?ec:Array.isArray(e)?K0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?J0:ce)(t,e)}function jw(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Zw(t,e){var n=Jo(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function ta(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var tp=180/Math.PI,oc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ep(t,e,n,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,c/=u),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*tp,skewX:Math.atan(c)*tp,scaleX:a,scaleY:u}}var ea;function Kw(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?oc:ep(e.a,e.b,e.c,e.d,e.e,e.f)}function Qw(t){return t==null||(ea||(ea=document.createElementNS("http://www.w3.org/2000/svg","g")),ea.setAttribute("transform",t),!(t=ea.transform.baseVal.consolidate()))?oc:(t=t.matrix,ep(t.a,t.b,t.c,t.d,t.e,t.f))}function np(t,e,n,r){function i(s){return s.length?s.pop()+" ":""}function o(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:ce(s,h)},{i:g-2,x:ce(f,l)})}else(h||l)&&p.push("translate("+h+e+l+n)}function a(s,f,h,l){s!==f?(s-f>180?f+=360:f-s>180&&(s+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ce(s,f)})):f&&h.push(i(h)+"rotate("+f+r)}function u(s,f,h,l){s!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ce(s,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:ce(s,h)},{i:g-2,x:ce(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(s,f){var h=[],l=[];return s=t(s),f=t(f),o(s.translateX,s.translateY,f.translateX,f.translateY,h,l),a(s.rotate,f.rotate,h,l),u(s.skewX,f.skewX,h,l),c(s.scaleX,s.scaleY,f.scaleX,f.scaleY,h,l),s=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var rp=np(Kw,"px, ","px)","deg)"),ip=np(Qw,", ",")",")"),Jw=1e-12;function op(t){return((t=Math.exp(t))+1/t)/2}function t3(t){return((t=Math.exp(t))-1/t)/2}function e3(t){return((t=Math.exp(2*t))-1)/(t+1)}const ap=function t(e,n,r){function i(o,a){var u=o[0],c=o[1],s=o[2],f=a[0],h=a[1],l=a[2],p=f-u,d=h-c,g=p*p+d*d,m,y;if(g<Jw)y=Math.log(l/s)/e,m=function(w){return[u+w*p,c+w*d,s*Math.exp(e*w*y)]};else{var _=Math.sqrt(g),v=(l*l-s*s+r*g)/(2*s*n*_),x=(l*l-s*s-r*g)/(2*l*n*_),A=Math.log(Math.sqrt(v*v+1)-v),b=Math.log(Math.sqrt(x*x+1)-x);y=(b-A)/e,m=function(w){var M=w*y,$=op(A),D=s/(n*_)*($*e3(e*M+A)-t3(A));return[u+D*p,c+D*d,s*$/op(e*M+A)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),u=a*a,c=u*u;return t(a,u,c)},i}(Math.SQRT2,2,4);function up(t){return function(e,n){var r=t((e=Ho(e)).h,(n=Ho(n)).h),i=Nt(e.s,n.s),o=Nt(e.l,n.l),a=Nt(e.opacity,n.opacity);return function(u){return e.h=r(u),e.s=i(u),e.l=o(u),e.opacity=a(u),e+""}}}const n3=up(Jo);var r3=up(Nt);function i3(t,e){var n=Nt((t=jo(t)).l,(e=jo(e)).l),r=Nt(t.a,e.a),i=Nt(t.b,e.b),o=Nt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function sp(t){return function(e,n){var r=t((e=Zo(e)).h,(n=Zo(n)).h),i=Nt(e.c,n.c),o=Nt(e.l,n.l),a=Nt(e.opacity,n.opacity);return function(u){return e.h=r(u),e.c=i(u),e.l=o(u),e.opacity=a(u),e+""}}}const o3=sp(Jo);var a3=sp(Nt);function cp(t){return function e(n){n=+n;function r(i,o){var a=t((i=be(i)).h,(o=be(o)).h),u=Nt(i.s,o.s),c=Nt(i.l,o.l),s=Nt(i.opacity,o.opacity);return function(f){return i.h=a(f),i.s=u(f),i.l=c(Math.pow(f,n)),i.opacity=s(f),i+""}}return r.gamma=e,r}(1)}const u3=cp(Jo);var na=cp(Nt);function lp(t,e){e===void 0&&(e=t,t=cn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var u=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[u](a-u)}}function s3(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var gr=0,pi=0,di=0,fp=1e3,ra,gi,ia=0,Ln=0,oa=0,mi=typeof performance=="object"&&performance.now?performance:Date,hp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function yi(){return Ln||(hp(c3),Ln=mi.now()+oa)}function c3(){Ln=0}function bi(){this._call=this._time=this._next=null}bi.prototype=aa.prototype={constructor:bi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?yi():+n)+(e==null?0:+e),!this._next&&gi!==this&&(gi?gi._next=this:ra=this,gi=this),this._call=t,this._time=n,ac()},stop:function(){this._call&&(this._call=null,this._time=1/0,ac())}};function aa(t,e,n){var r=new bi;return r.restart(t,e,n),r}function pp(){yi(),++gr;for(var t=ra,e;t;)(e=Ln-t._time)>=0&&t._call.call(void 0,e),t=t._next;--gr}function dp(){Ln=(ia=mi.now())+oa,gr=pi=0;try{pp()}finally{gr=0,f3(),Ln=0}}function l3(){var t=mi.now(),e=t-ia;e>fp&&(oa-=e,ia=t)}function f3(){for(var t,e=ra,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ra=n);gi=t,ac(r)}function ac(t){if(!gr){pi&&(pi=clearTimeout(pi));var e=t-Ln;e>24?(t<1/0&&(pi=setTimeout(dp,t-mi.now()-oa)),di&&(di=clearInterval(di))):(di||(ia=mi.now(),di=setInterval(l3,fp)),gr=1,hp(dp))}}function uc(t,e,n){var r=new bi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function h3(t,e,n){var r=new bi,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,u){a=+a,u=u==null?yi():+u,r._restart(function c(s){s+=i,r._restart(c,i+=a,u),o(s)},a,u)},r.restart(t,e,n),r)}var p3=Sn("start","end","cancel","interrupt"),d3=[],gp=0,sc=1,cc=2,ua=3,mp=4,lc=5,sa=6;function ca(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;g3(t,n,{name:e,index:r,group:i,on:p3,tween:d3,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:gp})}function fc(t,e){var n=ve(t,e);if(n.state>gp)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=ve(t,e);if(n.state>ua)throw new Error("too late; already running");return n}function ve(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function g3(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=aa(o,0,n.time);function o(s){n.state=sc,n.timer.restart(a,n.delay,n.time),n.delay<=s&&a(s-n.delay)}function a(s){var f,h,l,p;if(n.state!==sc)return c();for(f in r)if(p=r[f],p.name===n.name){if(p.state===ua)return uc(a);p.state===mp?(p.state=sa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=sa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(uc(function(){n.state===ua&&(n.state=mp,n.timer.restart(u,n.delay,n.time),u(s))}),n.state=cc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===cc){for(n.state=ua,i=new Array(l=n.tween.length),f=0,h=-1;f<l;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function u(s){for(var f=s<n.duration?n.ease.call(null,s/n.duration):(n.timer.restart(c),n.state=lc,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);n.state===lc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=sa,n.timer.stop(),delete r[e];for(var s in r)return;delete t.__transition}}function Cn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>cc&&r.state<lc,r.state=sa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function m3(t){return this.each(function(){Cn(this,t)})}function y3(t,e){var n,r;return function(){var i=ke(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function b3(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=ke(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},c=0,s=i.length;c<s;++c)if(i[c].name===e){i[c]=u;break}c===s&&i.push(u)}o.tween=i}}function v3(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=ve(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?y3:b3)(n,t,e))}function hc(t,e,n){var r=t._id;return t.each(function(){var i=ke(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return ve(i,r).value[e]}}function yp(t,e){var n;return(typeof e=="number"?ce:e instanceof sn?hi:(n=sn(e))?(e=n,hi):ic)(t,e)}function x3(t){return function(){this.removeAttribute(t)}}function _3(t){return function(){this.removeAttributeNS(t.space,t.local)}}function w3(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function A3(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function $3(t,e,n){var r,i,o;return function(){var a,u=n(this),c;return u==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u)))}}function M3(t,e,n){var r,i,o;return function(){var a,u=n(this),c;return u==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u)))}}function S3(t,e){var n=ui(t),r=n==="transform"?ip:yp;return this.attrTween(t,typeof e=="function"?(n.local?M3:$3)(n,r,hc(this,"attr."+t,e)):e==null?(n.local?_3:x3)(n):(n.local?A3:w3)(n,r,e))}function T3(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function P3(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function D3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&P3(t,o)),n}return i._value=e,i}function k3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&T3(t,o)),n}return i._value=e,i}function E3(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 r=ui(t);return this.tween(n,(r.local?D3:k3)(r,e))}function N3(t,e){return function(){fc(this,t).delay=+e.apply(this,arguments)}}function L3(t,e){return e=+e,function(){fc(this,t).delay=e}}function C3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?N3:L3)(e,t)):ve(this.node(),e).delay}function I3(t,e){return function(){ke(this,t).duration=+e.apply(this,arguments)}}function R3(t,e){return e=+e,function(){ke(this,t).duration=e}}function F3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?I3:R3)(e,t)):ve(this.node(),e).duration}function z3(t,e){if(typeof e!="function")throw new Error;return function(){ke(this,t).ease=e}}function O3(t){var e=this._id;return arguments.length?this.each(z3(e,t)):ve(this.node(),e).ease}function G3(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ke(this,t).ease=n}}function U3(t){if(typeof t!="function")throw new Error;return this.each(G3(this._id,t))}function Y3(t){typeof t!="function"&&(t=Gs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new Ee(r,this._parents,this._name,this._id)}function B3(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),l,p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new Ee(a,this._parents,this._name,this._id)}function q3(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 W3(t,e,n){var r,i,o=q3(e)?fc:ke;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}function H3(t,e){var n=this._id;return arguments.length<2?ve(this.node(),n).on.on(t):this.each(W3(n,t,e))}function X3(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function V3(){return this.on("end.remove",X3(this._id))}function j3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Oo(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u=r[a],c=u.length,s=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=u[l])&&(h=t.call(f,f.__data__,l,u))&&("__data__"in f&&(h.__data__=f.__data__),s[l]=h,ca(s[l],e,n,l,s,ve(f,n)));return new Ee(o,this._parents,e,n)}function Z3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Os(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var c=r[u],s=c.length,f,h=0;h<s;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=ve(f,n),g=0,m=l.length;g<m;++g)(p=l[g])&&ca(p,e,n,g,l,d);o.push(l),a.push(f)}return new Ee(o,a,e,n)}var K3=Pn.prototype.constructor;function Q3(){return new K3(this._groups,this._parents)}function J3(t,e){var n,r,i;return function(){var o=Tn(this,t),a=(this.style.removeProperty(t),Tn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function bp(t){return function(){this.style.removeProperty(t)}}function t5(t,e,n){var r,i=n+"",o;return function(){var a=Tn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function e5(t,e,n){var r,i,o;return function(){var a=Tn(this,t),u=n(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(t),Tn(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u))}}function n5(t,e){var n,r,i,o="style."+e,a="end."+o,u;return function(){var c=ke(this,t),s=c.on,f=c.value[o]==null?u||(u=bp(e)):void 0;(s!==n||i!==f)&&(r=(n=s).copy()).on(a,i=f),c.on=r}}function r5(t,e,n){var r=(t+="")=="transform"?rp:yp;return e==null?this.styleTween(t,J3(t,r)).on("end.style."+t,bp(t)):typeof e=="function"?this.styleTween(t,e5(t,r,hc(this,"style."+t,e))).each(n5(this._id,t)):this.styleTween(t,t5(t,r,e),n).on("end.style."+t,null)}function i5(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function o5(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&i5(t,a,n)),r}return o._value=e,o}function a5(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,o5(t,e,n??""))}function u5(t){return function(){this.textContent=t}}function s5(t){return function(){var e=t(this);this.textContent=e??""}}function c5(t){return this.tween("text",typeof t=="function"?s5(hc(this,"text",t)):u5(t==null?"":t+""))}function l5(t){return function(e){this.textContent=t.call(this,e)}}function f5(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&l5(i)),e}return r._value=t,r}function h5(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,f5(t))}function p5(){for(var t=this._name,e=this._id,n=xp(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)if(c=a[s]){var f=ve(c,e);ca(c,t,n,s,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ee(r,this._parents,t,n)}function d5(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var u={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var s=ke(this,r),f=s.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(u),e._.interrupt.push(u),e._.end.push(c)),s.on=e}),i===0&&o()})}var g5=0;function Ee(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function vp(t){return Pn().transition(t)}function xp(){return++g5}var Ye=Pn.prototype;Ee.prototype=vp.prototype={constructor:Ee,select:j3,selectAll:Z3,selectChild:Ye.selectChild,selectChildren:Ye.selectChildren,filter:Y3,merge:B3,selection:Q3,transition:p5,call:Ye.call,nodes:Ye.nodes,node:Ye.node,size:Ye.size,empty:Ye.empty,each:Ye.each,on:H3,attr:S3,attrTween:E3,style:r5,styleTween:a5,text:c5,textTween:h5,remove:V3,tween:v3,delay:C3,duration:F3,ease:O3,easeVarying:U3,end:d5,[Symbol.iterator]:Ye[Symbol.iterator]};const m5=t=>+t;function y5(t){return t*t}function b5(t){return t*(2-t)}function _p(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function v5(t){return t*t*t}function x5(t){return--t*t*t+1}function vi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var pc=3,_5=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(pc),w5=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(pc),wp=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(pc),Ap=Math.PI,$p=Ap/2;function A5(t){return+t==1?1:1-Math.cos(t*$p)}function $5(t){return Math.sin(t*$p)}function Mp(t){return(1-Math.cos(Ap*t))/2}function ln(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function M5(t){return ln(1-+t)}function S5(t){return 1-ln(t)}function Sp(t){return((t*=2)<=1?ln(1-t):2-ln(t-1))/2}function T5(t){return 1-Math.sqrt(1-t*t)}function P5(t){return Math.sqrt(1- --t*t)}function Tp(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var dc=4/11,D5=6/11,k5=8/11,E5=3/4,N5=9/11,L5=10/11,C5=15/16,I5=21/22,R5=63/64,la=1/dc/dc;function F5(t){return 1-xi(1-t)}function xi(t){return(t=+t)<dc?la*t*t:t<k5?la*(t-=D5)*t+E5:t<L5?la*(t-=N5)*t+C5:la*(t-=I5)*t+R5}function z5(t){return((t*=2)<=1?1-xi(1-t):xi(t-1)+1)/2}var gc=1.70158,O5=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(gc),G5=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(gc),Pp=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(gc),mr=2*Math.PI,mc=1,yc=.3,U5=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=mr);function i(o){return e*ln(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*mr)},i.period=function(o){return t(e,o)},i}(mc,yc),fa=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=mr);function i(o){return 1-e*ln(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*mr)},i.period=function(o){return t(e,o)},i}(mc,yc),Y5=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=mr);function i(o){return((o=o*2-1)<0?e*ln(-o)*Math.sin((r-o)/n):2-e*ln(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*mr)},i.period=function(o){return t(e,o)},i}(mc,yc),B5={time:null,delay:0,duration:250,ease:vi};function q5(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 W5(t){var e,n;t instanceof Ee?(e=t._id,t=t._name):(e=xp(),(n=B5).time=yi(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&ca(c,t,e,s,a,n||q5(c,e));return new Ee(r,this._parents,t,e)}Pn.prototype.interrupt=m3,Pn.prototype.transition=W5;var H5=[null];function X5(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>sc&&r.name===e)return new Ee([[t]],H5,e,+i)}return null}const bc=t=>()=>t;function V5(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function j5(t){t.stopImmediatePropagation()}function vc(t){t.preventDefault(),t.stopImmediatePropagation()}var Dp={name:"drag"},xc={name:"space"},yr={name:"handle"},br={name:"center"};const{abs:kp,max:Ft,min:zt}=Math;function Ep(t){return[+t[0],+t[1]]}function _c(t){return[Ep(t[0]),Ep(t[1])]}var ha={name:"x",handles:["w","e"].map(_i),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},pa={name:"y",handles:["n","s"].map(_i),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Z5={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(_i),input:function(t){return t==null?null:_c(t)},output:function(t){return t}},Be={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Np={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Lp={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},K5={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Q5={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function _i(t){return{type:t}}function J5(t){return!t.ctrlKey&&!t.button}function t6(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function e6(){return navigator.maxTouchPoints||"ontouchstart"in this}function wc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function n6(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function r6(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function i6(){return Ac(ha)}function o6(){return Ac(pa)}function a6(){return Ac(Z5)}function Ac(t){var e=t6,n=J5,r=e6,i=!0,o=Sn("start","brush","end"),a=6,u;function c(m){var y=m.property("__brush",g).selectAll(".overlay").data([_i("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Be.overlay).merge(y).each(function(){var v=wc(this).extent;j(this).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1])}),m.selectAll(".selection").data([_i("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Be.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var _=m.selectAll(".handle").data(t.handles,function(v){return v.type});_.exit().remove(),_.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return Be[v.type]}),m.each(s).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",l).filter(r).on("touchstart.brush",l).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(m,y,_){m.tween?m.on("start.brush",function(v){f(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){f(this,arguments).end(v)}).tween("brush",function(){var v=this,x=v.__brush,A=f(v,arguments),b=x.selection,w=t.input(typeof y=="function"?y.apply(this,arguments):y,x.extent),M=cn(b,w);function $(D){x.selection=D===1&&w===null?null:M(D),s.call(v),A.brush()}return b!==null&&w!==null?$:$(1)}):m.each(function(){var v=this,x=arguments,A=v.__brush,b=t.input(typeof y=="function"?y.apply(v,x):y,A.extent),w=f(v,x).beforestart();Cn(v),A.selection=b===null?null:b,s.call(v),w.start(_).brush(_).end(_)})},c.clear=function(m,y){c.move(m,null,y)};function s(){var m=j(this),y=wc(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(_){return _.type[_.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(_){return _.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(_){return _.type==="n"||_.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(_){return _.type==="e"||_.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(m,y,_){var v=m.__brush.emitter;return v&&(!_||!v.clean)?v:new h(m,y,_)}function h(m,y,_){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=_}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,_){var v=j(this.that).datum();o.call(m,this.that,new V5(m,{sourceEvent:y,target:c,selection:t.output(this.state.selection),mode:_,dispatch:o}),v)}};function l(m){if(u&&!m.touches||!n.apply(this,arguments))return;var y=this,_=m.target.__data__.type,v=(i&&m.metaKey?_="overlay":_)==="selection"?Dp:i&&m.altKey?br:yr,x=t===pa?null:K5[_],A=t===ha?null:Q5[_],b=wc(y),w=b.extent,M=b.selection,$=w[0][0],D,S,N=w[0][1],E,T,k=w[1][0],P,L,C=w[1][1],R,z,G=0,H=0,st,at=x&&A&&i&&m.shiftKey,ut,Tt,lt=Array.from(m.touches||[m],Z=>{const $t=Z.identifier;return Z=oe(Z,y),Z.point0=Z.slice(),Z.identifier=$t,Z});Cn(y);var Mt=f(y,arguments,!0).beforestart();if(_==="overlay"){M&&(st=!0);const Z=[lt[0],lt[1]||lt[0]];b.selection=M=[[D=t===pa?$:zt(Z[0][0],Z[1][0]),E=t===ha?N:zt(Z[0][1],Z[1][1])],[P=t===pa?k:Ft(Z[0][0],Z[1][0]),R=t===ha?C:Ft(Z[0][1],Z[1][1])]],lt.length>1&&At(m)}else D=M[0][0],E=M[0][1],P=M[1][0],R=M[1][1];S=D,T=E,L=P,z=R;var O=j(y).attr("pointer-events","none"),Q=O.selectAll(".overlay").attr("cursor",Be[_]);if(m.touches)Mt.moved=F,Mt.ended=ht;else{var it=j(m.view).on("mousemove.brush",F,!0).on("mouseup.brush",ht,!0);i&&it.on("keydown.brush",Jt,!0).on("keyup.brush",te,!0),Uo(m.view)}s.call(y),Mt.start(m,v.name);function F(Z){for(const $t of Z.changedTouches||[Z])for(const So of lt)So.identifier===$t.identifier&&(So.cur=oe($t,y));if(at&&!ut&&!Tt&&lt.length===1){const $t=lt[0];kp($t.cur[0]-$t[0])>kp($t.cur[1]-$t[1])?Tt=!0:ut=!0}for(const $t of lt)$t.cur&&($t[0]=$t.cur[0],$t[1]=$t.cur[1]);st=!0,vc(Z),At(Z)}function At(Z){const $t=lt[0],So=$t.point0;var _n;switch(G=$t[0]-So[0],H=$t[1]-So[1],v){case xc:case Dp:{x&&(G=Ft($-D,zt(k-P,G)),S=D+G,L=P+G),A&&(H=Ft(N-E,zt(C-R,H)),T=E+H,z=R+H);break}case yr:{lt[1]?(x&&(S=Ft($,zt(k,lt[0][0])),L=Ft($,zt(k,lt[1][0])),x=1),A&&(T=Ft(N,zt(C,lt[0][1])),z=Ft(N,zt(C,lt[1][1])),A=1)):(x<0?(G=Ft($-D,zt(k-D,G)),S=D+G,L=P):x>0&&(G=Ft($-P,zt(k-P,G)),S=D,L=P+G),A<0?(H=Ft(N-E,zt(C-E,H)),T=E+H,z=R):A>0&&(H=Ft(N-R,zt(C-R,H)),T=E,z=R+H));break}case br:{x&&(S=Ft($,zt(k,D-G*x)),L=Ft($,zt(k,P+G*x))),A&&(T=Ft(N,zt(C,E-H*A)),z=Ft(N,zt(C,R+H*A)));break}}L<S&&(x*=-1,_n=D,D=P,P=_n,_n=S,S=L,L=_n,_ in Np&&Q.attr("cursor",Be[_=Np[_]])),z<T&&(A*=-1,_n=E,E=R,R=_n,_n=T,T=z,z=_n,_ in Lp&&Q.attr("cursor",Be[_=Lp[_]])),b.selection&&(M=b.selection),ut&&(S=M[0][0],L=M[1][0]),Tt&&(T=M[0][1],z=M[1][1]),(M[0][0]!==S||M[0][1]!==T||M[1][0]!==L||M[1][1]!==z)&&(b.selection=[[S,T],[L,z]],s.call(y),Mt.brush(Z,v.name))}function ht(Z){if(j5(Z),Z.touches){if(Z.touches.length)return;u&&clearTimeout(u),u=setTimeout(function(){u=null},500)}else Yo(Z.view,st),it.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);O.attr("pointer-events","all"),Q.attr("cursor",Be.overlay),b.selection&&(M=b.selection),n6(M)&&(b.selection=null,s.call(y)),Mt.end(Z,v.name)}function Jt(Z){switch(Z.keyCode){case 16:{at=x&&A;break}case 18:{v===yr&&(x&&(P=L-G*x,D=S+G*x),A&&(R=z-H*A,E=T+H*A),v=br,At(Z));break}case 32:{(v===yr||v===br)&&(x<0?P=L-G:x>0&&(D=S-G),A<0?R=z-H:A>0&&(E=T-H),v=xc,Q.attr("cursor",Be.selection),At(Z));break}default:return}vc(Z)}function te(Z){switch(Z.keyCode){case 16:{at&&(ut=Tt=at=!1,At(Z));break}case 18:{v===br&&(x<0?P=L:x>0&&(D=S),A<0?R=z:A>0&&(E=T),v=yr,At(Z));break}case 32:{v===xc&&(Z.altKey?(x&&(P=L-G*x,D=S+G*x),A&&(R=z-H*A,E=T+H*A),v=br):(x<0?P=L:x>0&&(D=S),A<0?R=z:A>0&&(E=T),v=yr),Q.attr("cursor",Be[_]),At(Z));break}default:return}vc(Z)}}function p(m){f(this,arguments).moved(m)}function d(m){f(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=_c(e.apply(this,arguments)),m.dim=t,m}return c.extent=function(m){return arguments.length?(e=typeof m=="function"?m:bc(_c(m)),c):e},c.filter=function(m){return arguments.length?(n=typeof m=="function"?m:bc(!!m),c):n},c.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:bc(!!m),c):r},c.handleSize=function(m){return arguments.length?(a=+m,c):a},c.keyModifiers=function(m){return arguments.length?(i=!!m,c):i},c.on=function(){var m=o.on.apply(o,arguments);return m===o?c:m},c}var Cp=Math.abs,vr=Math.cos,xr=Math.sin,Ip=Math.PI,da=Ip/2,Rp=Ip*2,Fp=Math.max,$c=1e-12;function Mc(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function u6(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function s6(){return Sc(!1,!1)}function c6(){return Sc(!1,!0)}function l6(){return Sc(!0,!1)}function Sc(t,e){var n=0,r=null,i=null,o=null;function a(u){var c=u.length,s=new Array(c),f=Mc(0,c),h=new Array(c*c),l=new Array(c),p=0,d;u=Float64Array.from({length:c*c},e?(g,m)=>u[m%c][m/c|0]:(g,m)=>u[m/c|0][m%c]);for(let g=0;g<c;++g){let m=0;for(let y=0;y<c;++y)m+=u[g*c+y]+t*u[y*c+g];p+=s[g]=m}p=Fp(0,Rp-n*c)/p,d=p?n:Rp/c;{let g=0;r&&f.sort((m,y)=>r(s[m],s[y]));for(const m of f){const y=g;if(t){const _=Mc(~c+1,c).filter(v=>v<0?u[~v*c+m]:u[m*c+v]);i&&_.sort((v,x)=>i(v<0?-u[~v*c+m]:u[m*c+v],x<0?-u[~x*c+m]:u[m*c+x]));for(const v of _)if(v<0){const x=h[~v*c+m]||(h[~v*c+m]={source:null,target:null});x.target={index:m,startAngle:g,endAngle:g+=u[~v*c+m]*p,value:u[~v*c+m]}}else{const x=h[m*c+v]||(h[m*c+v]={source:null,target:null});x.source={index:m,startAngle:g,endAngle:g+=u[m*c+v]*p,value:u[m*c+v]}}l[m]={index:m,startAngle:y,endAngle:g,value:s[m]}}else{const _=Mc(0,c).filter(v=>u[m*c+v]||u[v*c+m]);i&&_.sort((v,x)=>i(u[m*c+v],u[m*c+x]));for(const v of _){let x;if(m<v?(x=h[m*c+v]||(h[m*c+v]={source:null,target:null}),x.source={index:m,startAngle:g,endAngle:g+=u[m*c+v]*p,value:u[m*c+v]}):(x=h[v*c+m]||(h[v*c+m]={source:null,target:null}),x.target={index:m,startAngle:g,endAngle:g+=u[m*c+v]*p,value:u[m*c+v]},m===v&&(x.source=x.target)),x.source&&x.target&&x.source.value<x.target.value){const A=x.source;x.source=x.target,x.target=A}}l[m]={index:m,startAngle:y,endAngle:g,value:s[m]}}g+=d}}return h=Object.values(h),h.groups=l,o?h.sort(o):h}return a.padAngle=function(u){return arguments.length?(n=Fp(0,u),a):n},a.sortGroups=function(u){return arguments.length?(r=u,a):r},a.sortSubgroups=function(u){return arguments.length?(i=u,a):i},a.sortChords=function(u){return arguments.length?(u==null?o=null:(o=u6(u))._=u,a):o&&o._},a}const Tc=Math.PI,Pc=2*Tc,In=1e-6,f6=Pc-In;function zp(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function h6(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return zp;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let wi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?zp:h6(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,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,u=this._y1,c=r-e,s=i-n,f=a-e,h=u-n,l=f*f+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(l>In)if(!(Math.abs(h*c-s*f)>In)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-u,g=c*c+s*s,m=p*p+d*d,y=Math.sqrt(g),_=Math.sqrt(l),v=o*Math.tan((Tc-Math.acos((g+l-m)/(2*y*_)))/2),x=v/_,A=v/y;Math.abs(x-1)>In&&this._append`L${e+x*f},${n+x*h}`,this._append`A${o},${o},0,0,${+(h*p>f*d)},${this._x1=e+A*c},${this._y1=n+A*s}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),c=r*Math.sin(i),s=e+u,f=n+c,h=1^a,l=a?i-o:o-i;this._x1===null?this._append`M${s},${f}`:(Math.abs(this._x1-s)>In||Math.abs(this._y1-f)>In)&&this._append`L${s},${f}`,r&&(l<0&&(l=l%Pc+Pc),l>f6?this._append`A${r},${r},0,1,${h},${e-u},${n-c}A${r},${r},0,1,${h},${this._x1=s},${this._y1=f}`:l>In&&this._append`A${r},${r},0,${+(l>=Tc)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Dc(){return new wi}Dc.prototype=wi.prototype;function p6(t=3){return new wi(+t)}var d6=Array.prototype.slice;function Rn(t){return function(){return t}}function g6(t){return t.source}function m6(t){return t.target}function Op(t){return t.radius}function y6(t){return t.startAngle}function b6(t){return t.endAngle}function v6(){return 0}function x6(){return 10}function Gp(t){var e=g6,n=m6,r=Op,i=Op,o=y6,a=b6,u=v6,c=null;function s(){var f,h=e.apply(this,arguments),l=n.apply(this,arguments),p=u.apply(this,arguments)/2,d=d6.call(arguments),g=+r.apply(this,(d[0]=h,d)),m=o.apply(this,d)-da,y=a.apply(this,d)-da,_=+i.apply(this,(d[0]=l,d)),v=o.apply(this,d)-da,x=a.apply(this,d)-da;if(c||(c=f=Dc()),p>$c&&(Cp(y-m)>p*2+$c?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,Cp(x-v)>p*2+$c?x>v?(v+=p,x-=p):(v-=p,x+=p):v=x=(v+x)/2),c.moveTo(g*vr(m),g*xr(m)),c.arc(0,0,g,m,y),m!==v||y!==x)if(t){var A=+t.apply(this,arguments),b=_-A,w=(v+x)/2;c.quadraticCurveTo(0,0,b*vr(v),b*xr(v)),c.lineTo(_*vr(w),_*xr(w)),c.lineTo(b*vr(x),b*xr(x))}else c.quadraticCurveTo(0,0,_*vr(v),_*xr(v)),c.arc(0,0,_,v,x);if(c.quadraticCurveTo(0,0,g*vr(m),g*xr(m)),c.closePath(),f)return c=null,f+""||null}return t&&(s.headRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Rn(+f),s):t}),s.radius=function(f){return arguments.length?(r=i=typeof f=="function"?f:Rn(+f),s):r},s.sourceRadius=function(f){return arguments.length?(r=typeof f=="function"?f:Rn(+f),s):r},s.targetRadius=function(f){return arguments.length?(i=typeof f=="function"?f:Rn(+f),s):i},s.startAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Rn(+f),s):o},s.endAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Rn(+f),s):a},s.padAngle=function(f){return arguments.length?(u=typeof f=="function"?f:Rn(+f),s):u},s.source=function(f){return arguments.length?(e=f,s):e},s.target=function(f){return arguments.length?(n=f,s):n},s.context=function(f){return arguments.length?(c=f??null,s):c},s}function _6(){return Gp()}function w6(){return Gp(x6)}var A6=Array.prototype,Up=A6.slice;function $6(t,e){return t-e}function M6(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const fn=t=>()=>t;function S6(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=T6(t,e[n]))return i;return 0}function T6(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,u=a-1;o<a;u=o++){var c=t[o],s=c[0],f=c[1],h=t[u],l=h[0],p=h[1];if(P6(c,h,e))return 0;f>r!=p>r&&n<(l-s)*(r-f)/(p-f)+s&&(i=-i)}return i}function P6(t,e,n){var r;return D6(t,e,n)&&k6(t[r=+(t[0]===e[0])],n[r],e[r])}function D6(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function k6(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function E6(){}var qe=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function kc(){var t=1,e=1,n=Es,r=c;function i(s){var f=n(s);if(Array.isArray(f))f=f.slice().sort($6);else{const h=ei(s,N6);for(f=$n(...ks(h[0],h[1],f),f);f[f.length-1]>=h[1];)f.pop();for(;f[1]<h[0];)f.shift()}return f.map(h=>o(s,h))}function o(s,f){const h=f==null?NaN:+f;if(isNaN(h))throw new Error(`invalid value: ${f}`);var l=[],p=[];return a(s,h,function(d){r(d,s,h),M6(d)>0?l.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=l.length,y;g<m;++g)if(S6((y=l[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:f,coordinates:l}}function a(s,f,h){var l=new Array,p=new Array,d,g,m,y,_,v;for(d=g=-1,y=Fn(s[0],f),qe[y<<1].forEach(x);++d<t-1;)m=y,y=Fn(s[d+1],f),qe[m|y<<1].forEach(x);for(qe[y<<0].forEach(x);++g<e-1;){for(d=-1,y=Fn(s[g*t+t],f),_=Fn(s[g*t],f),qe[y<<1|_<<2].forEach(x);++d<t-1;)m=y,y=Fn(s[g*t+t+d+1],f),v=_,_=Fn(s[g*t+d+1],f),qe[m|y<<1|_<<2|v<<3].forEach(x);qe[y|_<<3].forEach(x)}for(d=-1,_=s[g*t]>=f,qe[_<<2].forEach(x);++d<t-1;)v=_,_=Fn(s[g*t+d+1],f),qe[_<<2|v<<3].forEach(x);qe[_<<3].forEach(x);function x(A){var b=[A[0][0]+d,A[0][1]+g],w=[A[1][0]+d,A[1][1]+g],M=u(b),$=u(w),D,S;(D=p[M])?(S=l[$])?(delete p[D.end],delete l[S.start],D===S?(D.ring.push(w),h(D.ring)):l[D.start]=p[S.end]={start:D.start,end:S.end,ring:D.ring.concat(S.ring)}):(delete p[D.end],D.ring.push(w),p[D.end=$]=D):(D=l[$])?(S=p[M])?(delete l[D.start],delete p[S.end],D===S?(D.ring.push(w),h(D.ring)):l[S.start]=p[D.end]={start:S.start,end:D.end,ring:S.ring.concat(D.ring)}):(delete l[D.start],D.ring.unshift(b),l[D.start=M]=D):l[M]=p[$]={start:M,end:$,ring:[b,w]}}}function u(s){return s[0]*2+s[1]*(t+1)*4}function c(s,f,h){s.forEach(function(l){var p=l[0],d=l[1],g=p|0,m=d|0,y=Ec(f[m*t+g]);p>0&&p<t&&g===p&&(l[0]=Yp(p,Ec(f[m*t+g-1]),y,h)),d>0&&d<e&&m===d&&(l[1]=Yp(d,Ec(f[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(s){if(!arguments.length)return[t,e];var f=Math.floor(s[0]),h=Math.floor(s[1]);if(!(f>=0&&h>=0))throw new Error("invalid size");return t=f,e=h,i},i.thresholds=function(s){return arguments.length?(n=typeof s=="function"?s:Array.isArray(s)?fn(Up.call(s)):fn(s),i):n},i.smooth=function(s){return arguments.length?(r=s?c:E6,i):r===c},i}function N6(t){return isFinite(t)?t:NaN}function Fn(t,e){return t==null?!1:+t>=e}function Ec(t){return t==null||isNaN(t=+t)?-1/0:t}function Yp(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function L6(t){return t[0]}function C6(t){return t[1]}function I6(){return 1}function R6(){var t=L6,e=C6,n=I6,r=960,i=500,o=20,a=2,u=o*3,c=r+u*2>>a,s=i+u*2>>a,f=fn(20);function h(_){var v=new Float32Array(c*s),x=Math.pow(2,-a),A=-1;for(const E of _){var b=(t(E,++A,_)+u)*x,w=(e(E,A,_)+u)*x,M=+n(E,A,_);if(M&&b>=0&&b<c&&w>=0&&w<s){var $=Math.floor(b),D=Math.floor(w),S=b-$-.5,N=w-D-.5;v[$+D*c]+=(1-S)*(1-N)*M,v[$+1+D*c]+=S*(1-N)*M,v[$+1+(D+1)*c]+=S*N*M,v[$+(D+1)*c]+=(1-S)*N*M}}return zh({data:v,width:c,height:s},o*x),v}function l(_){var v=h(_),x=f(v),A=Math.pow(2,2*a);return Array.isArray(x)||(x=$n(Number.MIN_VALUE,ri(v)/A,x)),kc().size([c,s]).thresholds(x.map(b=>b*A))(v).map((b,w)=>(b.value=+x[w],p(b)))}l.contours=function(_){var v=h(_),x=kc().size([c,s]),A=Math.pow(2,2*a),b=w=>{w=+w;var M=p(x.contour(v,w*A));return M.value=w,M};return Object.defineProperty(b,"max",{get:()=>ri(v)/A}),b};function p(_){return _.coordinates.forEach(d),_}function d(_){_.forEach(g)}function g(_){_.forEach(m)}function m(_){_[0]=_[0]*Math.pow(2,a)-u,_[1]=_[1]*Math.pow(2,a)-u}function y(){return u=o*3,c=r+u*2>>a,s=i+u*2>>a,l}return l.x=function(_){return arguments.length?(t=typeof _=="function"?_:fn(+_),l):t},l.y=function(_){return arguments.length?(e=typeof _=="function"?_:fn(+_),l):e},l.weight=function(_){return arguments.length?(n=typeof _=="function"?_:fn(+_),l):n},l.size=function(_){if(!arguments.length)return[r,i];var v=+_[0],x=+_[1];if(!(v>=0&&x>=0))throw new Error("invalid size");return r=v,i=x,y()},l.cellSize=function(_){if(!arguments.length)return 1<<a;if(!((_=+_)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(_)/Math.LN2),y()},l.thresholds=function(_){return arguments.length?(f=typeof _=="function"?_:Array.isArray(_)?fn(Up.call(_)):fn(_),l):f},l.bandwidth=function(_){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((_=+_)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*_*_+1)-1)/2,y()},l}const We=11102230246251565e-32,Ot=134217729,F6=(3+8*We)*We;function Nc(t,e,n,r,i){let o,a,u,c,s=e[0],f=r[0],h=0,l=0;f>s==f>-s?(o=s,s=e[++h]):(o=f,f=r[++l]);let p=0;if(h<t&&l<n)for(f>s==f>-s?(a=s+o,u=o-(a-s),s=e[++h]):(a=f+o,u=o-(a-f),f=r[++l]),o=a,u!==0&&(i[p++]=u);h<t&&l<n;)f>s==f>-s?(a=o+s,c=a-o,u=o-(a-c)+(s-c),s=e[++h]):(a=o+f,c=a-o,u=o-(a-c)+(f-c),f=r[++l]),o=a,u!==0&&(i[p++]=u);for(;h<t;)a=o+s,c=a-o,u=o-(a-c)+(s-c),s=e[++h],o=a,u!==0&&(i[p++]=u);for(;l<n;)a=o+f,c=a-o,u=o-(a-c)+(f-c),f=r[++l],o=a,u!==0&&(i[p++]=u);return(o!==0||p===0)&&(i[p++]=o),p}function z6(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Ai(t){return new Float64Array(t)}const O6=(3+16*We)*We,G6=(2+12*We)*We,U6=(9+64*We)*We*We,_r=Ai(4),Bp=Ai(8),qp=Ai(12),Wp=Ai(16),Bt=Ai(4);function Y6(t,e,n,r,i,o,a){let u,c,s,f,h,l,p,d,g,m,y,_,v,x,A,b,w,M;const $=t-i,D=n-i,S=e-o,N=r-o;x=$*N,l=Ot*$,p=l-(l-$),d=$-p,l=Ot*N,g=l-(l-N),m=N-g,A=d*m-(x-p*g-d*g-p*m),b=S*D,l=Ot*S,p=l-(l-S),d=S-p,l=Ot*D,g=l-(l-D),m=D-g,w=d*m-(b-p*g-d*g-p*m),y=A-w,h=A-y,_r[0]=A-(y+h)+(h-w),_=x+y,h=_-x,v=x-(_-h)+(y-h),y=v-b,h=v-y,_r[1]=v-(y+h)+(h-b),M=_+y,h=M-_,_r[2]=_-(M-h)+(y-h),_r[3]=M;let E=z6(4,_r),T=G6*a;if(E>=T||-E>=T||(h=t-$,u=t-($+h)+(h-i),h=n-D,s=n-(D+h)+(h-i),h=e-S,c=e-(S+h)+(h-o),h=r-N,f=r-(N+h)+(h-o),u===0&&c===0&&s===0&&f===0)||(T=U6*a+F6*Math.abs(E),E+=$*f+N*u-(S*s+D*c),E>=T||-E>=T))return E;x=u*N,l=Ot*u,p=l-(l-u),d=u-p,l=Ot*N,g=l-(l-N),m=N-g,A=d*m-(x-p*g-d*g-p*m),b=c*D,l=Ot*c,p=l-(l-c),d=c-p,l=Ot*D,g=l-(l-D),m=D-g,w=d*m-(b-p*g-d*g-p*m),y=A-w,h=A-y,Bt[0]=A-(y+h)+(h-w),_=x+y,h=_-x,v=x-(_-h)+(y-h),y=v-b,h=v-y,Bt[1]=v-(y+h)+(h-b),M=_+y,h=M-_,Bt[2]=_-(M-h)+(y-h),Bt[3]=M;const k=Nc(4,_r,4,Bt,Bp);x=$*f,l=Ot*$,p=l-(l-$),d=$-p,l=Ot*f,g=l-(l-f),m=f-g,A=d*m-(x-p*g-d*g-p*m),b=S*s,l=Ot*S,p=l-(l-S),d=S-p,l=Ot*s,g=l-(l-s),m=s-g,w=d*m-(b-p*g-d*g-p*m),y=A-w,h=A-y,Bt[0]=A-(y+h)+(h-w),_=x+y,h=_-x,v=x-(_-h)+(y-h),y=v-b,h=v-y,Bt[1]=v-(y+h)+(h-b),M=_+y,h=M-_,Bt[2]=_-(M-h)+(y-h),Bt[3]=M;const P=Nc(k,Bp,4,Bt,qp);x=u*f,l=Ot*u,p=l-(l-u),d=u-p,l=Ot*f,g=l-(l-f),m=f-g,A=d*m-(x-p*g-d*g-p*m),b=c*s,l=Ot*c,p=l-(l-c),d=c-p,l=Ot*s,g=l-(l-s),m=s-g,w=d*m-(b-p*g-d*g-p*m),y=A-w,h=A-y,Bt[0]=A-(y+h)+(h-w),_=x+y,h=_-x,v=x-(_-h)+(y-h),y=v-b,h=v-y,Bt[1]=v-(y+h)+(h-b),M=_+y,h=M-_,Bt[2]=_-(M-h)+(y-h),Bt[3]=M;const L=Nc(P,qp,4,Bt,Wp);return Wp[L-1]}function ga(t,e,n,r,i,o){const a=(e-o)*(n-i),u=(t-i)*(r-o),c=a-u,s=Math.abs(a+u);return Math.abs(c)>=O6*s?c:-Y6(t,e,n,r,i,o,s)}const Hp=Math.pow(2,-52),ma=new Uint32Array(512);class ya{static from(e,n=X6,r=V6){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const u=e[a];o[2*a]=n(u),o[2*a+1]=r(u)}return new ya(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let u=1/0,c=1/0,s=-1/0,f=-1/0;for(let $=0;$<a;$++){const D=e[2*$],S=e[2*$+1];D<u&&(u=D),S<c&&(c=S),D>s&&(s=D),S>f&&(f=S),this._ids[$]=$}const h=(u+s)/2,l=(c+f)/2;let p,d,g;for(let $=0,D=1/0;$<a;$++){const S=Lc(h,l,e[2*$],e[2*$+1]);S<D&&(p=$,D=S)}const m=e[2*p],y=e[2*p+1];for(let $=0,D=1/0;$<a;$++){if($===p)continue;const S=Lc(m,y,e[2*$],e[2*$+1]);S<D&&S>0&&(d=$,D=S)}let _=e[2*d],v=e[2*d+1],x=1/0;for(let $=0;$<a;$++){if($===p||$===d)continue;const D=W6(m,y,_,v,e[2*$],e[2*$+1]);D<x&&(g=$,x=D)}let A=e[2*g],b=e[2*g+1];if(x===1/0){for(let S=0;S<a;S++)this._dists[S]=e[2*S]-e[0]||e[2*S+1]-e[1];wr(this._ids,this._dists,0,a-1);const $=new Uint32Array(a);let D=0;for(let S=0,N=-1/0;S<a;S++){const E=this._ids[S],T=this._dists[E];T>N&&($[D++]=E,N=T)}this.hull=$.subarray(0,D),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(ga(m,y,_,v,A,b)<0){const $=d,D=_,S=v;d=g,_=A,v=b,g=$,A=D,b=S}const w=H6(m,y,_,v,A,b);this._cx=w.x,this._cy=w.y;for(let $=0;$<a;$++)this._dists[$]=Lc(e[2*$],e[2*$+1],w.x,w.y);wr(this._ids,this._dists,0,a-1),this._hullStart=p;let M=3;r[p]=n[g]=d,r[d]=n[p]=g,r[g]=n[d]=p,i[p]=0,i[d]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=p,o[this._hashKey(_,v)]=d,o[this._hashKey(A,b)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let $=0,D,S;$<this._ids.length;$++){const N=this._ids[$],E=e[2*N],T=e[2*N+1];if($>0&&Math.abs(E-D)<=Hp&&Math.abs(T-S)<=Hp||(D=E,S=T,N===p||N===d||N===g))continue;let k=0;for(let z=0,G=this._hashKey(E,T);z<this._hashSize&&(k=o[(G+z)%this._hashSize],!(k!==-1&&k!==r[k]));z++);k=n[k];let P=k,L;for(;L=r[P],ga(E,T,e[2*P],e[2*P+1],e[2*L],e[2*L+1])>=0;)if(P=L,P===k){P=-1;break}if(P===-1)continue;let C=this._addTriangle(P,N,r[P],-1,-1,i[P]);i[N]=this._legalize(C+2),i[P]=C,M++;let R=r[P];for(;L=r[R],ga(E,T,e[2*R],e[2*R+1],e[2*L],e[2*L+1])<0;)C=this._addTriangle(R,N,L,i[N],-1,i[R]),i[N]=this._legalize(C+2),r[R]=R,M--,R=L;if(P===k)for(;L=n[P],ga(E,T,e[2*L],e[2*L+1],e[2*P],e[2*P+1])<0;)C=this._addTriangle(L,N,P,-1,i[P],i[L]),this._legalize(C+2),i[L]=C,r[P]=P,M--,P=L;this._hullStart=n[N]=P,r[P]=n[R]=N,r[N]=R,o[this._hashKey(E,T)]=N,o[this._hashKey(e[2*P],e[2*P+1])]=P}this.hull=new Uint32Array(M);for(let $=0,D=this._hullStart;$<M;$++)this.hull[$]=D,D=r[D];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(B6(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const u=r[e],c=e-e%3;if(a=c+(e+2)%3,u===-1){if(o===0)break;e=ma[--o];continue}const s=u-u%3,f=c+(e+1)%3,h=s+(u+2)%3,l=n[a],p=n[e],d=n[f],g=n[h];if(q6(i[2*l],i[2*l+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*g],i[2*g+1])){n[e]=g,n[u]=l;const y=r[h];if(y===-1){let v=this._hullStart;do{if(this._hullTri[v]===h){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,y),this._link(u,r[a]),this._link(a,h);const _=s+(u+1)%3;o<ma.length&&(ma[o++]=_)}else{if(o===0)break;e=ma[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const u=this.trianglesLen;return this._triangles[u]=e,this._triangles[u+1]=n,this._triangles[u+2]=r,this._link(u,i),this._link(u+1,o),this._link(u+2,a),this.trianglesLen+=3,u}}function B6(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Lc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function q6(t,e,n,r,i,o,a,u){const c=t-a,s=e-u,f=n-a,h=r-u,l=i-a,p=o-u,d=c*c+s*s,g=f*f+h*h,m=l*l+p*p;return c*(h*m-g*p)-s*(f*m-g*l)+d*(f*p-h*l)<0}function W6(t,e,n,r,i,o){const a=n-t,u=r-e,c=i-t,s=o-e,f=a*a+u*u,h=c*c+s*s,l=.5/(a*s-u*c),p=(s*f-u*h)*l,d=(a*h-c*f)*l;return p*p+d*d}function H6(t,e,n,r,i,o){const a=n-t,u=r-e,c=i-t,s=o-e,f=a*a+u*u,h=c*c+s*s,l=.5/(a*s-u*c),p=t+(s*f-u*h)*l,d=e+(a*h-c*f)*l;return{x:p,y:d}}function wr(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let u=i-1;for(;u>=n&&e[t[u]]>a;)t[u+1]=t[u--];t[u+1]=o}else{const i=n+r>>1;let o=n+1,a=r;$i(t,i,o),e[t[n]]>e[t[r]]&&$i(t,n,r),e[t[o]]>e[t[r]]&&$i(t,o,r),e[t[n]]>e[t[o]]&&$i(t,n,o);const u=t[o],c=e[u];for(;;){do o++;while(e[t[o]]<c);do a--;while(e[t[a]]>c);if(a<o)break;$i(t,o,a)}t[n+1]=t[a],t[a]=u,r-o+1>=a-n?(wr(t,e,o,r),wr(t,e,n,a-1)):(wr(t,e,n,a-1),wr(t,e,o,r))}}function $i(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function X6(t){return t[0]}function V6(t){return t[1]}const Xp=1e-6;class zn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>Xp||Math.abs(this._y1-o)>Xp)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Cc{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class Vp{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const u=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,_,v;g<y;g+=3,m+=2){const x=r[g]*2,A=r[g+1]*2,b=r[g+2]*2,w=e[x],M=e[x+1],$=e[A],D=e[A+1],S=e[b],N=e[b+1],E=$-w,T=D-M,k=S-w,P=N-M,L=(E*P-T*k)*2;if(Math.abs(L)<1e-9){if(o===void 0){o=a=0;for(const R of n)o+=e[R*2],a+=e[R*2+1];o/=n.length,a/=n.length}const C=1e9*Math.sign((o-w)*P-(a-M)*k);_=(w+S)/2-C*P,v=(M+N)/2+C*k}else{const C=1/L,R=E*E+T*T,z=k*k+P*P;_=w+(P*R-T*z)*C,v=M+(E*z-k*R)*C}u[m]=_,u[m+1]=v}let c=n[n.length-1],s,f=c*4,h,l=e[2*c],p,d=e[2*c+1];i.fill(0);for(let g=0;g<n.length;++g)c=n[g],s=f,h=l,p=d,f=c*4,l=e[2*c],d=e[2*c+1],i[s+2]=i[f]=p-d,i[s+3]=i[f+1]=l-h}render(e){const n=e==null?e=new zn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:u}=this;if(o.length<=1)return null;for(let f=0,h=r.length;f<h;++f){const l=r[f];if(l<f)continue;const p=Math.floor(f/3)*2,d=Math.floor(l/3)*2,g=a[p],m=a[p+1],y=a[d],_=a[d+1];this._renderSegment(g,m,y,_,e)}let c,s=o[o.length-1];for(let f=0;f<o.length;++f){c=s,s=o[f];const h=Math.floor(i[s]/3)*2,l=a[h],p=a[h+1],d=c*4,g=this._project(l,p,u[d+2],u[d+3]);g&&this._renderSegment(l,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new zn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new zn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Cc;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const u=this._regioncode(e,n),c=this._regioncode(r,i);u===0&&c===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,u,c))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let u=0,c=i.length;u<c;u+=2)if(n[o]===i[u]&&n[o+1]===i[u+1]&&n[(o+2)%a]===i[(u+c-2)%c]&&n[(o+3)%a]===i[(u+c-1)%c]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const u=[];let c=a;do{const s=Math.floor(c/3);if(u.push(n[s*2],n[s*2+1]),c=c%3===2?c-2:c+1,o[c]!==e)break;c=i[c]}while(c!==a&&c!==-1);return u}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,u=n[r-2],c=n[r-1],s,f=this._regioncode(u,c),h,l=0;for(let p=0;p<r;p+=2)if(o=u,a=c,u=n[p],c=n[p+1],s=f,f=this._regioncode(u,c),s===0&&f===0)h=l,l=0,i?i.push(u,c):i=[u,c];else{let d,g,m,y,_;if(s===0){if((d=this._clipSegment(o,a,u,c,s,f))===null)continue;[g,m,y,_]=d}else{if((d=this._clipSegment(u,c,o,a,f,s))===null)continue;[y,_,g,m]=d,h=l,l=this._edgecode(g,m),h&&l&&this._edge(e,h,l,i,i.length),i?i.push(g,m):i=[g,m]}h=l,l=this._edgecode(y,_),h&&l&&this._edge(e,h,l,i,i.length),i?i.push(y,_):i=[y,_]}if(i)h=l,l=this._edgecode(i[0],i[1]),h&&l&&this._edge(e,h,l,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const u=o<a;for(u&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return u?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let c,s,f=o||a;f&8?(c=e+(r-e)*(this.ymax-n)/(i-n),s=this.ymax):f&4?(c=e+(r-e)*(this.ymin-n)/(i-n),s=this.ymin):f&2?(s=n+(i-n)*(this.xmax-e)/(r-e),c=this.xmax):(s=n+(i-n)*(this.xmin-e)/(r-e),c=this.xmin),o?(e=c,n=s,o=this._regioncode(e,n)):(r=c,i=s,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let u=Array.from(n),c;if((c=this._project(u[0],u[1],r,i))&&u.unshift(c[0],c[1]),(c=this._project(u[u.length-2],u[u.length-1],o,a))&&u.push(c[0],c[1]),u=this._clipFinite(e,u))for(let s=0,f=u.length,h,l=this._edgecode(u[f-2],u[f-1]);s<f;s+=2)h=l,l=this._edgecode(u[s],u[s+1]),h&&l&&(s=this._edge(e,h,l,u,s),f=u.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(u=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return u}_edge(e,n,r,i,o){for(;n!==r;){let a,u;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,u=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,u=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,u=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,u=this.ymin;break}(i[o]!==a||i[o+1]!==u)&&this.contains(e,a,u)&&(i.splice(o,0,a,u),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,u,c;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(c=this.ymin,u=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(c=this.ymax,u=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(u=this.xmax,c=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(u=this.xmin,c=n+(o=a)*i)}return[u,c]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const j6=2*Math.PI,Ar=Math.pow;function Z6(t){return t[0]}function K6(t){return t[1]}function Q6(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function J6(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Ic{static from(e,n=Z6,r=K6,i){return new Ic("length"in e?t8(e,n,r,i):Float64Array.from(e8(e,n,r,i)))}constructor(e){this._delaunator=new ya(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&Q6(e)){this.collinear=Int32Array.from({length:n.length/2},(l,p)=>p).sort((l,p)=>n[2*l]-n[2*p]||n[2*l+1]-n[2*p+1]);const c=this.collinear[0],s=this.collinear[this.collinear.length-1],f=[n[2*c],n[2*c+1],n[2*s],n[2*s+1]],h=1e-8*Math.hypot(f[3]-f[1],f[2]-f[0]);for(let l=0,p=n.length/2;l<p;++l){const d=J6(n[2*l],n[2*l+1],h);n[2*l]=d[0],n[2*l+1]=d[1]}this._delaunator=new ya(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),u=this._hullIndex.fill(-1);for(let c=0,s=r.length;c<s;++c){const f=o[c%3===2?c-2:c+1];(r[c]===-1||a[f]===-1)&&(a[f]=c)}for(let c=0,s=i.length;c<s;++c)u[i[c]]=c;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new Vp(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:u}=this;if(u){const h=u.indexOf(e);h>0&&(yield u[h-1]),h<u.length-1&&(yield u[h+1]);return}const c=n[e];if(c===-1)return;let s=c,f=-1;do{if(yield f=a[s],s=s%3===2?s-2:s+1,a[s]!==e)return;if(s=o[s],s===-1){const h=r[(i[e]+1)%r.length];h!==f&&(yield h);return}}while(s!==c)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:u,triangles:c,points:s}=this;if(i[e]===-1||!s.length)return(e+1)%(s.length>>1);let f=e,h=Ar(n-s[e*2],2)+Ar(r-s[e*2+1],2);const l=i[e];let p=l;do{let d=c[p];const g=Ar(n-s[d*2],2)+Ar(r-s[d*2+1],2);if(g<h&&(h=g,f=d),p=p%3===2?p-2:p+1,c[p]!==e)break;if(p=u[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&Ar(n-s[p*2],2)+Ar(r-s[p*2+1],2)<h)return p;break}}while(p!==l);return f}render(e){const n=e==null?e=new zn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,u=i.length;a<u;++a){const c=i[a];if(c<a)continue;const s=o[a]*2,f=o[c]*2;e.moveTo(r[s],r[s+1]),e.lineTo(r[f],r[f+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new zn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const u=i[o],c=i[o+1];e.moveTo(u+n,c),e.arc(u,c,n,0,j6)}return r&&r.value()}renderHull(e){const n=e==null?e=new zn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let u=1;u<a;++u){const c=2*r[u];e.lineTo(i[c],i[c+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Cc;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new zn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,u=o[e+1]*2,c=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[u],i[u+1]),n.lineTo(i[c],i[c+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Cc;return this.renderTriangle(e,n),n.value()}}function t8(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const u=t[a];o[a*2]=e.call(r,u,a,t),o[a*2+1]=n.call(r,u,a,t)}return o}function*e8(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var jp={},Rc={},Fc=34,Mi=10,zc=13;function Zp(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function n8(t,e){var n=Zp(t);return function(r,i){return e(n(r),i,t)}}function Kp(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function ee(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function r8(t){return t<0?"-"+ee(-t,6):t>9999?"+"+ee(t,6):ee(t,4)}function i8(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":r8(t.getUTCFullYear())+"-"+ee(t.getUTCMonth()+1,2)+"-"+ee(t.getUTCDate(),2)+(i?"T"+ee(e,2)+":"+ee(n,2)+":"+ee(r,2)+"."+ee(i,3)+"Z":r?"T"+ee(e,2)+":"+ee(n,2)+":"+ee(r,2)+"Z":n||e?"T"+ee(e,2)+":"+ee(n,2)+"Z":"")}function ba(t){var e=new RegExp('["'+t+`
2
+ \r]`),n=t.charCodeAt(0);function r(h,l){var p,d,g=i(h,function(m,y){if(p)return p(m,y-1);d=m,p=l?n8(m,l):Zp(m)});return g.columns=d||[],g}function i(h,l){var p=[],d=h.length,g=0,m=0,y,_=d<=0,v=!1;h.charCodeAt(d-1)===Mi&&--d,h.charCodeAt(d-1)===zc&&--d;function x(){if(_)return Rc;if(v)return v=!1,jp;var b,w=g,M;if(h.charCodeAt(w)===Fc){for(;g++<d&&h.charCodeAt(g)!==Fc||h.charCodeAt(++g)===Fc;);return(b=g)>=d?_=!0:(M=h.charCodeAt(g++))===Mi?v=!0:M===zc&&(v=!0,h.charCodeAt(g)===Mi&&++g),h.slice(w+1,b-1).replace(/""/g,'"')}for(;g<d;){if((M=h.charCodeAt(b=g++))===Mi)v=!0;else if(M===zc)v=!0,h.charCodeAt(g)===Mi&&++g;else if(M!==n)continue;return h.slice(w,b)}return _=!0,h.slice(w,d)}for(;(y=x())!==Rc;){for(var A=[];y!==jp&&y!==Rc;)A.push(y),y=x();l&&(A=l(A,m++))==null||p.push(A)}return p}function o(h,l){return h.map(function(p){return l.map(function(d){return f(p[d])}).join(t)})}function a(h,l){return l==null&&(l=Kp(h)),[l.map(f).join(t)].concat(o(h,l)).join(`
3
+ `)}function u(h,l){return l==null&&(l=Kp(h)),o(h,l).join(`
4
4
  `)}function c(h){return h.map(s).join(`
5
- `)}function s(h){return h.map(f).join(t)}function f(h){return h==null?"":h instanceof Date?J5(h):n.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:u,formatRows:c,formatRow:s,formatValue:f}}var Ge=ba(","),Kp=Ge.parse,t8=Ge.parseRows,n8=Ge.format,e8=Ge.formatBody,r8=Ge.formatRows,i8=Ge.formatRow,o8=Ge.formatValue,Ue=ba(" "),Qp=Ue.parse,a8=Ue.parseRows,u8=Ue.format,s8=Ue.formatBody,c8=Ue.formatRows,l8=Ue.formatRow,f8=Ue.formatValue;function h8(t){for(var n in t){var e=t[n].trim(),r,i;if(!e)e=null;else if(e==="true")e=!0;else if(e==="false")e=!1;else if(e==="NaN")e=NaN;else if(!isNaN(r=+e))e=r;else if(i=e.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))p8&&i[4]&&!i[7]&&(e=e.replace(/-/g,"/").replace(/T/," ")),e=new Date(e);else continue;t[n]=e}return t}const p8=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function d8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function g8(t,n){return fetch(t,n).then(d8)}function m8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function y8(t,n){return fetch(t,n).then(m8)}function b8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function va(t,n){return fetch(t,n).then(b8)}function Jp(t){return function(n,e,r){return arguments.length===2&&typeof e=="function"&&(r=e,e=void 0),va(n,e).then(function(i){return t(i,r)})}}function v8(t,n,e,r){arguments.length===3&&typeof e=="function"&&(r=e,e=void 0);var i=ba(t);return va(n,e).then(function(o){return i.parse(o,r)})}var x8=Jp(Kp),_8=Jp(Qp);function w8(t,n){return new Promise(function(e,r){var i=new Image;for(var o in n)i[o]=n[o];i.onerror=r,i.onload=function(){e(i)},i.src=t})}function A8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function M8(t,n){return fetch(t,n).then(A8)}function Oc(t){return(n,e)=>va(n,e).then(r=>new DOMParser().parseFromString(r,t))}const $8=Oc("application/xml");var S8=Oc("text/html"),T8=Oc("image/svg+xml");function D8(t,n){var e,r=1;t==null&&(t=0),n==null&&(n=0);function i(){var o,a=e.length,u,c=0,s=0;for(o=0;o<a;++o)u=e[o],c+=u.x,s+=u.y;for(c=(c/a-t)*r,s=(s/a-n)*r,o=0;o<a;++o)u=e[o],u.x-=c,u.y-=s}return i.initialize=function(o){e=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(n=+o,i):n},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function P8(t){const n=+this._x.call(null,t),e=+this._y.call(null,t);return td(this.cover(n,e),n,e,t)}function td(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o=t._root,a={data:r},u=t._x0,c=t._y0,s=t._x1,f=t._y1,h,l,p,d,g,m,y,x;if(!o)return t._root=a,t;for(;o.length;)if((g=n>=(h=(u+s)/2))?u=h:s=h,(m=e>=(l=(c+f)/2))?c=l:f=l,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(p=+t._x.call(null,o.data),d=+t._y.call(null,o.data),n===p&&e===d)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=n>=(h=(u+s)/2))?u=h:s=h,(m=e>=(l=(c+f)/2))?c=l:f=l;while((y=m<<1|g)===(x=(d>=l)<<1|p>=h));return i[x]=o,i[y]=a,t}function k8(t){var n,e,r=t.length,i,o,a=new Array(r),u=new Array(r),c=1/0,s=1/0,f=-1/0,h=-1/0;for(e=0;e<r;++e)isNaN(i=+this._x.call(null,n=t[e]))||isNaN(o=+this._y.call(null,n))||(a[e]=i,u[e]=o,i<c&&(c=i),i>f&&(f=i),o<s&&(s=o),o>h&&(h=o));if(c>f||s>h)return this;for(this.cover(c,s).cover(f,h),e=0;e<r;++e)td(this,a[e],u[e],t[e]);return this}function E8(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{for(var a=i-e||1,u=this._root,c,s;e>t||t>=i||r>n||n>=o;)switch(s=(n<r)<<1|t<e,c=new Array(4),c[s]=u,u=c,a*=2,s){case 0:i=e+a,o=r+a;break;case 1:e=i-a,o=r+a;break;case 2:i=e+a,r=o-a;break;case 3:e=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=u)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this}function N8(){var t=[];return this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)}),t}function L8(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qt(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function C8(t,n,e){var r,i=this._x0,o=this._y0,a,u,c,s,f=this._x1,h=this._y1,l=[],p=this._root,d,g;for(p&&l.push(new qt(p,i,o,f,h)),e==null?e=1/0:(i=t-e,o=n-e,f=t+e,h=n+e,e*=e);d=l.pop();)if(!(!(p=d.node)||(a=d.x0)>f||(u=d.y0)>h||(c=d.x1)<i||(s=d.y1)<o))if(p.length){var m=(a+c)/2,y=(u+s)/2;l.push(new qt(p[3],m,y,c,s),new qt(p[2],a,y,m,s),new qt(p[1],m,u,c,y),new qt(p[0],a,u,m,y)),(g=(n>=y)<<1|t>=m)&&(d=l[l.length-1],l[l.length-1]=l[l.length-1-g],l[l.length-1-g]=d)}else{var x=t-+this._x.call(null,p.data),_=n-+this._y.call(null,p.data),v=x*x+_*_;if(v<e){var w=Math.sqrt(e=v);i=t-w,o=n-w,f=t+w,h=n+w,r=p.data}}return r}function I8(t){if(isNaN(f=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var n,e=this._root,r,i,o,a=this._x0,u=this._y0,c=this._x1,s=this._y1,f,h,l,p,d,g,m,y;if(!e)return this;if(e.length)for(;;){if((d=f>=(l=(a+c)/2))?a=l:c=l,(g=h>=(p=(u+s)/2))?u=p:s=p,n=e,!(e=e[m=g<<1|d]))return this;if(!e.length)break;(n[m+1&3]||n[m+2&3]||n[m+3&3])&&(r=n,y=m)}for(;e.data!==t;)if(i=e,!(e=e.next))return this;return(o=e.next)&&delete e.next,i?(o?i.next=o:delete i.next,this):n?(o?n[m]=o:delete n[m],(e=n[0]||n[1]||n[2]||n[3])&&e===(n[3]||n[2]||n[1]||n[0])&&!e.length&&(r?r[y]=e:this._root=e),this):(this._root=o,this)}function R8(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this}function F8(){return this._root}function O8(){var t=0;return this.visit(function(n){if(!n.length)do++t;while(n=n.next)}),t}function z8(t){var n=[],e,r=this._root,i,o,a,u,c;for(r&&n.push(new qt(r,this._x0,this._y0,this._x1,this._y1));e=n.pop();)if(!t(r=e.node,o=e.x0,a=e.y0,u=e.x1,c=e.y1)&&r.length){var s=(o+u)/2,f=(a+c)/2;(i=r[3])&&n.push(new qt(i,s,f,u,c)),(i=r[2])&&n.push(new qt(i,o,f,s,c)),(i=r[1])&&n.push(new qt(i,s,a,u,f)),(i=r[0])&&n.push(new qt(i,o,a,s,f))}return this}function G8(t){var n=[],e=[],r;for(this._root&&n.push(new qt(this._root,this._x0,this._y0,this._x1,this._y1));r=n.pop();){var i=r.node;if(i.length){var o,a=r.x0,u=r.y0,c=r.x1,s=r.y1,f=(a+c)/2,h=(u+s)/2;(o=i[0])&&n.push(new qt(o,a,u,f,h)),(o=i[1])&&n.push(new qt(o,f,u,c,h)),(o=i[2])&&n.push(new qt(o,a,h,f,s)),(o=i[3])&&n.push(new qt(o,f,h,c,s))}e.push(r)}for(;r=e.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function U8(t){return t[0]}function Y8(t){return arguments.length?(this._x=t,this):this._x}function B8(t){return t[1]}function q8(t){return arguments.length?(this._y=t,this):this._y}function xa(t,n,e){var r=new zc(n??U8,e??B8,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function zc(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function nd(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Ht=xa.prototype=zc.prototype;Ht.copy=function(){var t=new zc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,e,r;if(!n)return t;if(!n.length)return t._root=nd(n),t;for(e=[{source:n,target:t._root=new Array(4)}];n=e.pop();)for(var i=0;i<4;++i)(r=n.source[i])&&(r.length?e.push({source:r,target:n.target[i]=new Array(4)}):n.target[i]=nd(r));return t},Ht.add=P8,Ht.addAll=k8,Ht.cover=E8,Ht.data=N8,Ht.extent=L8,Ht.find=C8,Ht.remove=I8,Ht.removeAll=R8,Ht.root=F8,Ht.size=O8,Ht.visit=z8,Ht.visitAfter=G8,Ht.x=Y8,Ht.y=q8;function Pt(t){return function(){return t}}function pe(t){return(t()-.5)*1e-6}function H8(t){return t.x+t.vx}function W8(t){return t.y+t.vy}function ed(t){var n,e,r,i=1,o=1;typeof t!="function"&&(t=Pt(t==null?1:+t));function a(){for(var s,f=n.length,h,l,p,d,g,m,y=0;y<o;++y)for(h=xa(n,H8,W8).visitAfter(u),s=0;s<f;++s)l=n[s],g=e[l.index],m=g*g,p=l.x+l.vx,d=l.y+l.vy,h.visit(x);function x(_,v,w,b,A){var M=_.data,$=_.r,D=g+$;if(M){if(M.index>l.index){var S=p-M.x-M.vx,L=d-M.y-M.vy,E=S*S+L*L;E<D*D&&(S===0&&(S=pe(r),E+=S*S),L===0&&(L=pe(r),E+=L*L),E=(D-(E=Math.sqrt(E)))/E*i,l.vx+=(S*=E)*(D=($*=$)/(m+$)),l.vy+=(L*=E)*D,M.vx-=S*(D=1-D),M.vy-=L*D)}return}return v>p+D||b<p-D||w>d+D||A<d-D}}function u(s){if(s.data)return s.r=e[s.data.index];for(var f=s.r=0;f<4;++f)s[f]&&s[f].r>s.r&&(s.r=s[f].r)}function c(){if(n){var s,f=n.length,h;for(e=new Array(f),s=0;s<f;++s)h=n[s],e[h.index]=+t(h,s,n)}}return a.initialize=function(s,f){n=s,r=f,c()},a.iterations=function(s){return arguments.length?(o=+s,a):o},a.strength=function(s){return arguments.length?(i=+s,a):i},a.radius=function(s){return arguments.length?(t=typeof s=="function"?s:Pt(+s),c(),a):t},a}function X8(t){return t.index}function rd(t,n){var e=t.get(n);if(!e)throw new Error("node not found: "+n);return e}function V8(t){var n=X8,e=h,r,i=Pt(30),o,a,u,c,s,f=1;t==null&&(t=[]);function h(m){return 1/Math.min(u[m.source.index],u[m.target.index])}function l(m){for(var y=0,x=t.length;y<f;++y)for(var _=0,v,w,b,A,M,$,D;_<x;++_)v=t[_],w=v.source,b=v.target,A=b.x+b.vx-w.x-w.vx||pe(s),M=b.y+b.vy-w.y-w.vy||pe(s),$=Math.sqrt(A*A+M*M),$=($-o[_])/$*m*r[_],A*=$,M*=$,b.vx-=A*(D=c[_]),b.vy-=M*D,w.vx+=A*(D=1-D),w.vy+=M*D}function p(){if(a){var m,y=a.length,x=t.length,_=new Map(a.map((w,b)=>[n(w,b,a),w])),v;for(m=0,u=new Array(y);m<x;++m)v=t[m],v.index=m,typeof v.source!="object"&&(v.source=rd(_,v.source)),typeof v.target!="object"&&(v.target=rd(_,v.target)),u[v.source.index]=(u[v.source.index]||0)+1,u[v.target.index]=(u[v.target.index]||0)+1;for(m=0,c=new Array(x);m<x;++m)v=t[m],c[m]=u[v.source.index]/(u[v.source.index]+u[v.target.index]);r=new Array(x),d(),o=new Array(x),g()}}function d(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+e(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return l.initialize=function(m,y){a=m,s=y,p()},l.links=function(m){return arguments.length?(t=m,p(),l):t},l.id=function(m){return arguments.length?(n=m,l):n},l.iterations=function(m){return arguments.length?(f=+m,l):f},l.strength=function(m){return arguments.length?(e=typeof m=="function"?m:Pt(+m),d(),l):e},l.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Pt(+m),g(),l):i},l}const j8=1664525,Z8=1013904223,id=4294967296;function K8(){let t=1;return()=>(t=(j8*t+Z8)%id)/id}function Q8(t){return t.x}function J8(t){return t.y}var t4=10,n4=Math.PI*(3-Math.sqrt(5));function od(t){var n,e=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,u=new Map,c=aa(h),s=Te("tick","end"),f=K8();t==null&&(t=[]);function h(){l(),s.call("tick",n),e<r&&(c.stop(),s.call("end",n))}function l(g){var m,y=t.length,x;g===void 0&&(g=1);for(var _=0;_<g;++_)for(e+=(o-e)*i,u.forEach(function(v){v(e)}),m=0;m<y;++m)x=t[m],x.fx==null?x.x+=x.vx*=a:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=a:(x.y=x.fy,x.vy=0);return n}function p(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var x=t4*Math.sqrt(.5+g),_=g*n4;y.x=x*Math.cos(_),y.y=x*Math.sin(_)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function d(g){return g.initialize&&g.initialize(t,f),g}return p(),n={tick:l,restart:function(){return c.restart(h),n},stop:function(){return c.stop(),n},nodes:function(g){return arguments.length?(t=g,p(),u.forEach(d),n):t},alpha:function(g){return arguments.length?(e=+g,n):e},alphaMin:function(g){return arguments.length?(r=+g,n):r},alphaDecay:function(g){return arguments.length?(i=+g,n):+i},alphaTarget:function(g){return arguments.length?(o=+g,n):o},velocityDecay:function(g){return arguments.length?(a=1-g,n):1-a},randomSource:function(g){return arguments.length?(f=g,u.forEach(d),n):f},force:function(g,m){return arguments.length>1?(m==null?u.delete(g):u.set(g,d(m)),n):u.get(g)},find:function(g,m,y){var x=0,_=t.length,v,w,b,A,M;for(y==null?y=1/0:y*=y,x=0;x<_;++x)A=t[x],v=g-A.x,w=m-A.y,b=v*v+w*w,b<y&&(M=A,y=b);return M},on:function(g,m){return arguments.length>1?(s.on(g,m),n):s.on(g)}}}function ad(){var t,n,e,r,i=Pt(-30),o,a=1,u=1/0,c=.81;function s(p){var d,g=t.length,m=xa(t,Q8,J8).visitAfter(h);for(r=p,d=0;d<g;++d)n=t[d],m.visit(l)}function f(){if(t){var p,d=t.length,g;for(o=new Array(d),p=0;p<d;++p)g=t[p],o[g.index]=+i(g,p,t)}}function h(p){var d=0,g,m,y=0,x,_,v;if(p.length){for(x=_=v=0;v<4;++v)(g=p[v])&&(m=Math.abs(g.value))&&(d+=g.value,y+=m,x+=m*g.x,_+=m*g.y);p.x=x/y,p.y=_/y}else{g=p,g.x=g.data.x,g.y=g.data.y;do d+=o[g.data.index];while(g=g.next)}p.value=d}function l(p,d,g,m){if(!p.value)return!0;var y=p.x-n.x,x=p.y-n.y,_=m-d,v=y*y+x*x;if(_*_/c<v)return v<u&&(y===0&&(y=pe(e),v+=y*y),x===0&&(x=pe(e),v+=x*x),v<a&&(v=Math.sqrt(a*v)),n.vx+=y*p.value*r/v,n.vy+=x*p.value*r/v),!0;if(p.length||v>=u)return;(p.data!==n||p.next)&&(y===0&&(y=pe(e),v+=y*y),x===0&&(x=pe(e),v+=x*x),v<a&&(v=Math.sqrt(a*v)));do p.data!==n&&(_=o[p.data.index]*r/v,n.vx+=y*_,n.vy+=x*_);while(p=p.next)}return s.initialize=function(p,d){t=p,e=d,f()},s.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Pt(+p),f(),s):i},s.distanceMin=function(p){return arguments.length?(a=p*p,s):Math.sqrt(a)},s.distanceMax=function(p){return arguments.length?(u=p*p,s):Math.sqrt(u)},s.theta=function(p){return arguments.length?(c=p*p,s):Math.sqrt(c)},s}function e4(t,n,e){var r,i=Pt(.1),o,a;typeof t!="function"&&(t=Pt(+t)),n==null&&(n=0),e==null&&(e=0);function u(s){for(var f=0,h=r.length;f<h;++f){var l=r[f],p=l.x-n||1e-6,d=l.y-e||1e-6,g=Math.sqrt(p*p+d*d),m=(a[f]-g)*o[f]*s/g;l.vx+=p*m,l.vy+=d*m}}function c(){if(r){var s,f=r.length;for(o=new Array(f),a=new Array(f),s=0;s<f;++s)a[s]=+t(r[s],s,r),o[s]=isNaN(a[s])?0:+i(r[s],s,r)}}return u.initialize=function(s){r=s,c()},u.strength=function(s){return arguments.length?(i=typeof s=="function"?s:Pt(+s),c(),u):i},u.radius=function(s){return arguments.length?(t=typeof s=="function"?s:Pt(+s),c(),u):t},u.x=function(s){return arguments.length?(n=+s,u):n},u.y=function(s){return arguments.length?(e=+s,u):e},u}function ud(t){var n=Pt(.1),e,r,i;typeof t!="function"&&(t=Pt(t==null?0:+t));function o(u){for(var c=0,s=e.length,f;c<s;++c)f=e[c],f.vx+=(i[c]-f.x)*r[c]*u}function a(){if(e){var u,c=e.length;for(r=new Array(c),i=new Array(c),u=0;u<c;++u)r[u]=isNaN(i[u]=+t(e[u],u,e))?0:+n(e[u],u,e)}}return o.initialize=function(u){e=u,a()},o.strength=function(u){return arguments.length?(n=typeof u=="function"?u:Pt(+u),a(),o):n},o.x=function(u){return arguments.length?(t=typeof u=="function"?u:Pt(+u),a(),o):t},o}function sd(t){var n=Pt(.1),e,r,i;typeof t!="function"&&(t=Pt(t==null?0:+t));function o(u){for(var c=0,s=e.length,f;c<s;++c)f=e[c],f.vy+=(i[c]-f.y)*r[c]*u}function a(){if(e){var u,c=e.length;for(r=new Array(c),i=new Array(c),u=0;u<c;++u)r[u]=isNaN(i[u]=+t(e[u],u,e))?0:+n(e[u],u,e)}}return o.initialize=function(u){e=u,a()},o.strength=function(u){return arguments.length?(n=typeof u=="function"?u:Pt(+u),a(),o):n},o.y=function(u){return arguments.length?(t=typeof u=="function"?u:Pt(+u),a(),o):t},o}function r4(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function _a(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Mr(t){return t=_a(Math.abs(t)),t?t[1]:NaN}function i4(t,n){return function(e,r){for(var i=e.length,o=[],a=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(n)}}function o4(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}var a4=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $r(t){if(!(n=a4.exec(t)))throw new Error("invalid format: "+t);var n;return new wa({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}$r.prototype=wa.prototype;function wa(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+""}wa.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 u4(t){t:for(var n=t.length,e=1,r=-1,i;e<n;++e)switch(t[e]){case".":r=i=e;break;case"0":r===0&&(r=e),i=e;break;default:if(!+t[e])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var cd;function s4(t,n){var e=_a(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(cd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+_a(t,Math.max(0,n+o-1))[0]}function ld(t,n){var e=_a(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const fd={"%":(t,n)=>(t*100).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:r4,e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>ld(t*100,n),r:ld,s:s4,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function hd(t){return t}var pd=Array.prototype.map,dd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function gd(t){var n=t.grouping===void 0||t.thousands===void 0?hd:i4(pd.call(t.grouping,Number),t.thousands+""),e=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?hd:o4(pd.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function s(h){h=$r(h);var l=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,_=h.precision,v=h.trim,w=h.type;w==="n"?(x=!0,w="g"):fd[w]||(_===void 0&&(_=12),v=!0,w="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var b=g==="$"?e:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A=g==="$"?r:/[%p]/.test(w)?a:"",M=fd[w],$=/[defgprs%]/.test(w);_=_===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function D(S){var L=b,E=A,T,k,P;if(w==="c")E=M(S)+E,S="";else{S=+S;var N=S<0||1/S<0;if(S=isNaN(S)?c:M(Math.abs(S),_),v&&(S=u4(S)),N&&+S==0&&d!=="+"&&(N=!1),L=(N?d==="("?d:u:d==="-"||d==="("?"":d)+L,E=(w==="s"?dd[8+cd/3]:"")+E+(N&&d==="("?")":""),$){for(T=-1,k=S.length;++T<k;)if(P=S.charCodeAt(T),48>P||P>57){E=(P===46?i+S.slice(T+1):S.slice(T))+E,S=S.slice(0,T);break}}}x&&!m&&(S=n(S,1/0));var C=L.length+S.length+E.length,R=C<y?new Array(y-C+1).join(l):"";switch(x&&m&&(S=n(R+S,R.length?y-E.length:1/0),R=""),p){case"<":S=L+S+E+R;break;case"=":S=L+R+S+E;break;case"^":S=R.slice(0,C=R.length>>1)+L+S+E+R.slice(C);break;default:S=R+L+S+E;break}return o(S)}return D.toString=function(){return h+""},D}function f(h,l){var p=s((h=$r(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Mr(l)/3)))*3,g=Math.pow(10,-d),m=dd[8+d/3];return function(y){return p(g*y)+m}}return{format:s,formatPrefix:f}}var Aa,Si,Gc;md({thousands:",",grouping:[3],currency:["$",""]});function md(t){return Aa=gd(t),Si=Aa.format,Gc=Aa.formatPrefix,Aa}function yd(t){return Math.max(0,-Mr(Math.abs(t)))}function bd(t,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Mr(n)/3)))*3-Mr(Math.abs(t)))}function vd(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Mr(n)-Mr(t))+1}var X=1e-6,Ti=1e-12,et=Math.PI,_t=et/2,Ma=et/4,Wt=et*2,pt=180/et,V=et/180,ot=Math.abs,Sr=Math.atan,Xt=Math.atan2,q=Math.cos,$a=Math.ceil,xd=Math.exp,Uc=Math.hypot,Sa=Math.log,Yc=Math.pow,G=Math.sin,fn=Math.sign||function(t){return t>0?1:t<0?-1:0},Lt=Math.sqrt,Bc=Math.tan;function _d(t){return t>1?0:t<-1?et:Math.acos(t)}function Vt(t){return t>1?_t:t<-1?-_t:Math.asin(t)}function wd(t){return(t=G(t/2))*t}function vt(){}function Ta(t,n){t&&Md.hasOwnProperty(t.type)&&Md[t.type](t,n)}var Ad={Feature:function(t,n){Ta(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)Ta(e[r].geometry,n)}},Md={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){qc(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)qc(e[r],n,0)},Polygon:function(t,n){$d(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)$d(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)Ta(e[r],n)}};function qc(t,n,e){var r=-1,i=t.length-e,o;for(n.lineStart();++r<i;)o=t[r],n.point(o[0],o[1],o[2]);n.lineEnd()}function $d(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)qc(t[e],n,1);n.polygonEnd()}function _n(t,n){t&&Ad.hasOwnProperty(t.type)?Ad[t.type](t,n):Ta(t,n)}var Da=new Dt,Pa=new Dt,Sd,Td,Hc,Wc,Xc,Ln={point:vt,lineStart:vt,lineEnd:vt,polygonStart:function(){Da=new Dt,Ln.lineStart=c4,Ln.lineEnd=l4},polygonEnd:function(){var t=+Da;Pa.add(t<0?Wt+t:t),this.lineStart=this.lineEnd=this.point=vt},sphere:function(){Pa.add(Wt)}};function c4(){Ln.point=f4}function l4(){Dd(Sd,Td)}function f4(t,n){Ln.point=Dd,Sd=t,Td=n,t*=V,n*=V,Hc=t,Wc=q(n=n/2+Ma),Xc=G(n)}function Dd(t,n){t*=V,n*=V,n=n/2+Ma;var e=t-Hc,r=e>=0?1:-1,i=r*e,o=q(n),a=G(n),u=Xc*a,c=Wc*o+u*q(i),s=u*r*G(i);Da.add(Xt(s,c)),Hc=t,Wc=o,Xc=a}function h4(t){return Pa=new Dt,_n(t,Ln),Pa*2}function ka(t){return[Xt(t[1],t[0]),Vt(t[2])]}function Ye(t){var n=t[0],e=t[1],r=q(e);return[r*q(n),r*G(n),G(e)]}function Ea(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Tr(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Vc(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Na(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function La(t){var n=Lt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var xt,en,wt,un,Be,Pd,kd,Dr,Di,de,Xn,Vn={point:jc,lineStart:Nd,lineEnd:Ld,polygonStart:function(){Vn.point=Cd,Vn.lineStart=p4,Vn.lineEnd=d4,Di=new Dt,Ln.polygonStart()},polygonEnd:function(){Ln.polygonEnd(),Vn.point=jc,Vn.lineStart=Nd,Vn.lineEnd=Ld,Da<0?(xt=-(wt=180),en=-(un=90)):Di>X?un=90:Di<-X&&(en=-90),Xn[0]=xt,Xn[1]=wt},sphere:function(){xt=-(wt=180),en=-(un=90)}};function jc(t,n){de.push(Xn=[xt=t,wt=t]),n<en&&(en=n),n>un&&(un=n)}function Ed(t,n){var e=Ye([t*V,n*V]);if(Dr){var r=Tr(Dr,e),i=[r[1],-r[0],0],o=Tr(i,r);La(o),o=ka(o);var a=t-Be,u=a>0?1:-1,c=o[0]*pt*u,s,f=ot(a)>180;f^(u*Be<c&&c<u*t)?(s=o[1]*pt,s>un&&(un=s)):(c=(c+360)%360-180,f^(u*Be<c&&c<u*t)?(s=-o[1]*pt,s<en&&(en=s)):(n<en&&(en=n),n>un&&(un=n))),f?t<Be?sn(xt,t)>sn(xt,wt)&&(wt=t):sn(t,wt)>sn(xt,wt)&&(xt=t):wt>=xt?(t<xt&&(xt=t),t>wt&&(wt=t)):t>Be?sn(xt,t)>sn(xt,wt)&&(wt=t):sn(t,wt)>sn(xt,wt)&&(xt=t)}else de.push(Xn=[xt=t,wt=t]);n<en&&(en=n),n>un&&(un=n),Dr=e,Be=t}function Nd(){Vn.point=Ed}function Ld(){Xn[0]=xt,Xn[1]=wt,Vn.point=jc,Dr=null}function Cd(t,n){if(Dr){var e=t-Be;Di.add(ot(e)>180?e+(e>0?360:-360):e)}else Pd=t,kd=n;Ln.point(t,n),Ed(t,n)}function p4(){Ln.lineStart()}function d4(){Cd(Pd,kd),Ln.lineEnd(),ot(Di)>X&&(xt=-(wt=180)),Xn[0]=xt,Xn[1]=wt,Dr=null}function sn(t,n){return(n-=t)<0?n+360:n}function g4(t,n){return t[0]-n[0]}function Id(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}function m4(t){var n,e,r,i,o,a,u;if(un=wt=-(xt=en=1/0),de=[],_n(t,Vn),e=de.length){for(de.sort(g4),n=1,r=de[0],o=[r];n<e;++n)i=de[n],Id(r,i[0])||Id(r,i[1])?(sn(r[0],i[1])>sn(r[0],r[1])&&(r[1]=i[1]),sn(i[0],r[1])>sn(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=o.length-1,n=0,r=o[e];n<=e;r=i,++n)i=o[n],(u=sn(r[1],i[0]))>a&&(a=u,xt=i[0],wt=r[1])}return de=Xn=null,xt===1/0||en===1/0?[[NaN,NaN],[NaN,NaN]]:[[xt,en],[wt,un]]}var Pi,Ca,Ia,Ra,Fa,Oa,za,Ga,Zc,Kc,Qc,Rd,Fd,jt,Zt,Kt,wn={sphere:vt,point:Jc,lineStart:Od,lineEnd:zd,polygonStart:function(){wn.lineStart=v4,wn.lineEnd=x4},polygonEnd:function(){wn.lineStart=Od,wn.lineEnd=zd}};function Jc(t,n){t*=V,n*=V;var e=q(n);ki(e*q(t),e*G(t),G(n))}function ki(t,n,e){++Pi,Ia+=(t-Ia)/Pi,Ra+=(n-Ra)/Pi,Fa+=(e-Fa)/Pi}function Od(){wn.point=y4}function y4(t,n){t*=V,n*=V;var e=q(n);jt=e*q(t),Zt=e*G(t),Kt=G(n),wn.point=b4,ki(jt,Zt,Kt)}function b4(t,n){t*=V,n*=V;var e=q(n),r=e*q(t),i=e*G(t),o=G(n),a=Xt(Lt((a=Zt*o-Kt*i)*a+(a=Kt*r-jt*o)*a+(a=jt*i-Zt*r)*a),jt*r+Zt*i+Kt*o);Ca+=a,Oa+=a*(jt+(jt=r)),za+=a*(Zt+(Zt=i)),Ga+=a*(Kt+(Kt=o)),ki(jt,Zt,Kt)}function zd(){wn.point=Jc}function v4(){wn.point=_4}function x4(){Gd(Rd,Fd),wn.point=Jc}function _4(t,n){Rd=t,Fd=n,t*=V,n*=V,wn.point=Gd;var e=q(n);jt=e*q(t),Zt=e*G(t),Kt=G(n),ki(jt,Zt,Kt)}function Gd(t,n){t*=V,n*=V;var e=q(n),r=e*q(t),i=e*G(t),o=G(n),a=Zt*o-Kt*i,u=Kt*r-jt*o,c=jt*i-Zt*r,s=Uc(a,u,c),f=Vt(s),h=s&&-f/s;Zc.add(h*a),Kc.add(h*u),Qc.add(h*c),Ca+=f,Oa+=f*(jt+(jt=r)),za+=f*(Zt+(Zt=i)),Ga+=f*(Kt+(Kt=o)),ki(jt,Zt,Kt)}function w4(t){Pi=Ca=Ia=Ra=Fa=Oa=za=Ga=0,Zc=new Dt,Kc=new Dt,Qc=new Dt,_n(t,wn);var n=+Zc,e=+Kc,r=+Qc,i=Uc(n,e,r);return i<Ti&&(n=Oa,e=za,r=Ga,Ca<X&&(n=Ia,e=Ra,r=Fa),i=Uc(n,e,r),i<Ti)?[NaN,NaN]:[Xt(e,n)*pt,Vt(r/i)*pt]}function Pr(t){return function(){return t}}function tl(t,n){function e(r,i){return r=t(r,i),n(r[0],r[1])}return t.invert&&n.invert&&(e.invert=function(r,i){return r=n.invert(r,i),r&&t.invert(r[0],r[1])}),e}function nl(t,n){return ot(t)>et&&(t-=Math.round(t/Wt)*Wt),[t,n]}nl.invert=nl;function el(t,n,e){return(t%=Wt)?n||e?tl(Yd(t),Bd(n,e)):Yd(t):n||e?Bd(n,e):nl}function Ud(t){return function(n,e){return n+=t,ot(n)>et&&(n-=Math.round(n/Wt)*Wt),[n,e]}}function Yd(t){var n=Ud(t);return n.invert=Ud(-t),n}function Bd(t,n){var e=q(t),r=G(t),i=q(n),o=G(n);function a(u,c){var s=q(c),f=q(u)*s,h=G(u)*s,l=G(c),p=l*e+f*r;return[Xt(h*i-p*o,f*e-l*r),Vt(p*i+h*o)]}return a.invert=function(u,c){var s=q(c),f=q(u)*s,h=G(u)*s,l=G(c),p=l*i-h*o;return[Xt(h*i+l*o,f*e+p*r),Vt(p*e-f*r)]},a}function qd(t){t=el(t[0]*V,t[1]*V,t.length>2?t[2]*V:0);function n(e){return e=t(e[0]*V,e[1]*V),e[0]*=pt,e[1]*=pt,e}return n.invert=function(e){return e=t.invert(e[0]*V,e[1]*V),e[0]*=pt,e[1]*=pt,e},n}function Hd(t,n,e,r,i,o){if(e){var a=q(n),u=G(n),c=r*e;i==null?(i=n+r*Wt,o=n-c/2):(i=Wd(a,i),o=Wd(a,o),(r>0?i<o:i>o)&&(i+=r*Wt));for(var s,f=i;r>0?f>o:f<o;f-=c)s=ka([a,-u*q(f),-u*G(f)]),t.point(s[0],s[1])}}function Wd(t,n){n=Ye(n),n[0]-=t,La(n);var e=_d(-n[1]);return((-n[2]<0?-e:e)+Wt-X)%Wt}function A4(){var t=Pr([0,0]),n=Pr(90),e=Pr(2),r,i,o={point:a};function a(c,s){r.push(c=i(c,s)),c[0]*=pt,c[1]*=pt}function u(){var c=t.apply(this,arguments),s=n.apply(this,arguments)*V,f=e.apply(this,arguments)*V;return r=[],i=el(-c[0]*V,-c[1]*V,0).invert,Hd(o,s,f,1),c={type:"Polygon",coordinates:[r]},r=i=null,c}return u.center=function(c){return arguments.length?(t=typeof c=="function"?c:Pr([+c[0],+c[1]]),u):t},u.radius=function(c){return arguments.length?(n=typeof c=="function"?c:Pr(+c),u):n},u.precision=function(c){return arguments.length?(e=typeof c=="function"?c:Pr(+c),u):e},u}function Xd(){var t=[],n;return{point:function(e,r,i){n.push([e,r,i])},lineStart:function(){t.push(n=[])},lineEnd:vt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var e=t;return t=[],n=null,e}}}function Ua(t,n){return ot(t[0]-n[0])<X&&ot(t[1]-n[1])<X}function Ya(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Vd(t,n,e,r,i){var o=[],a=[],u,c;if(t.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],y=d[g],x;if(Ua(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),u=0;u<g;++u)i.point((m=d[u])[0],m[1]);i.lineEnd();return}y[0]+=2*X}o.push(x=new Ya(m,d,null,!0)),a.push(x.o=new Ya(m,null,x,!1)),o.push(x=new Ya(y,d,null,!1)),a.push(x.o=new Ya(y,null,x,!0))}}),!!o.length){for(a.sort(n),jd(o),jd(a),u=0,c=a.length;u<c;++u)a[u].e=e=!e;for(var s=o[0],f,h;;){for(var l=s,p=!0;l.v;)if((l=l.n)===s)return;f=l.z,i.lineStart();do{if(l.v=l.o.v=!0,l.e){if(p)for(u=0,c=f.length;u<c;++u)i.point((h=f[u])[0],h[1]);else r(l.x,l.n.x,1,i);l=l.n}else{if(p)for(f=l.p.z,u=f.length-1;u>=0;--u)i.point((h=f[u])[0],h[1]);else r(l.x,l.p.x,-1,i);l=l.p}l=l.o,f=l.z,p=!p}while(!l.v);i.lineEnd()}}}function jd(t){if(n=t.length){for(var n,e=0,r=t[0],i;++e<n;)r.n=i=t[e],i.p=r,r=i;r.n=i=t[0],i.p=r}}function rl(t){return ot(t[0])<=et?t[0]:fn(t[0])*((ot(t[0])+et)%Wt-et)}function Zd(t,n){var e=rl(n),r=n[1],i=G(r),o=[G(e),-q(e),0],a=0,u=0,c=new Dt;i===1?r=_t+X:i===-1&&(r=-_t-X);for(var s=0,f=t.length;s<f;++s)if(l=(h=t[s]).length)for(var h,l,p=h[l-1],d=rl(p),g=p[1]/2+Ma,m=G(g),y=q(g),x=0;x<l;++x,d=v,m=b,y=A,p=_){var _=h[x],v=rl(_),w=_[1]/2+Ma,b=G(w),A=q(w),M=v-d,$=M>=0?1:-1,D=$*M,S=D>et,L=m*b;if(c.add(Xt(L*$*G(D),y*A+L*q(D))),a+=S?M+$*Wt:M,S^d>=e^v>=e){var E=Tr(Ye(p),Ye(_));La(E);var T=Tr(o,E);La(T);var k=(S^M>=0?-1:1)*Vt(T[2]);(r>k||r===k&&(E[0]||E[1]))&&(u+=S^M>=0?1:-1)}}return(a<-X||a<X&&c<-Ti)^u&1}function Kd(t,n,e,r){return function(i){var o=n(i),a=Xd(),u=n(a),c=!1,s,f,h,l={point:p,lineStart:g,lineEnd:m,polygonStart:function(){l.point=y,l.lineStart=x,l.lineEnd=_,f=[],s=[]},polygonEnd:function(){l.point=p,l.lineStart=g,l.lineEnd=m,f=Ls(f);var v=Zd(s,r);f.length?(c||(i.polygonStart(),c=!0),Vd(f,$4,v,e,i)):v&&(c||(i.polygonStart(),c=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),c&&(i.polygonEnd(),c=!1),f=s=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(v,w){t(v,w)&&i.point(v,w)}function d(v,w){o.point(v,w)}function g(){l.point=d,o.lineStart()}function m(){l.point=p,o.lineEnd()}function y(v,w){h.push([v,w]),u.point(v,w)}function x(){u.lineStart(),h=[]}function _(){y(h[0][0],h[0][1]),u.lineEnd();var v=u.clean(),w=a.result(),b,A=w.length,M,$,D;if(h.pop(),s.push(h),h=null,!!A){if(v&1){if($=w[0],(M=$.length-1)>0){for(c||(i.polygonStart(),c=!0),i.lineStart(),b=0;b<M;++b)i.point((D=$[b])[0],D[1]);i.lineEnd()}return}A>1&&v&2&&w.push(w.pop().concat(w.shift())),f.push(w.filter(M4))}}return l}}function M4(t){return t.length>1}function $4(t,n){return((t=t.x)[0]<0?t[1]-_t-X:_t-t[1])-((n=n.x)[0]<0?n[1]-_t-X:_t-n[1])}const il=Kd(function(){return!0},S4,D4,[-et,-_t]);function S4(t){var n=NaN,e=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var u=o>0?et:-et,c=ot(o-n);ot(c-et)<X?(t.point(n,e=(e+a)/2>0?_t:-_t),t.point(r,e),t.lineEnd(),t.lineStart(),t.point(u,e),t.point(o,e),i=0):r!==u&&c>=et&&(ot(n-r)<X&&(n-=r*X),ot(o-u)<X&&(o-=u*X),e=T4(n,e,o,a),t.point(r,e),t.lineEnd(),t.lineStart(),t.point(u,e),i=0),t.point(n=o,e=a),r=u},lineEnd:function(){t.lineEnd(),n=e=NaN},clean:function(){return 2-i}}}function T4(t,n,e,r){var i,o,a=G(t-e);return ot(a)>X?Sr((G(n)*(o=q(r))*G(e)-G(r)*(i=q(n))*G(t))/(i*o*a)):(n+r)/2}function D4(t,n,e,r){var i;if(t==null)i=e*_t,r.point(-et,i),r.point(0,i),r.point(et,i),r.point(et,0),r.point(et,-i),r.point(0,-i),r.point(-et,-i),r.point(-et,0),r.point(-et,i);else if(ot(t[0]-n[0])>X){var o=t[0]<n[0]?et:-et;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(n[0],n[1])}function Qd(t){var n=q(t),e=2*V,r=n>0,i=ot(n)>X;function o(f,h,l,p){Hd(p,t,e,l,f,h)}function a(f,h){return q(f)*q(h)>n}function u(f){var h,l,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,y){var x=[m,y],_,v=a(m,y),w=r?v?0:s(m,y):v?s(m+(m<0?et:-et),y):0;if(!h&&(d=p=v)&&f.lineStart(),v!==p&&(_=c(h,x),(!_||Ua(h,_)||Ua(x,_))&&(x[2]=1)),v!==p)g=0,v?(f.lineStart(),_=c(x,h),f.point(_[0],_[1])):(_=c(h,x),f.point(_[0],_[1],2),f.lineEnd()),h=_;else if(i&&h&&r^v){var b;!(w&l)&&(b=c(x,h,!0))&&(g=0,r?(f.lineStart(),f.point(b[0][0],b[0][1]),f.point(b[1][0],b[1][1]),f.lineEnd()):(f.point(b[1][0],b[1][1]),f.lineEnd(),f.lineStart(),f.point(b[0][0],b[0][1],3)))}v&&(!h||!Ua(h,x))&&f.point(x[0],x[1]),h=x,p=v,l=w},lineEnd:function(){p&&f.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function c(f,h,l){var p=Ye(f),d=Ye(h),g=[1,0,0],m=Tr(p,d),y=Ea(m,m),x=m[0],_=y-x*x;if(!_)return!l&&f;var v=n*y/_,w=-n*x/_,b=Tr(g,m),A=Na(g,v),M=Na(m,w);Vc(A,M);var $=b,D=Ea(A,$),S=Ea($,$),L=D*D-S*(Ea(A,A)-1);if(!(L<0)){var E=Lt(L),T=Na($,(-D-E)/S);if(Vc(T,A),T=ka(T),!l)return T;var k=f[0],P=h[0],N=f[1],C=h[1],R;P<k&&(R=k,k=P,P=R);var O=P-k,U=ot(O-et)<X,W=U||O<X;if(!U&&C<N&&(R=N,N=C,C=R),W?U?N+C>0^T[1]<(ot(T[0]-k)<X?N:C):N<=T[1]&&T[1]<=C:O>et^(k<=T[0]&&T[0]<=P)){var lt=Na($,(-D+E)/S);return Vc(lt,A),[T,ka(lt)]}}}function s(f,h){var l=r?t:et-t,p=0;return f<-l?p|=1:f>l&&(p|=2),h<-l?p|=4:h>l&&(p|=8),p}return Kd(a,u,o,r?[0,-t]:[-et,t-et])}function P4(t,n,e,r,i,o){var a=t[0],u=t[1],c=n[0],s=n[1],f=0,h=1,l=c-a,p=s-u,d;if(d=e-a,!(!l&&d>0)){if(d/=l,l<0){if(d<f)return;d<h&&(h=d)}else if(l>0){if(d>h)return;d>f&&(f=d)}if(d=i-a,!(!l&&d<0)){if(d/=l,l<0){if(d>h)return;d>f&&(f=d)}else if(l>0){if(d<f)return;d<h&&(h=d)}if(d=r-u,!(!p&&d>0)){if(d/=p,p<0){if(d<f)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>f&&(f=d)}if(d=o-u,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>f&&(f=d)}else if(p>0){if(d<f)return;d<h&&(h=d)}return f>0&&(t[0]=a+f*l,t[1]=u+f*p),h<1&&(n[0]=a+h*l,n[1]=u+h*p),!0}}}}}var Ei=1e9,Ba=-Ei;function qa(t,n,e,r){function i(s,f){return t<=s&&s<=e&&n<=f&&f<=r}function o(s,f,h,l){var p=0,d=0;if(s==null||(p=a(s,h))!==(d=a(f,h))||c(s,f)<0^h>0)do l.point(p===0||p===3?t:e,p>1?r:n);while((p=(p+h+4)%4)!==d);else l.point(f[0],f[1])}function a(s,f){return ot(s[0]-t)<X?f>0?0:3:ot(s[0]-e)<X?f>0?2:1:ot(s[1]-n)<X?f>0?1:0:f>0?3:2}function u(s,f){return c(s.x,f.x)}function c(s,f){var h=a(s,1),l=a(f,1);return h!==l?h-l:h===0?f[1]-s[1]:h===1?s[0]-f[0]:h===2?s[1]-f[1]:f[0]-s[0]}return function(s){var f=s,h=Xd(),l,p,d,g,m,y,x,_,v,w,b,A={point:M,lineStart:L,lineEnd:E,polygonStart:D,polygonEnd:S};function M(k,P){i(k,P)&&f.point(k,P)}function $(){for(var k=0,P=0,N=p.length;P<N;++P)for(var C=p[P],R=1,O=C.length,U=C[0],W,lt,ut=U[0],at=U[1];R<O;++R)W=ut,lt=at,U=C[R],ut=U[0],at=U[1],lt<=r?at>r&&(ut-W)*(r-lt)>(at-lt)*(t-W)&&++k:at<=r&&(ut-W)*(r-lt)<(at-lt)*(t-W)&&--k;return k}function D(){f=h,l=[],p=[],b=!0}function S(){var k=$(),P=b&&k,N=(l=Ls(l)).length;(P||N)&&(s.polygonStart(),P&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),N&&Vd(l,u,k,o,s),s.polygonEnd()),f=s,l=p=d=null}function L(){A.point=T,p&&p.push(d=[]),w=!0,v=!1,x=_=NaN}function E(){l&&(T(g,m),y&&v&&h.rejoin(),l.push(h.result())),A.point=M,v&&f.lineEnd()}function T(k,P){var N=i(k,P);if(p&&d.push([k,P]),w)g=k,m=P,y=N,w=!1,N&&(f.lineStart(),f.point(k,P));else if(N&&v)f.point(k,P);else{var C=[x=Math.max(Ba,Math.min(Ei,x)),_=Math.max(Ba,Math.min(Ei,_))],R=[k=Math.max(Ba,Math.min(Ei,k)),P=Math.max(Ba,Math.min(Ei,P))];P4(C,R,t,n,e,r)?(v||(f.lineStart(),f.point(C[0],C[1])),f.point(R[0],R[1]),N||f.lineEnd(),b=!1):N&&(f.lineStart(),f.point(k,P),b=!1)}x=k,_=P,v=N}return A}}function k4(){var t=0,n=0,e=960,r=500,i,o,a;return a={stream:function(u){return i&&o===u?i:i=qa(t,n,e,r)(o=u)},extent:function(u){return arguments.length?(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1],i=o=null,a):[[t,n],[e,r]]}}}var ol,al,Ha,Wa,kr={sphere:vt,point:vt,lineStart:E4,lineEnd:vt,polygonStart:vt,polygonEnd:vt};function E4(){kr.point=L4,kr.lineEnd=N4}function N4(){kr.point=kr.lineEnd=vt}function L4(t,n){t*=V,n*=V,al=t,Ha=G(n),Wa=q(n),kr.point=C4}function C4(t,n){t*=V,n*=V;var e=G(n),r=q(n),i=ot(t-al),o=q(i),a=G(i),u=r*a,c=Wa*e-Ha*r*o,s=Ha*e+Wa*r*o;ol.add(Xt(Lt(u*u+c*c),s)),al=t,Ha=e,Wa=r}function Jd(t){return ol=new Dt,_n(t,kr),+ol}var ul=[null,null],I4={type:"LineString",coordinates:ul};function Xa(t,n){return ul[0]=t,ul[1]=n,Jd(I4)}var tg={Feature:function(t,n){return Va(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)if(Va(e[r].geometry,n))return!0;return!1}},ng={Sphere:function(){return!0},Point:function(t,n){return eg(t.coordinates,n)},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(eg(e[r],n))return!0;return!1},LineString:function(t,n){return rg(t.coordinates,n)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(rg(e[r],n))return!0;return!1},Polygon:function(t,n){return ig(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(ig(e[r],n))return!0;return!1},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)if(Va(e[r],n))return!0;return!1}};function Va(t,n){return t&&ng.hasOwnProperty(t.type)?ng[t.type](t,n):!1}function eg(t,n){return Xa(t,n)===0}function rg(t,n){for(var e,r,i,o=0,a=t.length;o<a;o++){if(r=Xa(t[o],n),r===0||o>0&&(i=Xa(t[o],t[o-1]),i>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))<Ti*i))return!0;e=r}return!1}function ig(t,n){return!!Zd(t.map(R4),og(n))}function R4(t){return t=t.map(og),t.pop(),t}function og(t){return[t[0]*V,t[1]*V]}function F4(t,n){return(t&&tg.hasOwnProperty(t.type)?tg[t.type]:Va)(t,n)}function ag(t,n,e){var r=ue(t,n-X,e).concat(n);return function(i){return r.map(function(o){return[i,o]})}}function ug(t,n,e){var r=ue(t,n-X,e).concat(n);return function(i){return r.map(function(o){return[o,i]})}}function sg(){var t,n,e,r,i,o,a,u,c=10,s=c,f=90,h=360,l,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return ue($a(r/f)*f,e,f).map(d).concat(ue($a(u/h)*h,a,h).map(g)).concat(ue($a(n/c)*c,t,c).filter(function(_){return ot(_%f)>X}).map(l)).concat(ue($a(o/s)*s,i,s).filter(function(_){return ot(_%h)>X}).map(p))}return y.lines=function(){return x().map(function(_){return{type:"LineString",coordinates:_}})},y.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(g(a).slice(1),d(e).reverse().slice(1),g(u).reverse().slice(1))]}},y.extent=function(_){return arguments.length?y.extentMajor(_).extentMinor(_):y.extentMinor()},y.extentMajor=function(_){return arguments.length?(r=+_[0][0],e=+_[1][0],u=+_[0][1],a=+_[1][1],r>e&&(_=r,r=e,e=_),u>a&&(_=u,u=a,a=_),y.precision(m)):[[r,u],[e,a]]},y.extentMinor=function(_){return arguments.length?(n=+_[0][0],t=+_[1][0],o=+_[0][1],i=+_[1][1],n>t&&(_=n,n=t,t=_),o>i&&(_=o,o=i,i=_),y.precision(m)):[[n,o],[t,i]]},y.step=function(_){return arguments.length?y.stepMajor(_).stepMinor(_):y.stepMinor()},y.stepMajor=function(_){return arguments.length?(f=+_[0],h=+_[1],y):[f,h]},y.stepMinor=function(_){return arguments.length?(c=+_[0],s=+_[1],y):[c,s]},y.precision=function(_){return arguments.length?(m=+_,l=ag(o,i,90),p=ug(n,t,m),d=ag(u,a,90),g=ug(r,e,m),y):m},y.extentMajor([[-180,-90+X],[180,90-X]]).extentMinor([[-180,-80-X],[180,80+X]])}function O4(){return sg()()}function z4(t,n){var e=t[0]*V,r=t[1]*V,i=n[0]*V,o=n[1]*V,a=q(r),u=G(r),c=q(o),s=G(o),f=a*q(e),h=a*G(e),l=c*q(i),p=c*G(i),d=2*Vt(Lt(wd(o-r)+a*c*wd(i-e))),g=G(d),m=d?function(y){var x=G(y*=d)/g,_=G(d-y)/g,v=_*f+x*l,w=_*h+x*p,b=_*u+x*s;return[Xt(w,v)*pt,Xt(b,Lt(v*v+w*w))*pt]}:function(){return[e*pt,r*pt]};return m.distance=d,m}const Ni=t=>t;var sl=new Dt,cl=new Dt,cg,lg,ll,fl,jn={point:vt,lineStart:vt,lineEnd:vt,polygonStart:function(){jn.lineStart=G4,jn.lineEnd=Y4},polygonEnd:function(){jn.lineStart=jn.lineEnd=jn.point=vt,sl.add(ot(cl)),cl=new Dt},result:function(){var t=sl/2;return sl=new Dt,t}};function G4(){jn.point=U4}function U4(t,n){jn.point=fg,cg=ll=t,lg=fl=n}function fg(t,n){cl.add(fl*t-ll*n),ll=t,fl=n}function Y4(){fg(cg,lg)}var Er=1/0,ja=Er,Li=-Er,Za=Li,Ka={point:B4,lineStart:vt,lineEnd:vt,polygonStart:vt,polygonEnd:vt,result:function(){var t=[[Er,ja],[Li,Za]];return Li=Za=-(ja=Er=1/0),t}};function B4(t,n){t<Er&&(Er=t),t>Li&&(Li=t),n<ja&&(ja=n),n>Za&&(Za=n)}var hl=0,pl=0,Ci=0,Qa=0,Ja=0,Nr=0,dl=0,gl=0,Ii=0,hg,pg,Cn,In,hn={point:qe,lineStart:dg,lineEnd:gg,polygonStart:function(){hn.lineStart=W4,hn.lineEnd=X4},polygonEnd:function(){hn.point=qe,hn.lineStart=dg,hn.lineEnd=gg},result:function(){var t=Ii?[dl/Ii,gl/Ii]:Nr?[Qa/Nr,Ja/Nr]:Ci?[hl/Ci,pl/Ci]:[NaN,NaN];return hl=pl=Ci=Qa=Ja=Nr=dl=gl=Ii=0,t}};function qe(t,n){hl+=t,pl+=n,++Ci}function dg(){hn.point=q4}function q4(t,n){hn.point=H4,qe(Cn=t,In=n)}function H4(t,n){var e=t-Cn,r=n-In,i=Lt(e*e+r*r);Qa+=i*(Cn+t)/2,Ja+=i*(In+n)/2,Nr+=i,qe(Cn=t,In=n)}function gg(){hn.point=qe}function W4(){hn.point=V4}function X4(){mg(hg,pg)}function V4(t,n){hn.point=mg,qe(hg=Cn=t,pg=In=n)}function mg(t,n){var e=t-Cn,r=n-In,i=Lt(e*e+r*r);Qa+=i*(Cn+t)/2,Ja+=i*(In+n)/2,Nr+=i,i=In*t-Cn*n,dl+=i*(Cn+t),gl+=i*(In+n),Ii+=i*3,qe(Cn=t,In=n)}function yg(t){this._context=t}yg.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:{this._context.moveTo(t,n),this._point=1;break}case 1:{this._context.lineTo(t,n);break}default:{this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,Wt);break}}},result:vt};var ml=new Dt,yl,bg,vg,Ri,Fi,Oi={point:vt,lineStart:function(){Oi.point=j4},lineEnd:function(){yl&&xg(bg,vg),Oi.point=vt},polygonStart:function(){yl=!0},polygonEnd:function(){yl=null},result:function(){var t=+ml;return ml=new Dt,t}};function j4(t,n){Oi.point=xg,bg=Ri=t,vg=Fi=n}function xg(t,n){Ri-=t,Fi-=n,ml.add(Lt(Ri*Ri+Fi*Fi)),Ri=t,Fi=n}let _g,tu,wg,Ag;class Mg{constructor(n){this._append=n==null?$g:Z4(n),this._radius=4.5,this._=""}pointRadius(n){return this._radius=+n,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(n,e){switch(this._point){case 0:{this._append`M${n},${e}`,this._point=1;break}case 1:{this._append`L${n},${e}`;break}default:{if(this._append`M${n},${e}`,this._radius!==wg||this._append!==tu){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,wg=r,tu=this._append,Ag=this._,this._=i}this._+=Ag;break}}}result(){const n=this._;return this._="",n.length?n:null}}function $g(t){let n=1;this._+=t[0];for(const e=t.length;n<e;++n)this._+=arguments[n]+t[n]}function Z4(t){const n=Math.floor(t);if(!(n>=0))throw new RangeError(`invalid digits: ${t}`);if(n>15)return $g;if(n!==_g){const e=10**n;_g=n,tu=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*e)/e+i[o]}}return tu}function K4(t,n){let e=3,r=4.5,i,o;function a(u){return u&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),_n(u,i(o))),o.result()}return a.area=function(u){return _n(u,i(jn)),jn.result()},a.measure=function(u){return _n(u,i(Oi)),Oi.result()},a.bounds=function(u){return _n(u,i(Ka)),Ka.result()},a.centroid=function(u){return _n(u,i(hn)),hn.result()},a.projection=function(u){return arguments.length?(i=u==null?(t=null,Ni):(t=u).stream,a):t},a.context=function(u){return arguments.length?(o=u==null?(n=null,new Mg(e)):new yg(n=u),typeof r!="function"&&o.pointRadius(r),a):n},a.pointRadius=function(u){return arguments.length?(r=typeof u=="function"?u:(o.pointRadius(+u),+u),a):r},a.digits=function(u){if(!arguments.length)return e;if(u==null)e=null;else{const c=Math.floor(u);if(!(c>=0))throw new RangeError(`invalid digits: ${u}`);e=c}return n===null&&(o=new Mg(e)),a},a.projection(t).digits(e).context(n)}function Q4(t){return{stream:zi(t)}}function zi(t){return function(n){var e=new bl;for(var r in t)e[r]=t[r];return e.stream=n,e}}function bl(){}bl.prototype={constructor:bl,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function vl(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),_n(e,t.stream(Ka)),n(Ka.result()),r!=null&&t.clipExtent(r),t}function nu(t,n,e){return vl(t,function(r){var i=n[1][0]-n[0][0],o=n[1][1]-n[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),u=+n[0][0]+(i-a*(r[1][0]+r[0][0]))/2,c=+n[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([u,c])},e)}function xl(t,n,e){return nu(t,[[0,0],n],e)}function _l(t,n,e){return vl(t,function(r){var i=+n,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,u=-o*r[0][1];t.scale(150*o).translate([a,u])},e)}function wl(t,n,e){return vl(t,function(r){var i=+n,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],u=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,u])},e)}var Sg=16,J4=q(30*V);function Tg(t,n){return+n?n7(t,n):t7(t)}function t7(t){return zi({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}function n7(t,n){function e(r,i,o,a,u,c,s,f,h,l,p,d,g,m){var y=s-r,x=f-i,_=y*y+x*x;if(_>4*n&&g--){var v=a+l,w=u+p,b=c+d,A=Lt(v*v+w*w+b*b),M=Vt(b/=A),$=ot(ot(b)-1)<X||ot(o-h)<X?(o+h)/2:Xt(w,v),D=t($,M),S=D[0],L=D[1],E=S-r,T=L-i,k=x*E-y*T;(k*k/_>n||ot((y*E+x*T)/_-.5)>.3||a*l+u*p+c*d<J4)&&(e(r,i,o,a,u,c,S,L,$,v/=A,w/=A,b,g,m),m.point(S,L),e(S,L,$,v,w,b,s,f,h,l,p,d,g,m))}}return function(r){var i,o,a,u,c,s,f,h,l,p,d,g,m={point:y,lineStart:x,lineEnd:v,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function y(M,$){M=t(M,$),r.point(M[0],M[1])}function x(){h=NaN,m.point=_,r.lineStart()}function _(M,$){var D=Ye([M,$]),S=t(M,$);e(h,l,f,p,d,g,h=S[0],l=S[1],f=M,p=D[0],d=D[1],g=D[2],Sg,r),r.point(h,l)}function v(){m.point=y,r.lineEnd()}function w(){x(),m.point=b,m.lineEnd=A}function b(M,$){_(i=M,$),o=h,a=l,u=p,c=d,s=g,m.point=_}function A(){e(h,l,f,p,d,g,o,a,i,u,c,s,Sg,r),m.lineEnd=v,v()}return m}}var e7=zi({point:function(t,n){this.stream.point(t*V,n*V)}});function r7(t){return zi({point:function(n,e){var r=t(n,e);return this.stream.point(r[0],r[1])}})}function i7(t,n,e,r,i){function o(a,u){return a*=r,u*=i,[n+t*a,e-t*u]}return o.invert=function(a,u){return[(a-n)/t*r,(e-u)/t*i]},o}function Dg(t,n,e,r,i,o){if(!o)return i7(t,n,e,r,i);var a=q(o),u=G(o),c=a*t,s=u*t,f=a/t,h=u/t,l=(u*e-a*n)/t,p=(u*n+a*e)/t;function d(g,m){return g*=r,m*=i,[c*g-s*m+n,e-s*g-c*m]}return d.invert=function(g,m){return[r*(f*g-h*m+l),i*(p-h*g-f*m)]},d}function Rn(t){return Al(function(){return t})()}function Al(t){var n,e=150,r=480,i=250,o=0,a=0,u=0,c=0,s=0,f,h=0,l=1,p=1,d=null,g=il,m=null,y,x,_,v=Ni,w=.5,b,A,M,$,D;function S(k){return M(k[0]*V,k[1]*V)}function L(k){return k=M.invert(k[0],k[1]),k&&[k[0]*pt,k[1]*pt]}S.stream=function(k){return $&&D===k?$:$=e7(r7(f)(g(b(v(D=k)))))},S.preclip=function(k){return arguments.length?(g=k,d=void 0,T()):g},S.postclip=function(k){return arguments.length?(v=k,m=y=x=_=null,T()):v},S.clipAngle=function(k){return arguments.length?(g=+k?Qd(d=k*V):(d=null,il),T()):d*pt},S.clipExtent=function(k){return arguments.length?(v=k==null?(m=y=x=_=null,Ni):qa(m=+k[0][0],y=+k[0][1],x=+k[1][0],_=+k[1][1]),T()):m==null?null:[[m,y],[x,_]]},S.scale=function(k){return arguments.length?(e=+k,E()):e},S.translate=function(k){return arguments.length?(r=+k[0],i=+k[1],E()):[r,i]},S.center=function(k){return arguments.length?(o=k[0]%360*V,a=k[1]%360*V,E()):[o*pt,a*pt]},S.rotate=function(k){return arguments.length?(u=k[0]%360*V,c=k[1]%360*V,s=k.length>2?k[2]%360*V:0,E()):[u*pt,c*pt,s*pt]},S.angle=function(k){return arguments.length?(h=k%360*V,E()):h*pt},S.reflectX=function(k){return arguments.length?(l=k?-1:1,E()):l<0},S.reflectY=function(k){return arguments.length?(p=k?-1:1,E()):p<0},S.precision=function(k){return arguments.length?(b=Tg(A,w=k*k),T()):Lt(w)},S.fitExtent=function(k,P){return nu(S,k,P)},S.fitSize=function(k,P){return xl(S,k,P)},S.fitWidth=function(k,P){return _l(S,k,P)},S.fitHeight=function(k,P){return wl(S,k,P)};function E(){var k=Dg(e,0,0,l,p,h).apply(null,n(o,a)),P=Dg(e,r-k[0],i-k[1],l,p,h);return f=el(u,c,s),A=tl(n,P),M=tl(f,A),b=Tg(A,w),T()}function T(){return $=D=null,S}return function(){return n=t.apply(this,arguments),S.invert=n.invert&&L,E()}}function Ml(t){var n=0,e=et/3,r=Al(t),i=r(n,e);return i.parallels=function(o){return arguments.length?r(n=o[0]*V,e=o[1]*V):[n*pt,e*pt]},i}function o7(t){var n=q(t);function e(r,i){return[r*n,G(i)/n]}return e.invert=function(r,i){return[r/n,Vt(i*n)]},e}function Pg(t,n){var e=G(t),r=(e+G(n))/2;if(ot(r)<X)return o7(t);var i=1+e*(2*r-e),o=Lt(i)/r;function a(u,c){var s=Lt(i-2*r*G(c))/r;return[s*G(u*=r),o-s*q(u)]}return a.invert=function(u,c){var s=o-c,f=Xt(u,ot(s))*fn(s);return s*r<0&&(f-=et*fn(u)*fn(s)),[f/r,Vt((i-(u*u+s*s)*r*r)/(2*r))]},a}function eu(){return Ml(Pg).scale(155.424).center([0,33.6442])}function kg(){return eu().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function a7(t){var n=t.length;return{point:function(e,r){for(var i=-1;++i<n;)t[i].point(e,r)},sphere:function(){for(var e=-1;++e<n;)t[e].sphere()},lineStart:function(){for(var e=-1;++e<n;)t[e].lineStart()},lineEnd:function(){for(var e=-1;++e<n;)t[e].lineEnd()},polygonStart:function(){for(var e=-1;++e<n;)t[e].polygonStart()},polygonEnd:function(){for(var e=-1;++e<n;)t[e].polygonEnd()}}}function u7(){var t,n,e=kg(),r,i=eu().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=eu().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u,c,s={point:function(l,p){c=[l,p]}};function f(l){var p=l[0],d=l[1];return c=null,r.point(p,d),c||(o.point(p,d),c)||(u.point(p,d),c)}f.invert=function(l){var p=e.scale(),d=e.translate(),g=(l[0]-d[0])/p,m=(l[1]-d[1])/p;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:e).invert(l)},f.stream=function(l){return t&&n===l?t:t=a7([e.stream(n=l),i.stream(l),a.stream(l)])},f.precision=function(l){return arguments.length?(e.precision(l),i.precision(l),a.precision(l),h()):e.precision()},f.scale=function(l){return arguments.length?(e.scale(l),i.scale(l*.35),a.scale(l),f.translate(e.translate())):e.scale()},f.translate=function(l){if(!arguments.length)return e.translate();var p=e.scale(),d=+l[0],g=+l[1];return r=e.translate(l).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(s),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+X,g+.12*p+X],[d-.214*p-X,g+.234*p-X]]).stream(s),u=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+X,g+.166*p+X],[d-.115*p-X,g+.234*p-X]]).stream(s),h()},f.fitExtent=function(l,p){return nu(f,l,p)},f.fitSize=function(l,p){return xl(f,l,p)},f.fitWidth=function(l,p){return _l(f,l,p)},f.fitHeight=function(l,p){return wl(f,l,p)};function h(){return t=n=null,f}return f.scale(1070)}function Eg(t){return function(n,e){var r=q(n),i=q(e),o=t(r*i);return o===1/0?[2,0]:[o*i*G(n),o*G(e)]}}function Gi(t){return function(n,e){var r=Lt(n*n+e*e),i=t(r),o=G(i),a=q(i);return[Xt(n*o,r*a),Vt(r&&e*o/r)]}}var $l=Eg(function(t){return Lt(2/(1+t))});$l.invert=Gi(function(t){return 2*Vt(t/2)});function s7(){return Rn($l).scale(124.75).clipAngle(180-.001)}var Sl=Eg(function(t){return(t=_d(t))&&t/G(t)});Sl.invert=Gi(function(t){return t});function c7(){return Rn(Sl).scale(79.4188).clipAngle(180-.001)}function Ui(t,n){return[t,Sa(Bc((_t+n)/2))]}Ui.invert=function(t,n){return[t,2*Sr(xd(n))-_t]};function l7(){return Ng(Ui).scale(961/Wt)}function Ng(t){var n=Rn(t),e=n.center,r=n.scale,i=n.translate,o=n.clipExtent,a=null,u,c,s;n.scale=function(h){return arguments.length?(r(h),f()):r()},n.translate=function(h){return arguments.length?(i(h),f()):i()},n.center=function(h){return arguments.length?(e(h),f()):e()},n.clipExtent=function(h){return arguments.length?(h==null?a=u=c=s=null:(a=+h[0][0],u=+h[0][1],c=+h[1][0],s=+h[1][1]),f()):a==null?null:[[a,u],[c,s]]};function f(){var h=et*r(),l=n(qd(n.rotate()).invert([0,0]));return o(a==null?[[l[0]-h,l[1]-h],[l[0]+h,l[1]+h]]:t===Ui?[[Math.max(l[0]-h,a),u],[Math.min(l[0]+h,c),s]]:[[a,Math.max(l[1]-h,u)],[c,Math.min(l[1]+h,s)]])}return f()}function ru(t){return Bc((_t+t)/2)}function Lg(t,n){var e=q(t),r=t===n?G(t):Sa(e/q(n))/Sa(ru(n)/ru(t)),i=e*Yc(ru(t),r)/r;if(!r)return Ui;function o(a,u){i>0?u<-_t+X&&(u=-_t+X):u>_t-X&&(u=_t-X);var c=i/Yc(ru(u),r);return[c*G(r*a),i-c*q(r*a)]}return o.invert=function(a,u){var c=i-u,s=fn(r)*Lt(a*a+c*c),f=Xt(a,ot(c))*fn(c);return c*r<0&&(f-=et*fn(a)*fn(c)),[f/r,2*Sr(Yc(i/s,1/r))-_t]},o}function f7(){return Ml(Lg).scale(109.5).parallels([30,30])}function Yi(t,n){return[t,n]}Yi.invert=Yi;function h7(){return Rn(Yi).scale(152.63)}function Cg(t,n){var e=q(t),r=t===n?G(t):(e-q(n))/(n-t),i=e/r+t;if(ot(r)<X)return Yi;function o(a,u){var c=i-u,s=r*a;return[c*G(s),i-c*q(s)]}return o.invert=function(a,u){var c=i-u,s=Xt(a,ot(c))*fn(c);return c*r<0&&(s-=et*fn(a)*fn(c)),[s/r,i-fn(r)*Lt(a*a+c*c)]},o}function p7(){return Ml(Cg).scale(131.154).center([0,13.9389])}var Bi=1.340264,qi=-.081106,Hi=893e-6,Wi=.003796,iu=Lt(3)/2,d7=12;function Tl(t,n){var e=Vt(iu*G(n)),r=e*e,i=r*r*r;return[t*q(e)/(iu*(Bi+3*qi*r+i*(7*Hi+9*Wi*r))),e*(Bi+qi*r+i*(Hi+Wi*r))]}Tl.invert=function(t,n){for(var e=n,r=e*e,i=r*r*r,o=0,a,u,c;o<d7&&(u=e*(Bi+qi*r+i*(Hi+Wi*r))-n,c=Bi+3*qi*r+i*(7*Hi+9*Wi*r),e-=a=u/c,r=e*e,i=r*r*r,!(ot(a)<Ti));++o);return[iu*t*(Bi+3*qi*r+i*(7*Hi+9*Wi*r))/q(e),Vt(G(e)/iu)]};function g7(){return Rn(Tl).scale(177.158)}function Dl(t,n){var e=q(n),r=q(t)*e;return[e*G(t)/r,G(n)/r]}Dl.invert=Gi(Sr);function m7(){return Rn(Dl).scale(144.049).clipAngle(60)}function y7(){var t=1,n=0,e=0,r=1,i=1,o=0,a,u,c=null,s,f,h,l=1,p=1,d=zi({point:function(v,w){var b=_([v,w]);this.stream.point(b[0],b[1])}}),g=Ni,m,y;function x(){return l=t*r,p=t*i,m=y=null,_}function _(v){var w=v[0]*l,b=v[1]*p;if(o){var A=b*a-w*u;w=w*a+b*u,b=A}return[w+n,b+e]}return _.invert=function(v){var w=v[0]-n,b=v[1]-e;if(o){var A=b*a+w*u;w=w*a-b*u,b=A}return[w/l,b/p]},_.stream=function(v){return m&&y===v?m:m=d(g(y=v))},_.postclip=function(v){return arguments.length?(g=v,c=s=f=h=null,x()):g},_.clipExtent=function(v){return arguments.length?(g=v==null?(c=s=f=h=null,Ni):qa(c=+v[0][0],s=+v[0][1],f=+v[1][0],h=+v[1][1]),x()):c==null?null:[[c,s],[f,h]]},_.scale=function(v){return arguments.length?(t=+v,x()):t},_.translate=function(v){return arguments.length?(n=+v[0],e=+v[1],x()):[n,e]},_.angle=function(v){return arguments.length?(o=v%360*V,u=G(o),a=q(o),x()):o*pt},_.reflectX=function(v){return arguments.length?(r=v?-1:1,x()):r<0},_.reflectY=function(v){return arguments.length?(i=v?-1:1,x()):i<0},_.fitExtent=function(v,w){return nu(_,v,w)},_.fitSize=function(v,w){return xl(_,v,w)},_.fitWidth=function(v,w){return _l(_,v,w)},_.fitHeight=function(v,w){return wl(_,v,w)},_}function Pl(t,n){var e=n*n,r=e*e;return[t*(.8707-.131979*e+r*(-.013791+r*(.003971*e-.001529*r))),n*(1.007226+e*(.015085+r*(-.044475+.028874*e-.005916*r)))]}Pl.invert=function(t,n){var e=n,r=25,i;do{var o=e*e,a=o*o;e-=i=(e*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-n)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(ot(i)>X&&--r>0);return[t/(.8707+(o=e*e)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),e]};function b7(){return Rn(Pl).scale(175.295)}function kl(t,n){return[q(n)*G(t),G(n)]}kl.invert=Gi(Vt);function v7(){return Rn(kl).scale(249.5).clipAngle(90+X)}function El(t,n){var e=q(n),r=1+q(t)*e;return[e*G(t)/r,G(n)/r]}El.invert=Gi(function(t){return 2*Sr(t)});function x7(){return Rn(El).scale(250).clipAngle(142)}function Nl(t,n){return[Sa(Bc((_t+n)/2)),-t]}Nl.invert=function(t,n){return[-n,2*Sr(xd(t))-_t]};function _7(){var t=Ng(Nl),n=t.center,e=t.rotate;return t.center=function(r){return arguments.length?n([-r[1],r[0]]):(r=n(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?e([r[0],r[1],r.length>2?r[2]+90:90]):(r=e(),[r[0],r[1],r[2]-90])},e([0,0,90]).scale(159.155)}function w7(t,n){return t.parent===n.parent?1:2}function A7(t){return t.reduce(M7,0)/t.length}function M7(t,n){return t+n.x}function $7(t){return 1+t.reduce(S7,0)}function S7(t,n){return Math.max(t,n.y)}function T7(t){for(var n;n=t.children;)t=n[0];return t}function D7(t){for(var n;n=t.children;)t=n[n.length-1];return t}function P7(){var t=w7,n=1,e=1,r=!1;function i(o){var a,u=0;o.eachAfter(function(l){var p=l.children;p?(l.x=A7(p),l.y=$7(p)):(l.x=a?u+=t(l,a):0,l.y=0,a=l)});var c=T7(o),s=D7(o),f=c.x-t(c,s)/2,h=s.x+t(s,c)/2;return o.eachAfter(r?function(l){l.x=(l.x-o.x)*n,l.y=(o.y-l.y)*e}:function(l){l.x=(l.x-f)/(h-f)*n,l.y=(1-(o.y?l.y/o.y:1))*e})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,n=+o[0],e=+o[1],i):r?null:[n,e]},i.nodeSize=function(o){return arguments.length?(r=!0,n=+o[0],e=+o[1],i):r?[n,e]:null},i}function k7(t){var n=0,e=t.children,r=e&&e.length;if(!r)n=1;else for(;--r>=0;)n+=e[r].value;t.value=n}function E7(){return this.eachAfter(k7)}function N7(t,n){let e=-1;for(const r of this)t.call(n,r,++e,this);return this}function L7(t,n){for(var e=this,r=[e],i,o,a=-1;e=r.pop();)if(t.call(n,e,++a,this),i=e.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function C7(t,n){for(var e=this,r=[e],i=[],o,a,u,c=-1;e=r.pop();)if(i.push(e),o=e.children)for(a=0,u=o.length;a<u;++a)r.push(o[a]);for(;e=i.pop();)t.call(n,e,++c,this);return this}function I7(t,n){let e=-1;for(const r of this)if(t.call(n,r,++e,this))return r}function R7(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e})}function F7(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})}function O7(t){for(var n=this,e=z7(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r}function z7(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}function G7(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n}function U7(){return Array.from(this)}function Y7(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t}function B7(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n}function*q7(){var t=this,n,e=[t],r,i,o;do for(n=e.reverse(),e=[];t=n.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)e.push(r[i]);while(e.length)}function Ll(t,n){t instanceof Map?(t=[void 0,t],n===void 0&&(n=X7)):n===void 0&&(n=W7);for(var e=new He(t),r,i=[e],o,a,u,c;r=i.pop();)if((a=n(r.data))&&(c=(a=Array.from(a)).length))for(r.children=a,u=c-1;u>=0;--u)i.push(o=a[u]=new He(a[u])),o.parent=r,o.depth=r.depth+1;return e.eachBefore(Ig)}function H7(){return Ll(this).eachBefore(V7)}function W7(t){return t.children}function X7(t){return Array.isArray(t)?t[1]:null}function V7(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ig(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function He(t){this.data=t,this.depth=this.height=0,this.parent=null}He.prototype=Ll.prototype={constructor:He,count:E7,each:N7,eachAfter:C7,eachBefore:L7,find:I7,sum:R7,sort:F7,path:O7,ancestors:G7,descendants:U7,leaves:Y7,links:B7,copy:H7,[Symbol.iterator]:q7};function ou(t){return t==null?null:Rg(t)}function Rg(t){if(typeof t!="function")throw new Error;return t}function We(){return 0}function Lr(t){return function(){return t}}const j7=1664525,Z7=1013904223,Fg=4294967296;function Cl(){let t=1;return()=>(t=(j7*t+Z7)%Fg)/Fg}function K7(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Q7(t,n){let e=t.length,r,i;for(;e;)i=n()*e--|0,r=t[e],t[e]=t[i],t[i]=r;return t}function J7(t){return Og(t,Cl())}function Og(t,n){for(var e=0,r=(t=Q7(Array.from(t),n)).length,i=[],o,a;e<r;)o=t[e],a&&zg(a,o)?++e:(a=nA(i=tA(i,o)),e=0);return a}function tA(t,n){var e,r;if(Il(n,t))return[n];for(e=0;e<t.length;++e)if(au(n,t[e])&&Il(Xi(t[e],n),t))return[t[e],n];for(e=0;e<t.length-1;++e)for(r=e+1;r<t.length;++r)if(au(Xi(t[e],t[r]),n)&&au(Xi(t[e],n),t[r])&&au(Xi(t[r],n),t[e])&&Il(Gg(t[e],t[r],n),t))return[t[e],t[r],n];throw new Error}function au(t,n){var e=t.r-n.r,r=n.x-t.x,i=n.y-t.y;return e<0||e*e<r*r+i*i}function zg(t,n){var e=t.r-n.r+Math.max(t.r,n.r,1)*1e-9,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Il(t,n){for(var e=0;e<n.length;++e)if(!zg(t,n[e]))return!1;return!0}function nA(t){switch(t.length){case 1:return eA(t[0]);case 2:return Xi(t[0],t[1]);case 3:return Gg(t[0],t[1],t[2])}}function eA(t){return{x:t.x,y:t.y,r:t.r}}function Xi(t,n){var e=t.x,r=t.y,i=t.r,o=n.x,a=n.y,u=n.r,c=o-e,s=a-r,f=u-i,h=Math.sqrt(c*c+s*s);return{x:(e+o+c/h*f)/2,y:(r+a+s/h*f)/2,r:(h+i+u)/2}}function Gg(t,n,e){var r=t.x,i=t.y,o=t.r,a=n.x,u=n.y,c=n.r,s=e.x,f=e.y,h=e.r,l=r-a,p=r-s,d=i-u,g=i-f,m=c-o,y=h-o,x=r*r+i*i-o*o,_=x-a*a-u*u+c*c,v=x-s*s-f*f+h*h,w=p*d-l*g,b=(d*v-g*_)/(w*2)-r,A=(g*m-d*y)/w,M=(p*_-l*v)/(w*2)-i,$=(l*y-p*m)/w,D=A*A+$*$-1,S=2*(o+b*A+M*$),L=b*b+M*M-o*o,E=-(Math.abs(D)>1e-6?(S+Math.sqrt(S*S-4*D*L))/(2*D):L/S);return{x:r+b+A*E,y:i+M+$*E,r:E}}function Ug(t,n,e){var r=t.x-n.x,i,o,a=t.y-n.y,u,c,s=r*r+a*a;s?(o=n.r+e.r,o*=o,c=t.r+e.r,c*=c,o>c?(i=(s+c-o)/(2*s),u=Math.sqrt(Math.max(0,c/s-i*i)),e.x=t.x-i*r-u*a,e.y=t.y-i*a+u*r):(i=(s+o-c)/(2*s),u=Math.sqrt(Math.max(0,o/s-i*i)),e.x=n.x+i*r-u*a,e.y=n.y+i*a+u*r)):(e.x=n.x+e.r,e.y=n.y)}function Yg(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Bg(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function uu(t){this._=t,this.next=null,this.previous=null}function qg(t,n){if(!(o=(t=K7(t)).length))return 0;var e,r,i,o,a,u,c,s,f,h,l;if(e=t[0],e.x=0,e.y=0,!(o>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(o>2))return e.r+r.r;Ug(r,e,i=t[2]),e=new uu(e),r=new uu(r),i=new uu(i),e.next=i.previous=r,r.next=e.previous=i,i.next=r.previous=e;t:for(c=3;c<o;++c){Ug(e._,r._,i=t[c]),i=new uu(i),s=r.next,f=e.previous,h=r._.r,l=e._.r;do if(h<=l){if(Yg(s._,i._)){r=s,e.next=r,r.previous=e,--c;continue t}h+=s._.r,s=s.next}else{if(Yg(f._,i._)){e=f,e.next=r,r.previous=e,--c;continue t}l+=f._.r,f=f.previous}while(s!==f.next);for(i.previous=e,i.next=r,e.next=r.previous=r=i,a=Bg(e);(i=i.next)!==r;)(u=Bg(i))<a&&(e=i,a=u);r=e.next}for(e=[r._],i=r;(i=i.next)!==r;)e.push(i._);for(i=Og(e,n),c=0;c<o;++c)e=t[c],e.x-=i.x,e.y-=i.y;return i.r}function rA(t){return qg(t,Cl()),t}function iA(t){return Math.sqrt(t.value)}function oA(){var t=null,n=1,e=1,r=We;function i(o){const a=Cl();return o.x=n/2,o.y=e/2,t?o.eachBefore(Hg(t)).eachAfter(Rl(r,.5,a)).eachBefore(Wg(1)):o.eachBefore(Hg(iA)).eachAfter(Rl(We,1,a)).eachAfter(Rl(r,o.r/Math.min(n,e),a)).eachBefore(Wg(Math.min(n,e)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=ou(o),i):t},i.size=function(o){return arguments.length?(n=+o[0],e=+o[1],i):[n,e]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Lr(+o),i):r},i}function Hg(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function Rl(t,n,e){return function(r){if(i=r.children){var i,o,a=i.length,u=t(r)*n||0,c;if(u)for(o=0;o<a;++o)i[o].r+=u;if(c=qg(i,e),u)for(o=0;o<a;++o)i[o].r-=u;r.r=c+u}}}function Wg(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}function Xg(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Vi(t,n,e,r,i){for(var o=t.children,a,u=-1,c=o.length,s=t.value&&(r-n)/t.value;++u<c;)a=o[u],a.y0=e,a.y1=i,a.x0=n,a.x1=n+=a.value*s}function aA(){var t=1,n=1,e=0,r=!1;function i(a){var u=a.height+1;return a.x0=a.y0=e,a.x1=t,a.y1=n/u,a.eachBefore(o(n,u)),r&&a.eachBefore(Xg),a}function o(a,u){return function(c){c.children&&Vi(c,c.x0,a*(c.depth+1)/u,c.x1,a*(c.depth+2)/u);var s=c.x0,f=c.y0,h=c.x1-e,l=c.y1-e;h<s&&(s=h=(s+h)/2),l<f&&(f=l=(f+l)/2),c.x0=s,c.y0=f,c.x1=h,c.y1=l}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],n=+a[1],i):[t,n]},i.padding=function(a){return arguments.length?(e=+a,i):e},i}var uA={depth:-1},Vg={},Fl={};function sA(t){return t.id}function cA(t){return t.parentId}function lA(){var t=sA,n=cA,e;function r(i){var o=Array.from(i),a=t,u=n,c,s,f,h,l,p,d,g,m=new Map;if(e!=null){const y=o.map((v,w)=>fA(e(v,w,i))),x=y.map(jg),_=new Set(y).add("");for(const v of x)_.has(v)||(_.add(v),y.push(v),x.push(jg(v)),o.push(Fl));a=(v,w)=>y[w],u=(v,w)=>x[w]}for(f=0,c=o.length;f<c;++f)s=o[f],p=o[f]=new He(s),(d=a(s,f,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?Vg:p)),(d=u(s,f,i))!=null&&(d+="")&&(p.parent=d);for(f=0;f<c;++f)if(p=o[f],d=p.parent){if(l=m.get(d),!l)throw new Error("missing: "+d);if(l===Vg)throw new Error("ambiguous: "+d);l.children?l.children.push(p):l.children=[p],p.parent=l}else{if(h)throw new Error("multiple roots");h=p}if(!h)throw new Error("no root");if(e!=null){for(;h.data===Fl&&h.children.length===1;)h=h.children[0],--c;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Fl);--y)p.data=null}if(h.parent=uA,h.eachBefore(function(y){y.depth=y.parent.depth+1,--c}).eachBefore(Ig),h.parent=null,c>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=ou(i),r):t},r.parentId=function(i){return arguments.length?(n=ou(i),r):n},r.path=function(i){return arguments.length?(e=ou(i),r):e},r}function fA(t){t=`${t}`;let n=t.length;return Ol(t,n-1)&&!Ol(t,n-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function jg(t){let n=t.length;if(n<2)return"";for(;--n>1&&!Ol(t,n););return t.slice(0,n)}function Ol(t,n){if(t[n]==="/"){let e=0;for(;n>0&&t[--n]==="\\";)++e;if(!(e&1))return!0}return!1}function hA(t,n){return t.parent===n.parent?1:2}function zl(t){var n=t.children;return n?n[0]:t.t}function Gl(t){var n=t.children;return n?n[n.length-1]:t.t}function pA(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function dA(t){for(var n=0,e=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=n,o.m+=n,n+=o.s+(e+=o.c)}function gA(t,n,e){return t.a.parent===n.parent?t.a:e}function su(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}su.prototype=Object.create(He.prototype);function mA(t){for(var n=new su(t,0),e,r=[n],i,o,a,u;e=r.pop();)if(o=e._.children)for(e.children=new Array(u=o.length),a=u-1;a>=0;--a)r.push(i=e.children[a]=new su(o[a],a)),i.parent=e;return(n.parent=new su(null,0)).children=[n],n}function yA(){var t=hA,n=1,e=1,r=null;function i(s){var f=mA(s);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(a),r)s.eachBefore(c);else{var h=s,l=s,p=s;s.eachBefore(function(x){x.x<h.x&&(h=x),x.x>l.x&&(l=x),x.depth>p.depth&&(p=x)});var d=h===l?1:t(h,l)/2,g=d-h.x,m=n/(l.x+d+g),y=e/(p.depth||1);s.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*y})}return s}function o(s){var f=s.children,h=s.parent.children,l=s.i?h[s.i-1]:null;if(f){dA(s);var p=(f[0].z+f[f.length-1].z)/2;l?(s.z=l.z+t(s._,l._),s.m=s.z-p):s.z=p}else l&&(s.z=l.z+t(s._,l._));s.parent.A=u(s,l,s.parent.A||h[0])}function a(s){s._.x=s.z+s.parent.m,s.m+=s.parent.m}function u(s,f,h){if(f){for(var l=s,p=s,d=f,g=l.parent.children[0],m=l.m,y=p.m,x=d.m,_=g.m,v;d=Gl(d),l=zl(l),d&&l;)g=zl(g),p=Gl(p),p.a=s,v=d.z+x-l.z-m+t(d._,l._),v>0&&(pA(gA(d,s,h),s,v),m+=v,y+=v),x+=d.m,m+=l.m,_+=g.m,y+=p.m;d&&!Gl(p)&&(p.t=d,p.m+=x-y),l&&!zl(g)&&(g.t=l,g.m+=m-_,h=s)}return h}function c(s){s.x*=n,s.y=s.depth*e}return i.separation=function(s){return arguments.length?(t=s,i):t},i.size=function(s){return arguments.length?(r=!1,n=+s[0],e=+s[1],i):r?null:[n,e]},i.nodeSize=function(s){return arguments.length?(r=!0,n=+s[0],e=+s[1],i):r?[n,e]:null},i}function cu(t,n,e,r,i){for(var o=t.children,a,u=-1,c=o.length,s=t.value&&(i-e)/t.value;++u<c;)a=o[u],a.x0=n,a.x1=r,a.y0=e,a.y1=e+=a.value*s}var Zg=(1+Math.sqrt(5))/2;function Kg(t,n,e,r,i,o){for(var a=[],u=n.children,c,s,f=0,h=0,l=u.length,p,d,g=n.value,m,y,x,_,v,w,b;f<l;){p=i-e,d=o-r;do m=u[h++].value;while(!m&&h<l);for(y=x=m,w=Math.max(d/p,p/d)/(g*t),b=m*m*w,v=Math.max(x/b,b/y);h<l;++h){if(m+=s=u[h].value,s<y&&(y=s),s>x&&(x=s),b=m*m*w,_=Math.max(x/b,b/y),_>v){m-=s;break}v=_}a.push(c={value:m,dice:p<d,children:u.slice(f,h)}),c.dice?Vi(c,e,r,i,g?r+=d*m/g:o):cu(c,e,r,g?e+=p*m/g:i,o),g-=m,f=h}return a}const Qg=function t(n){function e(r,i,o,a,u){Kg(n,r,i,o,a,u)}return e.ratio=function(r){return t((r=+r)>1?r:1)},e}(Zg);function bA(){var t=Qg,n=!1,e=1,r=1,i=[0],o=We,a=We,u=We,c=We,s=We;function f(l){return l.x0=l.y0=0,l.x1=e,l.y1=r,l.eachBefore(h),i=[0],n&&l.eachBefore(Xg),l}function h(l){var p=i[l.depth],d=l.x0+p,g=l.y0+p,m=l.x1-p,y=l.y1-p;m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),l.x0=d,l.y0=g,l.x1=m,l.y1=y,l.children&&(p=i[l.depth+1]=o(l)/2,d+=s(l)-p,g+=a(l)-p,m-=u(l)-p,y-=c(l)-p,m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),t(l,d,g,m,y))}return f.round=function(l){return arguments.length?(n=!!l,f):n},f.size=function(l){return arguments.length?(e=+l[0],r=+l[1],f):[e,r]},f.tile=function(l){return arguments.length?(t=Rg(l),f):t},f.padding=function(l){return arguments.length?f.paddingInner(l).paddingOuter(l):f.paddingInner()},f.paddingInner=function(l){return arguments.length?(o=typeof l=="function"?l:Lr(+l),f):o},f.paddingOuter=function(l){return arguments.length?f.paddingTop(l).paddingRight(l).paddingBottom(l).paddingLeft(l):f.paddingTop()},f.paddingTop=function(l){return arguments.length?(a=typeof l=="function"?l:Lr(+l),f):a},f.paddingRight=function(l){return arguments.length?(u=typeof l=="function"?l:Lr(+l),f):u},f.paddingBottom=function(l){return arguments.length?(c=typeof l=="function"?l:Lr(+l),f):c},f.paddingLeft=function(l){return arguments.length?(s=typeof l=="function"?l:Lr(+l),f):s},f}function vA(t,n,e,r,i){var o=t.children,a,u=o.length,c,s=new Array(u+1);for(s[0]=c=a=0;a<u;++a)s[a+1]=c+=o[a].value;f(0,u,t.value,n,e,r,i);function f(h,l,p,d,g,m,y){if(h>=l-1){var x=o[h];x.x0=d,x.y0=g,x.x1=m,x.y1=y;return}for(var _=s[h],v=p/2+_,w=h+1,b=l-1;w<b;){var A=w+b>>>1;s[A]<v?w=A+1:b=A}v-s[w-1]<s[w]-v&&h+1<w&&--w;var M=s[w]-_,$=p-M;if(m-d>y-g){var D=p?(d*$+m*M)/p:m;f(h,w,M,d,g,D,y),f(w,l,$,D,g,m,y)}else{var S=p?(g*$+y*M)/p:y;f(h,w,M,d,g,m,S),f(w,l,$,d,S,m,y)}}}function xA(t,n,e,r,i){(t.depth&1?cu:Vi)(t,n,e,r,i)}const _A=function t(n){function e(r,i,o,a,u){if((c=r._squarify)&&c.ratio===n)for(var c,s,f,h,l=-1,p,d=c.length,g=r.value;++l<d;){for(s=c[l],f=s.children,h=s.value=0,p=f.length;h<p;++h)s.value+=f[h].value;s.dice?Vi(s,i,o,a,g?o+=(u-o)*s.value/g:u):cu(s,i,o,g?i+=(a-i)*s.value/g:a,u),g-=s.value}else r._squarify=c=Kg(n,r,i,o,a,u),c.ratio=n}return e.ratio=function(r){return t((r=+r)>1?r:1)},e}(Zg);function wA(t){for(var n=-1,e=t.length,r,i=t[e-1],o=0;++n<e;)r=i,i=t[n],o+=r[1]*i[0]-r[0]*i[1];return o/2}function AA(t){for(var n=-1,e=t.length,r=0,i=0,o,a=t[e-1],u,c=0;++n<e;)o=a,a=t[n],c+=u=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*u,i+=(o[1]+a[1])*u;return c*=3,[r/c,i/c]}function MA(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function $A(t,n){return t[0]-n[0]||t[1]-n[1]}function Jg(t){const n=t.length,e=[0,1];let r=2,i;for(i=2;i<n;++i){for(;r>1&&MA(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function SA(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n<e;++n)r[n]=[+t[n][0],+t[n][1],n];for(r.sort($A),n=0;n<e;++n)i[n]=[r[n][0],-r[n][1]];var o=Jg(r),a=Jg(i),u=a[0]===o[0],c=a[a.length-1]===o[o.length-1],s=[];for(n=o.length-1;n>=0;--n)s.push(t[r[o[n]][2]]);for(n=+u;n<a.length-c;++n)s.push(t[r[a[n]][2]]);return s}function TA(t,n){for(var e=t.length,r=t[e-1],i=n[0],o=n[1],a=r[0],u=r[1],c,s,f=!1,h=0;h<e;++h)r=t[h],c=r[0],s=r[1],s>o!=u>o&&i<(a-c)*(o-s)/(u-s)+c&&(f=!f),a=c,u=s;return f}function DA(t){for(var n=-1,e=t.length,r=t[e-1],i,o,a=r[0],u=r[1],c=0;++n<e;)i=a,o=u,r=t[n],a=r[0],u=r[1],i-=a,o-=u,c+=Math.hypot(i,o);return c}const Rt=Math.random,PA=function t(n){function e(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return n()*i+r}}return e.source=t,e}(Rt),kA=function t(n){function e(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(n()*i+r)}}return e.source=t,e}(Rt),Ul=function t(n){function e(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var u;if(o!=null)u=o,o=null;else do o=n()*2-1,u=n()*2-1,a=o*o+u*u;while(!a||a>1);return r+i*u*Math.sqrt(-2*Math.log(a)/a)}}return e.source=t,e}(Rt),EA=function t(n){var e=Ul.source(n);function r(){var i=e.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Rt),t1=function t(n){function e(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=n();return i+o*n()}}return e.source=t,e}(Rt),NA=function t(n){var e=t1.source(n);function r(i){if((i=+i)==0)return n;var o=e(i);return function(){return o()/i}}return r.source=t,r}(Rt),LA=function t(n){function e(r){return function(){return-Math.log1p(-n())/r}}return e.source=t,e}(Rt),CA=function t(n){function e(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-n(),r)}}return e.source=t,e}(Rt),IA=function t(n){function e(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(n()+r)}}return e.source=t,e}(Rt),n1=function t(n){function e(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-n())/r)})}return e.source=t,e}(Rt),Yl=function t(n){var e=Ul.source(n)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-n())*o;var a=(i<1?i+1:i)-1/3,u=1/(3*Math.sqrt(a)),c=i<1?()=>Math.pow(n(),1/i):()=>1;return function(){do{do var s=e(),f=1+u*s;while(f<=0);f*=f*f;var h=1-n()}while(h>=1-.0331*s*s*s*s&&Math.log(h)>=.5*s*s+a*(1-f+Math.log(f)));return a*f*c()*o}}return r.source=t,r}(Rt),e1=function t(n){var e=Yl.source(n);function r(i,o){var a=e(i),u=e(o);return function(){var c=a();return c===0?0:c/(c+u())}}return r.source=t,r}(Rt),r1=function t(n){var e=n1.source(n),r=e1.source(n);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var u=0,c=o,s=a;c*s>16&&c*(1-s)>16;){var f=Math.floor((c+1)*s),h=r(f,c-f+1)();h<=s?(u+=f,c-=f,s=(s-h)/(1-h)):(c=f-1,s/=h)}for(var l=s<.5,p=l?s:1-s,d=e(p),g=d(),m=0;g<=c;++m)g+=d();return u+(l?m:c-m)}}return i.source=t,i}(Rt),RA=function t(n){function e(r,i,o){var a;return(r=+r)==0?a=u=>-Math.log(u):(r=1/r,a=u=>Math.pow(u,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-n()))}}return e.source=t,e}(Rt),FA=function t(n){function e(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*n())}}return e.source=t,e}(Rt),OA=function t(n){function e(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=n();return r+i*Math.log(o/(1-o))}}return e.source=t,e}(Rt),zA=function t(n){var e=Yl.source(n),r=r1.source(n);function i(o){return function(){for(var a=0,u=o;u>16;){var c=Math.floor(.875*u),s=e(c)();if(s>u)return a+r(c-1,u/s)();a+=c,u-=s}for(var f=-Math.log1p(-n()),h=0;f<=u;++h)f-=Math.log1p(-n());return a+h}}return i.source=t,i}(Rt),GA=1664525,UA=1013904223,i1=1/4294967296;function YA(t=Math.random()){let n=(0<=t&&t<1?t/i1:Math.abs(t))|0;return()=>(n=GA*n+UA|0,i1*(n>>>0))}function pn(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t);break}return this}function Zn(t,n){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof n=="function"?this.interpolator(n):this.range(n);break}}return this}const Bl=Symbol("implicit");function ql(){var t=new ei,n=[],e=[],r=Bl;function i(o){let a=t.get(o);if(a===void 0){if(r!==Bl)return r;t.set(o,a=n.push(o)-1)}return e[a%e.length]}return i.domain=function(o){if(!arguments.length)return n.slice();n=[],t=new ei;for(const a of o)t.has(a)||t.set(a,n.push(a)-1);return i},i.range=function(o){return arguments.length?(e=Array.from(o),i):e.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return ql(n,e).unknown(r)},pn.apply(i,arguments),i}function Hl(){var t=ql().unknown(void 0),n=t.domain,e=t.range,r=0,i=1,o,a,u=!1,c=0,s=0,f=.5;delete t.unknown;function h(){var l=n().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+s*2),u&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),u&&(d=Math.round(d),a=Math.round(a));var m=ue(l).map(function(y){return d+o*y});return e(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(n(l),h()):n()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,u=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(u=!!l,h()):u},t.padding=function(l){return arguments.length?(c=Math.min(1,s=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(s=+l,h()):s},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return Hl(n(),[r,i]).round(u).paddingInner(c).paddingOuter(s).align(f)},pn.apply(h(),arguments)}function o1(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return o1(n())},t}function Wl(){return o1(Hl.apply(null,arguments).paddingInner(1))}function BA(t){return function(){return t}}function lu(t){return+t}var a1=[0,1];function Qt(t){return t}function Xl(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:BA(isNaN(n)?NaN:.5)}function qA(t,n){var e;return t>n&&(e=t,t=n,n=e),function(r){return Math.max(t,Math.min(n,r))}}function HA(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=Xl(i,r),o=e(a,o)):(r=Xl(r,i),o=e(o,a)),function(u){return o(r(u))}}function WA(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<r;)i[a]=Xl(t[a],t[a+1]),o[a]=e(n[a],n[a+1]);return function(u){var c=Ae(t,u,1,r)-1;return o[c](i[c](u))}}function ji(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function fu(){var t=a1,n=a1,e=le,r,i,o,a=Qt,u,c,s;function f(){var l=Math.min(t.length,n.length);return a!==Qt&&(a=qA(t[0],t[l-1])),u=l>2?WA:HA,c=s=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=u(t.map(r),n,e)))(r(a(l)))}return h.invert=function(l){return a(i((s||(s=u(n,t.map(r),ln)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,lu),f()):t.slice()},h.range=function(l){return arguments.length?(n=Array.from(l),f()):n.slice()},h.rangeRound=function(l){return n=Array.from(l),e=ta,f()},h.clamp=function(l){return arguments.length?(a=l?!0:Qt,f()):a!==Qt},h.interpolate=function(l){return arguments.length?(e=l,f()):e},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function Vl(){return fu()(Qt,Qt)}function u1(t,n,e,r){var i=Eo(t,n,e),o;switch(r=$r(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(n));return r.precision==null&&!isNaN(o=bd(i,a))&&(r.precision=o),Gc(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=vd(i,Math.max(Math.abs(t),Math.abs(n))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=yd(i))&&(r.precision=o-(r.type==="%")*2);break}}return Si(r)}function ge(t){var n=t.domain;return t.ticks=function(e){var r=n();return $e(r[0],r[r.length-1],e??10)},t.tickFormat=function(e,r){var i=n();return u1(i[0],i[i.length-1],e??10,r)},t.nice=function(e){e==null&&(e=10);var r=n(),i=0,o=r.length-1,a=r[i],u=r[o],c,s,f=10;for(u<a&&(s=a,a=u,u=s,s=i,i=o,o=s);f-- >0;){if(s=Se(a,u,e),s===c)return r[i]=a,r[o]=u,n(r);if(s>0)a=Math.floor(a/s)*s,u=Math.ceil(u/s)*s;else if(s<0)a=Math.ceil(a*s)/s,u=Math.floor(u*s)/s;else break;c=s}return t},t}function jl(){var t=Vl();return t.copy=function(){return ji(t,jl())},pn.apply(t,arguments),ge(t)}function s1(t){var n;function e(r){return r==null||isNaN(r=+r)?n:r}return e.invert=e,e.domain=e.range=function(r){return arguments.length?(t=Array.from(r,lu),e):t.slice()},e.unknown=function(r){return arguments.length?(n=r,e):n},e.copy=function(){return s1(t).unknown(n)},t=arguments.length?Array.from(t,lu):[0,1],ge(e)}function c1(t,n){t=t.slice();var e=0,r=t.length-1,i=t[e],o=t[r],a;return o<i&&(a=e,e=r,r=a,a=i,i=o,o=a),t[e]=n.floor(i),t[r]=n.ceil(o),t}function l1(t){return Math.log(t)}function f1(t){return Math.exp(t)}function XA(t){return-Math.log(-t)}function VA(t){return-Math.exp(-t)}function jA(t){return isFinite(t)?+("1e"+t):t<0?0:t}function ZA(t){return t===10?jA:t===Math.E?Math.exp:n=>Math.pow(t,n)}function KA(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}function h1(t){return(n,e)=>-t(-n,e)}function Zl(t){const n=t(l1,f1),e=n.domain;let r=10,i,o;function a(){return i=KA(r),o=ZA(r),e()[0]<0?(i=h1(i),o=h1(o),t(XA,VA)):t(l1,f1),n}return n.base=function(u){return arguments.length?(r=+u,a()):r},n.domain=function(u){return arguments.length?(e(u),a()):e()},n.ticks=u=>{const c=e();let s=c[0],f=c[c.length-1];const h=f<s;h&&([s,f]=[f,s]);let l=i(s),p=i(f),d,g;const m=u==null?10:+u;let y=[];if(!(r%1)&&p-l<m){if(l=Math.floor(l),p=Math.ceil(p),s>0){for(;l<=p;++l)for(d=1;d<r;++d)if(g=l<0?d/o(-l):d*o(l),!(g<s)){if(g>f)break;y.push(g)}}else for(;l<=p;++l)for(d=r-1;d>=1;--d)if(g=l>0?d/o(-l):d*o(l),!(g<s)){if(g>f)break;y.push(g)}y.length*2<m&&(y=$e(s,f,m))}else y=$e(l,p,Math.min(p-l,m)).map(o);return h?y.reverse():y},n.tickFormat=(u,c)=>{if(u==null&&(u=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=$r(c)).precision==null&&(c.trim=!0),c=Si(c)),u===1/0)return c;const s=Math.max(1,r*u/n.ticks().length);return f=>{let h=f/o(Math.round(i(f)));return h*r<r-.5&&(h*=r),h<=s?c(f):""}},n.nice=()=>e(c1(e(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),n}function p1(){const t=Zl(fu()).domain([1,10]);return t.copy=()=>ji(t,p1()).base(t.base()),pn.apply(t,arguments),t}function d1(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function g1(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function Kl(t){var n=1,e=t(d1(n),g1(n));return e.constant=function(r){return arguments.length?t(d1(n=+r),g1(n)):n},ge(e)}function m1(){var t=Kl(fu());return t.copy=function(){return ji(t,m1()).constant(t.constant())},pn.apply(t,arguments)}function y1(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function QA(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function JA(t){return t<0?-t*t:t*t}function Ql(t){var n=t(Qt,Qt),e=1;function r(){return e===1?t(Qt,Qt):e===.5?t(QA,JA):t(y1(e),y1(1/e))}return n.exponent=function(i){return arguments.length?(e=+i,r()):e},ge(n)}function hu(){var t=Ql(fu());return t.copy=function(){return ji(t,hu()).exponent(t.exponent())},pn.apply(t,arguments),t}function tM(){return hu.apply(null,arguments).exponent(.5)}function b1(t){return Math.sign(t)*t*t}function nM(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function v1(){var t=Vl(),n=[0,1],e=!1,r;function i(o){var a=nM(t(o));return isNaN(a)?r:e?Math.round(a):a}return i.invert=function(o){return t.invert(b1(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((n=Array.from(o,lu)).map(b1)),i):n.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(e=!!o,i):e},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return v1(t.domain(),n).round(e).clamp(t.clamp()).unknown(r)},pn.apply(i,arguments),ge(i)}function x1(){var t=[],n=[],e=[],r;function i(){var a=0,u=Math.max(1,n.length);for(e=new Array(u-1);++a<u;)e[a-1]=Jh(t,a/u);return o}function o(a){return a==null||isNaN(a=+a)?r:n[Ae(e,a)]}return o.invertExtent=function(a){var u=n.indexOf(a);return u<0?[NaN,NaN]:[u>0?e[u-1]:t[0],u<e.length?e[u]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let u of a)u!=null&&!isNaN(u=+u)&&t.push(u);return t.sort(bt),i()},o.range=function(a){return arguments.length?(n=Array.from(a),i()):n.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return e.slice()},o.copy=function(){return x1().domain(t).range(n).unknown(r)},pn.apply(o,arguments)}function _1(){var t=0,n=1,e=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[Ae(r,c,0,e)]:o}function u(){var c=-1;for(r=new Array(e);++c<e;)r[c]=((c+1)*n-(c-e)*t)/(e+1);return a}return a.domain=function(c){return arguments.length?([t,n]=c,t=+t,n=+n,u()):[t,n]},a.range=function(c){return arguments.length?(e=(i=Array.from(c)).length-1,u()):i.slice()},a.invertExtent=function(c){var s=i.indexOf(c);return s<0?[NaN,NaN]:s<1?[t,r[0]]:s>=e?[r[e-1],n]:[r[s-1],r[s]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return _1().domain([t,n]).range(i).unknown(o)},pn.apply(ge(a),arguments)}function w1(){var t=[.5],n=[0,1],e,r=1;function i(o){return o!=null&&o<=o?n[Ae(t,o,0,r)]:e}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(o){return arguments.length?(n=Array.from(o),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(o){var a=n.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(e=o,i):e},i.copy=function(){return w1().domain(t).range(n).unknown(e)},pn.apply(i,arguments)}const Jl=new Date,tf=new Date;function St(t,n,e,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),n(o,1),t(o),o),i.round=o=>{const a=i(o),u=i.ceil(o);return o-a<u-o?a:u},i.offset=(o,a)=>(n(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,u)=>{const c=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<a)||!(u>0))return c;let s;do c.push(s=new Date(+o)),n(o,u),t(o);while(s<o&&o<a);return c},i.filter=o=>St(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,u)=>{if(a>=a)if(u<0)for(;++u<=0;)for(;n(a,-1),!o(a););else for(;--u>=0;)for(;n(a,1),!o(a););}),e&&(i.count=(o,a)=>(Jl.setTime(+o),tf.setTime(+a),t(Jl),t(tf),Math.floor(e(Jl,tf))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Cr=St(()=>{},(t,n)=>{t.setTime(+t+n)},(t,n)=>n-t);Cr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?St(n=>{n.setTime(Math.floor(n/t)*t)},(n,e)=>{n.setTime(+n+e*t)},(n,e)=>(e-n)/t):Cr);const A1=Cr.range,Kn=1e3,dn=Kn*60,Qn=dn*60,Jn=Qn*24,nf=Jn*7,M1=Jn*30,ef=Jn*365,te=St(t=>{t.setTime(t-t.getMilliseconds())},(t,n)=>{t.setTime(+t+n*Kn)},(t,n)=>(n-t)/Kn,t=>t.getUTCSeconds()),$1=te.range,pu=St(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Kn)},(t,n)=>{t.setTime(+t+n*dn)},(t,n)=>(n-t)/dn,t=>t.getMinutes()),eM=pu.range,du=St(t=>{t.setUTCSeconds(0,0)},(t,n)=>{t.setTime(+t+n*dn)},(t,n)=>(n-t)/dn,t=>t.getUTCMinutes()),rM=du.range,gu=St(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Kn-t.getMinutes()*dn)},(t,n)=>{t.setTime(+t+n*Qn)},(t,n)=>(n-t)/Qn,t=>t.getHours()),iM=gu.range,mu=St(t=>{t.setUTCMinutes(0,0,0)},(t,n)=>{t.setTime(+t+n*Qn)},(t,n)=>(n-t)/Qn,t=>t.getUTCHours()),oM=mu.range,Ir=St(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*dn)/Jn,t=>t.getDate()-1),aM=Ir.range,Zi=St(t=>{t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n)},(t,n)=>(n-t)/Jn,t=>t.getUTCDate()-1),uM=Zi.range,rf=St(t=>{t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n)},(t,n)=>(n-t)/Jn,t=>Math.floor(t/Jn)),sM=rf.range;function Xe(t){return St(n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},(n,e)=>{n.setDate(n.getDate()+e*7)},(n,e)=>(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*dn)/nf)}const Rr=Xe(0),Ki=Xe(1),S1=Xe(2),T1=Xe(3),Ve=Xe(4),D1=Xe(5),P1=Xe(6),k1=Rr.range,cM=Ki.range,lM=S1.range,fM=T1.range,hM=Ve.range,pM=D1.range,dM=P1.range;function je(t){return St(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e*7)},(n,e)=>(e-n)/nf)}const Fr=je(0),Qi=je(1),E1=je(2),N1=je(3),Ze=je(4),L1=je(5),C1=je(6),I1=Fr.range,gM=Qi.range,mM=E1.range,yM=N1.range,bM=Ze.range,vM=L1.range,xM=C1.range,yu=St(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,n)=>{t.setMonth(t.getMonth()+n)},(t,n)=>n.getMonth()-t.getMonth()+(n.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),_M=yu.range,bu=St(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)},(t,n)=>n.getUTCMonth()-t.getUTCMonth()+(n.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),wM=bu.range,Fn=St(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n)},(t,n)=>n.getFullYear()-t.getFullYear(),t=>t.getFullYear());Fn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:St(n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,e)=>{n.setFullYear(n.getFullYear()+e*t)});const AM=Fn.range,On=St(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)},(t,n)=>n.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());On.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:St(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e*t)});const MM=On.range;function R1(t,n,e,r,i,o){const a=[[te,1,Kn],[te,5,5*Kn],[te,15,15*Kn],[te,30,30*Kn],[o,1,dn],[o,5,5*dn],[o,15,15*dn],[o,30,30*dn],[i,1,Qn],[i,3,3*Qn],[i,6,6*Qn],[i,12,12*Qn],[r,1,Jn],[r,2,2*Jn],[e,1,nf],[n,1,M1],[n,3,3*M1],[t,1,ef]];function u(s,f,h){const l=f<s;l&&([s,f]=[f,s]);const p=h&&typeof h.range=="function"?h:c(s,f,h),d=p?p.range(s,+f+1):[];return l?d.reverse():d}function c(s,f,h){const l=Math.abs(f-s)/h,p=To(([,,m])=>m).right(a,l);if(p===a.length)return t.every(Eo(s/ef,f/ef,h));if(p===0)return Cr.every(Math.max(Eo(s,f,h),1));const[d,g]=a[l/a[p-1][2]<a[p][2]/l?p-1:p];return d.every(g)}return[u,c]}const[F1,O1]=R1(On,bu,Fr,rf,mu,du),[z1,G1]=R1(Fn,yu,Rr,Ir,gu,pu);function of(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function af(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ji(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}function U1(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,c=t.shortMonths,s=to(i),f=no(i),h=to(o),l=no(o),p=to(a),d=no(a),g=to(u),m=no(u),y=to(c),x=no(c),_={a:N,A:C,b:R,B:O,c:null,d:X1,e:X1,f:XM,g:r$,G:o$,H:qM,I:HM,j:WM,L:V1,m:VM,M:jM,p:U,q:W,Q:tm,s:nm,S:ZM,u:KM,U:QM,V:JM,w:t$,W:n$,x:null,X:null,y:e$,Y:i$,Z:a$,"%":J1},v={a:lt,A:ut,b:at,B:Tt,c:null,d:Z1,e:Z1,f:l$,g:x$,G:w$,H:u$,I:s$,j:c$,L:K1,m:f$,M:h$,p:ct,q:$t,Q:tm,s:nm,S:p$,u:d$,U:g$,V:m$,w:y$,W:b$,x:null,X:null,y:v$,Y:_$,Z:A$,"%":J1},w={a:D,A:S,b:L,B:E,c:T,d:H1,e:H1,f:GM,g:q1,G:B1,H:W1,I:W1,j:RM,L:zM,m:IM,M:FM,p:$,q:CM,Q:YM,s:BM,S:OM,u:PM,U:kM,V:EM,w:DM,W:NM,x:k,X:P,y:q1,Y:B1,Z:LM,"%":UM};_.x=b(e,_),_.X=b(r,_),_.c=b(n,_),v.x=b(e,v),v.X=b(r,v),v.c=b(n,v);function b(z,Q){return function(rt){var F=[],At=-1,ft=0,Jt=z.length,tn,j,Mt;for(rt instanceof Date||(rt=new Date(+rt));++At<Jt;)z.charCodeAt(At)===37&&(F.push(z.slice(ft,At)),(j=Y1[tn=z.charAt(++At)])!=null?tn=z.charAt(++At):j=tn==="e"?" ":"0",(Mt=Q[tn])&&(tn=Mt(rt,j)),F.push(tn),ft=At+1);return F.push(z.slice(ft,At)),F.join("")}}function A(z,Q){return function(rt){var F=Ji(1900,void 0,1),At=M(F,z,rt+="",0),ft,Jt;if(At!=rt.length)return null;if("Q"in F)return new Date(F.Q);if("s"in F)return new Date(F.s*1e3+("L"in F?F.L:0));if(Q&&!("Z"in F)&&(F.Z=0),"p"in F&&(F.H=F.H%12+F.p*12),F.m===void 0&&(F.m="q"in F?F.q:0),"V"in F){if(F.V<1||F.V>53)return null;"w"in F||(F.w=1),"Z"in F?(ft=af(Ji(F.y,0,1)),Jt=ft.getUTCDay(),ft=Jt>4||Jt===0?Qi.ceil(ft):Qi(ft),ft=Zi.offset(ft,(F.V-1)*7),F.y=ft.getUTCFullYear(),F.m=ft.getUTCMonth(),F.d=ft.getUTCDate()+(F.w+6)%7):(ft=of(Ji(F.y,0,1)),Jt=ft.getDay(),ft=Jt>4||Jt===0?Ki.ceil(ft):Ki(ft),ft=Ir.offset(ft,(F.V-1)*7),F.y=ft.getFullYear(),F.m=ft.getMonth(),F.d=ft.getDate()+(F.w+6)%7)}else("W"in F||"U"in F)&&("w"in F||(F.w="u"in F?F.u%7:"W"in F?1:0),Jt="Z"in F?af(Ji(F.y,0,1)).getUTCDay():of(Ji(F.y,0,1)).getDay(),F.m=0,F.d="W"in F?(F.w+6)%7+F.W*7-(Jt+5)%7:F.w+F.U*7-(Jt+6)%7);return"Z"in F?(F.H+=F.Z/100|0,F.M+=F.Z%100,af(F)):of(F)}}function M(z,Q,rt,F){for(var At=0,ft=Q.length,Jt=rt.length,tn,j;At<ft;){if(F>=Jt)return-1;if(tn=Q.charCodeAt(At++),tn===37){if(tn=Q.charAt(At++),j=w[tn in Y1?Q.charAt(At++):tn],!j||(F=j(z,rt,F))<0)return-1}else if(tn!=rt.charCodeAt(F++))return-1}return F}function $(z,Q,rt){var F=s.exec(Q.slice(rt));return F?(z.p=f.get(F[0].toLowerCase()),rt+F[0].length):-1}function D(z,Q,rt){var F=p.exec(Q.slice(rt));return F?(z.w=d.get(F[0].toLowerCase()),rt+F[0].length):-1}function S(z,Q,rt){var F=h.exec(Q.slice(rt));return F?(z.w=l.get(F[0].toLowerCase()),rt+F[0].length):-1}function L(z,Q,rt){var F=y.exec(Q.slice(rt));return F?(z.m=x.get(F[0].toLowerCase()),rt+F[0].length):-1}function E(z,Q,rt){var F=g.exec(Q.slice(rt));return F?(z.m=m.get(F[0].toLowerCase()),rt+F[0].length):-1}function T(z,Q,rt){return M(z,n,Q,rt)}function k(z,Q,rt){return M(z,e,Q,rt)}function P(z,Q,rt){return M(z,r,Q,rt)}function N(z){return a[z.getDay()]}function C(z){return o[z.getDay()]}function R(z){return c[z.getMonth()]}function O(z){return u[z.getMonth()]}function U(z){return i[+(z.getHours()>=12)]}function W(z){return 1+~~(z.getMonth()/3)}function lt(z){return a[z.getUTCDay()]}function ut(z){return o[z.getUTCDay()]}function at(z){return c[z.getUTCMonth()]}function Tt(z){return u[z.getUTCMonth()]}function ct(z){return i[+(z.getUTCHours()>=12)]}function $t(z){return 1+~~(z.getUTCMonth()/3)}return{format:function(z){var Q=b(z+="",_);return Q.toString=function(){return z},Q},parse:function(z){var Q=A(z+="",!1);return Q.toString=function(){return z},Q},utcFormat:function(z){var Q=b(z+="",v);return Q.toString=function(){return z},Q},utcParse:function(z){var Q=A(z+="",!0);return Q.toString=function(){return z},Q}}}var Y1={"-":"",_:" ",0:"0"},Ct=/^\s*\d+/,$M=/^%/,SM=/[\\^$*+?|[\]().{}]/g;function st(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function TM(t){return t.replace(SM,"\\$&")}function to(t){return new RegExp("^(?:"+t.map(TM).join("|")+")","i")}function no(t){return new Map(t.map((n,e)=>[n.toLowerCase(),e]))}function DM(t,n,e){var r=Ct.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function PM(t,n,e){var r=Ct.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function kM(t,n,e){var r=Ct.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function EM(t,n,e){var r=Ct.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function NM(t,n,e){var r=Ct.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function B1(t,n,e){var r=Ct.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function q1(t,n,e){var r=Ct.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function LM(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function CM(t,n,e){var r=Ct.exec(n.slice(e,e+1));return r?(t.q=r[0]*3-3,e+r[0].length):-1}function IM(t,n,e){var r=Ct.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function H1(t,n,e){var r=Ct.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function RM(t,n,e){var r=Ct.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function W1(t,n,e){var r=Ct.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function FM(t,n,e){var r=Ct.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function OM(t,n,e){var r=Ct.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function zM(t,n,e){var r=Ct.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function GM(t,n,e){var r=Ct.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function UM(t,n,e){var r=$M.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function YM(t,n,e){var r=Ct.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function BM(t,n,e){var r=Ct.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function X1(t,n){return st(t.getDate(),n,2)}function qM(t,n){return st(t.getHours(),n,2)}function HM(t,n){return st(t.getHours()%12||12,n,2)}function WM(t,n){return st(1+Ir.count(Fn(t),t),n,3)}function V1(t,n){return st(t.getMilliseconds(),n,3)}function XM(t,n){return V1(t,n)+"000"}function VM(t,n){return st(t.getMonth()+1,n,2)}function jM(t,n){return st(t.getMinutes(),n,2)}function ZM(t,n){return st(t.getSeconds(),n,2)}function KM(t){var n=t.getDay();return n===0?7:n}function QM(t,n){return st(Rr.count(Fn(t)-1,t),n,2)}function j1(t){var n=t.getDay();return n>=4||n===0?Ve(t):Ve.ceil(t)}function JM(t,n){return t=j1(t),st(Ve.count(Fn(t),t)+(Fn(t).getDay()===4),n,2)}function t$(t){return t.getDay()}function n$(t,n){return st(Ki.count(Fn(t)-1,t),n,2)}function e$(t,n){return st(t.getFullYear()%100,n,2)}function r$(t,n){return t=j1(t),st(t.getFullYear()%100,n,2)}function i$(t,n){return st(t.getFullYear()%1e4,n,4)}function o$(t,n){var e=t.getDay();return t=e>=4||e===0?Ve(t):Ve.ceil(t),st(t.getFullYear()%1e4,n,4)}function a$(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+st(n/60|0,"0",2)+st(n%60,"0",2)}function Z1(t,n){return st(t.getUTCDate(),n,2)}function u$(t,n){return st(t.getUTCHours(),n,2)}function s$(t,n){return st(t.getUTCHours()%12||12,n,2)}function c$(t,n){return st(1+Zi.count(On(t),t),n,3)}function K1(t,n){return st(t.getUTCMilliseconds(),n,3)}function l$(t,n){return K1(t,n)+"000"}function f$(t,n){return st(t.getUTCMonth()+1,n,2)}function h$(t,n){return st(t.getUTCMinutes(),n,2)}function p$(t,n){return st(t.getUTCSeconds(),n,2)}function d$(t){var n=t.getUTCDay();return n===0?7:n}function g$(t,n){return st(Fr.count(On(t)-1,t),n,2)}function Q1(t){var n=t.getUTCDay();return n>=4||n===0?Ze(t):Ze.ceil(t)}function m$(t,n){return t=Q1(t),st(Ze.count(On(t),t)+(On(t).getUTCDay()===4),n,2)}function y$(t){return t.getUTCDay()}function b$(t,n){return st(Qi.count(On(t)-1,t),n,2)}function v$(t,n){return st(t.getUTCFullYear()%100,n,2)}function x$(t,n){return t=Q1(t),st(t.getUTCFullYear()%100,n,2)}function _$(t,n){return st(t.getUTCFullYear()%1e4,n,4)}function w$(t,n){var e=t.getUTCDay();return t=e>=4||e===0?Ze(t):Ze.ceil(t),st(t.getUTCFullYear()%1e4,n,4)}function A$(){return"+0000"}function J1(){return"%"}function tm(t){return+t}function nm(t){return Math.floor(+t/1e3)}var Or,uf,em,vu,sf;rm({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 rm(t){return Or=U1(t),uf=Or.format,em=Or.parse,vu=Or.utcFormat,sf=Or.utcParse,Or}var im="%Y-%m-%dT%H:%M:%S.%LZ";function M$(t){return t.toISOString()}var $$=Date.prototype.toISOString?M$:vu(im);const S$=$$;function T$(t){var n=new Date(t);return isNaN(n)?null:n}var D$=+new Date("2000-01-01T00:00:00.000Z")?T$:sf(im);const P$=D$;function k$(t){return new Date(t)}function E$(t){return t instanceof Date?+t:+new Date(+t)}function cf(t,n,e,r,i,o,a,u,c,s){var f=Vl(),h=f.invert,l=f.domain,p=s(".%L"),d=s(":%S"),g=s("%I:%M"),m=s("%I %p"),y=s("%a %d"),x=s("%b %d"),_=s("%B"),v=s("%Y");function w(b){return(c(b)<b?p:u(b)<b?d:a(b)<b?g:o(b)<b?m:r(b)<b?i(b)<b?y:x:e(b)<b?_:v)(b)}return f.invert=function(b){return new Date(h(b))},f.domain=function(b){return arguments.length?l(Array.from(b,E$)):l().map(k$)},f.ticks=function(b){var A=l();return t(A[0],A[A.length-1],b??10)},f.tickFormat=function(b,A){return A==null?w:s(A)},f.nice=function(b){var A=l();return(!b||typeof b.range!="function")&&(b=n(A[0],A[A.length-1],b??10)),b?l(c1(A,b)):f},f.copy=function(){return ji(f,cf(t,n,e,r,i,o,a,u,c,s))},f}function N$(){return pn.apply(cf(z1,G1,Fn,yu,Rr,Ir,gu,pu,te,uf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function L$(){return pn.apply(cf(F1,O1,On,bu,Fr,Zi,mu,du,te,vu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function xu(){var t=0,n=1,e,r,i,o,a=Qt,u=!1,c;function s(h){return h==null||isNaN(h=+h)?c:a(i===0?.5:(h=(o(h)-e)*i,u?Math.max(0,Math.min(1,h)):h))}s.domain=function(h){return arguments.length?([t,n]=h,e=o(t=+t),r=o(n=+n),i=e===r?0:1/(r-e),s):[t,n]},s.clamp=function(h){return arguments.length?(u=!!h,s):u},s.interpolator=function(h){return arguments.length?(a=h,s):a};function f(h){return function(l){var p,d;return arguments.length?([p,d]=l,a=h(p,d),s):[a(0),a(1)]}}return s.range=f(le),s.rangeRound=f(ta),s.unknown=function(h){return arguments.length?(c=h,s):c},function(h){return o=h,e=h(t),r=h(n),i=e===r?0:1/(r-e),s}}function me(t,n){return n.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function om(){var t=ge(xu()(Qt));return t.copy=function(){return me(t,om())},Zn.apply(t,arguments)}function am(){var t=Zl(xu()).domain([1,10]);return t.copy=function(){return me(t,am()).base(t.base())},Zn.apply(t,arguments)}function um(){var t=Kl(xu());return t.copy=function(){return me(t,um()).constant(t.constant())},Zn.apply(t,arguments)}function lf(){var t=Ql(xu());return t.copy=function(){return me(t,lf()).exponent(t.exponent())},Zn.apply(t,arguments)}function C$(){return lf.apply(null,arguments).exponent(.5)}function sm(){var t=[],n=Qt;function e(r){if(r!=null&&!isNaN(r=+r))return n((Ae(t,r,1)-1)/(t.length-1))}return e.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(bt),e},e.interpolator=function(r){return arguments.length?(n=r,e):n},e.range=function(){return t.map((r,i)=>n(i/(t.length-1)))},e.quantiles=function(r){return Array.from({length:r+1},(i,o)=>oi(t,o/r))},e.copy=function(){return sm(n).domain(t)},Zn.apply(e,arguments)}function _u(){var t=0,n=.5,e=1,r=1,i,o,a,u,c,s=Qt,f,h=!1,l;function p(g){return isNaN(g=+g)?l:(g=.5+((g=+f(g))-o)*(r*g<r*o?u:c),s(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,n,e]=g,i=f(t=+t),o=f(n=+n),a=f(e=+e),u=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,p):[t,n,e]},p.clamp=function(g){return arguments.length?(h=!!g,p):h},p.interpolator=function(g){return arguments.length?(s=g,p):s};function d(g){return function(m){var y,x,_;return arguments.length?([y,x,_]=m,s=cp(g,[y,x,_]),p):[s(0),s(.5),s(1)]}}return p.range=d(le),p.rangeRound=d(ta),p.unknown=function(g){return arguments.length?(l=g,p):l},function(g){return f=g,i=g(t),o=g(n),a=g(e),u=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function cm(){var t=ge(_u()(Qt));return t.copy=function(){return me(t,cm())},Zn.apply(t,arguments)}function lm(){var t=Zl(_u()).domain([.1,1,10]);return t.copy=function(){return me(t,lm()).base(t.base())},Zn.apply(t,arguments)}function fm(){var t=Kl(_u());return t.copy=function(){return me(t,fm()).constant(t.constant())},Zn.apply(t,arguments)}function ff(){var t=Ql(_u());return t.copy=function(){return me(t,ff()).exponent(t.exponent())},Zn.apply(t,arguments)}function I$(){return ff.apply(null,arguments).exponent(.5)}function tt(t){for(var n=t.length/6|0,e=new Array(n),r=0;r<n;)e[r]="#"+t.slice(r*6,++r*6);return e}const R$=tt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),F$=tt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),O$=tt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),z$=tt("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),G$=tt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),U$=tt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Y$=tt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),B$=tt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),q$=tt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),H$=tt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),W$=tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),dt=t=>V0(t[t.length-1]);var hm=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(tt);const X$=dt(hm);var pm=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(tt);const V$=dt(pm);var dm=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(tt);const j$=dt(dm);var gm=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(tt);const Z$=dt(gm);var mm=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(tt);const K$=dt(mm);var ym=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(tt);const Q$=dt(ym);var bm=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(tt);const J$=dt(bm);var vm=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(tt);const t9=dt(vm);var xm=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(tt);const n9=dt(xm);var _m=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(tt);const e9=dt(_m);var wm=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(tt);const r9=dt(wm);var Am=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(tt);const i9=dt(Am);var Mm=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(tt);const o9=dt(Mm);var $m=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(tt);const a9=dt($m);var Sm=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(tt);const u9=dt(Sm);var Tm=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(tt);const s9=dt(Tm);var Dm=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(tt);const c9=dt(Dm);var Pm=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(tt);const l9=dt(Pm);var km=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(tt);const f9=dt(km);var Em=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(tt);const h9=dt(Em);var Nm=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(tt);const p9=dt(Nm);var Lm=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(tt);const d9=dt(Lm);var Cm=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(tt);const g9=dt(Cm);var Im=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(tt);const m9=dt(Im);var Rm=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(tt);const y9=dt(Rm);var Fm=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(tt);const b9=dt(Fm);var Om=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(tt);const v9=dt(Om);function x9(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const _9=ea(vn(300,.5,0),vn(-240,.5,1));var w9=ea(vn(-100,.75,.35),vn(80,1.5,.8)),A9=ea(vn(260,.75,.35),vn(80,1.5,.8)),wu=vn();function M9(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return wu.h=360*t-100,wu.s=1.5-1.5*n,wu.l=.8-.9*n,wu+""}var Au=pr(),$9=Math.PI/3,S9=Math.PI*2/3;function T9(t){var n;return t=(.5-t)*Math.PI,Au.r=255*(n=Math.sin(t))*n,Au.g=255*(n=Math.sin(t+$9))*n,Au.b=255*(n=Math.sin(t+S9))*n,Au+""}function D9(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function Mu(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}const P9=Mu(tt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var k9=Mu(tt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),E9=Mu(tt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),N9=Mu(tt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function J(t){return function(){return t}}const zm=Math.abs,Gt=Math.atan2,ne=Math.cos,L9=Math.max,zr=Math.min,rn=Math.sin,mt=Math.sqrt,Ut=1e-12,ye=Math.PI,$u=ye/2,be=2*ye;function C9(t){return t>1?0:t<-1?ye:Math.acos(t)}function Gm(t){return t>=1?$u:t<=-1?-$u:Math.asin(t)}function eo(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(e==null)n=null;else{const r=Math.floor(e);if(!(r>=0))throw new RangeError(`invalid digits: ${e}`);n=r}return t},()=>new wi(n)}function I9(t){return t.innerRadius}function R9(t){return t.outerRadius}function F9(t){return t.startAngle}function O9(t){return t.endAngle}function z9(t){return t&&t.padAngle}function G9(t,n,e,r,i,o,a,u){var c=e-t,s=r-n,f=a-i,h=u-o,l=h*c-f*s;if(!(l*l<Ut))return l=(f*(n-o)-h*(t-i))/l,[t+l*c,n+l*s]}function Su(t,n,e,r,i,o,a){var u=t-e,c=n-r,s=(a?o:-o)/mt(u*u+c*c),f=s*c,h=-s*u,l=t+f,p=n+h,d=e+f,g=r+h,m=(l+d)/2,y=(p+g)/2,x=d-l,_=g-p,v=x*x+_*_,w=i-o,b=l*g-d*p,A=(_<0?-1:1)*mt(L9(0,w*w*v-b*b)),M=(b*_-x*A)/v,$=(-b*x-_*A)/v,D=(b*_+x*A)/v,S=(-b*x+_*A)/v,L=M-m,E=$-y,T=D-m,k=S-y;return L*L+E*E>T*T+k*k&&(M=D,$=S),{cx:M,cy:$,x01:-f,y01:-h,x11:M*(i/w-1),y11:$*(i/w-1)}}function Um(){var t=I9,n=R9,e=J(0),r=null,i=F9,o=O9,a=z9,u=null,c=eo(s);function s(){var f,h,l=+t.apply(this,arguments),p=+n.apply(this,arguments),d=i.apply(this,arguments)-$u,g=o.apply(this,arguments)-$u,m=zm(g-d),y=g>d;if(u||(u=f=c()),p<l&&(h=p,p=l,l=h),!(p>Ut))u.moveTo(0,0);else if(m>be-Ut)u.moveTo(p*ne(d),p*rn(d)),u.arc(0,0,p,d,g,!y),l>Ut&&(u.moveTo(l*ne(g),l*rn(g)),u.arc(0,0,l,g,d,y));else{var x=d,_=g,v=d,w=g,b=m,A=m,M=a.apply(this,arguments)/2,$=M>Ut&&(r?+r.apply(this,arguments):mt(l*l+p*p)),D=zr(zm(p-l)/2,+e.apply(this,arguments)),S=D,L=D,E,T;if($>Ut){var k=Gm($/l*rn(M)),P=Gm($/p*rn(M));(b-=k*2)>Ut?(k*=y?1:-1,v+=k,w-=k):(b=0,v=w=(d+g)/2),(A-=P*2)>Ut?(P*=y?1:-1,x+=P,_-=P):(A=0,x=_=(d+g)/2)}var N=p*ne(x),C=p*rn(x),R=l*ne(w),O=l*rn(w);if(D>Ut){var U=p*ne(_),W=p*rn(_),lt=l*ne(v),ut=l*rn(v),at;if(m<ye)if(at=G9(N,C,lt,ut,U,W,R,O)){var Tt=N-at[0],ct=C-at[1],$t=U-at[0],z=W-at[1],Q=1/rn(C9((Tt*$t+ct*z)/(mt(Tt*Tt+ct*ct)*mt($t*$t+z*z)))/2),rt=mt(at[0]*at[0]+at[1]*at[1]);S=zr(D,(l-rt)/(Q-1)),L=zr(D,(p-rt)/(Q+1))}else S=L=0}A>Ut?L>Ut?(E=Su(lt,ut,N,C,p,L,y),T=Su(U,W,R,O,p,L,y),u.moveTo(E.cx+E.x01,E.cy+E.y01),L<D?u.arc(E.cx,E.cy,L,Gt(E.y01,E.x01),Gt(T.y01,T.x01),!y):(u.arc(E.cx,E.cy,L,Gt(E.y01,E.x01),Gt(E.y11,E.x11),!y),u.arc(0,0,p,Gt(E.cy+E.y11,E.cx+E.x11),Gt(T.cy+T.y11,T.cx+T.x11),!y),u.arc(T.cx,T.cy,L,Gt(T.y11,T.x11),Gt(T.y01,T.x01),!y))):(u.moveTo(N,C),u.arc(0,0,p,x,_,!y)):u.moveTo(N,C),!(l>Ut)||!(b>Ut)?u.lineTo(R,O):S>Ut?(E=Su(R,O,U,W,l,-S,y),T=Su(N,C,lt,ut,l,-S,y),u.lineTo(E.cx+E.x01,E.cy+E.y01),S<D?u.arc(E.cx,E.cy,S,Gt(E.y01,E.x01),Gt(T.y01,T.x01),!y):(u.arc(E.cx,E.cy,S,Gt(E.y01,E.x01),Gt(E.y11,E.x11),!y),u.arc(0,0,l,Gt(E.cy+E.y11,E.cx+E.x11),Gt(T.cy+T.y11,T.cx+T.x11),y),u.arc(T.cx,T.cy,S,Gt(T.y11,T.x11),Gt(T.y01,T.x01),!y))):u.arc(0,0,l,w,v,y)}if(u.closePath(),f)return u=null,f+""||null}return s.centroid=function(){var f=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ye/2;return[ne(h)*f,rn(h)*f]},s.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:J(+f),s):t},s.outerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:J(+f),s):n},s.cornerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:J(+f),s):e},s.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:J(+f),s):r},s.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:J(+f),s):i},s.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:J(+f),s):o},s.padAngle=function(f){return arguments.length?(a=typeof f=="function"?f:J(+f),s):a},s.context=function(f){return arguments.length?(u=f??null,s):u},s}var U9=Array.prototype.slice;function Tu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Ym(t){this._context=t}Ym.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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n);break}}};function Du(t){return new Ym(t)}function hf(t){return t[0]}function pf(t){return t[1]}function Pu(t,n){var e=J(!0),r=null,i=Du,o=null,a=eo(u);t=typeof t=="function"?t:t===void 0?hf:J(t),n=typeof n=="function"?n:n===void 0?pf:J(n);function u(c){var s,f=(c=Tu(c)).length,h,l=!1,p;for(r==null&&(o=i(p=a())),s=0;s<=f;++s)!(s<f&&e(h=c[s],s,c))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(h,s,c),+n(h,s,c));if(p)return o=null,p+""||null}return u.x=function(c){return arguments.length?(t=typeof c=="function"?c:J(+c),u):t},u.y=function(c){return arguments.length?(n=typeof c=="function"?c:J(+c),u):n},u.defined=function(c){return arguments.length?(e=typeof c=="function"?c:J(!!c),u):e},u.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),u):i},u.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),u):r},u}function Bm(t,n,e){var r=null,i=J(!0),o=null,a=Du,u=null,c=eo(s);t=typeof t=="function"?t:t===void 0?hf:J(+t),n=typeof n=="function"?n:J(n===void 0?0:+n),e=typeof e=="function"?e:e===void 0?pf:J(+e);function s(h){var l,p,d,g=(h=Tu(h)).length,m,y=!1,x,_=new Array(g),v=new Array(g);for(o==null&&(u=a(x=c())),l=0;l<=g;++l){if(!(l<g&&i(m=h[l],l,h))===y)if(y=!y)p=l,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),d=l-1;d>=p;--d)u.point(_[d],v[d]);u.lineEnd(),u.areaEnd()}y&&(_[l]=+t(m,l,h),v[l]=+n(m,l,h),u.point(r?+r(m,l,h):_[l],e?+e(m,l,h):v[l]))}if(x)return u=null,x+""||null}function f(){return Pu().defined(i).curve(a).context(o)}return s.x=function(h){return arguments.length?(t=typeof h=="function"?h:J(+h),r=null,s):t},s.x0=function(h){return arguments.length?(t=typeof h=="function"?h:J(+h),s):t},s.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:J(+h),s):r},s.y=function(h){return arguments.length?(n=typeof h=="function"?h:J(+h),e=null,s):n},s.y0=function(h){return arguments.length?(n=typeof h=="function"?h:J(+h),s):n},s.y1=function(h){return arguments.length?(e=h==null?null:typeof h=="function"?h:J(+h),s):e},s.lineX0=s.lineY0=function(){return f().x(t).y(n)},s.lineY1=function(){return f().x(t).y(e)},s.lineX1=function(){return f().x(r).y(n)},s.defined=function(h){return arguments.length?(i=typeof h=="function"?h:J(!!h),s):i},s.curve=function(h){return arguments.length?(a=h,o!=null&&(u=a(o)),s):a},s.context=function(h){return arguments.length?(h==null?o=u=null:u=a(o=h),s):o},s}function Y9(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function B9(t){return t}function qm(){var t=B9,n=Y9,e=null,r=J(0),i=J(be),o=J(0);function a(u){var c,s=(u=Tu(u)).length,f,h,l=0,p=new Array(s),d=new Array(s),g=+r.apply(this,arguments),m=Math.min(be,Math.max(-be,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(m)/s,o.apply(this,arguments)),_=x*(m<0?-1:1),v;for(c=0;c<s;++c)(v=d[p[c]=c]=+t(u[c],c,u))>0&&(l+=v);for(n!=null?p.sort(function(w,b){return n(d[w],d[b])}):e!=null&&p.sort(function(w,b){return e(u[w],u[b])}),c=0,h=l?(m-s*_)/l:0;c<s;++c,g=y)f=p[c],v=d[f],y=g+(v>0?v*h:0)+_,d[f]={data:u[f],index:c,value:v,startAngle:g,endAngle:y,padAngle:x};return d}return a.value=function(u){return arguments.length?(t=typeof u=="function"?u:J(+u),a):t},a.sortValues=function(u){return arguments.length?(n=u,e=null,a):n},a.sort=function(u){return arguments.length?(e=u,n=null,a):e},a.startAngle=function(u){return arguments.length?(r=typeof u=="function"?u:J(+u),a):r},a.endAngle=function(u){return arguments.length?(i=typeof u=="function"?u:J(+u),a):i},a.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:J(+u),a):o},a}var Hm=df(Du);function Wm(t){this._curve=t}Wm.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};function df(t){function n(e){return new Wm(t(e))}return n._curve=t,n}function ro(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(e){return arguments.length?n(df(e)):n()._curve},t}function Xm(){return ro(Pu().curve(Hm))}function Vm(){var t=Bm().curve(Hm),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return ro(e())},delete t.lineX0,t.lineEndAngle=function(){return ro(r())},delete t.lineX1,t.lineInnerRadius=function(){return ro(i())},delete t.lineY0,t.lineOuterRadius=function(){return ro(o())},delete t.lineY1,t.curve=function(a){return arguments.length?n(df(a)):n()._curve},t}function io(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}class jm{constructor(n,e){this._context=n,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,e){switch(n=+n,e=+e,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,e):this._context.moveTo(n,e);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,e,n,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,n,this._y0,n,e);break}}this._x0=n,this._y0=e}}class q9{constructor(n){this._context=n}lineStart(){this._point=0}lineEnd(){}point(n,e){if(n=+n,e=+e,this._point===0)this._point=1;else{const r=io(this._x0,this._y0),i=io(this._x0,this._y0=(this._y0+e)/2),o=io(n,this._y0),a=io(n,e);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=n,this._y0=e}}function Zm(t){return new jm(t,!0)}function Km(t){return new jm(t,!1)}function H9(t){return new q9(t)}function W9(t){return t.source}function X9(t){return t.target}function ku(t){let n=W9,e=X9,r=hf,i=pf,o=null,a=null,u=eo(c);function c(){let s;const f=U9.call(arguments),h=n.apply(this,f),l=e.apply(this,f);if(o==null&&(a=t(s=u())),a.lineStart(),f[0]=h,a.point(+r.apply(this,f),+i.apply(this,f)),f[0]=l,a.point(+r.apply(this,f),+i.apply(this,f)),a.lineEnd(),s)return a=null,s+""||null}return c.source=function(s){return arguments.length?(n=s,c):n},c.target=function(s){return arguments.length?(e=s,c):e},c.x=function(s){return arguments.length?(r=typeof s=="function"?s:J(+s),c):r},c.y=function(s){return arguments.length?(i=typeof s=="function"?s:J(+s),c):i},c.context=function(s){return arguments.length?(s==null?o=a=null:a=t(o=s),c):o},c}function V9(){return ku(Zm)}function j9(){return ku(Km)}function Z9(){const t=ku(H9);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const K9=mt(3),Qm={draw(t,n){const e=mt(n+zr(n/28,.75))*.59436,r=e/2,i=r*K9;t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},Eu={draw(t,n){const e=mt(n/ye);t.moveTo(e,0),t.arc(0,0,e,0,be)}},Jm={draw(t,n){const e=mt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},ty=mt(1/3),Q9=ty*2,ny={draw(t,n){const e=mt(n/Q9),r=e*ty;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},ey={draw(t,n){const e=mt(n)*.62625;t.moveTo(0,-e),t.lineTo(e,0),t.lineTo(0,e),t.lineTo(-e,0),t.closePath()}},ry={draw(t,n){const e=mt(n-zr(n/7,2))*.87559;t.moveTo(-e,0),t.lineTo(e,0),t.moveTo(0,e),t.lineTo(0,-e)}},iy={draw(t,n){const e=mt(n),r=-e/2;t.rect(r,r,e,e)}},oy={draw(t,n){const e=mt(n)*.4431;t.moveTo(e,e),t.lineTo(e,-e),t.lineTo(-e,-e),t.lineTo(-e,e),t.closePath()}},J9=.8908130915292852,ay=rn(ye/10)/rn(7*ye/10),tS=rn(be/10)*ay,nS=-ne(be/10)*ay,uy={draw(t,n){const e=mt(n*J9),r=tS*e,i=nS*e;t.moveTo(0,-e),t.lineTo(r,i);for(let o=1;o<5;++o){const a=be*o/5,u=ne(a),c=rn(a);t.lineTo(c*e,-u*e),t.lineTo(u*r-c*i,c*r+u*i)}t.closePath()}},gf=mt(3),sy={draw(t,n){const e=-mt(n/(gf*3));t.moveTo(0,e*2),t.lineTo(-gf*e,-e),t.lineTo(gf*e,-e),t.closePath()}},eS=mt(3),cy={draw(t,n){const e=mt(n)*.6824,r=e/2,i=e*eS/2;t.moveTo(0,-e),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},gn=-.5,mn=mt(3)/2,mf=1/mt(12),rS=(mf/2+1)*3,ly={draw(t,n){const e=mt(n/rS),r=e/2,i=e*mf,o=r,a=e*mf+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(gn*r-mn*i,mn*r+gn*i),t.lineTo(gn*o-mn*a,mn*o+gn*a),t.lineTo(gn*u-mn*c,mn*u+gn*c),t.lineTo(gn*r+mn*i,gn*i-mn*r),t.lineTo(gn*o+mn*a,gn*a-mn*o),t.lineTo(gn*u+mn*c,gn*c-mn*u),t.closePath()}},yf={draw(t,n){const e=mt(n-zr(n/6,1.7))*.6189;t.moveTo(-e,-e),t.lineTo(e,e),t.moveTo(-e,e),t.lineTo(e,-e)}},fy=[Eu,Jm,ny,iy,uy,sy,ly],iS=[Eu,ry,yf,cy,Qm,oy,ey];function oS(t,n){let e=null,r=eo(i);t=typeof t=="function"?t:J(t||Eu),n=typeof n=="function"?n:J(n===void 0?64:+n);function i(){let o;if(e||(e=o=r()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),o)return e=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:J(o),i):t},i.size=function(o){return arguments.length?(n=typeof o=="function"?o:J(+o),i):n},i.context=function(o){return arguments.length?(e=o??null,i):e},i}function ve(){}function Nu(t,n,e){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+n)/6,(t._y0+4*t._y1+e)/6)}function Lu(t){this._context=t}Lu.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:Nu(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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);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:Nu(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function aS(t){return new Lu(t)}function hy(t){this._context=t}hy.prototype={areaStart:ve,areaEnd:ve,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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:Nu(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function uS(t){return new hy(t)}function py(t){this._context=t}py.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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:Nu(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function sS(t){return new py(t)}function dy(t,n){this._basis=new Lu(t),this._beta=n}dy.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r=t[0],i=n[0],o=t[e]-r,a=n[e]-i,u=-1,c;++u<=e;)c=u/e,this._basis.point(this._beta*t[u]+(1-this._beta)*(r+c*o),this._beta*n[u]+(1-this._beta)*(i+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};const cS=function t(n){function e(r){return n===1?new Lu(r):new dy(r,n)}return e.beta=function(r){return t(+r)},e}(.85);function Cu(t,n,e){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-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function bf(t,n){this._context=t,this._k=(1-n)/6}bf.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:Cu(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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Cu(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const lS=function t(n){function e(r){return new bf(r,n)}return e.tension=function(r){return t(+r)},e}(0);function vf(t,n){this._context=t,this._k=(1-n)/6}vf.prototype={areaStart:ve,areaEnd:ve,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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Cu(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const fS=function t(n){function e(r){return new vf(r,n)}return e.tension=function(r){return t(+r)},e}(0);function xf(t,n){this._context=t,this._k=(1-n)/6}xf.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,n){switch(t=+t,n=+n,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:Cu(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const hS=function t(n){function e(r){return new xf(r,n)}return e.tension=function(r){return t(+r)},e}(0);function _f(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ut){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Ut){var s=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*s+t._x1*t._l23_2a-n*t._l12_2a)/f,a=(a*s+t._y1*t._l23_2a-e*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function gy(t,n){this._context=t,this._alpha=n}gy.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,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:_f(this,t,n);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=n}};const pS=function t(n){function e(r){return n?new gy(r,n):new bf(r,0)}return e.alpha=function(r){return t(+r)},e}(.5);function my(t,n){this._context=t,this._alpha=n}my.prototype={areaStart:ve,areaEnd:ve,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,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:_f(this,t,n);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=n}};const dS=function t(n){function e(r){return n?new my(r,n):new vf(r,0)}return e.alpha=function(r){return t(+r)},e}(.5);function yy(t,n){this._context=t,this._alpha=n}yy.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,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_f(this,t,n);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=n}};const gS=function t(n){function e(r){return n?new yy(r,n):new xf(r,0)}return e.alpha=function(r){return t(+r)},e}(.5);function by(t){this._context=t}by.prototype={areaStart:ve,areaEnd:ve,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};function mS(t){return new by(t)}function vy(t){return t<0?-1:1}function xy(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(e-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(vy(o)+vy(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function _y(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function wf(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function Iu(t){this._context=t}Iu.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:wf(this,this._t0,_y(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,!(t===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,wf(this,_y(this,e=xy(this,t,n)),e);break;default:wf(this,this._t0,e=xy(this,t,n));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}};function wy(t){this._context=new Ay(t)}(wy.prototype=Object.create(Iu.prototype)).point=function(t,n){Iu.prototype.point.call(this,n,t)};function Ay(t){this._context=t}Ay.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}};function yS(t){return new Iu(t)}function bS(t){return new wy(t)}function My(t){this._context=t}My.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),e===2)this._context.lineTo(t[1],n[1]);else for(var r=$y(t),i=$y(n),o=0,a=1;a<e;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],n[a]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}};function $y(t){var n,e=t.length-1,r,i=new Array(e),o=new Array(e),a=new Array(e);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n<e-1;++n)i[n]=1,o[n]=4,a[n]=4*t[n]+2*t[n+1];for(i[e-1]=2,o[e-1]=7,a[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)r=i[n]/o[n-1],o[n]-=r,a[n]-=r*a[n-1];for(i[e-1]=a[e-1]/o[e-1],n=e-2;n>=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[e-1]=(t[e]+i[e-1])/2,n=0;n<e-1;++n)o[n]=2*t[n+1]-i[n+1];return[i,o]}function vS(t){return new My(t)}function Ru(t,n){this._context=t,this._t=n}Ru.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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}break}}this._x=t,this._y=n}};function xS(t){return new Ru(t,.5)}function _S(t){return new Ru(t,0)}function wS(t){return new Ru(t,1)}function Gr(t,n){if((a=t.length)>1)for(var e=1,r,i,o=t[n[0]],a,u=o.length;e<a;++e)for(i=o,o=t[n[e]],r=0;r<u;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Ur(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e}function AS(t,n){return t[n]}function MS(t){const n=[];return n.key=t,n}function $S(){var t=J([]),n=Ur,e=Gr,r=AS;function i(o){var a=Array.from(t.apply(this,arguments),MS),u,c=a.length,s=-1,f;for(const h of o)for(u=0,++s;u<c;++u)(a[u][s]=[0,+r(h,a[u].key,s,o)]).data=h;for(u=0,f=Tu(n(a));u<c;++u)a[f[u]].index=u;return e(a,f),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:J(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:J(+o),i):r},i.order=function(o){return arguments.length?(n=o==null?Ur:typeof o=="function"?o:J(Array.from(o)),i):n},i.offset=function(o){return arguments.length?(e=o??Gr,i):e},i}function SS(t,n){if((r=t.length)>0){for(var e,r,i=0,o=t[0].length,a;i<o;++i){for(a=e=0;e<r;++e)a+=t[e][i][1]||0;if(a)for(e=0;e<r;++e)t[e][i][1]/=a}Gr(t,n)}}function TS(t,n){if((c=t.length)>0)for(var e,r=0,i,o,a,u,c,s=t[n[0]].length;r<s;++r)for(a=u=0,e=0;e<c;++e)(o=(i=t[n[e]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=u,i[0]=u+=o):(i[0]=0,i[1]=o)}function DS(t,n){if((i=t.length)>0){for(var e=0,r=t[n[0]],i,o=r.length;e<o;++e){for(var a=0,u=0;a<i;++a)u+=t[a][e][1]||0;r[e][1]+=r[e][0]=-u/2}Gr(t,n)}}function PS(t,n){if(!(!((a=t.length)>0)||!((o=(i=t[n[0]]).length)>0))){for(var e=0,r=1,i,o,a;r<o;++r){for(var u=0,c=0,s=0;u<a;++u){for(var f=t[n[u]],h=f[r][1]||0,l=f[r-1][1]||0,p=(h-l)/2,d=0;d<u;++d){var g=t[n[d]],m=g[r][1]||0,y=g[r-1][1]||0;p+=m-y}c+=h,s+=p*h}i[r-1][1]+=i[r-1][0]=e,c&&(e-=s/c)}i[r-1][1]+=i[r-1][0]=e,Gr(t,n)}}function Sy(t){var n=t.map(kS);return Ur(t).sort(function(e,r){return n[e]-n[r]})}function kS(t){for(var n=-1,e=0,r=t.length,i,o=-1/0;++n<r;)(i=+t[n][1])>o&&(o=i,e=n);return e}function Ty(t){var n=t.map(Dy);return Ur(t).sort(function(e,r){return n[e]-n[r]})}function Dy(t){for(var n=0,e=-1,r=t.length,i;++e<r;)(i=+t[e][1])&&(n+=i);return n}function ES(t){return Ty(t).reverse()}function NS(t){var n=t.length,e,r,i=t.map(Dy),o=Sy(t),a=0,u=0,c=[],s=[];for(e=0;e<n;++e)r=o[e],a<u?(a+=i[r],c.push(r)):(u+=i[r],s.push(r));return s.reverse().concat(c)}function LS(t){return Ur(t).reverse()}const Fu=t=>()=>t;function CS(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function zn(t,n,e){this.k=t,this.x=n,this.y=e}zn.prototype={constructor:zn,scale:function(t){return t===1?this:new zn(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new zn(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ou=new zn(1,0,0);Py.prototype=zn.prototype;function Py(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Ou;return t.__zoom}function Af(t){t.stopImmediatePropagation()}function oo(t){t.preventDefault(),t.stopImmediatePropagation()}function IS(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function RS(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function ky(){return this.__zoom||Ou}function FS(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function OS(){return navigator.maxTouchPoints||"ontouchstart"in this}function zS(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Ey(){var t=IS,n=RS,e=zS,r=FS,i=OS,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,c=op,s=Te("start","zoom","end"),f,h,l,p=500,d=150,g=0,m=10;function y(T){T.property("__zoom",ky).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",E).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(T,k,P,N){var C=T.selection?T.selection():T;C.property("__zoom",ky),T!==C?w(T,k,P,N):C.interrupt().each(function(){b(this,arguments).event(N).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},y.scaleBy=function(T,k,P,N){y.scaleTo(T,function(){var C=this.__zoom.k,R=typeof k=="function"?k.apply(this,arguments):k;return C*R},P,N)},y.scaleTo=function(T,k,P,N){y.transform(T,function(){var C=n.apply(this,arguments),R=this.__zoom,O=P==null?v(C):typeof P=="function"?P.apply(this,arguments):P,U=R.invert(O),W=typeof k=="function"?k.apply(this,arguments):k;return e(_(x(R,W),O,U),C,a)},P,N)},y.translateBy=function(T,k,P,N){y.transform(T,function(){return e(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof P=="function"?P.apply(this,arguments):P),n.apply(this,arguments),a)},null,N)},y.translateTo=function(T,k,P,N,C){y.transform(T,function(){var R=n.apply(this,arguments),O=this.__zoom,U=N==null?v(R):typeof N=="function"?N.apply(this,arguments):N;return e(Ou.translate(U[0],U[1]).scale(O.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof P=="function"?-P.apply(this,arguments):-P),R,a)},N,C)};function x(T,k){return k=Math.max(o[0],Math.min(o[1],k)),k===T.k?T:new zn(k,T.x,T.y)}function _(T,k,P){var N=k[0]-P[0]*T.k,C=k[1]-P[1]*T.k;return N===T.x&&C===T.y?T:new zn(T.k,N,C)}function v(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function w(T,k,P,N){T.on("start.zoom",function(){b(this,arguments).event(N).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(N).end()}).tween("zoom",function(){var C=this,R=arguments,O=b(C,R).event(N),U=n.apply(C,R),W=P==null?v(U):typeof P=="function"?P.apply(C,R):P,lt=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),ut=C.__zoom,at=typeof k=="function"?k.apply(C,R):k,Tt=c(ut.invert(W).concat(lt/ut.k),at.invert(W).concat(lt/at.k));return function(ct){if(ct===1)ct=at;else{var $t=Tt(ct),z=lt/$t[2];ct=new zn(z,W[0]-$t[0]*z,W[1]-$t[1]*z)}O.zoom(null,ct)}})}function b(T,k,P){return!P&&T.__zooming||new A(T,k)}function A(T,k){this.that=T,this.args=k,this.active=0,this.sourceEvent=null,this.extent=n.apply(T,k),this.taps=0}A.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,k){return this.mouse&&T!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var k=Z(this.that).datum();s.call(T,this.that,new CS(T,{sourceEvent:this.sourceEvent,target:y,type:T,transform:this.that.__zoom,dispatch:s}),k)}};function M(T,...k){if(!t.apply(this,arguments))return;var P=b(this,k).event(T),N=this.__zoom,C=Math.max(o[0],Math.min(o[1],N.k*Math.pow(2,r.apply(this,arguments)))),R=an(T);if(P.wheel)(P.mouse[0][0]!==R[0]||P.mouse[0][1]!==R[1])&&(P.mouse[1]=N.invert(P.mouse[0]=R)),clearTimeout(P.wheel);else{if(N.k===C)return;P.mouse=[R,N.invert(R)],Ie(this),P.start()}oo(T),P.wheel=setTimeout(O,d),P.zoom("mouse",e(_(x(N,C),P.mouse[0],P.mouse[1]),P.extent,a));function O(){P.wheel=null,P.end()}}function $(T,...k){if(l||!t.apply(this,arguments))return;var P=T.currentTarget,N=b(this,k,!0).event(T),C=Z(T.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",lt,!0),R=an(T,P),O=T.clientX,U=T.clientY;Uo(T.view),Af(T),N.mouse=[R,this.__zoom.invert(R)],Ie(this),N.start();function W(ut){if(oo(ut),!N.moved){var at=ut.clientX-O,Tt=ut.clientY-U;N.moved=at*at+Tt*Tt>g}N.event(ut).zoom("mouse",e(_(N.that.__zoom,N.mouse[0]=an(ut,P),N.mouse[1]),N.extent,a))}function lt(ut){C.on("mousemove.zoom mouseup.zoom",null),Yo(ut.view,N.moved),oo(ut),N.event(ut).end()}}function D(T,...k){if(t.apply(this,arguments)){var P=this.__zoom,N=an(T.changedTouches?T.changedTouches[0]:T,this),C=P.invert(N),R=P.k*(T.shiftKey?.5:2),O=e(_(x(P,R),N,C),n.apply(this,k),a);oo(T),u>0?Z(this).transition().duration(u).call(w,O,N,T):Z(this).call(y.transform,O,N,T)}}function S(T,...k){if(t.apply(this,arguments)){var P=T.touches,N=P.length,C=b(this,k,T.changedTouches.length===N).event(T),R,O,U,W;for(Af(T),O=0;O<N;++O)U=P[O],W=an(U,this),W=[W,this.__zoom.invert(W),U.identifier],C.touch0?!C.touch1&&C.touch0[2]!==W[2]&&(C.touch1=W,C.taps=0):(C.touch0=W,R=!0,C.taps=1+!!f);f&&(f=clearTimeout(f)),R&&(C.taps<2&&(h=W[0],f=setTimeout(function(){f=null},p)),Ie(this),C.start())}}function L(T,...k){if(this.__zooming){var P=b(this,k).event(T),N=T.changedTouches,C=N.length,R,O,U,W;for(oo(T),R=0;R<C;++R)O=N[R],U=an(O,this),P.touch0&&P.touch0[2]===O.identifier?P.touch0[0]=U:P.touch1&&P.touch1[2]===O.identifier&&(P.touch1[0]=U);if(O=P.that.__zoom,P.touch1){var lt=P.touch0[0],ut=P.touch0[1],at=P.touch1[0],Tt=P.touch1[1],ct=(ct=at[0]-lt[0])*ct+(ct=at[1]-lt[1])*ct,$t=($t=Tt[0]-ut[0])*$t+($t=Tt[1]-ut[1])*$t;O=x(O,Math.sqrt(ct/$t)),U=[(lt[0]+at[0])/2,(lt[1]+at[1])/2],W=[(ut[0]+Tt[0])/2,(ut[1]+Tt[1])/2]}else if(P.touch0)U=P.touch0[0],W=P.touch0[1];else return;P.zoom("touch",e(_(O,U,W),P.extent,a))}}function E(T,...k){if(this.__zooming){var P=b(this,k).event(T),N=T.changedTouches,C=N.length,R,O;for(Af(T),l&&clearTimeout(l),l=setTimeout(function(){l=null},p),R=0;R<C;++R)O=N[R],P.touch0&&P.touch0[2]===O.identifier?delete P.touch0:P.touch1&&P.touch1[2]===O.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&(O=an(O,this),Math.hypot(h[0]-O[0],h[1]-O[1])<m)){var U=Z(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return y.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:Fu(+T),y):r},y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:Fu(!!T),y):t},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Fu(!!T),y):i},y.extent=function(T){return arguments.length?(n=typeof T=="function"?T:Fu([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),y):n},y.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],y):[o[0],o[1]]},y.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(T){return arguments.length?(e=T,y):e},y.duration=function(T){return arguments.length?(u=+T,y):u},y.interpolate=function(T){return arguments.length?(c=T,y):c},y.on=function(){var T=s.on.apply(s,arguments);return T===s?y:T},y.clickDistance=function(T){return arguments.length?(g=(T=+T)*T,y):Math.sqrt(g)},y.tapDistance=function(T){return arguments.length?(m=+T,y):m},y}const Ny=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:Cc,FormatSpecifier:wa,InternMap:ei,InternSet:Me,Node:He,Path:wi,Voronoi:Xp,ZoomTransform:zn,active:Y6,arc:Um,area:Bm,areaRadial:Vm,ascending:bt,autoType:h8,axisBottom:Cx,axisLeft:Is,axisRight:Lx,axisTop:u0,bin:Kh,bisect:Ae,bisectCenter:P2,bisectLeft:D2,bisectRight:Rh,bisector:To,blob:g8,blur:k2,blur2:Fh,blurImage:E2,brush:n5,brushSelection:Q6,brushX:J6,brushY:t5,buffer:y8,chord:r5,chordDirected:o5,chordTranspose:i5,cluster:P7,color:ce,contourDensity:E5,contours:Pc,count:Po,create:gw,creator:Oo,cross:O2,csv:x8,csvFormat:n8,csvFormatBody:e8,csvFormatRow:i8,csvFormatRows:r8,csvFormatValue:o8,csvParse:Kp,csvParseRows:t8,cubehelix:vn,cumsum:z2,curveBasis:aS,curveBasisClosed:uS,curveBasisOpen:sS,curveBumpX:Zm,curveBumpY:Km,curveBundle:cS,curveCardinal:lS,curveCardinalClosed:fS,curveCardinalOpen:hS,curveCatmullRom:pS,curveCatmullRomClosed:dS,curveCatmullRomOpen:gS,curveLinear:Du,curveLinearClosed:mS,curveMonotoneX:yS,curveMonotoneY:bS,curveNatural:vS,curveStep:xS,curveStepAfter:wS,curveStepBefore:_S,descending:Ch,deviation:Gh,difference:_x,disjoint:wx,dispatch:Te,drag:v0,dragDisable:Uo,dragEnable:Yo,dsv:v8,dsvFormat:ba,easeBack:Tp,easeBackIn:C6,easeBackInOut:Tp,easeBackOut:I6,easeBounce:xi,easeBounceIn:N6,easeBounceInOut:L6,easeBounceOut:xi,easeCircle:Sp,easeCircleIn:w6,easeCircleInOut:Sp,easeCircleOut:A6,easeCubic:vi,easeCubicIn:d6,easeCubicInOut:vi,easeCubicOut:g6,easeElastic:fa,easeElasticIn:R6,easeElasticInOut:F6,easeElasticOut:fa,easeExp:$p,easeExpIn:x6,easeExpInOut:$p,easeExpOut:_6,easeLinear:f6,easePoly:_p,easePolyIn:m6,easePolyInOut:_p,easePolyOut:y6,easeQuad:xp,easeQuadIn:h6,easeQuadInOut:xp,easeQuadOut:p6,easeSin:Mp,easeSinIn:b6,easeSinInOut:Mp,easeSinOut:v6,every:gx,extent:ni,fcumsum:U2,filter:yx,flatGroup:Y2,flatRollup:B2,forceCenter:D8,forceCollide:ed,forceLink:V8,forceManyBody:ad,forceRadial:e4,forceSimulation:od,forceX:ud,forceY:sd,get format(){return Si},formatDefaultLocale:md,formatLocale:gd,get formatPrefix(){return Gc},formatSpecifier:$r,fsum:G2,geoAlbers:kg,geoAlbersUsa:u7,geoArea:h4,geoAzimuthalEqualArea:s7,geoAzimuthalEqualAreaRaw:$l,geoAzimuthalEquidistant:c7,geoAzimuthalEquidistantRaw:Sl,geoBounds:m4,geoCentroid:w4,geoCircle:A4,geoClipAntimeridian:il,geoClipCircle:Qd,geoClipExtent:k4,geoClipRectangle:qa,geoConicConformal:f7,geoConicConformalRaw:Lg,geoConicEqualArea:eu,geoConicEqualAreaRaw:Pg,geoConicEquidistant:p7,geoConicEquidistantRaw:Cg,geoContains:F4,geoDistance:Xa,geoEqualEarth:g7,geoEqualEarthRaw:Tl,geoEquirectangular:h7,geoEquirectangularRaw:Yi,geoGnomonic:m7,geoGnomonicRaw:Dl,geoGraticule:sg,geoGraticule10:O4,geoIdentity:y7,geoInterpolate:z4,geoLength:Jd,geoMercator:l7,geoMercatorRaw:Ui,geoNaturalEarth1:b7,geoNaturalEarth1Raw:Pl,geoOrthographic:v7,geoOrthographicRaw:kl,geoPath:K4,geoProjection:Rn,geoProjectionMutator:Al,geoRotation:qd,geoStereographic:x7,geoStereographicRaw:El,geoStream:_n,geoTransform:Q4,geoTransverseMercator:_7,geoTransverseMercatorRaw:Nl,gray:Iw,greatest:Qh,greatestIndex:cx,group:qh,groupSort:W2,groups:Hh,hcl:Zo,hierarchy:Ll,histogram:Kh,hsl:Wo,html:S8,image:w8,index:q2,indexes:H2,interpolate:le,interpolateArray:Uw,interpolateBasis:q0,interpolateBasisClosed:H0,interpolateBlues:d9,interpolateBrBG:X$,interpolateBuGn:e9,interpolateBuPu:r9,interpolateCividis:x9,interpolateCool:A9,interpolateCubehelix:e3,interpolateCubehelixDefault:_9,interpolateCubehelixLong:ea,interpolateDate:K0,interpolateDiscrete:qw,interpolateGnBu:i9,interpolateGreens:g9,interpolateGreys:m9,interpolateHcl:t3,interpolateHclLong:n3,interpolateHsl:Kw,interpolateHslLong:Qw,interpolateHue:Hw,interpolateInferno:E9,interpolateLab:Jw,interpolateMagma:k9,interpolateNumber:ln,interpolateNumberArray:tc,interpolateObject:Q0,interpolateOrRd:o9,interpolateOranges:v9,interpolatePRGn:V$,interpolatePiYG:j$,interpolatePlasma:N9,interpolatePuBu:u9,interpolatePuBuGn:a9,interpolatePuOr:Z$,interpolatePuRd:s9,interpolatePurples:y9,interpolateRainbow:M9,interpolateRdBu:K$,interpolateRdGy:Q$,interpolateRdPu:c9,interpolateRdYlBu:J$,interpolateRdYlGn:t9,interpolateReds:b9,interpolateRgb:hi,interpolateRgbBasis:V0,interpolateRgbBasisClosed:Gw,interpolateRound:ta,interpolateSinebow:T9,interpolateSpectral:n9,interpolateString:rc,interpolateTransformCss:ep,interpolateTransformSvg:rp,interpolateTurbo:D9,interpolateViridis:P9,interpolateWarm:w9,interpolateYlGn:f9,interpolateYlGnBu:l9,interpolateYlOrBr:h9,interpolateYlOrRd:p9,interpolateZoom:op,interrupt:Ie,intersection:Ax,interval:u3,isoFormat:S$,isoParse:P$,json:M8,lab:jo,lch:Rw,least:sx,leastIndex:n0,line:Pu,lineRadial:Xm,link:ku,linkHorizontal:V9,linkRadial:Z9,linkVertical:j9,local:y0,map:bx,matcher:zs,max:ri,maxIndex:Es,mean:tx,median:nx,medianIndex:ex,merge:Ls,min:No,minIndex:Ns,mode:ix,namespace:ui,namespaces:Fs,nice:Ps,now:yi,pack:oA,packEnclose:J7,packSiblings:rA,pairs:ox,partition:aA,path:Dc,pathRound:s5,permute:Zh,pie:qm,piecewise:cp,pointRadial:io,pointer:an,pointers:yw,polygonArea:wA,polygonCentroid:AA,polygonContains:TA,polygonHull:SA,polygonLength:DA,precisionFixed:yd,precisionPrefix:bd,precisionRound:vd,quadtree:xa,quantile:oi,quantileIndex:t0,quantileSorted:Jh,quantize:r3,quickselect:Lo,radialArea:Vm,radialLine:Xm,randomBates:NA,randomBernoulli:IA,randomBeta:e1,randomBinomial:r1,randomCauchy:FA,randomExponential:LA,randomGamma:Yl,randomGeometric:n1,randomInt:kA,randomIrwinHall:t1,randomLcg:YA,randomLogNormal:EA,randomLogistic:OA,randomNormal:Ul,randomPareto:CA,randomPoisson:zA,randomUniform:PA,randomWeibull:RA,range:ue,rank:ux,reduce:vx,reverse:xx,rgb:pr,ribbon:m5,ribbonArrow:y5,rollup:Xh,rollups:Vh,scaleBand:Hl,scaleDiverging:cm,scaleDivergingLog:lm,scaleDivergingPow:ff,scaleDivergingSqrt:I$,scaleDivergingSymlog:fm,scaleIdentity:s1,scaleImplicit:Bl,scaleLinear:jl,scaleLog:p1,scaleOrdinal:ql,scalePoint:Wl,scalePow:hu,scaleQuantile:x1,scaleQuantize:_1,scaleRadial:v1,scaleSequential:om,scaleSequentialLog:am,scaleSequentialPow:lf,scaleSequentialQuantile:sm,scaleSequentialSqrt:C$,scaleSequentialSymlog:um,scaleSqrt:tM,scaleSymlog:m1,scaleThreshold:w1,scaleTime:N$,scaleUtc:L$,scan:lx,schemeAccent:F$,schemeBlues:Lm,schemeBrBG:hm,schemeBuGn:_m,schemeBuPu:wm,schemeCategory10:R$,schemeDark2:O$,schemeGnBu:Am,schemeGreens:Cm,schemeGreys:Im,schemeObservable10:z$,schemeOrRd:Mm,schemeOranges:Om,schemePRGn:pm,schemePaired:G$,schemePastel1:U$,schemePastel2:Y$,schemePiYG:dm,schemePuBu:Sm,schemePuBuGn:$m,schemePuOr:gm,schemePuRd:Tm,schemePurples:Rm,schemeRdBu:mm,schemeRdGy:ym,schemeRdPu:Dm,schemeRdYlBu:bm,schemeRdYlGn:vm,schemeReds:Fm,schemeSet1:B$,schemeSet2:q$,schemeSet3:H$,schemeSpectral:xm,schemeTableau10:W$,schemeYlGn:km,schemeYlGnBu:Pm,schemeYlOrBr:Em,schemeYlOrRd:Nm,select:Z,selectAll:bw,selection:Pe,selector:zo,selectorAll:Os,shuffle:fx,shuffler:e0,some:mx,sort:Ss,stack:$S,stackOffsetDiverging:TS,stackOffsetExpand:SS,stackOffsetNone:Gr,stackOffsetSilhouette:DS,stackOffsetWiggle:PS,stackOrderAppearance:Sy,stackOrderAscending:Ty,stackOrderDescending:ES,stackOrderInsideOut:NS,stackOrderNone:Ur,stackOrderReverse:LS,stratify:lA,style:De,subset:$x,sum:hx,superset:i0,svg:T8,symbol:oS,symbolAsterisk:Qm,symbolCircle:Eu,symbolCross:Jm,symbolDiamond:ny,symbolDiamond2:ey,symbolPlus:ry,symbolSquare:iy,symbolSquare2:oy,symbolStar:uy,symbolTimes:yf,symbolTriangle:sy,symbolTriangle2:cy,symbolWye:ly,symbolX:yf,symbols:fy,symbolsFill:fy,symbolsStroke:iS,text:va,thresholdFreedmanDiaconis:Q2,thresholdScott:J2,thresholdSturges:ks,tickFormat:u1,tickIncrement:Se,tickStep:Eo,ticks:$e,timeDay:Ir,timeDays:aM,get timeFormat(){return uf},timeFormatDefaultLocale:rm,timeFormatLocale:U1,timeFriday:D1,timeFridays:pM,timeHour:gu,timeHours:iM,timeInterval:St,timeMillisecond:Cr,timeMilliseconds:A1,timeMinute:pu,timeMinutes:eM,timeMonday:Ki,timeMondays:cM,timeMonth:yu,timeMonths:_M,get timeParse(){return em},timeSaturday:P1,timeSaturdays:dM,timeSecond:te,timeSeconds:$1,timeSunday:Rr,timeSundays:k1,timeThursday:Ve,timeThursdays:hM,timeTickInterval:G1,timeTicks:z1,timeTuesday:S1,timeTuesdays:lM,timeWednesday:T1,timeWednesdays:fM,timeWeek:Rr,timeWeeks:k1,timeYear:Fn,timeYears:AM,timeout:ac,timer:aa,timerFlush:hp,transition:bp,transpose:r0,tree:yA,treemap:bA,treemapBinary:vA,treemapDice:Vi,treemapResquarify:_A,treemapSlice:cu,treemapSliceDice:xA,treemapSquarify:Qg,tsv:_8,tsvFormat:u8,tsvFormatBody:s8,tsvFormatRow:l8,tsvFormatRows:c8,tsvFormatValue:f8,tsvParse:Qp,tsvParseRows:a8,union:Sx,unixDay:rf,unixDays:sM,utcDay:Zi,utcDays:uM,get utcFormat(){return vu},utcFriday:L1,utcFridays:vM,utcHour:mu,utcHours:oM,utcMillisecond:Cr,utcMilliseconds:A1,utcMinute:du,utcMinutes:rM,utcMonday:Qi,utcMondays:gM,utcMonth:bu,utcMonths:wM,get utcParse(){return sf},utcSaturday:C1,utcSaturdays:xM,utcSecond:te,utcSeconds:$1,utcSunday:Fr,utcSundays:I1,utcThursday:Ze,utcThursdays:bM,utcTickInterval:O1,utcTicks:F1,utcTuesday:E1,utcTuesdays:mM,utcWednesday:N1,utcWednesdays:yM,utcWeek:Fr,utcWeeks:I1,utcYear:On,utcYears:MM,variance:zh,window:Gs,xml:$8,zip:dx,zoom:Ey,zoomIdentity:Ou,zoomTransform:Py},Symbol.toStringTag,{value:"Module"}));var Mf=function(t,n){return Mf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},Mf(t,n)};function ao(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");Mf(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}function GS(t,n,e,r){function i(o){return o instanceof e?o:new e(function(a){a(o)})}return new(e||(e=Promise))(function(o,a){function u(f){try{s(r.next(f))}catch(h){a(h)}}function c(f){try{s(r.throw(f))}catch(h){a(h)}}function s(f){f.done?o(f.value):i(f.value).then(u,c)}s((r=r.apply(t,n||[])).next())})}function Ly(t,n){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(f){return c([s,f])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(e=0)),e;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return e.label++,{value:s[1],done:!1};case 5:e.label++,i=s[1],s=[0];continue;case 7:s=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){e.label=s[1];break}if(s[0]===6&&e.label<o[1]){e.label=o[1],o=s;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(s);break}o[2]&&e.ops.pop(),e.trys.pop();continue}s=n.call(t,e)}catch(f){s=[6,f],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Yr(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function uo(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,o=[],a;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return o}function zu(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,o;r<i;r++)(o||!(r in n))&&(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return t.concat(o||Array.prototype.slice.call(n))}function Br(t){return this instanceof Br?(this.v=t,this):new Br(t)}function US(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(t,n||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(l){r[l]&&(i[l]=function(p){return new Promise(function(d,g){o.push([l,p,d,g])>1||u(l,p)})})}function u(l,p){try{c(r[l](p))}catch(d){h(o[0][3],d)}}function c(l){l.value instanceof Br?Promise.resolve(l.value.v).then(s,f):h(o[0][2],l)}function s(l){u("next",l)}function f(l){u("throw",l)}function h(l,p){l(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function YS(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],e;return n?n.call(t):(t=typeof Yr=="function"?Yr(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(o){e[o]=t[o]&&function(a){return new Promise(function(u,c){a=t[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(s){o({value:s,done:u})},a)}}typeof SuppressedError=="function"&&SuppressedError;function gt(t){return typeof t=="function"}function $f(t){var n=function(r){Error.call(r),r.stack=new Error().stack},e=t(n);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Sf=$f(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
6
- `+e.map(function(r,i){return i+1+") "+r.toString()}).join(`
7
- `):"",this.name="UnsubscriptionError",this.errors=e}});function Tf(t,n){if(t){var e=t.indexOf(n);0<=e&&t.splice(e,1)}}var Gu=function(){function t(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var n,e,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=Yr(a),c=u.next();!c.done;c=u.next()){var s=c.value;s.remove(this)}}catch(g){n={error:g}}finally{try{c&&!c.done&&(e=u.return)&&e.call(u)}finally{if(n)throw n.error}}else a.remove(this);var f=this.initialTeardown;if(gt(f))try{f()}catch(g){o=g instanceof Sf?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=Yr(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{Ry(d)}catch(g){o=o??[],g instanceof Sf?o=zu(zu([],uo(o)),uo(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new Sf(o)}},t.prototype.add=function(n){var e;if(n&&n!==this)if(this.closed)Ry(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(n)}},t.prototype._hasParent=function(n){var e=this._parentage;return e===n||Array.isArray(e)&&e.includes(n)},t.prototype._addParent=function(n){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(n),e):e?[e,n]:n},t.prototype._removeParent=function(n){var e=this._parentage;e===n?this._parentage=null:Array.isArray(e)&&Tf(e,n)},t.prototype.remove=function(n){var e=this._finalizers;e&&Tf(e,n),n instanceof t&&n._removeParent(this)},t.EMPTY=function(){var n=new t;return n.closed=!0,n}(),t}(),Cy=Gu.EMPTY;function Iy(t){return t instanceof Gu||t&&"closed"in t&&gt(t.remove)&&gt(t.add)&&gt(t.unsubscribe)}function Ry(t){gt(t)?t():t.unsubscribe()}var Fy={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Oy={setTimeout:function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,zu([t,n],uo(e)))},clearTimeout:function(t){var n=Oy.delegate;return((n==null?void 0:n.clearTimeout)||clearTimeout)(t)},delegate:void 0};function zy(t){Oy.setTimeout(function(){throw t})}function Df(){}function Uu(t){t()}var Pf=function(t){ao(n,t);function n(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Iy(e)&&e.add(r)):r.destination=WS,r}return n.create=function(e,r,i){return new Ef(e,r,i)},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(Gu),BS=Function.prototype.bind;function kf(t,n){return BS.call(t,n)}var qS=function(){function t(n){this.partialObserver=n}return t.prototype.next=function(n){var e=this.partialObserver;if(e.next)try{e.next(n)}catch(r){Yu(r)}},t.prototype.error=function(n){var e=this.partialObserver;if(e.error)try{e.error(n)}catch(r){Yu(r)}else Yu(n)},t.prototype.complete=function(){var n=this.partialObserver;if(n.complete)try{n.complete()}catch(e){Yu(e)}},t}(),Ef=function(t){ao(n,t);function n(e,r,i){var o=t.call(this)||this,a;if(gt(e)||!e)a={next:e??void 0,error:r??void 0,complete:i??void 0};else{var u;o&&Fy.useDeprecatedNextContext?(u=Object.create(e),u.unsubscribe=function(){return o.unsubscribe()},a={next:e.next&&kf(e.next,u),error:e.error&&kf(e.error,u),complete:e.complete&&kf(e.complete,u)}):a=e}return o.destination=new qS(a),o}return n}(Pf);function Yu(t){zy(t)}function HS(t){throw t}var WS={closed:!0,next:Df,error:HS,complete:Df},Nf=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function qr(t){return t}function XS(t){return t.length===0?qr:t.length===1?t[0]:function(e){return t.reduce(function(r,i){return i(r)},e)}}var nt=function(){function t(n){n&&(this._subscribe=n)}return t.prototype.lift=function(n){var e=new t;return e.source=this,e.operator=n,e},t.prototype.subscribe=function(n,e,r){var i=this,o=jS(n)?n:new Ef(n,e,r);return Uu(function(){var a=i,u=a.operator,c=a.source;o.add(u?u.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(e){n.error(e)}},t.prototype.forEach=function(n,e){var r=this;return e=Gy(e),new e(function(i,o){var a=new Ef({next:function(u){try{n(u)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(n){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(n)},t.prototype[Nf]=function(){return this},t.prototype.pipe=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return XS(n)(this)},t.prototype.toPromise=function(n){var e=this;return n=Gy(n),new n(function(r,i){var o;e.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(n){return new t(n)},t}();function Gy(t){var n;return(n=t??Fy.Promise)!==null&&n!==void 0?n:Promise}function VS(t){return t&&gt(t.next)&&gt(t.error)&&gt(t.complete)}function jS(t){return t&&t instanceof Pf||VS(t)&&Iy(t)}function ZS(t){return gt(t==null?void 0:t.lift)}function An(t){return function(n){if(ZS(n))return n.lift(function(e){try{return t(e,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function cn(t,n,e,r,i){return new KS(t,n,e,r,i)}var KS=function(t){ao(n,t);function n(e,r,i,o,a,u){var c=t.call(this,e)||this;return c.onFinalize=a,c.shouldUnsubscribe=u,c._next=r?function(s){try{r(s)}catch(f){e.error(f)}}:t.prototype._next,c._error=o?function(s){try{o(s)}catch(f){e.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(s){e.error(s)}finally{this.unsubscribe()}}:t.prototype._complete,c}return n.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},n}(Pf),QS=$f(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),yt=function(t){ao(n,t);function n(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return n.prototype.lift=function(e){var r=new Uy(this,this);return r.operator=e,r},n.prototype._throwIfClosed=function(){if(this.closed)throw new QS},n.prototype.next=function(e){var r=this;Uu(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Yr(r.currentObservers),u=a.next();!u.done;u=a.next()){var c=u.value;c.next(e)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},n.prototype.error=function(e){var r=this;Uu(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var i=r.observers;i.length;)i.shift().error(e)}})},n.prototype.complete=function(){var e=this;Uu(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},n.prototype._innerSubscribe=function(e){var r=this,i=this,o=i.hasError,a=i.isStopped,u=i.observers;return o||a?Cy:(this.currentObservers=null,u.push(e),new Gu(function(){r.currentObservers=null,Tf(u,e)}))},n.prototype._checkFinalizedStatuses=function(e){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?e.error(o):a&&e.complete()},n.prototype.asObservable=function(){var e=new nt;return e.source=this,e},n.create=function(e,r){return new Uy(e,r)},n}(nt),Uy=function(t){ao(n,t);function n(e,r){var i=t.call(this)||this;return i.destination=e,i.source=r,i}return n.prototype.next=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,e)},n.prototype.error=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,e)},n.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},n.prototype._subscribe=function(e){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&i!==void 0?i:Cy},n}(yt),Yy=new nt(function(t){return t.complete()});function JS(t){return t&&gt(t.schedule)}function Lf(t){return t[t.length-1]}function tT(t){return gt(Lf(t))?t.pop():void 0}function By(t){return JS(Lf(t))?t.pop():void 0}function nT(t,n){return typeof Lf(t)=="number"?t.pop():n}var Cf=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function qy(t){return gt(t==null?void 0:t.then)}function Hy(t){return gt(t[Nf])}function Wy(t){return Symbol.asyncIterator&&gt(t==null?void 0:t[Symbol.asyncIterator])}function Xy(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function eT(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Vy=eT();function jy(t){return gt(t==null?void 0:t[Vy])}function Zy(t){return US(this,arguments,function(){var e,r,i,o;return Ly(this,function(a){switch(a.label){case 0:e=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Br(e.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,Br(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Br(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Ky(t){return gt(t==null?void 0:t.getReader)}function ee(t){if(t instanceof nt)return t;if(t!=null){if(Hy(t))return rT(t);if(Cf(t))return iT(t);if(qy(t))return oT(t);if(Wy(t))return Qy(t);if(jy(t))return aT(t);if(Ky(t))return uT(t)}throw Xy(t)}function rT(t){return new nt(function(n){var e=t[Nf]();if(gt(e.subscribe))return e.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function iT(t){return new nt(function(n){for(var e=0;e<t.length&&!n.closed;e++)n.next(t[e]);n.complete()})}function oT(t){return new nt(function(n){t.then(function(e){n.closed||(n.next(e),n.complete())},function(e){return n.error(e)}).then(null,zy)})}function aT(t){return new nt(function(n){var e,r;try{for(var i=Yr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(n.next(a),n.closed)return}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}n.complete()})}function Qy(t){return new nt(function(n){sT(t,n).catch(function(e){return n.error(e)})})}function uT(t){return Qy(Zy(t))}function sT(t,n){var e,r,i,o;return GS(this,void 0,void 0,function(){var a,u;return Ly(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=YS(t),c.label=1;case 1:return[4,e.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,n.next(a),n.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=c.sent(),i={error:u},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=e.return)?[4,o.call(e)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}})})}function re(t,n,e,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=n.schedule(function(){e(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Jy(t,n){return n===void 0&&(n=0),An(function(e,r){e.subscribe(cn(r,function(i){return re(r,t,function(){return r.next(i)},n)},function(){return re(r,t,function(){return r.complete()},n)},function(i){return re(r,t,function(){return r.error(i)},n)}))})}function tb(t,n){return n===void 0&&(n=0),An(function(e,r){r.add(t.schedule(function(){return e.subscribe(r)},n))})}function cT(t,n){return ee(t).pipe(tb(n),Jy(n))}function lT(t,n){return ee(t).pipe(tb(n),Jy(n))}function fT(t,n){return new nt(function(e){var r=0;return n.schedule(function(){r===t.length?e.complete():(e.next(t[r++]),e.closed||this.schedule())})})}function hT(t,n){return new nt(function(e){var r;return re(e,n,function(){r=t[Vy](),re(e,n,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(u){e.error(u);return}a?e.complete():e.next(o)},0,!0)}),function(){return gt(r==null?void 0:r.return)&&r.return()}})}function nb(t,n){if(!t)throw new Error("Iterable cannot be null");return new nt(function(e){re(e,n,function(){var r=t[Symbol.asyncIterator]();re(e,n,function(){r.next().then(function(i){i.done?e.complete():e.next(i.value)})},0,!0)})})}function pT(t,n){return nb(Zy(t),n)}function dT(t,n){if(t!=null){if(Hy(t))return cT(t,n);if(Cf(t))return fT(t,n);if(qy(t))return lT(t,n);if(Wy(t))return nb(t,n);if(jy(t))return hT(t,n);if(Ky(t))return pT(t,n)}throw Xy(t)}function If(t,n){return n?dT(t,n):ee(t)}var eb=$f(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function B(t,n){return An(function(e,r){var i=0;e.subscribe(cn(r,function(o){r.next(t.call(n,o,i++))}))})}var gT=Array.isArray;function mT(t,n){return gT(n)?t.apply(void 0,zu([],uo(n))):t(n)}function rb(t){return B(function(n){return mT(t,n)})}var yT=Array.isArray,bT=Object.getPrototypeOf,vT=Object.prototype,xT=Object.keys;function _T(t){if(t.length===1){var n=t[0];if(yT(n))return{args:n,keys:null};if(wT(n)){var e=xT(n);return{args:e.map(function(r){return n[r]}),keys:e}}}return{args:t,keys:null}}function wT(t){return t&&typeof t=="object"&&bT(t)===vT}function AT(t,n){return t.reduce(function(e,r,i){return e[r]=n[i],e},{})}function H(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=By(t),r=tT(t),i=_T(t),o=i.args,a=i.keys;if(o.length===0)return If([],e);var u=new nt(MT(o,e,a?function(c){return AT(a,c)}:qr));return r?u.pipe(rb(r)):u}function MT(t,n,e){return e===void 0&&(e=qr),function(r){ib(n,function(){for(var i=t.length,o=new Array(i),a=i,u=i,c=function(f){ib(n,function(){var h=If(t[f],n),l=!1;h.subscribe(cn(r,function(p){o[f]=p,l||(l=!0,u--),u||r.next(e(o.slice()))},function(){--a||r.complete()}))},r)},s=0;s<i;s++)c(s)},r)}}function ib(t,n,e){t?re(e,t,n):n()}function $T(t,n,e,r,i,o,a,u){var c=[],s=0,f=0,h=!1,l=function(){h&&!c.length&&!s&&n.complete()},p=function(g){return s<r?d(g):c.push(g)},d=function(g){o&&n.next(g),s++;var m=!1;ee(e(g,f++)).subscribe(cn(n,function(y){i==null||i(y),o?p(y):n.next(y)},function(){m=!0},void 0,function(){if(m)try{s--;for(var y=function(){var x=c.shift();a?re(n,a,function(){return d(x)}):d(x)};c.length&&s<r;)y();l()}catch(x){n.error(x)}}))};return t.subscribe(cn(n,p,function(){h=!0,l()})),function(){u==null||u()}}function Rf(t,n,e){return e===void 0&&(e=1/0),gt(n)?Rf(function(r,i){return B(function(o,a){return n(r,o,i,a)})(ee(t(r,i)))},e):(typeof n=="number"&&(e=n),An(function(r,i){return $T(r,i,t,e)}))}function ST(t){return t===void 0&&(t=1/0),Rf(qr,t)}var TT=["addListener","removeListener"],DT=["addEventListener","removeEventListener"],PT=["on","off"];function Ff(t,n,e,r){if(gt(e)&&(r=e,e=void 0),r)return Ff(t,n,e).pipe(rb(r));var i=uo(NT(t)?DT.map(function(u){return function(c){return t[u](n,c,e)}}):kT(t)?TT.map(ob(t,n)):ET(t)?PT.map(ob(t,n)):[],2),o=i[0],a=i[1];if(!o&&Cf(t))return Rf(function(u){return Ff(u,n,e)})(ee(t));if(!o)throw new TypeError("Invalid event target");return new nt(function(u){var c=function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];return u.next(1<s.length?s:s[0])};return o(c),function(){return a(c)}})}function ob(t,n){return function(e){return function(r){return t[e](n,r)}}}function kT(t){return gt(t.addListener)&&gt(t.removeListener)}function ET(t){return gt(t.on)&&gt(t.off)}function NT(t){return gt(t.addEventListener)&&gt(t.removeEventListener)}function Of(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=By(t),r=nT(t,1/0),i=t;return i.length?i.length===1?ee(i[0]):ST(r)(If(i,e)):Yy}function so(t,n){return An(function(e,r){var i=0;e.subscribe(cn(r,function(o){return t.call(n,o,i++)&&r.next(o)}))})}function LT(t){return An(function(n,e){var r=!1;n.subscribe(cn(e,function(i){r=!0,e.next(i)},function(){r||e.next(t),e.complete()}))})}function CT(t){return t<=0?function(){return Yy}:An(function(n,e){var r=0;n.subscribe(cn(e,function(i){++r<=t&&(e.next(i),t<=r&&e.complete())}))})}function K(t,n){return n===void 0&&(n=qr),t=t??IT,An(function(e,r){var i,o=!0;e.subscribe(cn(r,function(a){var u=n(a);(o||!t(i,u))&&(o=!1,i=u,r.next(a))}))})}function IT(t,n){return t===n}function RT(t){return t===void 0&&(t=FT),An(function(n,e){var r=!1;n.subscribe(cn(e,function(i){r=!0,e.next(i)},function(){return r?e.complete():e.error(t())}))})}function FT(){return new eb}function co(t,n){var e=arguments.length>=2;return function(r){return r.pipe(t?so(function(i,o){return t(i,o,r)}):qr,CT(1),e?LT(n):RT(function(){return new eb}))}}function Y(t,n){return An(function(e,r){var i=null,o=0,a=!1,u=function(){return a&&!i&&r.complete()};e.subscribe(cn(r,function(c){i==null||i.unsubscribe();var s=0,f=o++;ee(t(c,f)).subscribe(i=cn(r,function(h){return r.next(n?n(c,h,f,s++):h)},function(){i=null,u()}))},function(){a=!0,u()}))})}function I(t){return An(function(n,e){ee(t).subscribe(cn(e,function(){return e.complete()},Df)),!e.closed&&n.subscribe(e)})}const Hr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Bu(t,n){return t==null||n==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function OT(t,n){return t==null||n==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function ab(t){let n,e,r;t.length!==2?(n=Bu,e=(u,c)=>Bu(t(u),c),r=(u,c)=>t(u)-c):(n=t===Bu||t===OT?t:zT,e=t,r=t);function i(u,c,s=0,f=u.length){if(s<f){if(n(c,c)!==0)return f;do{const h=s+f>>>1;e(u[h],c)<0?s=h+1:f=h}while(s<f)}return s}function o(u,c,s=0,f=u.length){if(s<f){if(n(c,c)!==0)return f;do{const h=s+f>>>1;e(u[h],c)<=0?s=h+1:f=h}while(s<f)}return s}function a(u,c,s=0,f=u.length){const h=i(u,c,s,f-1);return h>s&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:o}}function zT(){return 0}function GT(t){return t===null?NaN:+t}const UT=ab(Bu),ub=UT.right;ab(GT).center;class sb extends Map{constructor(n,e=qT){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),n!=null)for(const[r,i]of n)this.set(r,i)}get(n){return super.get(cb(this,n))}has(n){return super.has(cb(this,n))}set(n,e){return super.set(YT(this,n),e)}delete(n){return super.delete(BT(this,n))}}function cb({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function YT({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function BT({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function qT(t){return t!==null&&typeof t=="object"?t.valueOf():t}const HT=Math.sqrt(50),WT=Math.sqrt(10),XT=Math.sqrt(2);function qu(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=HT?10:o>=WT?5:o>=XT?2:1;let u,c,s;return i<0?(s=Math.pow(10,-i)/a,u=Math.round(t*s),c=Math.round(n*s),u/s<t&&++u,c/s>n&&--c,s=-s):(s=Math.pow(10,i)*a,u=Math.round(t/s),c=Math.round(n/s),u*s<t&&++u,c*s>n&&--c),c<u&&.5<=e&&e<2?qu(t,n,e*2):[u,c,s]}function VT(t,n,e){if(n=+n,t=+t,e=+e,!(e>0))return[];if(t===n)return[t];const r=n<t,[i,o,a]=r?qu(n,t,e):qu(t,n,e);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(r)if(a<0)for(let s=0;s<u;++s)c[s]=(o-s)/-a;else for(let s=0;s<u;++s)c[s]=(o-s)*a;else if(a<0)for(let s=0;s<u;++s)c[s]=(i+s)/-a;else for(let s=0;s<u;++s)c[s]=(i+s)*a;return c}function zf(t,n,e){return n=+n,t=+t,e=+e,qu(t,n,e)[2]}function jT(t,n,e){n=+n,t=+t,e=+e;const r=n<t,i=r?zf(n,t,e):zf(t,n,e);return(r?-1:1)*(i<0?1/-i:i)}function ZT(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=Math.max(0,Math.ceil((n-t)/e))|0,o=new Array(i);++r<i;)o[r]=t+r*e;return o}var KT={value:()=>{}};function lb(){for(var t=0,n=arguments.length,e={},r;t<n;++t){if(!(r=arguments[t]+"")||r in e||/[\s.]/.test(r))throw new Error("illegal type: "+r);e[r]=[]}return new Hu(e)}function Hu(t){this._=t}function QT(t,n){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");if(i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}})}Hu.prototype=lb.prototype={constructor:Hu,on:function(t,n){var e=this._,r=QT(t+"",e),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=JT(e[i],t.name)))return i;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<a;)if(i=(t=r[o]).type)e[i]=fb(e[i],t.name,n);else if(n==null)for(i in e)e[i]=fb(e[i],t.name,null);return this},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new Hu(t)},call:function(t,n){if((i=arguments.length-2)>0)for(var e=new Array(i),r=0,i,o;r<i;++r)e[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(n,e)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};function JT(t,n){for(var e=0,r=t.length,i;e<r;++e)if((i=t[e]).name===n)return i.value}function fb(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=KT,t=t.slice(0,r).concat(t.slice(r+1));break}return e!=null&&t.push({name:n,value:e}),t}var Gf="http://www.w3.org/1999/xhtml";const hb={svg:"http://www.w3.org/2000/svg",xhtml:Gf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Wu(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),hb.hasOwnProperty(n)?{space:hb[n],local:t}:t}function tD(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Gf&&n.documentElement.namespaceURI===Gf?n.createElement(t):n.createElementNS(e,t)}}function nD(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function pb(t){var n=Wu(t);return(n.local?nD:tD)(n)}function eD(){}function Uf(t){return t==null?eD:function(){return this.querySelector(t)}}function rD(t){typeof t!="function"&&(t=Uf(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],a=o.length,u=r[i]=new Array(a),c,s,f=0;f<a;++f)(c=o[f])&&(s=t.call(c,c.__data__,f,o))&&("__data__"in c&&(s.__data__=c.__data__),u[f]=s);return new Mn(r,this._parents)}function iD(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function oD(){return[]}function db(t){return t==null?oD:function(){return this.querySelectorAll(t)}}function aD(t){return function(){return iD(t.apply(this,arguments))}}function uD(t){typeof t=="function"?t=aD(t):t=db(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a=n[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&(r.push(t.call(c,c.__data__,s,a)),i.push(c));return new Mn(r,i)}function gb(t){return function(){return this.matches(t)}}function mb(t){return function(n){return n.matches(t)}}var sD=Array.prototype.find;function cD(t){return function(){return sD.call(this.children,t)}}function lD(){return this.firstElementChild}function fD(t){return this.select(t==null?lD:cD(typeof t=="function"?t:mb(t)))}var hD=Array.prototype.filter;function pD(){return Array.from(this.children)}function dD(t){return function(){return hD.call(this.children,t)}}function gD(t){return this.selectAll(t==null?pD:dD(typeof t=="function"?t:mb(t)))}function mD(t){typeof t!="function"&&(t=gb(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new Mn(r,this._parents)}function yb(t){return new Array(t.length)}function yD(){return new Mn(this._enter||this._groups.map(yb),this._parents)}function Xu(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}Xu.prototype={constructor:Xu,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function bD(t){return function(){return t}}function vD(t,n,e,r,i,o){for(var a=0,u,c=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new Xu(t,o[a]);for(;a<c;++a)(u=n[a])&&(i[a]=u)}function xD(t,n,e,r,i,o,a){var u,c,s=new Map,f=n.length,h=o.length,l=new Array(f),p;for(u=0;u<f;++u)(c=n[u])&&(l[u]=p=a.call(c,c.__data__,u,n)+"",s.has(p)?i[u]=c:s.set(p,c));for(u=0;u<h;++u)p=a.call(t,o[u],u,o)+"",(c=s.get(p))?(r[u]=c,c.__data__=o[u],s.delete(p)):e[u]=new Xu(t,o[u]);for(u=0;u<f;++u)(c=n[u])&&s.get(l[u])===c&&(i[u]=c)}function _D(t){return t.__data__}function wD(t,n){if(!arguments.length)return Array.from(this,_D);var e=n?xD:vD,r=this._parents,i=this._groups;typeof t!="function"&&(t=bD(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),s=0;s<o;++s){var f=r[s],h=i[s],l=h.length,p=AD(t.call(f,f&&f.__data__,s,r)),d=p.length,g=u[s]=new Array(d),m=a[s]=new Array(d),y=c[s]=new Array(l);e(f,h,g,m,y,p,n);for(var x=0,_=0,v,w;x<d;++x)if(v=g[x]){for(x>=_&&(_=x+1);!(w=m[_])&&++_<d;);v._next=w||null}}return a=new Mn(a,r),a._enter=u,a._exit=c,a}function AD(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function MD(){return new Mn(this._exit||this._groups.map(yb),this._parents)}function $D(t,n,e){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),n!=null&&(i=n(i),i&&(i=i.selection())),e==null?o.remove():e(o),r&&i?r.merge(i).order():i}function SD(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var s=e[c],f=r[c],h=s.length,l=u[c]=new Array(h),p,d=0;d<h;++d)(p=s[d]||f[d])&&(l[d]=p);for(;c<i;++c)u[c]=e[c];return new Mn(u,this._parents)}function TD(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r=t[n],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function DD(t){t||(t=PD);function n(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a=e[o],u=a.length,c=i[o]=new Array(u),s,f=0;f<u;++f)(s=a[f])&&(c[f]=s);c.sort(n)}return new Mn(i,this._parents).order()}function PD(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function kD(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function ED(){return Array.from(this)}function ND(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function LD(){let t=0;for(const n of this)++t;return t}function CD(){return!this.node()}function ID(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i=n[e],o=0,a=i.length,u;o<a;++o)(u=i[o])&&t.call(u,u.__data__,o,i);return this}function RD(t){return function(){this.removeAttribute(t)}}function FD(t){return function(){this.removeAttributeNS(t.space,t.local)}}function OD(t,n){return function(){this.setAttribute(t,n)}}function zD(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function GD(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function UD(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function YD(t,n){var e=Wu(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?FD:RD:typeof n=="function"?e.local?UD:GD:e.local?zD:OD)(e,n))}function bb(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function BD(t){return function(){this.style.removeProperty(t)}}function qD(t,n,e){return function(){this.style.setProperty(t,n,e)}}function HD(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function WD(t,n,e){return arguments.length>1?this.each((n==null?BD:typeof n=="function"?HD:qD)(t,n,e??"")):Wr(this.node(),t)}function Wr(t,n){return t.style.getPropertyValue(n)||bb(t).getComputedStyle(t,null).getPropertyValue(n)}function XD(t){return function(){delete this[t]}}function VD(t,n){return function(){this[t]=n}}function jD(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function ZD(t,n){return arguments.length>1?this.each((n==null?XD:typeof n=="function"?jD:VD)(t,n)):this.node()[t]}function vb(t){return t.trim().split(/^|\s+/)}function Yf(t){return t.classList||new xb(t)}function xb(t){this._node=t,this._names=vb(t.getAttribute("class")||"")}xb.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function _b(t,n){for(var e=Yf(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function wb(t,n){for(var e=Yf(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function KD(t){return function(){_b(this,t)}}function QD(t){return function(){wb(this,t)}}function JD(t,n){return function(){(n.apply(this,arguments)?_b:wb)(this,t)}}function tP(t,n){var e=vb(t+"");if(arguments.length<2){for(var r=Yf(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?JD:n?KD:QD)(e,n))}function nP(){this.textContent=""}function eP(t){return function(){this.textContent=t}}function rP(t){return function(){var n=t.apply(this,arguments);this.textContent=n??""}}function iP(t){return arguments.length?this.each(t==null?nP:(typeof t=="function"?rP:eP)(t)):this.node().textContent}function oP(){this.innerHTML=""}function aP(t){return function(){this.innerHTML=t}}function uP(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n??""}}function sP(t){return arguments.length?this.each(t==null?oP:(typeof t=="function"?uP:aP)(t)):this.node().innerHTML}function cP(){this.nextSibling&&this.parentNode.appendChild(this)}function lP(){return this.each(cP)}function fP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hP(){return this.each(fP)}function pP(t){var n=typeof t=="function"?t:pb(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function dP(){return null}function gP(t,n){var e=typeof t=="function"?t:pb(t),r=n==null?dP:typeof n=="function"?n:Uf(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function mP(){var t=this.parentNode;t&&t.removeChild(this)}function yP(){return this.each(mP)}function bP(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function vP(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function xP(t){return this.select(t?vP:bP)}function _P(t){return arguments.length?this.property("__data__",t):this.node().__data__}function wP(t){return function(n){t.call(this,n,this.__data__)}}function AP(t){return t.trim().split(/^|\s+/).map(function(n){var e="",r=n.indexOf(".");return r>=0&&(e=n.slice(r+1),n=n.slice(0,r)),{type:n,name:e}})}function MP(t){return function(){var n=this.__on;if(n){for(var e=0,r=-1,i=n.length,o;e<i;++e)o=n[e],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):n[++r]=o;++r?n.length=r:delete this.__on}}}function $P(t,n,e){return function(){var r=this.__on,i,o=wP(n);if(r){for(var a=0,u=r.length;a<u;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=e),i.value=n;return}}this.addEventListener(t.type,o,e),i={type:t.type,name:t.name,value:n,listener:o,options:e},r?r.push(i):this.__on=[i]}}function SP(t,n,e){var r=AP(t+""),i,o=r.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,s=u.length,f;c<s;++c)for(i=0,f=u[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=n?$P:MP,i=0;i<o;++i)this.each(u(r[i],n,e));return this}function Ab(t,n,e){var r=bb(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function TP(t,n){return function(){return Ab(this,t,n)}}function DP(t,n){return function(){return Ab(this,t,n.apply(this,arguments))}}function PP(t,n){return this.each((typeof n=="function"?DP:TP)(t,n))}function*kP(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var EP=[null];function Mn(t,n){this._groups=t,this._parents=n}function lo(){return new Mn([[document.documentElement]],EP)}function NP(){return this}Mn.prototype=lo.prototype={constructor:Mn,select:rD,selectAll:uD,selectChild:fD,selectChildren:gD,filter:mD,data:wD,enter:yD,exit:MD,join:$D,merge:SD,selection:NP,order:TD,sort:DD,call:kD,nodes:ED,node:ND,size:LD,empty:CD,each:ID,attr:YD,style:WD,property:ZD,classed:tP,text:iP,html:sP,raise:lP,lower:hP,append:pP,insert:gP,remove:yP,clone:xP,datum:_P,on:SP,dispatch:PP,[Symbol.iterator]:kP};function Bf(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Mb(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function fo(){}var ho=.7,Vu=1/ho,Xr="\\s*([+-]?\\d+)\\s*",po="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",LP=/^#([0-9a-f]{3,8})$/,CP=new RegExp(`^rgb\\(${Xr},${Xr},${Xr}\\)$`),IP=new RegExp(`^rgb\\(${Gn},${Gn},${Gn}\\)$`),RP=new RegExp(`^rgba\\(${Xr},${Xr},${Xr},${po}\\)$`),FP=new RegExp(`^rgba\\(${Gn},${Gn},${Gn},${po}\\)$`),OP=new RegExp(`^hsl\\(${po},${Gn},${Gn}\\)$`),zP=new RegExp(`^hsla\\(${po},${Gn},${Gn},${po}\\)$`),$b={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};Bf(fo,Ke,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Sb,formatHex:Sb,formatHex8:GP,formatHsl:UP,formatRgb:Tb,toString:Tb});function Sb(){return this.rgb().formatHex()}function GP(){return this.rgb().formatHex8()}function UP(){return Nb(this).formatHsl()}function Tb(){return this.rgb().formatRgb()}function Ke(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=LP.exec(t))?(e=n[1].length,n=parseInt(n[1],16),e===6?Db(n):e===3?new on(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?ju(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?ju(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=CP.exec(t))?new on(n[1],n[2],n[3],1):(n=IP.exec(t))?new on(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=RP.exec(t))?ju(n[1],n[2],n[3],n[4]):(n=FP.exec(t))?ju(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=OP.exec(t))?Eb(n[1],n[2]/100,n[3]/100,1):(n=zP.exec(t))?Eb(n[1],n[2]/100,n[3]/100,n[4]):$b.hasOwnProperty(t)?Db($b[t]):t==="transparent"?new on(NaN,NaN,NaN,0):null}function Db(t){return new on(t>>16&255,t>>8&255,t&255,1)}function ju(t,n,e,r){return r<=0&&(t=n=e=NaN),new on(t,n,e,r)}function YP(t){return t instanceof fo||(t=Ke(t)),t?(t=t.rgb(),new on(t.r,t.g,t.b,t.opacity)):new on}function qf(t,n,e,r){return arguments.length===1?YP(t):new on(t,n,e,r??1)}function on(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}Bf(on,qf,Mb(fo,{brighter(t){return t=t==null?Vu:Math.pow(Vu,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ho:Math.pow(ho,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new on(Qe(this.r),Qe(this.g),Qe(this.b),Zu(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:Pb,formatHex:Pb,formatHex8:BP,formatRgb:kb,toString:kb}));function Pb(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}`}function BP(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}${Je((isNaN(this.opacity)?1:this.opacity)*255)}`}function kb(){const t=Zu(this.opacity);return`${t===1?"rgb(":"rgba("}${Qe(this.r)}, ${Qe(this.g)}, ${Qe(this.b)}${t===1?")":`, ${t})`}`}function Zu(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Qe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Je(t){return t=Qe(t),(t<16?"0":"")+t.toString(16)}function Eb(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new $n(t,n,e,r)}function Nb(t){if(t instanceof $n)return new $n(t.h,t.s,t.l,t.opacity);if(t instanceof fo||(t=Ke(t)),!t)return new $n;if(t instanceof $n)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(n===o?a=(e-r)/u+(e<r)*6:e===o?a=(r-n)/u+2:a=(n-e)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new $n(a,u,c,t.opacity)}function qP(t,n,e,r){return arguments.length===1?Nb(t):new $n(t,n,e,r??1)}function $n(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}Bf($n,qP,Mb(fo,{brighter(t){return t=t==null?Vu:Math.pow(Vu,t),new $n(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ho:Math.pow(ho,t),new $n(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new on(Hf(t>=240?t-240:t+120,i,r),Hf(t,i,r),Hf(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new $n(Lb(this.h),Ku(this.s),Ku(this.l),Zu(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=Zu(this.opacity);return`${t===1?"hsl(":"hsla("}${Lb(this.h)}, ${Ku(this.s)*100}%, ${Ku(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Lb(t){return t=(t||0)%360,t<0?t+360:t}function Ku(t){return Math.max(0,Math.min(1,t||0))}function Hf(t,n,e){return(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)*255}const Wf=t=>()=>t;function HP(t,n){return function(e){return t+e*n}}function WP(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function XP(t){return(t=+t)==1?Cb:function(n,e){return e-n?WP(n,e,t):Wf(isNaN(n)?e:n)}}function Cb(t,n){var e=n-t;return e?HP(t,e):Wf(isNaN(t)?n:t)}const Qu=function t(n){var e=XP(n);function r(i,o){var a=e((i=qf(i)).r,(o=qf(o)).r),u=e(i.g,o.g),c=e(i.b,o.b),s=Cb(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=u(f),i.b=c(f),i.opacity=s(f),i+""}}return r.gamma=t,r}(1);function VP(t,n){n||(n=[]);var e=t?Math.min(n.length,t.length):0,r=n.slice(),i;return function(o){for(i=0;i<e;++i)r[i]=t[i]*(1-o)+n[i]*o;return r}}function jP(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ZP(t,n){var e=n?n.length:0,r=t?Math.min(e,t.length):0,i=new Array(r),o=new Array(e),a;for(a=0;a<r;++a)i[a]=jf(t[a],n[a]);for(;a<e;++a)o[a]=n[a];return function(u){for(a=0;a<r;++a)o[a]=i[a](u);return o}}function KP(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function Sn(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function QP(t,n){var e={},r={},i;(t===null||typeof t!="object")&&(t={}),(n===null||typeof n!="object")&&(n={});for(i in n)i in t?e[i]=jf(t[i],n[i]):r[i]=n[i];return function(o){for(i in e)r[i]=e[i](o);return r}}var Xf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vf=new RegExp(Xf.source,"g");function JP(t){return function(){return t}}function tk(t){return function(n){return t(n)+""}}function Ib(t,n){var e=Xf.lastIndex=Vf.lastIndex=0,r,i,o,a=-1,u=[],c=[];for(t=t+"",n=n+"";(r=Xf.exec(t))&&(i=Vf.exec(n));)(o=i.index)>e&&(o=n.slice(e,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,c.push({i:a,x:Sn(r,i)})),e=Vf.lastIndex;return e<n.length&&(o=n.slice(e),u[a]?u[a]+=o:u[++a]=o),u.length<2?c[0]?tk(c[0].x):JP(n):(n=c.length,function(s){for(var f=0,h;f<n;++f)u[(h=c[f]).i]=h.x(s);return u.join("")})}function jf(t,n){var e=typeof n,r;return n==null||e==="boolean"?Wf(n):(e==="number"?Sn:e==="string"?(r=Ke(n))?(n=r,Qu):Ib:n instanceof Ke?Qu:n instanceof Date?KP:jP(n)?VP:Array.isArray(n)?ZP:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?QP:Sn)(t,n)}function nk(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}var Rb=180/Math.PI,Fb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ob(t,n,e,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,c/=u),t*r<n*e&&(t=-t,n=-n,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Rb,skewX:Math.atan(c)*Rb,scaleX:a,scaleY:u}}var Ju;function ek(t){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?Fb:Ob(n.a,n.b,n.c,n.d,n.e,n.f)}function rk(t){return t==null||(Ju||(Ju=document.createElementNS("http://www.w3.org/2000/svg","g")),Ju.setAttribute("transform",t),!(t=Ju.transform.baseVal.consolidate()))?Fb:(t=t.matrix,Ob(t.a,t.b,t.c,t.d,t.e,t.f))}function zb(t,n,e,r){function i(s){return s.length?s.pop()+" ":""}function o(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push("translate(",null,n,null,e);d.push({i:g-4,x:Sn(s,h)},{i:g-2,x:Sn(f,l)})}else(h||l)&&p.push("translate("+h+n+l+e)}function a(s,f,h,l){s!==f?(s-f>180?f+=360:f-s>180&&(s+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:Sn(s,f)})):f&&h.push(i(h)+"rotate("+f+r)}function u(s,f,h,l){s!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:Sn(s,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Sn(s,h)},{i:g-2,x:Sn(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(s,f){var h=[],l=[];return s=t(s),f=t(f),o(s.translateX,s.translateY,f.translateX,f.translateY,h,l),a(s.rotate,f.rotate,h,l),u(s.skewX,f.skewX,h,l),c(s.scaleX,s.scaleY,f.scaleX,f.scaleY,h,l),s=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var ik=zb(ek,"px, ","px)","deg)"),ok=zb(rk,", ",")",")"),Vr=0,go=0,mo=0,Gb=1e3,ts,yo,ns=0,tr=0,es=0,bo=typeof performance=="object"&&performance.now?performance:Date,Ub=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zf(){return tr||(Ub(ak),tr=bo.now()+es)}function ak(){tr=0}function rs(){this._call=this._time=this._next=null}rs.prototype=Yb.prototype={constructor:rs,restart:function(t,n,e){if(typeof t!="function")throw new TypeError("callback is not a function");e=(e==null?Zf():+e)+(n==null?0:+n),!this._next&&yo!==this&&(yo?yo._next=this:ts=this,yo=this),this._call=t,this._time=e,Kf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kf())}};function Yb(t,n,e){var r=new rs;return r.restart(t,n,e),r}function uk(){Zf(),++Vr;for(var t=ts,n;t;)(n=tr-t._time)>=0&&t._call.call(void 0,n),t=t._next;--Vr}function Bb(){tr=(ns=bo.now())+es,Vr=go=0;try{uk()}finally{Vr=0,ck(),tr=0}}function sk(){var t=bo.now(),n=t-ns;n>Gb&&(es-=n,ns=t)}function ck(){for(var t,n=ts,e,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ts=e);yo=t,Kf(r)}function Kf(t){if(!Vr){go&&(go=clearTimeout(go));var n=t-tr;n>24?(t<1/0&&(go=setTimeout(Bb,t-bo.now()-es)),mo&&(mo=clearInterval(mo))):(mo||(ns=bo.now(),mo=setInterval(sk,Gb)),Vr=1,Ub(Bb))}}function qb(t,n,e){var r=new rs;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}var lk=lb("start","end","cancel","interrupt"),fk=[],Hb=0,Wb=1,Qf=2,is=3,Xb=4,Jf=5,os=6;function as(t,n,e,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(e in a)return;hk(t,e,{name:n,index:r,group:i,on:lk,tween:fk,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Hb})}function th(t,n){var e=Tn(t,n);if(e.state>Hb)throw new Error("too late; already scheduled");return e}function Un(t,n){var e=Tn(t,n);if(e.state>is)throw new Error("too late; already running");return e}function Tn(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function hk(t,n,e){var r=t.__transition,i;r[n]=e,e.timer=Yb(o,0,e.time);function o(s){e.state=Wb,e.timer.restart(a,e.delay,e.time),e.delay<=s&&a(s-e.delay)}function a(s){var f,h,l,p;if(e.state!==Wb)return c();for(f in r)if(p=r[f],p.name===e.name){if(p.state===is)return qb(a);p.state===Xb?(p.state=os,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<n&&(p.state=os,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(qb(function(){e.state===is&&(e.state=Xb,e.timer.restart(u,e.delay,e.time),u(s))}),e.state=Qf,e.on.call("start",t,t.__data__,e.index,e.group),e.state===Qf){for(e.state=is,i=new Array(l=e.tween.length),f=0,h=-1;f<l;++f)(p=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(i[++h]=p);i.length=h+1}}function u(s){for(var f=s<e.duration?e.ease.call(null,s/e.duration):(e.timer.restart(c),e.state=Jf,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);e.state===Jf&&(e.on.call("end",t,t.__data__,e.index,e.group),c())}function c(){e.state=os,e.timer.stop(),delete r[n];for(var s in r)return;delete t.__transition}}function pk(t,n){var e=t.__transition,r,i,o=!0,a;if(e){n=n==null?null:n+"";for(a in e){if((r=e[a]).name!==n){o=!1;continue}i=r.state>Qf&&r.state<Jf,r.state=os,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete e[a]}o&&delete t.__transition}}function dk(t){return this.each(function(){pk(this,t)})}function gk(t,n){var e,r;return function(){var i=Un(this,t),o=i.tween;if(o!==e){r=e=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===n){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function mk(t,n,e){var r,i;if(typeof e!="function")throw new Error;return function(){var o=Un(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},c=0,s=i.length;c<s;++c)if(i[c].name===n){i[c]=u;break}c===s&&i.push(u)}o.tween=i}}function yk(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r=Tn(this.node(),e).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((n==null?gk:mk)(e,t,n))}function nh(t,n,e){var r=t._id;return t.each(function(){var i=Un(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return Tn(i,r).value[n]}}function Vb(t,n){var e;return(typeof n=="number"?Sn:n instanceof Ke?Qu:(e=Ke(n))?(n=e,Qu):Ib)(t,n)}function bk(t){return function(){this.removeAttribute(t)}}function vk(t){return function(){this.removeAttributeNS(t.space,t.local)}}function xk(t,n,e){var r,i=e+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=n(r=a,e)}}function _k(t,n,e){var r,i=e+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=n(r=a,e)}}function wk(t,n,e){var r,i,o;return function(){var a,u=e(this),c;return u==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u)))}}function Ak(t,n,e){var r,i,o;return function(){var a,u=e(this),c;return u==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u)))}}function Mk(t,n){var e=Wu(t),r=e==="transform"?ok:Vb;return this.attrTween(t,typeof n=="function"?(e.local?Ak:wk)(e,r,nh(this,"attr."+t,n)):n==null?(e.local?vk:bk)(e):(e.local?_k:xk)(e,r,n))}function $k(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Sk(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function Tk(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&Sk(t,o)),e}return i._value=n,i}function Dk(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&$k(t,o)),e}return i._value=n,i}function Pk(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw new Error;var r=Wu(t);return this.tween(e,(r.local?Tk:Dk)(r,n))}function kk(t,n){return function(){th(this,t).delay=+n.apply(this,arguments)}}function Ek(t,n){return n=+n,function(){th(this,t).delay=n}}function Nk(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?kk:Ek)(n,t)):Tn(this.node(),n).delay}function Lk(t,n){return function(){Un(this,t).duration=+n.apply(this,arguments)}}function Ck(t,n){return n=+n,function(){Un(this,t).duration=n}}function Ik(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?Lk:Ck)(n,t)):Tn(this.node(),n).duration}function Rk(t,n){if(typeof n!="function")throw new Error;return function(){Un(this,t).ease=n}}function Fk(t){var n=this._id;return arguments.length?this.each(Rk(n,t)):Tn(this.node(),n).ease}function Ok(t,n){return function(){var e=n.apply(this,arguments);if(typeof e!="function")throw new Error;Un(this,t).ease=e}}function zk(t){if(typeof t!="function")throw new Error;return this.each(Ok(this._id,t))}function Gk(t){typeof t!="function"&&(t=gb(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o=n[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new ie(r,this._parents,this._name,this._id)}function Uk(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c=n[u],s=e[u],f=c.length,h=a[u]=new Array(f),l,p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=n[u];return new ie(a,this._parents,this._name,this._id)}function Yk(t){return(t+"").trim().split(/^|\s+/).every(function(n){var e=n.indexOf(".");return e>=0&&(n=n.slice(0,e)),!n||n==="start"})}function Bk(t,n,e){var r,i,o=Yk(n)?th:Un;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}function qk(t,n){var e=this._id;return arguments.length<2?Tn(this.node(),e).on.on(t):this.each(Bk(e,t,n))}function Hk(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function Wk(){return this.on("end.remove",Hk(this._id))}function Xk(t){var n=this._name,e=this._id;typeof t!="function"&&(t=Uf(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u=r[a],c=u.length,s=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=u[l])&&(h=t.call(f,f.__data__,l,u))&&("__data__"in f&&(h.__data__=f.__data__),s[l]=h,as(s[l],n,e,l,s,Tn(f,e)));return new ie(o,this._parents,n,e)}function Vk(t){var n=this._name,e=this._id;typeof t!="function"&&(t=db(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var c=r[u],s=c.length,f,h=0;h<s;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=Tn(f,e),g=0,m=l.length;g<m;++g)(p=l[g])&&as(p,n,e,g,l,d);o.push(l),a.push(f)}return new ie(o,a,n,e)}var jk=lo.prototype.constructor;function Zk(){return new jk(this._groups,this._parents)}function Kk(t,n){var e,r,i;return function(){var o=Wr(this,t),a=(this.style.removeProperty(t),Wr(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}function jb(t){return function(){this.style.removeProperty(t)}}function Qk(t,n,e){var r,i=e+"",o;return function(){var a=Wr(this,t);return a===i?null:a===r?o:o=n(r=a,e)}}function Jk(t,n,e){var r,i,o;return function(){var a=Wr(this,t),u=e(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(t),Wr(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u))}}function tE(t,n){var e,r,i,o="style."+n,a="end."+o,u;return function(){var c=Un(this,t),s=c.on,f=c.value[o]==null?u||(u=jb(n)):void 0;(s!==e||i!==f)&&(r=(e=s).copy()).on(a,i=f),c.on=r}}function nE(t,n,e){var r=(t+="")=="transform"?ik:Vb;return n==null?this.styleTween(t,Kk(t,r)).on("end.style."+t,jb(t)):typeof n=="function"?this.styleTween(t,Jk(t,r,nh(this,"style."+t,n))).each(tE(this._id,t)):this.styleTween(t,Qk(t,r,n),e).on("end.style."+t,null)}function eE(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function rE(t,n,e){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&eE(t,a,e)),r}return o._value=n,o}function iE(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;return this.tween(r,rE(t,n,e??""))}function oE(t){return function(){this.textContent=t}}function aE(t){return function(){var n=t(this);this.textContent=n??""}}function uE(t){return this.tween("text",typeof t=="function"?aE(nh(this,"text",t)):oE(t==null?"":t+""))}function sE(t){return function(n){this.textContent=t.call(this,n)}}function cE(t){var n,e;function r(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&sE(i)),n}return r._value=t,r}function lE(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,cE(t))}function fE(){for(var t=this._name,n=this._id,e=Zb(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)if(c=a[s]){var f=Tn(c,n);as(c,t,e,s,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new ie(r,this._parents,t,e)}function hE(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,a){var u={value:a},c={value:function(){--i===0&&o()}};e.each(function(){var s=Un(this,r),f=s.on;f!==t&&(n=(t=f).copy(),n._.cancel.push(u),n._.interrupt.push(u),n._.end.push(c)),s.on=n}),i===0&&o()})}var pE=0;function ie(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Zb(){return++pE}var oe=lo.prototype;ie.prototype={constructor:ie,select:Xk,selectAll:Vk,selectChild:oe.selectChild,selectChildren:oe.selectChildren,filter:Gk,merge:Uk,selection:Zk,transition:fE,call:oe.call,nodes:oe.nodes,node:oe.node,size:oe.size,empty:oe.empty,each:oe.each,on:qk,attr:Mk,attrTween:Pk,style:nE,styleTween:iE,text:uE,textTween:lE,remove:Wk,tween:yk,delay:Nk,duration:Ik,ease:Fk,easeVarying:zk,end:hE,[Symbol.iterator]:oe[Symbol.iterator]};function dE(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var gE={time:null,delay:0,duration:250,ease:dE};function mE(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}function yE(t){var n,e;t instanceof ie?(n=t._id,t=t._name):(n=Zb(),(e=gE).time=Zf(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&as(c,t,n,s,a,e||mE(c,n));return new ie(r,this._parents,t,n)}lo.prototype.interrupt=dk,lo.prototype.transition=yE;function bE(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function us(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function jr(t){return t=us(Math.abs(t)),t?t[1]:NaN}function vE(t,n){return function(e,r){for(var i=e.length,o=[],a=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(n)}}function xE(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}var _E=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ss(t){if(!(n=_E.exec(t)))throw new Error("invalid format: "+t);var n;return new eh({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}ss.prototype=eh.prototype;function eh(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+""}eh.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 wE(t){t:for(var n=t.length,e=1,r=-1,i;e<n;++e)switch(t[e]){case".":r=i=e;break;case"0":r===0&&(r=e),i=e;break;default:if(!+t[e])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Kb;function AE(t,n){var e=us(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Kb=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+us(t,Math.max(0,n+o-1))[0]}function Qb(t,n){var e=us(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Jb={"%":(t,n)=>(t*100).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:bE,e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Qb(t*100,n),r:Qb,s:AE,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function tv(t){return t}var nv=Array.prototype.map,ev=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ME(t){var n=t.grouping===void 0||t.thousands===void 0?tv:vE(nv.call(t.grouping,Number),t.thousands+""),e=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?tv:xE(nv.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function s(h){h=ss(h);var l=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,_=h.precision,v=h.trim,w=h.type;w==="n"?(x=!0,w="g"):Jb[w]||(_===void 0&&(_=12),v=!0,w="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var b=g==="$"?e:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A=g==="$"?r:/[%p]/.test(w)?a:"",M=Jb[w],$=/[defgprs%]/.test(w);_=_===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function D(S){var L=b,E=A,T,k,P;if(w==="c")E=M(S)+E,S="";else{S=+S;var N=S<0||1/S<0;if(S=isNaN(S)?c:M(Math.abs(S),_),v&&(S=wE(S)),N&&+S==0&&d!=="+"&&(N=!1),L=(N?d==="("?d:u:d==="-"||d==="("?"":d)+L,E=(w==="s"?ev[8+Kb/3]:"")+E+(N&&d==="("?")":""),$){for(T=-1,k=S.length;++T<k;)if(P=S.charCodeAt(T),48>P||P>57){E=(P===46?i+S.slice(T+1):S.slice(T))+E,S=S.slice(0,T);break}}}x&&!m&&(S=n(S,1/0));var C=L.length+S.length+E.length,R=C<y?new Array(y-C+1).join(l):"";switch(x&&m&&(S=n(R+S,R.length?y-E.length:1/0),R=""),p){case"<":S=L+S+E+R;break;case"=":S=L+R+S+E;break;case"^":S=R.slice(0,C=R.length>>1)+L+S+E+R.slice(C);break;default:S=R+L+S+E;break}return o(S)}return D.toString=function(){return h+""},D}function f(h,l){var p=s((h=ss(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(jr(l)/3)))*3,g=Math.pow(10,-d),m=ev[8+d/3];return function(y){return p(g*y)+m}}return{format:s,formatPrefix:f}}var cs,rv,iv;$E({thousands:",",grouping:[3],currency:["$",""]});function $E(t){return cs=ME(t),rv=cs.format,iv=cs.formatPrefix,cs}function SE(t){return Math.max(0,-jr(Math.abs(t)))}function TE(t,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(jr(n)/3)))*3-jr(Math.abs(t)))}function DE(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,jr(n)-jr(t))+1}function ls(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t);break}return this}const ov=Symbol("implicit");function av(){var t=new sb,n=[],e=[],r=ov;function i(o){let a=t.get(o);if(a===void 0){if(r!==ov)return r;t.set(o,a=n.push(o)-1)}return e[a%e.length]}return i.domain=function(o){if(!arguments.length)return n.slice();n=[],t=new sb;for(const a of o)t.has(a)||t.set(a,n.push(a)-1);return i},i.range=function(o){return arguments.length?(e=Array.from(o),i):e.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return av(n,e).unknown(r)},ls.apply(i,arguments),i}function uv(){var t=av().unknown(void 0),n=t.domain,e=t.range,r=0,i=1,o,a,u=!1,c=0,s=0,f=.5;delete t.unknown;function h(){var l=n().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+s*2),u&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),u&&(d=Math.round(d),a=Math.round(a));var m=ZT(l).map(function(y){return d+o*y});return e(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(n(l),h()):n()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,u=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(u=!!l,h()):u},t.padding=function(l){return arguments.length?(c=Math.min(1,s=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(s=+l,h()):s},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return uv(n(),[r,i]).round(u).paddingInner(c).paddingOuter(s).align(f)},ls.apply(h(),arguments)}function sv(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return sv(n())},t}function PE(){return sv(uv.apply(null,arguments).paddingInner(1))}function kE(t){return function(){return t}}function EE(t){return+t}var cv=[0,1];function Zr(t){return t}function rh(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:kE(isNaN(n)?NaN:.5)}function NE(t,n){var e;return t>n&&(e=t,t=n,n=e),function(r){return Math.max(t,Math.min(n,r))}}function LE(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=rh(i,r),o=e(a,o)):(r=rh(r,i),o=e(o,a)),function(u){return o(r(u))}}function CE(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<r;)i[a]=rh(t[a],t[a+1]),o[a]=e(n[a],n[a+1]);return function(u){var c=ub(t,u,1,r)-1;return o[c](i[c](u))}}function IE(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function RE(){var t=cv,n=cv,e=jf,r,i,o,a=Zr,u,c,s;function f(){var l=Math.min(t.length,n.length);return a!==Zr&&(a=NE(t[0],t[l-1])),u=l>2?CE:LE,c=s=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=u(t.map(r),n,e)))(r(a(l)))}return h.invert=function(l){return a(i((s||(s=u(n,t.map(r),Sn)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,EE),f()):t.slice()},h.range=function(l){return arguments.length?(n=Array.from(l),f()):n.slice()},h.rangeRound=function(l){return n=Array.from(l),e=nk,f()},h.clamp=function(l){return arguments.length?(a=l?!0:Zr,f()):a!==Zr},h.interpolate=function(l){return arguments.length?(e=l,f()):e},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function FE(){return RE()(Zr,Zr)}function OE(t,n,e,r){var i=jT(t,n,e),o;switch(r=ss(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(n));return r.precision==null&&!isNaN(o=TE(i,a))&&(r.precision=o),iv(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=DE(i,Math.max(Math.abs(t),Math.abs(n))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=SE(i))&&(r.precision=o-(r.type==="%")*2);break}}return rv(r)}function lv(t){var n=t.domain;return t.ticks=function(e){var r=n();return VT(r[0],r[r.length-1],e??10)},t.tickFormat=function(e,r){var i=n();return OE(i[0],i[i.length-1],e??10,r)},t.nice=function(e){e==null&&(e=10);var r=n(),i=0,o=r.length-1,a=r[i],u=r[o],c,s,f=10;for(u<a&&(s=a,a=u,u=s,s=i,i=o,o=s);f-- >0;){if(s=zf(a,u,e),s===c)return r[i]=a,r[o]=u,n(r);if(s>0)a=Math.floor(a/s)*s,u=Math.ceil(u/s)*s;else if(s<0)a=Math.ceil(a*s)/s,u=Math.floor(u*s)/s;else break;c=s}return t},t}function fv(){var t=FE();return t.copy=function(){return IE(t,fv())},ls.apply(t,arguments),lv(t)}function hv(){var t=0,n=1,e=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[ub(r,c,0,e)]:o}function u(){var c=-1;for(r=new Array(e);++c<e;)r[c]=((c+1)*n-(c-e)*t)/(e+1);return a}return a.domain=function(c){return arguments.length?([t,n]=c,t=+t,n=+n,u()):[t,n]},a.range=function(c){return arguments.length?(e=(i=Array.from(c)).length-1,u()):i.slice()},a.invertExtent=function(c){var s=i.indexOf(c);return s<0?[NaN,NaN]:s<1?[t,r[0]]:s>=e?[r[e-1],n]:[r[s-1],r[s]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return hv().domain([t,n]).range(i).unknown(o)},ls.apply(lv(a),arguments)}function vo(t,n,e){this.k=t,this.x=n,this.y=e}vo.prototype={constructor:vo,scale:function(t){return t===1?this:new vo(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new vo(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},vo.prototype;function fs(t){return Object.prototype.toString.call(t)==="[object Object]"}function pv(t,n){if(fs(t)===!1||fs(n)===!1)return Object.assign({},n);const e=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let u;fs(r[a])&&fs(i[a])?(u=e(r[a],i[a]),o[a]=u):o[a]=r[a]}return o};return e(t,n)}var ih=function(t,n){return ih=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},ih(t,n)};function ae(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");ih(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}function zE(t,n,e,r){function i(o){return o instanceof e?o:new e(function(a){a(o)})}return new(e||(e=Promise))(function(o,a){function u(f){try{s(r.next(f))}catch(h){a(h)}}function c(f){try{s(r.throw(f))}catch(h){a(h)}}function s(f){f.done?o(f.value):i(f.value).then(u,c)}s((r=r.apply(t,n||[])).next())})}function dv(t,n){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(f){return c([s,f])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(e=0)),e;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return e.label++,{value:s[1],done:!1};case 5:e.label++,i=s[1],s=[0];continue;case 7:s=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){e.label=s[1];break}if(s[0]===6&&e.label<o[1]){e.label=o[1],o=s;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(s);break}o[2]&&e.ops.pop(),e.trys.pop();continue}s=n.call(t,e)}catch(f){s=[6,f],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Kr(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function xo(t,n){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var r=e.call(t),i,o=[],a;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return o}function _o(t,n,e){if(e||arguments.length===2)for(var r=0,i=n.length,o;r<i;r++)(o||!(r in n))&&(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return t.concat(o||Array.prototype.slice.call(n))}function Qr(t){return this instanceof Qr?(this.v=t,this):new Qr(t)}function GE(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(t,n||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(l){r[l]&&(i[l]=function(p){return new Promise(function(d,g){o.push([l,p,d,g])>1||u(l,p)})})}function u(l,p){try{c(r[l](p))}catch(d){h(o[0][3],d)}}function c(l){l.value instanceof Qr?Promise.resolve(l.value.v).then(s,f):h(o[0][2],l)}function s(l){u("next",l)}function f(l){u("throw",l)}function h(l,p){l(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function UE(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],e;return n?n.call(t):(t=typeof Kr=="function"?Kr(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(o){e[o]=t[o]&&function(a){return new Promise(function(u,c){a=t[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(s){o({value:s,done:u})},a)}}function kt(t){return typeof t=="function"}function oh(t){var n=function(r){Error.call(r),r.stack=new Error().stack},e=t(n);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var ah=oh(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
8
- `+n.map(function(e,r){return r+1+") "+e.toString()}).join(`
9
- `):"",this.name="UnsubscriptionError",this.errors=n}});function hs(t,n){if(t){var e=t.indexOf(n);0<=e&&t.splice(e,1)}}var wo=function(){function t(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var n,e,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=Kr(a),c=u.next();!c.done;c=u.next()){var s=c.value;s.remove(this)}}catch(g){n={error:g}}finally{try{c&&!c.done&&(e=u.return)&&e.call(u)}finally{if(n)throw n.error}}else a.remove(this);var f=this.initialTeardown;if(kt(f))try{f()}catch(g){o=g instanceof ah?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=Kr(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{yv(d)}catch(g){o=o??[],g instanceof ah?o=_o(_o([],xo(o)),xo(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new ah(o)}},t.prototype.add=function(n){var e;if(n&&n!==this)if(this.closed)yv(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(n)}},t.prototype._hasParent=function(n){var e=this._parentage;return e===n||Array.isArray(e)&&e.includes(n)},t.prototype._addParent=function(n){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(n),e):e?[e,n]:n},t.prototype._removeParent=function(n){var e=this._parentage;e===n?this._parentage=null:Array.isArray(e)&&hs(e,n)},t.prototype.remove=function(n){var e=this._finalizers;e&&hs(e,n),n instanceof t&&n._removeParent(this)},t.EMPTY=function(){var n=new t;return n.closed=!0,n}(),t}(),gv=wo.EMPTY;function mv(t){return t instanceof wo||t&&"closed"in t&&kt(t.remove)&&kt(t.add)&&kt(t.unsubscribe)}function yv(t){kt(t)?t():t.unsubscribe()}var bv={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},YE={setTimeout:function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,_o([t,n],xo(e)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function vv(t){YE.setTimeout(function(){throw t})}function uh(){}function ps(t){t()}var sh=function(t){ae(n,t);function n(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,mv(e)&&e.add(r)):r.destination=WE,r}return n.create=function(e,r,i){return new Ao(e,r,i)},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(wo),BE=Function.prototype.bind;function ch(t,n){return BE.call(t,n)}var qE=function(){function t(n){this.partialObserver=n}return t.prototype.next=function(n){var e=this.partialObserver;if(e.next)try{e.next(n)}catch(r){ds(r)}},t.prototype.error=function(n){var e=this.partialObserver;if(e.error)try{e.error(n)}catch(r){ds(r)}else ds(n)},t.prototype.complete=function(){var n=this.partialObserver;if(n.complete)try{n.complete()}catch(e){ds(e)}},t}(),Ao=function(t){ae(n,t);function n(e,r,i){var o=t.call(this)||this,a;if(kt(e)||!e)a={next:e??void 0,error:r??void 0,complete:i??void 0};else{var u;o&&bv.useDeprecatedNextContext?(u=Object.create(e),u.unsubscribe=function(){return o.unsubscribe()},a={next:e.next&&ch(e.next,u),error:e.error&&ch(e.error,u),complete:e.complete&&ch(e.complete,u)}):a=e}return o.destination=new qE(a),o}return n}(sh);function ds(t){vv(t)}function HE(t){throw t}var WE={closed:!0,next:uh,error:HE,complete:uh},lh=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function xv(t){return t}function XE(t){return t.length===0?xv:t.length===1?t[0]:function(n){return t.reduce(function(e,r){return r(e)},n)}}var Dn=function(){function t(n){n&&(this._subscribe=n)}return t.prototype.lift=function(n){var e=new t;return e.source=this,e.operator=n,e},t.prototype.subscribe=function(n,e,r){var i=this,o=jE(n)?n:new Ao(n,e,r);return ps(function(){var a=i,u=a.operator,c=a.source;o.add(u?u.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(e){n.error(e)}},t.prototype.forEach=function(n,e){var r=this;return e=_v(e),new e(function(i,o){var a=new Ao({next:function(u){try{n(u)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(n){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(n)},t.prototype[lh]=function(){return this},t.prototype.pipe=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return XE(n)(this)},t.prototype.toPromise=function(n){var e=this;return n=_v(n),new n(function(r,i){var o;e.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(n){return new t(n)},t}();function _v(t){var n;return(n=t??bv.Promise)!==null&&n!==void 0?n:Promise}function VE(t){return t&&kt(t.next)&&kt(t.error)&&kt(t.complete)}function jE(t){return t&&t instanceof sh||VE(t)&&mv(t)}function ZE(t){return kt(t==null?void 0:t.lift)}function nr(t){return function(n){if(ZE(n))return n.lift(function(e){try{return t(e,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Mo(t,n,e,r,i){return new KE(t,n,e,r,i)}var KE=function(t){ae(n,t);function n(e,r,i,o,a,u){var c=t.call(this,e)||this;return c.onFinalize=a,c.shouldUnsubscribe=u,c._next=r?function(s){try{r(s)}catch(f){e.error(f)}}:t.prototype._next,c._error=o?function(s){try{o(s)}catch(f){e.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(s){e.error(s)}finally{this.unsubscribe()}}:t.prototype._complete,c}return n.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},n}(sh),QE=oh(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),$o=function(t){ae(n,t);function n(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return n.prototype.lift=function(e){var r=new wv(this,this);return r.operator=e,r},n.prototype._throwIfClosed=function(){if(this.closed)throw new QE},n.prototype.next=function(e){var r=this;ps(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Kr(r.currentObservers),u=a.next();!u.done;u=a.next()){var c=u.value;c.next(e)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},n.prototype.error=function(e){var r=this;ps(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var i=r.observers;i.length;)i.shift().error(e)}})},n.prototype.complete=function(){var e=this;ps(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},n.prototype._innerSubscribe=function(e){var r=this,i=this,o=i.hasError,a=i.isStopped,u=i.observers;return o||a?gv:(this.currentObservers=null,u.push(e),new wo(function(){r.currentObservers=null,hs(u,e)}))},n.prototype._checkFinalizedStatuses=function(e){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?e.error(o):a&&e.complete()},n.prototype.asObservable=function(){var e=new Dn;return e.source=this,e},n.create=function(e,r){return new wv(e,r)},n}(Dn),wv=function(t){ae(n,t);function n(e,r){var i=t.call(this)||this;return i.destination=e,i.source=r,i}return n.prototype.next=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,e)},n.prototype.error=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,e)},n.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},n.prototype._subscribe=function(e){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&i!==void 0?i:gv},n}($o),fh={now:function(){return(fh.delegate||Date).now()},delegate:void 0},JE=function(t){ae(n,t);function n(e,r,i){e===void 0&&(e=1/0),r===void 0&&(r=1/0),i===void 0&&(i=fh);var o=t.call(this)||this;return o._bufferSize=e,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,e),o._windowTime=Math.max(1,r),o}return n.prototype.next=function(e){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,u=r._timestampProvider,c=r._windowTime;i||(o.push(e),!a&&o.push(u.now()+c)),this._trimBuffer(),t.prototype.next.call(this,e)},n.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(e),i=this,o=i._infiniteTimeWindow,a=i._buffer,u=a.slice(),c=0;c<u.length&&!e.closed;c+=o?1:2)e.next(u[c]);return this._checkFinalizedStatuses(e),r},n.prototype._trimBuffer=function(){var e=this,r=e._bufferSize,i=e._timestampProvider,o=e._buffer,a=e._infiniteTimeWindow,u=(a?1:2)*r;if(r<1/0&&u<o.length&&o.splice(0,o.length-u),!a){for(var c=i.now(),s=0,f=1;f<o.length&&o[f]<=c;f+=2)s=f;s&&o.splice(0,s+1)}},n}($o),tN=function(t){ae(n,t);function n(e,r){return t.call(this)||this}return n.prototype.schedule=function(e,r){return this},n}(wo),Av={setInterval:function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setInterval.apply(void 0,_o([t,n],xo(e)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},nN=function(t){ae(n,t);function n(e,r){var i=t.call(this,e,r)||this;return i.scheduler=e,i.work=r,i.pending=!1,i}return n.prototype.schedule=function(e,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=e;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},n.prototype.requestAsyncId=function(e,r,i){return i===void 0&&(i=0),Av.setInterval(e.flush.bind(e,this),i)},n.prototype.recycleAsyncId=function(e,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Av.clearInterval(r)},n.prototype.execute=function(e,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},n.prototype._execute=function(e,r){var i=!1,o;try{this.work(e)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},n.prototype.unsubscribe=function(){if(!this.closed){var e=this,r=e.id,i=e.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,hs(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},n}(tN),Mv=function(){function t(n,e){e===void 0&&(e=t.now),this.schedulerActionCtor=n,this.now=e}return t.prototype.schedule=function(n,e,r){return e===void 0&&(e=0),new this.schedulerActionCtor(this,n).schedule(r,e)},t.now=fh.now,t}(),eN=function(t){ae(n,t);function n(e,r){r===void 0&&(r=Mv.now);var i=t.call(this,e,r)||this;return i.actions=[],i._active=!1,i}return n.prototype.flush=function(e){var r=this.actions;if(this._active){r.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,i){for(;e=r.shift();)e.unsubscribe();throw i}},n}(Mv);new eN(nN);function rN(t){return t&&kt(t.schedule)}function iN(t){return t[t.length-1]}function $v(t){return rN(iN(t))?t.pop():void 0}var Sv=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Tv(t){return kt(t==null?void 0:t.then)}function Dv(t){return kt(t[lh])}function Pv(t){return Symbol.asyncIterator&&kt(t==null?void 0:t[Symbol.asyncIterator])}function kv(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function oN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ev=oN();function Nv(t){return kt(t==null?void 0:t[Ev])}function Lv(t){return GE(this,arguments,function(){var n,e,r,i;return dv(this,function(o){switch(o.label){case 0:n=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Qr(n.read())];case 3:return e=o.sent(),r=e.value,i=e.done,i?[4,Qr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Qr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Cv(t){return kt(t==null?void 0:t.getReader)}function xe(t){if(t instanceof Dn)return t;if(t!=null){if(Dv(t))return aN(t);if(Sv(t))return uN(t);if(Tv(t))return sN(t);if(Pv(t))return Iv(t);if(Nv(t))return cN(t);if(Cv(t))return lN(t)}throw kv(t)}function aN(t){return new Dn(function(n){var e=t[lh]();if(kt(e.subscribe))return e.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function uN(t){return new Dn(function(n){for(var e=0;e<t.length&&!n.closed;e++)n.next(t[e]);n.complete()})}function sN(t){return new Dn(function(n){t.then(function(e){n.closed||(n.next(e),n.complete())},function(e){return n.error(e)}).then(null,vv)})}function cN(t){return new Dn(function(n){var e,r;try{for(var i=Kr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(n.next(a),n.closed)return}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}n.complete()})}function Iv(t){return new Dn(function(n){fN(t,n).catch(function(e){return n.error(e)})})}function lN(t){return Iv(Lv(t))}function fN(t,n){var e,r,i,o;return zE(this,void 0,void 0,function(){var a,u;return dv(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=UE(t),c.label=1;case 1:return[4,e.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,n.next(a),n.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=c.sent(),i={error:u},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=e.return)?[4,o.call(e)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}})})}function _e(t,n,e,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=n.schedule(function(){e(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Rv(t,n){return n===void 0&&(n=0),nr(function(e,r){e.subscribe(Mo(r,function(i){return _e(r,t,function(){return r.next(i)},n)},function(){return _e(r,t,function(){return r.complete()},n)},function(i){return _e(r,t,function(){return r.error(i)},n)}))})}function Fv(t,n){return n===void 0&&(n=0),nr(function(e,r){r.add(t.schedule(function(){return e.subscribe(r)},n))})}function hN(t,n){return xe(t).pipe(Fv(n),Rv(n))}function pN(t,n){return xe(t).pipe(Fv(n),Rv(n))}function dN(t,n){return new Dn(function(e){var r=0;return n.schedule(function(){r===t.length?e.complete():(e.next(t[r++]),e.closed||this.schedule())})})}function gN(t,n){return new Dn(function(e){var r;return _e(e,n,function(){r=t[Ev](),_e(e,n,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(u){e.error(u);return}a?e.complete():e.next(o)},0,!0)}),function(){return kt(r==null?void 0:r.return)&&r.return()}})}function Ov(t,n){if(!t)throw new Error("Iterable cannot be null");return new Dn(function(e){_e(e,n,function(){var r=t[Symbol.asyncIterator]();_e(e,n,function(){r.next().then(function(i){i.done?e.complete():e.next(i.value)})},0,!0)})})}function mN(t,n){return Ov(Lv(t),n)}function yN(t,n){if(t!=null){if(Dv(t))return hN(t,n);if(Sv(t))return dN(t,n);if(Tv(t))return pN(t,n);if(Pv(t))return Ov(t,n);if(Nv(t))return gN(t,n);if(Cv(t))return mN(t,n)}throw kv(t)}function bN(t,n){return n?yN(t,n):xe(t)}oh(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function zv(t,n){return nr(function(e,r){var i=0;e.subscribe(Mo(r,function(o){r.next(t.call(n,o,i++))}))})}function vN(t,n,e,r,i,o,a,u){var c=[],s=0,f=0,h=!1,l=function(){h&&!c.length&&!s&&n.complete()},p=function(g){return s<r?d(g):c.push(g)},d=function(g){o&&n.next(g),s++;var m=!1;xe(e(g,f++)).subscribe(Mo(n,function(y){i==null||i(y),o?p(y):n.next(y)},function(){m=!0},void 0,function(){if(m)try{s--;for(var y=function(){var x=c.shift();a?_e(n,a,function(){return d(x)}):d(x)};c.length&&s<r;)y();l()}catch(x){n.error(x)}}))};return t.subscribe(Mo(n,p,function(){h=!0,l()})),function(){u==null||u()}}function Gv(t,n,e){return e===void 0&&(e=1/0),kt(n)?Gv(function(r,i){return zv(function(o,a){return n(r,o,i,a)})(xe(t(r,i)))},e):(typeof n=="number"&&(e=n),nr(function(r,i){return vN(r,i,t,e)}))}function xN(t){return t===void 0&&(t=1/0),Gv(xv,t)}function _N(){return xN(1)}function Uv(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return _N()(bN(t,$v(t)))}function wN(t){t===void 0&&(t={});var n=t.connector,e=n===void 0?function(){return new $o}:n,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,u=t.resetOnRefCountZero,c=u===void 0?!0:u;return function(s){var f,h,l,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),f=l=void 0,d=g=!1},x=function(){var _=f;y(),_==null||_.unsubscribe()};return nr(function(_,v){p++,!g&&!d&&m();var w=l=l??e();v.add(function(){p--,p===0&&!g&&!d&&(h=hh(x,c))}),w.subscribe(v),!f&&p>0&&(f=new Ao({next:function(b){return w.next(b)},error:function(b){g=!0,m(),h=hh(y,i,b),w.error(b)},complete:function(){d=!0,m(),h=hh(y,a),w.complete()}}),xe(_).subscribe(f))})(s)}}function hh(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];if(n===!0){t();return}if(n!==!1){var i=new Ao({next:function(){i.unsubscribe(),t()}});return xe(n.apply(void 0,_o([],xo(e)))).subscribe(i)}}function AN(t,n,e){var r,i,o,a,u=!1;return t&&typeof t=="object"?(r=t.bufferSize,a=r===void 0?1/0:r,i=t.windowTime,n=i===void 0?1/0:i,o=t.refCount,u=o===void 0?!1:o,e=t.scheduler):a=t??1/0,wN({connector:function(){return new JE(a,n,e)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}function MN(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=$v(t);return nr(function(r,i){(e?Uv(t,r,e):Uv(t,r)).subscribe(i)})}function $N(t){return nr(function(n,e){xe(t).subscribe(Mo(e,function(){return e.complete()},uh)),!e.closed&&n.subscribe(e)})}const ph=({maxValue:t=1,minValue:n=0,axisWidth:e,scaleDomain:r=Hr.scaleDomain,scaleRange:i=Hr.scaleRange})=>{const o=r[0]??Hr.scaleDomain[0],a=r[1]??Hr.scaleDomain[1],u=i[0]??Hr.scaleRange[0],c=i[1]??Hr.scaleRange[1],s=o==="auto"?n:o,f=a==="auto"?t:a;let h=e*u,l=e*c;return fv().domain([s,f]).range([h,l])},Yv=({axisLabels:t,axisWidth:n,padding:e=.5})=>{let r=[0,n];return PE().domain(t).range(r).padding(e)},SN=({axisLabels:t,axisWidth:n,padding:e=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),hv().domain([-0,n+0]).range(i)};function TN({name:t,defaultParams:n,initFn:e}){const r=new $o,i=new $o,o=new WeakMap;let a=()=>{},u,c=n;return{params$:i,name:t,defaultParams:n,init(){u&&(a=e(u)??(()=>{}),o.set(u.selection,u))},destroy(){a(),u&&(u.selection.remove(),u=void 0),r.next(void 0)},setPresetParams:s=>{c=pv(s,n)},setContext:s=>{u=s,u.observer.fullParams$=i.pipe($N(r),MN({}),zv(f=>pv(f,c)),AN(1))}}}const dh=()=>function(t,n){return function(e){return class{constructor(){const r=TN({name:t,defaultParams:n,initFn:e});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},gs=dh(),Yn=dh(),Bv=dh();function qv(t){try{return t.node().getBBox()}catch(n){throw new Error(n)}}function DN(t,n){function e(i){var u;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((u=o==null?void 0:o.firstChild)!=null&&u.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(e(n))}function Jr(t){return t.substring(0,4)!=="ease"?vi:Ny[t]??vi}function ms({axisWidth:t,innerRadius:n,outerRadius:e,padAngle:r,cornerRadius:i}){const o=jl().domain([0,1]).range([0,t/2]),a=o(e);return Um().innerRadius(o(n)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const ys=(t,n)=>n instanceof Function?n(t):Si(n)(t);function PN(t,n=10){var i;const e=document.createElement("canvas").getContext("2d");return(((i=e==null?void 0:e.measureText(t))==null?void 0:i.width)??0)*n/10}function Hv(t){const n=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):n}function kN(t){const n=t.filter(e=>e.value!=null&&e.visible!=!1).map(e=>e.value);return Hv(n)}function It(t,n){const e=n.colors[n.colorScheme];return t==="series"?e.series[0]:e[t]!=null?e[t]:e.primary}function gh({datum:t,colorType:n,fullChartParams:e}){return n==="series"?t.color?t.color:e.colors[e.colorScheme].series[0]:e.colors[e.colorScheme][n]!=null?e.colors[e.colorScheme][n]:e.colors[e.colorScheme].primary}function ht(t,n,e){const r=e?`--${e}`:"";return`orbcharts-${t}__${n}${r}`}function ti(t,n){const r=Math.random().toString(36).substr(2,5);return ht(t,n,r)}function Wv({fullDataFormatter$:t,gridAxesSize$:n,computedData$:e,fullChartParams$:r}){const i=new yt,o=new nt(a=>{H({dataFormatter:t,computedData:e}).pipe(I(i),Y(async u=>u)).subscribe(u=>{const s=u.computedData[0]?u.computedData[0].length-1:0,f=u.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-u.dataFormatter.groupAxis.scalePadding:u.dataFormatter.groupAxis.scaleDomain[0]-u.dataFormatter.groupAxis.scalePadding,h=u.dataFormatter.groupAxis.scaleDomain[1]==="auto"?s+u.dataFormatter.groupAxis.scalePadding:u.dataFormatter.groupAxis.scaleDomain[1]+u.dataFormatter.groupAxis.scalePadding,p=(u.dataFormatter.grid.seriesType==="row"?(u.computedData[0]??[]).map(d=>d.groupLabel):u.computedData.map(d=>d[0].groupLabel)).filter((d,g)=>g>=f&&g<=h);a.next(p)})});return new nt(a=>{H({dataFormatter:t,axisSize:n,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(I(i),Y(async u=>u)).subscribe(u=>{const c=u.dataFormatter.valueAxis.position==="right"||u.dataFormatter.valueAxis.position==="bottom",s=SN({axisLabels:u.scaleRangeGroupLabels,axisWidth:u.axisSize.width,reverse:c}),f=l=>u.dataFormatter.groupAxis.position==="bottom"||u.dataFormatter.groupAxis.position==="top"?l.offsetX-u.fullChartParams.padding.left:l.offsetY-u.fullChartParams.padding.top,h=l=>{const p=f(l),d=s(p);return{groupIndex:d,groupLabel:u.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})}const bs="Lines",EN=ht(bs,"g"),NN=ht(bs,"path");function LN(t="curveLinear"){return Pu().x(n=>n.axisX).y(n=>n.axisY).curve(Ny[t])}function CN(t){let n=[[]],e=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){n[e].length&&(e++,n[e]=[]);continue}n[e].push(t[r])}return n}function IN({selection:t,segmentData:n,linePath:e,params:r}){return t.selectAll("path").data(n,(o,a)=>o.length?`${o[0].id}_${o[o.length-1].id}`:a).join(o=>o.append("path").classed(NN,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),o=>o,o=>o.remove()).attr("stroke-width",r.lineWidth).attr("stroke",(o,a)=>o[0]&&o[0].color).attr("d",o=>e(o))}function RN({selection:t,seriesLabel:n,fullChartParams:e}){if(t.interrupt("highlight"),!n){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===n?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",e.styles.unhighlightedOpacity)})}function FN({defsSelection:t,clipPathData:n,transitionDuration:e,transitionEase:r}){t.selectAll("clipPath").data(n).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{Z(a[o]).selectAll("rect").data([i]).join(u=>{const c=u.append("rect");return c.transition().duration(e).ease(Jr(r)).tween("tween",(s,f,h)=>l=>{const p=s.width*l;c.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),c},u=>u.attr("x",0).attr("y",0).attr("width",c=>c.width).attr("height",c=>c.height),u=>u.remove())})}const ON=Yn(bs,rr)(({selection:t,name:n,observer:e,subject:r})=>{const i=new yt,o=ti(bs,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new yt;e.gridAxesTransform$.pipe(I(i),B(x=>x.value),K()).subscribe(x=>{a.style("transform",x)}),e.gridGraphicTransform$.pipe(I(i),B(x=>x.value),K()).subscribe(x=>{c.transition().duration(50).style("transform",x)});const f=new nt(x=>{const _=e.fullParams$.pipe(I(i)).subscribe(v=>{if(!v)return;const w=LN(v.lineCurve);x.next(w)});return()=>{_.unsubscribe()}}),h=new nt(x=>{e.computedData$.pipe(I(i),Y(async _=>_)).subscribe(_=>{const v=_[0]&&_[0][0]?_.map(w=>w[0].seriesLabel):[];x.next(v)})}),l=e.fullChartParams$.pipe(B(x=>x.transitionDuration),K()),p=e.fullChartParams$.pipe(B(x=>x.transitionEase),K());H({seriesLabels:h,axisSize:e.gridAxesSize$,transitionDuration:l,transitionEase:p}).pipe(I(i),Y(async x=>x)).subscribe(x=>{const v=[{id:o,width:x.axisSize.width,height:x.axisSize.height}].concat(x.seriesLabels.map(w=>({id:`orbcharts__clipPath_${w}`,width:x.axisSize.width,height:x.axisSize.height})));FN({defsSelection:u,clipPathData:v,transitionDuration:x.transitionDuration,transitionEase:x.transitionEase})});const d=e.computedData$.pipe(B(x=>{const _=new Map;return x.flat().forEach(v=>_.set(v.id,v)),_})),g=Wv({fullDataFormatter$:e.fullDataFormatter$,gridAxesSize$:e.gridAxesSize$,computedData$:e.computedData$,fullChartParams$:e.fullChartParams$}),m=e.fullChartParams$.pipe(I(i),B(x=>x.highlightTarget),K());H({seriesLabels:h,computedData:e.computedData$,SeriesDataMap:e.SeriesDataMap$,GroupDataMap:e.GroupDataMap$,linePath:f,params:e.fullParams$,highlightTarget:m,gridGroupPositionFn:g}).pipe(I(i),Y(async x=>x)).subscribe(x=>{const _=c.selectAll("g").data(x.seriesLabels,(b,A)=>b),v=_.enter().append("g").classed(EN,!0);_.exit().remove();const w=_.merge(v).attr("clip-path",(b,A)=>`url(#orbcharts__clipPath_${b})`);w.each((b,A,M)=>{const $=CN(x.computedData[A]??[]);IN({selection:Z(M[A]),linePath:x.linePath,segmentData:$,params:x.params}).on("mouseover",(S,L)=>{S.stopPropagation();const E=L[0]?L[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=x.gridGroupPositionFn(S),C=x.GroupDataMap.get(k).find(R=>R.seriesLabel===E)??L[0];r.event$.next({type:"grid",eventName:"mouseover",pluginName:n,highlightTarget:x.highlightTarget,datum:C,series:x.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:x.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:S,data:x.computedData})}).on("mousemove",(S,L)=>{S.stopPropagation();const E=L[0]?L[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=x.gridGroupPositionFn(S),C=x.GroupDataMap.get(k).find(R=>R.seriesLabel===E)??L[0];r.event$.next({type:"grid",eventName:"mousemove",pluginName:n,highlightTarget:x.highlightTarget,datum:C,series:x.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:x.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:S,data:x.computedData})}).on("mouseout",(S,L)=>{S.stopPropagation();const E=L[0]?L[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=x.gridGroupPositionFn(S),C=x.GroupDataMap.get(k).find(R=>R.seriesLabel===E)??L[0];r.event$.next({type:"grid",eventName:"mouseout",pluginName:n,highlightTarget:x.highlightTarget,datum:C,series:x.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:x.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:S,data:x.computedData})}).on("click",(S,L)=>{S.stopPropagation();const E=L[0]?L[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=x.gridGroupPositionFn(S),C=x.GroupDataMap.get(k).find(R=>R.seriesLabel===E)??L[0];r.event$.next({type:"grid",eventName:"click",pluginName:n,highlightTarget:x.highlightTarget,datum:C,series:x.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:x.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:S,data:x.computedData})})}),s.next(w)});const y=e.gridHighlight$.subscribe();return e.fullChartParams$.pipe(I(i),so(x=>x.highlightTarget==="series"),Y(x=>H({graphicSelection:s,highlight:e.gridHighlight$,DataMap:d,fullChartParams:e.fullChartParams$}).pipe(I(i),Y(async _=>_)))).subscribe(x=>{const _=x.DataMap.get(x.highlight[0]);RN({selection:x.graphicSelection,seriesLabel:_&&_.seriesLabel?_.seriesLabel:null,fullChartParams:x.fullChartParams})}),()=>{y.unsubscribe(),i.next(void 0)}}),vs="Bars",Xv=ht(vs,"g"),Vv=ht(vs,"rect"),jv=.3;function zN({axisWidth:t,groupAmount:n,barAmountOfGroup:e,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(n-1)-i)/e-r;return a>1?a:1}function GN(t,n,e){const r=t/2,i=t*n.length+e.barPadding*n.length;return Wl().domain(n).range([-i/2+r,i/2-r])}function UN(t,n){return t<=1?0:n/(t-1)*jv}function YN(t,n){return t<=1?n:n*(1-jv)}function BN({selection:t,data:n,zeroY:e,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:u,transformedBarRadius:c,delayGroup:s,transitionItem:f}){const h=u/2;return t.selectAll(`g.${Xv}`).data(n,(d,g)=>r[g]).join(d=>d.append("g").classed(Xv,!0).attr("cursor","pointer"),d=>d,d=>d.remove()).attr("transform",(d,g)=>`translate(${d[0]?d[0].axisX:0}, 0)`).each((d,g,m)=>{Z(m[g]).selectAll("rect").data(d,y=>y.id).join(y=>y.append("rect").classed(Vv,!0).attr("height",x=>0),y=>y,y=>y.remove()).attr("fill",y=>y.color).attr("y",y=>y.axisY<e?y.axisY:e).attr("x",y=>i(y.seriesLabel)).attr("width",u).attr("transform",`translate(${-h}, 0)`).attr("rx",c[0]).attr("ry",c[1]).transition().duration(f).ease(Jr(a.transitionEase)).delay((y,x)=>y.groupIndex*s).attr("height",y=>Math.abs(y.axisYFromZero))}).selectAll(`rect.${Vv}`)}function qN({defsSelection:t,clipPathData:n}){t.selectAll("clipPath").data(n).join(e=>e.append("clipPath"),e=>e,e=>e.remove()).attr("id",e=>e.id).each((e,r,i)=>{Z(i[r]).selectAll("rect").data([e]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function HN({selection:t,ids:n,fullChartParams:e}){if(t.interrupt("highlight"),!n.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{n.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",e.styles.unhighlightedOpacity)})}const WN=Yn(vs,Dh)(({selection:t,name:n,subject:e,observer:r})=>{const i=new yt,o=ti(vs,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new yt;r.gridAxesTransform$.pipe(I(i),B(b=>b.value),K()).subscribe(b=>{a.style("transform",b)}),r.gridGraphicTransform$.pipe(I(i),B(b=>b.value),K()).subscribe(b=>{c.transition().duration(50).style("transform",b)});const f=r.visibleComputedData$.pipe(B(b=>b[0]&&b[0][0]?b[0][0].axisY-b[0][0].axisYFromZero:0),K()),h=new nt(b=>{H({computedData:r.computedData$,visibleComputedData:r.visibleComputedData$,params:r.fullParams$,gridAxesSize:r.gridAxesSize$}).pipe(Y(async A=>A)).subscribe(A=>{const M=A.params.barWidth?A.params.barWidth:zN({axisWidth:A.gridAxesSize.width,groupAmount:A.computedData[0]?A.computedData[0].length:0,barAmountOfGroup:A.visibleComputedData.length,barPadding:A.params.barPadding,barGroupPadding:A.params.barGroupPadding});b.next(M)})}).pipe(I(i),K()),l=H({gridGraphicTransform:r.gridGraphicTransform$,barWidth:h,params:r.fullParams$}).pipe(I(i),Y(async b=>b),B(b=>{const A=b.barWidth/2,M=b.params.barRadius===!0?A:b.params.barRadius===!1?0:typeof b.params.barRadius=="number"?b.params.barRadius:0,$=M==0?0:M/b.gridGraphicTransform.scale[0],D=M==0?0:M/b.gridGraphicTransform.scale[1];return[$,D]})),p=r.visibleComputedData$.pipe(I(i),B(b=>{const A=new Set;return b.forEach(M=>{M.forEach($=>{A.add($.seriesLabel)})}),Array.from(A)})),d=r.visibleComputedData$.pipe(I(i),B(b=>{const A=new Set;return b.forEach(M=>{M.forEach($=>{A.add($.groupLabel)})}),Array.from(A)})),g=new nt(b=>{H({seriesLabels:p,barWidth:h,params:r.fullParams$}).pipe(I(i),Y(async A=>A)).subscribe(A=>{const M=GN(A.barWidth,A.seriesLabels,A.params);b.next(M)})}),m=r.fullChartParams$.pipe(I(i),B(b=>b.transitionDuration),K()),y=new nt(b=>{H({groupLabels:d,transitionDuration:m}).pipe(Y(async A=>A)).subscribe(A=>{const M=UN(A.groupLabels.length,A.transitionDuration);b.next(M)})}).pipe(I(i),K()),x=new nt(b=>{H({groupLabels:d,transitionDuration:m}).pipe(Y(async A=>A)).subscribe(A=>{const M=YN(A.groupLabels.length,A.transitionDuration);b.next(M)})}).pipe(I(i),K()),_=r.visibleComputedData$.pipe(I(i),B(b=>{const A=b.length,M=b.reduce((D,S)=>Math.max(D,S.length),0),$=new Array(M).fill(null).map(()=>new Array(A).fill(null));for(let D=0;D<A;D++)for(let S=0;S<M;S++)$[S][D]=b[D][S];return $}));r.gridAxesSize$.pipe(I(i)).subscribe(b=>{const A=[{id:o,width:b.width,height:b.height}];qN({defsSelection:u,clipPathData:A})});const v=r.fullChartParams$.pipe(I(i),B(b=>b.highlightTarget),K());H({computedData:r.computedData$,barData$:_,zeroY:f,groupLabels:d,barScale:g,params:r.fullParams$,chartParams:r.fullChartParams$,highlightTarget:v,barWidth:h,transformedBarRadius:l,delayGroup:y,transitionItem:x,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{const A=BN({selection:c,data:b.barData$,zeroY:b.zeroY,groupLabels:b.groupLabels,barScale:b.barScale,params:b.params,chartParams:b.chartParams,barWidth:b.barWidth,transformedBarRadius:b.transformedBarRadius,delayGroup:b.delayGroup,transitionItem:b.transitionItem});A.on("mouseover",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"mouseover",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("mousemove",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"mousemove",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("mouseout",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"mouseout",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("click",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"click",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}),s.next(A)});const w=r.gridHighlight$.subscribe();return H({barSelection:s,highlight:r.gridHighlight$,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{HN({selection:b.barSelection,ids:b.highlight,fullChartParams:b.fullChartParams})}),()=>{i.next(void 0),w.unsubscribe()}}),xs="BarStack",Zv=ht(xs,"g"),Kv=ht(xs,"g-content"),Qv=.3;function XN({axisWidth:t,groupAmount:n,barGroupPadding:e=0}){const i=t/(n-1)-e;return i>1?i:1}function VN(t,n){return t<=1?0:n/(t-1)*Qv}function jN(t,n){return t<=1?n:n*(1-Qv)}function ZN({selection:t,data:n,zeroY:e,groupLabels:r,params:i,chartParams:o,barWidth:a,transformedBarRadius:u,delayGroup:c,transitionItem:s}){const f=a/2;return t.selectAll(`g.${Zv}`).data(n,(p,d)=>r[d]).join(p=>p.append("g").classed(Zv,!0).attr("cursor","pointer"),p=>p,p=>p.remove()).attr("transform",(p,d)=>`translate(${p[0]?p[0].axisX:0}, 0)`).each((p,d,g)=>{Z(g[d]).selectAll("g").data(p,m=>m.id).join(m=>m.append("g").classed(Kv,!0),m=>m,m=>m.remove()).each((m,y,x)=>{Z(x[y]).selectAll("rect").data([m],_=>_.id).join(_=>_.append("rect").attr("y",v=>e).attr("height",v=>0),_=>_,_=>_.remove()).attr("rx",u[0]).attr("ry",u[1]).attr("fill",_=>_.color).attr("transform",`translate(${-f}, 0)`).attr("x",_=>0).attr("width",a).transition().duration(s).ease(Jr(o.transitionEase)).delay((_,v)=>_.groupIndex*c).attr("y",_=>_._barStartY).attr("height",_=>Math.abs(_._barHeight))})}).selectAll(`g.${Kv}`)}function KN({defsSelection:t,clipPathData:n}){t.selectAll("clipPath").data(n).join(e=>e.append("clipPath"),e=>e,e=>e.remove()).attr("id",e=>e.id).each((e,r,i)=>{Z(i[r]).selectAll("rect").data([e]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function QN({selection:t,ids:n,fullChartParams:e}){if(t.interrupt("highlight"),!n.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{n.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",e.styles.unhighlightedOpacity)})}const JN=Yn(xs,Ph)(({selection:t,name:n,subject:e,observer:r})=>{const i=new yt,o=ti(xs,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new yt;r.gridAxesTransform$.pipe(I(i),B(b=>b.value),K()).subscribe(b=>{a.style("transform",b)}),r.gridGraphicTransform$.pipe(I(i),Y(async b=>b.value),K()).subscribe(b=>{c.transition().duration(50).style("transform",b)});const f=r.visibleComputedData$.pipe(B(b=>b[0]&&b[0][0]?b[0][0].axisY-b[0][0].axisYFromZero:0),K()),h=new nt(b=>{H({computedData:r.computedData$,params:r.fullParams$,axisSize:r.gridAxesSize$}).pipe(Y(async A=>A)).subscribe(A=>{const M=A.params.barWidth?A.params.barWidth:XN({axisWidth:A.axisSize.width,groupAmount:A.computedData[0]?A.computedData[0].length:0,barGroupPadding:A.params.barGroupPadding});b.next(M)})}).pipe(I(i),K()),l=H({gridGraphicTransform:r.gridGraphicTransform$,barWidth:h,params:r.fullParams$}).pipe(I(i),Y(async b=>b),B(b=>{const A=b.barWidth/2,M=b.params.barRadius===!0?A:b.params.barRadius===!1?0:typeof b.params.barRadius=="number"?b.params.barRadius:0,$=M==0?0:M/b.gridGraphicTransform.scale[0],D=M==0?0:M/b.gridGraphicTransform.scale[1];return[$,D]})),p=r.visibleComputedData$.pipe(I(i),B(b=>{const A=new Set;return b.forEach(M=>{M.forEach($=>{A.add($.groupLabel)})}),Array.from(A)})),d=r.fullChartParams$.pipe(I(i),B(b=>b.transitionDuration),K()),g=new nt(b=>{H({groupLabels:p,transitionDuration:d}).pipe(Y(async A=>A)).subscribe(A=>{const M=VN(A.groupLabels.length,A.transitionDuration);b.next(M)})}).pipe(I(i),K()),m=new nt(b=>{H({groupLabels:p,transitionDuration:d}).pipe(Y(async A=>A)).subscribe(A=>{const M=jN(A.groupLabels.length,A.transitionDuration);b.next(M)})}).pipe(I(i),K()),y=r.visibleComputedData$.pipe(I(i),B(b=>{console.log("visibleComputedData",b);const A=b.length,M=b.reduce((D,S)=>Math.max(D,S.length),0),$=new Array(M).fill(null).map(()=>new Array(A).fill(null));for(let D=0;D<A;D++)for(let S=0;S<M;S++)$[S][D]=b[D][S];return $})),x=H({transposedVisibleData:y,dataFormatter:r.fullDataFormatter$}).pipe(I(i),Y(async b=>b),B(b=>{const M=b.transposedVisibleData.length-1,$=b.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-b.dataFormatter.groupAxis.scalePadding:b.dataFormatter.groupAxis.scaleDomain[0]-b.dataFormatter.groupAxis.scalePadding,D=b.dataFormatter.groupAxis.scaleDomain[1]==="auto"?M+b.dataFormatter.groupAxis.scalePadding:b.dataFormatter.groupAxis.scaleDomain[1]+b.dataFormatter.groupAxis.scalePadding,S=b.transposedVisibleData.map(L=>L.filter((E,T)=>E.groupIndex>=$&&E.groupIndex<=D));if(S.flat().length){const L=S.flat().map(P=>P.axisYFromZero),E=Math.max(...L),T=S.map(P=>P.reduce((N,C)=>N+C.axisYFromZero,0)),k=Math.max(...T);return E/k}else return 1})),_=H({transposedVisibleData:y,yRatio:x,zeroY:f}).pipe(I(i),B(b=>(console.log(b.transposedVisibleData),b.transposedVisibleData.map(A=>{let M=b.zeroY;return A.map($=>{const D=M,S=$.axisYFromZero*b.yRatio;return M=M+S,{...$,_barStartY:D,_barHeight:S}})}))));r.gridAxesSize$.pipe(I(i)).subscribe(b=>{const A=[{id:o,width:b.width,height:b.height}];KN({defsSelection:u,clipPathData:A})});const v=r.fullChartParams$.pipe(I(i),B(b=>b.highlightTarget),K());H({graphicData:_,zeroY:f,groupLabels:p,params:r.fullParams$,chartParams:r.fullChartParams$,highlightTarget:v,barWidth:h,transformedBarRadius:l,delayGroup:g,transitionItem:m,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{const A=ZN({selection:c,data:b.graphicData,zeroY:b.zeroY,groupLabels:b.groupLabels,params:b.params,chartParams:b.chartParams,barWidth:b.barWidth,transformedBarRadius:b.transformedBarRadius,delayGroup:b.delayGroup,transitionItem:b.transitionItem});A.on("mouseover",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"mouseover",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.graphicData})}).on("mousemove",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"mousemove",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.graphicData})}).on("mouseout",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"mouseout",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.graphicData})}).on("click",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"click",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.graphicData})}),s.next(A)});const w=r.gridHighlight$.subscribe();return H({barSelection:s,highlight:r.gridHighlight$,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{QN({selection:b.barSelection,ids:b.highlight,fullChartParams:b.fullChartParams})}),()=>{i.next(void 0),w.unsubscribe()}}),_s="BarsTriangle",Jv=ht(_s,"g"),t2=ht(_s,"g-content"),n2=.3;function tL({axisWidth:t,groupAmount:n,barAmountOfGroup:e,barPadding:r=0,barGroupPadding:i=0}){const o=(t/n-i)/e-r;return o>1?o:1}function nL(t,n,e){const r=t/2,i=t*n.length+e.barPadding*n.length;return Wl().domain(n).range([-i/2+r,i/2-r])}function eL(t,n){return t<=1?0:n/(t-1)*n2}function rL(t,n){return t<=1?n:n*(1-n2)}function iL({selection:t,barData:n,zeroY:e,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:u,delayGroup:c,transitionItem:s}){const f=t.selectAll(`g.${Jv}`).data(n,(g,m)=>r[m]),h=f.enter().append("g").classed(Jv,!0).attr("cursor","pointer");f.exit().remove();const l=f.merge(h);h.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`),f.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`);const p=u/2;return l.each((g,m,y)=>{const x=Z(y[m]).selectAll("g").data(g,v=>v.id),_=x.enter().append("g").classed(t2,!0);_.append("path").style("vector-effect","non-scaling-stroke").attr("height",v=>0).attr("d",v=>{const w=i(v.seriesLabel),b=e,A=b;return`M${w-u/2},${b} L${w},${A} ${w+u/2},${b}`}),x.merge(_).select("path").style("fill",v=>`url(#${v.linearGradientId})`).attr("stroke",v=>v.color).attr("transform",`translate(${-p}, 0)`).transition().duration(s).ease(Jr(a.transitionEase)).delay((v,w)=>v.groupIndex*c).attr("transform",`translate(${-p}, 0)`).attr("height",v=>Math.abs(v.axisYFromZero)).attr("d",v=>{const w=i(v.seriesLabel),b=e,A=v.axisY;return`M${w},${b} L${w+u/2},${A} ${w+u},${b}`}),x.exit().remove()}),l.selectAll(`g.${t2}`)}function oL({defsSelection:t,barData:n,params:e}){const r=t.selectAll("linearGradient").data(n[0]??[],o=>o.seriesLabel),i=r.enter().append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad");r.merge(i).attr("id",(o,a)=>o.linearGradientId).html((o,a)=>`
10
- <stop offset="0%" stop-color="${o.color}" stop-opacity="${e.linearGradientOpacity[0]}"/>
11
- <stop offset="100%" stop-color="${o.color}" stop-opacity="${e.linearGradientOpacity[1]}"/>
12
- `),r.exit().remove()}function aL({defsSelection:t,clipPathData:n}){const e=t.selectAll("clipPath").data(n),r=e.enter().append("clipPath");e.merge(r).attr("id",i=>i.id),e.exit().remove(),e.merge(r).each((i,o,a)=>{const u=Z(a[o]).selectAll("rect").data([i]),c=u.enter().append("rect");u.merge(c).attr("x",0).attr("y",0).attr("width",s=>s.width).attr("height",s=>s.height),u.exit().remove()})}function uL({selection:t,ids:n,fullChartParams:e}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!n.length){r();return}t.each((i,o,a)=>{n.includes(i.id)?Z(a[o]).style("opacity",1):Z(a[o]).style("opacity",e.styles.unhighlightedOpacity)})}const sL=Yn(_s,kh)(({selection:t,name:n,subject:e,observer:r})=>{const i=new yt,o=ti(_s,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new yt;r.gridAxesTransform$.pipe(I(i),B(b=>b.value),K()).subscribe(b=>{a.style("transform",b)}),r.gridGraphicTransform$.pipe(I(i),Y(async b=>b.value),K()).subscribe(b=>{c.transition().duration(50).style("transform",b)});const f=r.computedData$.pipe(B(b=>b[0]&&b[0][0]?b[0][0].axisY-b[0][0].axisYFromZero:0),K()),h=new nt(b=>{H({computedData:r.computedData$,params:r.fullParams$,axisSize:r.gridAxesSize$}).pipe(Y(async A=>A)).subscribe(A=>{const M=tL({axisWidth:A.axisSize.width,groupAmount:A.computedData[0]?A.computedData[0].length:0,barAmountOfGroup:A.computedData.length,barPadding:A.params.barPadding,barGroupPadding:A.params.barGroupPadding});b.next(M)})}).pipe(I(i),K()),l=r.computedData$.pipe(I(i),B(b=>b.map((A,M)=>A[0]?A[0].seriesLabel:String(M)))),p=r.computedData$.pipe(I(i),B(b=>b[0]?b[0].map(A=>A.groupLabel):[])),d=new nt(b=>{H({seriesLabels:l,barWidth:h,params:r.fullParams$}).pipe(I(i),Y(async A=>A)).subscribe(A=>{const M=nL(A.barWidth,A.seriesLabels,A.params);b.next(M)})}),g=r.fullChartParams$.pipe(I(i),B(b=>b.transitionDuration),K()),m=new nt(b=>{H({groupLabels:p,transitionDuration:g}).pipe(Y(async A=>A)).subscribe(A=>{const M=eL(A.groupLabels.length,A.transitionDuration);b.next(M)})}).pipe(I(i),K()),y=new nt(b=>{H({groupLabels:p,transitionDuration:g}).pipe(Y(async A=>A)).subscribe(A=>{const M=rL(A.groupLabels.length,A.transitionDuration);b.next(M)})}).pipe(I(i),K()),_=r.computedData$.pipe(I(i),B(b=>{const A=b.length,M=b.reduce((D,S)=>Math.max(D,S.length),0),$=new Array(M).fill(null).map(()=>new Array(A).fill(null));for(let D=0;D<A;D++)for(let S=0;S<M;S++)$[S][D]=b[D][S];return $})).pipe(I(i),B(b=>{const A=b.length?b[0].map(M=>ti(n,`lineargradient-${M.seriesLabel}`)):[];return b.map(M=>M.map(($,D)=>({linearGradientId:A[D],...$})))}));r.gridAxesSize$.pipe(I(i)).subscribe(b=>{const A=[{id:o,width:b.width,height:b.height}];aL({defsSelection:u,clipPathData:A})});const v=r.fullChartParams$.pipe(I(i),B(b=>b.highlightTarget),K());H({barData:_,computedData:r.computedData$,zeroY:f,groupLabels:p,barScale:d,params:r.fullParams$,chartParams:r.fullChartParams$,highlightTarget:v,barWidth:h,delayGroup:m,transitionItem:y,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{const A=iL({selection:c,barData:b.barData,zeroY:b.zeroY,groupLabels:b.groupLabels,barScale:b.barScale,params:b.params,chartParams:b.chartParams,barWidth:b.barWidth,delayGroup:b.delayGroup,transitionItem:b.transitionItem});oL({defsSelection:u,barData:b.barData,params:b.params}),A.on("mouseover",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"mouseover",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("mousemove",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"mousemove",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("mouseout",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"mouseout",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("click",(M,$)=>{M.stopPropagation(),e.event$.next({type:"grid",eventName:"click",pluginName:n,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}),s.next(A)});const w=r.gridHighlight$.subscribe();return H({pathSelection:s,highlight:r.gridHighlight$,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{uL({selection:b.pathSelection,ids:b.highlight,fullChartParams:b.fullChartParams})}),()=>{i.next(void 0),w.unsubscribe()}}),ws="Dots",cL=ht(ws,"g"),lL=ht(ws,"circle");function fL({selection:t,data:n,fullParams:e,fullChartParams:r,graphicOppositeScale:i}){const o=c=>{const s=c.size();return r.transitionDuration/s};let a=0;return t.selectAll("g").data(n,c=>c.id).join(c=>(a=o(c),c.append("g").classed(cL,!0)),c=>c,c=>c.remove()).attr("transform",c=>`translate(${c.axisX}, ${c.axisY})`).each((c,s,f)=>{Z(f[s]).selectAll("circle").data([c]).join(h=>h.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(lL,!0).attr("opacity",0).transition().delay((l,p)=>s*a).attr("opacity",1),h=>h.transition().duration(50).attr("opacity",1),h=>h.remove()).attr("r",e.radius).attr("fill",(h,l)=>gh({datum:h,colorType:e.fillColorType,fullChartParams:r})).attr("stroke",(h,l)=>gh({datum:h,colorType:e.strokeColorType,fullChartParams:r})).attr("stroke-width",e.strokeWidth).attr("transform",`scale(${i[0]}, ${i[1]})`)})}function hL({selection:t,ids:n,onlyShowHighlighted:e,fullChartParams:r}){if(t.interrupt("highlight"),!n.length){t.transition("highlight").duration(200).style("opacity",e===!0?0:1);return}t.each((i,o,a)=>{n.includes(i.id)?Z(a[o]).style("opacity",1).transition("highlight").duration(200):Z(a[o]).style("opacity",e===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function pL({defsSelection:t,clipPathData:n}){t.selectAll("clipPath").data(n).join(e=>e.append("clipPath"),e=>e,e=>e.remove()).attr("id",e=>e.id).each((e,r,i)=>{Z(i[r]).selectAll("rect").data([e]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const dL=Yn(ws,Sh)(({selection:t,name:n,subject:e,observer:r})=>{const i=new yt,o=ti(ws,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new yt;r.gridAxesTransform$.pipe(I(i),B(d=>d.value),K()).subscribe(d=>{a.style("transform",d)}),r.gridGraphicTransform$.pipe(I(i),Y(async d=>d.value),K()).subscribe(d=>{c.transition().duration(50).style("transform",d)});const f=r.gridGraphicTransform$.pipe(I(i),B(d=>[1/d.scale[0],1/d.scale[1]]));r.gridAxesSize$.pipe(I(i),Y(async d=>d)).subscribe(d=>{const g=[{id:o,width:d.width,height:d.height}];pL({defsSelection:u,clipPathData:g})});const h=r.fullChartParams$.pipe(I(i),B(d=>d.highlightTarget),K());H({computedData:r.computedData$,visibleComputedData:r.visibleComputedData$,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$,graphicOppositeScale:f,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$,highlightTarget:h}).pipe(I(i),Y(async d=>d)).subscribe(d=>{const g=fL({selection:c,data:d.visibleComputedData.flat(),fullParams:d.fullParams,fullChartParams:d.fullChartParams,graphicOppositeScale:d.graphicOppositeScale});g.on("mouseover",(m,y)=>{m.stopPropagation(),e.event$.next({type:"grid",eventName:"mouseover",pluginName:n,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}).on("mousemove",(m,y)=>{m.stopPropagation(),e.event$.next({type:"grid",eventName:"mousemove",pluginName:n,highlightTarget:d.highlightTarget,data:d.computedData,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m})}).on("mouseout",(m,y)=>{m.stopPropagation(),e.event$.next({type:"grid",eventName:"mouseout",pluginName:n,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}).on("click",(m,y)=>{m.stopPropagation(),e.event$.next({type:"grid",eventName:"click",pluginName:n,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}),s.next(g)});const l=r.gridHighlight$.subscribe(),p=r.fullParams$.pipe(I(i),B(d=>d.onlyShowHighlighted),K());return r.fullChartParams$.pipe(I(i),Y(d=>H({graphicSelection:s,highlight:r.gridHighlight$,onlyShowHighlighted:p,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async g=>g)))).subscribe(d=>{hL({selection:d.graphicSelection,ids:d.highlight,onlyShowHighlighted:d.onlyShowHighlighted,fullChartParams:d.fullChartParams})}),()=>{l.unsubscribe(),i.next(void 0)}}),mh="GroupAxis",e2=ht(mh,"xAxis"),r2=ht(mh,"groupingLabel"),yh=6;function gL({selection:t,params:n,tickTextAlign:e,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:u,contentTransform:c}){const s=t.selectAll(`g.${e2}`).data([n]).join("g").classed(e2,!0);t.selectAll(`g.${r2}`).data([n]).join("g").classed(r2,!0).each((l,p,d)=>{Z(d[p]).selectAll("text").data([l]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",It(n.labelColorType,a)).style("transform",c).text(g=>o.groupAxis.label)}).attr("transform",l=>`translate(${i.width+l.tickPadding+n.labelOffset[0]}, ${-l.tickPadding-yh-n.labelOffset[1]})`);const f=u0(u).scale(u).tickSize(n.tickFullLine==!0?-i.height:yh).tickSizeOuter(0).tickFormat(l=>ys(l,n.tickFormat)).tickPadding(n.tickPadding),h=s.transition().duration(100).call(f);return h.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?It(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),h.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?It(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),s.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",It(n.tickTextColorType,a)).attr("text-anchor",e.textAnchor).attr("dominant-baseline",e.dominantBaseline).attr("transform-origin",`0 -${n.tickPadding+yh}`).style("transform",c),s}const mL=Yn(mh,Eh)(({selection:t,name:n,observer:e,subject:r})=>{const i=new yt,o=t.append("g");e.gridAxesTransform$.pipe(I(i),B(f=>f.value),K()).subscribe(f=>{o.style("transform",f).attr("opacity",0).transition().attr("opacity",1)});const a=H({fullParams:e.fullParams$,gridAxesOppositeTransform:e.gridAxesOppositeTransform$}).pipe(I(i),Y(async f=>{const h=f.gridAxesOppositeTransform.rotate+f.fullParams.tickTextRotate;return`translate(${f.gridAxesOppositeTransform.translate[0]}px, ${f.gridAxesOppositeTransform.translate[1]}px) rotate(${h}deg) rotateX(${f.gridAxesOppositeTransform.rotateX}deg) rotateY(${f.gridAxesOppositeTransform.rotateY}deg)`}),K()),u=new nt(f=>{H({fullDataFormatter:e.fullDataFormatter$,gridAxesSize:e.gridAxesSize$,computedData:e.computedData$}).pipe(I(i),Y(async h=>h)).subscribe(h=>{const p=h.computedData[0]?h.computedData[0].length-1:0,d=h.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[0]-h.fullDataFormatter.groupAxis.scalePadding,g=h.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?p+h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[1]+h.fullDataFormatter.groupAxis.scalePadding,m=h.computedData[0]?h.computedData[0].length:0;let y=h.fullDataFormatter.grid.seriesType==="row"?(h.computedData[0]??[]).map(w=>w.groupLabel):h.computedData.map(w=>w[0].groupLabel);const x=new Array(m).fill(0).map((w,b)=>y[b]!=null?y[b]:String(b)).filter((w,b)=>b>=d&&b<=g),_=h.fullDataFormatter.groupAxis.scalePadding,v=Yv({axisLabels:x,axisWidth:h.gridAxesSize.width,padding:_});f.next(v)})}),c=e.fullDataFormatter$.pipe(I(i),B(f=>{let h="middle",l="hanging";return f.groupAxis.position==="bottom"?(h="middle",l="hanging"):f.groupAxis.position==="top"?(h="middle",l="auto"):f.groupAxis.position==="left"?(h="end",l="middle"):f.groupAxis.position==="right"&&(h="start",l="middle"),{textAnchor:h,dominantBaseline:l}})),s=e.fullDataFormatter$.pipe(I(i),B(f=>{let h="start",l="hanging";return f.groupAxis.position==="bottom"?l="hanging":f.groupAxis.position==="top"?l="auto":f.groupAxis.position==="left"?h="end":f.groupAxis.position==="right"&&(h="start"),f.valueAxis.position==="left"?h="start":f.valueAxis.position==="right"?h="end":f.valueAxis.position==="bottom"?l="auto":f.valueAxis.position==="top"&&(l="hanging"),{textAnchor:h,dominantBaseline:l}}));return H({params:e.fullParams$,tickTextAlign:c,axisLabelAlign:s,gridAxesSize:e.gridAxesSize$,fullDataFormatter:e.fullDataFormatter$,chartParams:e.fullChartParams$,groupScale:u,contentTransform:a}).pipe(I(i),Y(async f=>f)).subscribe(f=>{gL({selection:o,params:f.params,tickTextAlign:f.tickTextAlign,axisLabelAlign:f.axisLabelAlign,gridAxesSize:f.gridAxesSize,fullDataFormatter:f.fullDataFormatter,chartParams:f.chartParams,groupScale:f.groupScale,contentTransform:f.contentTransform})}),()=>{i.next(void 0)}}),bh="ValueAxis",i2=ht(bh,"g"),o2=ht(bh,"text"),a2=6;function yL({selection:t,fullParams:n,tickTextAlign:e,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:u,contentTransform:c,minAndMax:s}){const f=t.selectAll(`g.${i2}`).data([n]).join("g").classed(i2,!0);t.selectAll(`g.${o2}`).data([n]).join("g").classed(o2,!0).each((g,m,y)=>{Z(y[m]).selectAll("text").data([g]).join(x=>x.append("text").style("font-weight","bold"),x=>x,x=>x.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",It(n.labelColorType,a)).style("transform",c).text(x=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+n.labelOffset[0]}, ${i.height+g.tickPadding+n.labelOffset[1]})`);const h=s[1]-s[0],l=Is(u).scale(u).ticks(h>n.ticks?n.ticks:s[0]===0&&s[1]===0?1:Math.ceil(h)).tickFormat(g=>ys(g,n.tickFormat)).tickSize(n.tickFullLine==!0?-i.width:a2).tickPadding(n.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?It(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?It(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",It(n.tickTextColorType,a)).attr("text-anchor",e.textAnchor).attr("dominant-baseline",e.dominantBaseline).attr("transform-origin",`-${n.tickPadding+a2} 0`).style("transform",c),f}const bL=Yn(bh,As)(({selection:t,name:n,observer:e,subject:r})=>{const i=new yt,o=t.append("g");e.gridAxesTransform$.pipe(I(i),B(h=>h.value),K()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=H({fullParams:e.fullParams$,gridAxesOppositeTransform:e.gridAxesOppositeTransform$}).pipe(I(i),Y(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),K()),u=new nt(h=>{H({fullDataFormatter:e.fullDataFormatter$,gridAxesSize:e.gridAxesSize$,computedData:e.computedData$}).pipe(I(i),Y(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,y=l.computedData.map((_,v)=>_.filter((w,b)=>b>=g&&b<=m)),x=kN(y.flat());h.next(x)})}),c=new nt(h=>{H({fullDataFormatter:e.fullDataFormatter$,gridAxesSize:e.gridAxesSize$,minAndMax:u}).pipe(I(i),Y(async l=>l)).subscribe(l=>{const p=ph({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),s=e.fullDataFormatter$.pipe(I(i),B(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=e.fullDataFormatter$.pipe(I(i),B(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return H({fullParams:e.fullParams$,tickTextAlign:s,axisLabelAlign:f,computedData:e.computedData$,gridAxesSize:e.gridAxesSize$,fullDataFormatter:e.fullDataFormatter$,fullChartParams:e.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:u}).pipe(I(i),Y(async h=>h)).subscribe(h=>{yL({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),vh="ValueStackAxis",u2=ht(vh,"g"),s2=ht(vh,"text"),c2=6;function vL({selection:t,fullParams:n,tickTextAlign:e,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:u,contentTransform:c,minAndMax:s}){const f=t.selectAll(`g.${u2}`).data([n]).join("g").classed(u2,!0);t.selectAll(`g.${s2}`).data([n]).join("g").classed(s2,!0).each((g,m,y)=>{Z(y[m]).selectAll("text").data([g]).join(x=>x.append("text").style("font-weight","bold"),x=>x,x=>x.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",It(n.labelColorType,a)).style("transform",c).text(x=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+n.labelOffset[0]}, ${i.height+g.tickPadding+n.labelOffset[1]})`);const h=s[1]-s[0],l=Is(u).scale(u).ticks(h>n.ticks?n.ticks:s[0]===0&&s[1]===0?1:Math.ceil(h)).tickFormat(g=>ys(g,n.tickFormat)).tickSize(n.tickFullLine==!0?-i.width:c2).tickPadding(n.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?It(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?It(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",It(n.tickTextColorType,a)).attr("text-anchor",e.textAnchor).attr("dominant-baseline",e.dominantBaseline).attr("transform-origin",`-${n.tickPadding+c2} 0`).style("transform",c),f}const xL=Yn(vh,Nh)(({selection:t,name:n,observer:e,subject:r})=>{const i=new yt,o=t.append("g");e.gridAxesTransform$.pipe(I(i),B(h=>h.value),K()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=H({fullParams:e.fullParams$,gridAxesOppositeTransform:e.gridAxesOppositeTransform$}).pipe(I(i),Y(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),K()),u=new nt(h=>{H({fullDataFormatter:e.fullDataFormatter$,gridAxesSize:e.gridAxesSize$,computedData:e.computedData$}).pipe(I(i),Y(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,y=l.computedData.map((v,w)=>v.filter((b,A)=>A>=g&&A<=m)),x=new Array(y[0]?y[0].length:0).fill(null).map((v,w)=>y.reduce((b,A)=>{if(A&&A[w]){const M=A[w].value==null||A[w].visible==!1?0:A[w].value;return b+M}return b},0)),_=Hv(x);h.next(_)})}),c=new nt(h=>{H({fullDataFormatter:e.fullDataFormatter$,gridAxesSize:e.gridAxesSize$,minAndMax:u}).pipe(I(i),Y(async l=>l)).subscribe(l=>{const p=ph({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),s=e.fullDataFormatter$.pipe(I(i),B(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=e.fullDataFormatter$.pipe(I(i),B(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return H({fullParams:e.fullParams$,tickTextAlign:s,axisLabelAlign:f,computedData:e.computedData$,gridAxesSize:e.gridAxesSize$,fullDataFormatter:e.fullDataFormatter$,fullChartParams:e.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:u}).pipe(I(i),Y(async h=>h)).subscribe(h=>{vL({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),l2="ScalingArea",_L=ht(l2,"rect"),wL=Yn(l2,Lh)(({selection:t,rootSelection:n,name:e,observer:r,subject:i})=>{const o=new yt,a=n.insert("rect","g").classed(_L,!0).attr("opacity",0);let u={k:1,x:0,y:0};r.layout$.pipe(I(o)).subscribe(s=>{a.attr("width",s.width).attr("height",s.height).attr("x",s.left).attr("y",s.top)});const c=r.computedData$.pipe(B(s=>s[0]?s[0].length-1:0),K());return H({initGroupAxis:r.fullDataFormatter$.pipe(B(s=>s.groupAxis),co()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:c,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(I(o),Y(async s=>s)).subscribe(s=>{const h=s.groupMaxIndex,l=s.initGroupAxis.scaleDomain[0]==="auto"?0-s.initGroupAxis.scalePadding:s.initGroupAxis.scaleDomain[0]-s.initGroupAxis.scalePadding,p=s.initGroupAxis.scaleDomain[1]==="auto"?h+s.initGroupAxis.scalePadding:s.initGroupAxis.scaleDomain[1]+s.initGroupAxis.scalePadding,d=s.fullDataFormatter.valueAxis.position==="left"||s.fullDataFormatter.valueAxis.position==="top"?[0,1]:[1,0],m=ph({maxValue:s.groupMaxIndex,minValue:0,axisWidth:s.axisSize.width,scaleDomain:[l,p],scaleRange:d}).copy(),y=Ey().on("zoom",function(_){const v=_.transform,w=A=>{const M=Math.round(A);return Math.min(h,Math.max(0,M))},b=s.fullDataFormatter.groupAxis.position==="bottom"||s.fullDataFormatter.groupAxis.position==="top"?v.rescaleX(m).domain().map(w):v.rescaleY(m).domain().map(w);b[0]<=0&&b[1]>=h?v.k<u.k&&(v.k=u.k,v.x=u.x,v.y=u.y):b[1]-b[0]<=1&&v.k>u.k&&(v.k=u.k,v.x=u.x,v.y=u.y),u.k=v.k,u.x=v.x,u.y=v.y,i.dataFormatter$.next({...s.fullDataFormatter,groupAxis:{...s.fullDataFormatter.groupAxis,scaleDomain:b}})});n.call(y)}),()=>{o.next(void 0),a.remove()}});function AL(t,n){let e=new nt(()=>{});return t.each(function(){const r=Ff(this,n);e=Of(e,r)}),e}const xh="GroupArea",_h=ht(xh,"label-box");function ML({groupLabel:t,axisX:n,axisHeight:e,fullParams:r}){return r.showLine&&t?[{id:t,x1:n,x2:n,y1:0,y2:e}]:[]}function $L({selection:t,pluginName:n,lineData:e,fullParams:r,fullChartParams:i}){const o=ht(n,"auxline"),a=t.selectAll(`line.${o}`).data(e),u=a.enter().append("line").classed(o,!0).style("stroke",s=>It(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),c=a.merge(u);return a.exit().remove(),u.attr("x1",s=>s.x1).attr("y1",s=>s.y1).attr("x2",s=>s.x2).attr("y2",s=>s.y2),a.transition().duration(50).attr("x1",s=>s.x1).attr("y1",s=>s.y1).attr("x2",s=>s.x2).attr("y2",s=>s.y2),c}function SL(t){t.selectAll("line").data([]).exit().remove()}function TL({groupLabel:t,axisX:n,fullParams:e}){return e.showLabel&&t?[{id:t,x:n,y:-e.labelPadding,text:ys(t,e.labelTextFormat)}]:[]}function DL({selection:t,labelData:n,fullParams:e,fullChartParams:r,gridAxesOppositeTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${_h}`).data(n),u=a.enter().append("g").classed(_h,!0).style("cursor","pointer"),c=u.merge(a);return u.attr("transform",(s,f)=>`translate(${s.x}, ${s.y})`),a.transition().duration(50).attr("transform",(s,f)=>`translate(${s.x}, ${s.y})`),a.exit().remove(),c.each((s,f,h)=>{const l=PN(s.text,r.styles.textSize)+12,p=-l/2,d=Z(h[f]).selectAll("rect").data([s]),g=d.enter().append("rect").attr("height",`${o}px`).attr("fill",x=>It(e.labelColorType,r)).attr("x",p).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");d.merge(g).attr("width",x=>`${l}px`).style("transform",i),d.exit().remove();const m=Z(h[f]).selectAll("text").data([s]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(x=>x.text).style("transform",i).attr("fill",x=>It(e.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",p+6),m.exit().remove()}),c}function PL(t){t.selectAll(`g.${_h}`).data([]).exit().remove()}const kL=Yn(xh,Th)(({selection:t,rootSelection:n,name:e,subject:r,observer:i})=>{const o=new yt,a=n.insert("rect","g").classed(ht(xh,"rect"),!0).attr("opacity",0),u=t.append("g");i.layout$.pipe(I(o)).subscribe(l=>{a.attr("width",l.rootWidth).attr("height",l.rootHeight)}),i.gridAxesTransform$.pipe(I(o),B(l=>l.value),K()).subscribe(l=>{u.style("transform",l)});const c=new nt(l=>{H({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(I(o),Y(async p=>p)).subscribe(p=>{const g=p.computedData[0]?p.computedData[0].length-1:0,m=p.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[0]-p.fullDataFormatter.groupAxis.scalePadding,y=p.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?g+p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[1]+p.fullDataFormatter.groupAxis.scalePadding,x=p.computedData[0]?p.computedData[0].length:0;let _=p.fullDataFormatter.grid.seriesType==="row"?(p.computedData[0]??[]).map(A=>A.groupLabel):p.computedData.map(A=>A[0].groupLabel);const v=new Array(x).fill(0).map((A,M)=>_[M]!=null?_[M]:String(M)).filter((A,M)=>M>=m&&M<=y),w=p.fullDataFormatter.groupAxis.scalePadding,b=Yv({axisLabels:v,axisWidth:p.gridAxesSize.width,padding:w});l.next(b)})}),s=Wv({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),f=i.fullChartParams$.pipe(I(o),B(l=>l.highlightTarget),K());return H({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:s,groupScale:c}).pipe(I(o),Y(async l=>l)).subscribe(l=>{n.on("mouseover",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:e,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mousemove",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:e,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mouseout",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:e,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("click",(p,d)=>{p.stopPropagation();const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:e,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})})}),H({event:r.event$.pipe(so(l=>l.eventName==="mouseover"||l.eventName==="mousemove")),computedData:i.computedData$,groupScale:c,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,gridAxesOppositeTransform:i.gridAxesOppositeTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:s}).pipe(I(o),Y(async l=>l)).subscribe(l=>{const p=l.groupScale(l.event.groupLabel)??0,d=ML({groupLabel:l.event.groupLabel,axisX:p,axisHeight:l.gridAxesSize.height,fullParams:l.fullParams});$L({selection:u,pluginName:e,lineData:d,fullParams:l.fullParams,fullChartParams:l.fullChartParams});const g=TL({groupLabel:l.event.groupLabel,axisX:p,fullParams:l.fullParams});DL({selection:u,labelData:g,fullParams:l.fullParams,fullChartParams:l.fullChartParams,gridAxesOppositeTransformValue:l.gridAxesOppositeTransform.value}).on("mouseover",(y,x)=>{const{groupIndex:_,groupLabel:v}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:e,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:_,groupLabel:v,event:y,data:l.computedData})}).on("mousemove",(y,x)=>{const{groupIndex:_,groupLabel:v}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:e,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:_,groupLabel:v,event:y,data:l.computedData})}).on("mouseout",(y,x)=>{const{groupIndex:_,groupLabel:v}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:e,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:_,groupLabel:v,event:y,data:l.computedData})}).on("click",(y,x)=>{const{groupIndex:_,groupLabel:v}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:e,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:_,groupLabel:v,event:y,data:l.computedData})})}),AL(a,"mouseout").pipe(I(o)).subscribe(l=>{console.log("rootMouseout"),SL(u),PL(u)}),()=>{o.next(void 0),a.remove()}}),f2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},h2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const n=t.seriesLabel,e=t.series.map(r=>r.value).join(",");return[n,e]}else if(t.highlightTarget==="group"){const n=t.groupLabel,e=t.groups.map(r=>r.value).join(",");return[n,e]}return[]},svgRenderFn:null},EL=Bv("Container",f2)(({selection:t})=>function(){}),wh="Tooltip",p2=ht(wh,"g"),NL=ht(wh,"box");function LL(t,n){const e=n.textSize*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*e;return`<text font-size="${n.textSize}" fill="${n.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function CL({rootSelection:t,pluginName:n,rootWidth:e,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const u=5,c=i?[i]:[],s=i?[o]:[],h=t.selectAll(`g.${p2}`).data(c).join(v=>v.append("g").classed(p2,!0).attr("pointer-events","none"),v=>v,v=>v.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${NL}`).data(s).join(v=>v.append("g").classed(ht(n,"box"),!0)),l=h.selectAll("rect").data(s).join(v=>v.append("rect").attr("rx",u).attr("ry",u)).attr("fill",v=>v.backgroundColor).attr("stroke",v=>v.strokeColor).attr("opacity",v=>v.backgroundOpacity),p=h.selectAll("g").data(c).join(v=>v.append("g").classed(ht(n,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));c.length&&DN(p,c[0]);const d=p!=null&&p.node()?qv(p):{width:0,height:0};l.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=h!=null&&h.node()?qv(h):{width:0,height:0},m=e-g.width,y=r-g.height,x=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],_=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",v=>`translate(${x}, ${_})`),h.attr("transform",v=>`translate(${x}, ${_})`)}const IL=Bv(wh,h2)(({selection:t,rootSelection:n,name:e,chartType:r,observer:i,subject:o})=>{const a=new yt,u=o.event$.pipe(I(a),so(d=>d.eventName==="mouseover"||d.eventName==="mousemove")),c=o.event$.pipe(I(a),so(d=>d.eventName==="mouseout")),s=H({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(I(a),Y(async d=>d),B(d=>({backgroundColor:It(d.fullParams.backgroundColorType,d.fullChartParams),backgroundOpacity:d.fullParams.backgroundOpacity,strokeColor:It(d.fullParams.strokeColorType,d.fullChartParams),offset:d.fullParams.offset,padding:d.fullParams.padding,textSize:d.fullChartParams.styles.textSize,textColor:It(d.fullParams.textColorType,d.fullChartParams)}))),f=H({fullParams:i.fullParams$,tooltipStyle:s}).pipe(I(a),Y(async d=>d),B(d=>d.fullParams.svgRenderFn?d.fullParams.svgRenderFn:g=>{const m=d.fullParams.textRenderFn(g);return LL(m,d.tooltipStyle)})),h=H({event:u,contentRenderFn:f}).pipe(I(a),Y(async d=>d),B(d=>d.contentRenderFn(d.event))),l=c.pipe(I(a),B(d=>"")),p=Of(u,c).pipe(I(a),B(d=>d.event));return H({svgString:Of(h,l),event:p,layout:i.layout$,tooltipStyle:s}).pipe(I(a),Y(async d=>d)).subscribe(d=>{CL({rootSelection:n,pluginName:e,rootWidth:d.layout.rootWidth,rootHeight:d.layout.rootHeight,svgString:d.svgString,tooltipStyle:d.tooltipStyle,event:d.event})}),function(){a.next(void 0)}}),d2={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,scaleType:"area"},g2={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},m2={eventFn:(t,n,e)=>n==="mouseover"||n==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??0),0)*e))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},y2={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)};function RL(t,{text:n,radius:e,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||n==null){console.error("selection or text is not defined");return}e==null&&(e=t.node().getBBox().width/2);function a(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function u(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function c(p){var g;const d=document.createElement("canvas").getContext("2d");return((g=d==null?void 0:d.measureText(p))==null?void 0:g.width)??0}function s(p){const d=c(p.trim());return Math.sqrt(d*r)}function f(p,d){let g={width:0,text:""},m=1/0;const y=[];let x=" ";i&&(x="");for(let _=0,v=p.length;_<v;++_){const w=(g.text?g.text+x:"")+p[_],b=c(w);(m+b)/2<d?(g.width=m=b,g.text=w):(m=c(p[_]),g={width:m,text:p[_]},y.push(g))}return y}function h(p){let d=0;for(let g=0,m=p.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,x=p[g].width/2;d=Math.max(d,Math.sqrt(x**2+y**2))}return d}function l(p,d){o>0&&(d=u(d,o));const g=a(d),m=s(d),y=f(g,m),x=h(y);let _=p.select("text");_.size()||(_=p.append("text")),_.attr("transform",`translate(0,0) scale(${e/x})`);const v=_.selectAll("tspan").data(y),w=v.enter().append("tspan").attr("x",0).merge(v).attr("y",(b,A)=>(A-y.length/2+.8)*r).text(b=>b.text);return v.exit().remove(),v.merge(w)}return l(t,n)}let er;function FL(t,n){return od().velocityDecay(n.force.velocityDecay).force("collision",ed().radius(e=>e.r+n.force.collisionSpacing)).force("charge",ad().strength(e=>-Math.pow(e.r,2)*n.force.strength)).on("tick",()=>{t.attr("transform",e=>`translate(${e.x},${e.y})`)})}function OL({data:t,bubbleGroupR:n,maxValue:e,avgValue:r}){const i=n/Math.sqrt(t.length),a=i*i*Math.PI/r,u=e*a;return Math.pow(u/Math.PI,.5)*.75}function zL({data:t,LastBubbleDataMap:n,graphicWidth:e,graphicHeight:r,scaleType:i}){const o=Math.min(e,r)/2,a=t.flat().filter(p=>p.value!=null&&p.visible!=!1),u=Math.max(...a.map(p=>p.value)),c=a.reduce((p,d)=>p+(d.value??0),0)/a.length,s=OL({data:a,bubbleGroupR:o,maxValue:u,avgValue:c}),f=i==="area"?.5:1,h=hu().domain([0,u]).range([0,s]).exponent(f);return a.map(p=>{const d=p,g=n.get(p.id);g?(d.x=g.x,d.y=g.y):(d.x=Math.random()*e,d.y=Math.random()*r);const m=h(d.value??0);return d.r=m,d._originR=m,d})}function b2({graphicSelection:t,bubblesData:n,fullParams:e}){let r=t.selectAll("g").data(n,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,u,c)=>{const s=Z(c[u]);let f=!0;a.label.length<=e.bubbleText.lineLengthMin&&(f=!1),s.call(RL,{text:a.label,radius:a.r*e.bubbleText.fillRate,lineHeight:e.bubbleText.lineHeight,isBreakAll:f})}),o}function GL({data:t,highlightRIncrease:n,highlightIds:e}){if(n!=0){if(!e.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{e.includes(r.id)?r.r=r._originR+n:r.r=r._originR})}}function UL(){return v0().on("start",(t,n)=>{t.active||er.alpha(1).restart(),n.fx=n.x,n.fy=n.y}).on("drag",(t,n)=>{t.active||er.alphaTarget(0),n.fx=t.x,n.fy=t.y}).on("end",(t,n)=>{n.fx=null,n.fy=null})}function v2({fullParams:t,graphicWidth:n,graphicHeight:e}){er.force("x",ud().strength(t.force.strength).x(0)).force("y",sd().strength(t.force.strength).y(0)),er.alpha(1).restart()}function YL({bubblesSelection:t,highlightIds:n,fullChartParams:e}){if(t.interrupt("highlight"),!n.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);n.includes(r.id)?a.style("opacity",1).transition("highlight").ease(fa).duration(500):a.style("opacity",e.styles.unhighlightedOpacity)})}const BL=gs("Bubbles",d2)(({selection:t,name:n,observer:e,subject:r})=>{const i=new yt,o=t.append("g"),a=new yt;let u=new Map;e.layout$.pipe(co()).subscribe(l=>{t.attr("transform",`translate(${l.width/2}, ${l.height/2})`),e.layout$.pipe(I(i)).subscribe(p=>{t.transition().attr("transform",`translate(${p.width/2}, ${p.height/2})`)})});const c=e.fullParams$.pipe(I(i),B(l=>l.scaleType),K()),s=new nt(l=>{H({layout:e.layout$,computedData:e.computedData$,scaleType:c}).pipe(I(i),Y(async p=>p)).subscribe(p=>{const d=zL({data:p.computedData,LastBubbleDataMap:u,graphicWidth:p.layout.width,graphicHeight:p.layout.height,scaleType:p.scaleType});l.next(d)})});s.subscribe(l=>{u=new Map(l.map(p=>[p.id,p]))});const f=e.fullChartParams$.pipe(I(i),B(l=>l.highlightTarget),K());H({layout:e.layout$,computedData:e.computedData$,bubblesData:s,SeriesDataMap:e.SeriesDataMap$,fullParams:e.fullParams$,highlightTarget:f}).pipe(I(i),Y(async l=>l)).subscribe(l=>{const p=b2({graphicSelection:o,bubblesData:l.bubblesData,fullParams:l.fullParams});er=FL(p,l.fullParams),p.on("mouseover",(d,g)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:n,highlightTarget:l.highlightTarget,datum:g,series:l.SeriesDataMap.get(g.seriesLabel),seriesIndex:g.seriesIndex,seriesLabel:g.seriesLabel,event:d,data:l.computedData})}).on("mousemove",(d,g)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:n,highlightTarget:l.highlightTarget,datum:g,series:l.SeriesDataMap.get(g.seriesLabel),seriesIndex:g.seriesIndex,seriesLabel:g.seriesLabel,event:d,data:l.computedData})}).on("mouseout",(d,g)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:n,highlightTarget:l.highlightTarget,datum:g,series:l.SeriesDataMap.get(g.seriesLabel),seriesIndex:g.seriesIndex,seriesLabel:g.seriesLabel,event:d,data:l.computedData})}).on("click",(d,g)=>{r.event$.next({type:"series",eventName:"click",pluginName:n,highlightTarget:l.highlightTarget,datum:g,series:l.SeriesDataMap.get(g.seriesLabel),seriesIndex:g.seriesIndex,seriesLabel:g.seriesLabel,event:d,data:l.computedData})}).call(UL()),er.nodes(l.bubblesData),v2({fullParams:l.fullParams,graphicWidth:l.layout.width,graphicHeight:l.layout.height}),a.next(p)});const h=e.seriesHighlight$.subscribe();return H({bubblesSelection:a,bubblesData:s,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$,fullParams:e.fullParams$,layout:e.layout$}).pipe(I(i),Y(async l=>l)).subscribe(l=>{YL({bubblesSelection:l.bubblesSelection,highlightIds:l.highlight,fullChartParams:l.fullChartParams}),l.fullParams.highlightRIncrease&&(GL({data:l.bubblesData,highlightRIncrease:l.fullParams.highlightRIncrease,highlightIds:l.highlight}),b2({graphicSelection:o,bubblesData:l.bubblesData,fullParams:l.fullParams})),v2({fullParams:l.fullParams,graphicWidth:l.layout.width,graphicHeight:l.layout.height}),er.nodes(l.bubblesData)}),()=>{i.next(void 0),h.unsubscribe()}});function x2({computedDataSeries:t,startAngle:n,endAngle:e}){return qm().startAngle(n).endAngle(e).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let u=o;return u.id=o.data.id,u})}const _2="Pie",qL=ht(_2,"path");function HL({enter:t,exit:n,data:e,lastData:r,fullParams:i}){return!t.size()&&!n.size()?o=>{const a=e.map((u,c)=>{const s=r[c]??{startAngle:0,endAngle:0,value:0};return{...u,startAngle:u.startAngle*o+s.startAngle*(1-o),endAngle:u.endAngle*o+s.endAngle*(1-o),value:u.value*o+s.value*(1-o)}});return Ah(a,i.startAngle,i.endAngle,1)}:o=>Ah(e,i.startAngle,i.endAngle,o)}function Ah(t,n,e,r){return t.map((i,o)=>{const a=n+(i.startAngle-n)*r,u=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:u}})}function w2({selection:t,renderData:n,arc:e}){let r=t.selectAll("path").data(n,u=>u.id),i=r.enter().append("path").classed(qL,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(u,c)=>u.data.color).attr("d",(u,c)=>e(u)),o.remove(),a}function WL({pathSelection:t,ids:n,fullChartParams:e,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!n.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,u)=>{const c=Z(u[a]);n.includes(o.data.id)?c.style("opacity",1).transition("highlight").ease(fa).duration(500).attr("d",s=>i(s)):c.style("opacity",e.styles.unhighlightedOpacity).transition("highlight").attr("d",s=>r(s))})}const XL=gs(_2,g2)(({selection:t,name:n,observer:e,subject:r})=>{const i=new yt,o=t.append("g"),a=new yt;let u=[],c=[];e.layout$.pipe(co()).subscribe(g=>{t.attr("transform",`translate(${g.width/2}, ${g.height/2})`),e.layout$.pipe(I(i)).subscribe(m=>{t.transition().attr("transform",`translate(${m.width/2}, ${m.height/2})`)})});const s=e.layout$.pipe(I(i),B(g=>g.width<g.height?g.width:g.height)),f=new nt(g=>{H({computedData:e.computedData$,fullParams:e.fullParams$}).pipe(I(i),Y(async m=>m)).subscribe(m=>{const y=x2({computedDataSeries:m.computedData,startAngle:m.fullParams.startAngle,endAngle:m.fullParams.endAngle});g.next(y)})}),h=new nt(g=>{H({shorterSideWith:s,fullParams:e.fullParams$}).pipe(I(i),Y(async m=>m)).subscribe(m=>{const y=ms({axisWidth:m.shorterSideWith,innerRadius:m.fullParams.innerRadius,outerRadius:m.fullParams.outerRadius,padAngle:m.fullParams.padAngle,cornerRadius:m.fullParams.cornerRadius});g.next(y)})}),l=new nt(g=>{H({shorterSideWith:s,fullParams:e.fullParams$}).pipe(I(i),Y(async m=>m)).subscribe(m=>{const y=ms({axisWidth:m.shorterSideWith,innerRadius:m.fullParams.innerRadius,outerRadius:m.fullParams.outerMouseoverRadius,padAngle:m.fullParams.padAngle,cornerRadius:m.fullParams.cornerRadius});g.next(y)})}),p=e.fullChartParams$.pipe(I(i),B(g=>g.highlightTarget),K());H({pieData:f,SeriesDataMap:e.SeriesDataMap$,arc:h,arcMouseover:l,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:p}).pipe(I(i),Y(async g=>g)).subscribe(g=>{o.interrupt("graphicMove");let m=t.selectAll("path").data(g.pieData,v=>v.data.id),y=m.enter(),x=m.exit();const _=HL({enter:y,exit:x,data:g.pieData,lastData:u,fullParams:g.fullParams});o.transition("graphicMove").duration(g.fullChartParams.transitionDuration).ease(Jr(g.fullChartParams.transitionEase)).tween("move",(v,w)=>b=>{c=_(b),w2({selection:o,renderData:c,arc:g.arc}),r.event$.next({type:"series",pluginName:n,eventName:"transitionMove",event:void 0,highlightTarget:g.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:g.computedData})}).on("end",(v,w)=>{c=Ah(g.pieData,g.fullParams.startAngle,g.fullParams.endAngle,1);const b=w2({selection:o,renderData:c,arc:g.arc});a.next(b),u=Object.assign([],g.pieData),r.event$.next({type:"series",pluginName:n,eventName:"transitionEnd",event:void 0,highlightTarget:g.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:g.computedData}),b.on("mouseover",(A,M)=>{A.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:n,highlightTarget:g.highlightTarget,datum:M.data,series:g.SeriesDataMap.get(M.data.seriesLabel),seriesIndex:M.data.seriesIndex,seriesLabel:M.data.seriesLabel,event:A,data:g.computedData})}).on("mousemove",(A,M)=>{A.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:n,highlightTarget:g.highlightTarget,datum:M.data,series:g.SeriesDataMap.get(M.data.seriesLabel),seriesIndex:M.data.seriesIndex,seriesLabel:M.data.seriesLabel,event:A,data:g.computedData})}).on("mouseout",(A,M)=>{A.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:n,highlightTarget:g.highlightTarget,datum:M.data,series:g.SeriesDataMap.get(M.data.seriesLabel),seriesIndex:M.data.seriesIndex,seriesLabel:M.data.seriesLabel,event:A,data:g.computedData})}).on("click",(A,M)=>{A.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:n,highlightTarget:g.highlightTarget,datum:M.data,series:g.SeriesDataMap.get(M.data.seriesLabel),seriesIndex:M.data.seriesIndex,seriesLabel:M.data.seriesLabel,event:A,data:g.computedData})})})});const d=e.seriesHighlight$.subscribe();return H({pathSelection:a,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$,arc:h,arcMouseover:l}).pipe(I(i),Y(async g=>g)).subscribe(g=>{WL({pathSelection:g.pathSelection,ids:g.highlight,fullChartParams:g.fullChartParams,arc:g.arc,arcMouseover:g.arcMouseover})}),()=>{i.next(void 0),d.unsubscribe()}}),A2="PieEventTexts",M2=ht(A2,"text");function Mh(t,n){const e=t.selectAll(`text.${M2}`).data(n),r=e.enter().append("text").classed(M2,!0),i=e.merge(r);return i.each((o,a,u)=>{const c=Z(u[a]).text(o.text);Object.keys(o.attr).forEach(s=>{c.attr(s,o.attr[s])}),Object.keys(o.style).forEach(s=>{c.style(s,o.style[s])})}),e.exit().remove(),i}function $h({eventData:t,eventName:n,t:e,eventFn:r,textAttrs:i,textStyles:o}){return r(t,n,e).map((u,c)=>({text:u,attr:i[c],style:o[c]}))}const VL=gs(A2,m2)(({selection:t,name:n,observer:e,subject:r})=>{const i=new yt,o=t.append("g");let a;e.layout$.pipe(co()).subscribe(c=>{t.attr("transform",`translate(${c.width/2}, ${c.height/2})`),e.layout$.pipe(I(i)).subscribe(s=>{t.transition().attr("transform",`translate(${s.width/2}, ${s.height/2})`)})});const u=e.fullChartParams$.pipe(I(i),B(c=>c.highlightTarget),K());return H({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:u}).pipe(I(i),Y(async c=>c)).subscribe(c=>{o.transition().duration(c.fullChartParams.transitionDuration).ease(Jr(c.fullChartParams.transitionEase)).tween("move",(s,f)=>h=>{const l=$h({eventData:{type:"series",pluginName:n,eventName:"transitionMove",event:s,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});Mh(o,l)}).on("end",(s,f)=>{const h=$h({eventData:{type:"series",pluginName:n,eventName:"transitionEnd",event:s,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});Mh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(l=>{const p=$h({eventData:l,eventName:l.eventName,t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});Mh(o,p)})})}),()=>{i.next(void 0)}}),$2="PieLabels",jL=ht($2,"text");function ZL(t,n,e,r){return t.map((i,o)=>{const[a,u]=n.centroid(i),[c,s]=e.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:u*r,mouseoverX:c*r,mouseoverY:s*r}}).filter(i=>i.pieDatum.data.visible)}function KL(t,n,e,r){let i=t.selectAll("text").data(n,c=>c.pieDatum.id),o=i.enter().append("text").classed(jL,!0),a=i.exit();o.append("text");const u=i.merge(o);return u.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",c=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(c=>e.labelFn(c.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(c,s)=>gh({datum:c.pieDatum.data,colorType:e.labelColorType,fullChartParams:r})).transition().attr("transform",c=>"translate("+c.x+","+c.y+")"),a.remove(),u}function QL({labelSelection:t,ids:n,fullChartParams:e}){if(t.interrupt("highlight"),!n.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);n.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",u=>"translate("+u.mouseoverX+","+u.mouseoverY+")"):a.style("opacity",e.styles.unhighlightedOpacity).transition().duration(200).attr("transform",u=>"translate("+u.x+","+u.y+")")})}const JL=gs($2,y2)(({selection:t,observer:n,subject:e})=>{const r=new yt,i=t.append("g");let o=new yt,a=[];n.layout$.pipe(co()).subscribe(c=>{t.attr("transform",`translate(${c.width/2}, ${c.height/2})`),n.layout$.pipe(I(r)).subscribe(s=>{t.transition().attr("transform",`translate(${s.width/2}, ${s.height/2})`)})}),H({layout:n.layout$,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$}).pipe(I(r),Y(async c=>c)).subscribe(c=>{const s=c.layout.width<c.layout.height?c.layout.width:c.layout.height,f=ms({axisWidth:s,innerRadius:0,outerRadius:c.fullParams.outerRadius,padAngle:0,cornerRadius:0}),h=ms({axisWidth:s,innerRadius:0,outerRadius:c.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),l=x2({computedDataSeries:c.computedData,startAngle:c.fullParams.startAngle,endAngle:c.fullParams.endAngle});a=ZL(l,f,h,c.fullParams.labelCentroid);const p=KL(i,a,c.fullParams,c.fullChartParams);o.next(p)});const u=n.seriesHighlight$.subscribe();return H({labelSelection:o,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$}).pipe(I(r),Y(async c=>c)).subscribe(c=>{QL({labelSelection:c.labelSelection,ids:c.highlight,fullChartParams:c.fullChartParams})}),()=>{r.next(void 0),u.unsubscribe()}});it.BarStack=JN,it.Bars=WN,it.BarsTriangle=sL,it.Bubbles=BL,it.CONTAINER_PLUGIN_PARAMS=f2,it.Container=EL,it.DEFAULT_BARS_PLUGIN_PARAMS=Dh,it.DEFAULT_BARS_TRIANGLE_PLUGIN_PARAMS=kh,it.DEFAULT_BAR_STACK_PLUGIN_PARAMS=Ph,it.DEFAULT_BUBBLES_PLUGIN_PARAMS=d2,it.DEFAULT_DOTS_PLUGIN_PARAMS=Sh,it.DEFAULT_GROUPING_AXIS_PLUGIN_PARAMS=Eh,it.DEFAULT_GROUP_AREA_PLUGIN_PARAMS=Th,it.DEFAULT_LINES_PLUGIN_PARAMS=rr,it.DEFAULT_PIE_EVENT_TEXTS_PARAMS=m2,it.DEFAULT_PIE_LABELS_PARAMS=y2,it.DEFAULT_PIE_PLUGIN_PARAMS=g2,it.DEFAULT_SCALING_AREA_PLUGIN_PARAMS=Lh,it.DEFAULT_VALUE_AXIS_PLUGIN_PARAMS=As,it.DEFAULT_VALUE_STACK_AXIS_PLUGIN_PARAMS=Nh,it.Dots=dL,it.GroupArea=kL,it.GroupAxis=mL,it.Lines=ON,it.Pie=XL,it.PieEventTexts=VL,it.PieLabels=JL,it.ScalingArea=wL,it.TOOLTIP_PARAMS=h2,it.Tooltip=IL,it.ValueAxis=bL,it.ValueStackAxis=xL,Object.defineProperty(it,Symbol.toStringTag,{value:"Module"})});
5
+ `)}function s(h){return h.map(f).join(t)}function f(h){return h==null?"":h instanceof Date?i8(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:u,formatRows:c,formatRow:s,formatValue:f}}var On=ba(","),Qp=On.parse,o8=On.parseRows,a8=On.format,u8=On.formatBody,s8=On.formatRows,c8=On.formatRow,l8=On.formatValue,Gn=ba(" "),Jp=Gn.parse,f8=Gn.parseRows,h8=Gn.format,p8=Gn.formatBody,d8=Gn.formatRows,g8=Gn.formatRow,m8=Gn.formatValue;function y8(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))b8&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const b8=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function v8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function x8(t,e){return fetch(t,e).then(v8)}function _8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function w8(t,e){return fetch(t,e).then(_8)}function A8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function va(t,e){return fetch(t,e).then(A8)}function td(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),va(e,n).then(function(i){return t(i,r)})}}function $8(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=ba(t);return va(e,n).then(function(o){return i.parse(o,r)})}var M8=td(Qp),S8=td(Jp);function T8(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function P8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function D8(t,e){return fetch(t,e).then(P8)}function Oc(t){return(e,n)=>va(e,n).then(r=>new DOMParser().parseFromString(r,t))}const k8=Oc("application/xml");var E8=Oc("text/html"),N8=Oc("image/svg+xml");function L8(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,u,c=0,s=0;for(o=0;o<a;++o)u=n[o],c+=u.x,s+=u.y;for(c=(c/a-t)*r,s=(s/a-e)*r,o=0;o<a;++o)u=n[o],u.x-=c,u.y-=s}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function C8(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return ed(this.cover(e,n),e,n,t)}function ed(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},u=t._x0,c=t._y0,s=t._x1,f=t._y1,h,l,p,d,g,m,y,_;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(u+s)/2))?u=h:s=h,(m=n>=(l=(c+f)/2))?c=l:f=l,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(p=+t._x.call(null,o.data),d=+t._y.call(null,o.data),e===p&&n===d)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(u+s)/2))?u=h:s=h,(m=n>=(l=(c+f)/2))?c=l:f=l;while((y=m<<1|g)===(_=(d>=l)<<1|p>=h));return i[_]=o,i[y]=a,t}function I8(t){var e,n,r=t.length,i,o,a=new Array(r),u=new Array(r),c=1/0,s=1/0,f=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,u[n]=o,i<c&&(c=i),i>f&&(f=i),o<s&&(s=o),o>h&&(h=o));if(c>f||s>h)return this;for(this.cover(c,s).cover(f,h),n=0;n<r;++n)ed(this,a[n],u[n],t[n]);return this}function R8(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,u=this._root,c,s;n>t||t>=i||r>e||e>=o;)switch(s=(e<r)<<1|t<n,c=new Array(4),c[s]=u,u=c,a*=2,s){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function F8(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function z8(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function O8(t,e,n){var r,i=this._x0,o=this._y0,a,u,c,s,f=this._x1,h=this._y1,l=[],p=this._root,d,g;for(p&&l.push(new qt(p,i,o,f,h)),n==null?n=1/0:(i=t-n,o=e-n,f=t+n,h=e+n,n*=n);d=l.pop();)if(!(!(p=d.node)||(a=d.x0)>f||(u=d.y0)>h||(c=d.x1)<i||(s=d.y1)<o))if(p.length){var m=(a+c)/2,y=(u+s)/2;l.push(new qt(p[3],m,y,c,s),new qt(p[2],a,y,m,s),new qt(p[1],m,u,c,y),new qt(p[0],a,u,m,y)),(g=(e>=y)<<1|t>=m)&&(d=l[l.length-1],l[l.length-1]=l[l.length-1-g],l[l.length-1-g]=d)}else{var _=t-+this._x.call(null,p.data),v=e-+this._y.call(null,p.data),x=_*_+v*v;if(x<n){var A=Math.sqrt(n=x);i=t-A,o=e-A,f=t+A,h=e+A,r=p.data}}return r}function G8(t){if(isNaN(f=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,u=this._y0,c=this._x1,s=this._y1,f,h,l,p,d,g,m,y;if(!n)return this;if(n.length)for(;;){if((d=f>=(l=(a+c)/2))?a=l:c=l,(g=h>=(p=(u+s)/2))?u=p:s=p,e=n,!(n=n[m=g<<1|d]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,y=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function U8(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function Y8(){return this._root}function B8(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function q8(t){var e=[],n,r=this._root,i,o,a,u,c;for(r&&e.push(new qt(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,u=n.x1,c=n.y1)&&r.length){var s=(o+u)/2,f=(a+c)/2;(i=r[3])&&e.push(new qt(i,s,f,u,c)),(i=r[2])&&e.push(new qt(i,o,f,s,c)),(i=r[1])&&e.push(new qt(i,s,a,u,f)),(i=r[0])&&e.push(new qt(i,o,a,s,f))}return this}function W8(t){var e=[],n=[],r;for(this._root&&e.push(new qt(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,u=r.y0,c=r.x1,s=r.y1,f=(a+c)/2,h=(u+s)/2;(o=i[0])&&e.push(new qt(o,a,u,f,h)),(o=i[1])&&e.push(new qt(o,f,u,c,h)),(o=i[2])&&e.push(new qt(o,a,h,f,s)),(o=i[3])&&e.push(new qt(o,f,h,c,s))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function H8(t){return t[0]}function X8(t){return arguments.length?(this._x=t,this):this._x}function V8(t){return t[1]}function j8(t){return arguments.length?(this._y=t,this):this._y}function xa(t,e,n){var r=new Gc(e??H8,n??V8,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Gc(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function nd(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Wt=xa.prototype=Gc.prototype;Wt.copy=function(){var t=new Gc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=nd(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=nd(r));return t},Wt.add=C8,Wt.addAll=I8,Wt.cover=R8,Wt.data=F8,Wt.extent=z8,Wt.find=O8,Wt.remove=G8,Wt.removeAll=U8,Wt.root=Y8,Wt.size=B8,Wt.visit=q8,Wt.visitAfter=W8,Wt.x=X8,Wt.y=j8;function Dt(t){return function(){return t}}function hn(t){return(t()-.5)*1e-6}function Z8(t){return t.x+t.vx}function K8(t){return t.y+t.vy}function rd(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Dt(t==null?1:+t));function a(){for(var s,f=e.length,h,l,p,d,g,m,y=0;y<o;++y)for(h=xa(e,Z8,K8).visitAfter(u),s=0;s<f;++s)l=e[s],g=n[l.index],m=g*g,p=l.x+l.vx,d=l.y+l.vy,h.visit(_);function _(v,x,A,b,w){var M=v.data,$=v.r,D=g+$;if(M){if(M.index>l.index){var S=p-M.x-M.vx,N=d-M.y-M.vy,E=S*S+N*N;E<D*D&&(S===0&&(S=hn(r),E+=S*S),N===0&&(N=hn(r),E+=N*N),E=(D-(E=Math.sqrt(E)))/E*i,l.vx+=(S*=E)*(D=($*=$)/(m+$)),l.vy+=(N*=E)*D,M.vx-=S*(D=1-D),M.vy-=N*D)}return}return x>p+D||b<p-D||A>d+D||w<d-D}}function u(s){if(s.data)return s.r=n[s.data.index];for(var f=s.r=0;f<4;++f)s[f]&&s[f].r>s.r&&(s.r=s[f].r)}function c(){if(e){var s,f=e.length,h;for(n=new Array(f),s=0;s<f;++s)h=e[s],n[h.index]=+t(h,s,e)}}return a.initialize=function(s,f){e=s,r=f,c()},a.iterations=function(s){return arguments.length?(o=+s,a):o},a.strength=function(s){return arguments.length?(i=+s,a):i},a.radius=function(s){return arguments.length?(t=typeof s=="function"?s:Dt(+s),c(),a):t},a}function Q8(t){return t.index}function id(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function J8(t){var e=Q8,n=h,r,i=Dt(30),o,a,u,c,s,f=1;t==null&&(t=[]);function h(m){return 1/Math.min(u[m.source.index],u[m.target.index])}function l(m){for(var y=0,_=t.length;y<f;++y)for(var v=0,x,A,b,w,M,$,D;v<_;++v)x=t[v],A=x.source,b=x.target,w=b.x+b.vx-A.x-A.vx||hn(s),M=b.y+b.vy-A.y-A.vy||hn(s),$=Math.sqrt(w*w+M*M),$=($-o[v])/$*m*r[v],w*=$,M*=$,b.vx-=w*(D=c[v]),b.vy-=M*D,A.vx+=w*(D=1-D),A.vy+=M*D}function p(){if(a){var m,y=a.length,_=t.length,v=new Map(a.map((A,b)=>[e(A,b,a),A])),x;for(m=0,u=new Array(y);m<_;++m)x=t[m],x.index=m,typeof x.source!="object"&&(x.source=id(v,x.source)),typeof x.target!="object"&&(x.target=id(v,x.target)),u[x.source.index]=(u[x.source.index]||0)+1,u[x.target.index]=(u[x.target.index]||0)+1;for(m=0,c=new Array(_);m<_;++m)x=t[m],c[m]=u[x.source.index]/(u[x.source.index]+u[x.target.index]);r=new Array(_),d(),o=new Array(_),g()}}function d(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return l.initialize=function(m,y){a=m,s=y,p()},l.links=function(m){return arguments.length?(t=m,p(),l):t},l.id=function(m){return arguments.length?(e=m,l):e},l.iterations=function(m){return arguments.length?(f=+m,l):f},l.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Dt(+m),d(),l):n},l.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Dt(+m),g(),l):i},l}const t4=1664525,e4=1013904223,od=4294967296;function n4(){let t=1;return()=>(t=(t4*t+e4)%od)/od}function r4(t){return t.x}function i4(t){return t.y}var o4=10,a4=Math.PI*(3-Math.sqrt(5));function ad(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,u=new Map,c=aa(h),s=Sn("tick","end"),f=n4();t==null&&(t=[]);function h(){l(),s.call("tick",e),n<r&&(c.stop(),s.call("end",e))}function l(g){var m,y=t.length,_;g===void 0&&(g=1);for(var v=0;v<g;++v)for(n+=(o-n)*i,u.forEach(function(x){x(n)}),m=0;m<y;++m)_=t[m],_.fx==null?_.x+=_.vx*=a:(_.x=_.fx,_.vx=0),_.fy==null?_.y+=_.vy*=a:(_.y=_.fy,_.vy=0);return e}function p(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var _=o4*Math.sqrt(.5+g),v=g*a4;y.x=_*Math.cos(v),y.y=_*Math.sin(v)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function d(g){return g.initialize&&g.initialize(t,f),g}return p(),e={tick:l,restart:function(){return c.restart(h),e},stop:function(){return c.stop(),e},nodes:function(g){return arguments.length?(t=g,p(),u.forEach(d),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(f=g,u.forEach(d),e):f},force:function(g,m){return arguments.length>1?(m==null?u.delete(g):u.set(g,d(m)),e):u.get(g)},find:function(g,m,y){var _=0,v=t.length,x,A,b,w,M;for(y==null?y=1/0:y*=y,_=0;_<v;++_)w=t[_],x=g-w.x,A=m-w.y,b=x*x+A*A,b<y&&(M=w,y=b);return M},on:function(g,m){return arguments.length>1?(s.on(g,m),e):s.on(g)}}}function ud(){var t,e,n,r,i=Dt(-30),o,a=1,u=1/0,c=.81;function s(p){var d,g=t.length,m=xa(t,r4,i4).visitAfter(h);for(r=p,d=0;d<g;++d)e=t[d],m.visit(l)}function f(){if(t){var p,d=t.length,g;for(o=new Array(d),p=0;p<d;++p)g=t[p],o[g.index]=+i(g,p,t)}}function h(p){var d=0,g,m,y=0,_,v,x;if(p.length){for(_=v=x=0;x<4;++x)(g=p[x])&&(m=Math.abs(g.value))&&(d+=g.value,y+=m,_+=m*g.x,v+=m*g.y);p.x=_/y,p.y=v/y}else{g=p,g.x=g.data.x,g.y=g.data.y;do d+=o[g.data.index];while(g=g.next)}p.value=d}function l(p,d,g,m){if(!p.value)return!0;var y=p.x-e.x,_=p.y-e.y,v=m-d,x=y*y+_*_;if(v*v/c<x)return x<u&&(y===0&&(y=hn(n),x+=y*y),_===0&&(_=hn(n),x+=_*_),x<a&&(x=Math.sqrt(a*x)),e.vx+=y*p.value*r/x,e.vy+=_*p.value*r/x),!0;if(p.length||x>=u)return;(p.data!==e||p.next)&&(y===0&&(y=hn(n),x+=y*y),_===0&&(_=hn(n),x+=_*_),x<a&&(x=Math.sqrt(a*x)));do p.data!==e&&(v=o[p.data.index]*r/x,e.vx+=y*v,e.vy+=_*v);while(p=p.next)}return s.initialize=function(p,d){t=p,n=d,f()},s.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Dt(+p),f(),s):i},s.distanceMin=function(p){return arguments.length?(a=p*p,s):Math.sqrt(a)},s.distanceMax=function(p){return arguments.length?(u=p*p,s):Math.sqrt(u)},s.theta=function(p){return arguments.length?(c=p*p,s):Math.sqrt(c)},s}function u4(t,e,n){var r,i=Dt(.1),o,a;typeof t!="function"&&(t=Dt(+t)),e==null&&(e=0),n==null&&(n=0);function u(s){for(var f=0,h=r.length;f<h;++f){var l=r[f],p=l.x-e||1e-6,d=l.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[f]-g)*o[f]*s/g;l.vx+=p*m,l.vy+=d*m}}function c(){if(r){var s,f=r.length;for(o=new Array(f),a=new Array(f),s=0;s<f;++s)a[s]=+t(r[s],s,r),o[s]=isNaN(a[s])?0:+i(r[s],s,r)}}return u.initialize=function(s){r=s,c()},u.strength=function(s){return arguments.length?(i=typeof s=="function"?s:Dt(+s),c(),u):i},u.radius=function(s){return arguments.length?(t=typeof s=="function"?s:Dt(+s),c(),u):t},u.x=function(s){return arguments.length?(e=+s,u):e},u.y=function(s){return arguments.length?(n=+s,u):n},u}function sd(t){var e=Dt(.1),n,r,i;typeof t!="function"&&(t=Dt(t==null?0:+t));function o(u){for(var c=0,s=n.length,f;c<s;++c)f=n[c],f.vx+=(i[c]-f.x)*r[c]*u}function a(){if(n){var u,c=n.length;for(r=new Array(c),i=new Array(c),u=0;u<c;++u)r[u]=isNaN(i[u]=+t(n[u],u,n))?0:+e(n[u],u,n)}}return o.initialize=function(u){n=u,a()},o.strength=function(u){return arguments.length?(e=typeof u=="function"?u:Dt(+u),a(),o):e},o.x=function(u){return arguments.length?(t=typeof u=="function"?u:Dt(+u),a(),o):t},o}function cd(t){var e=Dt(.1),n,r,i;typeof t!="function"&&(t=Dt(t==null?0:+t));function o(u){for(var c=0,s=n.length,f;c<s;++c)f=n[c],f.vy+=(i[c]-f.y)*r[c]*u}function a(){if(n){var u,c=n.length;for(r=new Array(c),i=new Array(c),u=0;u<c;++u)r[u]=isNaN(i[u]=+t(n[u],u,n))?0:+e(n[u],u,n)}}return o.initialize=function(u){n=u,a()},o.strength=function(u){return arguments.length?(e=typeof u=="function"?u:Dt(+u),a(),o):e},o.y=function(u){return arguments.length?(t=typeof u=="function"?u:Dt(+u),a(),o):t},o}function s4(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function _a(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function $r(t){return t=_a(Math.abs(t)),t?t[1]:NaN}function c4(t,e){return function(n,r){for(var i=n.length,o=[],a=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(n.substring(i-=u,i+u)),!((c+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(e)}}function l4(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var f4=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mr(t){if(!(e=f4.exec(t)))throw new Error("invalid format: "+t);var e;return new wa({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]})}Mr.prototype=wa.prototype;function wa(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+""}wa.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 h4(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var ld;function p4(t,e){var n=_a(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ld=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+_a(t,Math.max(0,e+o-1))[0]}function fd(t,e){var n=_a(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const hd={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:s4,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)=>fd(t*100,e),r:fd,s:p4,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function pd(t){return t}var dd=Array.prototype.map,gd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function md(t){var e=t.grouping===void 0||t.thousands===void 0?pd:c4(dd.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?pd:l4(dd.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function s(h){h=Mr(h);var l=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,_=h.comma,v=h.precision,x=h.trim,A=h.type;A==="n"?(_=!0,A="g"):hd[A]||(v===void 0&&(v=12),x=!0,A="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var b=g==="$"?n:g==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",w=g==="$"?r:/[%p]/.test(A)?a:"",M=hd[A],$=/[defgprs%]/.test(A);v=v===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function D(S){var N=b,E=w,T,k,P;if(A==="c")E=M(S)+E,S="";else{S=+S;var L=S<0||1/S<0;if(S=isNaN(S)?c:M(Math.abs(S),v),x&&(S=h4(S)),L&&+S==0&&d!=="+"&&(L=!1),N=(L?d==="("?d:u:d==="-"||d==="("?"":d)+N,E=(A==="s"?gd[8+ld/3]:"")+E+(L&&d==="("?")":""),$){for(T=-1,k=S.length;++T<k;)if(P=S.charCodeAt(T),48>P||P>57){E=(P===46?i+S.slice(T+1):S.slice(T))+E,S=S.slice(0,T);break}}}_&&!m&&(S=e(S,1/0));var C=N.length+S.length+E.length,R=C<y?new Array(y-C+1).join(l):"";switch(_&&m&&(S=e(R+S,R.length?y-E.length:1/0),R=""),p){case"<":S=N+S+E+R;break;case"=":S=N+R+S+E;break;case"^":S=R.slice(0,C=R.length>>1)+N+S+E+R.slice(C);break;default:S=R+N+S+E;break}return o(S)}return D.toString=function(){return h+""},D}function f(h,l){var p=s((h=Mr(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor($r(l)/3)))*3,g=Math.pow(10,-d),m=gd[8+d/3];return function(y){return p(g*y)+m}}return{format:s,formatPrefix:f}}var Aa,Si,Uc;yd({thousands:",",grouping:[3],currency:["$",""]});function yd(t){return Aa=md(t),Si=Aa.format,Uc=Aa.formatPrefix,Aa}function bd(t){return Math.max(0,-$r(Math.abs(t)))}function vd(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($r(e)/3)))*3-$r(Math.abs(t)))}function xd(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$r(e)-$r(t))+1}var X=1e-6,Ti=1e-12,rt=Math.PI,_t=rt/2,$a=rt/4,Ht=rt*2,pt=180/rt,V=rt/180,ot=Math.abs,Sr=Math.atan,Xt=Math.atan2,W=Math.cos,Ma=Math.ceil,_d=Math.exp,Yc=Math.hypot,Sa=Math.log,Bc=Math.pow,B=Math.sin,le=Math.sign||function(t){return t>0?1:t<0?-1:0},Lt=Math.sqrt,qc=Math.tan;function wd(t){return t>1?0:t<-1?rt:Math.acos(t)}function Vt(t){return t>1?_t:t<-1?-_t:Math.asin(t)}function Ad(t){return(t=B(t/2))*t}function vt(){}function Ta(t,e){t&&Md.hasOwnProperty(t.type)&&Md[t.type](t,e)}var $d={Feature:function(t,e){Ta(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Ta(n[r].geometry,e)}},Md={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Wc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Wc(n[r],e,0)},Polygon:function(t,e){Sd(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Sd(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Ta(n[r],e)}};function Wc(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function Sd(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Wc(t[n],e,1);e.polygonEnd()}function xe(t,e){t&&$d.hasOwnProperty(t.type)?$d[t.type](t,e):Ta(t,e)}var Pa=new Pt,Da=new Pt,Td,Pd,Hc,Xc,Vc,Ne={point:vt,lineStart:vt,lineEnd:vt,polygonStart:function(){Pa=new Pt,Ne.lineStart=d4,Ne.lineEnd=g4},polygonEnd:function(){var t=+Pa;Da.add(t<0?Ht+t:t),this.lineStart=this.lineEnd=this.point=vt},sphere:function(){Da.add(Ht)}};function d4(){Ne.point=m4}function g4(){Dd(Td,Pd)}function m4(t,e){Ne.point=Dd,Td=t,Pd=e,t*=V,e*=V,Hc=t,Xc=W(e=e/2+$a),Vc=B(e)}function Dd(t,e){t*=V,e*=V,e=e/2+$a;var n=t-Hc,r=n>=0?1:-1,i=r*n,o=W(e),a=B(e),u=Vc*a,c=Xc*o+u*W(i),s=u*r*B(i);Pa.add(Xt(s,c)),Hc=t,Xc=o,Vc=a}function y4(t){return Da=new Pt,xe(t,Ne),Da*2}function ka(t){return[Xt(t[1],t[0]),Vt(t[2])]}function Un(t){var e=t[0],n=t[1],r=W(n);return[r*W(e),r*B(e),B(n)]}function Ea(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Tr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function jc(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Na(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function La(t){var e=Lt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var xt,ne,wt,ae,Yn,kd,Ed,Pr,Pi,pn,He,Xe={point:Zc,lineStart:Ld,lineEnd:Cd,polygonStart:function(){Xe.point=Id,Xe.lineStart=b4,Xe.lineEnd=v4,Pi=new Pt,Ne.polygonStart()},polygonEnd:function(){Ne.polygonEnd(),Xe.point=Zc,Xe.lineStart=Ld,Xe.lineEnd=Cd,Pa<0?(xt=-(wt=180),ne=-(ae=90)):Pi>X?ae=90:Pi<-X&&(ne=-90),He[0]=xt,He[1]=wt},sphere:function(){xt=-(wt=180),ne=-(ae=90)}};function Zc(t,e){pn.push(He=[xt=t,wt=t]),e<ne&&(ne=e),e>ae&&(ae=e)}function Nd(t,e){var n=Un([t*V,e*V]);if(Pr){var r=Tr(Pr,n),i=[r[1],-r[0],0],o=Tr(i,r);La(o),o=ka(o);var a=t-Yn,u=a>0?1:-1,c=o[0]*pt*u,s,f=ot(a)>180;f^(u*Yn<c&&c<u*t)?(s=o[1]*pt,s>ae&&(ae=s)):(c=(c+360)%360-180,f^(u*Yn<c&&c<u*t)?(s=-o[1]*pt,s<ne&&(ne=s)):(e<ne&&(ne=e),e>ae&&(ae=e))),f?t<Yn?ue(xt,t)>ue(xt,wt)&&(wt=t):ue(t,wt)>ue(xt,wt)&&(xt=t):wt>=xt?(t<xt&&(xt=t),t>wt&&(wt=t)):t>Yn?ue(xt,t)>ue(xt,wt)&&(wt=t):ue(t,wt)>ue(xt,wt)&&(xt=t)}else pn.push(He=[xt=t,wt=t]);e<ne&&(ne=e),e>ae&&(ae=e),Pr=n,Yn=t}function Ld(){Xe.point=Nd}function Cd(){He[0]=xt,He[1]=wt,Xe.point=Zc,Pr=null}function Id(t,e){if(Pr){var n=t-Yn;Pi.add(ot(n)>180?n+(n>0?360:-360):n)}else kd=t,Ed=e;Ne.point(t,e),Nd(t,e)}function b4(){Ne.lineStart()}function v4(){Id(kd,Ed),Ne.lineEnd(),ot(Pi)>X&&(xt=-(wt=180)),He[0]=xt,He[1]=wt,Pr=null}function ue(t,e){return(e-=t)<0?e+360:e}function x4(t,e){return t[0]-e[0]}function Rd(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function _4(t){var e,n,r,i,o,a,u;if(ae=wt=-(xt=ne=1/0),pn=[],xe(t,Xe),n=pn.length){for(pn.sort(x4),e=1,r=pn[0],o=[r];e<n;++e)i=pn[e],Rd(r,i[0])||Rd(r,i[1])?(ue(r[0],i[1])>ue(r[0],r[1])&&(r[1]=i[1]),ue(i[0],r[1])>ue(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(u=ue(r[1],i[0]))>a&&(a=u,xt=i[0],wt=r[1])}return pn=He=null,xt===1/0||ne===1/0?[[NaN,NaN],[NaN,NaN]]:[[xt,ne],[wt,ae]]}var Di,Ca,Ia,Ra,Fa,za,Oa,Ga,Kc,Qc,Jc,Fd,zd,jt,Zt,Kt,_e={sphere:vt,point:tl,lineStart:Od,lineEnd:Gd,polygonStart:function(){_e.lineStart=$4,_e.lineEnd=M4},polygonEnd:function(){_e.lineStart=Od,_e.lineEnd=Gd}};function tl(t,e){t*=V,e*=V;var n=W(e);ki(n*W(t),n*B(t),B(e))}function ki(t,e,n){++Di,Ia+=(t-Ia)/Di,Ra+=(e-Ra)/Di,Fa+=(n-Fa)/Di}function Od(){_e.point=w4}function w4(t,e){t*=V,e*=V;var n=W(e);jt=n*W(t),Zt=n*B(t),Kt=B(e),_e.point=A4,ki(jt,Zt,Kt)}function A4(t,e){t*=V,e*=V;var n=W(e),r=n*W(t),i=n*B(t),o=B(e),a=Xt(Lt((a=Zt*o-Kt*i)*a+(a=Kt*r-jt*o)*a+(a=jt*i-Zt*r)*a),jt*r+Zt*i+Kt*o);Ca+=a,za+=a*(jt+(jt=r)),Oa+=a*(Zt+(Zt=i)),Ga+=a*(Kt+(Kt=o)),ki(jt,Zt,Kt)}function Gd(){_e.point=tl}function $4(){_e.point=S4}function M4(){Ud(Fd,zd),_e.point=tl}function S4(t,e){Fd=t,zd=e,t*=V,e*=V,_e.point=Ud;var n=W(e);jt=n*W(t),Zt=n*B(t),Kt=B(e),ki(jt,Zt,Kt)}function Ud(t,e){t*=V,e*=V;var n=W(e),r=n*W(t),i=n*B(t),o=B(e),a=Zt*o-Kt*i,u=Kt*r-jt*o,c=jt*i-Zt*r,s=Yc(a,u,c),f=Vt(s),h=s&&-f/s;Kc.add(h*a),Qc.add(h*u),Jc.add(h*c),Ca+=f,za+=f*(jt+(jt=r)),Oa+=f*(Zt+(Zt=i)),Ga+=f*(Kt+(Kt=o)),ki(jt,Zt,Kt)}function T4(t){Di=Ca=Ia=Ra=Fa=za=Oa=Ga=0,Kc=new Pt,Qc=new Pt,Jc=new Pt,xe(t,_e);var e=+Kc,n=+Qc,r=+Jc,i=Yc(e,n,r);return i<Ti&&(e=za,n=Oa,r=Ga,Ca<X&&(e=Ia,n=Ra,r=Fa),i=Yc(e,n,r),i<Ti)?[NaN,NaN]:[Xt(n,e)*pt,Vt(r/i)*pt]}function Dr(t){return function(){return t}}function el(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function nl(t,e){return ot(t)>rt&&(t-=Math.round(t/Ht)*Ht),[t,e]}nl.invert=nl;function rl(t,e,n){return(t%=Ht)?e||n?el(Bd(t),qd(e,n)):Bd(t):e||n?qd(e,n):nl}function Yd(t){return function(e,n){return e+=t,ot(e)>rt&&(e-=Math.round(e/Ht)*Ht),[e,n]}}function Bd(t){var e=Yd(t);return e.invert=Yd(-t),e}function qd(t,e){var n=W(t),r=B(t),i=W(e),o=B(e);function a(u,c){var s=W(c),f=W(u)*s,h=B(u)*s,l=B(c),p=l*n+f*r;return[Xt(h*i-p*o,f*n-l*r),Vt(p*i+h*o)]}return a.invert=function(u,c){var s=W(c),f=W(u)*s,h=B(u)*s,l=B(c),p=l*i-h*o;return[Xt(h*i+l*o,f*n+p*r),Vt(p*n-f*r)]},a}function Wd(t){t=rl(t[0]*V,t[1]*V,t.length>2?t[2]*V:0);function e(n){return n=t(n[0]*V,n[1]*V),n[0]*=pt,n[1]*=pt,n}return e.invert=function(n){return n=t.invert(n[0]*V,n[1]*V),n[0]*=pt,n[1]*=pt,n},e}function Hd(t,e,n,r,i,o){if(n){var a=W(e),u=B(e),c=r*n;i==null?(i=e+r*Ht,o=e-c/2):(i=Xd(a,i),o=Xd(a,o),(r>0?i<o:i>o)&&(i+=r*Ht));for(var s,f=i;r>0?f>o:f<o;f-=c)s=ka([a,-u*W(f),-u*B(f)]),t.point(s[0],s[1])}}function Xd(t,e){e=Un(e),e[0]-=t,La(e);var n=wd(-e[1]);return((-e[2]<0?-n:n)+Ht-X)%Ht}function P4(){var t=Dr([0,0]),e=Dr(90),n=Dr(2),r,i,o={point:a};function a(c,s){r.push(c=i(c,s)),c[0]*=pt,c[1]*=pt}function u(){var c=t.apply(this,arguments),s=e.apply(this,arguments)*V,f=n.apply(this,arguments)*V;return r=[],i=rl(-c[0]*V,-c[1]*V,0).invert,Hd(o,s,f,1),c={type:"Polygon",coordinates:[r]},r=i=null,c}return u.center=function(c){return arguments.length?(t=typeof c=="function"?c:Dr([+c[0],+c[1]]),u):t},u.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Dr(+c),u):e},u.precision=function(c){return arguments.length?(n=typeof c=="function"?c:Dr(+c),u):n},u}function Vd(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:vt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ua(t,e){return ot(t[0]-e[0])<X&&ot(t[1]-e[1])<X}function Ya(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function jd(t,e,n,r,i){var o=[],a=[],u,c;if(t.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],y=d[g],_;if(Ua(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),u=0;u<g;++u)i.point((m=d[u])[0],m[1]);i.lineEnd();return}y[0]+=2*X}o.push(_=new Ya(m,d,null,!0)),a.push(_.o=new Ya(m,null,_,!1)),o.push(_=new Ya(y,d,null,!1)),a.push(_.o=new Ya(y,null,_,!0))}}),!!o.length){for(a.sort(e),Zd(o),Zd(a),u=0,c=a.length;u<c;++u)a[u].e=n=!n;for(var s=o[0],f,h;;){for(var l=s,p=!0;l.v;)if((l=l.n)===s)return;f=l.z,i.lineStart();do{if(l.v=l.o.v=!0,l.e){if(p)for(u=0,c=f.length;u<c;++u)i.point((h=f[u])[0],h[1]);else r(l.x,l.n.x,1,i);l=l.n}else{if(p)for(f=l.p.z,u=f.length-1;u>=0;--u)i.point((h=f[u])[0],h[1]);else r(l.x,l.p.x,-1,i);l=l.p}l=l.o,f=l.z,p=!p}while(!l.v);i.lineEnd()}}}function Zd(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function il(t){return ot(t[0])<=rt?t[0]:le(t[0])*((ot(t[0])+rt)%Ht-rt)}function Kd(t,e){var n=il(e),r=e[1],i=B(r),o=[B(n),-W(n),0],a=0,u=0,c=new Pt;i===1?r=_t+X:i===-1&&(r=-_t-X);for(var s=0,f=t.length;s<f;++s)if(l=(h=t[s]).length)for(var h,l,p=h[l-1],d=il(p),g=p[1]/2+$a,m=B(g),y=W(g),_=0;_<l;++_,d=x,m=b,y=w,p=v){var v=h[_],x=il(v),A=v[1]/2+$a,b=B(A),w=W(A),M=x-d,$=M>=0?1:-1,D=$*M,S=D>rt,N=m*b;if(c.add(Xt(N*$*B(D),y*w+N*W(D))),a+=S?M+$*Ht:M,S^d>=n^x>=n){var E=Tr(Un(p),Un(v));La(E);var T=Tr(o,E);La(T);var k=(S^M>=0?-1:1)*Vt(T[2]);(r>k||r===k&&(E[0]||E[1]))&&(u+=S^M>=0?1:-1)}}return(a<-X||a<X&&c<-Ti)^u&1}function Qd(t,e,n,r){return function(i){var o=e(i),a=Vd(),u=e(a),c=!1,s,f,h,l={point:p,lineStart:g,lineEnd:m,polygonStart:function(){l.point=y,l.lineStart=_,l.lineEnd=v,f=[],s=[]},polygonEnd:function(){l.point=p,l.lineStart=g,l.lineEnd=m,f=Cs(f);var x=Kd(s,r);f.length?(c||(i.polygonStart(),c=!0),jd(f,k4,x,n,i)):x&&(c||(i.polygonStart(),c=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&(i.polygonEnd(),c=!1),f=s=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(x,A){t(x,A)&&i.point(x,A)}function d(x,A){o.point(x,A)}function g(){l.point=d,o.lineStart()}function m(){l.point=p,o.lineEnd()}function y(x,A){h.push([x,A]),u.point(x,A)}function _(){u.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),u.lineEnd();var x=u.clean(),A=a.result(),b,w=A.length,M,$,D;if(h.pop(),s.push(h),h=null,!!w){if(x&1){if($=A[0],(M=$.length-1)>0){for(c||(i.polygonStart(),c=!0),i.lineStart(),b=0;b<M;++b)i.point((D=$[b])[0],D[1]);i.lineEnd()}return}w>1&&x&2&&A.push(A.pop().concat(A.shift())),f.push(A.filter(D4))}}return l}}function D4(t){return t.length>1}function k4(t,e){return((t=t.x)[0]<0?t[1]-_t-X:_t-t[1])-((e=e.x)[0]<0?e[1]-_t-X:_t-e[1])}const ol=Qd(function(){return!0},E4,L4,[-rt,-_t]);function E4(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var u=o>0?rt:-rt,c=ot(o-e);ot(c-rt)<X?(t.point(e,n=(n+a)/2>0?_t:-_t),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(u,n),t.point(o,n),i=0):r!==u&&c>=rt&&(ot(e-r)<X&&(e-=r*X),ot(o-u)<X&&(o-=u*X),n=N4(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(u,n),i=0),t.point(e=o,n=a),r=u},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function N4(t,e,n,r){var i,o,a=B(t-n);return ot(a)>X?Sr((B(e)*(o=W(r))*B(n)-B(r)*(i=W(e))*B(t))/(i*o*a)):(e+r)/2}function L4(t,e,n,r){var i;if(t==null)i=n*_t,r.point(-rt,i),r.point(0,i),r.point(rt,i),r.point(rt,0),r.point(rt,-i),r.point(0,-i),r.point(-rt,-i),r.point(-rt,0),r.point(-rt,i);else if(ot(t[0]-e[0])>X){var o=t[0]<e[0]?rt:-rt;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function Jd(t){var e=W(t),n=2*V,r=e>0,i=ot(e)>X;function o(f,h,l,p){Hd(p,t,n,l,f,h)}function a(f,h){return W(f)*W(h)>e}function u(f){var h,l,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,y){var _=[m,y],v,x=a(m,y),A=r?x?0:s(m,y):x?s(m+(m<0?rt:-rt),y):0;if(!h&&(d=p=x)&&f.lineStart(),x!==p&&(v=c(h,_),(!v||Ua(h,v)||Ua(_,v))&&(_[2]=1)),x!==p)g=0,x?(f.lineStart(),v=c(_,h),f.point(v[0],v[1])):(v=c(h,_),f.point(v[0],v[1],2),f.lineEnd()),h=v;else if(i&&h&&r^x){var b;!(A&l)&&(b=c(_,h,!0))&&(g=0,r?(f.lineStart(),f.point(b[0][0],b[0][1]),f.point(b[1][0],b[1][1]),f.lineEnd()):(f.point(b[1][0],b[1][1]),f.lineEnd(),f.lineStart(),f.point(b[0][0],b[0][1],3)))}x&&(!h||!Ua(h,_))&&f.point(_[0],_[1]),h=_,p=x,l=A},lineEnd:function(){p&&f.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function c(f,h,l){var p=Un(f),d=Un(h),g=[1,0,0],m=Tr(p,d),y=Ea(m,m),_=m[0],v=y-_*_;if(!v)return!l&&f;var x=e*y/v,A=-e*_/v,b=Tr(g,m),w=Na(g,x),M=Na(m,A);jc(w,M);var $=b,D=Ea(w,$),S=Ea($,$),N=D*D-S*(Ea(w,w)-1);if(!(N<0)){var E=Lt(N),T=Na($,(-D-E)/S);if(jc(T,w),T=ka(T),!l)return T;var k=f[0],P=h[0],L=f[1],C=h[1],R;P<k&&(R=k,k=P,P=R);var z=P-k,G=ot(z-rt)<X,H=G||z<X;if(!G&&C<L&&(R=L,L=C,C=R),H?G?L+C>0^T[1]<(ot(T[0]-k)<X?L:C):L<=T[1]&&T[1]<=C:z>rt^(k<=T[0]&&T[0]<=P)){var st=Na($,(-D+E)/S);return jc(st,w),[T,ka(st)]}}}function s(f,h){var l=r?t:rt-t,p=0;return f<-l?p|=1:f>l&&(p|=2),h<-l?p|=4:h>l&&(p|=8),p}return Qd(a,u,o,r?[0,-t]:[-rt,t-rt])}function C4(t,e,n,r,i,o){var a=t[0],u=t[1],c=e[0],s=e[1],f=0,h=1,l=c-a,p=s-u,d;if(d=n-a,!(!l&&d>0)){if(d/=l,l<0){if(d<f)return;d<h&&(h=d)}else if(l>0){if(d>h)return;d>f&&(f=d)}if(d=i-a,!(!l&&d<0)){if(d/=l,l<0){if(d>h)return;d>f&&(f=d)}else if(l>0){if(d<f)return;d<h&&(h=d)}if(d=r-u,!(!p&&d>0)){if(d/=p,p<0){if(d<f)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>f&&(f=d)}if(d=o-u,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>f&&(f=d)}else if(p>0){if(d<f)return;d<h&&(h=d)}return f>0&&(t[0]=a+f*l,t[1]=u+f*p),h<1&&(e[0]=a+h*l,e[1]=u+h*p),!0}}}}}var Ei=1e9,Ba=-Ei;function qa(t,e,n,r){function i(s,f){return t<=s&&s<=n&&e<=f&&f<=r}function o(s,f,h,l){var p=0,d=0;if(s==null||(p=a(s,h))!==(d=a(f,h))||c(s,f)<0^h>0)do l.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+h+4)%4)!==d);else l.point(f[0],f[1])}function a(s,f){return ot(s[0]-t)<X?f>0?0:3:ot(s[0]-n)<X?f>0?2:1:ot(s[1]-e)<X?f>0?1:0:f>0?3:2}function u(s,f){return c(s.x,f.x)}function c(s,f){var h=a(s,1),l=a(f,1);return h!==l?h-l:h===0?f[1]-s[1]:h===1?s[0]-f[0]:h===2?s[1]-f[1]:f[0]-s[0]}return function(s){var f=s,h=Vd(),l,p,d,g,m,y,_,v,x,A,b,w={point:M,lineStart:N,lineEnd:E,polygonStart:D,polygonEnd:S};function M(k,P){i(k,P)&&f.point(k,P)}function $(){for(var k=0,P=0,L=p.length;P<L;++P)for(var C=p[P],R=1,z=C.length,G=C[0],H,st,at=G[0],ut=G[1];R<z;++R)H=at,st=ut,G=C[R],at=G[0],ut=G[1],st<=r?ut>r&&(at-H)*(r-st)>(ut-st)*(t-H)&&++k:ut<=r&&(at-H)*(r-st)<(ut-st)*(t-H)&&--k;return k}function D(){f=h,l=[],p=[],b=!0}function S(){var k=$(),P=b&&k,L=(l=Cs(l)).length;(P||L)&&(s.polygonStart(),P&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),L&&jd(l,u,k,o,s),s.polygonEnd()),f=s,l=p=d=null}function N(){w.point=T,p&&p.push(d=[]),A=!0,x=!1,_=v=NaN}function E(){l&&(T(g,m),y&&x&&h.rejoin(),l.push(h.result())),w.point=M,x&&f.lineEnd()}function T(k,P){var L=i(k,P);if(p&&d.push([k,P]),A)g=k,m=P,y=L,A=!1,L&&(f.lineStart(),f.point(k,P));else if(L&&x)f.point(k,P);else{var C=[_=Math.max(Ba,Math.min(Ei,_)),v=Math.max(Ba,Math.min(Ei,v))],R=[k=Math.max(Ba,Math.min(Ei,k)),P=Math.max(Ba,Math.min(Ei,P))];C4(C,R,t,e,n,r)?(x||(f.lineStart(),f.point(C[0],C[1])),f.point(R[0],R[1]),L||f.lineEnd(),b=!1):L&&(f.lineStart(),f.point(k,P),b=!1)}_=k,v=P,x=L}return w}}function I4(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(u){return i&&o===u?i:i=qa(t,e,n,r)(o=u)},extent:function(u){return arguments.length?(t=+u[0][0],e=+u[0][1],n=+u[1][0],r=+u[1][1],i=o=null,a):[[t,e],[n,r]]}}}var al,ul,Wa,Ha,kr={sphere:vt,point:vt,lineStart:R4,lineEnd:vt,polygonStart:vt,polygonEnd:vt};function R4(){kr.point=z4,kr.lineEnd=F4}function F4(){kr.point=kr.lineEnd=vt}function z4(t,e){t*=V,e*=V,ul=t,Wa=B(e),Ha=W(e),kr.point=O4}function O4(t,e){t*=V,e*=V;var n=B(e),r=W(e),i=ot(t-ul),o=W(i),a=B(i),u=r*a,c=Ha*n-Wa*r*o,s=Wa*n+Ha*r*o;al.add(Xt(Lt(u*u+c*c),s)),ul=t,Wa=n,Ha=r}function tg(t){return al=new Pt,xe(t,kr),+al}var sl=[null,null],G4={type:"LineString",coordinates:sl};function Xa(t,e){return sl[0]=t,sl[1]=e,tg(G4)}var eg={Feature:function(t,e){return Va(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Va(n[r].geometry,e))return!0;return!1}},ng={Sphere:function(){return!0},Point:function(t,e){return rg(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(rg(n[r],e))return!0;return!1},LineString:function(t,e){return ig(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(ig(n[r],e))return!0;return!1},Polygon:function(t,e){return og(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(og(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Va(n[r],e))return!0;return!1}};function Va(t,e){return t&&ng.hasOwnProperty(t.type)?ng[t.type](t,e):!1}function rg(t,e){return Xa(t,e)===0}function ig(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Xa(t[o],e),r===0||o>0&&(i=Xa(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ti*i))return!0;n=r}return!1}function og(t,e){return!!Kd(t.map(U4),ag(e))}function U4(t){return t=t.map(ag),t.pop(),t}function ag(t){return[t[0]*V,t[1]*V]}function Y4(t,e){return(t&&eg.hasOwnProperty(t.type)?eg[t.type]:Va)(t,e)}function ug(t,e,n){var r=an(t,e-X,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function sg(t,e,n){var r=an(t,e-X,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function cg(){var t,e,n,r,i,o,a,u,c=10,s=c,f=90,h=360,l,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:_()}}function _(){return an(Ma(r/f)*f,n,f).map(d).concat(an(Ma(u/h)*h,a,h).map(g)).concat(an(Ma(e/c)*c,t,c).filter(function(v){return ot(v%f)>X}).map(l)).concat(an(Ma(o/s)*s,i,s).filter(function(v){return ot(v%h)>X}).map(p))}return y.lines=function(){return _().map(function(v){return{type:"LineString",coordinates:v}})},y.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(g(a).slice(1),d(n).reverse().slice(1),g(u).reverse().slice(1))]}},y.extent=function(v){return arguments.length?y.extentMajor(v).extentMinor(v):y.extentMinor()},y.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],u=+v[0][1],a=+v[1][1],r>n&&(v=r,r=n,n=v),u>a&&(v=u,u=a,a=v),y.precision(m)):[[r,u],[n,a]]},y.extentMinor=function(v){return arguments.length?(e=+v[0][0],t=+v[1][0],o=+v[0][1],i=+v[1][1],e>t&&(v=e,e=t,t=v),o>i&&(v=o,o=i,i=v),y.precision(m)):[[e,o],[t,i]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(f=+v[0],h=+v[1],y):[f,h]},y.stepMinor=function(v){return arguments.length?(c=+v[0],s=+v[1],y):[c,s]},y.precision=function(v){return arguments.length?(m=+v,l=ug(o,i,90),p=sg(e,t,m),d=ug(u,a,90),g=sg(r,n,m),y):m},y.extentMajor([[-180,-90+X],[180,90-X]]).extentMinor([[-180,-80-X],[180,80+X]])}function B4(){return cg()()}function q4(t,e){var n=t[0]*V,r=t[1]*V,i=e[0]*V,o=e[1]*V,a=W(r),u=B(r),c=W(o),s=B(o),f=a*W(n),h=a*B(n),l=c*W(i),p=c*B(i),d=2*Vt(Lt(Ad(o-r)+a*c*Ad(i-n))),g=B(d),m=d?function(y){var _=B(y*=d)/g,v=B(d-y)/g,x=v*f+_*l,A=v*h+_*p,b=v*u+_*s;return[Xt(A,x)*pt,Xt(b,Lt(x*x+A*A))*pt]}:function(){return[n*pt,r*pt]};return m.distance=d,m}const Ni=t=>t;var cl=new Pt,ll=new Pt,lg,fg,fl,hl,Ve={point:vt,lineStart:vt,lineEnd:vt,polygonStart:function(){Ve.lineStart=W4,Ve.lineEnd=X4},polygonEnd:function(){Ve.lineStart=Ve.lineEnd=Ve.point=vt,cl.add(ot(ll)),ll=new Pt},result:function(){var t=cl/2;return cl=new Pt,t}};function W4(){Ve.point=H4}function H4(t,e){Ve.point=hg,lg=fl=t,fg=hl=e}function hg(t,e){ll.add(hl*t-fl*e),fl=t,hl=e}function X4(){hg(lg,fg)}var Er=1/0,ja=Er,Li=-Er,Za=Li,Ka={point:V4,lineStart:vt,lineEnd:vt,polygonStart:vt,polygonEnd:vt,result:function(){var t=[[Er,ja],[Li,Za]];return Li=Za=-(ja=Er=1/0),t}};function V4(t,e){t<Er&&(Er=t),t>Li&&(Li=t),e<ja&&(ja=e),e>Za&&(Za=e)}var pl=0,dl=0,Ci=0,Qa=0,Ja=0,Nr=0,gl=0,ml=0,Ii=0,pg,dg,Le,Ce,fe={point:Bn,lineStart:gg,lineEnd:mg,polygonStart:function(){fe.lineStart=K4,fe.lineEnd=Q4},polygonEnd:function(){fe.point=Bn,fe.lineStart=gg,fe.lineEnd=mg},result:function(){var t=Ii?[gl/Ii,ml/Ii]:Nr?[Qa/Nr,Ja/Nr]:Ci?[pl/Ci,dl/Ci]:[NaN,NaN];return pl=dl=Ci=Qa=Ja=Nr=gl=ml=Ii=0,t}};function Bn(t,e){pl+=t,dl+=e,++Ci}function gg(){fe.point=j4}function j4(t,e){fe.point=Z4,Bn(Le=t,Ce=e)}function Z4(t,e){var n=t-Le,r=e-Ce,i=Lt(n*n+r*r);Qa+=i*(Le+t)/2,Ja+=i*(Ce+e)/2,Nr+=i,Bn(Le=t,Ce=e)}function mg(){fe.point=Bn}function K4(){fe.point=J4}function Q4(){yg(pg,dg)}function J4(t,e){fe.point=yg,Bn(pg=Le=t,dg=Ce=e)}function yg(t,e){var n=t-Le,r=e-Ce,i=Lt(n*n+r*r);Qa+=i*(Le+t)/2,Ja+=i*(Ce+e)/2,Nr+=i,i=Ce*t-Le*e,gl+=i*(Le+t),ml+=i*(Ce+e),Ii+=i*3,Bn(Le=t,Ce=e)}function bg(t){this._context=t}bg.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Ht);break}}},result:vt};var yl=new Pt,bl,vg,xg,Ri,Fi,zi={point:vt,lineStart:function(){zi.point=t7},lineEnd:function(){bl&&_g(vg,xg),zi.point=vt},polygonStart:function(){bl=!0},polygonEnd:function(){bl=null},result:function(){var t=+yl;return yl=new Pt,t}};function t7(t,e){zi.point=_g,vg=Ri=t,xg=Fi=e}function _g(t,e){Ri-=t,Fi-=e,yl.add(Lt(Ri*Ri+Fi*Fi)),Ri=t,Fi=e}let wg,tu,Ag,$g;class Mg{constructor(e){this._append=e==null?Sg:e7(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==Ag||this._append!==tu){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Ag=r,tu=this._append,$g=this._,this._=i}this._+=$g;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Sg(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function e7(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Sg;if(e!==wg){const n=10**e;wg=e,tu=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return tu}function n7(t,e){let n=3,r=4.5,i,o;function a(u){return u&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),xe(u,i(o))),o.result()}return a.area=function(u){return xe(u,i(Ve)),Ve.result()},a.measure=function(u){return xe(u,i(zi)),zi.result()},a.bounds=function(u){return xe(u,i(Ka)),Ka.result()},a.centroid=function(u){return xe(u,i(fe)),fe.result()},a.projection=function(u){return arguments.length?(i=u==null?(t=null,Ni):(t=u).stream,a):t},a.context=function(u){return arguments.length?(o=u==null?(e=null,new Mg(n)):new bg(e=u),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(u){return arguments.length?(r=typeof u=="function"?u:(o.pointRadius(+u),+u),a):r},a.digits=function(u){if(!arguments.length)return n;if(u==null)n=null;else{const c=Math.floor(u);if(!(c>=0))throw new RangeError(`invalid digits: ${u}`);n=c}return e===null&&(o=new Mg(n)),a},a.projection(t).digits(n).context(e)}function r7(t){return{stream:Oi(t)}}function Oi(t){return function(e){var n=new vl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function vl(){}vl.prototype={constructor:vl,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function xl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),xe(n,t.stream(Ka)),e(Ka.result()),r!=null&&t.clipExtent(r),t}function eu(t,e,n){return xl(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),u=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,c=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([u,c])},n)}function _l(t,e,n){return eu(t,[[0,0],e],n)}function wl(t,e,n){return xl(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,u=-o*r[0][1];t.scale(150*o).translate([a,u])},n)}function Al(t,e,n){return xl(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],u=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,u])},n)}var Tg=16,i7=W(30*V);function Pg(t,e){return+e?a7(t,e):o7(t)}function o7(t){return Oi({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function a7(t,e){function n(r,i,o,a,u,c,s,f,h,l,p,d,g,m){var y=s-r,_=f-i,v=y*y+_*_;if(v>4*e&&g--){var x=a+l,A=u+p,b=c+d,w=Lt(x*x+A*A+b*b),M=Vt(b/=w),$=ot(ot(b)-1)<X||ot(o-h)<X?(o+h)/2:Xt(A,x),D=t($,M),S=D[0],N=D[1],E=S-r,T=N-i,k=_*E-y*T;(k*k/v>e||ot((y*E+_*T)/v-.5)>.3||a*l+u*p+c*d<i7)&&(n(r,i,o,a,u,c,S,N,$,x/=w,A/=w,b,g,m),m.point(S,N),n(S,N,$,x,A,b,s,f,h,l,p,d,g,m))}}return function(r){var i,o,a,u,c,s,f,h,l,p,d,g,m={point:y,lineStart:_,lineEnd:x,polygonStart:function(){r.polygonStart(),m.lineStart=A},polygonEnd:function(){r.polygonEnd(),m.lineStart=_}};function y(M,$){M=t(M,$),r.point(M[0],M[1])}function _(){h=NaN,m.point=v,r.lineStart()}function v(M,$){var D=Un([M,$]),S=t(M,$);n(h,l,f,p,d,g,h=S[0],l=S[1],f=M,p=D[0],d=D[1],g=D[2],Tg,r),r.point(h,l)}function x(){m.point=y,r.lineEnd()}function A(){_(),m.point=b,m.lineEnd=w}function b(M,$){v(i=M,$),o=h,a=l,u=p,c=d,s=g,m.point=v}function w(){n(h,l,f,p,d,g,o,a,i,u,c,s,Tg,r),m.lineEnd=x,x()}return m}}var u7=Oi({point:function(t,e){this.stream.point(t*V,e*V)}});function s7(t){return Oi({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function c7(t,e,n,r,i){function o(a,u){return a*=r,u*=i,[e+t*a,n-t*u]}return o.invert=function(a,u){return[(a-e)/t*r,(n-u)/t*i]},o}function Dg(t,e,n,r,i,o){if(!o)return c7(t,e,n,r,i);var a=W(o),u=B(o),c=a*t,s=u*t,f=a/t,h=u/t,l=(u*n-a*e)/t,p=(u*e+a*n)/t;function d(g,m){return g*=r,m*=i,[c*g-s*m+e,n-s*g-c*m]}return d.invert=function(g,m){return[r*(f*g-h*m+l),i*(p-h*g-f*m)]},d}function Ie(t){return $l(function(){return t})()}function $l(t){var e,n=150,r=480,i=250,o=0,a=0,u=0,c=0,s=0,f,h=0,l=1,p=1,d=null,g=ol,m=null,y,_,v,x=Ni,A=.5,b,w,M,$,D;function S(k){return M(k[0]*V,k[1]*V)}function N(k){return k=M.invert(k[0],k[1]),k&&[k[0]*pt,k[1]*pt]}S.stream=function(k){return $&&D===k?$:$=u7(s7(f)(g(b(x(D=k)))))},S.preclip=function(k){return arguments.length?(g=k,d=void 0,T()):g},S.postclip=function(k){return arguments.length?(x=k,m=y=_=v=null,T()):x},S.clipAngle=function(k){return arguments.length?(g=+k?Jd(d=k*V):(d=null,ol),T()):d*pt},S.clipExtent=function(k){return arguments.length?(x=k==null?(m=y=_=v=null,Ni):qa(m=+k[0][0],y=+k[0][1],_=+k[1][0],v=+k[1][1]),T()):m==null?null:[[m,y],[_,v]]},S.scale=function(k){return arguments.length?(n=+k,E()):n},S.translate=function(k){return arguments.length?(r=+k[0],i=+k[1],E()):[r,i]},S.center=function(k){return arguments.length?(o=k[0]%360*V,a=k[1]%360*V,E()):[o*pt,a*pt]},S.rotate=function(k){return arguments.length?(u=k[0]%360*V,c=k[1]%360*V,s=k.length>2?k[2]%360*V:0,E()):[u*pt,c*pt,s*pt]},S.angle=function(k){return arguments.length?(h=k%360*V,E()):h*pt},S.reflectX=function(k){return arguments.length?(l=k?-1:1,E()):l<0},S.reflectY=function(k){return arguments.length?(p=k?-1:1,E()):p<0},S.precision=function(k){return arguments.length?(b=Pg(w,A=k*k),T()):Lt(A)},S.fitExtent=function(k,P){return eu(S,k,P)},S.fitSize=function(k,P){return _l(S,k,P)},S.fitWidth=function(k,P){return wl(S,k,P)},S.fitHeight=function(k,P){return Al(S,k,P)};function E(){var k=Dg(n,0,0,l,p,h).apply(null,e(o,a)),P=Dg(n,r-k[0],i-k[1],l,p,h);return f=rl(u,c,s),w=el(e,P),M=el(f,w),b=Pg(w,A),T()}function T(){return $=D=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&N,E()}}function Ml(t){var e=0,n=rt/3,r=$l(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*V,n=o[1]*V):[e*pt,n*pt]},i}function l7(t){var e=W(t);function n(r,i){return[r*e,B(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function kg(t,e){var n=B(t),r=(n+B(e))/2;if(ot(r)<X)return l7(t);var i=1+n*(2*r-n),o=Lt(i)/r;function a(u,c){var s=Lt(i-2*r*B(c))/r;return[s*B(u*=r),o-s*W(u)]}return a.invert=function(u,c){var s=o-c,f=Xt(u,ot(s))*le(s);return s*r<0&&(f-=rt*le(u)*le(s)),[f/r,Vt((i-(u*u+s*s)*r*r)/(2*r))]},a}function nu(){return Ml(kg).scale(155.424).center([0,33.6442])}function Eg(){return nu().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function f7(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function h7(){var t,e,n=Eg(),r,i=nu().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=nu().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u,c,s={point:function(l,p){c=[l,p]}};function f(l){var p=l[0],d=l[1];return c=null,r.point(p,d),c||(o.point(p,d),c)||(u.point(p,d),c)}f.invert=function(l){var p=n.scale(),d=n.translate(),g=(l[0]-d[0])/p,m=(l[1]-d[1])/p;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(l)},f.stream=function(l){return t&&e===l?t:t=f7([n.stream(e=l),i.stream(l),a.stream(l)])},f.precision=function(l){return arguments.length?(n.precision(l),i.precision(l),a.precision(l),h()):n.precision()},f.scale=function(l){return arguments.length?(n.scale(l),i.scale(l*.35),a.scale(l),f.translate(n.translate())):n.scale()},f.translate=function(l){if(!arguments.length)return n.translate();var p=n.scale(),d=+l[0],g=+l[1];return r=n.translate(l).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(s),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+X,g+.12*p+X],[d-.214*p-X,g+.234*p-X]]).stream(s),u=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+X,g+.166*p+X],[d-.115*p-X,g+.234*p-X]]).stream(s),h()},f.fitExtent=function(l,p){return eu(f,l,p)},f.fitSize=function(l,p){return _l(f,l,p)},f.fitWidth=function(l,p){return wl(f,l,p)},f.fitHeight=function(l,p){return Al(f,l,p)};function h(){return t=e=null,f}return f.scale(1070)}function Ng(t){return function(e,n){var r=W(e),i=W(n),o=t(r*i);return o===1/0?[2,0]:[o*i*B(e),o*B(n)]}}function Gi(t){return function(e,n){var r=Lt(e*e+n*n),i=t(r),o=B(i),a=W(i);return[Xt(e*o,r*a),Vt(r&&n*o/r)]}}var Sl=Ng(function(t){return Lt(2/(1+t))});Sl.invert=Gi(function(t){return 2*Vt(t/2)});function p7(){return Ie(Sl).scale(124.75).clipAngle(180-.001)}var Tl=Ng(function(t){return(t=wd(t))&&t/B(t)});Tl.invert=Gi(function(t){return t});function d7(){return Ie(Tl).scale(79.4188).clipAngle(180-.001)}function Ui(t,e){return[t,Sa(qc((_t+e)/2))]}Ui.invert=function(t,e){return[t,2*Sr(_d(e))-_t]};function g7(){return Lg(Ui).scale(961/Ht)}function Lg(t){var e=Ie(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,u,c,s;e.scale=function(h){return arguments.length?(r(h),f()):r()},e.translate=function(h){return arguments.length?(i(h),f()):i()},e.center=function(h){return arguments.length?(n(h),f()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=u=c=s=null:(a=+h[0][0],u=+h[0][1],c=+h[1][0],s=+h[1][1]),f()):a==null?null:[[a,u],[c,s]]};function f(){var h=rt*r(),l=e(Wd(e.rotate()).invert([0,0]));return o(a==null?[[l[0]-h,l[1]-h],[l[0]+h,l[1]+h]]:t===Ui?[[Math.max(l[0]-h,a),u],[Math.min(l[0]+h,c),s]]:[[a,Math.max(l[1]-h,u)],[c,Math.min(l[1]+h,s)]])}return f()}function ru(t){return qc((_t+t)/2)}function Cg(t,e){var n=W(t),r=t===e?B(t):Sa(n/W(e))/Sa(ru(e)/ru(t)),i=n*Bc(ru(t),r)/r;if(!r)return Ui;function o(a,u){i>0?u<-_t+X&&(u=-_t+X):u>_t-X&&(u=_t-X);var c=i/Bc(ru(u),r);return[c*B(r*a),i-c*W(r*a)]}return o.invert=function(a,u){var c=i-u,s=le(r)*Lt(a*a+c*c),f=Xt(a,ot(c))*le(c);return c*r<0&&(f-=rt*le(a)*le(c)),[f/r,2*Sr(Bc(i/s,1/r))-_t]},o}function m7(){return Ml(Cg).scale(109.5).parallels([30,30])}function Yi(t,e){return[t,e]}Yi.invert=Yi;function y7(){return Ie(Yi).scale(152.63)}function Ig(t,e){var n=W(t),r=t===e?B(t):(n-W(e))/(e-t),i=n/r+t;if(ot(r)<X)return Yi;function o(a,u){var c=i-u,s=r*a;return[c*B(s),i-c*W(s)]}return o.invert=function(a,u){var c=i-u,s=Xt(a,ot(c))*le(c);return c*r<0&&(s-=rt*le(a)*le(c)),[s/r,i-le(r)*Lt(a*a+c*c)]},o}function b7(){return Ml(Ig).scale(131.154).center([0,13.9389])}var Bi=1.340264,qi=-.081106,Wi=893e-6,Hi=.003796,iu=Lt(3)/2,v7=12;function Pl(t,e){var n=Vt(iu*B(e)),r=n*n,i=r*r*r;return[t*W(n)/(iu*(Bi+3*qi*r+i*(7*Wi+9*Hi*r))),n*(Bi+qi*r+i*(Wi+Hi*r))]}Pl.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,u,c;o<v7&&(u=n*(Bi+qi*r+i*(Wi+Hi*r))-e,c=Bi+3*qi*r+i*(7*Wi+9*Hi*r),n-=a=u/c,r=n*n,i=r*r*r,!(ot(a)<Ti));++o);return[iu*t*(Bi+3*qi*r+i*(7*Wi+9*Hi*r))/W(n),Vt(B(n)/iu)]};function x7(){return Ie(Pl).scale(177.158)}function Dl(t,e){var n=W(e),r=W(t)*n;return[n*B(t)/r,B(e)/r]}Dl.invert=Gi(Sr);function _7(){return Ie(Dl).scale(144.049).clipAngle(60)}function w7(){var t=1,e=0,n=0,r=1,i=1,o=0,a,u,c=null,s,f,h,l=1,p=1,d=Oi({point:function(x,A){var b=v([x,A]);this.stream.point(b[0],b[1])}}),g=Ni,m,y;function _(){return l=t*r,p=t*i,m=y=null,v}function v(x){var A=x[0]*l,b=x[1]*p;if(o){var w=b*a-A*u;A=A*a+b*u,b=w}return[A+e,b+n]}return v.invert=function(x){var A=x[0]-e,b=x[1]-n;if(o){var w=b*a+A*u;A=A*a-b*u,b=w}return[A/l,b/p]},v.stream=function(x){return m&&y===x?m:m=d(g(y=x))},v.postclip=function(x){return arguments.length?(g=x,c=s=f=h=null,_()):g},v.clipExtent=function(x){return arguments.length?(g=x==null?(c=s=f=h=null,Ni):qa(c=+x[0][0],s=+x[0][1],f=+x[1][0],h=+x[1][1]),_()):c==null?null:[[c,s],[f,h]]},v.scale=function(x){return arguments.length?(t=+x,_()):t},v.translate=function(x){return arguments.length?(e=+x[0],n=+x[1],_()):[e,n]},v.angle=function(x){return arguments.length?(o=x%360*V,u=B(o),a=W(o),_()):o*pt},v.reflectX=function(x){return arguments.length?(r=x?-1:1,_()):r<0},v.reflectY=function(x){return arguments.length?(i=x?-1:1,_()):i<0},v.fitExtent=function(x,A){return eu(v,x,A)},v.fitSize=function(x,A){return _l(v,x,A)},v.fitWidth=function(x,A){return wl(v,x,A)},v.fitHeight=function(x,A){return Al(v,x,A)},v}function kl(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}kl.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(ot(i)>X&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function A7(){return Ie(kl).scale(175.295)}function El(t,e){return[W(e)*B(t),B(e)]}El.invert=Gi(Vt);function $7(){return Ie(El).scale(249.5).clipAngle(90+X)}function Nl(t,e){var n=W(e),r=1+W(t)*n;return[n*B(t)/r,B(e)/r]}Nl.invert=Gi(function(t){return 2*Sr(t)});function M7(){return Ie(Nl).scale(250).clipAngle(142)}function Ll(t,e){return[Sa(qc((_t+e)/2)),-t]}Ll.invert=function(t,e){return[-e,2*Sr(_d(t))-_t]};function S7(){var t=Lg(Ll),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function T7(t,e){return t.parent===e.parent?1:2}function P7(t){return t.reduce(D7,0)/t.length}function D7(t,e){return t+e.x}function k7(t){return 1+t.reduce(E7,0)}function E7(t,e){return Math.max(t,e.y)}function N7(t){for(var e;e=t.children;)t=e[0];return t}function L7(t){for(var e;e=t.children;)t=e[e.length-1];return t}function C7(){var t=T7,e=1,n=1,r=!1;function i(o){var a,u=0;o.eachAfter(function(l){var p=l.children;p?(l.x=P7(p),l.y=k7(p)):(l.x=a?u+=t(l,a):0,l.y=0,a=l)});var c=N7(o),s=L7(o),f=c.x-t(c,s)/2,h=s.x+t(s,c)/2;return o.eachAfter(r?function(l){l.x=(l.x-o.x)*e,l.y=(o.y-l.y)*n}:function(l){l.x=(l.x-f)/(h-f)*e,l.y=(1-(o.y?l.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function I7(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function R7(){return this.eachAfter(I7)}function F7(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function z7(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function O7(t,e){for(var n=this,r=[n],i=[],o,a,u,c=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,u=o.length;a<u;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function G7(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function U7(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function Y7(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function B7(t){for(var e=this,n=q7(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function q7(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function W7(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function H7(){return Array.from(this)}function X7(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function V7(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*j7(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Cl(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=Q7)):e===void 0&&(e=K7);for(var n=new qn(t),r,i=[n],o,a,u,c;r=i.pop();)if((a=e(r.data))&&(c=(a=Array.from(a)).length))for(r.children=a,u=c-1;u>=0;--u)i.push(o=a[u]=new qn(a[u])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(Rg)}function Z7(){return Cl(this).eachBefore(J7)}function K7(t){return t.children}function Q7(t){return Array.isArray(t)?t[1]:null}function J7(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Rg(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function qn(t){this.data=t,this.depth=this.height=0,this.parent=null}qn.prototype=Cl.prototype={constructor:qn,count:R7,each:F7,eachAfter:O7,eachBefore:z7,find:G7,sum:U7,sort:Y7,path:B7,ancestors:W7,descendants:H7,leaves:X7,links:V7,copy:Z7,[Symbol.iterator]:j7};function ou(t){return t==null?null:Fg(t)}function Fg(t){if(typeof t!="function")throw new Error;return t}function Wn(){return 0}function Lr(t){return function(){return t}}const tA=1664525,eA=1013904223,zg=4294967296;function Il(){let t=1;return()=>(t=(tA*t+eA)%zg)/zg}function nA(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function rA(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function iA(t){return Og(t,Il())}function Og(t,e){for(var n=0,r=(t=rA(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&Gg(a,o)?++n:(a=aA(i=oA(i,o)),n=0);return a}function oA(t,e){var n,r;if(Rl(e,t))return[e];for(n=0;n<t.length;++n)if(au(e,t[n])&&Rl(Xi(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(au(Xi(t[n],t[r]),e)&&au(Xi(t[n],e),t[r])&&au(Xi(t[r],e),t[n])&&Rl(Ug(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function au(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Gg(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Rl(t,e){for(var n=0;n<e.length;++n)if(!Gg(t,e[n]))return!1;return!0}function aA(t){switch(t.length){case 1:return uA(t[0]);case 2:return Xi(t[0],t[1]);case 3:return Ug(t[0],t[1],t[2])}}function uA(t){return{x:t.x,y:t.y,r:t.r}}function Xi(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,u=e.r,c=o-n,s=a-r,f=u-i,h=Math.sqrt(c*c+s*s);return{x:(n+o+c/h*f)/2,y:(r+a+s/h*f)/2,r:(h+i+u)/2}}function Ug(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,u=e.y,c=e.r,s=n.x,f=n.y,h=n.r,l=r-a,p=r-s,d=i-u,g=i-f,m=c-o,y=h-o,_=r*r+i*i-o*o,v=_-a*a-u*u+c*c,x=_-s*s-f*f+h*h,A=p*d-l*g,b=(d*x-g*v)/(A*2)-r,w=(g*m-d*y)/A,M=(p*v-l*x)/(A*2)-i,$=(l*y-p*m)/A,D=w*w+$*$-1,S=2*(o+b*w+M*$),N=b*b+M*M-o*o,E=-(Math.abs(D)>1e-6?(S+Math.sqrt(S*S-4*D*N))/(2*D):N/S);return{x:r+b+w*E,y:i+M+$*E,r:E}}function Yg(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,u,c,s=r*r+a*a;s?(o=e.r+n.r,o*=o,c=t.r+n.r,c*=c,o>c?(i=(s+c-o)/(2*s),u=Math.sqrt(Math.max(0,c/s-i*i)),n.x=t.x-i*r-u*a,n.y=t.y-i*a+u*r):(i=(s+o-c)/(2*s),u=Math.sqrt(Math.max(0,o/s-i*i)),n.x=e.x+i*r-u*a,n.y=e.y+i*a+u*r)):(n.x=e.x+n.r,n.y=e.y)}function Bg(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function qg(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function uu(t){this._=t,this.next=null,this.previous=null}function Wg(t,e){if(!(o=(t=nA(t)).length))return 0;var n,r,i,o,a,u,c,s,f,h,l;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;Yg(r,n,i=t[2]),n=new uu(n),r=new uu(r),i=new uu(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<o;++c){Yg(n._,r._,i=t[c]),i=new uu(i),s=r.next,f=n.previous,h=r._.r,l=n._.r;do if(h<=l){if(Bg(s._,i._)){r=s,n.next=r,r.previous=n,--c;continue t}h+=s._.r,s=s.next}else{if(Bg(f._,i._)){n=f,n.next=r,r.previous=n,--c;continue t}l+=f._.r,f=f.previous}while(s!==f.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=qg(n);(i=i.next)!==r;)(u=qg(i))<a&&(n=i,a=u);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Og(n,e),c=0;c<o;++c)n=t[c],n.x-=i.x,n.y-=i.y;return i.r}function sA(t){return Wg(t,Il()),t}function cA(t){return Math.sqrt(t.value)}function lA(){var t=null,e=1,n=1,r=Wn;function i(o){const a=Il();return o.x=e/2,o.y=n/2,t?o.eachBefore(Hg(t)).eachAfter(Fl(r,.5,a)).eachBefore(Xg(1)):o.eachBefore(Hg(cA)).eachAfter(Fl(Wn,1,a)).eachAfter(Fl(r,o.r/Math.min(e,n),a)).eachBefore(Xg(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=ou(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Lr(+o),i):r},i}function Hg(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Fl(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,u=t(r)*e||0,c;if(u)for(o=0;o<a;++o)i[o].r+=u;if(c=Wg(i,n),u)for(o=0;o<a;++o)i[o].r-=u;r.r=c+u}}}function Xg(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function Vg(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Vi(t,e,n,r,i){for(var o=t.children,a,u=-1,c=o.length,s=t.value&&(r-e)/t.value;++u<c;)a=o[u],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*s}function fA(){var t=1,e=1,n=0,r=!1;function i(a){var u=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/u,a.eachBefore(o(e,u)),r&&a.eachBefore(Vg),a}function o(a,u){return function(c){c.children&&Vi(c,c.x0,a*(c.depth+1)/u,c.x1,a*(c.depth+2)/u);var s=c.x0,f=c.y0,h=c.x1-n,l=c.y1-n;h<s&&(s=h=(s+h)/2),l<f&&(f=l=(f+l)/2),c.x0=s,c.y0=f,c.x1=h,c.y1=l}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var hA={depth:-1},jg={},zl={};function pA(t){return t.id}function dA(t){return t.parentId}function gA(){var t=pA,e=dA,n;function r(i){var o=Array.from(i),a=t,u=e,c,s,f,h,l,p,d,g,m=new Map;if(n!=null){const y=o.map((x,A)=>mA(n(x,A,i))),_=y.map(Zg),v=new Set(y).add("");for(const x of _)v.has(x)||(v.add(x),y.push(x),_.push(Zg(x)),o.push(zl));a=(x,A)=>y[A],u=(x,A)=>_[A]}for(f=0,c=o.length;f<c;++f)s=o[f],p=o[f]=new qn(s),(d=a(s,f,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?jg:p)),(d=u(s,f,i))!=null&&(d+="")&&(p.parent=d);for(f=0;f<c;++f)if(p=o[f],d=p.parent){if(l=m.get(d),!l)throw new Error("missing: "+d);if(l===jg)throw new Error("ambiguous: "+d);l.children?l.children.push(p):l.children=[p],p.parent=l}else{if(h)throw new Error("multiple roots");h=p}if(!h)throw new Error("no root");if(n!=null){for(;h.data===zl&&h.children.length===1;)h=h.children[0],--c;for(let y=o.length-1;y>=0&&(p=o[y],p.data===zl);--y)p.data=null}if(h.parent=hA,h.eachBefore(function(y){y.depth=y.parent.depth+1,--c}).eachBefore(Rg),h.parent=null,c>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=ou(i),r):t},r.parentId=function(i){return arguments.length?(e=ou(i),r):e},r.path=function(i){return arguments.length?(n=ou(i),r):n},r}function mA(t){t=`${t}`;let e=t.length;return Ol(t,e-1)&&!Ol(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Zg(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Ol(t,e););return t.slice(0,e)}function Ol(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function yA(t,e){return t.parent===e.parent?1:2}function Gl(t){var e=t.children;return e?e[0]:t.t}function Ul(t){var e=t.children;return e?e[e.length-1]:t.t}function bA(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function vA(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function xA(t,e,n){return t.a.parent===e.parent?t.a:n}function su(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}su.prototype=Object.create(qn.prototype);function _A(t){for(var e=new su(t,0),n,r=[e],i,o,a,u;n=r.pop();)if(o=n._.children)for(n.children=new Array(u=o.length),a=u-1;a>=0;--a)r.push(i=n.children[a]=new su(o[a],a)),i.parent=n;return(e.parent=new su(null,0)).children=[e],e}function wA(){var t=yA,e=1,n=1,r=null;function i(s){var f=_A(s);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(a),r)s.eachBefore(c);else{var h=s,l=s,p=s;s.eachBefore(function(_){_.x<h.x&&(h=_),_.x>l.x&&(l=_),_.depth>p.depth&&(p=_)});var d=h===l?1:t(h,l)/2,g=d-h.x,m=e/(l.x+d+g),y=n/(p.depth||1);s.eachBefore(function(_){_.x=(_.x+g)*m,_.y=_.depth*y})}return s}function o(s){var f=s.children,h=s.parent.children,l=s.i?h[s.i-1]:null;if(f){vA(s);var p=(f[0].z+f[f.length-1].z)/2;l?(s.z=l.z+t(s._,l._),s.m=s.z-p):s.z=p}else l&&(s.z=l.z+t(s._,l._));s.parent.A=u(s,l,s.parent.A||h[0])}function a(s){s._.x=s.z+s.parent.m,s.m+=s.parent.m}function u(s,f,h){if(f){for(var l=s,p=s,d=f,g=l.parent.children[0],m=l.m,y=p.m,_=d.m,v=g.m,x;d=Ul(d),l=Gl(l),d&&l;)g=Gl(g),p=Ul(p),p.a=s,x=d.z+_-l.z-m+t(d._,l._),x>0&&(bA(xA(d,s,h),s,x),m+=x,y+=x),_+=d.m,m+=l.m,v+=g.m,y+=p.m;d&&!Ul(p)&&(p.t=d,p.m+=_-y),l&&!Gl(g)&&(g.t=l,g.m+=m-v,h=s)}return h}function c(s){s.x*=e,s.y=s.depth*n}return i.separation=function(s){return arguments.length?(t=s,i):t},i.size=function(s){return arguments.length?(r=!1,e=+s[0],n=+s[1],i):r?null:[e,n]},i.nodeSize=function(s){return arguments.length?(r=!0,e=+s[0],n=+s[1],i):r?[e,n]:null},i}function cu(t,e,n,r,i){for(var o=t.children,a,u=-1,c=o.length,s=t.value&&(i-n)/t.value;++u<c;)a=o[u],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*s}var Kg=(1+Math.sqrt(5))/2;function Qg(t,e,n,r,i,o){for(var a=[],u=e.children,c,s,f=0,h=0,l=u.length,p,d,g=e.value,m,y,_,v,x,A,b;f<l;){p=i-n,d=o-r;do m=u[h++].value;while(!m&&h<l);for(y=_=m,A=Math.max(d/p,p/d)/(g*t),b=m*m*A,x=Math.max(_/b,b/y);h<l;++h){if(m+=s=u[h].value,s<y&&(y=s),s>_&&(_=s),b=m*m*A,v=Math.max(_/b,b/y),v>x){m-=s;break}x=v}a.push(c={value:m,dice:p<d,children:u.slice(f,h)}),c.dice?Vi(c,n,r,i,g?r+=d*m/g:o):cu(c,n,r,g?n+=p*m/g:i,o),g-=m,f=h}return a}const Jg=function t(e){function n(r,i,o,a,u){Qg(e,r,i,o,a,u)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Kg);function AA(){var t=Jg,e=!1,n=1,r=1,i=[0],o=Wn,a=Wn,u=Wn,c=Wn,s=Wn;function f(l){return l.x0=l.y0=0,l.x1=n,l.y1=r,l.eachBefore(h),i=[0],e&&l.eachBefore(Vg),l}function h(l){var p=i[l.depth],d=l.x0+p,g=l.y0+p,m=l.x1-p,y=l.y1-p;m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),l.x0=d,l.y0=g,l.x1=m,l.y1=y,l.children&&(p=i[l.depth+1]=o(l)/2,d+=s(l)-p,g+=a(l)-p,m-=u(l)-p,y-=c(l)-p,m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),t(l,d,g,m,y))}return f.round=function(l){return arguments.length?(e=!!l,f):e},f.size=function(l){return arguments.length?(n=+l[0],r=+l[1],f):[n,r]},f.tile=function(l){return arguments.length?(t=Fg(l),f):t},f.padding=function(l){return arguments.length?f.paddingInner(l).paddingOuter(l):f.paddingInner()},f.paddingInner=function(l){return arguments.length?(o=typeof l=="function"?l:Lr(+l),f):o},f.paddingOuter=function(l){return arguments.length?f.paddingTop(l).paddingRight(l).paddingBottom(l).paddingLeft(l):f.paddingTop()},f.paddingTop=function(l){return arguments.length?(a=typeof l=="function"?l:Lr(+l),f):a},f.paddingRight=function(l){return arguments.length?(u=typeof l=="function"?l:Lr(+l),f):u},f.paddingBottom=function(l){return arguments.length?(c=typeof l=="function"?l:Lr(+l),f):c},f.paddingLeft=function(l){return arguments.length?(s=typeof l=="function"?l:Lr(+l),f):s},f}function $A(t,e,n,r,i){var o=t.children,a,u=o.length,c,s=new Array(u+1);for(s[0]=c=a=0;a<u;++a)s[a+1]=c+=o[a].value;f(0,u,t.value,e,n,r,i);function f(h,l,p,d,g,m,y){if(h>=l-1){var _=o[h];_.x0=d,_.y0=g,_.x1=m,_.y1=y;return}for(var v=s[h],x=p/2+v,A=h+1,b=l-1;A<b;){var w=A+b>>>1;s[w]<x?A=w+1:b=w}x-s[A-1]<s[A]-x&&h+1<A&&--A;var M=s[A]-v,$=p-M;if(m-d>y-g){var D=p?(d*$+m*M)/p:m;f(h,A,M,d,g,D,y),f(A,l,$,D,g,m,y)}else{var S=p?(g*$+y*M)/p:y;f(h,A,M,d,g,m,S),f(A,l,$,d,S,m,y)}}}function MA(t,e,n,r,i){(t.depth&1?cu:Vi)(t,e,n,r,i)}const SA=function t(e){function n(r,i,o,a,u){if((c=r._squarify)&&c.ratio===e)for(var c,s,f,h,l=-1,p,d=c.length,g=r.value;++l<d;){for(s=c[l],f=s.children,h=s.value=0,p=f.length;h<p;++h)s.value+=f[h].value;s.dice?Vi(s,i,o,a,g?o+=(u-o)*s.value/g:u):cu(s,i,o,g?i+=(a-i)*s.value/g:a,u),g-=s.value}else r._squarify=c=Qg(e,r,i,o,a,u),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Kg);function TA(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function PA(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],u,c=0;++e<n;)o=a,a=t[e],c+=u=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*u,i+=(o[1]+a[1])*u;return c*=3,[r/c,i/c]}function DA(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function kA(t,e){return t[0]-e[0]||t[1]-e[1]}function t1(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&DA(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function EA(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(kA),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=t1(r),a=t1(i),u=a[0]===o[0],c=a[a.length-1]===o[o.length-1],s=[];for(e=o.length-1;e>=0;--e)s.push(t[r[o[e]][2]]);for(e=+u;e<a.length-c;++e)s.push(t[r[a[e]][2]]);return s}function NA(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],u=r[1],c,s,f=!1,h=0;h<n;++h)r=t[h],c=r[0],s=r[1],s>o!=u>o&&i<(a-c)*(o-s)/(u-s)+c&&(f=!f),a=c,u=s;return f}function LA(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],u=r[1],c=0;++e<n;)i=a,o=u,r=t[e],a=r[0],u=r[1],i-=a,o-=u,c+=Math.hypot(i,o);return c}const Rt=Math.random,CA=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Rt),IA=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Rt),Yl=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var u;if(o!=null)u=o,o=null;else do o=e()*2-1,u=e()*2-1,a=o*o+u*u;while(!a||a>1);return r+i*u*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Rt),RA=function t(e){var n=Yl.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Rt),e1=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Rt),FA=function t(e){var n=e1.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Rt),zA=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Rt),OA=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Rt),GA=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Rt),n1=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Rt),Bl=function t(e){var n=Yl.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,u=1/(3*Math.sqrt(a)),c=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var s=n(),f=1+u*s;while(f<=0);f*=f*f;var h=1-e()}while(h>=1-.0331*s*s*s*s&&Math.log(h)>=.5*s*s+a*(1-f+Math.log(f)));return a*f*c()*o}}return r.source=t,r}(Rt),r1=function t(e){var n=Bl.source(e);function r(i,o){var a=n(i),u=n(o);return function(){var c=a();return c===0?0:c/(c+u())}}return r.source=t,r}(Rt),i1=function t(e){var n=n1.source(e),r=r1.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var u=0,c=o,s=a;c*s>16&&c*(1-s)>16;){var f=Math.floor((c+1)*s),h=r(f,c-f+1)();h<=s?(u+=f,c-=f,s=(s-h)/(1-h)):(c=f-1,s/=h)}for(var l=s<.5,p=l?s:1-s,d=n(p),g=d(),m=0;g<=c;++m)g+=d();return u+(l?m:c-m)}}return i.source=t,i}(Rt),UA=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=u=>-Math.log(u):(r=1/r,a=u=>Math.pow(u,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Rt),YA=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Rt),BA=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Rt),qA=function t(e){var n=Bl.source(e),r=i1.source(e);function i(o){return function(){for(var a=0,u=o;u>16;){var c=Math.floor(.875*u),s=n(c)();if(s>u)return a+r(c-1,u/s)();a+=c,u-=s}for(var f=-Math.log1p(-e()),h=0;f<=u;++h)f-=Math.log1p(-e());return a+h}}return i.source=t,i}(Rt),WA=1664525,HA=1013904223,o1=1/4294967296;function XA(t=Math.random()){let e=(0<=t&&t<1?t/o1:Math.abs(t))|0;return()=>(e=WA*e+HA|0,o1*(e>>>0))}function he(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function je(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 ql=Symbol("implicit");function Wl(){var t=new ni,e=[],n=[],r=ql;function i(o){let a=t.get(o);if(a===void 0){if(r!==ql)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new ni;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Wl(e,n).unknown(r)},he.apply(i,arguments),i}function Hl(){var t=Wl().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,u=!1,c=0,s=0,f=.5;delete t.unknown;function h(){var l=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+s*2),u&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),u&&(d=Math.round(d),a=Math.round(a));var m=an(l).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(e(l),h()):e()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,u=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(u=!!l,h()):u},t.padding=function(l){return arguments.length?(c=Math.min(1,s=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(s=+l,h()):s},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return Hl(e(),[r,i]).round(u).paddingInner(c).paddingOuter(s).align(f)},he.apply(h(),arguments)}function a1(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return a1(e())},t}function Xl(){return a1(Hl.apply(null,arguments).paddingInner(1))}function VA(t){return function(){return t}}function lu(t){return+t}var u1=[0,1];function Qt(t){return t}function Vl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:VA(isNaN(e)?NaN:.5)}function jA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function ZA(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Vl(i,r),o=n(a,o)):(r=Vl(r,i),o=n(o,a)),function(u){return o(r(u))}}function KA(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Vl(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(u){var c=wn(t,u,1,r)-1;return o[c](i[c](u))}}function ji(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function fu(){var t=u1,e=u1,n=cn,r,i,o,a=Qt,u,c,s;function f(){var l=Math.min(t.length,e.length);return a!==Qt&&(a=jA(t[0],t[l-1])),u=l>2?KA:ZA,c=s=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=u(t.map(r),e,n)))(r(a(l)))}return h.invert=function(l){return a(i((s||(s=u(e,t.map(r),ce)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,lu),f()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),f()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),n=ta,f()},h.clamp=function(l){return arguments.length?(a=l?!0:Qt,f()):a!==Qt},h.interpolate=function(l){return arguments.length?(n=l,f()):n},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function jl(){return fu()(Qt,Qt)}function s1(t,e,n,r){var i=Eo(t,e,n),o;switch(r=Mr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=vd(i,a))&&(r.precision=o),Uc(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=xd(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=bd(i))&&(r.precision=o-(r.type==="%")*2);break}}return Si(r)}function dn(t){var e=t.domain;return t.ticks=function(n){var r=e();return $n(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return s1(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],u=r[o],c,s,f=10;for(u<a&&(s=a,a=u,u=s,s=i,i=o,o=s);f-- >0;){if(s=Mn(a,u,n),s===c)return r[i]=a,r[o]=u,e(r);if(s>0)a=Math.floor(a/s)*s,u=Math.ceil(u/s)*s;else if(s<0)a=Math.ceil(a*s)/s,u=Math.floor(u*s)/s;else break;c=s}return t},t}function Zl(){var t=jl();return t.copy=function(){return ji(t,Zl())},he.apply(t,arguments),dn(t)}function c1(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,lu),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return c1(t).unknown(e)},t=arguments.length?Array.from(t,lu):[0,1],dn(n)}function l1(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function f1(t){return Math.log(t)}function h1(t){return Math.exp(t)}function QA(t){return-Math.log(-t)}function JA(t){return-Math.exp(-t)}function t$(t){return isFinite(t)?+("1e"+t):t<0?0:t}function e$(t){return t===10?t$:t===Math.E?Math.exp:e=>Math.pow(t,e)}function n$(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 p1(t){return(e,n)=>-t(-e,n)}function Kl(t){const e=t(f1,h1),n=e.domain;let r=10,i,o;function a(){return i=n$(r),o=e$(r),n()[0]<0?(i=p1(i),o=p1(o),t(QA,JA)):t(f1,h1),e}return e.base=function(u){return arguments.length?(r=+u,a()):r},e.domain=function(u){return arguments.length?(n(u),a()):n()},e.ticks=u=>{const c=n();let s=c[0],f=c[c.length-1];const h=f<s;h&&([s,f]=[f,s]);let l=i(s),p=i(f),d,g;const m=u==null?10:+u;let y=[];if(!(r%1)&&p-l<m){if(l=Math.floor(l),p=Math.ceil(p),s>0){for(;l<=p;++l)for(d=1;d<r;++d)if(g=l<0?d/o(-l):d*o(l),!(g<s)){if(g>f)break;y.push(g)}}else for(;l<=p;++l)for(d=r-1;d>=1;--d)if(g=l>0?d/o(-l):d*o(l),!(g<s)){if(g>f)break;y.push(g)}y.length*2<m&&(y=$n(s,f,m))}else y=$n(l,p,Math.min(p-l,m)).map(o);return h?y.reverse():y},e.tickFormat=(u,c)=>{if(u==null&&(u=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Mr(c)).precision==null&&(c.trim=!0),c=Si(c)),u===1/0)return c;const s=Math.max(1,r*u/e.ticks().length);return f=>{let h=f/o(Math.round(i(f)));return h*r<r-.5&&(h*=r),h<=s?c(f):""}},e.nice=()=>n(l1(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),e}function d1(){const t=Kl(fu()).domain([1,10]);return t.copy=()=>ji(t,d1()).base(t.base()),he.apply(t,arguments),t}function g1(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function m1(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Ql(t){var e=1,n=t(g1(e),m1(e));return n.constant=function(r){return arguments.length?t(g1(e=+r),m1(e)):e},dn(n)}function y1(){var t=Ql(fu());return t.copy=function(){return ji(t,y1()).constant(t.constant())},he.apply(t,arguments)}function b1(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function r$(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function i$(t){return t<0?-t*t:t*t}function Jl(t){var e=t(Qt,Qt),n=1;function r(){return n===1?t(Qt,Qt):n===.5?t(r$,i$):t(b1(n),b1(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},dn(e)}function hu(){var t=Jl(fu());return t.copy=function(){return ji(t,hu()).exponent(t.exponent())},he.apply(t,arguments),t}function o$(){return hu.apply(null,arguments).exponent(.5)}function v1(t){return Math.sign(t)*t*t}function a$(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function x1(){var t=jl(),e=[0,1],n=!1,r;function i(o){var a=a$(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(v1(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,lu)).map(v1)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return x1(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},he.apply(i,arguments),dn(i)}function _1(){var t=[],e=[],n=[],r;function i(){var a=0,u=Math.max(1,e.length);for(n=new Array(u-1);++a<u;)n[a-1]=t0(t,a/u);return o}function o(a){return a==null||isNaN(a=+a)?r:e[wn(n,a)]}return o.invertExtent=function(a){var u=e.indexOf(a);return u<0?[NaN,NaN]:[u>0?n[u-1]:t[0],u<n.length?n[u]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let u of a)u!=null&&!isNaN(u=+u)&&t.push(u);return t.sort(bt),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return _1().domain(t).range(e).unknown(r)},he.apply(o,arguments)}function w1(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[wn(r,c,0,n)]:o}function u(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return a}return a.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,u()):[t,e]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,u()):i.slice()},a.invertExtent=function(c){var s=i.indexOf(c);return s<0?[NaN,NaN]:s<1?[t,r[0]]:s>=n?[r[n-1],e]:[r[s-1],r[s]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return w1().domain([t,e]).range(i).unknown(o)},he.apply(dn(a),arguments)}function A1(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[wn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return A1().domain(t).range(e).unknown(n)},he.apply(i,arguments)}const tf=new Date,ef=new Date;function St(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),u=i.ceil(o);return o-a<u-o?a:u},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,u)=>{const c=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<a)||!(u>0))return c;let s;do c.push(s=new Date(+o)),e(o,u),t(o);while(s<o&&o<a);return c},i.filter=o=>St(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,u)=>{if(a>=a)if(u<0)for(;++u<=0;)for(;e(a,-1),!o(a););else for(;--u>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(tf.setTime(+o),ef.setTime(+a),t(tf),t(ef),Math.floor(n(tf,ef))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Cr=St(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Cr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?St(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Cr);const $1=Cr.range,Ze=1e3,pe=Ze*60,Ke=pe*60,Qe=Ke*24,nf=Qe*7,M1=Qe*30,rf=Qe*365,Je=St(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Ze)},(t,e)=>(e-t)/Ze,t=>t.getUTCSeconds()),S1=Je.range,pu=St(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ze)},(t,e)=>{t.setTime(+t+e*pe)},(t,e)=>(e-t)/pe,t=>t.getMinutes()),u$=pu.range,du=St(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*pe)},(t,e)=>(e-t)/pe,t=>t.getUTCMinutes()),s$=du.range,gu=St(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ze-t.getMinutes()*pe)},(t,e)=>{t.setTime(+t+e*Ke)},(t,e)=>(e-t)/Ke,t=>t.getHours()),c$=gu.range,mu=St(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Ke)},(t,e)=>(e-t)/Ke,t=>t.getUTCHours()),l$=mu.range,Ir=St(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pe)/Qe,t=>t.getDate()-1),f$=Ir.range,Zi=St(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Qe,t=>t.getUTCDate()-1),h$=Zi.range,of=St(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Qe,t=>Math.floor(t/Qe)),p$=of.range;function Hn(t){return St(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())*pe)/nf)}const Rr=Hn(0),Ki=Hn(1),T1=Hn(2),P1=Hn(3),Xn=Hn(4),D1=Hn(5),k1=Hn(6),E1=Rr.range,d$=Ki.range,g$=T1.range,m$=P1.range,y$=Xn.range,b$=D1.range,v$=k1.range;function Vn(t){return St(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)/nf)}const Fr=Vn(0),Qi=Vn(1),N1=Vn(2),L1=Vn(3),jn=Vn(4),C1=Vn(5),I1=Vn(6),R1=Fr.range,x$=Qi.range,_$=N1.range,w$=L1.range,A$=jn.range,$$=C1.range,M$=I1.range,yu=St(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()),S$=yu.range,bu=St(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()),T$=bu.range,Re=St(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());Re.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:St(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)});const P$=Re.range,Fe=St(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());Fe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:St(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)});const D$=Fe.range;function F1(t,e,n,r,i,o){const a=[[Je,1,Ze],[Je,5,5*Ze],[Je,15,15*Ze],[Je,30,30*Ze],[o,1,pe],[o,5,5*pe],[o,15,15*pe],[o,30,30*pe],[i,1,Ke],[i,3,3*Ke],[i,6,6*Ke],[i,12,12*Ke],[r,1,Qe],[r,2,2*Qe],[n,1,nf],[e,1,M1],[e,3,3*M1],[t,1,rf]];function u(s,f,h){const l=f<s;l&&([s,f]=[f,s]);const p=h&&typeof h.range=="function"?h:c(s,f,h),d=p?p.range(s,+f+1):[];return l?d.reverse():d}function c(s,f,h){const l=Math.abs(f-s)/h,p=To(([,,m])=>m).right(a,l);if(p===a.length)return t.every(Eo(s/rf,f/rf,h));if(p===0)return Cr.every(Math.max(Eo(s,f,h),1));const[d,g]=a[l/a[p-1][2]<a[p][2]/l?p-1:p];return d.every(g)}return[u,c]}const[z1,O1]=F1(Fe,bu,Fr,of,mu,du),[G1,U1]=F1(Re,yu,Rr,Ir,gu,pu);function af(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 uf(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 Ji(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Y1(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,c=t.shortMonths,s=to(i),f=eo(i),h=to(o),l=eo(o),p=to(a),d=eo(a),g=to(u),m=eo(u),y=to(c),_=eo(c),v={a:L,A:C,b:R,B:z,c:null,d:V1,e:V1,f:Q$,g:sM,G:lM,H:j$,I:Z$,j:K$,L:j1,m:J$,M:tM,p:G,q:H,Q:em,s:nm,S:eM,u:nM,U:rM,V:iM,w:oM,W:aM,x:null,X:null,y:uM,Y:cM,Z:fM,"%":tm},x={a:st,A:at,b:ut,B:Tt,c:null,d:K1,e:K1,f:gM,g:MM,G:TM,H:hM,I:pM,j:dM,L:Q1,m:mM,M:yM,p:lt,q:Mt,Q:em,s:nm,S:bM,u:vM,U:xM,V:_M,w:wM,W:AM,x:null,X:null,y:$M,Y:SM,Z:PM,"%":tm},A={a:D,A:S,b:N,B:E,c:T,d:H1,e:H1,f:W$,g:W1,G:q1,H:X1,I:X1,j:U$,L:q$,m:G$,M:Y$,p:$,q:O$,Q:X$,s:V$,S:B$,u:C$,U:I$,V:R$,w:L$,W:F$,x:k,X:P,y:W1,Y:q1,Z:z$,"%":H$};v.x=b(n,v),v.X=b(r,v),v.c=b(e,v),x.x=b(n,x),x.X=b(r,x),x.c=b(e,x);function b(O,Q){return function(it){var F=[],At=-1,ht=0,Jt=O.length,te,Z,$t;for(it instanceof Date||(it=new Date(+it));++At<Jt;)O.charCodeAt(At)===37&&(F.push(O.slice(ht,At)),(Z=B1[te=O.charAt(++At)])!=null?te=O.charAt(++At):Z=te==="e"?" ":"0",($t=Q[te])&&(te=$t(it,Z)),F.push(te),ht=At+1);return F.push(O.slice(ht,At)),F.join("")}}function w(O,Q){return function(it){var F=Ji(1900,void 0,1),At=M(F,O,it+="",0),ht,Jt;if(At!=it.length)return null;if("Q"in F)return new Date(F.Q);if("s"in F)return new Date(F.s*1e3+("L"in F?F.L:0));if(Q&&!("Z"in F)&&(F.Z=0),"p"in F&&(F.H=F.H%12+F.p*12),F.m===void 0&&(F.m="q"in F?F.q:0),"V"in F){if(F.V<1||F.V>53)return null;"w"in F||(F.w=1),"Z"in F?(ht=uf(Ji(F.y,0,1)),Jt=ht.getUTCDay(),ht=Jt>4||Jt===0?Qi.ceil(ht):Qi(ht),ht=Zi.offset(ht,(F.V-1)*7),F.y=ht.getUTCFullYear(),F.m=ht.getUTCMonth(),F.d=ht.getUTCDate()+(F.w+6)%7):(ht=af(Ji(F.y,0,1)),Jt=ht.getDay(),ht=Jt>4||Jt===0?Ki.ceil(ht):Ki(ht),ht=Ir.offset(ht,(F.V-1)*7),F.y=ht.getFullYear(),F.m=ht.getMonth(),F.d=ht.getDate()+(F.w+6)%7)}else("W"in F||"U"in F)&&("w"in F||(F.w="u"in F?F.u%7:"W"in F?1:0),Jt="Z"in F?uf(Ji(F.y,0,1)).getUTCDay():af(Ji(F.y,0,1)).getDay(),F.m=0,F.d="W"in F?(F.w+6)%7+F.W*7-(Jt+5)%7:F.w+F.U*7-(Jt+6)%7);return"Z"in F?(F.H+=F.Z/100|0,F.M+=F.Z%100,uf(F)):af(F)}}function M(O,Q,it,F){for(var At=0,ht=Q.length,Jt=it.length,te,Z;At<ht;){if(F>=Jt)return-1;if(te=Q.charCodeAt(At++),te===37){if(te=Q.charAt(At++),Z=A[te in B1?Q.charAt(At++):te],!Z||(F=Z(O,it,F))<0)return-1}else if(te!=it.charCodeAt(F++))return-1}return F}function $(O,Q,it){var F=s.exec(Q.slice(it));return F?(O.p=f.get(F[0].toLowerCase()),it+F[0].length):-1}function D(O,Q,it){var F=p.exec(Q.slice(it));return F?(O.w=d.get(F[0].toLowerCase()),it+F[0].length):-1}function S(O,Q,it){var F=h.exec(Q.slice(it));return F?(O.w=l.get(F[0].toLowerCase()),it+F[0].length):-1}function N(O,Q,it){var F=y.exec(Q.slice(it));return F?(O.m=_.get(F[0].toLowerCase()),it+F[0].length):-1}function E(O,Q,it){var F=g.exec(Q.slice(it));return F?(O.m=m.get(F[0].toLowerCase()),it+F[0].length):-1}function T(O,Q,it){return M(O,e,Q,it)}function k(O,Q,it){return M(O,n,Q,it)}function P(O,Q,it){return M(O,r,Q,it)}function L(O){return a[O.getDay()]}function C(O){return o[O.getDay()]}function R(O){return c[O.getMonth()]}function z(O){return u[O.getMonth()]}function G(O){return i[+(O.getHours()>=12)]}function H(O){return 1+~~(O.getMonth()/3)}function st(O){return a[O.getUTCDay()]}function at(O){return o[O.getUTCDay()]}function ut(O){return c[O.getUTCMonth()]}function Tt(O){return u[O.getUTCMonth()]}function lt(O){return i[+(O.getUTCHours()>=12)]}function Mt(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var Q=b(O+="",v);return Q.toString=function(){return O},Q},parse:function(O){var Q=w(O+="",!1);return Q.toString=function(){return O},Q},utcFormat:function(O){var Q=b(O+="",x);return Q.toString=function(){return O},Q},utcParse:function(O){var Q=w(O+="",!0);return Q.toString=function(){return O},Q}}}var B1={"-":"",_:" ",0:"0"},Ct=/^\s*\d+/,k$=/^%/,E$=/[\\^$*+?|[\]().{}]/g;function ct(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function N$(t){return t.replace(E$,"\\$&")}function to(t){return new RegExp("^(?:"+t.map(N$).join("|")+")","i")}function eo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function L$(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function C$(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function I$(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function R$(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function F$(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function q1(t,e,n){var r=Ct.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function W1(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function z$(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function O$(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function G$(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function H1(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function U$(t,e,n){var r=Ct.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function X1(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Y$(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function B$(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function q$(t,e,n){var r=Ct.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function W$(t,e,n){var r=Ct.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function H$(t,e,n){var r=k$.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function X$(t,e,n){var r=Ct.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function V$(t,e,n){var r=Ct.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function V1(t,e){return ct(t.getDate(),e,2)}function j$(t,e){return ct(t.getHours(),e,2)}function Z$(t,e){return ct(t.getHours()%12||12,e,2)}function K$(t,e){return ct(1+Ir.count(Re(t),t),e,3)}function j1(t,e){return ct(t.getMilliseconds(),e,3)}function Q$(t,e){return j1(t,e)+"000"}function J$(t,e){return ct(t.getMonth()+1,e,2)}function tM(t,e){return ct(t.getMinutes(),e,2)}function eM(t,e){return ct(t.getSeconds(),e,2)}function nM(t){var e=t.getDay();return e===0?7:e}function rM(t,e){return ct(Rr.count(Re(t)-1,t),e,2)}function Z1(t){var e=t.getDay();return e>=4||e===0?Xn(t):Xn.ceil(t)}function iM(t,e){return t=Z1(t),ct(Xn.count(Re(t),t)+(Re(t).getDay()===4),e,2)}function oM(t){return t.getDay()}function aM(t,e){return ct(Ki.count(Re(t)-1,t),e,2)}function uM(t,e){return ct(t.getFullYear()%100,e,2)}function sM(t,e){return t=Z1(t),ct(t.getFullYear()%100,e,2)}function cM(t,e){return ct(t.getFullYear()%1e4,e,4)}function lM(t,e){var n=t.getDay();return t=n>=4||n===0?Xn(t):Xn.ceil(t),ct(t.getFullYear()%1e4,e,4)}function fM(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ct(e/60|0,"0",2)+ct(e%60,"0",2)}function K1(t,e){return ct(t.getUTCDate(),e,2)}function hM(t,e){return ct(t.getUTCHours(),e,2)}function pM(t,e){return ct(t.getUTCHours()%12||12,e,2)}function dM(t,e){return ct(1+Zi.count(Fe(t),t),e,3)}function Q1(t,e){return ct(t.getUTCMilliseconds(),e,3)}function gM(t,e){return Q1(t,e)+"000"}function mM(t,e){return ct(t.getUTCMonth()+1,e,2)}function yM(t,e){return ct(t.getUTCMinutes(),e,2)}function bM(t,e){return ct(t.getUTCSeconds(),e,2)}function vM(t){var e=t.getUTCDay();return e===0?7:e}function xM(t,e){return ct(Fr.count(Fe(t)-1,t),e,2)}function J1(t){var e=t.getUTCDay();return e>=4||e===0?jn(t):jn.ceil(t)}function _M(t,e){return t=J1(t),ct(jn.count(Fe(t),t)+(Fe(t).getUTCDay()===4),e,2)}function wM(t){return t.getUTCDay()}function AM(t,e){return ct(Qi.count(Fe(t)-1,t),e,2)}function $M(t,e){return ct(t.getUTCFullYear()%100,e,2)}function MM(t,e){return t=J1(t),ct(t.getUTCFullYear()%100,e,2)}function SM(t,e){return ct(t.getUTCFullYear()%1e4,e,4)}function TM(t,e){var n=t.getUTCDay();return t=n>=4||n===0?jn(t):jn.ceil(t),ct(t.getUTCFullYear()%1e4,e,4)}function PM(){return"+0000"}function tm(){return"%"}function em(t){return+t}function nm(t){return Math.floor(+t/1e3)}var zr,sf,rm,vu,cf;im({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 im(t){return zr=Y1(t),sf=zr.format,rm=zr.parse,vu=zr.utcFormat,cf=zr.utcParse,zr}var om="%Y-%m-%dT%H:%M:%S.%LZ";function DM(t){return t.toISOString()}var kM=Date.prototype.toISOString?DM:vu(om);const EM=kM;function NM(t){var e=new Date(t);return isNaN(e)?null:e}var LM=+new Date("2000-01-01T00:00:00.000Z")?NM:cf(om);const CM=LM;function IM(t){return new Date(t)}function RM(t){return t instanceof Date?+t:+new Date(+t)}function lf(t,e,n,r,i,o,a,u,c,s){var f=jl(),h=f.invert,l=f.domain,p=s(".%L"),d=s(":%S"),g=s("%I:%M"),m=s("%I %p"),y=s("%a %d"),_=s("%b %d"),v=s("%B"),x=s("%Y");function A(b){return(c(b)<b?p:u(b)<b?d:a(b)<b?g:o(b)<b?m:r(b)<b?i(b)<b?y:_:n(b)<b?v:x)(b)}return f.invert=function(b){return new Date(h(b))},f.domain=function(b){return arguments.length?l(Array.from(b,RM)):l().map(IM)},f.ticks=function(b){var w=l();return t(w[0],w[w.length-1],b??10)},f.tickFormat=function(b,w){return w==null?A:s(w)},f.nice=function(b){var w=l();return(!b||typeof b.range!="function")&&(b=e(w[0],w[w.length-1],b??10)),b?l(l1(w,b)):f},f.copy=function(){return ji(f,lf(t,e,n,r,i,o,a,u,c,s))},f}function FM(){return he.apply(lf(G1,U1,Re,yu,Rr,Ir,gu,pu,Je,sf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zM(){return he.apply(lf(z1,O1,Fe,bu,Fr,Zi,mu,du,Je,vu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function xu(){var t=0,e=1,n,r,i,o,a=Qt,u=!1,c;function s(h){return h==null||isNaN(h=+h)?c:a(i===0?.5:(h=(o(h)-n)*i,u?Math.max(0,Math.min(1,h)):h))}s.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),s):[t,e]},s.clamp=function(h){return arguments.length?(u=!!h,s):u},s.interpolator=function(h){return arguments.length?(a=h,s):a};function f(h){return function(l){var p,d;return arguments.length?([p,d]=l,a=h(p,d),s):[a(0),a(1)]}}return s.range=f(cn),s.rangeRound=f(ta),s.unknown=function(h){return arguments.length?(c=h,s):c},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),s}}function gn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function am(){var t=dn(xu()(Qt));return t.copy=function(){return gn(t,am())},je.apply(t,arguments)}function um(){var t=Kl(xu()).domain([1,10]);return t.copy=function(){return gn(t,um()).base(t.base())},je.apply(t,arguments)}function sm(){var t=Ql(xu());return t.copy=function(){return gn(t,sm()).constant(t.constant())},je.apply(t,arguments)}function ff(){var t=Jl(xu());return t.copy=function(){return gn(t,ff()).exponent(t.exponent())},je.apply(t,arguments)}function OM(){return ff.apply(null,arguments).exponent(.5)}function cm(){var t=[],e=Qt;function n(r){if(r!=null&&!isNaN(r=+r))return e((wn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(bt),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>oi(t,o/r))},n.copy=function(){return cm(e).domain(t)},je.apply(n,arguments)}function _u(){var t=0,e=.5,n=1,r=1,i,o,a,u,c,s=Qt,f,h=!1,l;function p(g){return isNaN(g=+g)?l:(g=.5+((g=+f(g))-o)*(r*g<r*o?u:c),s(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=f(t=+t),o=f(e=+e),a=f(n=+n),u=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,p):[t,e,n]},p.clamp=function(g){return arguments.length?(h=!!g,p):h},p.interpolator=function(g){return arguments.length?(s=g,p):s};function d(g){return function(m){var y,_,v;return arguments.length?([y,_,v]=m,s=lp(g,[y,_,v]),p):[s(0),s(.5),s(1)]}}return p.range=d(cn),p.rangeRound=d(ta),p.unknown=function(g){return arguments.length?(l=g,p):l},function(g){return f=g,i=g(t),o=g(e),a=g(n),u=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function lm(){var t=dn(_u()(Qt));return t.copy=function(){return gn(t,lm())},je.apply(t,arguments)}function fm(){var t=Kl(_u()).domain([.1,1,10]);return t.copy=function(){return gn(t,fm()).base(t.base())},je.apply(t,arguments)}function hm(){var t=Ql(_u());return t.copy=function(){return gn(t,hm()).constant(t.constant())},je.apply(t,arguments)}function hf(){var t=Jl(_u());return t.copy=function(){return gn(t,hf()).exponent(t.exponent())},je.apply(t,arguments)}function GM(){return hf.apply(null,arguments).exponent(.5)}function tt(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const UM=tt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),YM=tt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),BM=tt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),qM=tt("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),WM=tt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),HM=tt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),XM=tt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),VM=tt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),jM=tt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),ZM=tt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),KM=tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),dt=t=>j0(t[t.length-1]);var pm=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(tt);const QM=dt(pm);var dm=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(tt);const JM=dt(dm);var gm=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(tt);const tS=dt(gm);var mm=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(tt);const eS=dt(mm);var ym=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(tt);const nS=dt(ym);var bm=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(tt);const rS=dt(bm);var vm=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(tt);const iS=dt(vm);var xm=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(tt);const oS=dt(xm);var _m=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(tt);const aS=dt(_m);var wm=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(tt);const uS=dt(wm);var Am=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(tt);const sS=dt(Am);var $m=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(tt);const cS=dt($m);var Mm=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(tt);const lS=dt(Mm);var Sm=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(tt);const fS=dt(Sm);var Tm=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(tt);const hS=dt(Tm);var Pm=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(tt);const pS=dt(Pm);var Dm=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(tt);const dS=dt(Dm);var km=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(tt);const gS=dt(km);var Em=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(tt);const mS=dt(Em);var Nm=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(tt);const yS=dt(Nm);var Lm=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(tt);const bS=dt(Lm);var Cm=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(tt);const vS=dt(Cm);var Im=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(tt);const xS=dt(Im);var Rm=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(tt);const _S=dt(Rm);var Fm=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(tt);const wS=dt(Fm);var zm=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(tt);const AS=dt(zm);var Om=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(tt);const $S=dt(Om);function MS(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const SS=na(be(300,.5,0),be(-240,.5,1));var TS=na(be(-100,.75,.35),be(80,1.5,.8)),PS=na(be(260,.75,.35),be(80,1.5,.8)),wu=be();function DS(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return wu.h=360*t-100,wu.s=1.5-1.5*e,wu.l=.8-.9*e,wu+""}var Au=pr(),kS=Math.PI/3,ES=Math.PI*2/3;function NS(t){var e;return t=(.5-t)*Math.PI,Au.r=255*(e=Math.sin(t))*e,Au.g=255*(e=Math.sin(t+kS))*e,Au.b=255*(e=Math.sin(t+ES))*e,Au+""}function LS(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function $u(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const CS=$u(tt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var IS=$u(tt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),RS=$u(tt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),FS=$u(tt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function J(t){return function(){return t}}const Gm=Math.abs,Gt=Math.atan2,tn=Math.cos,zS=Math.max,Or=Math.min,re=Math.sin,yt=Math.sqrt,Ut=1e-12,mn=Math.PI,Mu=mn/2,yn=2*mn;function OS(t){return t>1?0:t<-1?mn:Math.acos(t)}function Um(t){return t>=1?Mu:t<=-1?-Mu:Math.asin(t)}function no(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new wi(e)}function GS(t){return t.innerRadius}function US(t){return t.outerRadius}function YS(t){return t.startAngle}function BS(t){return t.endAngle}function qS(t){return t&&t.padAngle}function WS(t,e,n,r,i,o,a,u){var c=n-t,s=r-e,f=a-i,h=u-o,l=h*c-f*s;if(!(l*l<Ut))return l=(f*(e-o)-h*(t-i))/l,[t+l*c,e+l*s]}function Su(t,e,n,r,i,o,a){var u=t-n,c=e-r,s=(a?o:-o)/yt(u*u+c*c),f=s*c,h=-s*u,l=t+f,p=e+h,d=n+f,g=r+h,m=(l+d)/2,y=(p+g)/2,_=d-l,v=g-p,x=_*_+v*v,A=i-o,b=l*g-d*p,w=(v<0?-1:1)*yt(zS(0,A*A*x-b*b)),M=(b*v-_*w)/x,$=(-b*_-v*w)/x,D=(b*v+_*w)/x,S=(-b*_+v*w)/x,N=M-m,E=$-y,T=D-m,k=S-y;return N*N+E*E>T*T+k*k&&(M=D,$=S),{cx:M,cy:$,x01:-f,y01:-h,x11:M*(i/A-1),y11:$*(i/A-1)}}function Ym(){var t=GS,e=US,n=J(0),r=null,i=YS,o=BS,a=qS,u=null,c=no(s);function s(){var f,h,l=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-Mu,g=o.apply(this,arguments)-Mu,m=Gm(g-d),y=g>d;if(u||(u=f=c()),p<l&&(h=p,p=l,l=h),!(p>Ut))u.moveTo(0,0);else if(m>yn-Ut)u.moveTo(p*tn(d),p*re(d)),u.arc(0,0,p,d,g,!y),l>Ut&&(u.moveTo(l*tn(g),l*re(g)),u.arc(0,0,l,g,d,y));else{var _=d,v=g,x=d,A=g,b=m,w=m,M=a.apply(this,arguments)/2,$=M>Ut&&(r?+r.apply(this,arguments):yt(l*l+p*p)),D=Or(Gm(p-l)/2,+n.apply(this,arguments)),S=D,N=D,E,T;if($>Ut){var k=Um($/l*re(M)),P=Um($/p*re(M));(b-=k*2)>Ut?(k*=y?1:-1,x+=k,A-=k):(b=0,x=A=(d+g)/2),(w-=P*2)>Ut?(P*=y?1:-1,_+=P,v-=P):(w=0,_=v=(d+g)/2)}var L=p*tn(_),C=p*re(_),R=l*tn(A),z=l*re(A);if(D>Ut){var G=p*tn(v),H=p*re(v),st=l*tn(x),at=l*re(x),ut;if(m<mn)if(ut=WS(L,C,st,at,G,H,R,z)){var Tt=L-ut[0],lt=C-ut[1],Mt=G-ut[0],O=H-ut[1],Q=1/re(OS((Tt*Mt+lt*O)/(yt(Tt*Tt+lt*lt)*yt(Mt*Mt+O*O)))/2),it=yt(ut[0]*ut[0]+ut[1]*ut[1]);S=Or(D,(l-it)/(Q-1)),N=Or(D,(p-it)/(Q+1))}else S=N=0}w>Ut?N>Ut?(E=Su(st,at,L,C,p,N,y),T=Su(G,H,R,z,p,N,y),u.moveTo(E.cx+E.x01,E.cy+E.y01),N<D?u.arc(E.cx,E.cy,N,Gt(E.y01,E.x01),Gt(T.y01,T.x01),!y):(u.arc(E.cx,E.cy,N,Gt(E.y01,E.x01),Gt(E.y11,E.x11),!y),u.arc(0,0,p,Gt(E.cy+E.y11,E.cx+E.x11),Gt(T.cy+T.y11,T.cx+T.x11),!y),u.arc(T.cx,T.cy,N,Gt(T.y11,T.x11),Gt(T.y01,T.x01),!y))):(u.moveTo(L,C),u.arc(0,0,p,_,v,!y)):u.moveTo(L,C),!(l>Ut)||!(b>Ut)?u.lineTo(R,z):S>Ut?(E=Su(R,z,G,H,l,-S,y),T=Su(L,C,st,at,l,-S,y),u.lineTo(E.cx+E.x01,E.cy+E.y01),S<D?u.arc(E.cx,E.cy,S,Gt(E.y01,E.x01),Gt(T.y01,T.x01),!y):(u.arc(E.cx,E.cy,S,Gt(E.y01,E.x01),Gt(E.y11,E.x11),!y),u.arc(0,0,l,Gt(E.cy+E.y11,E.cx+E.x11),Gt(T.cy+T.y11,T.cx+T.x11),y),u.arc(T.cx,T.cy,S,Gt(T.y11,T.x11),Gt(T.y01,T.x01),!y))):u.arc(0,0,l,A,x,y)}if(u.closePath(),f)return u=null,f+""||null}return s.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-mn/2;return[tn(h)*f,re(h)*f]},s.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:J(+f),s):t},s.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:J(+f),s):e},s.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:J(+f),s):n},s.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:J(+f),s):r},s.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:J(+f),s):i},s.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:J(+f),s):o},s.padAngle=function(f){return arguments.length?(a=typeof f=="function"?f:J(+f),s):a},s.context=function(f){return arguments.length?(u=f??null,s):u},s}var HS=Array.prototype.slice;function Tu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Bm(t){this._context=t}Bm.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 Pu(t){return new Bm(t)}function pf(t){return t[0]}function df(t){return t[1]}function Du(t,e){var n=J(!0),r=null,i=Pu,o=null,a=no(u);t=typeof t=="function"?t:t===void 0?pf:J(t),e=typeof e=="function"?e:e===void 0?df:J(e);function u(c){var s,f=(c=Tu(c)).length,h,l=!1,p;for(r==null&&(o=i(p=a())),s=0;s<=f;++s)!(s<f&&n(h=c[s],s,c))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(h,s,c),+e(h,s,c));if(p)return o=null,p+""||null}return u.x=function(c){return arguments.length?(t=typeof c=="function"?c:J(+c),u):t},u.y=function(c){return arguments.length?(e=typeof c=="function"?c:J(+c),u):e},u.defined=function(c){return arguments.length?(n=typeof c=="function"?c:J(!!c),u):n},u.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),u):i},u.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),u):r},u}function qm(t,e,n){var r=null,i=J(!0),o=null,a=Pu,u=null,c=no(s);t=typeof t=="function"?t:t===void 0?pf:J(+t),e=typeof e=="function"?e:J(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?df:J(+n);function s(h){var l,p,d,g=(h=Tu(h)).length,m,y=!1,_,v=new Array(g),x=new Array(g);for(o==null&&(u=a(_=c())),l=0;l<=g;++l){if(!(l<g&&i(m=h[l],l,h))===y)if(y=!y)p=l,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),d=l-1;d>=p;--d)u.point(v[d],x[d]);u.lineEnd(),u.areaEnd()}y&&(v[l]=+t(m,l,h),x[l]=+e(m,l,h),u.point(r?+r(m,l,h):v[l],n?+n(m,l,h):x[l]))}if(_)return u=null,_+""||null}function f(){return Du().defined(i).curve(a).context(o)}return s.x=function(h){return arguments.length?(t=typeof h=="function"?h:J(+h),r=null,s):t},s.x0=function(h){return arguments.length?(t=typeof h=="function"?h:J(+h),s):t},s.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:J(+h),s):r},s.y=function(h){return arguments.length?(e=typeof h=="function"?h:J(+h),n=null,s):e},s.y0=function(h){return arguments.length?(e=typeof h=="function"?h:J(+h),s):e},s.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:J(+h),s):n},s.lineX0=s.lineY0=function(){return f().x(t).y(e)},s.lineY1=function(){return f().x(t).y(n)},s.lineX1=function(){return f().x(r).y(e)},s.defined=function(h){return arguments.length?(i=typeof h=="function"?h:J(!!h),s):i},s.curve=function(h){return arguments.length?(a=h,o!=null&&(u=a(o)),s):a},s.context=function(h){return arguments.length?(h==null?o=u=null:u=a(o=h),s):o},s}function XS(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function VS(t){return t}function Wm(){var t=VS,e=XS,n=null,r=J(0),i=J(yn),o=J(0);function a(u){var c,s=(u=Tu(u)).length,f,h,l=0,p=new Array(s),d=new Array(s),g=+r.apply(this,arguments),m=Math.min(yn,Math.max(-yn,i.apply(this,arguments)-g)),y,_=Math.min(Math.abs(m)/s,o.apply(this,arguments)),v=_*(m<0?-1:1),x;for(c=0;c<s;++c)(x=d[p[c]=c]=+t(u[c],c,u))>0&&(l+=x);for(e!=null?p.sort(function(A,b){return e(d[A],d[b])}):n!=null&&p.sort(function(A,b){return n(u[A],u[b])}),c=0,h=l?(m-s*v)/l:0;c<s;++c,g=y)f=p[c],x=d[f],y=g+(x>0?x*h:0)+v,d[f]={data:u[f],index:c,value:x,startAngle:g,endAngle:y,padAngle:_};return d}return a.value=function(u){return arguments.length?(t=typeof u=="function"?u:J(+u),a):t},a.sortValues=function(u){return arguments.length?(e=u,n=null,a):e},a.sort=function(u){return arguments.length?(n=u,e=null,a):n},a.startAngle=function(u){return arguments.length?(r=typeof u=="function"?u:J(+u),a):r},a.endAngle=function(u){return arguments.length?(i=typeof u=="function"?u:J(+u),a):i},a.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:J(+u),a):o},a}var Hm=gf(Pu);function Xm(t){this._curve=t}Xm.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function gf(t){function e(n){return new Xm(t(n))}return e._curve=t,e}function ro(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(gf(n)):e()._curve},t}function Vm(){return ro(Du().curve(Hm))}function jm(){var t=qm().curve(Hm),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return ro(n())},delete t.lineX0,t.lineEndAngle=function(){return ro(r())},delete t.lineX1,t.lineInnerRadius=function(){return ro(i())},delete t.lineY0,t.lineOuterRadius=function(){return ro(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(gf(a)):e()._curve},t}function io(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Zm{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class jS{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=io(this._x0,this._y0),i=io(this._x0,this._y0=(this._y0+n)/2),o=io(e,this._y0),a=io(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Km(t){return new Zm(t,!0)}function Qm(t){return new Zm(t,!1)}function ZS(t){return new jS(t)}function KS(t){return t.source}function QS(t){return t.target}function ku(t){let e=KS,n=QS,r=pf,i=df,o=null,a=null,u=no(c);function c(){let s;const f=HS.call(arguments),h=e.apply(this,f),l=n.apply(this,f);if(o==null&&(a=t(s=u())),a.lineStart(),f[0]=h,a.point(+r.apply(this,f),+i.apply(this,f)),f[0]=l,a.point(+r.apply(this,f),+i.apply(this,f)),a.lineEnd(),s)return a=null,s+""||null}return c.source=function(s){return arguments.length?(e=s,c):e},c.target=function(s){return arguments.length?(n=s,c):n},c.x=function(s){return arguments.length?(r=typeof s=="function"?s:J(+s),c):r},c.y=function(s){return arguments.length?(i=typeof s=="function"?s:J(+s),c):i},c.context=function(s){return arguments.length?(s==null?o=a=null:a=t(o=s),c):o},c}function JS(){return ku(Km)}function t9(){return ku(Qm)}function e9(){const t=ku(ZS);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const n9=yt(3),Jm={draw(t,e){const n=yt(e+Or(e/28,.75))*.59436,r=n/2,i=r*n9;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},Eu={draw(t,e){const n=yt(e/mn);t.moveTo(n,0),t.arc(0,0,n,0,yn)}},ty={draw(t,e){const n=yt(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()}},ey=yt(1/3),r9=ey*2,ny={draw(t,e){const n=yt(e/r9),r=n*ey;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},ry={draw(t,e){const n=yt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},iy={draw(t,e){const n=yt(e-Or(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},oy={draw(t,e){const n=yt(e),r=-n/2;t.rect(r,r,n,n)}},ay={draw(t,e){const n=yt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},i9=.8908130915292852,uy=re(mn/10)/re(7*mn/10),o9=re(yn/10)*uy,a9=-tn(yn/10)*uy,sy={draw(t,e){const n=yt(e*i9),r=o9*n,i=a9*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=yn*o/5,u=tn(a),c=re(a);t.lineTo(c*n,-u*n),t.lineTo(u*r-c*i,c*r+u*i)}t.closePath()}},mf=yt(3),cy={draw(t,e){const n=-yt(e/(mf*3));t.moveTo(0,n*2),t.lineTo(-mf*n,-n),t.lineTo(mf*n,-n),t.closePath()}},u9=yt(3),ly={draw(t,e){const n=yt(e)*.6824,r=n/2,i=n*u9/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},de=-.5,ge=yt(3)/2,yf=1/yt(12),s9=(yf/2+1)*3,fy={draw(t,e){const n=yt(e/s9),r=n/2,i=n*yf,o=r,a=n*yf+n,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(de*r-ge*i,ge*r+de*i),t.lineTo(de*o-ge*a,ge*o+de*a),t.lineTo(de*u-ge*c,ge*u+de*c),t.lineTo(de*r+ge*i,de*i-ge*r),t.lineTo(de*o+ge*a,de*a-ge*o),t.lineTo(de*u+ge*c,de*c-ge*u),t.closePath()}},bf={draw(t,e){const n=yt(e-Or(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},hy=[Eu,ty,ny,oy,sy,cy,fy],c9=[Eu,iy,bf,ly,Jm,ay,ry];function l9(t,e){let n=null,r=no(i);t=typeof t=="function"?t:J(t||Eu),e=typeof e=="function"?e:J(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:J(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:J(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function bn(){}function Nu(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 Lu(t){this._context=t}Lu.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:Nu(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:Nu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function f9(t){return new Lu(t)}function py(t){this._context=t}py.prototype={areaStart:bn,areaEnd:bn,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:Nu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function h9(t){return new py(t)}function dy(t){this._context=t}dy.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,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Nu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function p9(t){return new dy(t)}function gy(t,e){this._basis=new Lu(t),this._beta=e}gy.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 r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,u=-1,c;++u<=n;)c=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(r+c*o),this._beta*e[u]+(1-this._beta)*(i+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const d9=function t(e){function n(r){return e===1?new Lu(r):new gy(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function Cu(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 vf(t,e){this._context=t,this._k=(1-e)/6}vf.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:Cu(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:Cu(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 g9=function t(e){function n(r){return new vf(r,e)}return n.tension=function(r){return t(+r)},n}(0);function xf(t,e){this._context=t,this._k=(1-e)/6}xf.prototype={areaStart:bn,areaEnd:bn,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:Cu(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 m9=function t(e){function n(r){return new xf(r,e)}return n.tension=function(r){return t(+r)},n}(0);function _f(t,e){this._context=t,this._k=(1-e)/6}_f.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:Cu(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 y9=function t(e){function n(r){return new _f(r,e)}return n.tension=function(r){return t(+r)},n}(0);function wf(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ut){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Ut){var s=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*s+t._x1*t._l23_2a-e*t._l12_2a)/f,a=(a*s+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function my(t,e){this._context=t,this._alpha=e}my.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,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:wf(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 b9=function t(e){function n(r){return e?new my(r,e):new vf(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function yy(t,e){this._context=t,this._alpha=e}yy.prototype={areaStart:bn,areaEnd:bn,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,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=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:wf(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 v9=function t(e){function n(r){return e?new yy(r,e):new xf(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function by(t,e){this._context=t,this._alpha=e}by.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,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wf(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 x9=function t(e){function n(r){return e?new by(r,e):new _f(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function vy(t){this._context=t}vy.prototype={areaStart:bn,areaEnd:bn,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 _9(t){return new vy(t)}function xy(t){return t<0?-1:1}function _y(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(xy(o)+xy(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function wy(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Af(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*e,o-u,a-u*n,o,a)}function Iu(t){this._context=t}Iu.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:Af(this,this._t0,wy(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,Af(this,wy(this,n=_y(this,t,e)),n);break;default:Af(this,this._t0,n=_y(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Ay(t){this._context=new $y(t)}(Ay.prototype=Object.create(Iu.prototype)).point=function(t,e){Iu.prototype.point.call(this,e,t)};function $y(t){this._context=t}$y.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,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function w9(t){return new Iu(t)}function A9(t){return new Ay(t)}function My(t){this._context=t}My.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 r=Sy(t),i=Sy(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(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 Sy(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function $9(t){return new My(t)}function Ru(t,e){this._context=t,this._t=e}Ru.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 M9(t){return new Ru(t,.5)}function S9(t){return new Ru(t,0)}function T9(t){return new Ru(t,1)}function Gr(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,u=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<u;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Ur(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function P9(t,e){return t[e]}function D9(t){const e=[];return e.key=t,e}function k9(){var t=J([]),e=Ur,n=Gr,r=P9;function i(o){var a=Array.from(t.apply(this,arguments),D9),u,c=a.length,s=-1,f;for(const h of o)for(u=0,++s;u<c;++u)(a[u][s]=[0,+r(h,a[u].key,s,o)]).data=h;for(u=0,f=Tu(e(a));u<c;++u)a[f[u]].index=u;return n(a,f),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:J(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:J(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?Ur:typeof o=="function"?o:J(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??Gr,i):n},i}function E9(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}Gr(t,e)}}function N9(t,e){if((c=t.length)>0)for(var n,r=0,i,o,a,u,c,s=t[e[0]].length;r<s;++r)for(a=u=0,n=0;n<c;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=u,i[0]=u+=o):(i[0]=0,i[1]=o)}function L9(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,u=0;a<i;++a)u+=t[a][n][1]||0;r[n][1]+=r[n][0]=-u/2}Gr(t,e)}}function C9(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var u=0,c=0,s=0;u<a;++u){for(var f=t[e[u]],h=f[r][1]||0,l=f[r-1][1]||0,p=(h-l)/2,d=0;d<u;++d){var g=t[e[d]],m=g[r][1]||0,y=g[r-1][1]||0;p+=m-y}c+=h,s+=p*h}i[r-1][1]+=i[r-1][0]=n,c&&(n-=s/c)}i[r-1][1]+=i[r-1][0]=n,Gr(t,e)}}function Ty(t){var e=t.map(I9);return Ur(t).sort(function(n,r){return e[n]-e[r]})}function I9(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function Py(t){var e=t.map(Dy);return Ur(t).sort(function(n,r){return e[n]-e[r]})}function Dy(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function R9(t){return Py(t).reverse()}function F9(t){var e=t.length,n,r,i=t.map(Dy),o=Ty(t),a=0,u=0,c=[],s=[];for(n=0;n<e;++n)r=o[n],a<u?(a+=i[r],c.push(r)):(u+=i[r],s.push(r));return s.reverse().concat(c)}function z9(t){return Ur(t).reverse()}const Fu=t=>()=>t;function O9(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ze(t,e,n){this.k=t,this.x=e,this.y=n}ze.prototype={constructor:ze,scale:function(t){return t===1?this:new ze(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ze(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zu=new ze(1,0,0);ky.prototype=ze.prototype;function ky(t){for(;!t.__zoom;)if(!(t=t.parentNode))return zu;return t.__zoom}function $f(t){t.stopImmediatePropagation()}function oo(t){t.preventDefault(),t.stopImmediatePropagation()}function G9(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function U9(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Ey(){return this.__zoom||zu}function Y9(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function B9(){return navigator.maxTouchPoints||"ontouchstart"in this}function q9(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Ny(){var t=G9,e=U9,n=q9,r=Y9,i=B9,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,c=ap,s=Sn("start","zoom","end"),f,h,l,p=500,d=150,g=0,m=10;function y(T){T.property("__zoom",Ey).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",E).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(T,k,P,L){var C=T.selection?T.selection():T;C.property("__zoom",Ey),T!==C?A(T,k,P,L):C.interrupt().each(function(){b(this,arguments).event(L).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},y.scaleBy=function(T,k,P,L){y.scaleTo(T,function(){var C=this.__zoom.k,R=typeof k=="function"?k.apply(this,arguments):k;return C*R},P,L)},y.scaleTo=function(T,k,P,L){y.transform(T,function(){var C=e.apply(this,arguments),R=this.__zoom,z=P==null?x(C):typeof P=="function"?P.apply(this,arguments):P,G=R.invert(z),H=typeof k=="function"?k.apply(this,arguments):k;return n(v(_(R,H),z,G),C,a)},P,L)},y.translateBy=function(T,k,P,L){y.transform(T,function(){return n(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof P=="function"?P.apply(this,arguments):P),e.apply(this,arguments),a)},null,L)},y.translateTo=function(T,k,P,L,C){y.transform(T,function(){var R=e.apply(this,arguments),z=this.__zoom,G=L==null?x(R):typeof L=="function"?L.apply(this,arguments):L;return n(zu.translate(G[0],G[1]).scale(z.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof P=="function"?-P.apply(this,arguments):-P),R,a)},L,C)};function _(T,k){return k=Math.max(o[0],Math.min(o[1],k)),k===T.k?T:new ze(k,T.x,T.y)}function v(T,k,P){var L=k[0]-P[0]*T.k,C=k[1]-P[1]*T.k;return L===T.x&&C===T.y?T:new ze(T.k,L,C)}function x(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function A(T,k,P,L){T.on("start.zoom",function(){b(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(L).end()}).tween("zoom",function(){var C=this,R=arguments,z=b(C,R).event(L),G=e.apply(C,R),H=P==null?x(G):typeof P=="function"?P.apply(C,R):P,st=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),at=C.__zoom,ut=typeof k=="function"?k.apply(C,R):k,Tt=c(at.invert(H).concat(st/at.k),ut.invert(H).concat(st/ut.k));return function(lt){if(lt===1)lt=ut;else{var Mt=Tt(lt),O=st/Mt[2];lt=new ze(O,H[0]-Mt[0]*O,H[1]-Mt[1]*O)}z.zoom(null,lt)}})}function b(T,k,P){return!P&&T.__zooming||new w(T,k)}function w(T,k){this.that=T,this.args=k,this.active=0,this.sourceEvent=null,this.extent=e.apply(T,k),this.taps=0}w.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,k){return this.mouse&&T!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var k=j(this.that).datum();s.call(T,this.that,new O9(T,{sourceEvent:this.sourceEvent,target:y,type:T,transform:this.that.__zoom,dispatch:s}),k)}};function M(T,...k){if(!t.apply(this,arguments))return;var P=b(this,k).event(T),L=this.__zoom,C=Math.max(o[0],Math.min(o[1],L.k*Math.pow(2,r.apply(this,arguments)))),R=oe(T);if(P.wheel)(P.mouse[0][0]!==R[0]||P.mouse[0][1]!==R[1])&&(P.mouse[1]=L.invert(P.mouse[0]=R)),clearTimeout(P.wheel);else{if(L.k===C)return;P.mouse=[R,L.invert(R)],Cn(this),P.start()}oo(T),P.wheel=setTimeout(z,d),P.zoom("mouse",n(v(_(L,C),P.mouse[0],P.mouse[1]),P.extent,a));function z(){P.wheel=null,P.end()}}function $(T,...k){if(l||!t.apply(this,arguments))return;var P=T.currentTarget,L=b(this,k,!0).event(T),C=j(T.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",st,!0),R=oe(T,P),z=T.clientX,G=T.clientY;Uo(T.view),$f(T),L.mouse=[R,this.__zoom.invert(R)],Cn(this),L.start();function H(at){if(oo(at),!L.moved){var ut=at.clientX-z,Tt=at.clientY-G;L.moved=ut*ut+Tt*Tt>g}L.event(at).zoom("mouse",n(v(L.that.__zoom,L.mouse[0]=oe(at,P),L.mouse[1]),L.extent,a))}function st(at){C.on("mousemove.zoom mouseup.zoom",null),Yo(at.view,L.moved),oo(at),L.event(at).end()}}function D(T,...k){if(t.apply(this,arguments)){var P=this.__zoom,L=oe(T.changedTouches?T.changedTouches[0]:T,this),C=P.invert(L),R=P.k*(T.shiftKey?.5:2),z=n(v(_(P,R),L,C),e.apply(this,k),a);oo(T),u>0?j(this).transition().duration(u).call(A,z,L,T):j(this).call(y.transform,z,L,T)}}function S(T,...k){if(t.apply(this,arguments)){var P=T.touches,L=P.length,C=b(this,k,T.changedTouches.length===L).event(T),R,z,G,H;for($f(T),z=0;z<L;++z)G=P[z],H=oe(G,this),H=[H,this.__zoom.invert(H),G.identifier],C.touch0?!C.touch1&&C.touch0[2]!==H[2]&&(C.touch1=H,C.taps=0):(C.touch0=H,R=!0,C.taps=1+!!f);f&&(f=clearTimeout(f)),R&&(C.taps<2&&(h=H[0],f=setTimeout(function(){f=null},p)),Cn(this),C.start())}}function N(T,...k){if(this.__zooming){var P=b(this,k).event(T),L=T.changedTouches,C=L.length,R,z,G,H;for(oo(T),R=0;R<C;++R)z=L[R],G=oe(z,this),P.touch0&&P.touch0[2]===z.identifier?P.touch0[0]=G:P.touch1&&P.touch1[2]===z.identifier&&(P.touch1[0]=G);if(z=P.that.__zoom,P.touch1){var st=P.touch0[0],at=P.touch0[1],ut=P.touch1[0],Tt=P.touch1[1],lt=(lt=ut[0]-st[0])*lt+(lt=ut[1]-st[1])*lt,Mt=(Mt=Tt[0]-at[0])*Mt+(Mt=Tt[1]-at[1])*Mt;z=_(z,Math.sqrt(lt/Mt)),G=[(st[0]+ut[0])/2,(st[1]+ut[1])/2],H=[(at[0]+Tt[0])/2,(at[1]+Tt[1])/2]}else if(P.touch0)G=P.touch0[0],H=P.touch0[1];else return;P.zoom("touch",n(v(z,G,H),P.extent,a))}}function E(T,...k){if(this.__zooming){var P=b(this,k).event(T),L=T.changedTouches,C=L.length,R,z;for($f(T),l&&clearTimeout(l),l=setTimeout(function(){l=null},p),R=0;R<C;++R)z=L[R],P.touch0&&P.touch0[2]===z.identifier?delete P.touch0:P.touch1&&P.touch1[2]===z.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&(z=oe(z,this),Math.hypot(h[0]-z[0],h[1]-z[1])<m)){var G=j(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return y.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:Fu(+T),y):r},y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:Fu(!!T),y):t},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Fu(!!T),y):i},y.extent=function(T){return arguments.length?(e=typeof T=="function"?T:Fu([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),y):e},y.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],y):[o[0],o[1]]},y.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(T){return arguments.length?(n=T,y):n},y.duration=function(T){return arguments.length?(u=+T,y):u},y.interpolate=function(T){return arguments.length?(c=T,y):c},y.on=function(){var T=s.on.apply(s,arguments);return T===s?y:T},y.clickDistance=function(T){return arguments.length?(g=(T=+T)*T,y):Math.sqrt(g)},y.tapDistance=function(T){return arguments.length?(m=+T,y):m},y}const Ly=Object.freeze(Object.defineProperty({__proto__:null,Adder:Pt,Delaunay:Ic,FormatSpecifier:wa,InternMap:ni,InternSet:An,Node:qn,Path:wi,Voronoi:Vp,ZoomTransform:ze,active:X5,arc:Ym,area:qm,areaRadial:jm,ascending:bt,autoType:y8,axisBottom:Ox,axisLeft:Rs,axisRight:zx,axisTop:s0,bin:Qh,bisect:wn,bisectCenter:Cv,bisectLeft:Lv,bisectRight:Fh,bisector:To,blob:x8,blur:Iv,blur2:zh,blurImage:Rv,brush:a6,brushSelection:r6,brushX:i6,brushY:o6,buffer:w8,chord:s6,chordDirected:l6,chordTranspose:c6,cluster:C7,color:sn,contourDensity:R6,contours:kc,count:Do,create:xw,creator:zo,cross:Bv,csv:M8,csvFormat:a8,csvFormatBody:u8,csvFormatRow:c8,csvFormatRows:s8,csvFormatValue:l8,csvParse:Qp,csvParseRows:o8,cubehelix:be,cumsum:qv,curveBasis:f9,curveBasisClosed:h9,curveBasisOpen:p9,curveBumpX:Km,curveBumpY:Qm,curveBundle:d9,curveCardinal:g9,curveCardinalClosed:m9,curveCardinalOpen:y9,curveCatmullRom:b9,curveCatmullRomClosed:v9,curveCatmullRomOpen:x9,curveLinear:Pu,curveLinearClosed:_9,curveMonotoneX:w9,curveMonotoneY:A9,curveNatural:$9,curveStep:M9,curveStepAfter:T9,curveStepBefore:S9,descending:Ih,deviation:Uh,difference:Sx,disjoint:Tx,dispatch:Sn,drag:x0,dragDisable:Uo,dragEnable:Yo,dsv:$8,dsvFormat:ba,easeBack:Pp,easeBackIn:O5,easeBackInOut:Pp,easeBackOut:G5,easeBounce:xi,easeBounceIn:F5,easeBounceInOut:z5,easeBounceOut:xi,easeCircle:Tp,easeCircleIn:T5,easeCircleInOut:Tp,easeCircleOut:P5,easeCubic:vi,easeCubicIn:v5,easeCubicInOut:vi,easeCubicOut:x5,easeElastic:fa,easeElasticIn:U5,easeElasticInOut:Y5,easeElasticOut:fa,easeExp:Sp,easeExpIn:M5,easeExpInOut:Sp,easeExpOut:S5,easeLinear:m5,easePoly:wp,easePolyIn:_5,easePolyInOut:wp,easePolyOut:w5,easeQuad:_p,easeQuadIn:y5,easeQuadInOut:_p,easeQuadOut:b5,easeSin:Mp,easeSinIn:A5,easeSinInOut:Mp,easeSinOut:$5,every:xx,extent:ei,fcumsum:Hv,filter:wx,flatGroup:Xv,flatRollup:Vv,forceCenter:L8,forceCollide:rd,forceLink:J8,forceManyBody:ud,forceRadial:u4,forceSimulation:ad,forceX:sd,forceY:cd,get format(){return Si},formatDefaultLocale:yd,formatLocale:md,get formatPrefix(){return Uc},formatSpecifier:Mr,fsum:Wv,geoAlbers:Eg,geoAlbersUsa:h7,geoArea:y4,geoAzimuthalEqualArea:p7,geoAzimuthalEqualAreaRaw:Sl,geoAzimuthalEquidistant:d7,geoAzimuthalEquidistantRaw:Tl,geoBounds:_4,geoCentroid:T4,geoCircle:P4,geoClipAntimeridian:ol,geoClipCircle:Jd,geoClipExtent:I4,geoClipRectangle:qa,geoConicConformal:m7,geoConicConformalRaw:Cg,geoConicEqualArea:nu,geoConicEqualAreaRaw:kg,geoConicEquidistant:b7,geoConicEquidistantRaw:Ig,geoContains:Y4,geoDistance:Xa,geoEqualEarth:x7,geoEqualEarthRaw:Pl,geoEquirectangular:y7,geoEquirectangularRaw:Yi,geoGnomonic:_7,geoGnomonicRaw:Dl,geoGraticule:cg,geoGraticule10:B4,geoIdentity:w7,geoInterpolate:q4,geoLength:tg,geoMercator:g7,geoMercatorRaw:Ui,geoNaturalEarth1:A7,geoNaturalEarth1Raw:kl,geoOrthographic:$7,geoOrthographicRaw:El,geoPath:n7,geoProjection:Ie,geoProjectionMutator:$l,geoRotation:Wd,geoStereographic:M7,geoStereographicRaw:Nl,geoStream:xe,geoTransform:r7,geoTransverseMercator:S7,geoTransverseMercatorRaw:Ll,gray:Gw,greatest:Jh,greatestIndex:dx,group:Wh,groupSort:Kv,groups:Hh,hcl:Zo,hierarchy:Cl,histogram:Qh,hsl:Ho,html:E8,image:T8,index:jv,indexes:Zv,interpolate:cn,interpolateArray:Hw,interpolateBasis:W0,interpolateBasisClosed:H0,interpolateBlues:vS,interpolateBrBG:QM,interpolateBuGn:uS,interpolateBuPu:sS,interpolateCividis:MS,interpolateCool:PS,interpolateCubehelix:u3,interpolateCubehelixDefault:SS,interpolateCubehelixLong:na,interpolateDate:Q0,interpolateDiscrete:jw,interpolateGnBu:cS,interpolateGreens:xS,interpolateGreys:_S,interpolateHcl:o3,interpolateHclLong:a3,interpolateHsl:n3,interpolateHslLong:r3,interpolateHue:Zw,interpolateInferno:RS,interpolateLab:i3,interpolateMagma:IS,interpolateNumber:ce,interpolateNumberArray:ec,interpolateObject:J0,interpolateOrRd:lS,interpolateOranges:$S,interpolatePRGn:JM,interpolatePiYG:tS,interpolatePlasma:FS,interpolatePuBu:hS,interpolatePuBuGn:fS,interpolatePuOr:eS,interpolatePuRd:pS,interpolatePurples:wS,interpolateRainbow:DS,interpolateRdBu:nS,interpolateRdGy:rS,interpolateRdPu:dS,interpolateRdYlBu:iS,interpolateRdYlGn:oS,interpolateReds:AS,interpolateRgb:hi,interpolateRgbBasis:j0,interpolateRgbBasisClosed:Ww,interpolateRound:ta,interpolateSinebow:NS,interpolateSpectral:aS,interpolateString:ic,interpolateTransformCss:rp,interpolateTransformSvg:ip,interpolateTurbo:LS,interpolateViridis:CS,interpolateWarm:TS,interpolateYlGn:mS,interpolateYlGnBu:gS,interpolateYlOrBr:yS,interpolateYlOrRd:bS,interpolateZoom:ap,interrupt:Cn,intersection:Px,interval:h3,isoFormat:EM,isoParse:CM,json:D8,lab:jo,lch:Uw,least:px,leastIndex:n0,line:Du,lineRadial:Vm,link:ku,linkHorizontal:JS,linkRadial:e9,linkVertical:t9,local:b0,map:Ax,matcher:Gs,max:ri,maxIndex:Ns,mean:ox,median:ax,medianIndex:ux,merge:Cs,min:No,minIndex:Ls,mode:cx,namespace:ui,namespaces:zs,nice:ks,now:yi,pack:lA,packEnclose:iA,packSiblings:sA,pairs:lx,partition:fA,path:Dc,pathRound:p6,permute:Kh,pie:Wm,piecewise:lp,pointRadial:io,pointer:oe,pointers:ww,polygonArea:TA,polygonCentroid:PA,polygonContains:NA,polygonHull:EA,polygonLength:LA,precisionFixed:bd,precisionPrefix:vd,precisionRound:xd,quadtree:xa,quantile:oi,quantileIndex:e0,quantileSorted:t0,quantize:s3,quickselect:Lo,radialArea:jm,radialLine:Vm,randomBates:FA,randomBernoulli:GA,randomBeta:r1,randomBinomial:i1,randomCauchy:YA,randomExponential:zA,randomGamma:Bl,randomGeometric:n1,randomInt:IA,randomIrwinHall:e1,randomLcg:XA,randomLogNormal:RA,randomLogistic:BA,randomNormal:Yl,randomPareto:OA,randomPoisson:qA,randomUniform:CA,randomWeibull:UA,range:an,rank:hx,reduce:$x,reverse:Mx,rgb:pr,ribbon:_6,ribbonArrow:w6,rollup:Vh,rollups:jh,scaleBand:Hl,scaleDiverging:lm,scaleDivergingLog:fm,scaleDivergingPow:hf,scaleDivergingSqrt:GM,scaleDivergingSymlog:hm,scaleIdentity:c1,scaleImplicit:ql,scaleLinear:Zl,scaleLog:d1,scaleOrdinal:Wl,scalePoint:Xl,scalePow:hu,scaleQuantile:_1,scaleQuantize:w1,scaleRadial:x1,scaleSequential:am,scaleSequentialLog:um,scaleSequentialPow:ff,scaleSequentialQuantile:cm,scaleSequentialSqrt:OM,scaleSequentialSymlog:sm,scaleSqrt:o$,scaleSymlog:y1,scaleThreshold:A1,scaleTime:FM,scaleUtc:zM,scan:gx,schemeAccent:YM,schemeBlues:Cm,schemeBrBG:pm,schemeBuGn:wm,schemeBuPu:Am,schemeCategory10:UM,schemeDark2:BM,schemeGnBu:$m,schemeGreens:Im,schemeGreys:Rm,schemeObservable10:qM,schemeOrRd:Mm,schemeOranges:Om,schemePRGn:dm,schemePaired:WM,schemePastel1:HM,schemePastel2:XM,schemePiYG:gm,schemePuBu:Tm,schemePuBuGn:Sm,schemePuOr:mm,schemePuRd:Pm,schemePurples:Fm,schemeRdBu:ym,schemeRdGy:bm,schemeRdPu:Dm,schemeRdYlBu:vm,schemeRdYlGn:xm,schemeReds:zm,schemeSet1:VM,schemeSet2:jM,schemeSet3:ZM,schemeSpectral:_m,schemeTableau10:KM,schemeYlGn:Em,schemeYlGnBu:km,schemeYlOrBr:Nm,schemeYlOrRd:Lm,select:j,selectAll:Aw,selection:Pn,selector:Oo,selectorAll:Os,shuffle:mx,shuffler:r0,some:_x,sort:Ts,stack:k9,stackOffsetDiverging:N9,stackOffsetExpand:E9,stackOffsetNone:Gr,stackOffsetSilhouette:L9,stackOffsetWiggle:C9,stackOrderAppearance:Ty,stackOrderAscending:Py,stackOrderDescending:R9,stackOrderInsideOut:F9,stackOrderNone:Ur,stackOrderReverse:z9,stratify:gA,style:Tn,subset:kx,sum:yx,superset:o0,svg:N8,symbol:l9,symbolAsterisk:Jm,symbolCircle:Eu,symbolCross:ty,symbolDiamond:ny,symbolDiamond2:ry,symbolPlus:iy,symbolSquare:oy,symbolSquare2:ay,symbolStar:sy,symbolTimes:bf,symbolTriangle:cy,symbolTriangle2:ly,symbolWye:fy,symbolX:bf,symbols:hy,symbolsFill:hy,symbolsStroke:c9,text:va,thresholdFreedmanDiaconis:rx,thresholdScott:ix,thresholdSturges:Es,tickFormat:s1,tickIncrement:Mn,tickStep:Eo,ticks:$n,timeDay:Ir,timeDays:f$,get timeFormat(){return sf},timeFormatDefaultLocale:im,timeFormatLocale:Y1,timeFriday:D1,timeFridays:b$,timeHour:gu,timeHours:c$,timeInterval:St,timeMillisecond:Cr,timeMilliseconds:$1,timeMinute:pu,timeMinutes:u$,timeMonday:Ki,timeMondays:d$,timeMonth:yu,timeMonths:S$,get timeParse(){return rm},timeSaturday:k1,timeSaturdays:v$,timeSecond:Je,timeSeconds:S1,timeSunday:Rr,timeSundays:E1,timeThursday:Xn,timeThursdays:y$,timeTickInterval:U1,timeTicks:G1,timeTuesday:T1,timeTuesdays:g$,timeWednesday:P1,timeWednesdays:m$,timeWeek:Rr,timeWeeks:E1,timeYear:Re,timeYears:P$,timeout:uc,timer:aa,timerFlush:pp,transition:vp,transpose:i0,tree:wA,treemap:AA,treemapBinary:$A,treemapDice:Vi,treemapResquarify:SA,treemapSlice:cu,treemapSliceDice:MA,treemapSquarify:Jg,tsv:S8,tsvFormat:h8,tsvFormatBody:p8,tsvFormatRow:g8,tsvFormatRows:d8,tsvFormatValue:m8,tsvParse:Jp,tsvParseRows:f8,union:Ex,unixDay:of,unixDays:p$,utcDay:Zi,utcDays:h$,get utcFormat(){return vu},utcFriday:C1,utcFridays:$$,utcHour:mu,utcHours:l$,utcMillisecond:Cr,utcMilliseconds:$1,utcMinute:du,utcMinutes:s$,utcMonday:Qi,utcMondays:x$,utcMonth:bu,utcMonths:T$,get utcParse(){return cf},utcSaturday:I1,utcSaturdays:M$,utcSecond:Je,utcSeconds:S1,utcSunday:Fr,utcSundays:R1,utcThursday:jn,utcThursdays:A$,utcTickInterval:O1,utcTicks:z1,utcTuesday:N1,utcTuesdays:_$,utcWednesday:L1,utcWednesdays:w$,utcWeek:Fr,utcWeeks:R1,utcYear:Fe,utcYears:D$,variance:Gh,window:Us,xml:k8,zip:vx,zoom:Ny,zoomIdentity:zu,zoomTransform:ky},Symbol.toStringTag,{value:"Module"}));var Mf=function(t,e){return Mf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Mf(t,e)};function ao(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Mf(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function W9(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(f){try{s(r.next(f))}catch(h){a(h)}}function c(f){try{s(r.throw(f))}catch(h){a(h)}}function s(f){f.done?o(f.value):i(f.value).then(u,c)}s((r=r.apply(t,e||[])).next())})}function Cy(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(f){return c([s,f])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(f){s=[6,f],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Yr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function uo(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Ou(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Br(t){return this instanceof Br?(this.v=t,this):new Br(t)}function H9(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},u("next"),u("throw"),u("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function u(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,y){o.push([p,g,m,y])>1||c(p,g)})},d&&(i[p]=d(i[p])))}function c(p,d){try{s(r[p](d))}catch(g){l(o[0][3],g)}}function s(p){p.value instanceof Br?Promise.resolve(p.value.v).then(f,h):l(o[0][2],p)}function f(p){c("next",p)}function h(p){c("throw",p)}function l(p,d){p(d),o.shift(),o.length&&c(o[0][0],o[0][1])}}function X9(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Yr=="function"?Yr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(u,c){a=t[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(s){o({value:s,done:u})},a)}}typeof SuppressedError=="function"&&SuppressedError;function gt(t){return typeof t=="function"}function Sf(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Tf=Sf(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
6
+ `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
7
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function Pf(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Gu=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=Yr(a),c=u.next();!c.done;c=u.next()){var s=c.value;s.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(gt(f))try{f()}catch(g){o=g instanceof Tf?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=Yr(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{Fy(d)}catch(g){o=o??[],g instanceof Tf?o=Ou(Ou([],uo(o)),uo(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new Tf(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Fy(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Pf(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Pf(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Iy=Gu.EMPTY;function Ry(t){return t instanceof Gu||t&&"closed"in t&&gt(t.remove)&&gt(t.add)&&gt(t.unsubscribe)}function Fy(t){gt(t)?t():t.unsubscribe()}var zy={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Oy={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ou([t,e],uo(n)))},clearTimeout:function(t){var e=Oy.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Gy(t){Oy.setTimeout(function(){throw t})}function Df(){}function Uu(t){t()}var kf=function(t){ao(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Ry(n)&&n.add(r)):r.destination=K9,r}return e.create=function(n,r,i){return new Nf(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Gu),V9=Function.prototype.bind;function Ef(t,e){return V9.call(t,e)}var j9=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Yu(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Yu(r)}else Yu(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Yu(n)}},t}(),Nf=function(t){ao(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(gt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var u;o&&zy.useDeprecatedNextContext?(u=Object.create(n),u.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Ef(n.next,u),error:n.error&&Ef(n.error,u),complete:n.complete&&Ef(n.complete,u)}):a=n}return o.destination=new j9(a),o}return e}(kf);function Yu(t){Gy(t)}function Z9(t){throw t}var K9={closed:!0,next:Df,error:Z9,complete:Df},Lf=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function qr(t){return t}function Q9(t){return t.length===0?qr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var et=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=tT(e)?e:new Nf(e,n,r);return Uu(function(){var a=i,u=a.operator,c=a.source;o.add(u?u.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Uy(n),new n(function(i,o){var a=new Nf({next:function(u){try{e(u)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Lf]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Q9(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Uy(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Uy(t){var e;return(e=t??zy.Promise)!==null&&e!==void 0?e:Promise}function J9(t){return t&&gt(t.next)&&gt(t.error)&&gt(t.complete)}function tT(t){return t&&t instanceof kf||J9(t)&&Ry(t)}function eT(t){return gt(t==null?void 0:t.lift)}function we(t){return function(e){if(eT(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function se(t,e,n,r,i){return new nT(t,e,n,r,i)}var nT=function(t){ao(e,t);function e(n,r,i,o,a,u){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=u,c._next=r?function(s){try{r(s)}catch(f){n.error(f)}}:t.prototype._next,c._error=o?function(s){try{o(s)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(s){n.error(s)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(kf),rT=Sf(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),mt=function(t){ao(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Yy(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new rT},e.prototype.next=function(n){var r=this;Uu(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Yr(r.currentObservers),u=a.next();!u.done;u=a.next()){var c=u.value;c.next(n)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Uu(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Uu(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,u=i.observers;return o||a?Iy:(this.currentObservers=null,u.push(n),new Gu(function(){r.currentObservers=null,Pf(u,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new et;return n.source=this,n},e.create=function(n,r){return new Yy(n,r)},e}(et),Yy=function(t){ao(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Iy},e}(mt),By=new et(function(t){return t.complete()});function iT(t){return t&&gt(t.schedule)}function Cf(t){return t[t.length-1]}function oT(t){return gt(Cf(t))?t.pop():void 0}function qy(t){return iT(Cf(t))?t.pop():void 0}function aT(t,e){return typeof Cf(t)=="number"?t.pop():e}var If=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Wy(t){return gt(t==null?void 0:t.then)}function Hy(t){return gt(t[Lf])}function Xy(t){return Symbol.asyncIterator&&gt(t==null?void 0:t[Symbol.asyncIterator])}function Vy(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function uT(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var jy=uT();function Zy(t){return gt(t==null?void 0:t[jy])}function Ky(t){return H9(this,arguments,function(){var n,r,i,o;return Cy(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Br(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,Br(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Br(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Qy(t){return gt(t==null?void 0:t.getReader)}function en(t){if(t instanceof et)return t;if(t!=null){if(Hy(t))return sT(t);if(If(t))return cT(t);if(Wy(t))return lT(t);if(Xy(t))return Jy(t);if(Zy(t))return fT(t);if(Qy(t))return hT(t)}throw Vy(t)}function sT(t){return new et(function(e){var n=t[Lf]();if(gt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function cT(t){return new et(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function lT(t){return new et(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Gy)})}function fT(t){return new et(function(e){var n,r;try{for(var i=Yr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Jy(t){return new et(function(e){pT(t,e).catch(function(n){return e.error(n)})})}function hT(t){return Jy(Ky(t))}function pT(t,e){var n,r,i,o;return W9(this,void 0,void 0,function(){var a,u;return Cy(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=X9(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=c.sent(),i={error:u},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function vn(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function tb(t,e){return e===void 0&&(e=0),we(function(n,r){n.subscribe(se(r,function(i){return vn(r,t,function(){return r.next(i)},e)},function(){return vn(r,t,function(){return r.complete()},e)},function(i){return vn(r,t,function(){return r.error(i)},e)}))})}function eb(t,e){return e===void 0&&(e=0),we(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function dT(t,e){return en(t).pipe(eb(e),tb(e))}function gT(t,e){return en(t).pipe(eb(e),tb(e))}function mT(t,e){return new et(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function yT(t,e){return new et(function(n){var r;return vn(n,e,function(){r=t[jy](),vn(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(u){n.error(u);return}a?n.complete():n.next(o)},0,!0)}),function(){return gt(r==null?void 0:r.return)&&r.return()}})}function nb(t,e){if(!t)throw new Error("Iterable cannot be null");return new et(function(n){vn(n,e,function(){var r=t[Symbol.asyncIterator]();vn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function bT(t,e){return nb(Ky(t),e)}function vT(t,e){if(t!=null){if(Hy(t))return dT(t,e);if(If(t))return mT(t,e);if(Wy(t))return gT(t,e);if(Xy(t))return nb(t,e);if(Zy(t))return yT(t,e);if(Qy(t))return bT(t,e)}throw Vy(t)}function Rf(t,e){return e?vT(t,e):en(t)}var rb=Sf(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function U(t,e){return we(function(n,r){var i=0;n.subscribe(se(r,function(o){r.next(t.call(e,o,i++))}))})}var xT=Array.isArray;function _T(t,e){return xT(e)?t.apply(void 0,Ou([],uo(e))):t(e)}function ib(t){return U(function(e){return _T(t,e)})}var wT=Array.isArray,AT=Object.getPrototypeOf,$T=Object.prototype,MT=Object.keys;function ST(t){if(t.length===1){var e=t[0];if(wT(e))return{args:e,keys:null};if(TT(e)){var n=MT(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function TT(t){return t&&typeof t=="object"&&AT(t)===$T}function PT(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function q(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=qy(t),r=oT(t),i=ST(t),o=i.args,a=i.keys;if(o.length===0)return Rf([],n);var u=new et(DT(o,n,a?function(c){return PT(a,c)}:qr));return r?u.pipe(ib(r)):u}function DT(t,e,n){return n===void 0&&(n=qr),function(r){ob(e,function(){for(var i=t.length,o=new Array(i),a=i,u=i,c=function(f){ob(e,function(){var h=Rf(t[f],e),l=!1;h.subscribe(se(r,function(p){o[f]=p,l||(l=!0,u--),u||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},s=0;s<i;s++)c(s)},r)}}function ob(t,e,n){t?vn(n,t,e):e()}function kT(t,e,n,r,i,o,a,u){var c=[],s=0,f=0,h=!1,l=function(){h&&!c.length&&!s&&e.complete()},p=function(g){return s<r?d(g):c.push(g)},d=function(g){s++;var m=!1;en(n(g,f++)).subscribe(se(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{s--;for(var y=function(){var _=c.shift();a||d(_)};c.length&&s<r;)y();l()}catch(_){e.error(_)}}))};return t.subscribe(se(e,p,function(){h=!0,l()})),function(){}}function Ff(t,e,n){return n===void 0&&(n=1/0),gt(e)?Ff(function(r,i){return U(function(o,a){return e(r,o,i,a)})(en(t(r,i)))},n):(typeof e=="number"&&(n=e),we(function(r,i){return kT(r,i,t,n)}))}function ET(t){return t===void 0&&(t=1/0),Ff(qr,t)}var NT=["addListener","removeListener"],LT=["addEventListener","removeEventListener"],CT=["on","off"];function zf(t,e,n,r){if(gt(n)&&(r=n,n=void 0),r)return zf(t,e,n).pipe(ib(r));var i=uo(FT(t)?LT.map(function(u){return function(c){return t[u](e,c,n)}}):IT(t)?NT.map(ab(t,e)):RT(t)?CT.map(ab(t,e)):[],2),o=i[0],a=i[1];if(!o&&If(t))return Ff(function(u){return zf(u,e,n)})(en(t));if(!o)throw new TypeError("Invalid event target");return new et(function(u){var c=function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];return u.next(1<s.length?s:s[0])};return o(c),function(){return a(c)}})}function ab(t,e){return function(n){return function(r){return t[n](e,r)}}}function IT(t){return gt(t.addListener)&&gt(t.removeListener)}function RT(t){return gt(t.on)&&gt(t.off)}function FT(t){return gt(t.addEventListener)&&gt(t.removeEventListener)}function Of(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=qy(t),r=aT(t,1/0),i=t;return i.length?i.length===1?en(i[0]):ET(r)(Rf(i,n)):By}function Bu(t,e){return we(function(n,r){var i=0;n.subscribe(se(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function zT(t){return we(function(e,n){var r=!1;e.subscribe(se(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function OT(t){return t<=0?function(){return By}:we(function(e,n){var r=0;e.subscribe(se(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function K(t,e){return e===void 0&&(e=qr),t=t??GT,we(function(n,r){var i,o=!0;n.subscribe(se(r,function(a){var u=e(a);(o||!t(i,u))&&(o=!1,i=u,r.next(a))}))})}function GT(t,e){return t===e}function UT(t){return t===void 0&&(t=YT),we(function(e,n){var r=!1;e.subscribe(se(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function YT(){return new rb}function so(t,e){var n=arguments.length>=2;return function(r){return r.pipe(qr,OT(1),n?zT(e):UT(function(){return new rb}))}}function Y(t,e){return we(function(n,r){var i=null,o=0,a=!1,u=function(){return a&&!i&&r.complete()};n.subscribe(se(r,function(c){i==null||i.unsubscribe();var s=0,f=o++;en(t(c,f)).subscribe(i=se(r,function(h){return r.next(e?e(c,h,f,s++):h)},function(){i=null,u()}))},function(){a=!0,u()}))})}function I(t){return we(function(e,n){en(t).subscribe(se(n,function(){return n.complete()},Df)),!n.closed&&e.subscribe(n)})}const Wr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function qu(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function BT(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ub(t){let e,n,r;t.length!==2?(e=qu,n=(u,c)=>qu(t(u),c),r=(u,c)=>t(u)-c):(e=t===qu||t===BT?t:qT,n=t,r=t);function i(u,c,s=0,f=u.length){if(s<f){if(e(c,c)!==0)return f;do{const h=s+f>>>1;n(u[h],c)<0?s=h+1:f=h}while(s<f)}return s}function o(u,c,s=0,f=u.length){if(s<f){if(e(c,c)!==0)return f;do{const h=s+f>>>1;n(u[h],c)<=0?s=h+1:f=h}while(s<f)}return s}function a(u,c,s=0,f=u.length){const h=i(u,c,s,f-1);return h>s&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:o}}function qT(){return 0}function WT(t){return t===null?NaN:+t}const HT=ub(qu),sb=HT.right;ub(WT).center;class cb extends Map{constructor(e,n=jT){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(lb(this,e))}has(e){return super.has(lb(this,e))}set(e,n){return super.set(XT(this,e),n)}delete(e){return super.delete(VT(this,e))}}function lb({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function XT({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function VT({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function jT(t){return t!==null&&typeof t=="object"?t.valueOf():t}const ZT=Math.sqrt(50),KT=Math.sqrt(10),QT=Math.sqrt(2);function Wu(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=ZT?10:o>=KT?5:o>=QT?2:1;let u,c,s;return i<0?(s=Math.pow(10,-i)/a,u=Math.round(t*s),c=Math.round(e*s),u/s<t&&++u,c/s>e&&--c,s=-s):(s=Math.pow(10,i)*a,u=Math.round(t/s),c=Math.round(e/s),u*s<t&&++u,c*s>e&&--c),c<u&&.5<=n&&n<2?Wu(t,e,n*2):[u,c,s]}function JT(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Wu(e,t,n):Wu(t,e,n);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(r)if(a<0)for(let s=0;s<u;++s)c[s]=(o-s)/-a;else for(let s=0;s<u;++s)c[s]=(o-s)*a;else if(a<0)for(let s=0;s<u;++s)c[s]=(i+s)/-a;else for(let s=0;s<u;++s)c[s]=(i+s)*a;return c}function Gf(t,e,n){return e=+e,t=+t,n=+n,Wu(t,e,n)[2]}function tP(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Gf(e,t,n):Gf(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function eP(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var nP={value:()=>{}};function fb(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Hu(n)}function Hu(t){this._=t}function rP(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Hu.prototype=fb.prototype={constructor:Hu,on:function(t,e){var n=this._,r=rP(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=iP(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=hb(n[i],t.name,e);else if(e==null)for(i in n)n[i]=hb(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Hu(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function iP(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function hb(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=nP,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Uf="http://www.w3.org/1999/xhtml";const pb={svg:"http://www.w3.org/2000/svg",xhtml:Uf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xu(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),pb.hasOwnProperty(e)?{space:pb[e],local:t}:t}function oP(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Uf&&e.documentElement.namespaceURI===Uf?e.createElement(t):e.createElementNS(n,t)}}function aP(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function db(t){var e=Xu(t);return(e.local?aP:oP)(e)}function uP(){}function Yf(t){return t==null?uP:function(){return this.querySelector(t)}}function sP(t){typeof t!="function"&&(t=Yf(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=new Array(a),c,s,f=0;f<a;++f)(c=o[f])&&(s=t.call(c,c.__data__,f,o))&&("__data__"in c&&(s.__data__=c.__data__),u[f]=s);return new Ae(r,this._parents)}function cP(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function lP(){return[]}function gb(t){return t==null?lP:function(){return this.querySelectorAll(t)}}function fP(t){return function(){return cP(t.apply(this,arguments))}}function hP(t){typeof t=="function"?t=fP(t):t=gb(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&(r.push(t.call(c,c.__data__,s,a)),i.push(c));return new Ae(r,i)}function mb(t){return function(){return this.matches(t)}}function yb(t){return function(e){return e.matches(t)}}var pP=Array.prototype.find;function dP(t){return function(){return pP.call(this.children,t)}}function gP(){return this.firstElementChild}function mP(t){return this.select(t==null?gP:dP(typeof t=="function"?t:yb(t)))}var yP=Array.prototype.filter;function bP(){return Array.from(this.children)}function vP(t){return function(){return yP.call(this.children,t)}}function xP(t){return this.selectAll(t==null?bP:vP(typeof t=="function"?t:yb(t)))}function _P(t){typeof t!="function"&&(t=mb(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new Ae(r,this._parents)}function bb(t){return new Array(t.length)}function wP(){return new Ae(this._enter||this._groups.map(bb),this._parents)}function Vu(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Vu.prototype={constructor:Vu,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 AP(t){return function(){return t}}function $P(t,e,n,r,i,o){for(var a=0,u,c=e.length,s=o.length;a<s;++a)(u=e[a])?(u.__data__=o[a],r[a]=u):n[a]=new Vu(t,o[a]);for(;a<c;++a)(u=e[a])&&(i[a]=u)}function MP(t,e,n,r,i,o,a){var u,c,s=new Map,f=e.length,h=o.length,l=new Array(f),p;for(u=0;u<f;++u)(c=e[u])&&(l[u]=p=a.call(c,c.__data__,u,e)+"",s.has(p)?i[u]=c:s.set(p,c));for(u=0;u<h;++u)p=a.call(t,o[u],u,o)+"",(c=s.get(p))?(r[u]=c,c.__data__=o[u],s.delete(p)):n[u]=new Vu(t,o[u]);for(u=0;u<f;++u)(c=e[u])&&s.get(l[u])===c&&(i[u]=c)}function SP(t){return t.__data__}function TP(t,e){if(!arguments.length)return Array.from(this,SP);var n=e?MP:$P,r=this._parents,i=this._groups;typeof t!="function"&&(t=AP(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),s=0;s<o;++s){var f=r[s],h=i[s],l=h.length,p=PP(t.call(f,f&&f.__data__,s,r)),d=p.length,g=u[s]=new Array(d),m=a[s]=new Array(d),y=c[s]=new Array(l);n(f,h,g,m,y,p,e);for(var _=0,v=0,x,A;_<d;++_)if(x=g[_]){for(_>=v&&(v=_+1);!(A=m[v])&&++v<d;);x._next=A||null}}return a=new Ae(a,r),a._enter=u,a._exit=c,a}function PP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function DP(){return new Ae(this._exit||this._groups.map(bb),this._parents)}function kP(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function EP(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var s=n[c],f=r[c],h=s.length,l=u[c]=new Array(h),p,d=0;d<h;++d)(p=s[d]||f[d])&&(l[d]=p);for(;c<i;++c)u[c]=n[c];return new Ae(u,this._parents)}function NP(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function LP(t){t||(t=CP);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],u=a.length,c=i[o]=new Array(u),s,f=0;f<u;++f)(s=a[f])&&(c[f]=s);c.sort(e)}return new Ae(i,this._parents).order()}function CP(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function IP(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function RP(){return Array.from(this)}function FP(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function zP(){let t=0;for(const e of this)++t;return t}function OP(){return!this.node()}function GP(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,u;o<a;++o)(u=i[o])&&t.call(u,u.__data__,o,i);return this}function UP(t){return function(){this.removeAttribute(t)}}function YP(t){return function(){this.removeAttributeNS(t.space,t.local)}}function BP(t,e){return function(){this.setAttribute(t,e)}}function qP(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function WP(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function HP(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 XP(t,e){var n=Xu(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?YP:UP:typeof e=="function"?n.local?HP:WP:n.local?qP:BP)(n,e))}function vb(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function VP(t){return function(){this.style.removeProperty(t)}}function jP(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ZP(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function KP(t,e,n){return arguments.length>1?this.each((e==null?VP:typeof e=="function"?ZP:jP)(t,e,n??"")):Hr(this.node(),t)}function Hr(t,e){return t.style.getPropertyValue(e)||vb(t).getComputedStyle(t,null).getPropertyValue(e)}function QP(t){return function(){delete this[t]}}function JP(t,e){return function(){this[t]=e}}function tD(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function eD(t,e){return arguments.length>1?this.each((e==null?QP:typeof e=="function"?tD:JP)(t,e)):this.node()[t]}function xb(t){return t.trim().split(/^|\s+/)}function Bf(t){return t.classList||new _b(t)}function _b(t){this._node=t,this._names=xb(t.getAttribute("class")||"")}_b.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 wb(t,e){for(var n=Bf(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ab(t,e){for(var n=Bf(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function nD(t){return function(){wb(this,t)}}function rD(t){return function(){Ab(this,t)}}function iD(t,e){return function(){(e.apply(this,arguments)?wb:Ab)(this,t)}}function oD(t,e){var n=xb(t+"");if(arguments.length<2){for(var r=Bf(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?iD:e?nD:rD)(n,e))}function aD(){this.textContent=""}function uD(t){return function(){this.textContent=t}}function sD(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function cD(t){return arguments.length?this.each(t==null?aD:(typeof t=="function"?sD:uD)(t)):this.node().textContent}function lD(){this.innerHTML=""}function fD(t){return function(){this.innerHTML=t}}function hD(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function pD(t){return arguments.length?this.each(t==null?lD:(typeof t=="function"?hD:fD)(t)):this.node().innerHTML}function dD(){this.nextSibling&&this.parentNode.appendChild(this)}function gD(){return this.each(dD)}function mD(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yD(){return this.each(mD)}function bD(t){var e=typeof t=="function"?t:db(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function vD(){return null}function xD(t,e){var n=typeof t=="function"?t:db(t),r=e==null?vD:typeof e=="function"?e:Yf(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function _D(){var t=this.parentNode;t&&t.removeChild(this)}function wD(){return this.each(_D)}function AD(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function $D(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function MD(t){return this.select(t?$D:AD)}function SD(t){return arguments.length?this.property("__data__",t):this.node().__data__}function TD(t){return function(e){t.call(this,e,this.__data__)}}function PD(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function DD(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function kD(t,e,n){return function(){var r=this.__on,i,o=TD(e);if(r){for(var a=0,u=r.length;a<u;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function ED(t,e,n){var r=PD(t+""),i,o=r.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,s=u.length,f;c<s;++c)for(i=0,f=u[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=e?kD:DD,i=0;i<o;++i)this.each(u(r[i],e,n));return this}function $b(t,e,n){var r=vb(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ND(t,e){return function(){return $b(this,t,e)}}function LD(t,e){return function(){return $b(this,t,e.apply(this,arguments))}}function CD(t,e){return this.each((typeof e=="function"?LD:ND)(t,e))}function*ID(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var RD=[null];function Ae(t,e){this._groups=t,this._parents=e}function co(){return new Ae([[document.documentElement]],RD)}function FD(){return this}Ae.prototype=co.prototype={constructor:Ae,select:sP,selectAll:hP,selectChild:mP,selectChildren:xP,filter:_P,data:TP,enter:wP,exit:DP,join:kP,merge:EP,selection:FD,order:NP,sort:LP,call:IP,nodes:RP,node:FP,size:zP,empty:OP,each:GP,attr:XP,style:KP,property:eD,classed:oD,text:cD,html:pD,raise:gD,lower:yD,append:bD,insert:xD,remove:wD,clone:MD,datum:SD,on:ED,dispatch:CD,[Symbol.iterator]:ID};function qf(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Mb(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function lo(){}var fo=.7,ju=1/fo,Xr="\\s*([+-]?\\d+)\\s*",ho="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zD=/^#([0-9a-f]{3,8})$/,OD=new RegExp(`^rgb\\(${Xr},${Xr},${Xr}\\)$`),GD=new RegExp(`^rgb\\(${Oe},${Oe},${Oe}\\)$`),UD=new RegExp(`^rgba\\(${Xr},${Xr},${Xr},${ho}\\)$`),YD=new RegExp(`^rgba\\(${Oe},${Oe},${Oe},${ho}\\)$`),BD=new RegExp(`^hsl\\(${ho},${Oe},${Oe}\\)$`),qD=new RegExp(`^hsla\\(${ho},${Oe},${Oe},${ho}\\)$`),Sb={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};qf(lo,Zn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Tb,formatHex:Tb,formatHex8:WD,formatHsl:HD,formatRgb:Pb,toString:Pb});function Tb(){return this.rgb().formatHex()}function WD(){return this.rgb().formatHex8()}function HD(){return Lb(this).formatHsl()}function Pb(){return this.rgb().formatRgb()}function Zn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=zD.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Db(e):n===3?new ie(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Zu(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Zu(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=OD.exec(t))?new ie(e[1],e[2],e[3],1):(e=GD.exec(t))?new ie(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=UD.exec(t))?Zu(e[1],e[2],e[3],e[4]):(e=YD.exec(t))?Zu(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=BD.exec(t))?Nb(e[1],e[2]/100,e[3]/100,1):(e=qD.exec(t))?Nb(e[1],e[2]/100,e[3]/100,e[4]):Sb.hasOwnProperty(t)?Db(Sb[t]):t==="transparent"?new ie(NaN,NaN,NaN,0):null}function Db(t){return new ie(t>>16&255,t>>8&255,t&255,1)}function Zu(t,e,n,r){return r<=0&&(t=e=n=NaN),new ie(t,e,n,r)}function XD(t){return t instanceof lo||(t=Zn(t)),t?(t=t.rgb(),new ie(t.r,t.g,t.b,t.opacity)):new ie}function Wf(t,e,n,r){return arguments.length===1?XD(t):new ie(t,e,n,r??1)}function ie(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}qf(ie,Wf,Mb(lo,{brighter(t){return t=t==null?ju:Math.pow(ju,t),new ie(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?fo:Math.pow(fo,t),new ie(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ie(Kn(this.r),Kn(this.g),Kn(this.b),Ku(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:kb,formatHex:kb,formatHex8:VD,formatRgb:Eb,toString:Eb}));function kb(){return`#${Qn(this.r)}${Qn(this.g)}${Qn(this.b)}`}function VD(){return`#${Qn(this.r)}${Qn(this.g)}${Qn(this.b)}${Qn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Eb(){const t=Ku(this.opacity);return`${t===1?"rgb(":"rgba("}${Kn(this.r)}, ${Kn(this.g)}, ${Kn(this.b)}${t===1?")":`, ${t})`}`}function Ku(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Kn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Qn(t){return t=Kn(t),(t<16?"0":"")+t.toString(16)}function Nb(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new $e(t,e,n,r)}function Lb(t){if(t instanceof $e)return new $e(t.h,t.s,t.l,t.opacity);if(t instanceof lo||(t=Zn(t)),!t)return new $e;if(t instanceof $e)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,c=(o+i)/2;return u?(e===o?a=(n-r)/u+(n<r)*6:n===o?a=(r-e)/u+2:a=(e-n)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new $e(a,u,c,t.opacity)}function jD(t,e,n,r){return arguments.length===1?Lb(t):new $e(t,e,n,r??1)}function $e(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}qf($e,jD,Mb(lo,{brighter(t){return t=t==null?ju:Math.pow(ju,t),new $e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?fo:Math.pow(fo,t),new $e(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,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ie(Hf(t>=240?t-240:t+120,i,r),Hf(t,i,r),Hf(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new $e(Cb(this.h),Qu(this.s),Qu(this.l),Ku(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=Ku(this.opacity);return`${t===1?"hsl(":"hsla("}${Cb(this.h)}, ${Qu(this.s)*100}%, ${Qu(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Cb(t){return t=(t||0)%360,t<0?t+360:t}function Qu(t){return Math.max(0,Math.min(1,t||0))}function Hf(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 Xf=t=>()=>t;function ZD(t,e){return function(n){return t+n*e}}function KD(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function QD(t){return(t=+t)==1?Ib:function(e,n){return n-e?KD(e,n,t):Xf(isNaN(e)?n:e)}}function Ib(t,e){var n=e-t;return n?ZD(t,n):Xf(isNaN(t)?e:t)}const Ju=function t(e){var n=QD(e);function r(i,o){var a=n((i=Wf(i)).r,(o=Wf(o)).r),u=n(i.g,o.g),c=n(i.b,o.b),s=Ib(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=u(f),i.b=c(f),i.opacity=s(f),i+""}}return r.gamma=t,r}(1);function JD(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function tk(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ek(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Zf(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(u){for(a=0;a<r;++a)o[a]=i[a](u);return o}}function nk(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Me(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function rk(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Zf(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Vf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jf=new RegExp(Vf.source,"g");function ik(t){return function(){return t}}function ok(t){return function(e){return t(e)+""}}function Rb(t,e){var n=Vf.lastIndex=jf.lastIndex=0,r,i,o,a=-1,u=[],c=[];for(t=t+"",e=e+"";(r=Vf.exec(t))&&(i=jf.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,c.push({i:a,x:Me(r,i)})),n=jf.lastIndex;return n<e.length&&(o=e.slice(n),u[a]?u[a]+=o:u[++a]=o),u.length<2?c[0]?ok(c[0].x):ik(e):(e=c.length,function(s){for(var f=0,h;f<e;++f)u[(h=c[f]).i]=h.x(s);return u.join("")})}function Zf(t,e){var n=typeof e,r;return e==null||n==="boolean"?Xf(e):(n==="number"?Me:n==="string"?(r=Zn(e))?(e=r,Ju):Rb:e instanceof Zn?Ju:e instanceof Date?nk:tk(e)?JD:Array.isArray(e)?ek:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?rk:Me)(t,e)}function ak(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Fb=180/Math.PI,zb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ob(t,e,n,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,c/=u),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Fb,skewX:Math.atan(c)*Fb,scaleX:a,scaleY:u}}var ts;function uk(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?zb:Ob(e.a,e.b,e.c,e.d,e.e,e.f)}function sk(t){return t==null||(ts||(ts=document.createElementNS("http://www.w3.org/2000/svg","g")),ts.setAttribute("transform",t),!(t=ts.transform.baseVal.consolidate()))?zb:(t=t.matrix,Ob(t.a,t.b,t.c,t.d,t.e,t.f))}function Gb(t,e,n,r){function i(s){return s.length?s.pop()+" ":""}function o(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:Me(s,h)},{i:g-2,x:Me(f,l)})}else(h||l)&&p.push("translate("+h+e+l+n)}function a(s,f,h,l){s!==f?(s-f>180?f+=360:f-s>180&&(s+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:Me(s,f)})):f&&h.push(i(h)+"rotate("+f+r)}function u(s,f,h,l){s!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:Me(s,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Me(s,h)},{i:g-2,x:Me(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(s,f){var h=[],l=[];return s=t(s),f=t(f),o(s.translateX,s.translateY,f.translateX,f.translateY,h,l),a(s.rotate,f.rotate,h,l),u(s.skewX,f.skewX,h,l),c(s.scaleX,s.scaleY,f.scaleX,f.scaleY,h,l),s=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var ck=Gb(uk,"px, ","px)","deg)"),lk=Gb(sk,", ",")",")"),Vr=0,po=0,go=0,Ub=1e3,es,mo,ns=0,Jn=0,rs=0,yo=typeof performance=="object"&&performance.now?performance:Date,Yb=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Kf(){return Jn||(Yb(fk),Jn=yo.now()+rs)}function fk(){Jn=0}function is(){this._call=this._time=this._next=null}is.prototype=Bb.prototype={constructor:is,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Kf():+n)+(e==null?0:+e),!this._next&&mo!==this&&(mo?mo._next=this:es=this,mo=this),this._call=t,this._time=n,Qf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qf())}};function Bb(t,e,n){var r=new is;return r.restart(t,e,n),r}function hk(){Kf(),++Vr;for(var t=es,e;t;)(e=Jn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Vr}function qb(){Jn=(ns=yo.now())+rs,Vr=po=0;try{hk()}finally{Vr=0,dk(),Jn=0}}function pk(){var t=yo.now(),e=t-ns;e>Ub&&(rs-=e,ns=t)}function dk(){for(var t,e=es,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:es=n);mo=t,Qf(r)}function Qf(t){if(!Vr){po&&(po=clearTimeout(po));var e=t-Jn;e>24?(t<1/0&&(po=setTimeout(qb,t-yo.now()-rs)),go&&(go=clearInterval(go))):(go||(ns=yo.now(),go=setInterval(pk,Ub)),Vr=1,Yb(qb))}}function Wb(t,e,n){var r=new is;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var gk=fb("start","end","cancel","interrupt"),mk=[],Hb=0,Xb=1,Jf=2,os=3,Vb=4,th=5,as=6;function us(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;yk(t,n,{name:e,index:r,group:i,on:gk,tween:mk,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Hb})}function eh(t,e){var n=Se(t,e);if(n.state>Hb)throw new Error("too late; already scheduled");return n}function Ge(t,e){var n=Se(t,e);if(n.state>os)throw new Error("too late; already running");return n}function Se(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function yk(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Bb(o,0,n.time);function o(s){n.state=Xb,n.timer.restart(a,n.delay,n.time),n.delay<=s&&a(s-n.delay)}function a(s){var f,h,l,p;if(n.state!==Xb)return c();for(f in r)if(p=r[f],p.name===n.name){if(p.state===os)return Wb(a);p.state===Vb?(p.state=as,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=as,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(Wb(function(){n.state===os&&(n.state=Vb,n.timer.restart(u,n.delay,n.time),u(s))}),n.state=Jf,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Jf){for(n.state=os,i=new Array(l=n.tween.length),f=0,h=-1;f<l;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function u(s){for(var f=s<n.duration?n.ease.call(null,s/n.duration):(n.timer.restart(c),n.state=th,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);n.state===th&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=as,n.timer.stop(),delete r[e];for(var s in r)return;delete t.__transition}}function bk(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Jf&&r.state<th,r.state=as,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function vk(t){return this.each(function(){bk(this,t)})}function xk(t,e){var n,r;return function(){var i=Ge(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function _k(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ge(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},c=0,s=i.length;c<s;++c)if(i[c].name===e){i[c]=u;break}c===s&&i.push(u)}o.tween=i}}function wk(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Se(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?xk:_k)(n,t,e))}function nh(t,e,n){var r=t._id;return t.each(function(){var i=Ge(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Se(i,r).value[e]}}function jb(t,e){var n;return(typeof e=="number"?Me:e instanceof Zn?Ju:(n=Zn(e))?(e=n,Ju):Rb)(t,e)}function Ak(t){return function(){this.removeAttribute(t)}}function $k(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mk(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function Sk(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function Tk(t,e,n){var r,i,o;return function(){var a,u=n(this),c;return u==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u)))}}function Pk(t,e,n){var r,i,o;return function(){var a,u=n(this),c;return u==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u)))}}function Dk(t,e){var n=Xu(t),r=n==="transform"?lk:jb;return this.attrTween(t,typeof e=="function"?(n.local?Pk:Tk)(n,r,nh(this,"attr."+t,e)):e==null?(n.local?$k:Ak)(n):(n.local?Sk:Mk)(n,r,e))}function kk(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ek(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Nk(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Ek(t,o)),n}return i._value=e,i}function Lk(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&kk(t,o)),n}return i._value=e,i}function Ck(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 r=Xu(t);return this.tween(n,(r.local?Nk:Lk)(r,e))}function Ik(t,e){return function(){eh(this,t).delay=+e.apply(this,arguments)}}function Rk(t,e){return e=+e,function(){eh(this,t).delay=e}}function Fk(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ik:Rk)(e,t)):Se(this.node(),e).delay}function zk(t,e){return function(){Ge(this,t).duration=+e.apply(this,arguments)}}function Ok(t,e){return e=+e,function(){Ge(this,t).duration=e}}function Gk(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?zk:Ok)(e,t)):Se(this.node(),e).duration}function Uk(t,e){if(typeof e!="function")throw new Error;return function(){Ge(this,t).ease=e}}function Yk(t){var e=this._id;return arguments.length?this.each(Uk(e,t)):Se(this.node(),e).ease}function Bk(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ge(this,t).ease=n}}function qk(t){if(typeof t!="function")throw new Error;return this.each(Bk(this._id,t))}function Wk(t){typeof t!="function"&&(t=mb(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new nn(r,this._parents,this._name,this._id)}function Hk(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),l,p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new nn(a,this._parents,this._name,this._id)}function Xk(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 Vk(t,e,n){var r,i,o=Xk(e)?eh:Ge;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}function jk(t,e){var n=this._id;return arguments.length<2?Se(this.node(),n).on.on(t):this.each(Vk(n,t,e))}function Zk(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Kk(){return this.on("end.remove",Zk(this._id))}function Qk(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Yf(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u=r[a],c=u.length,s=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=u[l])&&(h=t.call(f,f.__data__,l,u))&&("__data__"in f&&(h.__data__=f.__data__),s[l]=h,us(s[l],e,n,l,s,Se(f,n)));return new nn(o,this._parents,e,n)}function Jk(t){var e=this._name,n=this._id;typeof t!="function"&&(t=gb(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var c=r[u],s=c.length,f,h=0;h<s;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=Se(f,n),g=0,m=l.length;g<m;++g)(p=l[g])&&us(p,e,n,g,l,d);o.push(l),a.push(f)}return new nn(o,a,e,n)}var tE=co.prototype.constructor;function eE(){return new tE(this._groups,this._parents)}function nE(t,e){var n,r,i;return function(){var o=Hr(this,t),a=(this.style.removeProperty(t),Hr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Zb(t){return function(){this.style.removeProperty(t)}}function rE(t,e,n){var r,i=n+"",o;return function(){var a=Hr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function iE(t,e,n){var r,i,o;return function(){var a=Hr(this,t),u=n(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(t),Hr(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u))}}function oE(t,e){var n,r,i,o="style."+e,a="end."+o,u;return function(){var c=Ge(this,t),s=c.on,f=c.value[o]==null?u||(u=Zb(e)):void 0;(s!==n||i!==f)&&(r=(n=s).copy()).on(a,i=f),c.on=r}}function aE(t,e,n){var r=(t+="")=="transform"?ck:jb;return e==null?this.styleTween(t,nE(t,r)).on("end.style."+t,Zb(t)):typeof e=="function"?this.styleTween(t,iE(t,r,nh(this,"style."+t,e))).each(oE(this._id,t)):this.styleTween(t,rE(t,r,e),n).on("end.style."+t,null)}function uE(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function sE(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&uE(t,a,n)),r}return o._value=e,o}function cE(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,sE(t,e,n??""))}function lE(t){return function(){this.textContent=t}}function fE(t){return function(){var e=t(this);this.textContent=e??""}}function hE(t){return this.tween("text",typeof t=="function"?fE(nh(this,"text",t)):lE(t==null?"":t+""))}function pE(t){return function(e){this.textContent=t.call(this,e)}}function dE(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&pE(i)),e}return r._value=t,r}function gE(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,dE(t))}function mE(){for(var t=this._name,e=this._id,n=Kb(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)if(c=a[s]){var f=Se(c,e);us(c,t,n,s,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new nn(r,this._parents,t,n)}function yE(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var u={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var s=Ge(this,r),f=s.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(u),e._.interrupt.push(u),e._.end.push(c)),s.on=e}),i===0&&o()})}var bE=0;function nn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Kb(){return++bE}var rn=co.prototype;nn.prototype={constructor:nn,select:Qk,selectAll:Jk,selectChild:rn.selectChild,selectChildren:rn.selectChildren,filter:Wk,merge:Hk,selection:eE,transition:mE,call:rn.call,nodes:rn.nodes,node:rn.node,size:rn.size,empty:rn.empty,each:rn.each,on:jk,attr:Dk,attrTween:Ck,style:aE,styleTween:cE,text:hE,textTween:gE,remove:Kk,tween:wk,delay:Fk,duration:Gk,ease:Yk,easeVarying:qk,end:yE,[Symbol.iterator]:rn[Symbol.iterator]};function vE(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var xE={time:null,delay:0,duration:250,ease:vE};function _E(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 wE(t){var e,n;t instanceof nn?(e=t._id,t=t._name):(e=Kb(),(n=xE).time=Kf(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&us(c,t,e,s,a,n||_E(c,e));return new nn(r,this._parents,t,e)}co.prototype.interrupt=vk,co.prototype.transition=wE;function AE(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ss(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function jr(t){return t=ss(Math.abs(t)),t?t[1]:NaN}function $E(t,e){return function(n,r){for(var i=n.length,o=[],a=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(n.substring(i-=u,i+u)),!((c+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(e)}}function ME(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var SE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cs(t){if(!(e=SE.exec(t)))throw new Error("invalid format: "+t);var e;return new rh({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]})}cs.prototype=rh.prototype;function rh(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+""}rh.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 TE(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Qb;function PE(t,e){var n=ss(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Qb=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ss(t,Math.max(0,e+o-1))[0]}function Jb(t,e){var n=ss(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const t2={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:AE,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)=>Jb(t*100,e),r:Jb,s:PE,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function e2(t){return t}var n2=Array.prototype.map,r2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function DE(t){var e=t.grouping===void 0||t.thousands===void 0?e2:$E(n2.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?e2:ME(n2.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function s(h){h=cs(h);var l=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,_=h.comma,v=h.precision,x=h.trim,A=h.type;A==="n"?(_=!0,A="g"):t2[A]||(v===void 0&&(v=12),x=!0,A="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var b=g==="$"?n:g==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",w=g==="$"?r:/[%p]/.test(A)?a:"",M=t2[A],$=/[defgprs%]/.test(A);v=v===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function D(S){var N=b,E=w,T,k,P;if(A==="c")E=M(S)+E,S="";else{S=+S;var L=S<0||1/S<0;if(S=isNaN(S)?c:M(Math.abs(S),v),x&&(S=TE(S)),L&&+S==0&&d!=="+"&&(L=!1),N=(L?d==="("?d:u:d==="-"||d==="("?"":d)+N,E=(A==="s"?r2[8+Qb/3]:"")+E+(L&&d==="("?")":""),$){for(T=-1,k=S.length;++T<k;)if(P=S.charCodeAt(T),48>P||P>57){E=(P===46?i+S.slice(T+1):S.slice(T))+E,S=S.slice(0,T);break}}}_&&!m&&(S=e(S,1/0));var C=N.length+S.length+E.length,R=C<y?new Array(y-C+1).join(l):"";switch(_&&m&&(S=e(R+S,R.length?y-E.length:1/0),R=""),p){case"<":S=N+S+E+R;break;case"=":S=N+R+S+E;break;case"^":S=R.slice(0,C=R.length>>1)+N+S+E+R.slice(C);break;default:S=R+N+S+E;break}return o(S)}return D.toString=function(){return h+""},D}function f(h,l){var p=s((h=cs(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(jr(l)/3)))*3,g=Math.pow(10,-d),m=r2[8+d/3];return function(y){return p(g*y)+m}}return{format:s,formatPrefix:f}}var ls,i2,o2;kE({thousands:",",grouping:[3],currency:["$",""]});function kE(t){return ls=DE(t),i2=ls.format,o2=ls.formatPrefix,ls}function EE(t){return Math.max(0,-jr(Math.abs(t)))}function NE(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(jr(e)/3)))*3-jr(Math.abs(t)))}function LE(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,jr(e)-jr(t))+1}function fs(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const a2=Symbol("implicit");function u2(){var t=new cb,e=[],n=[],r=a2;function i(o){let a=t.get(o);if(a===void 0){if(r!==a2)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new cb;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return u2(e,n).unknown(r)},fs.apply(i,arguments),i}function s2(){var t=u2().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,u=!1,c=0,s=0,f=.5;delete t.unknown;function h(){var l=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+s*2),u&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),u&&(d=Math.round(d),a=Math.round(a));var m=eP(l).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(e(l),h()):e()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,u=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(u=!!l,h()):u},t.padding=function(l){return arguments.length?(c=Math.min(1,s=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(s=+l,h()):s},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return s2(e(),[r,i]).round(u).paddingInner(c).paddingOuter(s).align(f)},fs.apply(h(),arguments)}function c2(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return c2(e())},t}function CE(){return c2(s2.apply(null,arguments).paddingInner(1))}function IE(t){return function(){return t}}function RE(t){return+t}var l2=[0,1];function Zr(t){return t}function ih(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:IE(isNaN(e)?NaN:.5)}function FE(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function zE(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=ih(i,r),o=n(a,o)):(r=ih(r,i),o=n(o,a)),function(u){return o(r(u))}}function OE(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=ih(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(u){var c=sb(t,u,1,r)-1;return o[c](i[c](u))}}function GE(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function UE(){var t=l2,e=l2,n=Zf,r,i,o,a=Zr,u,c,s;function f(){var l=Math.min(t.length,e.length);return a!==Zr&&(a=FE(t[0],t[l-1])),u=l>2?OE:zE,c=s=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=u(t.map(r),e,n)))(r(a(l)))}return h.invert=function(l){return a(i((s||(s=u(e,t.map(r),Me)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,RE),f()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),f()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),n=ak,f()},h.clamp=function(l){return arguments.length?(a=l?!0:Zr,f()):a!==Zr},h.interpolate=function(l){return arguments.length?(n=l,f()):n},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function YE(){return UE()(Zr,Zr)}function BE(t,e,n,r){var i=tP(t,e,n),o;switch(r=cs(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=NE(i,a))&&(r.precision=o),o2(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=LE(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=EE(i))&&(r.precision=o-(r.type==="%")*2);break}}return i2(r)}function f2(t){var e=t.domain;return t.ticks=function(n){var r=e();return JT(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return BE(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],u=r[o],c,s,f=10;for(u<a&&(s=a,a=u,u=s,s=i,i=o,o=s);f-- >0;){if(s=Gf(a,u,n),s===c)return r[i]=a,r[o]=u,e(r);if(s>0)a=Math.floor(a/s)*s,u=Math.ceil(u/s)*s;else if(s<0)a=Math.ceil(a*s)/s,u=Math.floor(u*s)/s;else break;c=s}return t},t}function h2(){var t=YE();return t.copy=function(){return GE(t,h2())},fs.apply(t,arguments),f2(t)}function p2(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[sb(r,c,0,n)]:o}function u(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return a}return a.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,u()):[t,e]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,u()):i.slice()},a.invertExtent=function(c){var s=i.indexOf(c);return s<0?[NaN,NaN]:s<1?[t,r[0]]:s>=n?[r[n-1],e]:[r[s-1],r[s]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return p2().domain([t,e]).range(i).unknown(o)},fs.apply(f2(a),arguments)}function bo(t,e,n){this.k=t,this.x=e,this.y=n}bo.prototype={constructor:bo,scale:function(t){return t===1?this:new bo(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new bo(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},bo.prototype;function hs(t){return Object.prototype.toString.call(t)==="[object Object]"}function d2(t,e){if(hs(t)===!1||hs(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let u;hs(r[a])&&hs(i[a])?(u=n(r[a],i[a]),o[a]=u):o[a]=r[a]}return o};return n(t,e)}var oh=function(t,e){return oh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},oh(t,e)};function on(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");oh(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function qE(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(f){try{s(r.next(f))}catch(h){a(h)}}function c(f){try{s(r.throw(f))}catch(h){a(h)}}function s(f){f.done?o(f.value):i(f.value).then(u,c)}s((r=r.apply(t,[])).next())})}function g2(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(f){return c([s,f])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(f){s=[6,f],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Kr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function vo(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function xo(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Qr(t){return this instanceof Qr?(this.v=t,this):new Qr(t)}function WE(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},u("next"),u("throw"),u("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function u(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,y){o.push([p,g,m,y])>1||c(p,g)})},d&&(i[p]=d(i[p])))}function c(p,d){try{s(r[p](d))}catch(g){l(o[0][3],g)}}function s(p){p.value instanceof Qr?Promise.resolve(p.value.v).then(f,h):l(o[0][2],p)}function f(p){c("next",p)}function h(p){c("throw",p)}function l(p,d){p(d),o.shift(),o.length&&c(o[0][0],o[0][1])}}function HE(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Kr=="function"?Kr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(u,c){a=t[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(s){o({value:s,done:u})},a)}}function kt(t){return typeof t=="function"}function ah(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var uh=ah(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
8
+ `+e.map(function(n,r){return r+1+") "+n.toString()}).join(`
9
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function ps(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var _o=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=Kr(a),c=u.next();!c.done;c=u.next()){var s=c.value;s.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(kt(f))try{f()}catch(g){o=g instanceof uh?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=Kr(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{b2(d)}catch(g){o=o??[],g instanceof uh?o=xo(xo([],vo(o)),vo(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new uh(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)b2(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&ps(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ps(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),m2=_o.EMPTY;function y2(t){return t instanceof _o||t&&"closed"in t&&kt(t.remove)&&kt(t.add)&&kt(t.unsubscribe)}function b2(t){kt(t)?t():t.unsubscribe()}var v2={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},XE={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,xo([t,e],vo(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function x2(t){XE.setTimeout(function(){throw t})}function sh(){}function ds(t){t()}var ch=function(t){on(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,y2(n)&&n.add(r)):r.destination=KE,r}return e.create=function(n,r,i){return new wo(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(_o),VE=Function.prototype.bind;function lh(t,e){return VE.call(t,e)}var jE=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){gs(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){gs(r)}else gs(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){gs(n)}},t}(),wo=function(t){on(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(kt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var u;o&&v2.useDeprecatedNextContext?(u=Object.create(n),u.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&lh(n.next,u),error:n.error&&lh(n.error,u),complete:n.complete&&lh(n.complete,u)}):a=n}return o.destination=new jE(a),o}return e}(ch);function gs(t){x2(t)}function ZE(t){throw t}var KE={closed:!0,next:sh,error:ZE,complete:sh},fh=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function _2(t){return t}function QE(t){return t.length===0?_2:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var Te=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=tN(e)?e:new wo(e,n,r);return ds(function(){var a=i,u=a.operator,c=a.source;o.add(u?u.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=w2(n),new n(function(i,o){var a=new wo({next:function(u){try{e(u)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[fh]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return QE(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=w2(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function w2(t){var e;return(e=t??v2.Promise)!==null&&e!==void 0?e:Promise}function JE(t){return t&&kt(t.next)&&kt(t.error)&&kt(t.complete)}function tN(t){return t&&t instanceof ch||JE(t)&&y2(t)}function eN(t){return kt(t==null?void 0:t.lift)}function tr(t){return function(e){if(eN(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ao(t,e,n,r,i){return new nN(t,e,n,r,i)}var nN=function(t){on(e,t);function e(n,r,i,o,a,u){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=u,c._next=r?function(s){try{r(s)}catch(f){n.error(f)}}:t.prototype._next,c._error=o?function(s){try{o(s)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(s){n.error(s)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(ch),rN=ah(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),$o=function(t){on(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new A2(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new rN},e.prototype.next=function(n){var r=this;ds(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Kr(r.currentObservers),u=a.next();!u.done;u=a.next()){var c=u.value;c.next(n)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ds(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ds(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,u=i.observers;return o||a?m2:(this.currentObservers=null,u.push(n),new _o(function(){r.currentObservers=null,ps(u,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new Te;return n.source=this,n},e.create=function(n,r){return new A2(n,r)},e}(Te),A2=function(t){on(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:m2},e}($o),hh={now:function(){return(hh.delegate||Date).now()},delegate:void 0},iN=function(t){on(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=hh);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,u=r._timestampProvider,c=r._windowTime;i||(o.push(n),!a&&o.push(u.now()+c)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,u=a.slice(),c=0;c<u.length&&!n.closed;c+=o?1:2)n.next(u[c]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,u=(a?1:2)*r;if(r<1/0&&u<o.length&&o.splice(0,o.length-u),!a){for(var c=i.now(),s=0,f=1;f<o.length&&o[f]<=c;f+=2)s=f;s&&o.splice(0,s+1)}},e}($o),oN=function(t){on(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(_o),$2={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,xo([t,e],vo(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},aN=function(t){on(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),$2.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&$2.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ps(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(oN),M2=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=hh.now,t}(),uN=function(t){on(e,t);function e(n,r){r===void 0&&(r=M2.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(M2);new uN(aN);function sN(t){return t&&kt(t.schedule)}function cN(t){return t[t.length-1]}function S2(t){return sN(cN(t))?t.pop():void 0}var T2=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function P2(t){return kt(t==null?void 0:t.then)}function D2(t){return kt(t[fh])}function k2(t){return Symbol.asyncIterator&&kt(t==null?void 0:t[Symbol.asyncIterator])}function E2(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function lN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var N2=lN();function L2(t){return kt(t==null?void 0:t[N2])}function C2(t){return WE(this,arguments,function(){var e,n,r,i;return g2(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Qr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,Qr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Qr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function I2(t){return kt(t==null?void 0:t.getReader)}function xn(t){if(t instanceof Te)return t;if(t!=null){if(D2(t))return fN(t);if(T2(t))return hN(t);if(P2(t))return pN(t);if(k2(t))return R2(t);if(L2(t))return dN(t);if(I2(t))return gN(t)}throw E2(t)}function fN(t){return new Te(function(e){var n=t[fh]();if(kt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function hN(t){return new Te(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function pN(t){return new Te(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,x2)})}function dN(t){return new Te(function(e){var n,r;try{for(var i=Kr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function R2(t){return new Te(function(e){mN(t,e).catch(function(n){return e.error(n)})})}function gN(t){return R2(C2(t))}function mN(t,e){var n,r,i,o;return qE(this,void 0,void 0,function(){var a,u;return g2(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=HE(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=c.sent(),i={error:u},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function er(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function F2(t,e){return e===void 0&&(e=0),tr(function(n,r){n.subscribe(Ao(r,function(i){return er(r,t,function(){return r.next(i)},e)},function(){return er(r,t,function(){return r.complete()},e)},function(i){return er(r,t,function(){return r.error(i)},e)}))})}function z2(t,e){return e===void 0&&(e=0),tr(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function yN(t,e){return xn(t).pipe(z2(e),F2(e))}function bN(t,e){return xn(t).pipe(z2(e),F2(e))}function vN(t,e){return new Te(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function xN(t,e){return new Te(function(n){var r;return er(n,e,function(){r=t[N2](),er(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(u){n.error(u);return}a?n.complete():n.next(o)},0,!0)}),function(){return kt(r==null?void 0:r.return)&&r.return()}})}function O2(t,e){if(!t)throw new Error("Iterable cannot be null");return new Te(function(n){er(n,e,function(){var r=t[Symbol.asyncIterator]();er(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function _N(t,e){return O2(C2(t),e)}function wN(t,e){if(t!=null){if(D2(t))return yN(t,e);if(T2(t))return vN(t,e);if(P2(t))return bN(t,e);if(k2(t))return O2(t,e);if(L2(t))return xN(t,e);if(I2(t))return _N(t,e)}throw E2(t)}function AN(t,e){return e?wN(t,e):xn(t)}ah(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function G2(t,e){return tr(function(n,r){var i=0;n.subscribe(Ao(r,function(o){r.next(t.call(e,o,i++))}))})}function $N(t,e,n,r,i,o,a,u){var c=[],s=0,f=0,h=!1,l=function(){h&&!c.length&&!s&&e.complete()},p=function(g){return s<r?d(g):c.push(g)},d=function(g){s++;var m=!1;xn(n(g,f++)).subscribe(Ao(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{s--;for(var y=function(){var _=c.shift();a||d(_)};c.length&&s<r;)y();l()}catch(_){e.error(_)}}))};return t.subscribe(Ao(e,p,function(){h=!0,l()})),function(){}}function U2(t,e,n){return n===void 0&&(n=1/0),kt(e)?U2(function(r,i){return G2(function(o,a){return e(r,o,i,a)})(xn(t(r,i)))},n):(typeof e=="number"&&(n=e),tr(function(r,i){return $N(r,i,t,n)}))}function MN(t){return U2(_2,t)}function SN(){return MN(1)}function Y2(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return SN()(AN(t,S2(t)))}function TN(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new $o}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,u=t.resetOnRefCountZero,c=u===void 0?!0:u;return function(s){var f,h,l,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),f=l=void 0,d=g=!1},_=function(){var v=f;y(),v==null||v.unsubscribe()};return tr(function(v,x){p++,!g&&!d&&m();var A=l=l??n();x.add(function(){p--,p===0&&!g&&!d&&(h=ph(_,c))}),A.subscribe(x),!f&&p>0&&(f=new wo({next:function(b){return A.next(b)},error:function(b){g=!0,m(),h=ph(y,i,b),A.error(b)},complete:function(){d=!0,m(),h=ph(y,a),A.complete()}}),xn(v).subscribe(f))})(s)}}function ph(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new wo({next:function(){i.unsubscribe(),t()}});return xn(e.apply(void 0,xo([],vo(n)))).subscribe(i)}}function PN(t,e,n){var r,i=!1;return r=t,TN({connector:function(){return new iN(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function DN(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=S2(t);return tr(function(r,i){(n?Y2(t,r,n):Y2(t,r)).subscribe(i)})}function kN(t){return tr(function(e,n){xn(t).subscribe(Ao(n,function(){return n.complete()},sh)),!n.closed&&e.subscribe(n)})}const dh=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=Wr.scaleDomain,scaleRange:i=Wr.scaleRange})=>{const o=r[0]??Wr.scaleDomain[0],a=r[1]??Wr.scaleDomain[1],u=i[0]??Wr.scaleRange[0],c=i[1]??Wr.scaleRange[1],s=o==="auto"?e:o,f=a==="auto"?t:a;let h=n*u,l=n*c;return h2().domain([s,f]).range([h,l])},B2=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return CE().domain(t).range(r).padding(n)},EN=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),p2().domain([-0,e+0]).range(i)};function NN({name:t,defaultParams:e,initFn:n}){const r=new $o,i=new $o,o=new WeakMap;let a=()=>{},u,c=e;return{params$:i,name:t,defaultParams:e,init(){u&&(a=n(u)??(()=>{}),o.set(u.selection,u))},destroy(){a(),u&&(u.selection.remove(),u=void 0),r.next(void 0)},setPresetParams:s=>{c=d2(s,e)},setContext:s=>{u=s,u.observer.fullParams$=i.pipe(kN(r),DN({}),G2(f=>d2(f,c)),PN(1))}}}const gh=()=>function(t,e){return function(n){return class{constructor(){const r=NN({name:t,defaultParams:e,initFn:n});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},Mo=gh(),Ue=gh(),q2=gh();function W2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function LN(t,e){function n(i){var u;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((u=o==null?void 0:o.firstChild)!=null&&u.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function Jr(t){return t.substring(0,4)!=="ease"?vi:Ly[t]??vi}function ms({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=Zl().domain([0,1]).range([0,t/2]),a=o(n);return Ym().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const ys=(t,e)=>e instanceof Function?e(t):Si(e)(t);function H2(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function X2(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function CN(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return X2(e)}function It(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:n[t]!=null?n[t]:n.primary}function IN(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}function mh({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function ft(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function ti(t,e){const r=Math.random().toString(36).substr(2,5);return ft(t,e,r)}function V2({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r}){const i=new mt,o=new et(a=>{q({dataFormatter:t,computedData:n}).pipe(I(i),Y(async u=>u)).subscribe(u=>{const s=u.computedData[0]?u.computedData[0].length-1:0,f=u.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-u.dataFormatter.groupAxis.scalePadding:u.dataFormatter.groupAxis.scaleDomain[0]-u.dataFormatter.groupAxis.scalePadding,h=u.dataFormatter.groupAxis.scaleDomain[1]==="auto"?s+u.dataFormatter.groupAxis.scalePadding:u.dataFormatter.groupAxis.scaleDomain[1]+u.dataFormatter.groupAxis.scalePadding,p=(u.dataFormatter.grid.seriesType==="row"?(u.computedData[0]??[]).map(d=>d.groupLabel):u.computedData.map(d=>d[0].groupLabel)).filter((d,g)=>g>=f&&g<=h);a.next(p)})});return new et(a=>{q({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(I(i),Y(async u=>u)).subscribe(u=>{const c=u.dataFormatter.valueAxis.position==="right"||u.dataFormatter.valueAxis.position==="bottom",s=EN({axisLabels:u.scaleRangeGroupLabels,axisWidth:u.axisSize.width,reverse:c}),f=l=>u.dataFormatter.groupAxis.position==="bottom"||u.dataFormatter.groupAxis.position==="top"?l.offsetX-u.fullChartParams.padding.left:l.offsetY-u.fullChartParams.padding.top,h=l=>{const p=f(l),d=s(p);return{groupIndex:d,groupLabel:u.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})}const bs="Lines",RN=ft(bs,"g"),FN=ft(bs,"path");function zN(t="curveLinear"){return Du().x(e=>e.axisX).y(e=>e.axisY).curve(Ly[t])}function ON(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function GN({selection:t,segmentData:e,linePath:n,params:r}){return t.selectAll("path").data(e,(o,a)=>o.length?`${o[0].id}_${o[o.length-1].id}`:a).join(o=>o.append("path").classed(FN,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),o=>o,o=>o.remove()).attr("stroke-width",r.lineWidth).attr("stroke",(o,a)=>o[0]&&o[0].color).attr("d",o=>n(o))}function UN({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function YN({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{j(a[o]).selectAll("rect").data([i]).join(u=>{const c=u.append("rect");return c.transition().duration(n).ease(Jr(r)).tween("tween",(s,f,h)=>l=>{const p=s.width*l;c.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),c},u=>u.attr("x",0).attr("y",0).attr("width",c=>c.width).attr("height",c=>c.height),u=>u.remove())})}const BN=Ue(bs,rr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new mt,o=ti(bs,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new mt;n.gridAxesTransform$.pipe(I(i),U(_=>_.value),K()).subscribe(_=>{a.style("transform",_)}),n.gridGraphicTransform$.pipe(I(i),U(_=>_.value),K()).subscribe(_=>{c.transition().duration(50).style("transform",_)});const f=new et(_=>{const v=n.fullParams$.pipe(I(i)).subscribe(x=>{if(!x)return;const A=zN(x.lineCurve);_.next(A)});return()=>{v.unsubscribe()}}),h=new et(_=>{n.computedData$.pipe(I(i),Y(async v=>v)).subscribe(v=>{const x=v[0]&&v[0][0]?v.map(A=>A[0].seriesLabel):[];_.next(x)})}),l=n.fullChartParams$.pipe(U(_=>_.transitionDuration),K()),p=n.fullChartParams$.pipe(U(_=>_.transitionEase),K());q({seriesLabels:h,axisSize:n.gridAxesSize$,transitionDuration:l,transitionEase:p}).pipe(I(i),Y(async _=>_)).subscribe(_=>{const x=[{id:o,width:_.axisSize.width,height:_.axisSize.height}].concat(_.seriesLabels.map(A=>({id:`orbcharts__clipPath_${A}`,width:_.axisSize.width,height:_.axisSize.height})));YN({defsSelection:u,clipPathData:x,transitionDuration:_.transitionDuration,transitionEase:_.transitionEase})});const d=n.computedData$.pipe(U(_=>{const v=new Map;return _.flat().forEach(x=>v.set(x.id,x)),v})),g=V2({fullDataFormatter$:n.fullDataFormatter$,gridAxesSize$:n.gridAxesSize$,computedData$:n.computedData$,fullChartParams$:n.fullChartParams$}),m=n.fullChartParams$.pipe(I(i),U(_=>_.highlightTarget),K());q({seriesLabels:h,computedData:n.computedData$,SeriesDataMap:n.SeriesDataMap$,GroupDataMap:n.GroupDataMap$,linePath:f,params:n.fullParams$,highlightTarget:m,gridGroupPositionFn:g}).pipe(I(i),Y(async _=>_)).subscribe(_=>{const v=c.selectAll("g").data(_.seriesLabels,(b,w)=>b),x=v.enter().append("g").classed(RN,!0);v.exit().remove();const A=v.merge(x).attr("clip-path",(b,w)=>`url(#orbcharts__clipPath_${b})`);A.each((b,w,M)=>{const $=ON(_.computedData[w]??[]);GN({selection:j(M[w]),linePath:_.linePath,segmentData:$,params:_.params}).on("mouseover",(S,N)=>{S.stopPropagation();const E=N[0]?N[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=_.gridGroupPositionFn(S),C=_.GroupDataMap.get(k).find(R=>R.seriesLabel===E)??N[0];r.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:_.highlightTarget,datum:C,series:_.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:_.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:S,data:_.computedData})}).on("mousemove",(S,N)=>{S.stopPropagation();const E=N[0]?N[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=_.gridGroupPositionFn(S),C=_.GroupDataMap.get(k).find(R=>R.seriesLabel===E)??N[0];r.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:_.highlightTarget,datum:C,series:_.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:_.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:S,data:_.computedData})}).on("mouseout",(S,N)=>{S.stopPropagation();const E=N[0]?N[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=_.gridGroupPositionFn(S),C=_.GroupDataMap.get(k).find(R=>R.seriesLabel===E)??N[0];r.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:_.highlightTarget,datum:C,series:_.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:_.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:S,data:_.computedData})}).on("click",(S,N)=>{S.stopPropagation();const E=N[0]?N[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=_.gridGroupPositionFn(S),C=_.GroupDataMap.get(k).find(R=>R.seriesLabel===E)??N[0];r.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:_.highlightTarget,datum:C,series:_.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:_.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:S,data:_.computedData})})}),s.next(A)});const y=n.gridHighlight$.subscribe();return n.fullChartParams$.pipe(I(i),Bu(_=>_.highlightTarget==="series"),Y(_=>q({graphicSelection:s,highlight:n.gridHighlight$,DataMap:d,fullChartParams:n.fullChartParams$}).pipe(I(i),Y(async v=>v)))).subscribe(_=>{const v=_.DataMap.get(_.highlight[0]);UN({selection:_.graphicSelection,seriesLabel:v&&v.seriesLabel?v.seriesLabel:null,fullChartParams:_.fullChartParams})}),()=>{y.unsubscribe(),i.next(void 0)}}),vs="Bars",j2=ft(vs,"g"),Z2=ft(vs,"rect"),K2=.3;function qN({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function WN(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Xl().domain(e).range([-i/2+r,i/2-r])}function HN(t,e){return t<=1?0:e/(t-1)*K2}function XN(t,e){return t<=1?e:e*(1-K2)}function VN({selection:t,data:e,zeroY:n,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:u,transformedBarRadius:c,delayGroup:s,transitionItem:f}){const h=u/2;return t.selectAll(`g.${j2}`).data(e,(d,g)=>r[g]).join(d=>d.append("g").classed(j2,!0).attr("cursor","pointer"),d=>d,d=>d.remove()).attr("transform",(d,g)=>`translate(${d[0]?d[0].axisX:0}, 0)`).each((d,g,m)=>{j(m[g]).selectAll("rect").data(d,y=>y.id).join(y=>y.append("rect").classed(Z2,!0).attr("height",_=>0),y=>y,y=>y.remove()).attr("fill",y=>y.color).attr("y",y=>y.axisY<n?y.axisY:n).attr("x",y=>i(y.seriesLabel)).attr("width",u).attr("transform",`translate(${-h}, 0)`).attr("rx",c[0]).attr("ry",c[1]).transition().duration(f).ease(Jr(a.transitionEase)).delay((y,_)=>y.groupIndex*s).attr("height",y=>Math.abs(y.axisYFromZero))}).selectAll(`rect.${Z2}`)}function jN({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function ZN({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const KN=Ue(vs,Dh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new mt,o=ti(vs,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new mt;r.gridAxesTransform$.pipe(I(i),U(b=>b.value),K()).subscribe(b=>{a.style("transform",b)}),r.gridGraphicTransform$.pipe(I(i),U(b=>b.value),K()).subscribe(b=>{c.transition().duration(50).style("transform",b)});const f=r.visibleComputedData$.pipe(U(b=>b[0]&&b[0][0]?b[0][0].axisY-b[0][0].axisYFromZero:0),K()),h=new et(b=>{q({computedData:r.computedData$,visibleComputedData:r.visibleComputedData$,params:r.fullParams$,gridAxesSize:r.gridAxesSize$}).pipe(Y(async w=>w)).subscribe(w=>{const M=w.params.barWidth?w.params.barWidth:qN({axisWidth:w.gridAxesSize.width,groupAmount:w.computedData[0]?w.computedData[0].length:0,barAmountOfGroup:w.visibleComputedData.length,barPadding:w.params.barPadding,barGroupPadding:w.params.barGroupPadding});b.next(M)})}).pipe(I(i),K()),l=q({gridGraphicTransform:r.gridGraphicTransform$,barWidth:h,params:r.fullParams$}).pipe(I(i),Y(async b=>b),U(b=>{const w=b.barWidth/2,M=b.params.barRadius===!0?w:b.params.barRadius===!1?0:typeof b.params.barRadius=="number"?b.params.barRadius:0,$=M==0?0:M/b.gridGraphicTransform.scale[0],D=M==0?0:M/b.gridGraphicTransform.scale[1];return[$,D]})),p=r.visibleComputedData$.pipe(I(i),U(b=>{const w=new Set;return b.forEach(M=>{M.forEach($=>{w.add($.seriesLabel)})}),Array.from(w)})),d=r.visibleComputedData$.pipe(I(i),U(b=>{const w=new Set;return b.forEach(M=>{M.forEach($=>{w.add($.groupLabel)})}),Array.from(w)})),g=new et(b=>{q({seriesLabels:p,barWidth:h,params:r.fullParams$}).pipe(I(i),Y(async w=>w)).subscribe(w=>{const M=WN(w.barWidth,w.seriesLabels,w.params);b.next(M)})}),m=r.fullChartParams$.pipe(I(i),U(b=>b.transitionDuration),K()),y=new et(b=>{q({groupLabels:d,transitionDuration:m}).pipe(Y(async w=>w)).subscribe(w=>{const M=HN(w.groupLabels.length,w.transitionDuration);b.next(M)})}).pipe(I(i),K()),_=new et(b=>{q({groupLabels:d,transitionDuration:m}).pipe(Y(async w=>w)).subscribe(w=>{const M=XN(w.groupLabels.length,w.transitionDuration);b.next(M)})}).pipe(I(i),K()),v=r.visibleComputedData$.pipe(I(i),U(b=>{const w=b.length,M=b.reduce((D,S)=>Math.max(D,S.length),0),$=new Array(M).fill(null).map(()=>new Array(w).fill(null));for(let D=0;D<w;D++)for(let S=0;S<M;S++)$[S][D]=b[D][S];return $}));r.gridAxesSize$.pipe(I(i)).subscribe(b=>{const w=[{id:o,width:b.width,height:b.height}];jN({defsSelection:u,clipPathData:w})});const x=r.fullChartParams$.pipe(I(i),U(b=>b.highlightTarget),K());q({computedData:r.computedData$,barData$:v,zeroY:f,groupLabels:d,barScale:g,params:r.fullParams$,chartParams:r.fullChartParams$,highlightTarget:x,barWidth:h,transformedBarRadius:l,delayGroup:y,transitionItem:_,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{const w=VN({selection:c,data:b.barData$,zeroY:b.zeroY,groupLabels:b.groupLabels,barScale:b.barScale,params:b.params,chartParams:b.chartParams,barWidth:b.barWidth,transformedBarRadius:b.transformedBarRadius,delayGroup:b.delayGroup,transitionItem:b.transitionItem});w.on("mouseover",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("mousemove",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("mouseout",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("click",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}),s.next(w)});const A=r.gridHighlight$.subscribe();return q({barSelection:s,highlight:r.gridHighlight$,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{ZN({selection:b.barSelection,ids:b.highlight,fullChartParams:b.fullChartParams})}),()=>{i.next(void 0),A.unsubscribe()}}),xs="BarStack",Q2=ft(xs,"g"),J2=ft(xs,"g-content"),tv=.3;function QN({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function JN(t,e){return t<=1?0:e/(t-1)*tv}function tL(t,e){return t<=1?e:e*(1-tv)}function eL({selection:t,data:e,zeroY:n,groupLabels:r,params:i,chartParams:o,barWidth:a,transformedBarRadius:u,delayGroup:c,transitionItem:s}){const f=a/2;return t.selectAll(`g.${Q2}`).data(e,(p,d)=>r[d]).join(p=>p.append("g").classed(Q2,!0).attr("cursor","pointer"),p=>p,p=>p.remove()).attr("transform",(p,d)=>`translate(${p[0]?p[0].axisX:0}, 0)`).each((p,d,g)=>{j(g[d]).selectAll("g").data(p,m=>m.id).join(m=>m.append("g").classed(J2,!0),m=>m,m=>m.remove()).each((m,y,_)=>{j(_[y]).selectAll("rect").data([m],v=>v.id).join(v=>v.append("rect").attr("y",x=>n).attr("height",x=>0),v=>v,v=>v.remove()).attr("rx",u[0]).attr("ry",u[1]).attr("fill",v=>v.color).attr("transform",`translate(${-f}, 0)`).attr("x",v=>0).attr("width",a).transition().duration(s).ease(Jr(o.transitionEase)).delay((v,x)=>v.groupIndex*c).attr("y",v=>v._barStartY).attr("height",v=>Math.abs(v._barHeight))})}).selectAll(`g.${J2}`)}function nL({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function rL({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const iL=Ue(xs,kh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new mt,o=ti(xs,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new mt;r.gridAxesTransform$.pipe(I(i),U(b=>b.value),K()).subscribe(b=>{a.style("transform",b)}),r.gridGraphicTransform$.pipe(I(i),Y(async b=>b.value),K()).subscribe(b=>{c.transition().duration(50).style("transform",b)});const f=r.visibleComputedData$.pipe(U(b=>b[0]&&b[0][0]?b[0][0].axisY-b[0][0].axisYFromZero:0),K()),h=new et(b=>{q({computedData:r.computedData$,params:r.fullParams$,axisSize:r.gridAxesSize$}).pipe(Y(async w=>w)).subscribe(w=>{const M=w.params.barWidth?w.params.barWidth:QN({axisWidth:w.axisSize.width,groupAmount:w.computedData[0]?w.computedData[0].length:0,barGroupPadding:w.params.barGroupPadding});b.next(M)})}).pipe(I(i),K()),l=q({gridGraphicTransform:r.gridGraphicTransform$,barWidth:h,params:r.fullParams$}).pipe(I(i),Y(async b=>b),U(b=>{const w=b.barWidth/2,M=b.params.barRadius===!0?w:b.params.barRadius===!1?0:typeof b.params.barRadius=="number"?b.params.barRadius:0,$=M==0?0:M/b.gridGraphicTransform.scale[0],D=M==0?0:M/b.gridGraphicTransform.scale[1];return[$,D]})),p=r.visibleComputedData$.pipe(I(i),U(b=>{const w=new Set;return b.forEach(M=>{M.forEach($=>{w.add($.groupLabel)})}),Array.from(w)})),d=r.fullChartParams$.pipe(I(i),U(b=>b.transitionDuration),K()),g=new et(b=>{q({groupLabels:p,transitionDuration:d}).pipe(Y(async w=>w)).subscribe(w=>{const M=JN(w.groupLabels.length,w.transitionDuration);b.next(M)})}).pipe(I(i),K()),m=new et(b=>{q({groupLabels:p,transitionDuration:d}).pipe(Y(async w=>w)).subscribe(w=>{const M=tL(w.groupLabels.length,w.transitionDuration);b.next(M)})}).pipe(I(i),K()),y=r.visibleComputedData$.pipe(I(i),U(b=>{console.log("visibleComputedData",b);const w=b.length,M=b.reduce((D,S)=>Math.max(D,S.length),0),$=new Array(M).fill(null).map(()=>new Array(w).fill(null));for(let D=0;D<w;D++)for(let S=0;S<M;S++)$[S][D]=b[D][S];return $})),_=q({transposedVisibleData:y,dataFormatter:r.fullDataFormatter$}).pipe(I(i),Y(async b=>b),U(b=>{const M=b.transposedVisibleData.length-1,$=b.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-b.dataFormatter.groupAxis.scalePadding:b.dataFormatter.groupAxis.scaleDomain[0]-b.dataFormatter.groupAxis.scalePadding,D=b.dataFormatter.groupAxis.scaleDomain[1]==="auto"?M+b.dataFormatter.groupAxis.scalePadding:b.dataFormatter.groupAxis.scaleDomain[1]+b.dataFormatter.groupAxis.scalePadding,S=b.transposedVisibleData.map(N=>N.filter((E,T)=>E.groupIndex>=$&&E.groupIndex<=D));if(S.flat().length){const N=S.flat().map(P=>P.axisYFromZero),E=Math.max(...N),T=S.map(P=>P.reduce((L,C)=>L+C.axisYFromZero,0)),k=Math.max(...T);return E/k}else return 1})),v=q({transposedVisibleData:y,yRatio:_,zeroY:f}).pipe(I(i),U(b=>(console.log(b.transposedVisibleData),b.transposedVisibleData.map(w=>{let M=b.zeroY;return w.map($=>{const D=M,S=$.axisYFromZero*b.yRatio;return M=M+S,{...$,_barStartY:D,_barHeight:S}})}))));r.gridAxesSize$.pipe(I(i)).subscribe(b=>{const w=[{id:o,width:b.width,height:b.height}];nL({defsSelection:u,clipPathData:w})});const x=r.fullChartParams$.pipe(I(i),U(b=>b.highlightTarget),K());q({graphicData:v,zeroY:f,groupLabels:p,params:r.fullParams$,chartParams:r.fullChartParams$,highlightTarget:x,barWidth:h,transformedBarRadius:l,delayGroup:g,transitionItem:m,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{const w=eL({selection:c,data:b.graphicData,zeroY:b.zeroY,groupLabels:b.groupLabels,params:b.params,chartParams:b.chartParams,barWidth:b.barWidth,transformedBarRadius:b.transformedBarRadius,delayGroup:b.delayGroup,transitionItem:b.transitionItem});w.on("mouseover",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.graphicData})}).on("mousemove",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.graphicData})}).on("mouseout",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.graphicData})}).on("click",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.graphicData})}),s.next(w)});const A=r.gridHighlight$.subscribe();return q({barSelection:s,highlight:r.gridHighlight$,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{rL({selection:b.barSelection,ids:b.highlight,fullChartParams:b.fullChartParams})}),()=>{i.next(void 0),A.unsubscribe()}}),_s="BarsTriangle",ev=ft(_s,"g"),nv=ft(_s,"g-content"),rv=.3;function oL({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const o=(t/e-i)/n-r;return o>1?o:1}function aL(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Xl().domain(e).range([-i/2+r,i/2-r])}function uL(t,e){return t<=1?0:e/(t-1)*rv}function sL(t,e){return t<=1?e:e*(1-rv)}function cL({selection:t,barData:e,zeroY:n,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:u,delayGroup:c,transitionItem:s}){const f=t.selectAll(`g.${ev}`).data(e,(g,m)=>r[m]),h=f.enter().append("g").classed(ev,!0).attr("cursor","pointer");f.exit().remove();const l=f.merge(h);h.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`),f.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`);const p=u/2;return l.each((g,m,y)=>{const _=j(y[m]).selectAll("g").data(g,x=>x.id),v=_.enter().append("g").classed(nv,!0);v.append("path").style("vector-effect","non-scaling-stroke").attr("height",x=>0).attr("d",x=>{const A=i(x.seriesLabel),b=n,w=b;return`M${A-u/2},${b} L${A},${w} ${A+u/2},${b}`}),_.merge(v).select("path").style("fill",x=>`url(#${x.linearGradientId})`).attr("stroke",x=>x.color).attr("transform",`translate(${-p}, 0)`).transition().duration(s).ease(Jr(a.transitionEase)).delay((x,A)=>x.groupIndex*c).attr("transform",`translate(${-p}, 0)`).attr("height",x=>Math.abs(x.axisYFromZero)).attr("d",x=>{const A=i(x.seriesLabel),b=n,w=x.axisY;return`M${A},${b} L${A+u/2},${w} ${A+u},${b}`}),_.exit().remove()}),l.selectAll(`g.${nv}`)}function lL({defsSelection:t,barData:e,params:n}){const r=t.selectAll("linearGradient").data(e[0]??[],o=>o.seriesLabel),i=r.enter().append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad");r.merge(i).attr("id",(o,a)=>o.linearGradientId).html((o,a)=>`
10
+ <stop offset="0%" stop-color="${o.color}" stop-opacity="${n.linearGradientOpacity[0]}"/>
11
+ <stop offset="100%" stop-color="${o.color}" stop-opacity="${n.linearGradientOpacity[1]}"/>
12
+ `),r.exit().remove()}function fL({defsSelection:t,clipPathData:e}){const n=t.selectAll("clipPath").data(e),r=n.enter().append("clipPath");n.merge(r).attr("id",i=>i.id),n.exit().remove(),n.merge(r).each((i,o,a)=>{const u=j(a[o]).selectAll("rect").data([i]),c=u.enter().append("rect");u.merge(c).attr("x",0).attr("y",0).attr("width",s=>s.width).attr("height",s=>s.height),u.exit().remove()})}function hL({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?j(a[o]).style("opacity",1):j(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const pL=Ue(_s,Eh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new mt,o=ti(_s,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new mt;r.gridAxesTransform$.pipe(I(i),U(b=>b.value),K()).subscribe(b=>{a.style("transform",b)}),r.gridGraphicTransform$.pipe(I(i),Y(async b=>b.value),K()).subscribe(b=>{c.transition().duration(50).style("transform",b)});const f=r.computedData$.pipe(U(b=>b[0]&&b[0][0]?b[0][0].axisY-b[0][0].axisYFromZero:0),K()),h=new et(b=>{q({computedData:r.computedData$,params:r.fullParams$,axisSize:r.gridAxesSize$}).pipe(Y(async w=>w)).subscribe(w=>{const M=oL({axisWidth:w.axisSize.width,groupAmount:w.computedData[0]?w.computedData[0].length:0,barAmountOfGroup:w.computedData.length,barPadding:w.params.barPadding,barGroupPadding:w.params.barGroupPadding});b.next(M)})}).pipe(I(i),K()),l=r.computedData$.pipe(I(i),U(b=>b.map((w,M)=>w[0]?w[0].seriesLabel:String(M)))),p=r.computedData$.pipe(I(i),U(b=>b[0]?b[0].map(w=>w.groupLabel):[])),d=new et(b=>{q({seriesLabels:l,barWidth:h,params:r.fullParams$}).pipe(I(i),Y(async w=>w)).subscribe(w=>{const M=aL(w.barWidth,w.seriesLabels,w.params);b.next(M)})}),g=r.fullChartParams$.pipe(I(i),U(b=>b.transitionDuration),K()),m=new et(b=>{q({groupLabels:p,transitionDuration:g}).pipe(Y(async w=>w)).subscribe(w=>{const M=uL(w.groupLabels.length,w.transitionDuration);b.next(M)})}).pipe(I(i),K()),y=new et(b=>{q({groupLabels:p,transitionDuration:g}).pipe(Y(async w=>w)).subscribe(w=>{const M=sL(w.groupLabels.length,w.transitionDuration);b.next(M)})}).pipe(I(i),K()),v=r.computedData$.pipe(I(i),U(b=>{const w=b.length,M=b.reduce((D,S)=>Math.max(D,S.length),0),$=new Array(M).fill(null).map(()=>new Array(w).fill(null));for(let D=0;D<w;D++)for(let S=0;S<M;S++)$[S][D]=b[D][S];return $})).pipe(I(i),U(b=>{const w=b.length?b[0].map(M=>ti(e,`lineargradient-${M.seriesLabel}`)):[];return b.map(M=>M.map(($,D)=>({linearGradientId:w[D],...$})))}));r.gridAxesSize$.pipe(I(i)).subscribe(b=>{const w=[{id:o,width:b.width,height:b.height}];fL({defsSelection:u,clipPathData:w})});const x=r.fullChartParams$.pipe(I(i),U(b=>b.highlightTarget),K());q({barData:v,computedData:r.computedData$,zeroY:f,groupLabels:p,barScale:d,params:r.fullParams$,chartParams:r.fullChartParams$,highlightTarget:x,barWidth:h,delayGroup:m,transitionItem:y,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{const w=cL({selection:c,barData:b.barData,zeroY:b.zeroY,groupLabels:b.groupLabels,barScale:b.barScale,params:b.params,chartParams:b.chartParams,barWidth:b.barWidth,delayGroup:b.delayGroup,transitionItem:b.transitionItem});lL({defsSelection:u,barData:b.barData,params:b.params}),w.on("mouseover",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("mousemove",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("mouseout",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}).on("click",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:b.highlightTarget,datum:$,series:b.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:b.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:b.computedData})}),s.next(w)});const A=r.gridHighlight$.subscribe();return q({pathSelection:s,highlight:r.gridHighlight$,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async b=>b)).subscribe(b=>{hL({selection:b.pathSelection,ids:b.highlight,fullChartParams:b.fullChartParams})}),()=>{i.next(void 0),A.unsubscribe()}}),ws="Dots",dL=ft(ws,"g"),gL=ft(ws,"circle");function mL({selection:t,data:e,fullParams:n,fullChartParams:r,graphicOppositeScale:i}){const o=c=>{const s=c.size();return r.transitionDuration/s};let a=0;return t.selectAll("g").data(e,c=>c.id).join(c=>(a=o(c),c.append("g").classed(dL,!0)),c=>c,c=>c.remove()).attr("transform",c=>`translate(${c.axisX}, ${c.axisY})`).each((c,s,f)=>{j(f[s]).selectAll("circle").data([c]).join(h=>h.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(gL,!0).attr("opacity",0).transition().delay((l,p)=>s*a).attr("opacity",1),h=>h.transition().duration(50).attr("opacity",1),h=>h.remove()).attr("r",n.radius).attr("fill",(h,l)=>mh({datum:h,colorType:n.fillColorType,fullChartParams:r})).attr("stroke",(h,l)=>mh({datum:h,colorType:n.strokeColorType,fullChartParams:r})).attr("stroke-width",n.strokeWidth).attr("transform",`scale(${i[0]}, ${i[1]})`)})}function yL({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?j(a[o]).style("opacity",1).transition("highlight").duration(200):j(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function bL({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const vL=Ue(ws,Th)(({selection:t,name:e,subject:n,observer:r})=>{const i=new mt,o=ti(ws,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new mt;r.gridAxesTransform$.pipe(I(i),U(d=>d.value),K()).subscribe(d=>{a.style("transform",d)}),r.gridGraphicTransform$.pipe(I(i),Y(async d=>d.value),K()).subscribe(d=>{c.transition().duration(50).style("transform",d)});const f=r.gridGraphicTransform$.pipe(I(i),U(d=>[1/d.scale[0],1/d.scale[1]]));r.gridAxesSize$.pipe(I(i),Y(async d=>d)).subscribe(d=>{const g=[{id:o,width:d.width,height:d.height}];bL({defsSelection:u,clipPathData:g})});const h=r.fullChartParams$.pipe(I(i),U(d=>d.highlightTarget),K());q({computedData:r.computedData$,visibleComputedData:r.visibleComputedData$,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$,graphicOppositeScale:f,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$,highlightTarget:h}).pipe(I(i),Y(async d=>d)).subscribe(d=>{const g=mL({selection:c,data:d.visibleComputedData.flat(),fullParams:d.fullParams,fullChartParams:d.fullChartParams,graphicOppositeScale:d.graphicOppositeScale});g.on("mouseover",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}).on("mousemove",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:d.highlightTarget,data:d.computedData,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m})}).on("mouseout",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}).on("click",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}),s.next(g)});const l=r.gridHighlight$.subscribe(),p=r.fullParams$.pipe(I(i),U(d=>d.onlyShowHighlighted),K());return r.fullChartParams$.pipe(I(i),Y(d=>q({graphicSelection:s,highlight:r.gridHighlight$,onlyShowHighlighted:p,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async g=>g)))).subscribe(d=>{yL({selection:d.graphicSelection,ids:d.highlight,onlyShowHighlighted:d.onlyShowHighlighted,fullChartParams:d.fullChartParams})}),()=>{l.unsubscribe(),i.next(void 0)}}),yh="GroupAxis",iv=ft(yh,"xAxis"),ov=ft(yh,"groupingLabel"),bh=6;function xL({selection:t,params:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:u,contentTransform:c}){const s=t.selectAll(`g.${iv}`).data([e]).join("g").classed(iv,!0);t.selectAll(`g.${ov}`).data([e]).join("g").classed(ov,!0).each((l,p,d)=>{j(d[p]).selectAll("text").data([l]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",It(e.labelColorType,a)).style("transform",c).text(g=>o.groupAxis.label)}).attr("transform",l=>`translate(${i.width+l.tickPadding+e.labelOffset[0]}, ${-l.tickPadding-bh-e.labelOffset[1]})`);const f=s0(u).scale(u).tickSize(e.tickFullLine==!0?-i.height:bh).tickSizeOuter(0).tickFormat(l=>ys(l,e.tickFormat)).tickPadding(e.tickPadding),h=s.transition().duration(100).call(f);return h.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?It(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),h.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?It(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),s.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",It(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`0 -${e.tickPadding+bh}`).style("transform",c),s}const _L=Ue(yh,Nh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new mt,o=t.append("g");n.gridAxesTransform$.pipe(I(i),U(f=>f.value),K()).subscribe(f=>{o.style("transform",f).attr("opacity",0).transition().attr("opacity",1)});const a=q({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(I(i),Y(async f=>{const h=f.gridAxesOppositeTransform.rotate+f.fullParams.tickTextRotate;return`translate(${f.gridAxesOppositeTransform.translate[0]}px, ${f.gridAxesOppositeTransform.translate[1]}px) rotate(${h}deg) rotateX(${f.gridAxesOppositeTransform.rotateX}deg) rotateY(${f.gridAxesOppositeTransform.rotateY}deg)`}),K()),u=new et(f=>{q({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(I(i),Y(async h=>h)).subscribe(h=>{const p=h.computedData[0]?h.computedData[0].length-1:0,d=h.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[0]-h.fullDataFormatter.groupAxis.scalePadding,g=h.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?p+h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[1]+h.fullDataFormatter.groupAxis.scalePadding,m=h.computedData[0]?h.computedData[0].length:0;let y=h.fullDataFormatter.grid.seriesType==="row"?(h.computedData[0]??[]).map(A=>A.groupLabel):h.computedData.map(A=>A[0].groupLabel);const _=new Array(m).fill(0).map((A,b)=>y[b]!=null?y[b]:String(b)).filter((A,b)=>b>=d&&b<=g),v=h.fullDataFormatter.groupAxis.scalePadding,x=B2({axisLabels:_,axisWidth:h.gridAxesSize.width,padding:v});f.next(x)})}),c=n.fullDataFormatter$.pipe(I(i),U(f=>{let h="middle",l="hanging";return f.groupAxis.position==="bottom"?(h="middle",l="hanging"):f.groupAxis.position==="top"?(h="middle",l="auto"):f.groupAxis.position==="left"?(h="end",l="middle"):f.groupAxis.position==="right"&&(h="start",l="middle"),{textAnchor:h,dominantBaseline:l}})),s=n.fullDataFormatter$.pipe(I(i),U(f=>{let h="start",l="hanging";return f.groupAxis.position==="bottom"?l="hanging":f.groupAxis.position==="top"?l="auto":f.groupAxis.position==="left"?h="end":f.groupAxis.position==="right"&&(h="start"),f.valueAxis.position==="left"?h="start":f.valueAxis.position==="right"?h="end":f.valueAxis.position==="bottom"?l="auto":f.valueAxis.position==="top"&&(l="hanging"),{textAnchor:h,dominantBaseline:l}}));return q({params:n.fullParams$,tickTextAlign:c,axisLabelAlign:s,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,chartParams:n.fullChartParams$,groupScale:u,contentTransform:a}).pipe(I(i),Y(async f=>f)).subscribe(f=>{xL({selection:o,params:f.params,tickTextAlign:f.tickTextAlign,axisLabelAlign:f.axisLabelAlign,gridAxesSize:f.gridAxesSize,fullDataFormatter:f.fullDataFormatter,chartParams:f.chartParams,groupScale:f.groupScale,contentTransform:f.contentTransform})}),()=>{i.next(void 0)}}),vh="ValueAxis",av=ft(vh,"g"),uv=ft(vh,"text"),sv=6;function wL({selection:t,fullParams:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:u,contentTransform:c,minAndMax:s}){const f=t.selectAll(`g.${av}`).data([e]).join("g").classed(av,!0);t.selectAll(`g.${uv}`).data([e]).join("g").classed(uv,!0).each((g,m,y)=>{j(y[m]).selectAll("text").data([g]).join(_=>_.append("text").style("font-weight","bold"),_=>_,_=>_.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",It(e.labelColorType,a)).style("transform",c).text(_=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+e.labelOffset[0]}, ${i.height+g.tickPadding+e.labelOffset[1]})`);const h=s[1]-s[0],l=Rs(u).scale(u).ticks(h>e.ticks?e.ticks:s[0]===0&&s[1]===0?1:Math.ceil(h)).tickFormat(g=>ys(g,e.tickFormat)).tickSize(e.tickFullLine==!0?-i.width:sv).tickPadding(e.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?It(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?It(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",It(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`-${e.tickPadding+sv} 0`).style("transform",c),f}const AL=Ue(vh,$s)(({selection:t,name:e,observer:n,subject:r})=>{const i=new mt,o=t.append("g");n.gridAxesTransform$.pipe(I(i),U(h=>h.value),K()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=q({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(I(i),Y(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),K()),u=new et(h=>{q({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(I(i),Y(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,y=l.computedData.map((v,x)=>v.filter((A,b)=>b>=g&&b<=m)),_=CN(y.flat());h.next(_)})}),c=new et(h=>{q({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,minAndMax:u}).pipe(I(i),Y(async l=>l)).subscribe(l=>{const p=dh({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),s=n.fullDataFormatter$.pipe(I(i),U(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=n.fullDataFormatter$.pipe(I(i),U(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return q({fullParams:n.fullParams$,tickTextAlign:s,axisLabelAlign:f,computedData:n.computedData$,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:u}).pipe(I(i),Y(async h=>h)).subscribe(h=>{wL({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),xh="ValueStackAxis",cv=ft(xh,"g"),lv=ft(xh,"text"),fv=6;function $L({selection:t,fullParams:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:u,contentTransform:c,minAndMax:s}){const f=t.selectAll(`g.${cv}`).data([e]).join("g").classed(cv,!0);t.selectAll(`g.${lv}`).data([e]).join("g").classed(lv,!0).each((g,m,y)=>{j(y[m]).selectAll("text").data([g]).join(_=>_.append("text").style("font-weight","bold"),_=>_,_=>_.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",It(e.labelColorType,a)).style("transform",c).text(_=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+e.labelOffset[0]}, ${i.height+g.tickPadding+e.labelOffset[1]})`);const h=s[1]-s[0],l=Rs(u).scale(u).ticks(h>e.ticks?e.ticks:s[0]===0&&s[1]===0?1:Math.ceil(h)).tickFormat(g=>ys(g,e.tickFormat)).tickSize(e.tickFullLine==!0?-i.width:fv).tickPadding(e.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?It(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?It(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",It(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`-${e.tickPadding+fv} 0`).style("transform",c),f}const ML=Ue(xh,Lh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new mt,o=t.append("g");n.gridAxesTransform$.pipe(I(i),U(h=>h.value),K()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=q({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(I(i),Y(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),K()),u=new et(h=>{q({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(I(i),Y(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,y=l.computedData.map((x,A)=>x.filter((b,w)=>w>=g&&w<=m)),_=new Array(y[0]?y[0].length:0).fill(null).map((x,A)=>y.reduce((b,w)=>{if(w&&w[A]){const M=w[A].value==null||w[A].visible==!1?0:w[A].value;return b+M}return b},0)),v=X2(_);h.next(v)})}),c=new et(h=>{q({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,minAndMax:u}).pipe(I(i),Y(async l=>l)).subscribe(l=>{const p=dh({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),s=n.fullDataFormatter$.pipe(I(i),U(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=n.fullDataFormatter$.pipe(I(i),U(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return q({fullParams:n.fullParams$,tickTextAlign:s,axisLabelAlign:f,computedData:n.computedData$,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:u}).pipe(I(i),Y(async h=>h)).subscribe(h=>{$L({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),hv="ScalingArea",SL=ft(hv,"rect"),TL=Ue(hv,Ch)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new mt,a=e.insert("rect","g").classed(SL,!0).attr("opacity",0);let u={k:1,x:0,y:0};r.layout$.pipe(I(o)).subscribe(s=>{a.attr("width",s.width).attr("height",s.height).attr("x",s.left).attr("y",s.top)});const c=r.computedData$.pipe(U(s=>s[0]?s[0].length-1:0),K());return q({initGroupAxis:r.fullDataFormatter$.pipe(U(s=>s.groupAxis),so()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:c,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(I(o),Y(async s=>s)).subscribe(s=>{const h=s.groupMaxIndex,l=s.initGroupAxis.scaleDomain[0]==="auto"?0-s.initGroupAxis.scalePadding:s.initGroupAxis.scaleDomain[0]-s.initGroupAxis.scalePadding,p=s.initGroupAxis.scaleDomain[1]==="auto"?h+s.initGroupAxis.scalePadding:s.initGroupAxis.scaleDomain[1]+s.initGroupAxis.scalePadding,d=s.fullDataFormatter.valueAxis.position==="left"||s.fullDataFormatter.valueAxis.position==="top"?[0,1]:[1,0],m=dh({maxValue:s.groupMaxIndex,minValue:0,axisWidth:s.axisSize.width,scaleDomain:[l,p],scaleRange:d}).copy(),y=Ny().on("zoom",function(v){const x=v.transform,A=w=>{const M=Math.round(w);return Math.min(h,Math.max(0,M))},b=s.fullDataFormatter.groupAxis.position==="bottom"||s.fullDataFormatter.groupAxis.position==="top"?x.rescaleX(m).domain().map(A):x.rescaleY(m).domain().map(A);b[0]<=0&&b[1]>=h?x.k<u.k&&(x.k=u.k,x.x=u.x,x.y=u.y):b[1]-b[0]<=1&&x.k>u.k&&(x.k=u.k,x.x=u.x,x.y=u.y),u.k=x.k,u.x=x.x,u.y=x.y,i.dataFormatter$.next({...s.fullDataFormatter,groupAxis:{...s.fullDataFormatter.groupAxis,scaleDomain:b}})});e.call(y)}),()=>{o.next(void 0),a.remove()}});function PL(t,e){let n=new et(()=>{});return t.each(function(){const r=zf(this,e);n=Of(n,r)}),n}const _h="GroupArea",wh=ft(_h,"label-box");function DL({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function kL({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ft(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),u=a.enter().append("line").classed(o,!0).style("stroke",s=>It(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),c=a.merge(u);return a.exit().remove(),u.attr("x1",s=>s.x1).attr("y1",s=>s.y1).attr("x2",s=>s.x2).attr("y2",s=>s.y2),a.transition().duration(50).attr("x1",s=>s.x1).attr("y1",s=>s.y1).attr("x2",s=>s.x2).attr("y2",s=>s.y2),c}function EL(t){t.selectAll("line").data([]).exit().remove()}function NL({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:ys(t,n.labelTextFormat)}]:[]}function LL({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesOppositeTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${wh}`).data(e),u=a.enter().append("g").classed(wh,!0).style("cursor","pointer"),c=u.merge(a);return u.attr("transform",(s,f)=>`translate(${s.x}, ${s.y})`),a.transition().duration(50).attr("transform",(s,f)=>`translate(${s.x}, ${s.y})`),a.exit().remove(),c.each((s,f,h)=>{const l=H2(s.text,r.styles.textSize)+12,p=-l/2,d=j(h[f]).selectAll("rect").data([s]),g=d.enter().append("rect").attr("height",`${o}px`).attr("fill",_=>It(n.labelColorType,r)).attr("x",p).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");d.merge(g).attr("width",_=>`${l}px`).style("transform",i),d.exit().remove();const m=j(h[f]).selectAll("text").data([s]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(_=>_.text).style("transform",i).attr("fill",_=>It(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",p+6),m.exit().remove()}),c}function CL(t){t.selectAll(`g.${wh}`).data([]).exit().remove()}const IL=Ue(_h,Ph)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new mt,a=e.insert("rect","g").classed(ft(_h,"rect"),!0).attr("opacity",0),u=t.append("g");i.layout$.pipe(I(o)).subscribe(l=>{a.attr("width",l.rootWidth).attr("height",l.rootHeight)}),i.gridAxesTransform$.pipe(I(o),U(l=>l.value),K()).subscribe(l=>{u.style("transform",l)});const c=new et(l=>{q({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(I(o),Y(async p=>p)).subscribe(p=>{const g=p.computedData[0]?p.computedData[0].length-1:0,m=p.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[0]-p.fullDataFormatter.groupAxis.scalePadding,y=p.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?g+p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[1]+p.fullDataFormatter.groupAxis.scalePadding,_=p.computedData[0]?p.computedData[0].length:0;let v=p.fullDataFormatter.grid.seriesType==="row"?(p.computedData[0]??[]).map(w=>w.groupLabel):p.computedData.map(w=>w[0].groupLabel);const x=new Array(_).fill(0).map((w,M)=>v[M]!=null?v[M]:String(M)).filter((w,M)=>M>=m&&M<=y),A=p.fullDataFormatter.groupAxis.scalePadding,b=B2({axisLabels:x,axisWidth:p.gridAxesSize.width,padding:A});l.next(b)})}),s=V2({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),f=i.fullChartParams$.pipe(I(o),U(l=>l.highlightTarget),K());return q({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:s,groupScale:c}).pipe(I(o),Y(async l=>l)).subscribe(l=>{e.on("mouseover",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mousemove",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mouseout",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("click",(p,d)=>{p.stopPropagation();const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})})}),q({event:r.event$.pipe(Bu(l=>l.eventName==="mouseover"||l.eventName==="mousemove")),computedData:i.computedData$,groupScale:c,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,gridAxesOppositeTransform:i.gridAxesOppositeTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:s}).pipe(I(o),Y(async l=>l)).subscribe(l=>{const p=l.groupScale(l.event.groupLabel)??0,d=DL({groupLabel:l.event.groupLabel,axisX:p,axisHeight:l.gridAxesSize.height,fullParams:l.fullParams});kL({selection:u,pluginName:n,lineData:d,fullParams:l.fullParams,fullChartParams:l.fullChartParams});const g=NL({groupLabel:l.event.groupLabel,axisX:p,fullParams:l.fullParams});LL({selection:u,labelData:g,fullParams:l.fullParams,fullChartParams:l.fullChartParams,gridAxesOppositeTransformValue:l.gridAxesOppositeTransform.value}).on("mouseover",(y,_)=>{const{groupIndex:v,groupLabel:x}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:x,event:y,data:l.computedData})}).on("mousemove",(y,_)=>{const{groupIndex:v,groupLabel:x}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:x,event:y,data:l.computedData})}).on("mouseout",(y,_)=>{const{groupIndex:v,groupLabel:x}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:x,event:y,data:l.computedData})}).on("click",(y,_)=>{const{groupIndex:v,groupLabel:x}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:x,event:y,data:l.computedData})})}),PL(a,"mouseout").pipe(I(o)).subscribe(l=>{console.log("rootMouseout"),EL(u),CL(u)}),()=>{o.next(void 0),a.remove()}}),pv={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},dv={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.map(r=>r.value).join(",");return[e,n]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.groups.map(r=>r.value).join(",");return[e,n]}return[]},svgRenderFn:null},RL=q2("Container",pv)(({selection:t})=>function(){}),Ah="Tooltip",gv=ft(Ah,"g"),FL=ft(Ah,"box");function zL(t,e){const n=e.textSize*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function OL({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const u=5,c=i?[i]:[],s=i?[o]:[],h=t.selectAll(`g.${gv}`).data(c).join(x=>x.append("g").classed(gv,!0).attr("pointer-events","none"),x=>x,x=>x.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${FL}`).data(s).join(x=>x.append("g").classed(ft(e,"box"),!0)),l=h.selectAll("rect").data(s).join(x=>x.append("rect").attr("rx",u).attr("ry",u)).attr("fill",x=>x.backgroundColor).attr("stroke",x=>x.strokeColor).attr("opacity",x=>x.backgroundOpacity),p=h.selectAll("g").data(c).join(x=>x.append("g").classed(ft(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));c.length&&LN(p,c[0]);const d=p!=null&&p.node()?W2(p):{width:0,height:0};l.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=h!=null&&h.node()?W2(h):{width:0,height:0},m=n-g.width,y=r-g.height,_=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],v=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",x=>`translate(${_}, ${v})`),h.attr("transform",x=>`translate(${_}, ${v})`)}const GL=q2(Ah,dv)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new mt,u=o.event$.pipe(I(a),Bu(d=>d.eventName==="mouseover"||d.eventName==="mousemove")),c=o.event$.pipe(I(a),Bu(d=>d.eventName==="mouseout")),s=q({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(I(a),Y(async d=>d),U(d=>({backgroundColor:It(d.fullParams.backgroundColorType,d.fullChartParams),backgroundOpacity:d.fullParams.backgroundOpacity,strokeColor:It(d.fullParams.strokeColorType,d.fullChartParams),offset:d.fullParams.offset,padding:d.fullParams.padding,textSize:d.fullChartParams.styles.textSize,textColor:It(d.fullParams.textColorType,d.fullChartParams)}))),f=q({fullParams:i.fullParams$,tooltipStyle:s}).pipe(I(a),Y(async d=>d),U(d=>d.fullParams.svgRenderFn?d.fullParams.svgRenderFn:g=>{const m=d.fullParams.textRenderFn(g);return zL(m,d.tooltipStyle)})),h=q({event:u,contentRenderFn:f}).pipe(I(a),Y(async d=>d),U(d=>d.contentRenderFn(d.event))),l=c.pipe(I(a),U(d=>"")),p=Of(u,c).pipe(I(a),U(d=>d.event));return q({svgString:Of(h,l),event:p,layout:i.layout$,tooltipStyle:s}).pipe(I(a),Y(async d=>d)).subscribe(d=>{OL({rootSelection:e,pluginName:n,rootWidth:d.layout.rootWidth,rootHeight:d.layout.rootHeight,svgString:d.svgString,tooltipStyle:d.tooltipStyle,event:d.event})}),function(){a.next(void 0)}}),mv={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,scaleType:"area"},yv={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},bv={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},vv={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},xv={position:"right",justify:"end",padding:28,gap:10,rectRadius:0};function UL(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function u(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function c(p){var g;const d=document.createElement("canvas").getContext("2d");return((g=d==null?void 0:d.measureText(p))==null?void 0:g.width)??0}function s(p){const d=c(p.trim());return Math.sqrt(d*r)}function f(p,d){let g={width:0,text:""},m=1/0;const y=[];let _=" ";i&&(_="");for(let v=0,x=p.length;v<x;++v){const A=(g.text?g.text+_:"")+p[v],b=c(A);(m+b)/2<d?(g.width=m=b,g.text=A):(m=c(p[v]),g={width:m,text:p[v]},y.push(g))}return y}function h(p){let d=0;for(let g=0,m=p.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,_=p[g].width/2;d=Math.max(d,Math.sqrt(_**2+y**2))}return d}function l(p,d){o>0&&(d=u(d,o));const g=a(d),m=s(d),y=f(g,m),_=h(y);let v=p.select("text");v.size()||(v=p.append("text")),v.attr("transform",`translate(0,0) scale(${n/_})`);const x=v.selectAll("tspan").data(y),A=x.enter().append("tspan").attr("x",0).merge(x).attr("y",(b,w)=>(w-y.length/2+.8)*r).text(b=>b.text);return x.exit().remove(),x.merge(A)}return l(t,e)}let nr;function YL(t,e){return ad().velocityDecay(e.force.velocityDecay).force("collision",rd().radius(n=>n.r+e.force.collisionSpacing)).force("charge",ud().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function BL({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,u=n*a;return Math.pow(u/Math.PI,.5)*.75}function qL({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(p=>p.value!=null&&p.visible!=!1),u=Math.max(...a.map(p=>p.value)),c=a.reduce((p,d)=>p+(d.value??0),0)/a.length,s=BL({data:a,bubbleGroupR:o,maxValue:u,avgValue:c}),f=i==="area"?.5:1,h=hu().domain([0,u]).range([0,s]).exponent(f);return a.map(p=>{const d=p,g=e.get(p.id);g?(d.x=g.x,d.y=g.y):(d.x=Math.random()*n,d.y=Math.random()*r);const m=h(d.value??0);return d.r=m,d._originR=m,d})}function _v({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,u,c)=>{const s=j(c[u]);let f=!0;a.label.length<=n.bubbleText.lineLengthMin&&(f=!1),s.call(UL,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:f})}),o}function WL({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function HL(){return x0().on("start",(t,e)=>{t.active||nr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||nr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function wv({fullParams:t,graphicWidth:e,graphicHeight:n}){nr.force("x",sd().strength(t.force.strength).x(0)).force("y",cd().strength(t.force.strength).y(0)),nr.alpha(1).restart()}function XL({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=j(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(fa).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const VL=Mo("Bubbles",mv)(({selection:t,name:e,observer:n,subject:r})=>{const i=new mt,o=t.append("g"),a=new mt;let u=new Map;n.layout$.pipe(so()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(I(i)).subscribe(l=>{t.transition().attr("transform",`translate(${l.width/2}, ${l.height/2})`)})});const c=n.fullParams$.pipe(I(i),U(h=>h.scaleType),K()),s=new et(h=>{q({layout:n.layout$,computedData:n.computedData$,scaleType:c}).pipe(I(i),Y(async l=>l)).subscribe(l=>{const p=qL({data:l.computedData,LastBubbleDataMap:u,graphicWidth:l.layout.width,graphicHeight:l.layout.height,scaleType:l.scaleType});h.next(p)})});s.subscribe(h=>{u=new Map(h.map(l=>[l.id,l]))});const f=n.fullChartParams$.pipe(I(i),U(h=>h.highlightTarget),K());return q({layout:n.layout$,computedData:n.computedData$,bubblesData:s,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:f}).pipe(I(i),Y(async h=>h)).subscribe(h=>{const l=_v({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});nr=YL(l,h.fullParams),l.on("mouseover",(p,d)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("mousemove",(p,d)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("mouseout",(p,d)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("click",(p,d)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).call(HL()),nr.nodes(h.bubblesData),wv({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(l)}),q({bubblesSelection:a,bubblesData:s,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(I(i),Y(async h=>h)).subscribe(h=>{XL({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(WL({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),_v({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),wv({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),nr.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function Av({computedDataSeries:t,startAngle:e,endAngle:n}){return Wm().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let u=o;return u.id=o.data.id,u})}const $v="Pie",jL=ft($v,"path");function ZL({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((u,c)=>{const s=r[c]??{startAngle:0,endAngle:0,value:0};return{...u,startAngle:u.startAngle*o+s.startAngle*(1-o),endAngle:u.endAngle*o+s.endAngle*(1-o),value:u.value*o+s.value*(1-o)}});return $h(a,i.startAngle,i.endAngle,1)}:o=>$h(n,i.startAngle,i.endAngle,o)}function $h(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,u=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:u}})}function Mv({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,u=>u.id),i=r.enter().append("path").classed(jL,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(u,c)=>u.data.color).attr("d",(u,c)=>n(u)),o.remove(),a}function KL({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,u)=>{const c=j(u[a]);e.includes(o.data.id)?c.style("opacity",1).transition("highlight").ease(fa).duration(500).attr("d",s=>i(s)):c.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",s=>r(s))})}const QL=Mo($v,yv)(({selection:t,name:e,observer:n,subject:r})=>{const i=new mt,o=t.append("g"),a=new mt;let u=[],c=[];n.layout$.pipe(so()).subscribe(d=>{t.attr("transform",`translate(${d.width/2}, ${d.height/2})`),n.layout$.pipe(I(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const s=n.layout$.pipe(I(i),U(d=>d.width<d.height?d.width:d.height)),f=new et(d=>{q({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(I(i),Y(async g=>g)).subscribe(g=>{const m=Av({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});d.next(m)})}),h=new et(d=>{q({shorterSideWith:s,fullParams:n.fullParams$}).pipe(I(i),Y(async g=>g)).subscribe(g=>{const m=ms({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});d.next(m)})}),l=new et(d=>{q({shorterSideWith:s,fullParams:n.fullParams$}).pipe(I(i),Y(async g=>g)).subscribe(g=>{const m=ms({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});d.next(m)})}),p=n.fullChartParams$.pipe(I(i),U(d=>d.highlightTarget),K());return q({pieData:f,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:l,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:p}).pipe(I(i),Y(async d=>d)).subscribe(d=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(d.pieData,v=>v.data.id),m=g.enter(),y=g.exit();const _=ZL({enter:m,exit:y,data:d.pieData,lastData:u,fullParams:d.fullParams});o.transition("graphicMove").duration(d.fullChartParams.transitionDuration).ease(Jr(d.fullChartParams.transitionEase)).tween("move",(v,x)=>A=>{c=_(A),Mv({selection:o,renderData:c,arc:d.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:d.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:d.computedData})}).on("end",(v,x)=>{c=$h(d.pieData,d.fullParams.startAngle,d.fullParams.endAngle,1);const A=Mv({selection:o,renderData:c,arc:d.arc});a.next(A),u=Object.assign([],d.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:d.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:d.computedData}),A.on("mouseover",(b,w)=>{b.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:d.highlightTarget,datum:w.data,series:d.SeriesDataMap.get(w.data.seriesLabel),seriesIndex:w.data.seriesIndex,seriesLabel:w.data.seriesLabel,event:b,data:d.computedData})}).on("mousemove",(b,w)=>{b.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:d.highlightTarget,datum:w.data,series:d.SeriesDataMap.get(w.data.seriesLabel),seriesIndex:w.data.seriesIndex,seriesLabel:w.data.seriesLabel,event:b,data:d.computedData})}).on("mouseout",(b,w)=>{b.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:d.highlightTarget,datum:w.data,series:d.SeriesDataMap.get(w.data.seriesLabel),seriesIndex:w.data.seriesIndex,seriesLabel:w.data.seriesLabel,event:b,data:d.computedData})}).on("click",(b,w)=>{b.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:d.highlightTarget,datum:w.data,series:d.SeriesDataMap.get(w.data.seriesLabel),seriesIndex:w.data.seriesIndex,seriesLabel:w.data.seriesLabel,event:b,data:d.computedData})})})}),q({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:l}).pipe(I(i),Y(async d=>d)).subscribe(d=>{KL({pathSelection:d.pathSelection,ids:d.highlight,fullChartParams:d.fullChartParams,arc:d.arc,arcMouseover:d.arcMouseover})}),()=>{i.next(void 0)}}),Sv="PieEventTexts",Tv=ft(Sv,"text");function Mh(t,e){const n=t.selectAll(`text.${Tv}`).data(e),r=n.enter().append("text").classed(Tv,!0),i=n.merge(r);return i.each((o,a,u)=>{const c=j(u[a]).text(o.text);Object.keys(o.attr).forEach(s=>{c.attr(s,o.attr[s])}),Object.keys(o.style).forEach(s=>{c.style(s,o.style[s])})}),n.exit().remove(),i}function Sh({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((u,c)=>({text:u,attr:i[c],style:o[c]}))}const JL=Mo(Sv,bv)(({selection:t,name:e,observer:n,subject:r})=>{const i=new mt,o=t.append("g");let a;n.layout$.pipe(so()).subscribe(c=>{t.attr("transform",`translate(${c.width/2}, ${c.height/2})`),n.layout$.pipe(I(i)).subscribe(s=>{t.transition().attr("transform",`translate(${s.width/2}, ${s.height/2})`)})});const u=n.fullChartParams$.pipe(I(i),U(c=>c.highlightTarget),K());return q({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:u}).pipe(I(i),Y(async c=>c)).subscribe(c=>{o.transition().duration(c.fullChartParams.transitionDuration).ease(Jr(c.fullChartParams.transitionEase)).tween("move",(s,f)=>h=>{const l=Sh({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:s,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});Mh(o,l)}).on("end",(s,f)=>{const h=Sh({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:s,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});Mh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(l=>{const p=Sh({eventData:l,eventName:l.eventName,t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});Mh(o,p)})})}),()=>{i.next(void 0)}}),Pv="PieLabels",tC=ft(Pv,"text");function eC(t,e,n,r){return t.map((i,o)=>{const[a,u]=e.centroid(i),[c,s]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:u*r,mouseoverX:c*r,mouseoverY:s*r}}).filter(i=>i.pieDatum.data.visible)}function nC(t,e,n,r){let i=t.selectAll("text").data(e,c=>c.pieDatum.id),o=i.enter().append("text").classed(tC,!0),a=i.exit();o.append("text");const u=i.merge(o);return u.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",c=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(c=>n.labelFn(c.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(c,s)=>mh({datum:c.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",c=>"translate("+c.x+","+c.y+")"),a.remove(),u}function rC({labelSelection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=j(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",u=>"translate("+u.mouseoverX+","+u.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",u=>"translate("+u.x+","+u.y+")")})}const iC=Mo(Pv,vv)(({selection:t,observer:e,subject:n})=>{const r=new mt,i=t.append("g");let o=new mt,a=[];return e.layout$.pipe(so()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),e.layout$.pipe(I(r)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})}),q({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(r),Y(async u=>u)).subscribe(u=>{const c=u.layout.width<u.layout.height?u.layout.width:u.layout.height,s=ms({axisWidth:c,innerRadius:0,outerRadius:u.fullParams.outerRadius,padAngle:0,cornerRadius:0}),f=ms({axisWidth:c,innerRadius:0,outerRadius:u.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=Av({computedDataSeries:u.computedData,startAngle:u.fullParams.startAngle,endAngle:u.fullParams.endAngle});a=eC(h,s,f,u.fullParams.labelCentroid);const l=nC(i,a,u.fullParams,u.fullChartParams);o.next(l)}),q({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(I(r),Y(async u=>u)).subscribe(u=>{rC({labelSelection:u.labelSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{r.next(void 0)}}),As="SeriesLegend",Dv=ft(As,"box"),oC=ft(As,"legend-list"),kv=ft(As,"item");function aC({itemSelection:t,lengendList:e,seriesLabel:n,fullParams:r,fullChartParams:i}){t.each((o,a,u)=>{j(u[a]).selectAll("rect").data([o]).join("rect").attr("width",i.styles.textSize).attr("height",i.styles.textSize).attr("fill",c=>c.color).attr("rx",r.rectRadius),j(u[a]).selectAll("text").data([o]).join(c=>c.append("text").attr("dominant-baseline","hanging"),c=>c,c=>c.remove()).attr("x",i.styles.textSize*1.5).attr("font-size",i.styles.textSize).text(c=>c.text)})}const uC=Mo(As,xv)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new mt,o=n.SeriesDataMap$.pipe(I(i),U(p=>Array.from(p.keys()))),a=n.fullParams$.pipe(I(i),U(p=>p.position==="bottom"||p.position==="top"?"row":"column")),u=q({fullParams:n.fullParams$,layout:n.layout$}).pipe(I(i),U(p=>p.fullParams.position==="bottom"||p.fullParams.position==="top"?p.layout.rootWidth-2:p.layout.rootHeight-2)),s=q({layout:n.layout$,fullParams:n.fullParams$}).pipe(I(i),Y(async p=>p),U(p=>{let d=0,g=0;return p.fullParams.position==="bottom"?(g=p.layout.rootHeight,p.fullParams.justify==="start"?d=0:p.fullParams.justify==="center"?d=p.layout.rootWidth/2:p.fullParams.justify==="end"&&(d=p.layout.rootWidth)):p.fullParams.position==="right"?(d=p.layout.rootWidth,p.fullParams.justify==="start"?g=0:p.fullParams.justify==="center"?g=p.layout.rootHeight/2:p.fullParams.justify==="end"&&(g=p.layout.rootHeight)):p.fullParams.position==="top"?(g=0,p.fullParams.justify==="start"?d=0:p.fullParams.justify==="center"?d=p.layout.rootWidth/2:p.fullParams.justify==="end"&&(d=p.layout.rootWidth)):p.fullParams.position==="left"&&(d=0,p.fullParams.justify==="start"?g=0:p.fullParams.justify==="center"?g=p.layout.rootHeight/2:p.fullParams.justify==="end"&&(g=p.layout.rootHeight)),{x:d,y:g}})).pipe(I(i),U(p=>e.selectAll(`g.${Dv}`).data([p]).join(d=>d.append("g").classed(Dv,!0).attr("transform",g=>`translate(${g.x}, ${g.y})`),d=>d.transition().attr("transform",g=>`translate(${g.x}, ${g.y})`),d=>d.remove()))),f=q({layout:n.layout$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,seriesLabels:o,lineDirection:a,lineMaxSize:u}).pipe(I(i),Y(async p=>p),U(p=>{const d=p.seriesLabels.reduce((v,x,A)=>{const b=H2(x,p.fullChartParams.styles.textSize),w=p.fullChartParams.styles.textSize*1.5+b,M=IN(A,p.fullChartParams),$=v[0]&&v[0][0]?v[v.length-1][v[v.length-1].length-1]:null,{translateX:D,translateY:S,lineIndex:N,itemIndex:E}=((T,k,P)=>{let L=0,C=0,R=0,z=0;if(T.lineDirection==="column"){let G=P?P.translateY+T.fullChartParams.styles.textSize+T.fullParams.gap:0;if(G+T.fullChartParams.styles.textSize>T.lineMaxSize){R=P.lineIndex+1,z=0,C=0;const H=k[k.length-1].reduce((st,at)=>at.itemWidth>st?at.itemWidth:st,0);L=P.translateX+H+T.fullParams.gap}else R=P?P.lineIndex:0,z=P?P.itemIndex+1:0,C=G,L=P?P.translateX:0}else{let G=P?P.translateX+P.itemWidth+T.fullParams.gap:0;G+w>T.lineMaxSize?(R=P.lineIndex+1,z=0,L=0):(R=P?P.lineIndex:0,z=P?P.itemIndex+1:0,L=G),C=(T.fullChartParams.styles.textSize+T.fullParams.gap)*R}return{translateX:L,translateY:C,lineIndex:R,itemIndex:z}})(p,v,$);return v[N]||(v[N]=[]),v[N].push({id:x,seriesLabel:x,seriesIndex:A,lineIndex:N,itemIndex:E,text:x,itemWidth:w,translateX:D,translateY:S,color:M}),v},[]),{width:g,height:m,translateX:y,translateY:_}=((v,x)=>{let A=0,b=0,w=0,M=0;if(!x.length||!x[0].length)return{width:A,height:b,translateX:w,translateY:M};const $=x[0][x[0].length-1];return v.lineDirection==="column"?(A=x.reduce((D,S)=>{const N=S.reduce((E,T)=>T.itemWidth>E?T.itemWidth:E,0);return D+N},0),b=$.translateY+v.fullChartParams.styles.textSize+v.fullParams.gap):(A=$.translateX+$.itemWidth,b=v.fullChartParams.styles.textSize*x.length+v.fullParams.gap*(x.length-1)),v.fullParams.position==="left"?v.fullParams.justify==="start"?(w=v.fullParams.padding,M=v.fullParams.padding):v.fullParams.justify==="center"?(w=v.fullParams.padding,M=-b/2):v.fullParams.justify==="end"&&(w=v.fullParams.padding,M=-b-v.fullParams.padding):v.fullParams.position==="right"?v.fullParams.justify==="start"?(w=-A-v.fullParams.padding,M=v.fullParams.padding):v.fullParams.justify==="center"?(w=-A-v.fullParams.padding,M=-b/2):v.fullParams.justify==="end"&&(w=-A-v.fullParams.padding,M=-b-v.fullParams.padding):v.fullParams.position==="top"?v.fullParams.justify==="start"?(w=v.fullParams.padding,M=v.fullParams.padding):v.fullParams.justify==="center"?(w=-A/2,M=v.fullParams.padding):v.fullParams.justify==="end"&&(w=-A-v.fullParams.padding,M=v.fullParams.padding):v.fullParams.justify==="start"?(w=v.fullParams.padding,M=-b-v.fullParams.padding):v.fullParams.justify==="center"?(w=-A/2,M=-b-v.fullParams.padding):v.fullParams.justify==="end"&&(w=-A-v.fullParams.padding,M=-b-v.fullParams.padding),{width:A,height:b,translateX:w,translateY:M}})(p,d);return{direction:p.lineDirection,width:g,height:m,translateX:y,translateY:_,list:d}})),l=q({boxSelection:s,fullParams:n.fullParams$,lengendList:f}).pipe(I(i),Y(async p=>p),U(p=>p.boxSelection.selectAll("g").data([p.lengendList]).join(d=>d.append("g").classed(oC,!0).attr("transform",g=>`translate(${g.translateX}, ${g.translateY})`),d=>d.transition().attr("transform",g=>`translate(${g.translateX}, ${g.translateY})`),d=>d.remove()))).pipe(I(i),U(p=>{const d=p.data(),g=d[0]?d[0].list.flat():[];return p.selectAll(`g.${kv}`).data(g).join(m=>m.append("g").classed(kv,!0).attr("cursor","default"),m=>m,m=>m.remove()).attr("transform",(m,y)=>`translate(${m.translateX}, ${m.translateY})`)}));return q({itemSelection:l,lengendList:f,seriesLabels:o,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$}).pipe(I(i),Y(async p=>p)).subscribe(p=>{aC({itemSelection:p.itemSelection,lengendList:p.lengendList,seriesLabel:p.seriesLabels,fullParams:p.fullParams,fullChartParams:p.fullChartParams})}),()=>{i.next(void 0)}});nt.BarStack=iL,nt.Bars=KN,nt.BarsTriangle=pL,nt.Bubbles=VL,nt.CONTAINER_PLUGIN_PARAMS=pv,nt.Container=RL,nt.DEFAULT_BARS_PLUGIN_PARAMS=Dh,nt.DEFAULT_BARS_TRIANGLE_PLUGIN_PARAMS=Eh,nt.DEFAULT_BAR_STACK_PLUGIN_PARAMS=kh,nt.DEFAULT_BUBBLES_PLUGIN_PARAMS=mv,nt.DEFAULT_DOTS_PLUGIN_PARAMS=Th,nt.DEFAULT_GROUPING_AXIS_PLUGIN_PARAMS=Nh,nt.DEFAULT_GROUP_AREA_PLUGIN_PARAMS=Ph,nt.DEFAULT_LINES_PLUGIN_PARAMS=rr,nt.DEFAULT_PIE_EVENT_TEXTS_PARAMS=bv,nt.DEFAULT_PIE_LABELS_PARAMS=vv,nt.DEFAULT_PIE_PLUGIN_PARAMS=yv,nt.DEFAULT_SCALING_AREA_PLUGIN_PARAMS=Ch,nt.DEFAULT_SERIES_LEGEND_PARAMS=xv,nt.DEFAULT_VALUE_AXIS_PLUGIN_PARAMS=$s,nt.DEFAULT_VALUE_STACK_AXIS_PLUGIN_PARAMS=Lh,nt.Dots=vL,nt.GroupArea=IL,nt.GroupAxis=_L,nt.Lines=BN,nt.Pie=QL,nt.PieEventTexts=JL,nt.PieLabels=iC,nt.ScalingArea=TL,nt.SeriesLegend=uC,nt.TOOLTIP_PARAMS=dv,nt.Tooltip=GL,nt.ValueAxis=AL,nt.ValueStackAxis=ML,Object.defineProperty(nt,Symbol.toStringTag,{value:"Module"})});