ranui
Version:
A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.
11 lines (10 loc) • 36 kB
JavaScript
const p=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),u=require("./src-D8aDujwE.cjs"),O=require("./chunk-I66GZJ75-BzqGKy7F.cjs"),_=require("./chunk-NSK5VX7P-DcRXFc-R.cjs"),lt=require("./line-CAI5srU-.cjs"),ct=require("./chunk-WRU74C26-zS0j4l0M.cjs"),$=require("./chunk-7BUUIJ7U-DMv_UkjI.cjs"),dt=require("./chunk-UBXNYLIW-rJ4d6bZj.cjs"),tt=require("./chunk-W5SLKNZC-z8QxkdMj.cjs"),pt=require("./rough.esm-BfSi6CZE.cjs"),N=require("./chunk-QR6OTTB3-P6k0vwas.cjs");var ft=p.__name((r,t,a,e,o,s=!1,n)=>{t.arrowTypeStart&&F(r,"start",t.arrowTypeStart,a,e,o,s,n),t.arrowTypeEnd&&F(r,"end",t.arrowTypeEnd,a,e,o,s,n)},"addEdgeMarkers"),ht={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}},mt=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],F=p.__name((r,t,a,e,o,s,n=!1,i)=>{const c=ht[a],m=c&&mt.includes(c.type);if(!c){u.log.warn(`Unknown arrow type: ${a}`);return}const l=`${o}_${s}-${c.type}${t==="start"?"Start":"End"}${n&&m?"-margin":""}`;if(i&&i.trim()!==""){const f=`${l}_${i.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(f)){const d=document.getElementById(l);if(d){const h=d.cloneNode(!0);h.id=f,h.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",i),c.fill&&k.setAttribute("fill",i)}),d.parentNode?.appendChild(h)}}r.attr(`marker-${t}`,`url(${e}#${f})`)}else r.attr(`marker-${t}`,`url(${e}#${l})`)},"addEdgeMarker"),kt=p.__name(r=>typeof r=="string"?r:O.getConfig2()?.flowchart?.curve,"resolveEdgeCurveType"),A=new Map,w=new Map,ut=p.__name(()=>{A.clear(),w.clear()},"clear"),P=p.__name(r=>r?typeof r=="string"?r:r.reduce((t,a)=>t+";"+a,""):"","getLabelStyles"),gt=p.__name(async(r,t)=>{const a=O.getConfig2();let e=O.getEffectiveHtmlLabels(a);const{labelStyles:o}=tt.styles2String(t);t.labelStyle=o;const s=r.insert("g").attr("class","edgeLabel"),n=s.insert("g").attr("class","label").attr("data-id",t.id),i=t.labelType==="markdown",c=await ct.createText(r,t.label,{style:P(t.labelStyle),useHtmlLabels:e,addSvgBackground:!0,isNode:!1,markdown:i,width:void 0},a);n.node().appendChild(c),u.log.info("abc82",t,t.labelType);let m=c.getBBox(),l=m;if(e){const d=c.children[0],h=u.select_default(c);m=d.getBoundingClientRect(),l=m,h.attr("width",m.width),h.attr("height",m.height)}else{const d=u.select_default(c).select("text").node();d&&typeof d.getBBox=="function"&&(l=d.getBBox())}n.attr("transform",$.computeLabelTransform(l,e)),A.set(t.id,s),t.width=m.width,t.height=m.height;let f;if(t.startLabelLeft){const d=r.insert("g").attr("class","edgeTerminals"),h=d.insert("g").attr("class","inner"),k=await N.createLabel_default(h,t.startLabelLeft,P(t.labelStyle)||"",!1,!1);f=k;let g=k.getBBox();if(e){const L=k.children[0],x=u.select_default(k);g=L.getBoundingClientRect(),x.attr("width",g.width),x.attr("height",g.height)}h.attr("transform",$.computeLabelTransform(g,e)),w.get(t.id)||w.set(t.id,{}),w.get(t.id).startLeft=d,R(f,t.startLabelLeft)}if(t.startLabelRight){const d=r.insert("g").attr("class","edgeTerminals"),h=d.insert("g").attr("class","inner"),k=await N.createLabel_default(h,t.startLabelRight,P(t.labelStyle)||"",!1,!1);f=k;let g=k.getBBox();if(e){const L=k.children[0],x=u.select_default(k);g=L.getBoundingClientRect(),x.attr("width",g.width),x.attr("height",g.height)}h.attr("transform",$.computeLabelTransform(g,e)),w.get(t.id)||w.set(t.id,{}),w.get(t.id).startRight=d,R(f,t.startLabelRight)}if(t.endLabelLeft){const d=r.insert("g").attr("class","edgeTerminals"),h=d.insert("g").attr("class","inner"),k=await N.createLabel_default(d,t.endLabelLeft,P(t.labelStyle)||"",!1,!1);f=k;let g=k.getBBox();if(e){const L=k.children[0],x=u.select_default(k);g=L.getBoundingClientRect(),x.attr("width",g.width),x.attr("height",g.height)}h.attr("transform",$.computeLabelTransform(g,e)),w.get(t.id)||w.set(t.id,{}),w.get(t.id).endLeft=d,R(f,t.endLabelLeft)}if(t.endLabelRight){const d=r.insert("g").attr("class","edgeTerminals"),h=d.insert("g").attr("class","inner"),k=await N.createLabel_default(d,t.endLabelRight,P(t.labelStyle)||"",!1,!1);f=k;let g=k.getBBox();if(e){const L=k.children[0],x=u.select_default(k);g=L.getBoundingClientRect(),x.attr("width",g.width),x.attr("height",g.height)}h.attr("transform",$.computeLabelTransform(g,e)),w.get(t.id)||w.set(t.id,{}),w.get(t.id).endRight=d,R(f,t.endLabelRight)}return c},"insertEdgeLabel");function R(r,t){O.getEffectiveHtmlLabels(O.getConfig2())&&r&&(r.style.width=t.length*9+"px",r.style.height="12px")}p.__name(R,"setTerminalWidth");var _t=p.__name((r,t)=>{u.log.debug("Moving label abc88 ",r.id,r.label,A.get(r.id),t);let a=t.updatedPath?t.updatedPath:t.originalPath;const e=O.getConfig2(),{subGraphTitleTotalMargin:o}=dt.getSubGraphTitleMargins(e);if(r.label){const s=A.get(r.id);let n=r.x,i=r.y;if(a){const c=_.utils_default.calcLabelPosition(a);u.log.debug("Moving label "+r.label+" from (",n,",",i,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(n=c.x,i=c.y)}s.attr("transform",`translate(${n}, ${i+o/2})`)}if(r.startLabelLeft){const s=w.get(r.id).startLeft;let n=r.x,i=r.y;if(a){const c=_.utils_default.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",a);n=c.x,i=c.y}s.attr("transform",`translate(${n}, ${i})`)}if(r.startLabelRight){const s=w.get(r.id).startRight;let n=r.x,i=r.y;if(a){const c=_.utils_default.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",a);n=c.x,i=c.y}s.attr("transform",`translate(${n}, ${i})`)}if(r.endLabelLeft){const s=w.get(r.id).endLeft;let n=r.x,i=r.y;if(a){const c=_.utils_default.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",a);n=c.x,i=c.y}s.attr("transform",`translate(${n}, ${i})`)}if(r.endLabelRight){const s=w.get(r.id).endRight;let n=r.x,i=r.y;if(a){const c=_.utils_default.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",a);n=c.x,i=c.y}s.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),yt=p.__name((r,t)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[a,e]=t,o=Math.abs(e.x-a.x),s=Math.abs(e.y-a.y);return o<.001||s<.001?t:s>=o?[a,{x:a.x,y:e.y},e]:[a,{x:e.x,y:a.y},e]},"orthogonalizeToLabelClippedPoints"),xt=p.__name((r,t)=>{const a=r.x,e=r.y,o=Math.abs(t.x-a),s=Math.abs(t.y-e),n=r.width/2,i=r.height/2;return o>=n||s>=i},"outsideNode"),bt=p.__name((r,t,a)=>{u.log.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}`);const e=r.x,o=r.y,s=Math.abs(e-a.x),n=r.width/2;let i=a.x<t.x?n-s:n+s;const c=r.height/2,m=Math.abs(t.y-a.y),l=Math.abs(t.x-a.x);if(Math.abs(o-t.y)*n>Math.abs(e-t.x)*c){let f=a.y<t.y?t.y-c-o:o-c-t.y;i=l*f/m;const d={x:a.x<t.x?a.x+i:a.x-l+i,y:a.y<t.y?a.y+m-f:a.y-m+f};return i===0&&(d.x=t.x,d.y=t.y),l===0&&(d.x=t.x),m===0&&(d.y=t.y),u.log.debug(`abc89 top/bottom calc, Q ${m}, q ${f}, R ${l}, r ${i}`,d),d}else{a.x<t.x?i=t.x-n-e:i=e-n-t.x;let f=m*i/l,d=a.x<t.x?a.x+l-i:a.x-l+i,h=a.y<t.y?a.y+f:a.y-f;return u.log.debug(`sides calc abc89, Q ${m}, q ${f}, R ${l}, r ${i}`,{_x:d,_y:h}),i===0&&(d=t.x,h=t.y),l===0&&(d=t.x),m===0&&(h=t.y),{x:d,y:h}}},"intersection"),G=p.__name((r,t)=>{u.log.warn("abc88 cutPathAtIntersect",r,t);let a=[],e=r[0],o=!1;return r.forEach(s=>{if(u.log.info("abc88 checking point",s,t),!xt(t,s)&&!o){const n=bt(t,e,s);u.log.debug("abc88 inside",s,e,n),u.log.debug("abc88 intersection",n,t);let i=!1;a.forEach(c=>{i=i||c.x===n.x&&c.y===n.y}),a.some(c=>c.x===n.x&&c.y===n.y)?u.log.warn("abc88 no intersect",n,a):a.push(n),o=!0}else u.log.warn("abc88 outside",s,e),e=s,o||a.push(s)}),u.log.debug("returning points",a),a},"cutPathAtIntersect");function rt(r){const t=[],a=[];for(let e=1;e<r.length-1;e++){const o=r[e-1],s=r[e],n=r[e+1];(o.x===s.x&&s.y===n.y&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-o.y)>5||o.y===s.y&&s.x===n.x&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-n.y)>5)&&(t.push(s),a.push(e))}return{cornerPoints:t,cornerPointPositions:a}}p.__name(rt,"extractCornerPoints");var K=p.__name(function(r,t,a){const e=t.x-r.x,o=t.y-r.y,s=a/Math.sqrt(e*e+o*o);return{x:t.x-s*e,y:t.y-s*o}},"findAdjacentPoint"),wt=p.__name(function(r){const{cornerPointPositions:t}=rt(r),a=[];for(let e=0;e<r.length;e++)if(t.includes(e)){const o=r[e-1],s=r[e+1],n=r[e],i=K(o,n,5),c=K(s,n,5),m=c.x-i.x,l=c.y-i.y;a.push(i);const f=Math.sqrt(2)*2;let d={x:n.x,y:n.y};if(Math.abs(s.x-o.x)>10&&Math.abs(s.y-o.y)>=10){u.log.debug("Corner point fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));const h=5;n.x===i.x?d={x:m<0?i.x-h+f:i.x+h-f,y:l<0?i.y-f:i.y+f}:d={x:m<0?i.x-f:i.x+f,y:l<0?i.y-h+f:i.y+h-f}}else u.log.debug("Corner point skipping fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));a.push(d,c)}else a.push(r[e]);return a},"fixCorners"),Lt=p.__name((r,t,a)=>{const e=r-t-a,o=2,s=2,n=Math.floor(e/4);return`0 ${t} ${Array(n).fill(`${o} ${s}`).join(" ")} ${a}`},"generateDashArray"),Mt=p.__name(function(r,t,a,e,o,s,n,i=!1){if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:c,layout:m}=O.getConfig2();let l=t.points,f=!1;const d=o;var h=s;const k=[];for(const y in t.cssCompiledStyles)tt.isLabelStyle(y)||k.push(t.cssCompiledStyles[y]);if(m==="swimlane"){if(h.intersect&&d.intersect&&Array.isArray(l)&&l.length>=2)if(l.length===2)l=[d.intersect(l[0]),h.intersect(l[1])];else{const y=l.slice(1,-1),W=y[0],E=y[y.length-1],U=.5,q=Math.abs(l[l.length-1].x-E.x)<U&&Math.abs(l[l.length-1].y-E.y)<U,Y=d.intersect(W),X=q?E:h.intersect(E),H=Math.abs(X.x-E.x)<U&&Math.abs(X.y-E.y)<U,z=Math.abs(Y.x-W.x)<U&&Math.abs(Y.y-W.y)<U?[]:[Y],it=H?[]:[X];l=[...z,...y,...it]}l=yt(t,l)}else h.intersect&&d.intersect&&!i&&(l=l.slice(1,t.points.length-1),l.unshift(d.intersect(l[0])),l.push(h.intersect(l[l.length-1])));const g=btoa(JSON.stringify(l));t.toCluster&&(u.log.info("to cluster abc88",a.get(t.toCluster)),l=G(t.points,a.get(t.toCluster).node),f=!0),t.fromCluster&&(u.log.debug("from cluster abc88",a.get(t.fromCluster),JSON.stringify(l,null,2)),l=G(l.reverse(),a.get(t.fromCluster).node).reverse(),f=!0);let L=l.filter(y=>!Number.isNaN(y.y));const x=kt(t.curve);x!=="rounded"&&(L=wt(L));let b=_.linear_default;switch(x){case"linear":b=_.linear_default;break;case"basis":b=_.basis_default;break;case"cardinal":b=_.cardinal_default;break;case"bumpX":b=_.bumpX;break;case"bumpY":b=_.bumpY;break;case"catmullRom":b=_.catmullRom_default;break;case"monotoneX":b=_.monotoneX;break;case"monotoneY":b=_.monotoneY;break;case"natural":b=_.natural_default;break;case"step":b=_.step_default;break;case"stepAfter":b=_.stepAfter;break;case"stepBefore":b=_.stepBefore;break;case"rounded":b=_.linear_default;break;default:b=_.basis_default}const{x:I,y:B}=$.getLineFunctionsWithOffset(t),T=lt.line_default().x(I).y(B).curve(b);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let M,Q=x==="rounded"?at(et(L,t),5):T(L);const v=Array.isArray(t.style)?t.style:[t.style];let D=v.find(y=>y?.startsWith("stroke:")),C="";t.animate&&(C="edge-animation-fast"),t.animation&&(C="edge-animation-"+t.animation);let j=!1;if(t.look==="handDrawn"){const y=pt.at.svg(r);Object.assign([],L);const W=y.path(Q,{roughness:.3,seed:c});S+=" transition",M=u.select_default(W).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(C?" "+C:"")).attr("style",v?v.reduce((U,q)=>U+";"+q,""):"");let E=M.attr("d");M.attr("d",E),r.node().appendChild(M.node())}else{const y=k.join(";"),W=v?v.reduce((H,z)=>H+z+";",""):"",E=(y?y+";"+W+";":W)+";"+(v?v.reduce((H,z)=>H+";"+z,""):"");M=r.append("path").attr("d",Q).attr("id",`${n}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(C?" "+C:"")).attr("style",E),D=E.match(/stroke:([^;]+)/)?.[1],j=t.animate===!0||!!t.animation||y.includes("animation");const U=M.node(),q=typeof U.getTotalLength=="function"?U.getTotalLength():0,Y=$.markerOffsets2[t.arrowTypeStart]||0,X=$.markerOffsets2[t.arrowTypeEnd]||0;if(t.look==="neo"&&!j){const H=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Lt(q,Y,X):`0 ${Y} ${q-Y-X} ${X}`}; stroke-dashoffset: 0;`;M.attr("style",H+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",_.handleUndefinedAttr(t.look)),t.showPoints&&L.forEach(y=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",y.x).attr("cy",y.y)});let Z="";(O.getConfig2().flowchart.arrowMarkerAbsolute||O.getConfig2().state.arrowMarkerAbsolute)&&(Z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Z=Z.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),u.log.info("arrowTypeStart",t.arrowTypeStart),u.log.info("arrowTypeEnd",t.arrowTypeEnd);const nt=!j&&t?.look==="neo";ft(M,t,Z,n,e,nt,D);const st=Math.floor(l.length/2),ot=l[st];_.utils_default.isLabelCoordinateInPath(ot,M.attr("d"))||(f=!0);let V={};return f&&(V.updatedPath=l),V.originalPath=t.points,V},"insertEdge");function at(r,t){if(r.length<2)return"";let a="";const e=r.length,o=1e-5;for(let s=0;s<e;s++){const n=r[s],i=r[s-1],c=r[s+1];if(s===0)a+=`M${n.x},${n.y}`;else if(s===e-1)a+=`L${n.x},${n.y}`;else{const m=n.x-i.x,l=n.y-i.y,f=c.x-n.x,d=c.y-n.y,h=Math.hypot(m,l),k=Math.hypot(f,d);if(h<o||k<o){a+=`L${n.x},${n.y}`;continue}const g=m/h,L=l/h,x=f/k,b=d/k,I=g*x+L*b,B=Math.acos(Math.max(-1,Math.min(1,I)));if(B<o||Math.abs(Math.PI-B)<o){a+=`L${n.x},${n.y}`;continue}const T=Math.min(t/Math.sin(B/2),h/2,k/2),S=n.x-g*T,M=n.y-L*T,Q=n.x+x*T,v=n.y+b*T;a+=`L${S},${M}`,a+=`Q${n.x},${n.y} ${Q},${v}`}}return a}p.__name(at,"generateRoundedPath");function J(r,t){if(!r||!t)return{angle:0,deltaX:0,deltaY:0};const a=t.x-r.x,e=t.y-r.y;return{angle:Math.atan2(e,a),deltaX:a,deltaY:e}}p.__name(J,"calculateDeltaAndAngle");function et(r,t){const a=r.map(o=>({...o}));if(r.length>=2&&$.markerOffsets[t.arrowTypeStart]){const o=$.markerOffsets[t.arrowTypeStart],s=r[0],n=r[1],{angle:i}=J(s,n),c=o*Math.cos(i),m=o*Math.sin(i);a[0].x=s.x+c,a[0].y=s.y+m}const e=r.length;if(e>=2&&$.markerOffsets[t.arrowTypeEnd]){const o=$.markerOffsets[t.arrowTypeEnd],s=r[e-1],n=r[e-2],{angle:i}=J(n,s),c=o*Math.cos(i),m=o*Math.sin(i);a[e-1].x=s.x-c,a[e-1].y=s.y-m}return a}p.__name(et,"applyMarkerOffsetsToPoints");var Ot=p.__name((r,t,a,e)=>{t.forEach(o=>{St[o](r,a,e)})},"insertMarkers"),St={extension:p.__name((r,t,a)=>{u.log.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"),composition:p.__name((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"),aggregation:p.__name((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"),dependency:p.__name((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"),lollipop:p.__name((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"),point:p.__name((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"),circle:p.__name((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"),cross:p.__name((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"),barb:p.__name((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"),barbNeo:p.__name((r,t,a)=>{const{themeVariables:e}=O.getConfig(),{transitionColor:o}=e;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",`${o}`)},"barbNeo"),only_one:p.__name((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"),zero_or_one:p.__name((r,t,a)=>{const 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");const 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"),one_or_more:p.__name((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"),zero_or_more:p.__name((r,t,a)=>{const 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");const 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"),only_one_neo:p.__name((r,t,a)=>{const{themeVariables:e}=O.getConfig(),{strokeWidth:o}=e;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",`${o}`),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",`${o}`)},"only_one_neo"),zero_or_one_neo:p.__name((r,t,a)=>{const{themeVariables:e}=O.getConfig(),{strokeWidth:o,mainBkg:s}=e,n=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");n.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const i=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");i.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),i.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),one_or_more_neo:p.__name((r,t,a)=>{const{themeVariables:e}=O.getConfig(),{strokeWidth:o}=e;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",`${o}`),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",`${o}`)},"one_or_more_neo"),zero_or_more_neo:p.__name((r,t,a)=>{const{themeVariables:e}=O.getConfig(),{strokeWidth:o,mainBkg:s}=e,n=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");n.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const i=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");i.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),requirement_arrow:p.__name((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"),requirement_contains:p.__name((r,t,a)=>{const 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"),requirement_arrow_neo:p.__name((r,t,a)=>{const{themeVariables:e}=O.getConfig(),{strokeWidth:o}=e;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",`${o}`).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"),requirement_contains_neo:p.__name((r,t,a)=>{const{themeVariables:e}=O.getConfig(),{strokeWidth:o}=e,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",`${o}`)},"requirement_contains_neo")},$t=Ot;Object.defineProperty(exports,"clear",{enumerable:!0,get:function(){return ut}});Object.defineProperty(exports,"edgeLabels",{enumerable:!0,get:function(){return A}});Object.defineProperty(exports,"insertEdge",{enumerable:!0,get:function(){return Mt}});Object.defineProperty(exports,"insertEdgeLabel",{enumerable:!0,get:function(){return gt}});Object.defineProperty(exports,"markers_default",{enumerable:!0,get:function(){return $t}});Object.defineProperty(exports,"positionEdgeLabel",{enumerable:!0,get:function(){return _t}});Object.defineProperty(exports,"terminalLabels",{enumerable:!0,get:function(){return w}});