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