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