import{basV,iasP}from"./chunk-JOSQJX56.js";import{aasq}from"./chunk-MDWHBQR7.js";import{aasF}from"./chunk-SNBUI7SF.js";import{AasG,Basz,CaasE,DaasL,KaasU,daasp,faasM,hasT,haasN,iasI,naas_,paasR,vas$}from"./chunk-Y2SMFNMK.js";varH={},J=function(t){lets=Object.keys(t);for(letyofs)H[y]=t[y]},W=function(t,s,y,n,i,b){letw=n.select(`[id="${y}"]`);Object.keys(t).forEach(function(c){letl=t[c],k="default";l.classes.length>0&&(k=l.classes.join(" ")),k=k+" flowchart-label";letu=L(l.styles),e=l.text!==void0?l.text:l.id,o;if(p.info("vertex",l,l.labelType),l.labelType==="markdown")p.info("vertex",l,l.labelType);elseif(M(_().flowchart.htmlLabels)){letm={label:e.replace(/fa[blrs]?:fa-[\w-]+/g,g=>`<i class='${g.replace(":"," ")}'></i>`)};o=P(w,m).node(),o.parentNode.removeChild(o)}else{letm=i.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("style",u.labelStyle.replace("color:","fill:"));letg=e.split(N.lineBreakRegex);for(letCofg){letv=i.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),v.setAttribute("dy","1em"),v.setAttribute("x","1"),v.textContent=C,m.appendChild(v)}o=m}letd=0,r="";switch(l.type){case"round":d=5,r="rect";break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"odd_right":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}s.setNode(l.id,{labelStyle:u.labelStyle,shape:r,labelText:e,labelType:l.labelType,rx:d,ry:d,class:k,style:u.style,id:l.id,link:l.link,linkTarget:l.linkTarget,tooltip:b.db.getTooltip(l.id)||"",domId:b.db.lookUpDomId(l.id),haveCallback:l.haveCallback,width:l.type==="group"?500:void0,dir:l.dir,type:l.type,props:l.props,padding:_().flowchart.padding}),p.info("setNode",{labelStyle:u.labelStyle,labelType:l.labelType,shape:r,labelText:e,rx:d,ry:d,class:k,style:u.style,id:l.id,domId:b.db.lookUpDomId(l.id),width:l.type==="group"?500:void0,type:l.type,dir:l.dir,props:l.props,padding:_().flowchart.padding})})},X=function(t,s,y){p.info("abc78 edges = ",t);letn=0,i={},b,w;if(t.defaultStyle!==void0){leta=L(t.defaultStyle);b=a.style,w=a.labelStyle}t.forEach(function(a){n++;letc="L-"+a.start+"-"+a.end;i[c]===void0?(i[c]=0,p.info("abc78 new entry",c,i[c])):(i[c]++,p.info("abc78 new entry",c,i[c]));letl=c+"-"+i[c];p.info("abc78 new link id to be used is",c,l,i[c]);letk="LS-"+a.start,u="LE-"+a.end,e={style:"",labelStyle:""};switch(e.minlen=a.length||1,a.type==="arrow_open"?e.arrowhead="none":e.arrowhead="normal",e.arrowTypeStart="arrow_open",e.arrowTypeEnd="arrow_open",a.type){case"double_arrow_cross":e.arrowTypeStart="arrow_cross";case"arrow_cross":e.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":e.arrowTypeStart="arrow_point";case"arrow_point":e.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":e.arrowTypeStart="arrow_circle";case"arrow_circle":e.arrowTypeEnd="arrow_circle";break}leto="",d="";switch(a.stroke){case"normal":o="fill:none;",b!==void0&&(o=b),w!==void0&&(d=w),e.thickness="normal",e.pattern="solid";break;case"dotted":e.thickness="normal",e.pattern="dotted",e.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":e.thickness="thick",e.pattern="solid",e.style="stroke-width: 3.5px;fill:none;";break;case"invisible":e.thickness="invisible",e.pattern="solid",e.style="stroke-width: 0;fill:none;";break}if(a.style!==void0){letr=L(a.style);o=r.style,d=r.labelStyle}e.style=e.style+=o,e.labelStyle=e.labelStyle+=d,a.interpolate!==void0?e.curve=E(a.interpolate,$):t.defaultInterpolate!==void0?e.curve=E(t.defaultInterpolate,$):e.curve=E(H.curve,$),a.text=