Files
static-php-cli/assets/chunks/swimlanes-5IMT3BWC.CEGCrF-z.js

2 lines
112 KiB
JavaScript
Raw Normal View History

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/sizeCapture-X5ZJPWSS.BLIUHMgQ.js","assets/chunks/chunk-Y2CYZVJY.DsF7k-Jl.js"])))=>i.map(i=>d[i]);
import{m as e}from"./src.OgxTg4hg.js";import{o as t}from"./framework.DrNIf5Lg.js";import{n}from"./chunk-Y2CYZVJY.DsF7k-Jl.js";import{b as r,x as i}from"./chunk-WYO6CB5R.Bq018eTN.js";import{g as a}from"./chunk-ICXQ74PX.CHLqHIum.js";import"./chunk-HOUHSVGY.CdijRtwJ.js";import"./chunk-Q4XR5HBZ.4OOalI9b.js";import{r as o}from"./chunk-7BUUIJ7U.CAhmNhj7.js";import{n as s}from"./chunk-OGEWGWER.CAu18ldV.js";import{t as c}from"./graphlib.DS17s2tU.js";import{n as l}from"./chunk-RYQCIY6F.ClwB5JGD.js";import"./chunk-C7G6YPKG.E3ngv4Wc.js";import{a as u,c as d,i as f,n as p,t as m}from"./chunk-ZGVPDNZ5.Lt-0Vx2a.js";import{a as h,i as g,n as _,r as v,s as y,t as b}from"./chunk-52WLFC77.BhMPMxf0.js";async function x(e,n){let r=new c({multigraph:!0,compound:!0}),a=[...n.edges],o=i(),s=e.insert(`g`).attr(`class`,`root`),l=s.insert(`g`).attr(`class`,`clusters`),d=s.insert(`g`).attr(`class`,`edges edgePath`),f=s.insert(`g`).attr(`class`,`edgeLabels`),p=s.insert(`g`).attr(`class`,`nodes`),m=new Map,h=e.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup)r.setNode(e.id,{...e});else{if(h){let t=await u(p,e,{config:o,dir:e.dir}),n=t.node()?.getBBox()??{width:0,height:0};m.set(e.id,t),e.width=n.width,e.height=n.height}r.setNode(e.id,{...e})}}));for(let e of a)r.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await t(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-X5ZJPWSS.BLIUHMgQ.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(e,n)}return{graph:r,groups:{clusters:l,edgePaths:d,edgeLabels:f,nodes:p,rootGroups:s},nodeElements:m}}n(x,`createGraphWithElements`);var S=5,C=1e-5,w=1e-6;function T(e){let t=[];for(let n=0;n<e.length-1;n++)t.push({a:e[n],b:e[n+1]});return t}n(T,`buildSegmentList`);function E(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(c===0)return null;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c;return d<=w||d>=1-w||f<=w||f>=1-w?null:{point:{x:e.x+d*i,y:e.y+d*a},tA:d,tB:f}}n(E,`segmentIntersection`);function D(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}n(D,`isHorizontalSeg`);function O(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=T(r.points);for(let a=n+1;a<e.length;a++){let n=e[a],o=T(n.points);for(let[e,a]of i.entries())for(let[i,s]of o.entries()){let o=E(a.a,a.b,s.a,s.b);if(!o)continue;let c=D(a);c!==D(s)&&c?t.push({jumpEdgeId:r.id,otherEdgeId:n.id,segIndex:e,t:o.tA,point:o.point}):t.push({jumpEdgeId:n.id,otherEdgeId:r.id,segIndex:i,t:o.tB,point:o.point})}}}return t}n(O,`findEdgeIntersections`);function k(e){return`${Math.round(e*1e3)/1e3}`}n(k,`fmt`);function A(e){return`${k(e.x)},${k(e.y)}`}n(A,`pointToString`);function j(e){let t=e.b.x-e.a.x,n=e.b.y-e.a.y;return Math.abs(t)>=Math.abs(n)?+(t>=0):+(n>=0)}n(j,`getArcSweepFlag`);var ee=.001;function te(e,t){if(e.length<2)return e.map(e=>({...e}));let n=e.map(e=>({...e})),r=t.arrowTypeStart&&o[t.arrowTypeStart];if(r){let t=e[0],i=e[1],a=Math.atan2(i.y-t.y,i.x-t.x);n[0].x=t.x+r*Math.cos(a),n[0].y=t.y+r*Math.sin(a)}let i=t.arrowTypeEnd&&o[t.arrowTypeEnd];if(i){let t=e.length,r=e[t-2],a=e[t-1],o=Math.atan2(a.y-r.y,a.x-r.x);n[t-1].x=a.x-i*Math.cos(o),n[t-1].y=a.y-i*Math.sin(o)}return n}n(te,`applyMarkerOffsets`);function M(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${A(s)}`];return i===`arc`?l.push(`A${k(e.r)},${k(e.r)} 0 0 ${r} ${A(c)}`):l.push(`M${A(c)}`),l}n(M,`emitJump`);function ne(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=n.x-t.x,s=n.y-t.y,c=Math.hypot(i,a),l=Math.hypot(o,s);if(c<C||l<C)return null;let u=i/c,d=a/c,f=o/l,p=s/l,m=u*f+d*p,h=Math.acos(Math.max(-1,Math.min(1,m)));if(h<C||Math.abs(Math.PI-h)<C)return null;let g=Math.min(r/Math.sin(h/2),c/2,l/2);return{startX:t.x-u*g,startY:t.y-d*g,endX:t.x+f*g,endY:t.y+p*g,ctrlX:t.x,ctrlY:t.y,cutLen:g}}n(ne,`computeRoundedCorner`);function N(e,t,n){let r=e.points;if(r.length<2)return``;let i=te(r,e),a=e.curve===`rounded`,o=T(i),s=new Map;for(let e of t){let t=o[e.segIndex];if(!t)continue;let r=Math.hypot(t.b.x-t.a.x,t.b.