UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

11 lines (10 loc) 34.2 kB
import{c as P}from"./chunk-NLANEA3F.mjs";import{a as yt}from"./chunk-5IMINLNL.mjs";import{c as ut,d as gt}from"./chunk-WJBAP47W.mjs";import{a as R,b as Q,c as at,d as bt}from"./chunk-5VCL7Z4A.mjs";import{b as xt}from"./chunk-UAT7B5JY.mjs";import{c as kt}from"./chunk-SZD42YQK.mjs";import{p as H,t as mt}from"./chunk-7CWYLC5S.mjs";import{_ as W,t as U,x as tt}from"./chunk-2AEHWXPW.mjs";import{$ as ht,G as D,H as et,J as nt,K as st,L as rt,P as ot,S as it,W as ct,X as lt,Y as dt,Z as pt,_ as ft,b as y,h as X}from"./chunk-LIEV3EAG.mjs";import{a as d}from"./chunk-AQ6EADP3.mjs";var Mt=d((r,t,a,e,o,n=!1,s)=>{t.arrowTypeStart&&wt(r,"start",t.arrowTypeStart,a,e,o,n,s),t.arrowTypeEnd&&wt(r,"end",t.arrowTypeEnd,a,e,o,n,s)},"addEdgeMarkers"),Xt={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Yt=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],wt=d((r,t,a,e,o,n,s=!1,i)=>{let l=Xt[a],k=l&&Yt.includes(l.type);if(!l){y.warn(`Unknown arrow type: ${a}`);return}let c=l.type,p=`${o}_${n}-${c}${t==="start"?"Start":"End"}${s&&k?"-margin":""}`;if(i&&i.trim()!==""){let x=i.replace(/[^\dA-Za-z]/g,"_"),g=`${p}_${x}`;if(!document.getElementById(g)){let h=document.getElementById(p);if(h){let w=h.cloneNode(!0);w.id=g,w.querySelectorAll("path, circle, line").forEach(B=>{B.setAttribute("stroke",i),l.fill&&B.setAttribute("fill",i)}),h.parentNode?.appendChild(w)}}r.attr(`marker-${t}`,`url(${e}#${g})`)}else r.attr(`marker-${t}`,`url(${e}#${p})`)},"addEdgeMarker");var vt=d(r=>typeof r=="string"?r:W()?.flowchart?.curve,"resolveEdgeCurveType"),G=new Map,L=new Map,Er=d(()=>{G.clear(),L.clear()},"clear"),Z=d(r=>r?typeof r=="string"?r:r.reduce((t,a)=>t+";"+a,""):"","getLabelStyles"),Ur=d(async(r,t)=>{let a=W(),e=tt(a),{labelStyles:o}=gt(t);t.labelStyle=o;let n=r.insert("g").attr("class","edgeLabel"),s=n.insert("g").attr("class","label").attr("data-id",t.id),i=t.labelType==="markdown",k=await kt(r,t.label,{style:Z(t.labelStyle),useHtmlLabels:e,addSvgBackground:!0,isNode:!1,markdown:i,width:i?void 0:void 0},a);s.node().appendChild(k),y.info("abc82",t,t.labelType);let c=k.getBBox(),u=c;if(e){let p=k.children[0],x=X(k);c=p.getBoundingClientRect(),u=c,x.attr("width",c.width),x.attr("height",c.height)}else{let p=X(k).select("text").node();p&&typeof p.getBBox=="function"&&(u=p.getBBox())}s.attr("transform",R(u,e)),G.set(t.id,n),t.width=c.width,t.height=c.height;let f;if(t.startLabelLeft){let p=r.insert("g").attr("class","edgeTerminals"),x=p.insert("g").attr("class","inner"),g=await P(x,t.startLabelLeft,Z(t.labelStyle)||"",!1,!1);f=g;let h=g.getBBox();if(e){let w=g.children[0],m=X(g);h=w.getBoundingClientRect(),m.attr("width",h.width),m.attr("height",h.height)}x.attr("transform",R(h,e)),L.get(t.id)||L.set(t.id,{}),L.get(t.id).startLeft=p,j(f,t.startLabelLeft)}if(t.startLabelRight){let p=r.insert("g").attr("class","edgeTerminals"),x=p.insert("g").attr("class","inner"),g=await P(x,t.startLabelRight,Z(t.labelStyle)||"",!1,!1);f=g;let h=g.getBBox();if(e){let w=g.children[0],m=X(g);h=w.getBoundingClientRect(),m.attr("width",h.width),m.attr("height",h.height)}x.attr("transform",R(h,e)),L.get(t.id)||L.set(t.id,{}),L.get(t.id).startRight=p,j(f,t.startLabelRight)}if(t.endLabelLeft){let p=r.insert("g").attr("class","edgeTerminals"),x=p.insert("g").attr("class","inner"),g=await P(p,t.endLabelLeft,Z(t.labelStyle)||"",!1,!1);f=g;let h=g.getBBox();if(e){let w=g.children[0],m=X(g);h=w.getBoundingClientRect(),m.attr("width",h.width),m.attr("height",h.height)}x.attr("transform",R(h,e)),L.get(t.id)||L.set(t.id,{}),L.get(t.id).endLeft=p,j(f,t.endLabelLeft)}if(t.endLabelRight){let p=r.insert("g").attr("class","edgeTerminals"),x=p.insert("g").attr("class","inner"),g=await P(p,t.endLabelRight,Z(t.labelStyle)||"",!1,!1);f=g;let h=g.getBBox();if(e){let w=g.children[0],m=X(g);h=w.getBoundingClientRect(),m.attr("width",h.width),m.attr("height",h.height)}x.attr("transform",R(h,e)),L.get(t.id)||L.set(t.id,{}),L.get(t.id).endRight=p,j(f,t.endLabelRight)}return k},"insertEdgeLabel");function j(r,t){tt(W())&&r&&(r.style.width=t.length*9+"px",r.style.height="12px")}d(j,"setTerminalWidth");var Wr=d((r,t)=>{y.debug("Moving label abc88 ",r.id,r.label,G.get(r.id),t);let a=t.updatedPath?t.updatedPath:t.originalPath,e=W(),{subGraphTitleTotalMargin:o}=xt(e);if(r.label){let n=G.get(r.id),s=r.x,i=r.y;if(a){let l=H.calcLabelPosition(a);y.debug("Moving label "+r.label+" from (",s,",",i,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,i=l.y)}n.attr("transform",`translate(${s}, ${i+o/2})`)}if(r.startLabelLeft){let n=L.get(r.id).startLeft,s=r.x,i=r.y;if(a){let l=H.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",a);s=l.x,i=l.y}n.attr("transform",`translate(${s}, ${i})`)}if(r.startLabelRight){let n=L.get(r.id).startRight,s=r.x,i=r.y;if(a){let l=H.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",a);s=l.x,i=l.y}n.attr("transform",`translate(${s}, ${i})`)}if(r.endLabelLeft){let n=L.get(r.id).endLeft,s=r.x,i=r.y;if(a){let l=H.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",a);s=l.x,i=l.y}n.attr("transform",`translate(${s}, ${i})`)}if(r.endLabelRight){let n=L.get(r.id).endRight,s=r.x,i=r.y;if(a){let l=H.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",a);s=l.x,i=l.y}n.attr("transform",`translate(${s}, ${i})`)}},"positionEdgeLabel"),Ht=d((r,t)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;let[a,e]=t,o=Math.abs(e.x-a.x),n=Math.abs(e.y-a.y);return o<.001||n<.001?t:n>=o?[a,{x:a.x,y:e.y},e]:[a,{x:e.x,y:a.y},e]},"orthogonalizeToLabelClippedPoints"),Bt=d((r,t)=>{let a=r.x,e=r.y,o=Math.abs(t.x-a),n=Math.abs(t.y-e),s=r.width/2,i=r.height/2;return o>=s||n>=i},"outsideNode"),Tt=d((r,t,a)=>{y.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(t)} insidePoint : ${JSON.stringify(a)} node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let e=r.x,o=r.y,n=Math.abs(e-a.x),s=r.width/2,i=a.x<t.x?s-n:s+n,l=r.height/2,k=Math.abs(t.y-a.y),c=Math.abs(t.x-a.x);if(Math.abs(o-t.y)*s>Math.abs(e-t.x)*l){let u=a.y<t.y?t.y-l-o:o-l-t.y;i=c*u/k;let f={x:a.x<t.x?a.x+i:a.x-c+i,y:a.y<t.y?a.y+k-u:a.y-k+u};return i===0&&(f.x=t.x,f.y=t.y),c===0&&(f.x=t.x),k===0&&(f.y=t.y),y.debug(`abc89 top/bottom calc, Q ${k}, q ${u}, R ${c}, r ${i}`,f),f}else{a.x<t.x?i=t.x-s-e:i=e-s-t.x;let u=k*i/c,f=a.x<t.x?a.x+c-i:a.x-c+i,p=a.y<t.y?a.y+u:a.y-u;return y.debug(`sides calc abc89, Q ${k}, q ${u}, R ${c}, r ${i}`,{_x:f,_y:p}),i===0&&(f=t.x,p=t.y),c===0&&(f=t.x),k===0&&(p=t.y),{x:f,y:p}}},"intersection"),Lt=d((r,t)=>{y.warn("abc88 cutPathAtIntersect",r,t);let a=[],e=r[0],o=!1;return r.forEach(n=>{if(y.info("abc88 checking point",n,t),!Bt(t,n)&&!o){let s=Tt(t,e,n);y.debug("abc88 inside",n,e,s),y.debug("abc88 intersection",s,t);let i=!1;a.forEach(l=>{i=i||l.x===s.x&&l.y===s.y}),a.some(l=>l.x===s.x&&l.y===s.y)?y.warn("abc88 no intersect",s,a):a.push(s),o=!0}else y.warn("abc88 outside",n,e),e=n,o||a.push(n)}),y.debug("returning points",a),a},"cutPathAtIntersect");function Ct(r){let t=[],a=[];for(let e=1;e<r.length-1;e++){let o=r[e-1],n=r[e],s=r[e+1];(o.x===n.x&&n.y===s.y&&Math.abs(n.x-s.x)>5&&Math.abs(n.y-o.y)>5||o.y===n.y&&n.x===s.x&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-s.y)>5)&&(t.push(n),a.push(e))}return{cornerPoints:t,cornerPointPositions:a}}d(Ct,"extractCornerPoints");var _t=d(function(r,t,a){let e=t.x-r.x,o=t.y-r.y,n=Math.sqrt(e*e+o*o),s=a/n;return{x:t.x-s*e,y:t.y-s*o}},"findAdjacentPoint"),At=d(function(r){let{cornerPointPositions:t}=Ct(r),a=[];for(let e=0;e<r.length;e++)if(t.includes(e)){let o=r[e-1],n=r[e+1],s=r[e],i=_t(o,s,5),l=_t(n,s,5),k=l.x-i.x,c=l.y-i.y;a.push(i);let u=Math.sqrt(2)*2,f={x:s.x,y:s.y};if(Math.abs(n.x-o.x)>10&&Math.abs(n.y-o.y)>=10){y.debug("Corner point fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));let p=5;s.x===i.x?f={x:k<0?i.x-p+u:i.x+p-u,y:c<0?i.y-u:i.y+u}:f={x:k<0?i.x-u:i.x+u,y:c<0?i.y-p+u:i.y+p-u}}else y.debug("Corner point skipping fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));a.push(f,l)}else a.push(r[e]);return a},"fixCorners"),zt=d((r,t,a)=>{let e=r-t-a,o=2,n=2,s=o+n,i=Math.floor(e/s),l=Array(i).fill(`${o} ${n}`).join(" ");return`0 ${t} ${l} ${a}`},"generateDashArray"),Xr=d(function(r,t,a,e,o,n,s,i=!1){if(!s)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:l,layout:k}=W(),c=t.points,u=!1,f=o;var p=n;let x=[];for(let b in t.cssCompiledStyles)ut(b)||x.push(t.cssCompiledStyles[b]);if(k==="swimlane"){if(p.intersect&&f.intersect&&Array.isArray(c)&&c.length>=2)if(c.length===2)c=[f.intersect(c[0]),p.intersect(c[1])];else{let b=c.slice(1,-1),E=b[0],S=b[b.length-1],O=.5,C=Math.abs(c[c.length-1].x-S.x)<O&&Math.abs(c[c.length-1].y-S.y)<O,Y=f.intersect(E),v=C?S:p.intersect(S),A=Math.abs(v.x-S.x)<O&&Math.abs(v.y-S.y)<O,Ut=Math.abs(Y.x-E.x)<O&&Math.abs(Y.y-E.y)<O?[]:[Y],Wt=A?[]:[v];c=[...Ut,...b,...Wt]}c=Ht(t,c)}else p.intersect&&f.intersect&&!i&&(c=c.slice(1,t.points.length-1),c.unshift(f.intersect(c[0])),c.push(p.intersect(c[c.length-1])));let g=btoa(JSON.stringify(c));t.toCluster&&(y.info("to cluster abc88",a.get(t.toCluster)),c=Lt(t.points,a.get(t.toCluster).node),u=!0),t.fromCluster&&(y.debug("from cluster abc88",a.get(t.fromCluster),JSON.stringify(c,null,2)),c=Lt(c.reverse(),a.get(t.fromCluster).node).reverse(),u=!0);let h=c.filter(b=>!Number.isNaN(b.y)),w=vt(t.curve);w!=="rounded"&&(h=At(h));let m=D;switch(w){case"linear":m=D;break;case"basis":m=rt;break;case"cardinal":m=ot;break;case"bumpX":m=nt;break;case"bumpY":m=st;break;case"catmullRom":m=it;break;case"monotoneX":m=ct;break;case"monotoneY":m=lt;break;case"natural":m=dt;break;case"step":m=pt;break;case"stepAfter":m=ht;break;case"stepBefore":m=ft;break;case"rounded":m=D;break;default:m=rt}let{x:B,y:F}=bt(t),q=et().x(B).y(F).curve(m),_;switch(t.thickness){case"normal":_="edge-thickness-normal";break;case"thick":_="edge-thickness-thick";break;case"invisible":_="edge-thickness-invisible";break;default:_="edge-thickness-normal"}switch(t.pattern){case"solid":_+=" edge-pattern-solid";break;case"dotted":_+=" edge-pattern-dotted";break;case"dashed":_+=" edge-pattern-dashed";break;default:_+=" edge-pattern-solid"}let M,I=w==="rounded"?Rt(qt(h,t),5):q(h),$=Array.isArray(t.style)?t.style:[t.style],N=$.find(b=>b?.startsWith("stroke:")),T="";t.animate&&(T="edge-animation-fast"),t.animation&&(T="edge-animation-"+t.animation);let J=!1;if(t.look==="handDrawn"){let b=yt.svg(r);Object.assign([],h);let E=b.path(I,{roughness:.3,seed:l});_+=" transition",M=X(E).select("path").attr("id",`${s}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(T?" "+T:"")).attr("style",$?$.reduce((O,C)=>O+";"+C,""):"");let S=M.attr("d");M.attr("d",S),r.node().appendChild(M.node())}else{let b=x.join(";"),E=$?$.reduce((A,z)=>A+z+";",""):"",S=(b?b+";"+E+";":E)+";"+($?$.reduce((A,z)=>A+";"+z,""):"");M=r.append("path").attr("d",I).attr("id",`${s}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(T?" "+T:"")).attr("style",S),N=S.match(/stroke:([^;]+)/)?.[1],J=t.animate===!0||!!t.animation||b.includes("animation");let O=M.node(),C=typeof O.getTotalLength=="function"?O.getTotalLength():0,Y=at[t.arrowTypeStart]||0,v=at[t.arrowTypeEnd]||0;if(t.look==="neo"&&!J){let z=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?zt(C,Y,v):`0 ${Y} ${C-Y-v} ${v}`}; stroke-dashoffset: 0;`;M.attr("style",z+M.attr("style"))}}M.attr("data-edge",!0),M.attr("data-et","edge"),M.attr("data-id",t.id),M.attr("data-points",g),M.attr("data-look",mt(t.look)),t.showPoints&&h.forEach(b=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",b.x).attr("cy",b.y)});let V="";(W().flowchart.arrowMarkerAbsolute||W().state.arrowMarkerAbsolute)&&(V=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,V=V.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),y.info("arrowTypeStart",t.arrowTypeStart),y.info("arrowTypeEnd",t.arrowTypeEnd);let Ot=!J&&t?.look==="neo";Mt(M,t,V,s,e,Ot,N);let $t=Math.floor(c.length/2),Et=c[$t];H.isLabelCoordinateInPath(Et,M.attr("d"))||(u=!0);let K={};return u&&(K.updatedPath=c),K.originalPath=t.points,K},"insertEdge");function Rt(r,t){if(r.length<2)return"";let a="",e=r.length,o=1e-5;for(let n=0;n<e;n++){let s=r[n],i=r[n-1],l=r[n+1];if(n===0)a+=`M${s.x},${s.y}`;else if(n===e-1)a+=`L${s.x},${s.y}`;else{let k=s.x-i.x,c=s.y-i.y,u=l.x-s.x,f=l.y-s.y,p=Math.hypot(k,c),x=Math.hypot(u,f);if(p<o||x<o){a+=`L${s.x},${s.y}`;continue}let g=k/p,h=c/p,w=u/x,m=f/x,B=g*w+h*m,F=Math.max(-1,Math.min(1,B)),q=Math.acos(F);if(q<o||Math.abs(Math.PI-q)<o){a+=`L${s.x},${s.y}`;continue}let _=Math.min(t/Math.sin(q/2),p/2,x/2),M=s.x-g*_,I=s.y-h*_,$=s.x+w*_,N=s.y+m*_;a+=`L${M},${I}`,a+=`Q${s.x},${s.y} ${$},${N}`}}return a}d(Rt,"generateRoundedPath");function St(r,t){if(!r||!t)return{angle:0,deltaX:0,deltaY:0};let a=t.x-r.x,e=t.y-r.y;return{angle:Math.atan2(e,a),deltaX:a,deltaY:e}}d(St,"calculateDeltaAndAngle");function qt(r,t){let a=r.map(o=>({...o}));if(r.length>=2&&Q[t.arrowTypeStart]){let o=Q[t.arrowTypeStart],n=r[0],s=r[1],{angle:i}=St(n,s),l=o*Math.cos(i),k=o*Math.sin(i);a[0].x=n.x+l,a[0].y=n.y+k}let e=r.length;if(e>=2&&Q[t.arrowTypeEnd]){let o=Q[t.arrowTypeEnd],n=r[e-1],s=r[e-2],{angle:i}=St(s,n),l=o*Math.cos(i),k=o*Math.sin(i);a[e-1].x=n.x-l,a[e-1].y=n.y-k}return a}d(qt,"applyMarkerOffsetsToPoints");var Pt=d((r,t,a,e)=>{t.forEach(o=>{pr[o](r,a,e)})},"insertMarkers"),Qt=d((r,t,a)=>{y.trace("Making markers for ",a),r.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",a+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),r.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),Zt=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),It=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Nt=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Vt=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Dt=d((r,t,a)=>{r.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),jt=d((r,t,a)=>{r.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Gt=d((r,t,a)=>{r.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),r.append("marker").attr("id",a+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Ft=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Jt=d((r,t,a)=>{let e=U(),{themeVariables:o}=e,{transitionColor:n}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${n}`)},"barbNeo"),Kt=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),tr=d((r,t,a)=>{let e=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");e.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),e.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),rr=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),ar=d((r,t,a)=>{let e=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");e.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),e.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),er=d((r,t,a)=>{let e=U(),{themeVariables:o}=e,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${n}`),r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${n}`)},"only_one_neo"),nr=d((r,t,a)=>{let e=U(),{themeVariables:o}=e,{strokeWidth:n,mainBkg:s}=o,i=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");i.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),i.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${n}`);let l=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${n}`)},"zero_or_one_neo"),sr=d((r,t,a)=>{let e=U(),{themeVariables:o}=e,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${n}`),r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${n}`)},"one_or_more_neo"),or=d((r,t,a)=>{let e=U(),{themeVariables:o}=e,{strokeWidth:n,mainBkg:s}=o,i=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");i.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${n}`);let l=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${n}`)},"zero_or_more_neo"),ir=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`)},"requirement_arrow"),cr=d((r,t,a)=>{let e=U(),{themeVariables:o}=e,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${n}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),lr=d((r,t,a)=>{let e=r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");e.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),dr=d((r,t,a)=>{let e=U(),{themeVariables:o}=e,{strokeWidth:n}=o,s=r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${n}`)},"requirement_contains_neo"),pr={extension:Qt,composition:Zt,aggregation:It,dependency:Nt,lollipop:Vt,point:Dt,circle:jt,cross:Gt,barb:Ft,barbNeo:Jt,only_one:Kt,zero_or_one:tr,one_or_more:rr,zero_or_more:ar,only_one_neo:er,zero_or_one_neo:nr,one_or_more_neo:sr,zero_or_more_neo:or,requirement_arrow:ir,requirement_contains:lr,requirement_arrow_neo:cr,requirement_contains_neo:dr},Tr=Pt;export{G as a,L as b,Er as c,Ur as d,Wr as e,Xr as f,Tr as g};