import{P as qt,p as jt}from"./d3-path-Bai4oqrp.js";function d(t){return function(){return t}}const yt=Math.abs,k=Math.atan2,j=Math.cos,Lt=Math.max,rt=Math.min,M=Math.sin,Y=Math.sqrt,T=1e-12,H=Math.PI,Q=H/2,K=2*H;function Xt(t){return t>1?0:t<-1?H:Math.acos(t)}function dt(t){return t>=1?Q:t<=-1?-Q:Math.asin(t)}function Tt(t){let i=3;return t.digits=function(n){if(!arguments.length)return i;if(n==null)i=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);i=e}return t},()=>new qt(i)}function Yt(t){return t.innerRadius}function Ht(t){return t.outerRadius}function It(t){return t.startAngle}function Vt(t){return t.endAngle}function Dt(t){return t&&t.padAngle}function Ft(t,i,n,e,r,_,o,s){var h=n-t,c=e-i,a=o-r,m=s-_,u=m*h-a*c;if(!(u*up*p+q*q&&(B=P,$=E),{cx:B,cy:$,x01:-a,y01:-m,x11:B*(r/N-1),y11:$*(r/N-1)}}function oi(){var t=Yt,i=Ht,n=d(0),e=null,r=It,_=Vt,o=Dt,s=null,h=Tt(c);function c(){var a,m,u=+t.apply(this,arguments),f=+i.apply(this,arguments),y=r.apply(this,arguments)-Q,g=_.apply(this,arguments)-Q,A=yt(g-y),x=g>y;if(s||(s=a=h()),fT))s.moveTo(0,0);else if(A>K-T)s.moveTo(f*j(y),f*M(y)),s.arc(0,0,f,y,g,!x),u>T&&(s.moveTo(u*j(g),u*M(g)),s.arc(0,0,u,g,y,x));else{var w=y,b=g,v=y,N=g,S=A,z=A,B=o.apply(this,arguments)/2,$=B>T&&(e?+e.apply(this,arguments):Y(u*u+f*f)),P=rt(yt(f-u)/2,+n.apply(this,arguments)),E=P,C=P,l,p;if($>T){var q=dt($/u*M(B)),I=dt($/f*M(B));(S-=q*2)>T?(q*=x?1:-1,v+=q,N-=q):(S=0,v=N=(y+g)/2),(z-=I*2)>T?(I*=x?1:-1,w+=I,b-=I):(z=0,w=b=(y+g)/2)}var L=f*j(w),X=f*M(w),V=u*j(N),D=u*M(N);if(P>T){var F=f*j(b),G=f*M(b),nt=u*j(v),st=u*M(v),R;if(AT?C>T?(l=J(nt,st,L,X,f,C,x),p=J(F,G,V,D,f,C,x),s.moveTo(l.cx+l.x01,l.cy+l.y01),CT)||!(S>T)?s.lineTo(V,D):E>T?(l=J(V,D,F,G,u,-E,x),p=J(L,X,nt,st,u,-E,x),s.lineTo(l.cx+l.x01,l.cy+l.y01),Et?1:i>=t?0:NaN}function Ut(t){return t}function ri(){var t=Ut,i=Qt,n=null,e=d(0),r=d(K),_=d(0);function o(s){var h,c=(s=wt(s)).length,a,m,u=0,f=new Array(c),y=new Array(c),g=+e.apply(this,arguments),A=Math.min(K,Math.max(-K,r.apply(this,arguments)-g)),x,w=Math.min(Math.abs(A)/c,_.apply(this,arguments)),b=w*(A<0?-1:1),v;for(h=0;h0&&(u+=v);for(i!=null?f.sort(function(N,S){return i(y[N],y[S])}):n!=null&&f.sort(function(N,S){return n(s[N],s[S])}),h=0,m=u?(A-c*b)/u:0;h0?v*m:0)+b,y[a]={data:s[a],index:h,value:v,startAngle:g,endAngle:x,padAngle:w};return y}return o.value=function(s){return arguments.length?(t=typeof s=="function"?s:d(+s),o):t},o.sortValues=function(s){return arguments.length?(i=s,n=null,o):i},o.sort=function(s){return arguments.length?(n=s,i=null,o):n},o.startAngle=function(s){return arguments.length?(e=typeof s=="function"?s:d(+s),o):e},o.endAngle=function(s){return arguments.length?(r=typeof s=="function"?s:d(+s),o):r},o.padAngle=function(s){return arguments.length?(_=typeof s=="function"?s:d(+s),o):_},o}class St{constructor(i,n){this._context=i,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(i,n){switch(i=+i,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(i,n):this._context.moveTo(i,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+i)/2,this._y0,this._x0,n,i,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,i,this._y0,i,n);break}}this._x0=i,this._y0=n}}function ai(t){return new St(t,!0)}function ci(t){return new St(t,!1)}function O(){}function U(t,i,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+i)/6,(t._y0+4*t._y1+n)/6)}function tt(t){this._context=t}tt.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:U(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,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);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:U(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new tt(t)}function Et(t){this._context=t}Et.prototype={areaStart:O,areaEnd:O,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,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:U(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function li(t){return new Et(t)}function Ct(t){this._context=t}Ct.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,i){switch(t=+t,i=+i,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,e=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(n,e):this._context.moveTo(n,e);break;case 3:this._point=4;default:U(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new Ct(t)}function At(t,i){this._basis=new tt(t),this._beta=i}At.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,n=t.length-1;if(n>0)for(var e=t[0],r=i[0],_=t[n]-e,o=i[n]-r,s=-1,h;++s<=n;)h=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(e+h*_),this._beta*i[s]+(1-this._beta)*(r+h*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const pi=(function t(i){function n(e){return i===1?new tt(e):new At(e,i)}return n.beta=function(e){return t(+e)},n})(.85);function W(t,i,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-i),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function ct(t,i){this._context=t,this._k=(1-i)/6}ct.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:W(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,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:W(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function n(e){return new ct(e,i)}return n.tension=function(e){return t(+e)},n})(0);function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:O,areaEnd:O,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,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:W(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const yi=(function t(i){function n(e){return new ut(e,i)}return n.tension=function(e){return t(+e)},n})(0);function lt(t,i){this._context=t,this._k=(1-i)/6}lt.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,i){switch(t=+t,i=+i,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:W(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function n(e){return new lt(e,i)}return n.tension=function(e){return t(+e)},n})(0);function ft(t,i,n){var e=t._x1,r=t._y1,_=t._x2,o=t._y2;if(t._l01_a>T){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>T){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,a=3*t._l23_a*(t._l23_a+t._l12_a);_=(_*c+t._x1*t._l23_2a-i*t._l12_2a)/a,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/a}t._context.bezierCurveTo(e,r,_,o,t._x2,t._y2)}function Pt(t,i){this._context=t,this._alpha=i}Pt.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,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:ft(this,t,i);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=i}};const mi=(function t(i){function n(e){return i?new Pt(e,i):new ct(e,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Mt(t,i){this._context=t,this._alpha=i}Mt.prototype={areaStart:O,areaEnd:O,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,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:ft(this,t,i);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=i}};const gi=(function t(i){function n(e){return i?new Mt(e,i):new ut(e,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Rt(t,i){this._context=t,this._alpha=i}Rt.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,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,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:ft(this,t,i);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=i}};const vi=(function t(i){function n(e){return i?new Rt(e,i):new lt(e,0)}return n.alpha=function(e){return t(+e)},n})(.5);function zt(t){this._context=t}zt.prototype={areaStart:O,areaEnd:O,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function bi(t){return new zt(t)}function mt(t){return t<0?-1:1}function gt(t,i,n){var e=t._x1-t._x0,r=i-t._x1,_=(t._y1-t._y0)/(e||r<0&&-0),o=(n-t._y1)/(r||e<0&&-0),s=(_*r+o*e)/(e+r);return(mt(_)+mt(o))*Math.min(Math.abs(_),Math.abs(o),.5*Math.abs(s))||0}function vt(t,i){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-i)/2:i}function at(t,i,n){var e=t._x0,r=t._y0,_=t._x1,o=t._y1,s=(_-e)/3;t._context.bezierCurveTo(e+s,r+s*i,_-s,o-s*n,_,o)}function Z(t){this._context=t}Z.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:at(this,this._t0,vt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var n=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,at(this,vt(this,n=gt(this,t,i)),n);break;default:at(this,this._t0,n=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=n}}};function Bt(t){this._context=new $t(t)}(Bt.prototype=Object.create(Z.prototype)).point=function(t,i){Z.prototype.point.call(this,i,t)};function $t(t){this._context=t}$t.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,n,e,r,_){this._context.bezierCurveTo(i,t,e,n,_,r)}};function ki(t){return new Z(t)}function Ti(t){return new Bt(t)}function Ot(t){this._context=t}Ot.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),n===2)this._context.lineTo(t[1],i[1]);else for(var e=bt(t),r=bt(i),_=0,o=1;o=0;--i)r[i]=(o[i]-r[i+1])/_[i];for(_[n-1]=(t[n]+r[n-1])/2,i=0;i=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,i)}break}}this._x=t,this._y=i}};function Ni(t){return new it(t,.5)}function Si(t){return new it(t,0)}function Ei(t){return new it(t,1)}function kt(t){return function(){return t}}function Wt(t){return t[0]}function Zt(t){return t[1]}var ti=Array.prototype.slice;function ii(t){return t.source}function ni(t){return t.target}function si(t){var i=ii,n=ni,e=Wt,r=Zt,_=null;function o(){var s,h=ti.call(arguments),c=i.apply(this,h),a=n.apply(this,h);if(_||(_=s=jt()),t(_,+e.apply(this,(h[0]=c,h)),+r.apply(this,h),+e.apply(this,(h[0]=a,h)),+r.apply(this,h)),s)return _=null,s+""||null}return o.source=function(s){return arguments.length?(i=s,o):i},o.target=function(s){return arguments.length?(n=s,o):n},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:kt(+s),o):e},o.y=function(s){return arguments.length?(r=typeof s=="function"?s:kt(+s),o):r},o.context=function(s){return arguments.length?(_=s??null,o):_},o}function ei(t,i,n,e,r){t.moveTo(i,n),t.bezierCurveTo(i=(i+e)/2,n,i,r,e,r)}function Ci(){return si(ei)}export{Ei as a,wi as b,Ni as c,ki as d,bi as e,Gt as f,mi as g,vi as h,gi as i,xi as j,di as k,yi as l,Ti as m,pi as n,ci as o,ai as p,fi as q,li as r,Si as s,ui as t,hi as u,oi as v,ri as w,Ci as x};