import{b as x}from"./chunk-IKPJTG7B.js";var c={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},T={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function w(n,l){if(n===void 0||l===void 0)return{angle:0,deltaX:0,deltaY:0};n=t(n),l=t(l);let[s,e]=[n.x,n.y],[a,i]=[l.x,l.y],o=a-s,y=i-e;return{angle:Math.atan(y/o),deltaX:o,deltaY:y}}x(w,"calculateDeltaAndAngle");var t=x(n=>Array.isArray(n)?{x:n[0],y:n[1]}:n,"pointTransformer"),M=x(n=>({x:x(function(l,s,e){let a=0,i=t(e[0]).x<t(e[e.length-1]).x?"left":"right";if(s===0&&Object.hasOwn(c,n.arrowTypeStart)){let{angle:r,deltaX:g}=w(e[0],e[1]);a=c[n.arrowTypeStart]*Math.cos(r)*(g>=0?1:-1)}else if(s===e.length-1&&Object.hasOwn(c,n.arrowTypeEnd)){let{angle:r,deltaX:g}=w(e[e.length-1],e[e.length-2]);a=c[n.arrowTypeEnd]*Math.cos(r)*(g>=0?1:-1)}let o=Math.abs(t(l).x-t(e[e.length-1]).x),y=Math.abs(t(l).y-t(e[e.length-1]).y),f=Math.abs(t(l).x-t(e[0]).x),d=Math.abs(t(l).y-t(e[0]).y),h=c[n.arrowTypeStart],u=c[n.arrowTypeEnd],p=1;if(o<u&&o>0&&y<u){let r=u+p-o;r*=i==="right"?-1:1,a-=r}if(f<h&&f>0&&d<h){let r=h+p-f;r*=i==="right"?-1:1,a+=r}return t(l).x+a},"x"),y:x(function(l,s,e){let a=0,i=t(e[0]).y<t(e[e.length-1]).y?"down":"up";if(s===0&&Object.hasOwn(c,n.arrowTypeStart)){let{angle:r,deltaY:g}=w(e[0],e[1]);a=c[n.arrowTypeStart]*Math.abs(Math.sin(r))*(g>=0?1:-1)}else if(s===e.length-1&&Object.hasOwn(c,n.arrowTypeEnd)){let{angle:r,deltaY:g}=w(e[e.length-1],e[e.length-2]);a=c[n.arrowTypeEnd]*Math.abs(Math.sin(r))*(g>=0?1:-1)}let o=Math.abs(t(l).y-t(e[e.length-1]).y),y=Math.abs(t(l).x-t(e[e.length-1]).x),f=Math.abs(t(l).y-t(e[0]).y),d=Math.abs(t(l).x-t(e[0]).x),h=c[n.arrowTypeStart],u=c[n.arrowTypeEnd],p=1;if(o<u&&o>0&&y<u){let r=u+p-o;r*=i==="up"?-1:1,a-=r}if(f<h&&f>0&&d<h){let r=h+p-f;r*=i==="up"?-1:1,a+=r}return t(l).y+a},"y")}),"getLineFunctionsWithOffset");export{c as a,T as b,M as c};
//# sourceMappingURL=chunk-PXHZSFDP.js.map
