1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,103274,t=>{"use strict";var e=t.i(332207),a=t.i(288603),l=t.i(201415),i=t.i(595995),r=t.i(752872),n=t.i(351359);t.i(991577);var s=t.i(692423),h=t.i(570126),o=(0,n.__name)(async(t,a,n)=>{let h,o=a.useHtmlLabels||(0,r.evaluate)((0,r.getConfig2)()?.htmlLabels),d=t.insert("g").attr("class",n||"node default").attr("id",a.domId||a.id),c=d.insert("g").attr("class","label").attr("style",(0,i.handleUndefinedAttr)(a.labelStyle));h=void 0===a.label?"":"string"==typeof a.label?a.label:a.label[0];let g=!!a.icon||!!a.img,y="markdown"===a.labelType,f=await (0,l.createText)(c,(0,r.sanitizeText)((0,i.decodeEntities)(h),(0,r.getConfig2)()),{useHtmlLabels:o,width:a.width||(0,r.getConfig2)().flowchart?.wrappingWidth,classes:y?"markdown-node-label":"",style:a.labelStyle,addSvgBackground:g,markdown:y},(0,r.getConfig2)()),u=f.getBBox(),m=(a?.padding??0)/2;if(o){let t=f.children[0],a=(0,s.select)(f);await (0,e.configureLabelImages)(t,h),u=t.getBoundingClientRect(),a.attr("width",u.width),a.attr("height",u.height)}return o?c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):c.attr("transform","translate(0, "+-u.height/2+")"),a.centerLabel&&c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:d,bbox:u,halfPadding:m,label:c}},"labelHelper"),d=(0,n.__name)(async(t,e,a)=>{let n=a.useHtmlLabels??(0,r.getEffectiveHtmlLabels)((0,r.getConfig2)()),h=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),o=await (0,l.createText)(h,(0,r.sanitizeText)((0,i.decodeEntities)(e),(0,r.getConfig2)()),{useHtmlLabels:n,width:a.width||(0,r.getConfig2)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=o.getBBox(),c=a.padding/2;if((0,r.getEffectiveHtmlLabels)((0,r.getConfig2)())){let t=o.children[0],e=(0,s.select)(o);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return n?h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):h.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:h}},"insertLabel"),c=(0,n.__name)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),g=(0,n.__name)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function y(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function f(t,e,a,l,i,r){let n=[],s=a-t,h=2*Math.PI/(s/r),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+i*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function u(t,e,a,l,i,r){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}function m(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),l=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",l);let i=e.find(t=>"none"!==t.getAttribute("fill")),r=e.find(t=>"none"!==t.getAttribute("stroke")),s=(0,n.__name)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");i&&Object.entries({fill:s(i,"fill"),"fill-opacity":s(i,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),r&&Object.entries({stroke:s(r,"stroke"),"stroke-width":s(r,"stroke-width")??"1","stroke-opacity":s(r,"stroke-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)});let h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(a),h}(0,n.__name)(y,"createPathFromPoints"),(0,n.__name)(f,"generateFullSineWavePoints"),(0,n.__name)(u,"generateCirclePoints"),(0,n.__name)(m,"mergePaths");var w=(0,n.__name)((t,e)=>{var a,l,i=t.x,r=t.y,n=e.x-i,s=e.y-r,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:i+a,y:r+l}},"intersectRect"),p=(0,n.__name)(async(t,e,a,i=!1,n=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);let h=(0,r.getConfig2)(),o=(0,r.getEffectiveHtmlLabels)(h);return await (0,l.createText)(t,s,{style:a,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:n,width:1/0},h)},"createLabel"),x=(0,n.__name)((t,e,a,l,i)=>["M",t+i,e,"H",t+a-i,"A",i,i,"0 0 1",t+a,e+i,"V",e+l-i,"A",i,i,"0 0 1",t+a-i,e+l,"H",t+i,"A",i,i,"0 0 1",t,e+l-i,"V",e+i,"A",i,i,"0 0 1",t+i,e,"Z"].join(" "),"createRoundedRectPathD"),$=(0,n.__name)(async(t,i)=>{let o,d;n.log.info("Creating subgraph rect for ",i.id,i);let c=(0,r.getConfig2)(),{themeVariables:g,handDrawnSeed:y}=c,{clusterBkg:f,clusterBorder:u}=g,{labelStyles:m,nodeStyles:$,borderStyles:b,backgroundStyles:k}=(0,a.styles2String)(i),_=t.insert("g").attr("class","cluster "+i.cssClasse
1s).attr("id",i.domId).attr("data-look",i.look),S=(0,r.getEffectiveHtmlLabels)(c),v=_.insert("g").attr("class","cluster-label "),M=(o="markdown"===i.labelType?await (0,l.createText)(v,i.label,{style:i.labelStyle,useHtmlLabels:S,isNode:!0,width:i.width}):await p(v,i.label,i.labelStyle||"",!1,!0)).getBBox();if((0,r.getEffectiveHtmlLabels)(c)){let t=o.children[0],e=(0,s.select)(o);M=t.getBoundingClientRect(),e.attr("width",M.width),e.attr("height",M.height)}let N=i.width<=M.width+i.padding?M.width+i.padding:i.width;i.width<=M.width+i.padding?i.diff=(N-i.width)/2-i.padding:i.diff=-i.padding;let D=i.height,C=i.x-N/2,A=i.y-D/2;if(n.log.trace("Data ",i,JSON.stringify(i)),"handDrawn"===i.look){let t=h.default.svg(_),e=(0,a.userNodeOverrides)(i,{roughness:.7,fill:f,stroke:u,fillWeight:3,seed:y}),l=t.path(x(C,A,N,D,0),e);(d=_.insert(()=>(n.log.debug("Rough node insert CXC",l),l),":first-child")).select("path:nth-child(2)").attr("style",b.join(";")),d.select("path").attr("style",k.join(";").replace("fill","stroke"))}else(d=_.insert("rect",":first-child")).attr("style",$).attr("rx",i.rx).attr("ry",i.ry).attr("x",C).attr("y",A).attr("width",N).attr("height",D);let{subGraphTitleTopMargin:B}=(0,e.getSubGraphTitleMargins)(c);if(v.attr("transform",`translate(${i.x-M.width/2}, ${i.y-i.height/2+B})`),m){let t=v.select("span");t&&t.attr("style",m)}let L=d.node().getBBox();return i.offsetX=0,i.width=L.width,i.height=L.height,i.offsetY=M.height-i.padding/2,i.intersect=function(t){return w(i,t)},{cluster:_,labelBBox:M}},"rect"),b=(0,n.__name)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.domId),l=a.insert("rect",":first-child"),i=0*e.padding,r=i/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-r).attr("y",e.y-e.height/2-r).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return w(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),k=(0,n.__name)(async(t,e)=>{let a,l=(0,r.getConfig2)(),{themeVariables:i,handDrawnSeed:n}=l,{altBackground:o,compositeBackground:d,compositeTitleBackground:c,nodeBorder:g}=i,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),u=y.insert("g").attr("class","cluster-label"),m=y.append("rect"),$=await p(u,e.label,e.labelStyle,void 0,!0),b=$.getBBox();if((0,r.getEffectiveHtmlLabels)(l)){let t=$.children[0],e=(0,s.select)($);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}let k=0*e.padding,_=(e.width<=b.width+e.padding?b.width+e.padding:e.width)+k;e.width<=b.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+k,v=e.height+k-b.height-6,M=e.x-_/2,N=e.y-S/2;e.width=_;let D=e.y-e.height/2-k/2+b.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=h.default.svg(y),i=e.rx||e.ry?l.path(x(M,N,_,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:n}):l.rectangle(M,N,_,S,{seed:n});a=y.insert(()=>i,":first-child");let r=l.rectangle(M,D,_,v,{fill:t?o:d,fillStyle:t?"hachure":"solid",stroke:g,seed:n});a=y.insert(()=>i,":first-child"),m=y.insert(()=>r)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",M).attr("y",N).attr("width",_).attr("height",S).attr("data-look",e.look),m.attr("class","inner").attr("x",M).attr("y",D).attr("width",_).attr("height",v);return u.attr("transform",`translate(${e.x-b.width/2}, ${N+1-3*!(0,r.getEffectiveHtmlLabels)(l)})`),e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=b.height-e.padding/2,e.labelBBox=b,e.intersect=function(t){return w(e,t)},{cluster:y,labelBBox:b}},"roundedWithTitle"),_=(0,n.__name)(async(t,i)=>{let o;n.log.info("Creating subgraph rect for ",i.id,i);let d=(0,r.getConfig2)(),{themeVariables:c,handDrawnSeed:g}=d,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:u,nodeStyles:m,borderStyles:p,backgroundStyles:$}=(0,a.styles2String)(i),b=t.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.domId).attr("data-look",i.look),k=(0,r.getEffectiveHtmlLabels)(d),_=b.insert("g").attr("class","cluster-label "),S=await (0,l.createText)(_,i.label,{style:i.labelStyle,useHtmlLabels:k,isNode:!0,width:i.width}),v=S.getBBox();if((0,r.getEffectiveHtmlLabels)(d)){let t=S.children[0],e=(0,s.select)(S);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}let M=i.width<=v.width+i.padding?v.width+i.padding:i.width;i.width<=v.width+i.padding?i.diff=(M-i.width)/2-i.padding:i.diff=-i.padding;let N=i.height,D=i.x-M/2,C=i.y-N/2;if(n.log.trace("Data ",i,JSON.stringify(i)),"handDrawn"===i.look){let t=h.default.svg(b),e=(0,a.userNodeOverrides)(i,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),l=t.path(x(D,C,M,N,i.rx),e);(o=b.insert(()=>(n.log.debug("Rough node insert CXC",l),l),":first-child")).select("path:nth-child(2)").attr("style",p.join(";")),o.select("path").attr("style",$.join(";").replace("fill","stroke"))}else(o=b.insert("rect",":first-child")).attr("style",m).attr("rx",i.rx).attr("ry",i.ry).attr("x",D).attr("y",C).attr("width",M).attr("height",N);let{subGraphTitleTopMargin:A}=(0,e.getSubGraphTitleMargins)(d);if(_.attr("transform",`translate(${i.x-v.width/2}, ${i.y-i.height/2+A})`),u){let t=_.select("span");t&&t.attr("style",u)}let B=o.node().getBBox();return i.offsetX=0,i.width=B.width,i.height=B.height,i.offsetY=v.height-i.padding/2,i.intersect=function(t){return w(i,t)},{cluster:b,labelBBox:v}}
1,"kanbanSection"),S={rect:$,squareRect:$,roundedWithTitle:k,noteGroup:b,divider:(0,n.__name)((t,e)=>{let a,{themeVariables:l,handDrawnSeed:i}=(0,r.getConfig2)(),{nodeBorder:n}=l,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),o=s.insert("g",":first-child"),d=0*e.padding,c=e.width+d;e.diff=-e.padding;let g=e.height+d,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=h.default.svg(s).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:i});a=s.insert(()=>t,":first-child")}else{a=o.insert("rect",":first-child");let t="outer";e.look,t="divider",a.attr("class",t).attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look)}return e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return w(e,t)},{cluster:s,labelBBox:{}}},"divider"),kanbanSection:_},v=new Map,M=(0,n.__name)(async(t,e)=>{let a=e.shape||"rect",l=await S[a](t,e);return v.set(e.id,l),l},"insertCluster"),N=(0,n.__name)(()=>{v=new Map},"clear");function D(t,e,a,l){var i=t.x,r=t.y,n=i-l.x,s=r-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<i&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<r&&(d=-d),{x:i+o,y:r+d}}function C(t,e,a){return D(t,e,e,a)}function A(t,e,a,l){{let i=e.y-t.y,r=t.x-e.x,n=e.x*t.y-t.x*e.y,s=i*a.x+r*a.y+n,h=i*l.x+r*l.y+n;if(0!==s&&0!==h&&B(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&B(g,y))return;let f=i*d-o*r;if(0===f)return;let u=Math.abs(f/2),m=r*c-d*n;return{x:m<0?(m-u)/f:(m+u)/f,y:(m=o*n-i*c)<0?(m-u)/f:(m+u)/f}}}function B(t,e){return t*e>0}function L(t,e,a){let l=t.x,i=t.y,r=[],n=1/0,s=1/0;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=i-t.height/2-s;for(let l=0;l<e.length;l++){let i=e[l],n=e[l<e.length-1?l+1:0],s=A(t,a,{x:h+i.x,y:o+i.y},{x:h+n.x,y:o+n.y});s&&r.push(s)}return r.length?(r.length>1&&r.sort(function(t,e){let l=t.x-a.x,i=t.y-a.y,r=Math.sqrt(l*l+i*i),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return r<h?-1:+(r!==h)}),r[0]):t}(0,n.__name)(function(t,e){return t.intersect(e)},"intersectNode"),(0,n.__name)(D,"intersectEllipse"),(0,n.__name)(C,"intersectCircle"),(0,n.__name)(A,"intersectLine"),(0,n.__name)(B,"sameSign"),(0,n.__name)(L,"intersectPolygon");function R(t,e){let{labelStyles:l}=(0,a.styles2String)(e);e.labelStyle=l;let r=g(e),s=r;r||(s="anchor");let o=t.insert("g").attr("class",s).attr("id",e.domId||e.id),{cssStyles:d}=e,y=h.default.svg(o),f=(0,a.userNodeOverrides)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(f.roughness=0);let u=y.circle(0,0,2,f),m=o.insert(()=>u,":first-child");return m.attr("class","anchor").attr("style",(0,i.handleUndefinedAttr)(d)),c(e,m),e.intersect=function(t){return n.log.info("Circle intersect",e,1,t),C(e,1,t)},o}function O(t,e,a,l,i,r,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/i)**2+((l-e)/2/r)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*r*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*i*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/r,(t-d)/i),y=Math.atan2((l-c)/r,(a-d)/i)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+i*Math.cos(e),l=c+r*Math.sin(e);f.push({x:a,y:l})}return f}function P(t,e,a){let[l,i]=[e,a].sort((t,e)=>e-t);return i*(1-Math.sqrt(1-(t/l/2)**2))}async function T(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,s="neo"===e.look?16:r,d="neo"===e.look?12:r,f=(0,n.__name)(t=>t+d,"calcTotalHeight"),u=(0,n.__name)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:m,bbox:w}=await o(t,e,g(e)),p=f(e?.height?e?.height:w.height),[x,$]=u(p),b=P(p,x,$),k=(e?.width?e?.width:w.width)+2*s+b-b,{cssStyles:_}=e,S=[{x:k/2,y:-p/2},{x:-k/2,y:-p/2},...O(-k/2,-p/2,-k/2,p/2,x,$,!1),{x:k/2,y:p/2},...O(k/2,p/2,k/2,-p/2,x,$,!0)],v=h.default.svg(m),M=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let N=y(S),D=v.path(N,M),C=m.insert(()=>D,":first-child");return C.attr("class","basic label-container outer-path"),_&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",_),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${x/2}
1, 0)`),c(e,C),e.intersect=function(t){return L(e,S,t)},m}function I(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function E(t,e){let l,{labelStyles:i,nodeStyles:r}=(0,a.styles2String)(e);e.labelStyle=i;let n=e.padding??0,s="neo"===e.look?28:n,d="neo"===e.look?24:n,{shapeSvg:f,bbox:u}=await o(t,e,g(e)),m=(e?.width??u.width)+("neo"===e.look?2*s:s+12),w=(e?.height??u.height)+("neo"===e.look?2*d:d),p=-w,x=[{x:12,y:p},{x:m,y:p},{x:m,y:0},{x:0,y:0},{x:0,y:p+12},{x:12,y:p}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=h.default.svg(f),i=(0,a.userNodeOverrides)(e,{}),r=y(x),n=t.path(r,i);l=f.insert(()=>n,":first-child").attr("transform",`translate(${-m/2}, ${w/2})`),$&&l.attr("style",$)}else l=I(f,m,w,x);return r&&l.attr("style",r),c(e,l),e.intersect=function(t){return L(e,x,t)},f}function H(t,e){let{nodeStyles:l}=(0,a.styles2String)(e);e.label="";let i=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:r}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],o=h.default.svg(i),d=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let c=y(s),f=o.path(c,d),u=i.insert(()=>f,":first-child");return r&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",r),l&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",l),e.width=28,e.height=28,e.intersect=function(t){return L(e,s,t)},i}async function W(t,e,l){let r,{labelStyles:s,nodeStyles:d}=(0,a.styles2String)(e);e.labelStyle=s;let{shapeSvg:y,bbox:f,halfPadding:u}=await o(t,e,g(e)),m=l?.padding??u,w="neo"===e.look?f.width/2+32:f.width/2+m,{cssStyles:p}=e;if("handDrawn"===e.look){let t=h.default.svg(y),l=(0,a.userNodeOverrides)(e,{}),n=t.circle(0,0,2*w,l);(r=y.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",(0,i.handleUndefinedAttr)(p))}else r=y.insert("circle",":first-child").attr("class","basic label-container").attr("style",d).attr("r",w).attr("cx",0).attr("cy",0);return c(e,r),e.calcIntersect=function(t,e){let a=t.width/2;return C(t,a,e)},e.intersect=function(t){return n.log.info("Circle intersect",e,w,t),C(e,w,t)},y}function q(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,i={x:l/2*e,y:l/2*a},r={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${r.x},${r.y} L ${s.x},${s.y} 2 M ${i.x},${i.y} L ${n.x},${n.y}`}function j(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l,e.label="";let r=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),s=Math.max(30,e?.width??0),{cssStyles:o}=e,d=h.default.svg(r),y=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let f=d.circle(0,0,2*s,y),u=q(s),m=d.path(u,y),w=r.insert(()=>f,":first-child");return w.insert(()=>m),w.attr("class","outer-path"),o&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),c(e,w),e.intersect=function(t){return n.log.info("crossedCircle intersect",e,{radius:s,point:t}),C(e,s,t)},r}function z(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function U(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:r,bbox:n,label:s}=await o(t,e,g(e)),d="neo"===e.look?18:e.padding??0,f="neo"===e.look?12:e.padding??0,u=n.width+d,m=n.height+f,w=Math.max(5,.1*m),{cssStyles:p}=e,x=[...z(u/2,-m/2,w,30,-90,0),{x:-u/2-w,y:w},...z(u/2+2*w,-w,w,20,-180,-270),...z(u/2+2*w,w,w,20,-90,-180),{x:-u/2-w,y:-m/2},...z(u/2,m/2,w,20,0,90)],$=[{x:u/2,y:-m/2-w},{x:-u/2,y:-m/2-w},...z(u/2,-m/2,w,20,-90,0),{x:-u/2-w,y:-w},...z(u/2+.1*u,-w,w,20,-180,-270),...z(u/2+.1*u,w,w,20,-90,-180),{x:-u/2-w,y:m/2},...z(u/2,m/2,w,20,0,90),{x:-u/2,y:m/2+w},{x:u/2,y:m/2+w}],b=h.default.svg(r),k=(0,a.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let _=y(x).replace("Z",""),S=b.path(_,k),v=y($),M=b.path(v,{...k}),N=r.insert("g",":first-child");return N.insert(()=>M,":first-child").attr("stroke-opacity",0),N.insert(()=>S,":first-child"),N.attr("class","text"),p&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${w}, 0)`),s.attr("transform",`translate(${-u/2+w-(n.x-(n.left??0))}
2,${-m/2+(e.padding??0)/2-(n.y-(n.top??0))})`),c(e,N),e.intersect=function(t){return L(e,$,t)},r}function F(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:r,y:o})}return n}async function V(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:r,bbox:n,label:s}=await o(t,e,g(e)),d="neo"===e.look?18:e.padding??0,f="neo"===e.look?12:e.padding??0,u=n.width+("neo"===e.look?2*d:d),m=n.height+("neo"===e.look?2*f:f),w=Math.max(5,.1*m),{cssStyles:p}=e,x=[...F(u/2,-m/2,w,20,-90,0),{x:u/2+w,y:-w},...F(u/2+2*w,-w,w,20,-180,-270),...F(u/2+2*w,w,w,20,-90,-180),{x:u/2+w,y:m/2},...F(u/2,m/2,w,20,0,90)],$=[{x:-u/2,y:-m/2-w},{x:u/2,y:-m/2-w},...F(u/2,-m/2,w,20,-90,0),{x:u/2+w,y:-w},...F(u/2+2*w,-w,w,20,-180,-270),...F(u/2+2*w,w,w,20,-90,-180),{x:u/2+w,y:m/2},...F(u/2,m/2,w,20,0,90),{x:u/2,y:m/2+w},{x:-u/2,y:m/2+w}],b=h.default.svg(r),k=(0,a.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let _=y(x).replace("Z",""),S=b.path(_,k),v=y($),M=b.path(v,{...k}),N=r.insert("g",":first-child");return N.insert(()=>M,":first-child").attr("stroke-opacity",0),N.insert(()=>S,":first-child"),N.attr("class","text"),p&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${-w}, 0)`),s.attr("transform",`translate(${-u/2+(e.padding??0)/2-(n.x-(n.left??0))},${-m/2+(e.padding??0)/2-(n.y-(n.top??0))})`),c(e,N),e.intersect=function(t){return L(e,$,t)},r}function X(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function Z(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:r,bbox:n,label:s}=await o(t,e,g(e)),d="neo"===e.look?18:e.padding??0,f="neo"===e.look?12:e.padding??0,u=n.width+("neo"===e.look?2*d:d),m=n.height+("neo"===e.look?2*f:f),w=Math.max(5,.1*m),{cssStyles:p}=e,x=[...X(u/2,-m/2,w,30,-90,0),{x:-u/2-w,y:w},...X(u/2+2*w,-w,w,20,-180,-270),...X(u/2+2*w,w,w,20,-90,-180),{x:-u/2-w,y:-m/2},...X(u/2,m/2,w,20,0,90)],$=[...X(-u/2+w+w/2,-m/2,w,20,-90,-180),{x:u/2-w/2,y:w},...X(-u/2-w/2,-w,w,20,0,90),...X(-u/2-w/2,w,w,20,-90,0),{x:u/2-w/2,y:-w},...X(-u/2+w+w/2,m/2,w,30,-180,-270)],b=[{x:u/2,y:-m/2-w},{x:-u/2,y:-m/2-w},...X(u/2,-m/2,w,20,-90,0),{x:-u/2-w,y:-w},...X(u/2+2*w,-w,w,20,-180,-270),...X(u/2+2*w,w,w,20,-90,-180),{x:-u/2-w,y:m/2},...X(u/2,m/2,w,20,0,90),{x:-u/2,y:m/2+w},{x:u/2-w-w/2,y:m/2+w},...X(-u/2+w+w/2,-m/2,w,20,-90,-180),{x:u/2-w/2,y:w},...X(-u/2-w/2,-w,w,20,0,90),...X(-u/2-w/2,w,w,20,-90,0),{x:u/2-w/2,y:-w},...X(-u/2+w+w/2,m/2,w,30,-180,-270)],k=h.default.svg(r),_=(0,a.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");let S=y(x).replace("Z",""),v=k.path(S,_),M=y($).replace("Z",""),N=k.path(M,_),D=y(b),C=k.path(D,{..._}),A=r.insert("g",":first-child");return A.insert(()=>C,":first-child").attr("stroke-opacity",0),A.insert(()=>v,":first-child"),A.insert(()=>N,":first-child"),A.attr("class","text"),p&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${w-w/4}, 0)`),s.attr("transform",`translate(${-u/2+(e.padding??0)/2-(n.x-(n.left??0))},${-m/2+(e.padding??0)/2-(n.y-(n.top??0))})`),c(e,A),e.intersect=function(t){return L(e,b,t)},r}async function G(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,{shapeSvg:d,bbox:f}=await o(t,e,g(e)),m=Math.max(20,(f.width+2*n)*1.25,e?.width??0),w=Math.max(5,f.height+2*s,e?.height??0),p=w/2,{cssStyles:x}=e,$=h.default.svg(d),b=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=m-p,_=w/4,S=[{x:k,y:0},{x:_,y:0},{x:0,y:w/2},{x:_,y:w},{x:k,y:w},...u(-k,-w/2,p,50,270,90)],v=y(S),M=$.path(v,b),N=d.insert(()=>M,":first-child");return N.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&N.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&N.selectChildren("path").attr("style",i),N.attr("transform",`translate(${-m/2}, ${-w/2})`),c(e,N),e.intersect=function(t){return L(e,S,t)},d}(0,n.__name)(R,"anchor"),(0,n.__name)(O,"generateArcPoints"),(0,n.__name)(P,"calculateArcSagitta"),(0,n.__name)(T,"bowTieRect"),(0,n.__name)(I,"insertPolygonShape"),(0,n.__name)(E,"card"),(0,n.__name)(H,"choice"),(0,n.__name)(W,"circle"),(0,n.__name)(q,"createLine"),(0,n.__name)(j,"crossedCircle"),(0,n.__name)(z,"generateCirclePoints"),(0,n.__name)(U,"curlyBraceLeft"),(0,n.__name)(F,"generateCirclePoints"),(0,n.__name)(V,"curlyBraceRight"),(0,n.__name)(X,"generateCirclePoints"),(0,n.__name)(Z,"curlyBraces"),(0,n.__name)(G,"curvedTrapezoid");var J=(0,n.__name)((t,e,a,l,i,r)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),Y=(0,n.__name)((t,e,a,l,i,r)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),K=(0,n.__name)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function Q(t,e){let l,{labelStyles:r,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=r;let s=e.padding??0,d="neo"===e.look?24:s,y="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-y,e.width<8&&(e.width=8),e.height=(e.height??0)-d-t/2/(2.5+t/50)*3,e.height<8&&(e.height=8)}let{shapeSvg:f,bbox:u,label:m}=await o(t,e,g(e)),p=(e.width?e.width:u.width)+y,x=p/2,$=x/(2.5+p/50),b=(e.height?e.height:u.height)+d+$,{cssStyles:k}=e;
2if("handDrawn"===e.look){let t=h.default.svg(f),i=Y(0,0,p,b,x,$),r=K(0,$,p,b,x,$),n=(0,a.userNodeOverrides)(e,{}),s=t.path(i,n),o=t.path(r,(0,a.userNodeOverrides)(e,{fill:"none"}));l=f.insert(()=>o,":first-child"),(l=f.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&l.attr("style",k)}else{let t=J(0,0,p,b,x,$);l=f.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,i.handleUndefinedAttr)(k)).attr("style",n)}return l.attr("label-offset-y",$),l.attr("transform",`translate(${-p/2}, ${-(b/2+$)})`),c(e,l),m.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(t){let a=w(e,t),l=a.x-(e.x??0);if(0!=x&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-$)){let i=$*$*(1-l*l/(x*x));i>0&&(i=Math.sqrt(i)),i=$-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},f}async function tt(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:d,label:y}=await o(t,e,g(e)),f=d.width+r,u=d.height+n,m=.2*u,p=-f/2,x=-u/2-m/2,{cssStyles:$}=e,b=h.default.svg(s),k=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let _=b.polygon([{x:p,y:x+m},{x:-p,y:x+m},{x:-p,y:-x},{x:p,y:-x},{x:p,y:x},{x:-p,y:x},{x:-p,y:x+m}].map(t=>[t.x,t.y]),k),S=s.insert(()=>_,":first-child");return S.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),y.attr("transform",`translate(${p+(e.padding??0)/2-(d.x-(d.left??0))}, ${x+m+(e.padding??0)/2-(d.y-(d.top??0))})`),c(e,S),e.intersect=function(t){return w(e,t)},s}async function te(t,e){let l,{labelStyles:r,nodeStyles:s}=(0,a.styles2String)(e),d="neo"===e.look?12:5;e.labelStyle=r;let y=e.padding??0,f="neo"===e.look?16:y,{shapeSvg:u,bbox:m}=await o(t,e,g(e)),w=(e?.width?e?.width/2:m.width/2)+(f??0),p=w-d,{cssStyles:x}=e;if("handDrawn"===e.look){let t=h.default.svg(u),r=(0,a.userNodeOverrides)(e,{roughness:.2,strokeWidth:2.5}),n=(0,a.userNodeOverrides)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*w,r),o=t.circle(0,0,2*p,n);(l=u.insert("g",":first-child")).attr("class",(0,i.handleUndefinedAttr)(e.cssClasses)).attr("style",(0,i.handleUndefinedAttr)(x)),l.node()?.appendChild(s),l.node()?.appendChild(o)}else{let t=(l=u.insert("g",":first-child")).insert("circle",":first-child"),e=l.insert("circle");l.attr("class","basic label-container").attr("style",s),t.attr("class","outer-circle").attr("style",s).attr("r",w).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",s).attr("r",p).attr("cx",0).attr("cy",0)}return c(e,l),e.intersect=function(t){return n.log.info("DoubleCircle intersect",e,w,t),C(e,w,t)},u}function ta(t,e,{config:{themeVariables:l}}){let{labelStyles:i,nodeStyles:r}=(0,a.styles2String)(e);e.label="",e.labelStyle=i;let s=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,d=h.default.svg(s),{nodeBorder:y}=l,f=(0,a.userNodeOverrides)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(f.roughness=0);let u=d.circle(0,0,14,f),m=s.insert(()=>u,":first-child");return m.selectAll("path").attr("style",`fill: ${y} !important;`),o&&o.length>0&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",o),r&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",r),c(e,m),e.intersect=function(t){return n.log.info("filledCircle intersect",e,{radius:7,point:t}),C(e,7,t)},s}async function tl(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,s="neo"===e.look?2*r:r;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-s-s/2,e.width<10&&(e.width=10));let{shapeSvg:d,bbox:f,label:u}=await o(t,e,g(e)),m=(e?.width?e?.width:f.width)+(s??0),w=e?.height?e?.height:m+f.height,p=[{x:0,y:-w},{x:w,y:-w},{x:w/2,y:0}],{cssStyles:x}=e,$=h.default.svg(d),b=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=y(p),_=$.path(k,b),S=d.insert(()=>_,":first-child").attr("transform",`translate(${-w/2}, ${w/2})`).attr("class","outer-path");return x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",i),e.width=m,e.height=w,c(e,S),u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))}
2, ${-w/2+(e.padding??0)/2+(f.y-(f.top??0))})`),e.intersect=function(t){return n.log.info("Triangle intersect",e,p,t),L(e,p,t)},d}function ti(t,e,{dir:l,config:{state:i,themeVariables:r}}){let{nodeStyles:n}=(0,a.styles2String)(e);e.label="";let s=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,d=Math.max(70,e?.width??0),y=Math.max(10,e?.height??0);"LR"===l&&(d=Math.max(10,e?.width??0),y=Math.max(70,e?.height??0));let f=-1*d/2,u=-1*y/2,m=h.default.svg(s),p=(0,a.userNodeOverrides)(e,{stroke:r.lineColor,fill:r.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let x=m.rectangle(f,u,d,y,p),$=s.insert(()=>x,":first-child");o&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",o),n&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",n),c(e,$);let b=i?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return w(e,t)},s}async function tr(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*r,e.width<15&&(e.width=15));let{shapeSvg:d,bbox:f}=await o(t,e,g(e)),m=(e?.width?e?.width:Math.max(15,f.width))+2*r,w=(e?.height?e?.height:Math.max(10,f.height))+2*s,p=w/2,{cssStyles:x}=e,$=h.default.svg(d),b=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-m/2,y:-w/2},{x:m/2-p,y:-w/2},...u(-m/2+p,0,p,50,90,270),{x:m/2-p,y:w/2},{x:-m/2,y:w/2}],_=y(k),S=$.path(_,b),v=d.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",i),c(e,v),e.intersect=function(t){return n.log.info("Pill intersect",e,{radius:p,point:t}),L(e,k,t)},d}(0,n.__name)(Q,"cylinder"),(0,n.__name)(tt,"dividedRectangle"),(0,n.__name)(te,"doublecircle"),(0,n.__name)(ta,"filledCircle"),(0,n.__name)(tl,"flippedTriangle"),(0,n.__name)(ti,"forkJoin"),(0,n.__name)(tr,"halfRoundedRectangle");var tn=(0,n.__name)((t,e,a,l,i)=>`M${t+i},${e} L${t+a-i},${e} L${t+a},${e-l/2} L${t+a-i},${e-l} L${t+i},${e-l} L${t},${e-l/2} Z`,"createHexagonPathD");async function ts(t,e){let l,{labelStyles:i,nodeStyles:r}=(0,a.styles2String)(e),n="neo"===e.look?3.5:4;e.labelStyle=i;let s=e.padding??0,d="neo"===e.look?70:s,y="neo"===e.look?32:s;if(e.width||e.height){let t=e.height??0;e.width=(e?.width??0)-t/n*2-y,e.height=(e.height??0)-d}let{shapeSvg:f,bbox:u}=await o(t,e,g(e)),m=(e?.height?e?.height:u.height)+d,w=m/n,p=(e?.width?e?.width:u.width)+2*w+y,x=[{x:w,y:0},{x:p-w,y:0},{x:p,y:-m/2},{x:p-w,y:-m},{x:w,y:-m},{x:0,y:-m/2}],{cssStyles:$}=e;
2if("handDrawn"===e.look){let t=h.default.svg(f),i=(0,a.userNodeOverrides)(e,{}),r=tn(0,0,p,m,w),n=t.path(r,i);l=f.insert(()=>n,":first-child").attr("transform",`translate(${-p/2}, ${m/2})`),$&&l.attr("style",$)}else l=I(f,p,m,x);return r&&l.attr("style",r),e.width=p,e.height=m,c(e,l),e.intersect=function(t){return L(e,x,t)},f}async function th(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.label="",e.labelStyle=l;let{shapeSvg:r}=await o(t,e,g(e)),s=Math.max(30,e?.width??0),d=Math.max(30,e?.height??0),{cssStyles:f}=e,u=h.default.svg(r),m=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let w=[{x:0,y:0},{x:s,y:0},{x:0,y:d},{x:s,y:d}],p=y(w),x=u.path(p,m),$=r.insert(()=>x,":first-child");return $.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",f),i&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",i),$.attr("transform",`translate(${-s/2}, ${-d/2})`),c(e,$),e.intersect=function(t){return n.log.info("Pill intersect",e,{points:w}),L(e,w,t)},r}async function to(t,e,{config:{themeVariables:i,flowchart:r}}){let{labelStyles:s}=(0,a.styles2String)(e);e.labelStyle=s;let d=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(d,r?.wrappingWidth??0);let{shapeSvg:g,bbox:y,label:f}=await o(t,e,"icon-shape default"),u="t"===e.pos,{nodeBorder:m}=i,{stylesMap:p}=(0,a.compileStyles)(e),x=-d/2,$=-d/2,b=8*!!e.label,k=h.default.svg(g),_=(0,a.userNodeOverrides)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");let S=k.rectangle(x,$,d,d,_),v=Math.max(d,y.width),M=d+y.height+b,N=k.rectangle(-v/2,-M/2,v,M,{..._,fill:"transparent",stroke:"none"}),D=g.insert(()=>S,":first-child"),C=g.insert(()=>N);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,l.getIconSVG)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),i=a.width,r=a.height,n=a.x,s=a.y;t.attr("transform",`translate(${-i/2-n},${u?y.height/2+b/2-r/2-s:-y.height/2-b/2-r/2-s})`),t.attr("style",`color: ${p.get("stroke")??m};`)}return f.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${u?-M/2:M/2-y.height})`),D.attr("transform",`translate(0,${u?y.height/2+b/2:-y.height/2-b/2})`),c(e,C),e.intersect=function(t){if(n.log.info("iconSquare intersect",e,t),!e.label)return w(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return L(e,r=u?[{x:a-y.width/2,y:l-i/2},{x:a+y.width/2,y:l-i/2},{x:a+y.width/2,y:l-i/2+y.height+b},{x:a+d/2,y:l-i/2+y.height+b},{x:a+d/2,y:l+i/2},{x:a-d/2,y:l+i/2},{x:a-d/2,y:l-i/2+y.height+b},{x:a-y.width/2,y:l-i/2+y.height+b}]:[{x:a-d/2,y:l-i/2},{x:a+d/2,y:l-i/2},{x:a+d/2,y:l-i/2+d},{x:a+y.width/2,y:l-i/2+d},{x:a+y.width/2/2,y:l+i/2},{x:a-y.width/2,y:l+i/2},{x:a-y.width/2,y:l-i/2+d},{x:a-d/2,y:l-i/2+d}],t)},g}async function td(t,e,{config:{themeVariables:i,flowchart:r}}){let{labelStyles:s}=(0,a.styles2String)(e);e.labelStyle=s;let d=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(d,r?.wrappingWidth??0);let{shapeSvg:g,bbox:y,label:f}=await o(t,e,"icon-shape default"),u=8*!!e.label,m="t"===e.pos,{nodeBorder:p,mainBkg:x}=i,{stylesMap:$}=(0,a.compileStyles)(e),b=h.default.svg(g),k=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid"),k.stroke=$.get("fill")??x;let _=g.append("g");e.icon&&_.html(`<g>${await (0,l.getIconSVG)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);let S=_.node().getBBox(),v=S.width,M=S.height,N=S.x,D=S.y,C=Math.max(v,M)*Math.SQRT2+40,A=b.circle(0,0,C,k),B=Math.max(C,y.width),L=C+y.height+u,R=b.rectangle(-B/2,-L/2,B,L,{...k,fill:"transparent",stroke:"none"}),O=g.insert(()=>A,":first-child"),P=g.insert(()=>R);return _.attr("transform",`translate(${-v/2-N},${m?y.height/2+u/2-M/2-D:-y.height/2-u/2-M/2-D})`),_.attr("style",`color: ${$.get("stroke")??p};`),f.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${m?-L/2:L/2-y.height})`),O.attr("transform",`translate(0,${m?y.height/2+u/2:-y.height/2-u/2})`),c(e,P),e.intersect=function(t){return n.log.info("iconSquare intersect",e,t),w(e,t)},g}async function tc(t,e,{config:{themeVariables:i,flowchart:r}}){let{labelStyles:s}=(0,a.styles2String)(e);e.labelStyle=s;let d=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(d,r?.wrappingWidth??0);let{shapeSvg:g,bbox:y,halfPadding:f,label:u}=await o(t,e,"icon-shape default"),m="t"===e.pos,p=d+2*f,$=d+2*f,{nodeBorder:b,mainBkg:k}=i,{stylesMap:_}=(0,a.compileStyles)(e),S=8*!!e.label,v=h.default.svg(g),M=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid"),M.stroke=_.get("fill")??k;let N=v.path(x(-$/2,-p/2,$,p,5),M),D=Math.max($,y.width),C=p+y.height+S,A=v.rectangle(-D/2,-C/2,D,C,{...M,fill:"transparent",stroke:"none"}),B=g.insert(()=>N,":first-child").attr("class","icon-shape2"),R=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,l.getIconSVG)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),i=a.width,r=a.height,n=a.x,s=a.y;t.attr("transform",`translate(${-i/2-n},${m?y.height/2+S/2-r/2-s:-y.height/2-S/2-r/2-s})`),t.attr("style",`color: ${_.get("stroke")??b};`)}return u.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${m?-C/2:C/2-y.height})`),B.attr("transform",`translate(0,${m?y.height/2+S/2:-y.height/2-S/2})`),c(e,R),e.intersect=function(t){if(n.log.info("iconSquare intersect",e,t),!e.label)return w(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return L(e,r=m?[{x:a-y.width/2,y:l-i/2},{x:a+y.width/2,y:l-i/2},{x:a+y.width/2,y:l-i/2+y.height+S},{x:a+$/2,y:l-i/2+y.height+S},{x:a+$/2,y:l+i/2},{x:a-$/2,y:l+i/2},{x:a-$/2,y:l-i/2+y.height+S},{x:a-y.width/2,y:l-i/2+y.height+S}]:[{x:a-$/2,y:l-i/2},{x:a+$/2,y:l-i/2},{x:a+$/2,y:l-i/2+p},{x:a+y.width/2,y:l-i/2+p},{x:a+y.width/2/2,y:l+i/2},{x:a-y.width/2,y:l+i/2},{x:a-y.width/2,y:l-i/2+p},{x:a-$/2,y:l-i/2+p}],t)},g}async function tg(t,e,{config:{themeVariables:i,flowchart:r}}){let{labelStyles:s}=(0,a.styles2String)(e);e.labelStyle=s;let d=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(d,r?.wrappingWidth??0);let{shapeSvg:g,bbox:y,halfPadding:f,label:u}=await o(t,e,"icon-shape default"),m="t"===e.pos,p=d+2*f,$=d+2*f,{nodeBorder:b,mainBkg:k}=i,{stylesMap:_}=(0,a.compileStyles)(e),S=8*!!e.label,v=h.default.svg(g),M=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid"),M.stroke=_.get("fill")??k;let N=v.path(x(-$/2,-p/2,$,p,.1),M),D=Math.max($,y.width),C=p+y.height+S,A=v.rectangle(-D/2,-C/2,D,C,{...M,fill:"transparent",stroke:"none"}),B=g.insert(()=>
2N,":first-child"),R=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,l.getIconSVG)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),i=a.width,r=a.height,n=a.x,s=a.y;t.attr("transform",`translate(${-i/2-n},${m?y.height/2+S/2-r/2-s:-y.height/2-S/2-r/2-s})`),t.attr("style",`color: ${_.get("stroke")??b};`)}return u.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${m?-C/2:C/2-y.height})`),B.attr("transform",`translate(0,${m?y.height/2+S/2:-y.height/2-S/2})`),c(e,R),e.intersect=function(t){if(n.log.info("iconSquare intersect",e,t),!e.label)return w(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return L(e,r=m?[{x:a-y.width/2,y:l-i/2},{x:a+y.width/2,y:l-i/2},{x:a+y.width/2,y:l-i/2+y.height+S},{x:a+$/2,y:l-i/2+y.height+S},{x:a+$/2,y:l+i/2},{x:a-$/2,y:l+i/2},{x:a-$/2,y:l-i/2+y.height+S},{x:a-y.width/2,y:l-i/2+y.height+S}]:[{x:a-$/2,y:l-i/2},{x:a+$/2,y:l-i/2},{x:a+$/2,y:l-i/2+p},{x:a+y.width/2,y:l-i/2+p},{x:a+y.width/2/2,y:l+i/2},{x:a-y.width/2,y:l+i/2},{x:a-y.width/2,y:l-i/2+p},{x:a-$/2,y:l-i/2+p}],t)},g}async function ty(t,e,{config:{flowchart:l}}){let i=new Image;i.src=e?.img??"",await i.decode();let r=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=r/s;let{labelStyles:d}=(0,a.styles2String)(e);e.labelStyle=d;let g=l?.wrappingWidth;e.defaultWidth=l?.wrappingWidth;let y=Math.max(e.label?g??0:0,e?.assetWidth??r),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:y,u="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??s;e.width=Math.max(f,g??0);let{shapeSvg:m,bbox:p,label:x}=await o(t,e,"image-shape default"),$="t"===e.pos,b=-f/2,k=8*!!e.label,_=h.default.svg(m),S=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let v=_.rectangle(b,-u/2,f,u,S),M=Math.max(f,p.width),N=u+p.height+k,D=_.rectangle(-M/2,-N/2,M,N,{...S,fill:"none",stroke:"none"}),C=m.insert(()=>v,":first-child"),A=m.insert(()=>D);if(e.img){let t=m.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",u),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${$?N/2-u:-N/2})`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${$?-u/2-p.height/2-k/2:u/2-p.height/2+k/2})`),C.attr("transform",`translate(0,${$?p.height/2+k/2:-p.height/2-k/2})`),c(e,A),e.intersect=function(t){if(n.log.info("iconSquare intersect",e,t),!e.label)return w(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return L(e,r=$?[{x:a-p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2+p.height+k},{x:a+f/2,y:l-i/2+p.height+k},{x:a+f/2,y:l+i/2},{x:a-f/2,y:l+i/2},{x:a-f/2,y:l-i/2+p.height+k},{x:a-p.width/2,y:l-i/2+p.height+k}]:[{x:a-f/2,y:l-i/2},{x:a+f/2,y:l-i/2},{x:a+f/2,y:l-i/2+u},{x:a+p.width/2,y:l-i/2+u},{x:a+p.width/2/2,y:l+i/2},{x:a-p.width/2,y:l+i/2},{x:a-p.width/2,y:l-i/2+u},{x:a-f/2,y:l-i/2+u}],t)},m}async function tf(t,e){let l,{labelStyles:i,nodeStyles:r}=(0,a.styles2String)(e);e.labelStyle=i;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:d,bbox:f}=await o(t,e,g(e)),u=Math.max(f.width+(s??0)*2,e?.width??0),m=Math.max(f.height+(n??0)*2,e?.height??0),w=[{x:0,y:0},{x:u,y:0},{x:u+3*m/6,y:-m},{x:-3*m/6,y:-m}],{cssStyles:p}=e;if("handDrawn"===e.look){let t=h.default.svg(d),i=(0,a.userNodeOverrides)(e,{}),r=y(w),n=t.path(r,i);l=d.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${m/2})`),p&&l.attr("style",p)}else l=I(d,u,m,w);return r&&l.attr("style",r),e.width=u,e.height=m,c(e,l),e.intersect=function(t){return L(e,w,t)},d}async function tu(t,e,l){let r,{labelStyles:n,nodeStyles:s}=(0,a.styles2String)(e);e.labelStyle=n;let{shapeSvg:d,bbox:y}=await o(t,e,g(e)),f=Math.max(y.width+2*l.labelPaddingX,e?.width||0),u=Math.max(y.height+2*l.labelPaddingY,e?.height||0),m=-f/2,p=-u/2,{rx:$,ry:b}=e,{cssStyles:k}=e;if(l?.rx&&l.ry&&($=l.rx,b=l.ry),"handDrawn"===e.look){let t=h.default.svg(d),l=(0,a.userNodeOverrides)(e,{}),n=$||b?t.path(x(m,p,f,u,$||0),l):t.rectangle(m,p,f,u,l);(r=d.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",(0,i.handleUndefinedAttr)(k))}else(r=d.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,i.handleUndefinedAttr)($)).attr("ry",(0,i.handleUndefinedAttr)(b)).attr("x",m).attr("y",p).attr("width",f).attr("height",u);return c(e,r),e.calcIntersect=function(t,e){return w(t,e)},e.intersect=function(t){return w(e,t)},d}async function tm(t,e){let{shapeSvg:a,bbox:l,label:i}=await o(t,e,"label"),r=a.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),c(e,r),e.intersect=function(t){return w(e,t)},a}async function tw(t,e){let l,{labelStyles:i,nodeStyles:r}=(0,a.styles2String)(e);e.labelStyle=i;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:d,bbox:f}=await o(t,e,g(e)),u=(e?.height??f.height)+n,m=(e?.width??f.width)+s,w=[{x:0,y:0},{x:m+3*u/6,y:0},{x:m,y:-u},{x:-(3*u)/6,y:-u}],{cssStyles:p}=e;
2if("handDrawn"===e.look){let t=h.default.svg(d),i=(0,a.userNodeOverrides)(e,{}),r=y(w),n=t.path(r,i);l=d.insert(()=>n,":first-child").attr("transform",`translate(${-m/2}, ${u/2})`),p&&l.attr("style",p)}else l=I(d,m,u,w);return r&&l.attr("style",r),e.width=m,e.height=u,c(e,l),e.intersect=function(t){return L(e,w,t)},d}async function tp(t,e){let l,{labelStyles:i,nodeStyles:r}=(0,a.styles2String)(e);e.labelStyle=i;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:d,bbox:f}=await o(t,e,g(e)),u=(e?.height??f.height)+n,m=(e?.width??f.width)+s,w=[{x:-3*u/6,y:0},{x:m,y:0},{x:m+3*u/6,y:-u},{x:0,y:-u}],{cssStyles:p}=e;if("handDrawn"===e.look){let t=h.default.svg(d),i=(0,a.userNodeOverrides)(e,{}),r=y(w),n=t.path(r,i);l=d.insert(()=>n,":first-child").attr("transform",`translate(${-m/2}, ${u/2})`),p&&l.attr("style",p)}else l=I(d,m,u,w);return r&&l.attr("style",r),e.width=m,e.height=u,c(e,l),e.intersect=function(t){return L(e,w,t)},d}function tx(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.label="",e.labelStyle=l;let r=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=Math.max(35,e?.width??0),d=Math.max(35,e?.height??0),f=[{x:o,y:0},{x:0,y:d+3.5},{x:o-14,y:d+3.5},{x:0,y:2*d},{x:o,y:d-3.5},{x:14,y:d-3.5}],u=h.default.svg(r),m=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let w=y(f),p=u.path(w,m),x=r.insert(()=>p,":first-child");return x.attr("class","outer-path"),s&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(-${o/2},${-d})`),c(e,x),e.intersect=function(t){return n.log.info("lightningBolt intersect",e,t),L(e,f,t)},r}(0,n.__name)(ts,"hexagon"),(0,n.__name)(th,"hourglass"),(0,n.__name)(to,"icon"),(0,n.__name)(td,"iconCircle"),(0,n.__name)(tc,"iconRounded"),(0,n.__name)(tg,"iconSquare"),(0,n.__name)(ty,"imageSquare"),(0,n.__name)(tf,"inv_trapezoid"),(0,n.__name)(tu,"drawRect"),(0,n.__name)(tm,"labelRect"),(0,n.__name)(tw,"lean_left"),(0,n.__name)(tp,"lean_right"),(0,n.__name)(tx,"lightningBolt");var t$=(0,n.__name)((t,e,a,l,i,r,n)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createCylinderPathD"),tb=(0,n.__name)((t,e,a,l,i,r,n)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tk=(0,n.__name)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function t_(t,e){let l,{labelStyles:r,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=r;let s=e.padding??0,d="neo"===e.look?16:s,y="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-d,e.width<10&&(e.width=10),e.height=(e.height??0)-y-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:f,bbox:u,label:m}=await o(t,e,g(e)),p=(e?.width?e?.width:u.width)+2*d,x=p/2,$=x/(2.5+p/50),b=(e?.height?e?.height:u.height)+$+2*y,k=.1*b,{cssStyles:_}=e;
2if("handDrawn"===e.look){let t=h.default.svg(f),i=tb(0,0,p,b,x,$,k),r=tk(0,$,p,b,x,$),n=(0,a.userNodeOverrides)(e,{}),s=t.path(i,n),o=t.path(r,n);f.insert(()=>o,":first-child").attr("class","line"),(l=f.insert(()=>s,":first-child")).attr("class","basic label-container"),_&&l.attr("style",_)}else{let t=t$(0,0,p,b,x,$,k);l=f.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,i.handleUndefinedAttr)(_)).attr("style",n)}return l.attr("label-offset-y",$),l.attr("transform",`translate(${-p/2}, ${-(b/2+$)})`),c(e,l),m.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+$-(u.y-(u.top??0))})`),e.intersect=function(t){let a=w(e,t),l=a.x-(e.x??0);if(0!=x&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-$)){let i=$*$*(1-l*l/(x*x));i>0&&(i=Math.sqrt(i)),i=$-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},f}async function tS(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;if(e.width||e.height){let t=e.width;e.width=(t??0)*10/11-2*n,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}let{shapeSvg:d,bbox:y,label:u}=await o(t,e,g(e)),m=(e?.width?e?.width:y.width)+(n??0)*2,w=(e?.height?e?.height:y.height)+(s??0)*2,p="neo"===e.look?w/4:w/8,x=w+p,{cssStyles:$}=e,b=h.default.svg(d),k=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let _=[{x:-m/2-m/2*.1,y:-x/2},{x:-m/2-m/2*.1,y:x/2},...f(-m/2-m/2*.1,x/2,m/2+m/2*.1,x/2,p,.8),{x:m/2+m/2*.1,y:-x/2},{x:-m/2-m/2*.1,y:-x/2},{x:-m/2,y:-x/2},{x:-m/2,y:x/2*1.1},{x:-m/2,y:-x/2}],S=b.polygon(_.map(t=>[t.x,t.y]),k),v=d.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-p/2})`),u.attr("transform",`translate(${-m/2+(e.padding??0)+m/2*.1/2-(y.x-(y.left??0))},${-w/2+(e.padding??0)-p/2-(y.y-(y.top??0))})`),c(e,v),e.intersect=function(t){return L(e,_,t)},d}async function tv(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,d="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-2*d,10),e.height=Math.max((e?.height??0)-2*s-2*d,10));let{shapeSvg:f,bbox:u,label:w}=await o(t,e,g(e)),p=(e?.width?e?.width:u.width)+2*n+2*d,x=(e?.height?e?.height:u.height)+2*s+2*d,$=p-2*d,b=x-2*d,k=-$/2,_=-b/2,{cssStyles:S}=e,v=h.default.svg(f),M=(0,a.userNodeOverrides)(e,{}),N=[{x:k-d,y:_+d},{x:k-d,y:_+b+d},{x:k+$-d,y:_+b+d},{x:k+$-d,y:_+b},{x:k+$,y:_+b},{x:k+$,y:_+b-d},{x:k+$+d,y:_+b-d},{x:k+$+d,y:_-d},{x:k+d,y:_-d},{x:k+d,y:_},{x:k,y:_},{x:k,y:_+d}];"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let D=y(N),C=v.path(D,M),A=y([{x:k,y:_+d},{x:k+$-d,y:_+d},{x:k+$-d,y:_+b},{x:k+$,y:_+b},{x:k+$,y:_},{x:k,y:_}]),B=v.path(A,M);"handDrawn"!==e.look&&(C=m(C),B=m(B));let R=f.insert("g",":first-child");return R.insert(()=>C),R.insert(()=>B),R.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",S),i&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",i),w.attr("transform",`translate(${-(u.width/2)-d-(u.x-(u.left??0))}, ${-(u.height/2)+d-(u.y-(u.top??0))})`),c(e,R),e.intersect=function(t){return L(e,N,t)},f}async function tM(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:r,bbox:n,label:s}=await o(t,e,g(e)),d=e.padding??0,u="neo"===e.look?16:d,m="neo"===e.look?12:d,w=!0;(e.width||e.height)&&(w=!1,e.width=(e?.width??0)-2*u,e.height=(e?.height??0)-3*m);let p=Math.max(n.width,e?.width??0)+2*u,x=Math.max(n.height,e?.height??0)+3*m,$="neo"===e.look?x/4:x/8,b=x+(w?$/2:-$/2),k=-p/2,_=-b/2,{cssStyles:S}=e,v=f(k-10,_+b+10,k+p-10,_+b+10,$,.8),M=v?.[v.length-1],N=[{x:k-10,y:_+10},{x:k-10,y:_+b+10},...v,{x:k+p-10,y:M.y-10},{x:k+p,y:M.y-10},{x:k+p,y:M.y-20},{x:k+p+10,y:M.y-20},{x:k+p+10,y:_-10},{x:k+10,y:_-10},{x:k+10,y:_},{x:k,y:_},{x:k,y:_+10}],D=[{x:k,y:_+10},{x:k+p-10,y:_+10},{x:k+p-10,y:M.y-10},{x:k+p,y:M.y-10},{x:k+p,y:_},{x:k,y:_}],C=h.default.svg(r),A=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let B=y(N),R=C.path(B,A),O=y(D),P=C.path(O,A),T=r.insert(()=>R,":first-child");return T.insert(()=>P),T.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",S),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-$/2})`),s.attr("transform",`translate(${-(n.width/2)-10-(n.x-(n.left??0))}, ${-(n.height/2)+10-$/2-(n.y-(n.top??0))})`),c(e,T),e.intersect=function(t){return L(e,N,t)},r}async function tN(t,e,{config:{themeVariables:l}}){let{labelStyles:i,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=i,e.useHtmlLabels||(0,r.getEffectiveHtmlLabels)((0,r.getConfig)())||
2(e.centerLabel=!0);let{shapeSvg:s,bbox:d,label:y}=await o(t,e,g(e)),f=Math.max(d.width+(e.padding??0)*2,e?.width??0),u=Math.max(d.height+(e.padding??0)*2,e?.height??0),{cssStyles:m}=e,p=h.default.svg(s),x=(0,a.userNodeOverrides)(e,{fill:l.noteBkgColor,stroke:l.noteBorderColor});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=p.rectangle(-f/2,-u/2,f,u,x),b=s.insert(()=>$,":first-child");return b.attr("class","basic label-container outer-path"),y.attr("class","label noteLabel"),m&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",n),y.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),c(e,b),e.intersect=function(t){return w(e,t)},s}(0,n.__name)(t_,"linedCylinder"),(0,n.__name)(tS,"linedWaveEdgedRect"),(0,n.__name)(tv,"multiRect"),(0,n.__name)(tM,"multiWaveEdgedRectangle"),(0,n.__name)(tN,"note");var tD=(0,n.__name)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function tC(t,e){let l,{labelStyles:i,nodeStyles:r}=(0,a.styles2String)(e);e.labelStyle=i;let{shapeSvg:n,bbox:s}=await o(t,e,g(e)),d=s.width+(e.padding??0)+(s.height+(e.padding??0)),y=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}],{cssStyles:f}=e;
2if("handDrawn"===e.look){let t=h.default.svg(n),i=(0,a.userNodeOverrides)(e,{}),r=tD(0,0,d),s=t.path(r,i);l=n.insert(()=>s,":first-child").attr("transform",`translate(${-d/2+.5}, ${d/2})`),f&&l.attr("style",f)}else(l=I(n,d,d,y)).attr("transform",`translate(${-d/2+.5}, ${d/2})`);return r&&l.attr("style",r),c(e,l),e.calcIntersect=function(t,e){let a=t.width,l=L(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:l.x-.5,y:l.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function tA(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,n="neo"===e.look?21:r??0,s="neo"===e.look?12:r??0,{shapeSvg:d,bbox:f,label:u}=await o(t,e,g(e)),m=(e?.width??f.width)+("neo"===e.look?2*n:n),w=(e?.height??f.height)+("neo"===e.look?2*s:s),p=-m/2,x=-w/2,$=x/2,b=[{x:p+$,y:x},{x:p,y:0},{x:p+$,y:-x},{x:-p,y:-x},{x:-p,y:x}],{cssStyles:k}=e,_=h.default.svg(d),S=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let v=y(b),M=_.path(v,S),N=d.insert(()=>M,":first-child");return N.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${-$/2},0)`),u.attr("transform",`translate(${-$/2-f.width/2-(f.x-(f.left??0))}, ${-(f.height/2)-(f.y-(f.top??0))})`),c(e,N),e.intersect=function(t){return L(e,b,t)},d}async function tB(t,e){let l,i,o,{labelStyles:d,nodeStyles:g}=(0,a.styles2String)(e);e.labelStyle=d,l=e.cssClasses?"node "+e.cssClasses:"node default";let y=t.insert("g").attr("class",l).attr("id",e.domId||e.id),f=y.insert("g"),u=y.insert("g").attr("class","label").attr("style",g),m=e.description,$=e.label,b=await p(u,$,e.labelStyle,!0,!0),k={width:0,height:0};if((0,r.getEffectiveHtmlLabels)((0,r.getConfig2)())){let t=b.children[0],e=(0,s.select)(b);k=t.getBoundingClientRect(),e.attr("width",k.width),e.attr("height",k.height)}n.log.info("Text 2",m);let _=m||[],S=b.getBBox(),v=await p(u,Array.isArray(_)?_.join("<br/>"):_,e.labelStyle,!0,!0),M=v.children[0],N=(0,s.select)(v);k=M.getBoundingClientRect(),N.attr("width",k.width),N.attr("height",k.height);let D=(e.padding||0)/2;(0,s.select)(v).attr("transform","translate( "+(k.width>S.width?0:(S.width-k.width)/2)+", "+(S.height+D+5)+")"),(0,s.select)(b).attr("transform","translate( "+(k.width<S.width?0:-(S.width-k.width)/2)+", 0)"),k=u.node().getBBox(),u.attr("transform","translate("+-k.width/2+", "+(-k.height/2-D+3)+")");let C=k.width+(e.padding||0),A=k.height+(e.padding||0),B=-k.width/2-D,L=-k.height/2-D;if("handDrawn"===e.look){let t=h.default.svg(y),l=(0,a.userNodeOverrides)(e,{}),r=t.path(x(B,L,C,A,e.rx||0),l),s=t.line(-k.width/2-D,-k.height/2-D+S.height+D,k.width/2+D,-k.height/2-D+S.height+D,l);o=y.insert(()=>(n.log.debug("Rough node insert CXC",r),s),":first-child"),i=y.insert(()=>(n.log.debug("Rough node insert CXC",r),r),":first-child")}else i=f.insert("rect",":first-child"),o=f.insert("line"),i.attr("class","outer title-state").attr("style",g).attr("x",-k.width/2-D).attr("y",-k.height/2-D).attr("width",k.width+(e.padding||0)).attr("height",k.height+(e.padding||0)),o.attr("class","divider").attr("x1",-k.width/2-D).attr("x2",k.width/2+D).attr("y1",-k.height/2-D+S.height+D).attr("y2",-k.height/2-D+S.height+D);return c(e,i),e.intersect=function(t){return w(e,t)},y}async function tL(t,e,{config:{themeVariables:a}}){let l=a?.radius??5,i={rx:l,ry:l,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return tu(t,e,i)}async function tR(t,e){let{labelStyles:l,nodeStyles:r}=(0,a.styles2String)(e);e.labelStyle=l;let n="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:d,bbox:y,label:f}=await o(t,e,g(e)),u=(e?.width??y.width)+2*n+("neo"===e.look?8:16),m=(e?.height??y.height)+2*s,p=u-8,x=8-u/2,$=-m/2,{cssStyles:b}=e,k=h.default.svg(d),_=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");let S=k.polygon([{x,y:$},{x:x+p,y:$},{x:x+p,y:$+m},{x:x-8,y:$+m},{x:x-8,y:$},{x,y:$},{x,y:$+m}].map(t=>[t.x,t.y]),_),v=d.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path").attr("style",(0,i.handleUndefinedAttr)(b)),r&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",r),b&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",r),f.attr("transform",`translate(${4-y.width/2-(y.x-(y.left??0))}, ${-(y.height/2)-(y.y-(y.top??0))})`),c(e,v),e.intersect=function(t){return w(e,t)},d}async function tO(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));let{shapeSvg:d,bbox:f,label:u}=await o(t,e,g(e)),m=(e?.width?e?.width:f.width)+2*n,w=((e?.height?e?.height:f.height)+2*s)*1.5/1.5,p=-m/2,x=-w/2,{cssStyles:$}=e,b=h.default.svg(d),k=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let _=[{x:p,y:x},{x:p,y:x+w},{x:p+m,y:x+w},{x:p+m,y:x-w/2}],S=y(_),v=b.path(S,k),M=d.insert(()=>v,":first-child");return M.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",$),i&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",i),M.attr("transform",`translate(0, ${w/4})`),u.attr("transform",`translate(${-m/2+(e.padding??0)-(f.x-(f.left??0))}, ${-w/4+(e.padding??0)-(f.y-(f.top??0))})`),c(e,M),e.intersect=function(t){return L(e,_,t)},d}async function tP(t,e){let a=e.padding??0,l="neo"===e.look?16:2*a,i="neo"===e.look?12:a,r={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??l,labelPaddingY:i};return tu(t,e,r)}async function tT(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,n="neo"===e.look?20:r,s="neo"===e.look?12:r,{shapeSvg:d,bbox:f}=await o(t,e,g(e)),m=f.height+("neo"===e.look?2*s:s),w=f.width+m/4+("neo"===e.look?2*n:n),p=m/2,{cssStyles:x}=e,$=h.default.svg(d),b=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-w/2+p,y:-m/2},{x:w/2-p,y:-m/2}
2,...u(-w/2+p,0,p,50,90,270),{x:w/2-p,y:m/2},...u(w/2-p,0,p,50,270,450)],_=y(k),S=$.path(_,b),v=d.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",i),c(e,v),e.intersect=function(t){return L(e,k,t)},d}async function tI(t,e){let a={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return tu(t,e,a)}function tE(t,e,{config:{themeVariables:l}}){let{labelStyles:i,nodeStyles:r}=(0,a.styles2String)(e);e.labelStyle=i;let{cssStyles:n}=e,{lineColor:s,stateBorder:o,nodeBorder:d,nodeShadow:g}=l;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let y=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),f=h.default.svg(y),u=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=f.circle(0,0,e.width,{...u,stroke:s,strokeWidth:2}),w=o??d,p=(e.width??0)*5/14,x=f.circle(0,0,p,{...u,fill:w,stroke:w,strokeWidth:2,fillStyle:"solid"}),$=y.insert(()=>m,":first-child");if($.insert(()=>x),"handDrawn"!==e.look&&$.attr("class","outer-path"),n&&$.selectAll("path").attr("style",n),r&&$.selectAll("path").attr("style",r),e.width<25&&g&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";$.attr("style",`filter:url(#${a})`)}return c(e,$),e.intersect=function(t){return C(e,(e.width??0)/2,t)},y}function tH(t,e,{config:{themeVariables:l}}){let i,{lineColor:r,nodeShadow:n}=l;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.
2width||(e.width=14),e.height||(e.height=14);let s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=h.default.svg(s).circle(0,0,e.width,(0,a.solidStateFill)(r));(i=s.insert(()=>t)).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(i=s.insert("circle",":first-child")).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";i.attr("style",`filter:url(#${a})`)}return c(e,i),e.intersect=function(t){return C(e,(e.width??7)/2,t)},s}async function tW(t,e){let{labelStyles:l,nodeStyles:r}=(0,a.styles2String)(e);e.labelStyle=l;let n=e?.padding??8,s="neo"===e.look?28:n,d="neo"===e.look?12:n,{shapeSvg:y,bbox:f}=await o(t,e,g(e)),u=(e?.width??f.width)+16+s,m=(e?.height??f.height)+d,w=u-16,p=-u/2,x=-m/2,$=[{x:0,y:0},{x:w,y:0},{x:w,y:-m},{x:0,y:-m},{x:0,y:0},{x:-8,y:0},{x:w+8,y:0},{x:w+8,y:-m},{x:-8,y:-m},{x:-8,y:0}];if("handDrawn"===e.look){let t=h.default.svg(y),l=(0,a.userNodeOverrides)(e,{}),r=t.rectangle(p,x,w+16,m,l),n=t.line(p+8,x,p+8,x+m,l),s=t.line(p+8+w,x,p+8+w,x+m,l);y.insert(()=>n,":first-child"),y.insert(()=>s,":first-child");let o=y.insert(()=>r,":first-child"),{cssStyles:d}=e;o.attr("class","basic label-container").attr("style",(0,i.handleUndefinedAttr)(d)),c(e,o)}else{let t=I(y,w,m,$);r&&t.attr("style",r),c(e,t)}return e.intersect=function(t){return L(e,$,t)},y}async function tq(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*n-.2*(e.height+2*s),10));let{shapeSvg:d,bbox:f}=await o(t,e,g(e)),u=(e?.height?e?.height:f.height)+2*s,m=.2*u,w=(e?.width?e?.width:f.width)+2*n+m-m,p=-w/2,x=-u/2,{cssStyles:$}=e,b=h.default.svg(d),k=(0,a.userNodeOverrides)(e,{}),_=[{x:p-m/2,y:x},{x:p+w+m/2,y:x},{x:p+w+m/2,y:x+u},{x:p-m/2,y:x+u}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=y(_),v=b.path(S,k),M=y([{x:p+w-m/2,y:x+u},{x:p+w+m/2,y:x+u},{x:p+w+m/2,y:x+u-.2*u}]),N=b.path(M,{...k,fillStyle:"solid"}),D=d.insert(()=>N,":first-child");return D.insert(()=>v,":first-child"),D.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",i),c(e,D),e.intersect=function(t){return L(e,_,t)},d}async function tj(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:r,bbox:n,label:s}=await o(t,e,g(e)),d=Math.max(n.width+(e.padding??0)*2,e?.width??0),u=Math.max(n.height+(e.padding??0)*2,e?.height??0),m=u/8,w=.2*d,p=.2*u,x=u+m,{cssStyles:$}=e,b=h.default.svg(r),k=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let _=[{x:-d/2-d/2*.1,y:x/2},...f(-d/2-d/2*.1,x/2,d/2+d/2*.1,x/2,m,.8),{x:d/2+d/2*.1,y:-x/2},{x:-d/2-d/2*.1,y:-x/2}],S=-d/2+d/2*.1,v=-x/2-.4*p,M=[{x:S+d-w,y:(v+u)*1.3},{x:S+d,y:v+u-p},{x:S+d,y:(v+u)*.9},...f(S+d,(v+u)*1.25,S+d-w,(v+u)*1.3,-(.02*u),.5)],N=y(_),D=b.path(N,k),C=y(M),A=b.path(C,{...k,fillStyle:"solid"}),B=r.insert(()=>A,":first-child");return B.insert(()=>D,":first-child"),B.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-m/2})`),s.attr("transform",`translate(${-d/2+(e.padding??0)-(n.x-(n.left??0))},${-u/2+(e.padding??0)-m/2-(n.y-(n.top??0))})`),c(e,B),e.intersect=function(t){return L(e,_,t)},r}async function tz(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:r,bbox:n}=await o(t,e,g(e)),s=Math.max(n.width+(e.padding??0),e?.width||0),h=Math.max(n.height+(e.padding??0),e?.height||0),d=r.insert("rect",":first-child");return d.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),c(e,d),e.intersect=function(t){return w(e,t)},r}(0,n.__name)(tC,"question"),(0,n.__name)(tA,"rect_left_inv_arrow"),(0,n.__name)(tB,"rectWithTitle"),
2(0,n.__name)(tL,"roundedRect"),(0,n.__name)(tR,"shadedProcess"),(0,n.__name)(tO,"slopedRect"),(0,n.__name)(tP,"squareRect"),(0,n.__name)(tT,"stadium"),(0,n.__name)(tI,"state"),(0,n.__name)(tE,"stateEnd"),(0,n.__name)(tH,"stateStart"),(0,n.__name)(tW,"subroutine"),(0,n.__name)(tq,"taggedRect"),(0,n.__name)(tj,"taggedWaveEdgedRectangle"),(0,n.__name)(tz,"text");var tU=(0,n.__name)((t,e,a,l,i,r)=>`M${t},${e} 3 a${i},${r} 0,0,1 0,${-l} 4 l${a},0 5 a${i},${r} 0,0,1 0,${l} 6 M${a},${-l} 7 a${i},${r} 0,0,0 0,${l} 8 l${-a},0`,"createCylinderPathD"),tF=(0,n.__name)((t,e,a,l,i,r)=>`M${t},${e} M${t+a},${e} a${i},${r} 0,0,0 0,${-l} l${-a},0 a${i},${r} 0,0,0 0,${l} l${a},0`,"createOuterCylinderPathD"),tV=(0,n.__name)((t,e,a,l,i,r)=>`M${t+a/2},${-l/2} a${i},${r} 0,0,0 0,${l}`,"createInnerCylinderPathD");async function tX(t,e){let l,{labelStyles:r,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=r;let s=e.padding??0,d="neo"===e.look?12:s/2;if(e.width||e.height){let t=e.height??0;e.height=(e.height??0)-d,e.height<5&&(e.height=5),e.width=(e.width??0)-d-t/2/(2.5+t/50)*3,e.width<10&&(e.width=10)}let{shapeSvg:y,bbox:f,label:u}=await o(t,e,g(e)),m=(e.height?e.height:f.height)+d,p=m/2,x=p/(2.5+m/50),$=(e.width?e.width:f.width)+x+d,{cssStyles:b}=e;
8if("handDrawn"===e.look){let t=h.default.svg(y),i=tF(0,0,$,m,x,p),r=tV(0,0,$,m,x,p),n=t.path(i,(0,a.userNodeOverrides)(e,{})),s=t.path(r,(0,a.userNodeOverrides)(e,{fill:"none"}));l=y.insert(()=>s,":first-child"),(l=y.insert(()=>n,":first-child")).attr("class","basic label-container"),b&&l.attr("style",b)}else{let t=tU(0,0,$,m,x,p);(l=y.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,i.handleUndefinedAttr)(b)).attr("style",n)).attr("class","basic label-container outer-path"),b&&l.selectAll("path").attr("style",b),n&&l.selectAll("path").attr("style",n)}return l.attr("label-offset-x",x),l.attr("transform",`translate(${-$/2}, ${m/2} )`),u.attr("transform",`translate(${-(f.width/2)-x-(f.x-(f.left??0))}, ${-(f.height/2)-(f.y-(f.top??0))})`),c(e,l),e.intersect=function(t){let a=w(e,t),l=a.y-(e.y??0);if(0!=p&&(Math.abs(l)<(e.height??0)/2||Math.abs(l)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-x)){let i=x*x*(1-l*l/(p*p));0!=i&&(i=Math.sqrt(Math.abs(i))),i=x-i,t.x-(e.x??0)>0&&(i=-i),a.x+=i}return a},y}async function tZ(t,e){let l,{labelStyles:i,nodeStyles:r}=(0,a.styles2String)(e);e.labelStyle=i;let n=e.padding??0,s=(e.look,n),d="neo"===e.look?2*n:n,{shapeSvg:f,bbox:u}=await o(t,e,g(e)),m=(e?.height??u.height)+s,w=(e?.width??u.width)+d,p=[{x:-3*m/6,y:0},{x:w+3*m/6,y:0},{x:w,y:-m},{x:0,y:-m}],{cssStyles:x}=e;if("handDrawn"===e.look){let t=h.default.svg(f),i=(0,a.userNodeOverrides)(e,{}),r=y(p),n=t.path(r,i);l=f.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${m/2})`),x&&l.attr("style",x)}else l=I(f,w,m,p);return r&&l.attr("style",r),e.width=w,e.height=m,c(e,l),e.intersect=function(t){return L(e,p,t)},f}async function tG(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*n,e.width<15&&(e.width=15));let{shapeSvg:d,bbox:f}=await o(t,e,g(e)),u=(e?.width?e?.width:f.width)+2*n,m=(e?.height?e?.height:f.height)+2*s,{cssStyles:w}=e,p=h.default.svg(d),x=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=[{x:-u/2*.8,y:-m/2},{x:u/2*.8,y:-m/2},{x:u/2,y:-m/2*.6},{x:u/2,y:m/2},{x:-u/2,y:m/2},{x:-u/2,y:-m/2*.6}],b=y($),k=p.path(b,x),_=d.insert(()=>k,":first-child");return _.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",w),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),c(e,_),e.intersect=function(t){return L(e,$,t)},d}async function tJ(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let s=e.padding??0,d="neo"===e.look?2*s:s;(e.width||e.height)&&(e.width=((e?.width??0)-d)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));let{shapeSvg:f,bbox:u,label:m}=await o(t,e,g(e)),w=(0,r.evaluate)((0,r.getConfig2)().flowchart?.htmlLabels),p=(e?.width?e?.width:u.width)+d,x=e?.height?e?.height:p+u.height,$=[{x:0,y:0},{x:x,y:0},{x:x/2,y:-x}],{cssStyles:b}=e,k=h.default.svg(f),_=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");let S=y($),v=k.path(S,_),M=f.insert(()=>v,":first-child").attr("transform",`translate(${-x/2}, ${x/2})`).attr("class","outer-path");return b&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",b),i&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",i),e.width=p,e.height=x,c(e,M),m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))}, ${x/2-(u.height+(e.padding??0)/(w?2:1)-(u.y-(u.top??0)))})`),e.intersect=function(t){return n.log.info("Triangle intersect",e,$,t),L(e,$,t)},f}async function tY(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,d=!0;(e.width||e.height)&&(d=!1,e.width=(e?.width??0)-2*n,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));let{shapeSvg:u,bbox:m,label:w}=await o(t,e,g(e)),p=(e?.width?e?.width:m.width)+(n??0)*2,x=(e?.height?e?.height:m.height)+(s??0)*2,$="neo"===e.look?x/4:x/8,b=x+(d?$:-$),{cssStyles:k}=e,_=14-p,S=_>0?_/2:0,v=h.default.svg(u),M=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let N=[{x:-p/2-S,y:b/2},...f(-p/2-S,b/2,p/2+S,b/2,$,.8),{x:p/2+S,y:-b/2},{x:-p/2-S,y:-b/2}],D=y(N),C=v.path(D,M),A=u.insert(()=>C,":first-child");return A.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(0,${-$/2})`),w.attr("transform",`translate(${-p/2+(e.padding??0)-(m.x-(m.left??0))},${-x/2+(e.padding??0)-$-(m.y-(m.top??0))})`),c(e,A),e.intersect=function(t){return L(e,N,t)},u}async function tK(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?20:r;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);let t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-20/9*t),e.width=e.width-2*n}let{shapeSvg:d,bbox:u}=await o(t,e,g(e)),m=(e?.width?e?.width:u.width)+2*n,w=(e?.height?e?.height:u.height)+s,p=w/8,x=w+2*p,{cssStyles:$}=e,b=h.default.svg(d),k=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let _=[{x:-m/2,y:x/2},...f(-m/2,x/2,m/2,x/2,p,1),{x:m/2,y:-x/2},...f(m/2,-x/2,-m/2,-x/2,p,-1)],S=y(_),v=b.path(S,k),M=d.insert(()=>v,":first-child");return M.attr("class","basic label-container"),$&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),c(e,M),e.intersect=function(t){return L(e,_,t)},d}async function tQ(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*r-10,10),e.height=Math.max((e?.height??0)-2*n-10,10));let{shapeSvg:s,bbox:d,label:y}=await o(t,e,g(e)),f=(e?.width?e?.width:d.width)+2*r+10,u=(e?.height?e?.height:d.height)+2*n+10,m=f-10,w=u-10,p=-m/2,x=-w/2,{cssStyles:$}=e,b=h.default.svg(s),k=(0,a.userNodeOverrides)(e,{}),_=[{x:p-10,y:x-10},{x:p-10,y:x+w},{x:p+m,y:x+w},{x:p+m,y:x-10}],S=`M${p-10},${x-10} L${p+m},${x-10} L${p+m},${x+w} L${p-10},${x+w} L${p-10},${x-10} 9 M${p-10},${x} L${p+m},${x} 10 M${p},${x-10} L${p},${x+w}`;"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let v=b.path(S,k),M=s.insert(()=>v,":first-child");return M.attr("transform","translate(5, 5)"),M.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),y.attr("transform",`translate(${-(d.width/2)+5-(d.x-(d.left??0))}, ${-(d.height/2)+5-(d.y-(d.top??0))})`),c(e,M),e.intersect=function(t){return L(e,_,t)},s}(0,n.__name)(tX,"tiltedCylinder"),(0,n.__name)(tZ,"trapezoid"),(0,n.__name)(tG,"trapezoidalPentagon"),(0,n.__name)(tJ,"triangle"),(0,n.__name)(tY,"waveEdgedRectangle"),(0,n.__name)(tK,"waveRectangle"),(0,n.__name)(tQ,"windowPane");var t0=new Set(["redux-color","redux-dark-color"]),t2=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function t1(t,e){e.alias&&(e.label=e.alias);let{theme:l,themeVariables:n}=(0,r.getConfig)(),{rowEven:o,rowOdd:d,nodeBorder:y,borderColorArray:f}=n;
10if("handDrawn"===e.look){let{themeVariables:a}=(0,r.getConfig)(),{background:l}=a,i={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${l}`]};await t1(t,i)}let u=(0,r.getConfig)();e.useHtmlLabels=u.htmlLabels;let m=u.er?.diagramPadding??10,p=u.er?.entityPadding??6,{cssStyles:x}=e,{labelStyles:$,nodeStyles:b}=(0,a.styles2String)(e);if(0===e.attributes.length&&e.label){let a={rx:0,ry:0,labelPaddingX:m,labelPaddingY:1.5*m,classes:""};(0,i.calculateTextWidth)(e.label,u)+2*a.labelPaddingX<u.er.minEntityWidth&&(e.width=u.er.minEntityWidth);let n=await tu(t,e,a);if(null!=l&&t0.has(l)){let t=e.colorIndex??0;n.attr("data-color-id",`color-${t%f.length}`)}if(!(0,r.evaluate)(u.htmlLabels)){let t=n.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return n}u.htmlLabels||(m*=1.25,p*=1.25);let k=g(e);k||(k="node default");let _=t.insert("g").attr("class",k).attr("id",e.domId||e.id),S=await t5(_,e.label??"",u,0,0,["name"],$);S.height+=p;let v=0,M=[],N=[],D=0,C=0,A=0,B=0,L=!0,R=!0;for(let t of e.attributes){let e=await t5(_,t.type,u,0,v,["attribute-type"],$);D=Math.max(D,e.width+m);let a=await t5(_,t.name,u,0,v,["attribute-name"],$);C=Math.max(C,a.width+m);let l=await t5(_,t.keys.join(),u,0,v,["attribute-keys"],$);A=Math.max(A,l.width+m);let i=await t5(_,t.comment,u,0,v,["attribute-comment"],$);B=Math.max(B,i.width+m);let r=Math.max(e.height,a.height,l.height,i.height)+p;N.push({yOffset:v,rowHeight:r}),v+=r}let O=4;A<=m&&(L=!1,A=0,O--),B<=m&&(R=!1,B=0,O--);let P=_.node().getBBox();if(S.width+2*m-(D+C+A+B)>0){let t=S.width+2*m-(D+C+A+B);D+=t/O,C+=t/O,A>0&&(A+=t/O),B>0&&(B+=t/O)}let T=D+C+A+B,I=h.default.svg(_),E=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(E.roughness=0,E.fillStyle="solid");let H=0;N.length>0&&(H=N.reduce((t,e)=>t+(e?.rowHeight??0),0));let W=Math.max(P.width+2*m,e?.width||0,T),q=Math.max((H??0)+S.height,e?.height||0),j=-W/2,z=-q/2;if(_.selectAll("g:not(:first-child)").each((t,e,a)=>{let l=(0,s.select)(a[e]),i=l.attr("transform"),r=0,n=0;if(i){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(r=parseFloat(t[1]),n=parseFloat(t[2]),l.attr("class").includes("attribute-name")?r+=D:l.attr("class").includes("attribute-keys")?r+=D+C:l.attr("class").includes("attribute-comment")&&(r+=D+C+A))}l.attr("transform",`translate(${j+m/2+r}, ${n+z+S.height+p/2})`)}),_.select(".name").attr("transform","translate("+-S.width/2+", "+(z+p/2)+")"),null!=l&&t0.has(l)){let t=e.colorIndex??0;_.attr("data-color-id",`color-${t%f.length}`)}let U=I.rectangle(j,z,W,q,E),F=_.insert(()=>U,":first-child").attr("class","outer-path").attr("style",x.join(""));for(let[t,e]of(M.push(0),N.entries())){let a=(t+1)%2==0&&0!==e.yOffset,l=I.rectangle(j,S.height+z+e?.yOffset,W,e?.rowHeight,{...E,fill:a?o:d,stroke:y});_.insert(()=>l,"g.label").attr("style",x.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let V=t8(j,S.height+z,W+j,S.height+z,1e-4),X=I.polygon(V.map(t=>[t.x,t.y]),E);if(_.insert(()=>X).attr("class","divider"),V=t8(D+j,S.height+z,D+j,q+z,1e-4),X=I.polygon(V.map(t=>[t.x,t.y]),E),_.insert(()=>X).attr("class","divider"),L){let t=D+C+j;V=t8(t,S.height+z,t,q+z,1e-4),X=I.polygon(V.map(t=>[t.x,t.y]),E),_.insert(()=>X).attr("class","divider")}if(R){let t=D+C+A+j;V=t8(t,S.height+z,t,q+z,1e-4),X=I.polygon(V.map(t=>[t.x,t.y]),E),_.insert(()=>X).attr("class","divider")}for(let t of M){let e=S.height+z+t;V=t8(j,e,W+j,e,1e-4),X=I.polygon(V.map(t=>[t.x,t.y]),E),_.insert(()=>X).attr("class","divider")}if(c(e,F),b&&"handDrawn"!==e.look)if(null!=l&&t2.has(l))_.selectAll("path").attr("style",b);else{let t=b.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");_.selectAll("path").attr("style",e??""),_.selectAll(".row-rect-even path").attr("style",b)}return e.intersect=function(t){return w(e,t)},_}async function t5(t,e,a,n=0,h=0,o=[],d=""){let c=t.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${n}, ${h})`).attr("style",d);e!==(0,r.parseGenericTypes)(e)&&(e=(e=(0,r.parseGenericTypes)(e)).replaceAll("<","<").replaceAll(">",">"));let g=c.node().appendChild(await (0,l.createText)(c,e,{width:(0,i.calculateTextWidth)(e,a)+100,style:d,useHtmlLabels:a.htmlLabels},a));if(e.includes("<")||e.includes(">")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let y=g.getBBox();
10if((0,r.evaluate)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,s.select)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return y}function t8(t,e,a,l,i){return t===a?[{x:t-i/2,y:e},{x:t+i/2,y:e},{x:a+i/2,y:l},{x:a-i/2,y:l}]:[{x:t,y:e-i/2},{x:t,y:e+i/2},{x:a,y:l+i/2},{x:a,y:l-i/2}]}async function t4(t,e,a,l,i=a.class.padding??12){let r=3*!l,n=t.insert("g").attr("class",g(e)).attr("id",e.domId||e.id),s=null,h=null,o=null,d=null,c=0,y=0,f=0;if(s=n.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await t3(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}h=n.insert("g").attr("class","label-group text"),await t3(h,e,0,["font-weight: bolder"]);let u=h.node().getBBox();y=u.height,o=n.insert("g").attr("class","members-group text");let m=0;for(let t of e.members){let e=await t3(o,t,m,[t.parseClassifier()]);m+=e+r}(f=o.node().getBBox().height)<=0&&(f=i/2),d=n.insert("g").attr("class","methods-group text");let w=0;for(let t of e.methods){let e=await t3(d,t,w,[t.parseClassifier()]);w+=e+r}let p=n.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return h.attr("transform",`translate(${-u.width/2}, ${c})`),p=n.node().getBBox(),o.attr("transform",`translate(0, ${c+y+2*i})`),p=n.node().getBBox(),d.attr("transform",`translate(0, ${c+y+(f?f+4*i:2*i)})`),p=n.node().getBBox(),{shapeSvg:n,bbox:p}}async function t3(t,e,a,h=[]){let o,d=t.insert("g").attr("class","label").attr("style",h.join("; ")),c=(0,r.getConfig)(),g="useHtmlLabels"in e?e.useHtmlLabels:(0,r.evaluate)(c.htmlLabels)??!0,y="";y="text"in e?e.text:e.label,!g&&y.startsWith("\\")&&(y=y.substring(1)),(0,r.hasKatex)(y)&&(g=!0);let f=await (0,l.createText)(d,(0,r.sanitizeText2)((0,i.decodeEntities)(y)),{width:(0,i.calculateTextWidth)(y,c)+50,classes:"markdown-node-label",useHtmlLabels:g},c),u=1;if(g){let t=f.children[0],e=(0,s.select)(f);u=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(u+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===y.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,n.__name)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}else{h.includes("font-weight: bolder")&&(0,s.select)(f).selectAll("tspan").attr("font-weight",""),u=f.children.length;let t=f.children[0];(""===f.textContent||f.textContent.includes(">"))&&(t.textContent=y[0]+y.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===y[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),o=f.getBBox()}return d.attr("transform","translate(0,"+(-o.height/(2*u)+a)+")"),o.height}async function t6(t,e){let l=(0,r.getConfig2)(),{themeVariables:i}=l,{useGradient:n}=i,o=l.class.padding??12,d=e.useHtmlLabels??(0,r.evaluate)(l.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:g,bbox:y}=await t4(t,e,l,d,o),{labelStyles:f,nodeStyles:u}=(0,a.styles2String)(e);e.labelStyle=f,e.cssStyles=e.styles||"";let m=e.styles?.join(";")||u||"";e.cssStyles||(e.cssStyles=m.replaceAll("!important","").split(";"));let p=0===e.members.length&&0===e.methods.length&&!l.class?.hideEmptyMembersBox,x=h.default.svg(g),$=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let b=Math.max(e.width??0,y.width),k=Math.max(e.height??0,y.height),_=(e.height??0)>y.height;0===e.members.length&&0===e.methods.length?k+=o:e.members.length>0&&0===e.methods.length&&(k+=2*o);let S=-b/2,v=-k/2,M=p?2*o:0===e.members.length&&0===e.methods.length?-o:0;_&&(M=2*o);let N=x.rectangle(S-o,v-o-(p?o:0===e.members.length&&0===e.methods.length?-o/2:0),b+2*o,k+2*o+M,$),D=g.insert(()=>N,":first-child");D.attr("class","basic label-container outer-path");let C=D.node().getBBox(),A=g.select(".annotation-group").node().getBBox().height-(p?o/2:0)||0,B=g.select(".label-group").node().getBBox().height-(p?o/2:0)||0,L=g.select(".members-group").node().getBBox().height-(p?o/2:0)||0,R=(A+B+v+o-(v-o-(p?o:0===e.members.length&&0===e.methods.length?-o/2:0)))/2;if(g.selectAll(".text").each((t,a,i)=>{let r=(0,s.select)(i[a]),n=r.attr("transform"),h=0;
10if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(h=parseFloat(t[2]))}let c=h+v+o-(p?o:0===e.members.length&&0===e.methods.length?-o/2:0);if(r.attr("class").includes("methods-group")){let t=Math.max(L,o/2);c=_?Math.max(R,A+B+t+v+2*o+o)+2*o:A+B+t+v+4*o+o}0===e.members.length&&0===e.methods.length&&l.class?.hideEmptyMembersBox&&(c=e.annotations.length>0?h-o:h),d||(c-=4);let y=S;(r.attr("class").includes("label-group")||r.attr("class").includes("annotation-group"))&&(y=-r.node()?.getBBox().width/2||0,g.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(y=0)})),r.attr("transform",`translate(${y}, ${c})`)}),e.members.length>0||e.methods.length>0||p){let t=A+B+v+o,a=x.line(C.x,t,C.x+C.width,t+.001,$);g.insert(()=>a).attr("class",`divider${"neo"===e.look&&!n?" neo-line":""}`).attr("style",m)}if(p||e.members.length>0||e.methods.length>0){let t=A+B+L+v+2*o+o,a=x.line(C.x,_?Math.max(R,t):t,C.x+C.width,(_?Math.max(R,t):t)+.001,$);g.insert(()=>a).attr("class",`divider${"neo"===e.look&&!n?" neo-line":""}`).attr("style",m)}if("handDrawn"!==e.look&&g.selectAll("path").attr("style",m),D.select(":nth-child(2)").attr("style",m),g.selectAll(".divider").select("path").attr("style",m),e.labelStyle?g.selectAll("span").attr("style",e.labelStyle):g.selectAll("span").attr("style",m),!d){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(m);if(e){let t=e[0].replace("color","fill");g.selectAll("tspan").attr("style",t)}else if(f){let e=t.exec(f);if(e){let t=e[0].replace("color","fill");g.selectAll("tspan").attr("style",t)}}}return c(e,D),e.intersect=function(t){return w(e,t)},g}async function t9(t,e){let l,{labelStyles:i,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=i;let o="verifyMethod"in e,d=g(e),{themeVariables:y}=(0,r.getConfig2)(),{borderColorArray:f,requirementEdgeLabelBackground:u}=y,m=t.insert("g").attr("class",d).attr("id",e.domId??e.id),p=l=o?await t7(m,`<<${e.type}>>`,0,e.labelStyle):await t7(m,"<<Element>>",0,e.labelStyle),x=await t7(m,e.name,p,e.labelStyle+"; font-weight: bold;");if(p+=x+20,o){let t=await t7(m,`${e.requirementId?`ID: ${e.requirementId}`:""}`,p,e.labelStyle);p+=t;let a=await t7(m,`${e.text?`Text: ${e.text}`:""}`,p,e.labelStyle);p+=a;let l=await t7(m,`${e.risk?`Risk: ${e.risk}`:""}`,p,e.labelStyle);p+=l,await t7(m,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,p,e.labelStyle)}else{let t=await t7(m,`${e.type?`Type: ${e.type}`:""}`,p,e.labelStyle);p+=t,await t7(m,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,p,e.labelStyle)}let $=(m.node()?.getBBox().width??200)+20,b=(m.node()?.getBBox().height??200)+20,k=-$/2,_=-b/2,S=h.default.svg(m),v=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");let M=S.rectangle(k,_,$,b,v),N=m.insert(()=>M,":first-child");if(N.attr("class","basic label-container outer-path").attr("style",n),f?.length){let t=e.colorIndex??0;m.attr("data-color-id",`color-${t%f.length}`)}if(m.selectAll(".label").each((t,e,a)=>{let l=(0,s.select)(a[e]),i=l.attr("transform"),r=0,n=0;if(i){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(r=parseFloat(t[1]),n=parseFloat(t[2]))}let h=n-b/2,o=k+10;(0===e||1===e)&&(o=r),l.attr("transform",`translate(${o}, ${h+20})`)}),p>l+x+20){let t,a=_+l+x+20;if("neo"===e.look){let e=[[k,a],[k+$,a],[k+$,a+.001],[k,a+.001]];t=S.polygon(e,v)}else t=S.line(k,a,k+$,a,v);m.insert(()=>t).attr("class","divider")}return c(e,N),e.intersect=function(t){return w(e,t)},n&&"handDrawn"!==e.look&&(u||f?.length)&&m.selectAll("path").attr("style",n),m}async function t7(t,e,a,n=""){let h;if(""===e)return 0;let o=t.insert("g").attr("class","label").attr("style",n),d=(0,r.getConfig2)(),c=d.htmlLabels??!0,g=await (0,l.createText)(o,(0,r.sanitizeText2)((0,i.decodeEntities)(e)),{width:(0,i.calculateTextWidth)(e,d)+50,classes:"markdown-node-label",useHtmlLabels:c,style:n},d);if(c){let t=g.children[0],e=(0,s.select)(g);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}else{for(let t of g.children[0].children)n&&t.setAttribute("style",n);h=g.getBBox(),h.height+=6}return o.attr("transform",`translate(${-h.width/2},${-h.height/2+a})`),h.height}(0,n.__name)(t1,"erBox"),(0,n.__name)(t5,"addText"),(0,n.__name)(t8,"lineToPolygon"),(0,n.__name)(t4,"textHelper"),(0,n.__name)(t3,"addText"),(0,n.__name)(t6,"classBox"),(0,n.__name)(t9,"requirementBox"),(0,n.__name)(t7,"addText");var et=(0,n.__name)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ee(t,e,{config:l}){let i,r,n,s,{labelStyles:y,nodeStyles:f}=(0,a.styles2String)(e);e.labelStyle=y||"";let u=e.width;e.width=(e.width??200)-10;let{shapeSvg:m,bbox:p,label:$}=await o(t,e,g(e)),b=e.padding||10,k="";"ticket"in e&&e.ticket&&l?.kanban?.ticketBaseUrl&&(k=l?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),i=m.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",k).attr("target","_blank"));let _={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};i?{label:r,bbox:n}=await d(i,"ticket"in e&&e.ticket||"",_):{label:r,bbox:n}=await d(m,"ticket"in e&&e.ticket||"",_);let{label:S,bbox:v}=await d(m,"assigned"in e&&e.assigned||"",_);e.width=u;let M=e?.width||0,N=Math.max(n.height,v.height)/2,D=Math.max(p.height+20,e?.height||0)+N,C=-M/2,A=-D/2;$.attr("transform","translate("+(b-M/2)+", "+(-N-p.height/2)+")"),r.attr("transform","translate("+(b-M/2)+", "+(-N+p.height/2)+")"),S.attr("transform","translate("+(b+M/2-v.width-20)+", "+(-N+p.height/2)+")");let{rx:B,ry:L}=e,{cssStyles:R}=e;
10if("handDrawn"===e.look){let t=h.default.svg(m),l=(0,a.userNodeOverrides)(e,{}),i=B||L?t.path(x(C,A,M,D,B||0),l):t.rectangle(C,A,M,D,l);(s=m.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",R||null)}else{(s=m.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",f).attr("rx",B??5).attr("ry",L??5).attr("x",C).attr("y",A).attr("width",M).attr("height",D);let t="priority"in e&&e.priority;if(t){let e=m.append("line"),a=C+2,l=A+Math.floor((B??0)/2),i=A+D-Math.floor((B??0)/2);e.attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",i).attr("stroke-width","4").attr("stroke",et(t))}}return c(e,s),e.height=D,e.intersect=function(t){return w(e,t)},m}async function ea(t,e){let l,{labelStyles:r,nodeStyles:s}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:d,bbox:y,halfPadding:f,label:u}=await o(t,e,g(e)),m=y.width+10*f,p=y.height+8*f,x=.15*m,{cssStyles:$}=e,b=y.width+20,k=y.height+20,_=Math.max(m,b),S=Math.max(p,k);u.attr("transform",`translate(${-y.width/2}, ${-y.height/2})`);let v=`M0 0 11 a${x},${x} 1 0,0 ${.25*_},${-1*S*.1} 12 a${x},${x} 1 0,0 ${.25*_},0 13 a${x},${x} 1 0,0 ${.25*_},0 14 a${x},${x} 1 0,0 ${.25*_},${.1*S} 15 16 a${x},${x} 1 0,0 ${.15*_},${.33*S} 17 a${.8*x},${.8*x} 1 0,0 0,${.34*S} 18 a${x},${x} 1 0,0 ${-1*_*.15},${.33*S} 19 20 a${x},${x} 1 0,0 ${-1*_*.25},${.15*S} 21 a${x},${x} 1 0,0 ${-1*_*.25},0 22 a${x},${x} 1 0,0 ${-1*_*.25},0 23 a${x},${x} 1 0,0 ${-1*_*.25},${-1*S*.15} 24 25 a${x},${x} 1 0,0 ${-1*_*.1},${-1*S*.33} 26 a${.8*x},${.8*x} 1 0,0 0,${-1*S*.34} 27 a${x},${x} 1 0,0 ${.1*_},${-1*S*.33} 28 H0 V0 Z`;if("handDrawn"===e.look){let t=h.default.svg(d),r=(0,a.userNodeOverrides)(e,{}),n=t.path(v,r);(l=d.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",(0,i.handleUndefinedAttr)($))}else l=d.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",v);return l.attr("transform",`translate(${-_/2}, ${-S/2})`),c(e,l),e.calcIntersect=function(t,e){return w(t,e)},e.intersect=function(t){return n.log.info("Bang intersect",e,t),w(e,t)},d}async function el(t,e){let l,{labelStyles:r,nodeStyles:s}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:d,bbox:y,halfPadding:f,label:u}=await o(t,e,g(e)),m=y.width+2*f,p=y.height+2*f,x=.15*m,$=.25*m,b=.35*m,k=.2*m,{cssStyles:_}=e,S=`M0 0 29 a${x},${x} 0 0,1 ${.25*m},${-1*m*.1} 30 a${b},${b} 1 0,1 ${.4*m},${-1*m*.1} 31 a${$},${$} 1 0,1 ${.35*m},${.2*m} 32 33 a${x},${x} 1 0,1 ${.15*m},${.35*p} 34 a${k},${k} 1 0,1 ${-1*m*.15},${.65*p} 35 36 a${$},${x} 1 0,1 ${-1*m*.25},${.15*m} 37 a${b},${b} 1 0,1 ${-1*m*.5},0 38 a${x},${x} 1 0,1 ${-1*m*.25},${-1*m*.15} 39 40 a${x},${x} 1 0,1 ${-1*m*.1},${-1*p*.35} 41 a${k},${k} 1 0,1 ${.1*m},${-1*p*.65} 42 H0 V0 Z`;if("handDrawn"===e.look){let t=h.default.svg(d),r=(0,a.userNodeOverrides)(e,{}),n=t.path(S,r);(l=d.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",(0,i.handleUndefinedAttr)(_))}else l=d.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",S);return u.attr("transform",`translate(${-y.width/2}, ${-y.height/2})`),l.attr("transform",`translate(${-m/2}, ${-p/2})`),c(e,l),e.calcIntersect=function(t,e){return w(t,e)},e.intersect=function(t){return n.log.info("Cloud intersect",e,t),w(e,t)},d}async function ei(t,e){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:r,bbox:n,halfPadding:s,label:h}=await o(t,e,g(e)),d=n.width+8*s,y=n.height+2*s,f="neo"===e.look?` 43 M${-d/2} ${y/2-5} 44 v${-y+10}
45 q0,-5 5,-5 46 h${d-10} 47 q5,0 5,5 48 v${y-5} 49 H${-d/2} 50 Z 51 `:` 52 M${-d/2} ${y/2-5} 53 v${-y+10} 54 q0,-5 5,-5 55 h${d-10} 56 q5,0 5,5 57 v${y-10} 58 q0,5 -5,5 59 h${-(d-10)} 60 q-5,0 -5,-5 61 Z 62 `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let u=r.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",f);return r.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",y/2).attr("x2",d/2).attr("y2",y/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),r.append(()=>h.node()),c(e,u),e.calcIntersect=function(t,e){return w(t,e)},e.intersect=function(t){return w(e,t)},r}async function er(t,e){let a={padding:e.padding??0};return W(t,e,a)}(0,n.__name)(ee,"kanbanItem"),(0,n.__name)(ea,"bang"),(0,n.__name)(el,"cloud"),(0,n.__name)(ei,"defaultMindmapNode"),(0,n.__name)(er,"mindmapCircle");var en=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tP},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tL},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tT},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tW},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Q},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:W},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ea},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:el}
62,{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tC},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ts},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tw},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tZ},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:tf},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:te},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tz}
62,{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:E},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tR},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:tH},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tE},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ti},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:th},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:U},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:V},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Z},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:tx}
62,{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:tY},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:tr},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tX},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:t_},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:G},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tJ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:tQ},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ta},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:tG},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tl},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tO},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tM},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tv},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:T},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:j},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tj},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tq},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:tK},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tA},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tS}],es=(0,n.__name)(()=>Object.fromEntries([...Object.entries({state:tI,choice:H,note:tN,rectWithTitle:tB,labelRect:tm,iconSquare:tg,iconCircle:td,icon:to,iconRounded:tc,imageSquare:ty,anchor:R,kanbanItem:ee,mindmapCircle:er,defaultMindmapNode:ei,classBox:t6,erBox:t1,requirementBox:t9}),...en.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function eh(t){return t in es}(0,n.__name)(eh,"isValidShape");var eo=new Map;async function ed(t,e,a){let l,r;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let n=e.shape?es[e.shape]:void 0;if(!n)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let i;"sandbox"===a.config.securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),l=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i??null),r=await n(l,e,a)}else l=r=await n(t,e,a);return l.attr("data-look",(0,i.handleUndefinedAttr)(e.look)),e.tooltip&&r.attr("title",e.tooltip),eo.set(e.id,l),e.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}
62(0,n.__name)(ed,"insertNode");var ec=(0,n.__name)((t,e)=>{eo.set(e.id,t)},"setNodeElem"),eg=(0,n.__name)(()=>{eo.clear()},"clear"),ey=(0,n.__name)(t=>{let e=eo.get(t.id);n.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode");t.s(["clear",()=>N,"clear2",()=>eg,"createLabel_default",()=>p,"insertCluster",()=>M,"insertNode",()=>ed,"isValidShape",()=>eh,"labelHelper",()=>o,"positionNode",()=>ey,"setNodeElem",()=>ec,"updateNodeBounds",()=>c])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.