var tn=Object.defineProperty;var O=(s,g)=>tn(s,"name",{value:g,configurable:!0});import{M as on,N as un,O as Z,P as S,Q as V,R as rn,S as y,T as fn,V as z,W as nn,X as sn,Y as o,Z as ln,$ as cn,a0 as yn}from"./mermaid.core-Eyq-ET19.js";function gn(s){return s.innerRadius}O(gn,"arcInnerRadius");function dn(s){return s.outerRadius}O(dn,"arcOuterRadius");function mn(s){return s.startAngle}O(mn,"arcStartAngle");function pn(s){return s.endAngle}O(pn,"arcEndAngle");function xn(s){return s&&s.padAngle}O(xn,"arcPadAngle");function hn(s,g,E,q,v,R,W,a){var I=E-s,i=q-g,n=W-v,m=a-R,u=m*I-n*i;if(!(u*u<y))return u=(n*(g-R)-m*(s-v))/u,[s+u*I,g+u*i]}O(hn,"intersect");function J(s,g,E,q,v,R,W){var a=s-E,I=g-q,i=(W?R:-R)/z(a*a+I*I),n=i*I,m=-i*a,u=s+n,l=g+m,f=E+n,c=q+m,X=(u+f)/2,t=(l+c)/2,p=f-u,d=c-l,A=p*p+d*d,T=v-R,P=u*c-f*l,M=(d<0?-1:1)*z(cn(0,T*T*A-P*P)),N=(P*d-p*M)/A,Q=(-P*p-d*M)/A,w=(P*d+p*M)/A,x=(-P*p+d*M)/A,h=N-X,e=Q-t,r=w-X,Y=x-t;return h*h+e*e>r*r+Y*Y&&(N=w,Q=x),{cx:N,cy:Q,x01:-n,y01:-m,x11:N*(v/T-1),y11:Q*(v/T-1)}}O(J,"cornerTangents");function An(){var s=gn,g=dn,E=V(0),q=null,v=mn,R=pn,W=xn,a=null,I=on(i);function i(){var n,m,u=+s.apply(this,arguments),l=+g.apply(this,arguments),f=v.apply(this,arguments)-rn,c=R.apply(this,arguments)-rn,X=sn(c-f),t=c>f;if(a||(a=n=I()),l<u&&(m=l,l=u,u=m),!(l>y))a.moveTo(0,0);else if(X>fn-y)a.moveTo(l*Z(f),l*S(f)),a.arc(0,0,l,f,c,!t),u>y&&(a.moveTo(u*Z(c),u*S(c)),a.arc(0,0,u,c,f,t));else{var p=f,d=c,A=f,T=c,P=X,M=X,N=W.apply(this,arguments)/2,Q=N>y&&(q?+q.apply(this,arguments):z(u*u+l*l)),w=nn(sn(l-u)/2,+E.apply(this,arguments)),x=w,h=w,e,r;if(Q>y){var Y=ln(Q/u*S(N)),B=ln(Q/l*S(N));(P-=Y*2)>y?(Y*=t?1:-1,A+=Y,T-=Y):(P=0,A=T=(f+c)/2),(M-=B*2)>y?(B*=t?1:-1,p+=B,d-=B):(M=0,p=d=(f+c)/2)}var $=l*Z(p),j=l*S(p),C=u*Z(T),F=u*S(T);if(w>y){var G=l*Z(d),H=l*S(d),K=u*Z(A),L=u*S(A),D;if(X<un)if(D=hn($,j,K,L,G,H,C,F)){var U=$-D[0],k=j-D[1],b=G-D[0],_=H-D[1],en=1/S(yn((U*b+k*_)/(z(U*U+k*k)*z(b*b+_*_)))/2),an=z(D[0]*D[0]+D[1]*D[1]);x=nn(w,(u-an)/(en-1)),h=nn(w,(l-an)/(en+1))}else x=h=0}M>y?h>y?(e=J(K,L,$,j,l,h,t),r=J(G,H,C,F,l,h,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),h<w?a.arc(e.cx,e.cy,h,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,h,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,l,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,h,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo($,j),a.arc(0,0,l,p,d,!t)):a.moveTo($,j),!(u>y)||!(P>y)?a.lineTo(C,F):x>y?(e=J(C,F,G,H,u,-x,t),r=J($,j,K,L,u,-x,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,A,t)}if(a.closePath(),n)return a=null,n+""||null}return O(i,"arc"),i.centroid=function(){var n=(+s.apply(this,arguments)+ +g.apply(this,arguments))/2,m=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-un/2;return[Z(m)*n,S(m)*n]},i.innerRadius=function(n){return arguments.length?(s=typeof n=="function"?n:V(+n),i):s},i.outerRadius=function(n){return arguments.length?(g=typeof n=="function"?n:V(+n),i):g},i.cornerRadius=function(n){return arguments.length?(E=typeof n=="function"?n:V(+n),i):E},i.padRadius=function(n){return arguments.length?(q=n==null?null:typeof n=="function"?n:V(+n),i):q},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:V(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:V(+n),i):R},i.padAngle=function(n){return arguments.length?(W=typeof n=="function"?n:V(+n),i):W},i.context=function(n){return arguments.length?(a=n??null,i):a},i}O(An,"d3arc");export{An as d};
//# sourceMappingURL=arc-Bj6bkS5k.js.map
