PageSourceSearch

https://vinokutnahora.cz/_next/static/chunks/c92cdd211f839525.js

js vinokutnahora.cz collected 2026-10-02 11:47:56 UTC 107,185 bytes, 62 lines download raw bytes

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

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.