1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[85943],{95904:(t,e,a)=>{a.d(e,{DA:()=>b,IU:()=>j,KX:()=>A,U:()=>T,U7:()=>eu,U_:()=>ef,Zk:()=>h,aP:()=>ed,gh:()=>ey,lC:()=>u,on:()=>eg});var l,n=a(6492),i=a(40997),r=a(29120),o=a(75025),s=a(96630),c=a(13380),d=a(58363),h=(0,s.K2)(async(t,e,a)=>{var l,n,i;let d;let h=e.useHtmlLabels||(0,s._3)(null===(l=(0,s.D7)())||void 0===l?void 0:l.htmlLabels),g=t.insert("g").attr("class",a||"node default").attr("id",e.domId||e.id),u=g.insert("g").attr("class","label").attr("style",(0,o.KL)(e.labelStyle));d=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let y=await (0,r.GZ)(u,(0,s.jZ)((0,o.Sm)(d),(0,s.D7)()),{useHtmlLabels:h,width:e.width||(null===(n=(0,s.D7)().flowchart)||void 0===n?void 0:n.wrappingWidth),cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),f=y.getBBox(),p=(null!==(i=null==e?void 0:e.padding)&&void 0!==i?i:0)/2;if(h){let t=y.children[0],e=(0,c.Ltv)(y),a=t.getElementsByTagName("img");if(a){let t=""===d.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=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[a=s.UI.fontSize]=(0,o.I5)(t),l=5*a+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";a(e)}(0,s.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}return h?u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):u.attr("transform","translate(0, "+-f.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:g,bbox:f,halfPadding:p,label:u}},"labelHelper"),g=(0,s.K2)(async(t,e,a)=>{var l,n,i,d,h,g;let u=a.useHtmlLabels||(0,s._3)(null===(n=(0,s.D7)())||void 0===n?void 0:null===(l=n.flowchart)||void 0===l?void 0:l.htmlLabels),y=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),f=await (0,r.GZ)(y,(0,s.jZ)((0,o.Sm)(e),(0,s.D7)()),{useHtmlLabels:u,width:a.width||(null===(d=(0,s.D7)())||void 0===d?void 0:null===(i=d.flowchart)||void 0===i?void 0:i.wrappingWidth),style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),p=f.getBBox(),m=a.padding/2;if((0,s._3)(null===(g=(0,s.D7)())||void 0===g?void 0:null===(h=g.flowchart)||void 0===h?void 0:h.htmlLabels)){let t=f.children[0],e=(0,c.Ltv)(f);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return u?y.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):y.attr("transform","translate(0, "+-p.height/2+")"),a.centerLabel&&y.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),y.insert("rect",":first-child"),{shapeSvg:t,bbox:p,halfPadding:m,label:y}},"insertLabel"),u=(0,s.K2)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),y=(0,s.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function f(t){let e=t.map((t,e)=>"".concat(0===e?"M":"L").concat(t.x,",").concat(t.y));return e.push("Z"),e.join(" ")}function p(t,e,a,l,n,i){let r=[],o=a-t,s=2*Math.PI/(o/i),c=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*o,l=c+n*Math.sin(s*(a-t));r.push({x:a,y:l})}return r}function m(t,e,a,l,n,i){let r=[],o=n*Math.PI/180,s=(i*Math.PI/180-o)/(l-1);for(let n=0;n<l;n++){let l=o+n*s,i=t+a*Math.cos(l),c=e+a*Math.sin(l);r.push({x:-i,y:-c})}return r}(0,s.K2)(f,"createPathFromPoints"),(0,s.K2)(p,"generateFullSineWavePoints"),(0,s.K2)(m,"generateCirclePoints");var x=(0,s.K2)((t,e)=>{var a,l,n=t.x,i=t.y,r=e.x-n,o=e.y-i,s=t.width/2,c=t.height/2;return Math.abs(o)*s>Math.abs(r)*c?(o<0&&(c=-c),a=0===o?0:c*r/o,l=c):(r<0&&(s=-s),a=s,l=0===r?0:s*o/r),{x:n+a,y:i+l}},"intersectRect");function w(t,e){e&&t.attr("style",e)}async function v(t){let e=(0,c.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),l=t.label;t.label&&(0,s.Wi)(t.label)&&(l=await (0,s.VJ)(t.label.replace(s.Y2.lineBreakRegex,"\n"),(0,s.D7)()));let n=t.isNode?"nodeLabel":"edgeLabel";return a.html('<span class="'+n+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+l+"</span>"),w(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,s.K2)(w,"applyStyle"),(0,s.K2)(v,"addHtmlLabel");var b=(0,s.K2)(async(t,e,a,l)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)
1){n=n.replace(/\\n|\n/g,"<br />"),s.Rm.info("vertexText"+n);let t={isNode:l,label:(0,o.Sm)(n).replace(/fa[blrs]?:fa-[\w-]+/g,t=>"<i class='".concat(t.replace(":"," "),"'></i>")),labelStyle:e?e.replace("fill:","color:"):e};return await v(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let l=[];for(let e of"string"==typeof n?n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?n:[]){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),a?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=e.trim(),t.appendChild(l)}return t}},"createLabel"),k=(0,s.K2)((t,e,a,l,n)=>["M",t+n,e,"H",t+a-n,"A",n,n,0,0,1,t+a,e+n,"V",e+l-n,"A",n,n,0,0,1,t+a-n,e+l,"H",t+n,"A",n,n,0,0,1,t,e+l-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),S=(0,s.K2)(t=>{let{handDrawnSeed:e}=(0,s.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),M=(0,s.K2)(t=>{let e=D([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),D=(0,s.K2)(t=>{let e=new Map;return t.forEach(t=>{let[a,l]=t.split(":");e.set(a.trim(),null==l?void 0:l.trim())}),e},"styles2Map"),A=(0,s.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),K=(0,s.K2)(t=>{let{stylesArray:e}=M(t),a=[],l=[],n=[],i=[];return e.forEach(t=>{let e=t[0];A(e)?a.push(t.join(":")+" !important"):(l.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&i.push(t.join(":")+" !important"))}),{labelStyles:a.join(";"),nodeStyles:l.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:i}},"styles2String"),C=(0,s.K2)((t,e)=>{var a;let{themeVariables:l,handDrawnSeed:n}=(0,s.D7)(),{nodeBorder:i,mainBkg:r}=l,{stylesMap:o}=M(t);return Object.assign({roughness:.7,fill:o.get("fill")||r,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||i,seed:n,strokeWidth:(null===(a=o.get("stroke-width"))||void 0===a?void 0:a.replace("px",""))||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides"),B=(0,s.K2)(async(t,e)=>{let a;s.Rm.info("Creating subgraph rect for ",e.id,e);let l=(0,s.D7)(),{themeVariables:n,handDrawnSeed:o}=l,{clusterBkg:h,clusterBorder:g}=n,{labelStyles:u,nodeStyles:y,borderStyles:f,backgroundStyles:p}=K(e),m=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),w=(0,s._3)(l.flowchart.htmlLabels),v=m.insert("g").attr("class","cluster-label "),b=await (0,r.GZ)(v,e.label,{style:e.labelStyle,useHtmlLabels:w,isNode:!0}),S=b.getBBox();if((0,s._3)(l.flowchart.htmlLabels)){let t=b.children[0],e=(0,c.Ltv)(b);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}let M=e.width<=S.width+e.padding?S.width+e.padding:e.width;e.width<=S.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let D=e.height,A=e.x-M/2,B=e.y-D/2;if(s.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(m),l=C(e,{roughness:.7,fill:h,stroke:g,fillWeight:3,seed:o}),n=t.path(k(A,B,M,D,0),l);(a=m.insert(()=>(s.Rm.debug("Rough node insert CXC",n),n),":first-child")).select("path:nth-child(2)").attr("style",f.join(";")),a.select("path").attr("style",p.join(";").replace("fill","stroke"))}else(a=m.insert("rect",":first-child")).attr("style",y).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",B).attr("width",M).attr("height",D);let{subGraphTitleTopMargin:N}=(0,i.O)(l);if(v.attr("transform","translate(".concat(e.x-S.width/2,", ").concat(e.y-e.height/2+N,")")),u){let t=v.select("span");t&&t.attr("style",u)}let L=a.node().getBBox();return e.offsetX=0,e.width=L.width,e.height=L.height,e.offsetY=S.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:m,labelBBox:S}},"rect"),N=(0,s.K2)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),l=a.insert("rect",":first-child"),n=0*e.padding,i=n/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.he
1ight/2-i).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");let r=l.node().getBBox();return e.width=r.width,e.height=r.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),L=(0,s.K2)(async(t,e)=>{let a;let l=(0,s.D7)(),{themeVariables:n,handDrawnSeed:i}=l,{altBackground:r,compositeBackground:o,compositeTitleBackground:h,nodeBorder:g}=n,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),y=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label"),p=u.append("rect"),m=f.node().appendChild(await b(e.label,e.labelStyle,void 0,!0)),w=m.getBBox();if((0,s._3)(l.flowchart.htmlLabels)){let t=m.children[0],e=(0,c.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}let v=0*e.padding,S=(e.width<=w.width+e.padding?w.width+e.padding:e.width)+v;e.width<=w.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;let M=e.height+v,D=e.height+v-w.height-6,A=e.x-S/2,K=e.y-M/2;e.width=S;let C=e.y-e.height/2-v/2+w.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.A.svg(u),n=e.rx||e.ry?l.path(k(A,K,S,M,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:g,seed:i}):l.rectangle(A,K,S,M,{seed:i});a=u.insert(()=>n,":first-child");let s=l.rectangle(A,C,S,D,{fill:t?r:o,fillStyle:t?"hachure":"solid",stroke:g,seed:i});a=u.insert(()=>n,":first-child"),p=u.insert(()=>s)}else(a=y.insert("rect",":first-child")).attr("class","outer").attr("x",A).attr("y",K).attr("width",S).attr("height",M).attr("data-look",e.look),p.attr("class","inner").attr("x",A).attr("y",C).attr("width",S).attr("height",D);return f.attr("transform","translate(".concat(e.x-w.width/2,", ").concat(K+1-3*!(0,s._3)(l.flowchart.htmlLabels),")")),e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=w.height-e.padding/2,e.labelBBox=w,e.intersect=function(t){return x(e,t)},{cluster:u,labelBBox:w}},"roundedWithTitle"),R=(0,s.K2)(async(t,e)=>{let a;s.Rm.info("Creating subgraph rect for ",e.id,e);let l=(0,s.D7)(),{themeVariables:n,handDrawnSeed:o}=l,{clusterBkg:h,clusterBorder:g}=n,{labelStyles:u,nodeStyles:y,borderStyles:f,backgroundStyles:p}=K(e),m=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),w=(0,s._3)(l.flowchart.htmlLabels),v=m.insert("g").attr("class","cluster-label "),b=await (0,r.GZ)(v,e.label,{style:e.labelStyle,useHtmlLabels:w,isNode:!0,width:e.width}),S=b.getBBox();if((0,s._3)(l.flowchart.htmlLabels)){let t=b.children[0],e=(0,c.Ltv)(b);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}let M=e.width<=S.width+e.padding?S.width+e.padding:e.width;e.width<=S.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let D=e.height,A=e.x-M/2,B=e.y-D/2;if(s.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(m),l=C(e,{roughness:.7,fill:h,stroke:g,fillWeight:4,seed:o}),n=t.path(k(A,B,M,D,e.rx),l);(a=m.insert(()=>(s.Rm.debug("Rough node insert CXC",n),n),":first-child")).select("path:nth-child(2)").attr("style",f.join(";")),a.select("path").attr("style",p.join(";").replace("fill","stroke"))}else(a=m.insert("rect",":first-child")).attr("style",y).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",B).attr("width",M).attr("height",D);let{subGraphTitleTopMargin:N}=(0,i.O)(l);if(v.attr("transform","translate(".concat(e.x-S.width/2,", ").concat(e.y-e.height/2+N,")")),u){let t=v.select("span");t&&t.attr("style",u)}let L=a.node().getBBox();return e.offsetX=0,e.width=L.width,e.height=L.height,e.offsetY=S.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:m,labelBBox:S}},"kanbanSection"),P={rect:B,squareRect:B,roundedWithTitle:L,noteGroup:N,divider:(0,s.K2)((t,e)=>{let a;let{themeVariables:l,handDrawnSeed:n}=(0,s.D7)(),{nodeBorder:i}=l,r=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=r.insert("g",":first-child"),c=0*e.padding,h=e.width+c;e.diff=-e.padding;let g=e.height+c,u=e.x-h/2,y=e.y-g/2;if(e.width=h,"handDrawn"===e.look){let t=d.A.svg(r).rectangle(u,y,h,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:n});a=r.insert(()=>t,":first-child")}else(a=o.insert("rect",":first-child")).attr("class","divider").attr("x",u).attr("y",y).attr("width",h).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:r,labelBBox:{}}}
1,"divider"),kanbanSection:R},I=new Map,T=(0,s.K2)(async(t,e)=>{let a=e.shape||"rect",l=await P[a](t,e);return I.set(e.id,l),l},"insertCluster"),j=(0,s.K2)(()=>{I=new Map},"clear");function W(t,e,a,l){var n=t.x,i=t.y,r=n-l.x,o=i-l.y,s=Math.sqrt(e*e*o*o+a*a*r*r),c=Math.abs(e*a*r/s);l.x<n&&(c=-c);var d=Math.abs(e*a*o/s);return l.y<i&&(d=-d),{x:n+c,y:i+d}}function _(t,e,a){return W(t,e,e,a)}function E(t,e,a,l){var n,i,r,o,s,c,d,h,g,u,y,f,p;if(n=e.y-t.y,r=t.x-e.x,s=e.x*t.y-t.x*e.y,g=n*a.x+r*a.y+s,u=n*l.x+r*l.y+s,!(0!==g&&0!==u&&H(g,u))){if(i=l.y-a.y,o=a.x-l.x,c=l.x*a.y-a.x*l.y,d=i*t.x+o*t.y+c,h=i*e.x+o*e.y+c,!(0!==d&&0!==h&&H(d,h))&&0!=(y=n*o-i*r))return f=Math.abs(y/2),{x:(p=r*c-o*s)<0?(p-f)/y:(p+f)/y,y:(p=i*s-n*c)<0?(p-f)/y:(p+f)/y}}}function H(t,e){return t*e>0}function z(t,e,a){let l=t.x,n=t.y,i=[],r=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){r=Math.min(r,t.x),o=Math.min(o,t.y)}):(r=Math.min(r,e.x),o=Math.min(o,e.y));let s=l-t.width/2-r,c=n-t.height/2-o;for(let l=0;l<e.length;l++){let n=e[l],r=e[l<e.length-1?l+1:0],o=E(t,a,{x:s+n.x,y:c+n.y},{x:s+r.x,y:c+r.y});o&&i.push(o)}return i.length?(i.length>1&&i.sort(function(t,e){let l=t.x-a.x,n=t.y-a.y,i=Math.sqrt(l*l+n*n),r=e.x-a.x,o=e.y-a.y,s=Math.sqrt(r*r+o*o);return i<s?-1:+(i!==s)}),i[0]):t}(0,s.K2)(function(t,e){return t.intersect(e)},"intersectNode"),(0,s.K2)(W,"intersectEllipse"),(0,s.K2)(_,"intersectCircle"),(0,s.K2)(E,"intersectLine"),(0,s.K2)(H,"sameSign"),(0,s.K2)(z,"intersectPolygon");var q={circle:_,polygon:z,rect:x};function O(t,e){let{labelStyles:a}=K(e);e.labelStyle=a;let l=y(e),n=l;l||(n="anchor");let i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),{cssStyles:r}=e,c=d.A.svg(i),h=C(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(h.roughness=0);let g=c.circle(0,0,2,h),f=i.insert(()=>g,":first-child");return f.attr("class","anchor").attr("style",(0,o.KL)(r)),u(e,f),e.intersect=function(t){return s.Rm.info("Circle intersect",e,1,t),q.circle(e,1,t)},i}function F(t,e,a,l,n,i,r){let o=Math.atan2(l-e,a-t),s=Math.sqrt(((a-t)/2/n)**2+((l-e)/2/i)**2);if(s>1)throw Error("The given radii are too small to create an arc between the points.");let c=Math.sqrt(1-s**2),d=(t+a)/2+c*i*Math.sin(o)*(r?-1:1),h=(e+l)/2-c*n*Math.cos(o)*(r?-1:1),g=Math.atan2((e-h)/i,(t-d)/n),u=Math.atan2((l-h)/i,(a-d)/n)-g;r&&u<0&&(u+=2*Math.PI),!r&&u>0&&(u-=2*Math.PI);let y=[];for(let t=0;t<20;t++){let e=g+t/19*u,a=d+n*Math.cos(e),l=h+i*Math.sin(e);y.push({x:a,y:l})}return y}async function Z(t,e){let{labelStyles:a,nodeStyles:l}=K(e);e.labelStyle=a;let{shapeSvg:n,bbox:i}=await h(t,e,y(e)),r=i.width+e.padding+20,o=i.height+e.padding,s=o/2,c=s/(2.5+o/50),{cssStyles:g}=e,p=[{x:r/2,y:-o/2},{x:-r/2,y:-o/2},...F(-r/2,-o/2,-r/2,o/2,c,s,!1),{x:r/2,y:o/2},...F(r/2,o/2,r/2,-o/2,c,s,!0)],m=d.A.svg(n),x=C(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=f(p),v=m.path(w,x),b=n.insert(()=>v,":first-child");return b.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",g),l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),b.attr("transform","translate(".concat(c/2,", 0)")),u(e,b),e.intersect=function(t){return q.polygon(e,p,t)},n}function X(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 Y(t,e){let a;let{labelStyles:l,nodeStyles:n}=K(e);e.labelStyle=l;let{shapeSvg:i,bbox:r}=await h(t,e,y(e)),o=r.height+e.padding,s=r.width+e.padding+12,c=-o,g=[{x:12,y:c},{x:s,y:c},{x:s,y:0},{x:0,y:0},{x:0,y:c+12},{x:12,y:c}],{cssStyles:p}=e;if("handDrawn"===e.look){let t=d.A.svg(i),l=C(e,{}),n=f(g),r=t.path(n,l);a=i.insert(()=>r,":first-child").attr("transform","translate(".concat(-s/2,", ").concat(o/2,")")),p&&a.attr("style",p)}else a=X(i,s,o,g);return n&&a.attr("style",n),u(e,a),e.intersect=function(t){return q.polygon(e,g,t)},i}function U(t,e){var a,l;let{nodeStyles:n}=K(e);e.label="";let i=t.insert("g").attr("class",y(e)).attr("id",null!==(a=e.domId)&&void 0!==a?a:e.id),{cssStyles:r}=e,o=Math.max(28,null!==(l=e.width)&&void 0!==l?l:0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],c=d.A.svg(i),h=C(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");let g=f(s),u=c.path(g,h),p=i.insert(()=>u,":first-child");return r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),e.width=28,e.height=28,e.intersect=function(t){return q.polygon(e,s,t)},i}async function G(t,e){let a;let{labelStyles:l,nodeStyles:n}=K(e);e.labelStyle=l;let{shapeSvg:i,bbox:r,halfPadding:c}=await h(t,e,y(e)),g=r.width/2+c,{cssStyles:f}=e;
1if("handDrawn"===e.look){let t=d.A.svg(i),l=C(e,{}),n=t.circle(0,0,2*g,l);(a=i.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",(0,o.KL)(f))}else a=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",g).attr("cx",0).attr("cy",0);return u(e,a),e.intersect=function(t){return s.Rm.info("Circle intersect",e,g,t),q.circle(e,g,t)},i}function V(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,n={x:l/2*e,y:l/2*a},i={x:-(l/2)*e,y:l/2*a},r={x:-(l/2)*e,y:-(l/2)*a},o={x:l/2*e,y:-(l/2)*a};return"M ".concat(i.x,",").concat(i.y," L ").concat(o.x,",").concat(o.y,"\n M ").concat(n.x,",").concat(n.y," L ").concat(r.x,",").concat(r.y)}function J(t,e){var a,l;let{labelStyles:n,nodeStyles:i}=K(e);e.labelStyle=n,e.label="";let r=t.insert("g").attr("class",y(e)).attr("id",null!==(a=e.domId)&&void 0!==a?a:e.id),o=Math.max(30,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),{cssStyles:c}=e,h=d.A.svg(r),g=C(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");let f=h.circle(0,0,2*o,g),p=V(o),m=h.path(p,g),x=r.insert(()=>f,":first-child");return x.insert(()=>m),c&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),u(e,x),e.intersect=function(t){return s.Rm.info("crossedCircle intersect",e,{radius:o,point:t}),q.circle(e,o,t)},r}function Q(t,e,a){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:180,r=[],o=n*Math.PI/180,s=(i*Math.PI/180-o)/(l-1);for(let n=0;n<l;n++){let l=o+n*s,i=t+a*Math.cos(l),c=e+a*Math.sin(l);r.push({x:-i,y:-c})}return r}async function $(t,e){var a,l,n,i,r;let{labelStyles:o,nodeStyles:s}=K(e);e.labelStyle=o;let{shapeSvg:c,bbox:g,label:p}=await h(t,e,y(e)),m=g.width+(null!==(a=e.padding)&&void 0!==a?a:0),x=g.height+(null!==(l=e.padding)&&void 0!==l?l:0),w=Math.max(5,.1*x),{cssStyles:v}=e,b=[...Q(m/2,-x/2,w,30,-90,0),{x:-m/2-w,y:w},...Q(m/2+2*w,-w,w,20,-180,-270),...Q(m/2+2*w,w,w,20,-90,-180),{x:-m/2-w,y:-x/2},...Q(m/2,x/2,w,20,0,90)],k=[{x:m/2,y:-x/2-w},{x:-m/2,y:-x/2-w},...Q(m/2,-x/2,w,20,-90,0),{x:-m/2-w,y:-w},...Q(m/2+.1*m,-w,w,20,-180,-270),...Q(m/2+.1*m,w,w,20,-90,-180),{x:-m/2-w,y:x/2},...Q(m/2,x/2,w,20,0,90),{x:-m/2,y:x/2+w},{x:m/2,y:x/2+w}],S=d.A.svg(c),M=C(e,{fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let D=f(b).replace("Z",""),A=S.path(D,M),B=f(k),N=S.path(B,{...M}),L=c.insert("g",":first-child");return L.insert(()=>N,":first-child").attr("stroke-opacity",0),L.insert(()=>A,":first-child"),L.attr("class","text"),v&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",v),s&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",s),L.attr("transform","translate(".concat(w,", 0)")),p.attr("transform","translate(".concat(-m/2+w-(g.x-(null!==(n=g.left)&&void 0!==n?n:0)),",").concat(-x/2+(null!==(i=e.padding)&&void 0!==i?i:0)/2-(g.y-(null!==(r=g.top)&&void 0!==r?r:0)),")")),u(e,L),e.intersect=function(t){return q.polygon(e,k,t)},c}function tt(t,e,a){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:180,r=[],o=n*Math.PI/180,s=(i*Math.PI/180-o)/(l-1);for(let n=0;n<l;n++){let l=o+n*s,i=t+a*Math.cos(l),c=e+a*Math.sin(l);r.push({x:i,y:c})}return r}async function te(t,e){var a,l,n,i,r,o;let{labelStyles:s,nodeStyles:c}=K(e);e.labelStyle=s;let{shapeSvg:g,bbox:p,label:m}=await h(t,e,y(e)),x=p.width+(null!==(a=e.padding)&&void 0!==a?a:0),w=p.height+(null!==(l=e.padding)&&void 0!==l?l:0),v=Math.max(5,.1*w),{cssStyles:b}=e,k=[...tt(x/2,-w/2,v,20,-90,0),{x:x/2+v,y:-v},...tt(x/2+2*v,-v,v,20,-180,-270),...tt(x/2+2*v,v,v,20,-90,-180),{x:x/2+v,y:w/2},...tt(x/2,w/2,v,20,0,90)],S=[{x:-x/2,y:-w/2-v},{x:x/2,y:-w/2-v},...tt(x/2,-w/2,v,20,-90,0),{x:x/2+v,y:-v},...tt(x/2+2*v,-v,v,20,-180,-270),...tt(x/2+2*v,v,v,20,-90,-180),{x:x/2+v,y:w/2},...tt(x/2,w/2,v,20,0,90),{x:x/2,y:w/2+v},{x:-x/2,y:w/2+v}],M=d.A.svg(g),D=C(e,{fill:"none"});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let A=f(k).replace("Z",""),B=M.path(A,D),N=f(S),L=M.path(N,{...D}),R=g.insert("g",":first-child");return R.insert(()=>L,":first-child").attr("stroke-opacity",0),R.insert(()=>B,":first-child"),R.attr("class","text"),b&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",b),c&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",c),R.attr("transform","translate(".concat(-v,", 0)")),m.attr("transform","translate(".concat(-x/2+(null!==(n=e.padding)&&void 0!==n?n:0)/2-(p.x-(null!==(i=p.left)&&void 0!==i?i:0)),",").concat(-w/2+(null!==(r=e.padding)&&void 0!==r?r:0)/2-(p.y-(null!==(o=p.top)&&void 0!==o?o:0)),")")),u(e,R),e.intersect=function(t){return q.polygon(e,S,t)},g}function ta(t,e,a){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:180,r=[],o=n*Math.PI/180,s=(i*Math.PI/180-o)/(l-1);for(let n=0;n<l;n++){let l=o+n*s,i=t+a*Math.cos(l),c=e+a*Math.sin(l);r.push({x:-i,y:-c})}return r}async function tl(t,e){var a,l,n,i,r,o;let{labelStyles:s,nodeStyles:c}=K(e);e.labelStyle=s;let{shapeSvg:g,bbox:p,label:m}=await h(t,e,y(e)),x=p.width+(null!==(a=e.padding)&&void 0!==a?a:0),w=p.height+(null!==(l=e.padding)&&void 0!==l?l:0),v=Math.max(5,.1*w),{cssStyles:b}=e,k=[...ta(x/2,-w/2,v,30,-90,0),{x:-x/2-v,y:v},...ta(x/2+2*v,-v,v,20,-180,-270),...ta(x/2+2*v,v,v,20,-90,-180),{x:-x/2-v,y:-w/2},...ta(x/2,w/2,v,20,0,90)],S=[...ta(-x/2+v+v/2,-w/2,v,20,-90,-180),{x:x/2-v/2,y:v}
1,...ta(-x/2-v/2,-v,v,20,0,90),...ta(-x/2-v/2,v,v,20,-90,0),{x:x/2-v/2,y:-v},...ta(-x/2+v+v/2,w/2,v,30,-180,-270)],M=[{x:x/2,y:-w/2-v},{x:-x/2,y:-w/2-v},...ta(x/2,-w/2,v,20,-90,0),{x:-x/2-v,y:-v},...ta(x/2+2*v,-v,v,20,-180,-270),...ta(x/2+2*v,v,v,20,-90,-180),{x:-x/2-v,y:w/2},...ta(x/2,w/2,v,20,0,90),{x:-x/2,y:w/2+v},{x:x/2-v-v/2,y:w/2+v},...ta(-x/2+v+v/2,-w/2,v,20,-90,-180),{x:x/2-v/2,y:v},...ta(-x/2-v/2,-v,v,20,0,90),...ta(-x/2-v/2,v,v,20,-90,0),{x:x/2-v/2,y:-v},...ta(-x/2+v+v/2,w/2,v,30,-180,-270)],D=d.A.svg(g),A=C(e,{fill:"none"});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let B=f(k).replace("Z",""),N=D.path(B,A),L=f(S).replace("Z",""),R=D.path(L,A),P=f(M),I=D.path(P,{...A}),T=g.insert("g",":first-child");return T.insert(()=>I,":first-child").attr("stroke-opacity",0),T.insert(()=>N,":first-child"),T.insert(()=>R,":first-child"),T.attr("class","text"),b&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",b),c&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",c),T.attr("transform","translate(".concat(v-v/4,", 0)")),m.attr("transform","translate(".concat(-x/2+(null!==(n=e.padding)&&void 0!==n?n:0)/2-(p.x-(null!==(i=p.left)&&void 0!==i?i:0)),",").concat(-w/2+(null!==(r=e.padding)&&void 0!==r?r:0)/2-(p.y-(null!==(o=p.top)&&void 0!==o?o:0)),")")),u(e,T),e.intersect=function(t){return q.polygon(e,M,t)},g}async function tn(t,e){var a,l,n,i;let{labelStyles:r,nodeStyles:o}=K(e);e.labelStyle=r;let{shapeSvg:s,bbox:c}=await h(t,e,y(e)),g=Math.max(80,(c.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2)*1.25,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),p=Math.max(20,c.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),x=p/2,{cssStyles:w}=e,v=d.A.svg(s),b=C(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=g-x,S=p/4,M=[{x:k,y:0},{x:S,y:0},{x:0,y:p/2},{x:S,y:p},{x:k,y:p},...m(-k,-p/2,x,50,270,90)],D=f(M),A=v.path(D,b),B=s.insert(()=>A,":first-child");return B.attr("class","basic label-container"),w&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",w),o&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",o),B.attr("transform","translate(".concat(-g/2,", ").concat(-p/2,")")),u(e,B),e.intersect=function(t){return q.polygon(e,M,t)},s}(0,s.K2)(O,"anchor"),(0,s.K2)(F,"generateArcPoints"),(0,s.K2)(Z,"bowTieRect"),(0,s.K2)(X,"insertPolygonShape"),(0,s.K2)(Y,"card"),(0,s.K2)(U,"choice"),(0,s.K2)(G,"circle"),(0,s.K2)(V,"createLine"),(0,s.K2)(J,"crossedCircle"),(0,s.K2)(Q,"generateCirclePoints"),(0,s.K2)($,"curlyBraceLeft"),(0,s.K2)(tt,"generateCirclePoints"),(0,s.K2)(te,"curlyBraceRight"),(0,s.K2)(ta,"generateCirclePoints"),(0,s.K2)(tl,"curlyBraces"),(0,s.K2)(tn,"curvedTrapezoid");var ti=(0,s.K2)((t,e,a,l,n,i)=>["M".concat(t,",").concat(e+i),"a".concat(n,",").concat(i," 0,0,0 ").concat(a,",0"),"a".concat(n,",").concat(i," 0,0,0 ").concat(-a,",0"),"l0,".concat(l),"a".concat(n,",").concat(i," 0,0,0 ").concat(a,",0"),"l0,".concat(-l)].join(" "),"createCylinderPathD"),tr=(0,s.K2)((t,e,a,l,n,i)=>["M".concat(t,",").concat(e+i),"M".concat(t+a,",").concat(e+i),"a".concat(n,",").concat(i," 0,0,0 ").concat(-a,",0"),"l0,".concat(l),"a".concat(n,",").concat(i," 0,0,0 ").concat(a,",0"),"l0,".concat(-l)].join(" "),"createOuterCylinderPathD"),to=(0,s.K2)((t,e,a,l,n,i)=>["M".concat(t-a/2,",").concat(-l/2),"a".concat(n,",").concat(i," 0,0,0 ").concat(a,",0")].join(" "),"createInnerCylinderPathD");async function ts(t,e){var a,l,n,i,r;let s;let{labelStyles:c,nodeStyles:g}=K(e);e.labelStyle=c;let{shapeSvg:f,bbox:p,label:m}=await h(t,e,y(e)),x=Math.max(p.width+e.padding,null!==(a=e.width)&&void 0!==a?a:0),w=x/2,v=w/(2.5+x/50),b=Math.max(p.height+v+e.padding,null!==(l=e.height)&&void 0!==l?l:0),{cssStyles:k}=e;if("handDrawn"===e.look){let t=d.A.svg(f),a=tr(0,0,x,b,w,v),l=to(0,v,x,b,w,v),n=t.path(a,C(e,{})),i=t.path(l,C(e,{fill:"none"}));s=f.insert(()=>i,":first-child"),(s=f.insert(()=>n,":first-child")).attr("class","basic label-container"),k&&s.attr("style",k)}else{let t=ti(0,0,x,b,w,v);s=f.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(k)).attr("style",g)}return s.attr("label-offset-y",v),s.attr("transform","translate(".concat(-x/2,", ").concat(-(b/2+v),")")),u(e,s),m.attr("transform","translate(".concat(-(p.width/2)-(p.x-(null!==(n=p.left)&&void 0!==n?n:0)),", ").concat(-(p.height/2)+(null!==(i=e.padding)&&void 0!==i?i:0)/1.5-(p.y-(null!==(r=p.top)&&void 0!==r?r:0)),")")),e.intersect=function(t){var a,l,n,i,r,o;let s=q.rect(e,t),c=s.x-(null!==(a=e.x)&&void 0!==a?a:0);if(0!=w&&(Math.abs(c)<(null!==(l=e.width)&&void 0!==l?l:0)/2||Math.abs(c)==(null!==(n=e.width)&&void 0!==n?n:0)/2&&Math.abs(s.y-(null!==(i=e.y)&&void 0!==i?i:0))>(null!==(r=e.height)&&void 0!==r?r:0)/2-v)){let a=v*v*(1-c*c/(w*w));a>0&&(a=Math.sqrt(a)),a=v-a,t.y-(null!==(o=e.y)&&void 0!==o?o:0)>0&&(a=-a),s.y+=a}return s},f}async function tc(t,e){var a,l,n,i;let{labelStyles:r,nodeStyles:o}=K(e);e.labelStyle=r;let{shapeSvg:s,bbox:c,label:g}=await h(t,e,y(e)),f=c.width+e.padding,p=c.height+e.padding,m=.2*p,x=-f/2,w=-p/2-m/2,{cssStyles:v}=e,b=d.A.svg(s),k=C(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=b.polygon([{x,y:w+m},{x:-x,y:w+m},{x:-x,y:-w},{x,y:-w},{x,y:w},{x:-x,y:w},{x:-x,y:w+m}].map(t=>[t.x,t.y]),k),M=s.insert(()=>S,":first-child");return M.attr("class","basic label-container"),v&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",v),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),g.attr("transform","translate(".concat(x+(null!==(a=e.padding)&&void 0!==a?a:0)/2-(c.x-(null!==(l=c.left)&&void 0!==l?l:0)),", ").concat(w+m+(null!==(n=e.padding)&&void 0!==n?n:0)/2-(c.y-(null!==(i=c.top)&&void 0!==i?i:0)),")")),u(e,M),e.intersect=function(t){return q.rect(e,t)},s}async function td(t,e){let a;let{labelStyles:l,nodeStyles:n}=K(e);e.labelStyle=l;let{shapeSvg:i,bbox:r,halfPadding:c}=await h(t,e,y(e)),g=r.width/2+c+5,f=r.width/2+c,{cssStyles:p}=e;
1if("handDrawn"===e.look){var m,x;let t=d.A.svg(i),l=C(e,{roughness:.2,strokeWidth:2.5}),n=C(e,{roughness:.2,strokeWidth:1.5}),r=t.circle(0,0,2*g,l),s=t.circle(0,0,2*f,n);(a=i.insert("g",":first-child")).attr("class",(0,o.KL)(e.cssClasses)).attr("style",(0,o.KL)(p)),null===(m=a.node())||void 0===m||m.appendChild(r),null===(x=a.node())||void 0===x||x.appendChild(s)}else{let t=(a=i.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",g).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0)}return u(e,a),e.intersect=function(t){return s.Rm.info("DoubleCircle intersect",e,g,t),q.circle(e,g,t)},i}function th(t,e,a){var l;let{config:{themeVariables:n}}=a,{labelStyles:i,nodeStyles:r}=K(e);e.label="",e.labelStyle=i;let o=t.insert("g").attr("class",y(e)).attr("id",null!==(l=e.domId)&&void 0!==l?l:e.id),{cssStyles:c}=e,h=d.A.svg(o),{nodeBorder:g}=n,f=C(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(f.roughness=0);let p=h.circle(0,0,14,f),m=o.insert(()=>p,":first-child");return m.selectAll("path").attr("style","fill: ".concat(g," !important;")),c&&c.length>0&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",c),r&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",r),u(e,m),e.intersect=function(t){return s.Rm.info("filledCircle intersect",e,{radius:7,point:t}),q.circle(e,7,t)},o}async function tg(t,e){var a,l,n,i;let{labelStyles:r,nodeStyles:o}=K(e);e.labelStyle=r;let{shapeSvg:c,bbox:g,label:p}=await h(t,e,y(e)),m=g.width+(null!==(a=e.padding)&&void 0!==a?a:0),x=m+g.height,w=m+g.height,v=[{x:0,y:-x},{x:w,y:-x},{x:w/2,y:0}],{cssStyles:b}=e,k=d.A.svg(c),S=C(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let M=f(v),D=k.path(M,S),A=c.insert(()=>D,":first-child").attr("transform","translate(".concat(-x/2,", ").concat(x/2,")"));return b&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",b),o&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",o),e.width=m,e.height=x,u(e,A),p.attr("transform","translate(".concat(-g.width/2-(g.x-(null!==(l=g.left)&&void 0!==l?l:0)),", ").concat(-x/2+(null!==(n=e.padding)&&void 0!==n?n:0)/2+(g.y-(null!==(i=g.top)&&void 0!==i?i:0)),")")),e.intersect=function(t){return s.Rm.info("Triangle intersect",e,v,t),q.polygon(e,v,t)},c}function tu(t,e,a){var l,n,i,r,o,s;let{dir:c,config:{state:h,themeVariables:g}}=a,{nodeStyles:f}=K(e);e.label="";let p=t.insert("g").attr("class",y(e)).attr("id",null!==(l=e.domId)&&void 0!==l?l:e.id),{cssStyles:m}=e,x=Math.max(70,null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0),w=Math.max(10,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0);"LR"===c&&(x=Math.max(10,null!==(r=null==e?void 0:e.width)&&void 0!==r?r:0),w=Math.max(70,null!==(o=null==e?void 0:e.height)&&void 0!==o?o:0));let v=-1*x/2,b=-1*w/2,k=d.A.svg(p),S=C(e,{stroke:g.lineColor,fill:g.lineColor});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let M=k.rectangle(v,b,x,w,S),D=p.insert(()=>M,":first-child");m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),f&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",f),u(e,D);let A=null!==(s=null==h?void 0:h.padding)&&void 0!==s?s:0;return e.width&&e.height&&(e.width+=A/2||0,e.height+=A/2||0),e.intersect=function(t){return q.rect(e,t)},p}async function ty(t,e){var a,l,n,i;let{labelStyles:r,nodeStyles:o}=K(e);e.labelStyle=r;let{shapeSvg:c,bbox:g}=await h(t,e,y(e)),p=Math.max(80,g.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),x=Math.max(50,g.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),w=x/2,{cssStyles:v}=e,b=d.A.svg(c),k=C(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=[{x:-p/2,y:-x/2},{x:p/2-w,y:-x/2},...m(-p/2+w,0,w,50,90,270),{x:p/2-w,y:x/2},{x:-p/2,y:x/2}],M=f(S),D=b.path(M,k),A=c.insert(()=>D,":first-child");return A.attr("class","basic label-container"),v&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",v),o&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",o),u(e,A),e.intersect=function(t){return s.Rm.info("Pill intersect",e,{radius:w,point:t}),q.polygon(e,S,t)},c}(0,s.K2)(ts,"cylinder"),(0,s.K2)(tc,"dividedRectangle"),(0,s.K2)(td,"doublecircle"),(0,s.K2)(th,"filledCircle"),(0,s.K2)(tg,"flippedTriangle"),(0,s.K2)(tu,"forkJoin"),(0,s.K2)(ty,"halfRoundedRectangle");var tf=(0,s.K2)((t,e,a,l,n)=>["M".concat(t+n,",").concat(e),"L".concat(t+a-n,",").concat(e),"L".concat(t+a,",").concat(e-l/2),"L".concat(t+a-n,",").concat(e-l),"L".concat(t+n,",").concat(e-l),"L".concat(t,",").concat(e-l/2),"Z"].join(" "),"createHexagonPathD");async function tp(t,e){let a;let{labelStyles:l,nodeStyles:n}=K(e);e.labelStyle=l;let{shapeSvg:i,bbox:r}=await h(t,e,y(e)),o=r.height+e.padding,s=o/4,c=r.width+2*s+e.padding,g=[{x:s,y:0},{x:c-s,y:0},{x:c,y:-o/2},{x:c-s,y:-o},{x:s,y:-o},{x:0,y:-o/2}],{cssStyles:f}=e;
1if("handDrawn"===e.look){let t=d.A.svg(i),l=C(e,{}),n=tf(0,0,c,o,s),r=t.path(n,l);a=i.insert(()=>r,":first-child").attr("transform","translate(".concat(-c/2,", ").concat(o/2,")")),f&&a.attr("style",f)}else a=X(i,c,o,g);return n&&a.attr("style",n),e.width=c,e.height=o,u(e,a),e.intersect=function(t){return q.polygon(e,g,t)},i}async function tm(t,e){var a,l;let{labelStyles:n,nodeStyles:i}=K(e);e.label="",e.labelStyle=n;let{shapeSvg:r}=await h(t,e,y(e)),o=Math.max(30,null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0),c=Math.max(30,null!==(l=null==e?void 0:e.height)&&void 0!==l?l:0),{cssStyles:g}=e,p=d.A.svg(r),m=C(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=[{x:0,y:0},{x:o,y:0},{x:0,y:c},{x:o,y:c}],w=f(x),v=p.path(w,m),b=r.insert(()=>v,":first-child");return b.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",g),i&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",i),b.attr("transform","translate(".concat(-o/2,", ").concat(-c/2,")")),u(e,b),e.intersect=function(t){return s.Rm.info("Pill intersect",e,{points:x}),q.polygon(e,x,t)},r}async function tx(t,e,a){var l,i,r,o;let{config:{themeVariables:c,flowchart:g}}=a,{labelStyles:y}=K(e);e.labelStyle=y;let f=Math.max(null!==(l=e.assetHeight)&&void 0!==l?l:48,null!==(i=e.assetWidth)&&void 0!==i?i:48),p=null==g?void 0:g.wrappingWidth;e.width=Math.max(f,null!=p?p:0);let{shapeSvg:m,bbox:x,label:w}=await h(t,e,"icon-shape default"),v="t"===e.pos,{nodeBorder:b}=c,{stylesMap:k}=M(e),S=-f/2,D=-f/2,A=8*!!e.label,B=d.A.svg(m),N=C(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let L=B.rectangle(S,D,f,f,N),R=Math.max(f,x.width),P=f+x.height+A,I=B.rectangle(-R/2,-P/2,R,P,{...N,fill:"transparent",stroke:"none"}),T=m.insert(()=>L,":first-child"),j=m.insert(()=>I);if(e.icon){let t=m.append("g");t.html("<g>".concat(await (0,n.WY)(e.icon,{height:f,width:f,fallbackPrefix:""}),"</g>"));let a=t.node().getBBox(),l=a.width,i=a.height,o=a.x,s=a.y;t.attr("transform","translate(".concat(-l/2-o,",").concat(v?x.height/2+A/2-i/2-s:-x.height/2-A/2-i/2-s,")")),t.attr("style","color: ".concat(null!==(r=k.get("stroke"))&&void 0!==r?r:b,";"))}return w.attr("transform","translate(".concat(-x.width/2-(x.x-(null!==(o=x.left)&&void 0!==o?o:0)),",").concat(v?-P/2:P/2-x.height,")")),T.attr("transform","translate(".concat(0,",").concat(v?x.height/2+A/2:-x.height/2-A/2,")")),u(e,j),e.intersect=function(t){var a,l,n;if(s.Rm.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);let i=null!==(a=e.x)&&void 0!==a?a:0,r=null!==(l=e.y)&&void 0!==l?l:0,o=null!==(n=e.height)&&void 0!==n?n:0,c=[];return c=v?[{x:i-x.width/2,y:r-o/2},{x:i+x.width/2,y:r-o/2},{x:i+x.width/2,y:r-o/2+x.height+A},{x:i+f/2,y:r-o/2+x.height+A},{x:i+f/2,y:r+o/2},{x:i-f/2,y:r+o/2},{x:i-f/2,y:r-o/2+x.height+A},{x:i-x.width/2,y:r-o/2+x.height+A}]:[{x:i-f/2,y:r-o/2},{x:i+f/2,y:r-o/2},{x:i+f/2,y:r-o/2+f},{x:i+x.width/2,y:r-o/2+f},{x:i+x.width/2/2,y:r+o/2},{x:i-x.width/2,y:r+o/2},{x:i-x.width/2,y:r-o/2+f},{x:i-f/2,y:r-o/2+f}],q.polygon(e,c,t)},m}async function tw(t,e,a){var l,i,r,o;let{config:{themeVariables:c,flowchart:g}}=a,{labelStyles:y}=K(e);e.labelStyle=y;let f=Math.max(null!==(l=e.assetHeight)&&void 0!==l?l:48,null!==(i=e.assetWidth)&&void 0!==i?i:48),p=null==g?void 0:g.wrappingWidth;e.width=Math.max(f,null!=p?p:0);let{shapeSvg:m,bbox:x,label:w}=await h(t,e,"icon-shape default"),v=8*!!e.label,b="t"===e.pos,{nodeBorder:k,mainBkg:S}=c,{stylesMap:D}=M(e),A=d.A.svg(m),B=C(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let N=D.get("fill");B.stroke=null!=N?N:S;let L=m.append("g");e.icon&&L.html("<g>".concat(await (0,n.WY)(e.icon,{height:f,width:f,fallbackPrefix:""}),"</g>"));let R=L.node().getBBox(),P=R.width,I=R.height,T=R.x,j=R.y,W=Math.max(P,I)*Math.SQRT2+40,_=A.circle(0,0,W,B),E=Math.max(W,x.width),H=W+x.height+v,z=A.rectangle(-E/2,-H/2,E,H,{...B,fill:"transparent",stroke:"none"}),O=m.insert(()=>_,":first-child"),F=m.insert(()=>z);return L.attr("transform","translate(".concat(-P/2-T,",").concat(b?x.height/2+v/2-I/2-j:-x.height/2-v/2-I/2-j,")")),L.attr("style","color: ".concat(null!==(r=D.get("stroke"))&&void 0!==r?r:k,";")),w.attr("transform","translate(".concat(-x.width/2-(x.x-(null!==(o=x.left)&&void 0!==o?o:0)),",").concat(b?-H/2:H/2-x.height,")")),O.attr("transform","translate(".concat(0,",").concat(b?x.height/2+v/2:-x.height/2-v/2,")")),u(e,F),e.intersect=function(t){return s.Rm.info("iconSquare intersect",e,t),q.rect(e,t)},m}async function tv(t,e,a){var l,i,r,o;let{config:{themeVariables:c,flowchart:g}}=a,{labelStyles:y}=K(e);e.labelStyle=y;let f=Math.max(null!==(l=e.assetHeight)&&void 0!==l?l:48,null!==(i=e.assetWidth)&&void 0!==i?i:48),p=null==g?void 0:g.wrappingWidth;e.width=Math.max(f,null!=p?p:0);let{shapeSvg:m,bbox:x,halfPadding:w,label:v}=await h(t,e,"icon-shape default"),b="t"===e.pos,S=f+2*w,D=f+2*w,{nodeBorder:A,mainBkg:B}=c,{stylesMap:N}=M(e),L=8*!!e.label,R=d.A.svg(m),P=C(e,{});"handDrawn"!==e.look&&(P.roughness=0,P.fillStyle="solid");let I=N.get("fill");P.stroke=null!=I?I:B;let T=R.path(k(-D/2,-S/2,D,S,5),P),j=Math.max(D,x.width),W=S+x.height+L,_=R.rectangle(-j/2,-W/2,j,W,{...P,fill:"transparent",stroke:"none"}),E=m.insert(()=>T,":first-child").attr("class","icon-shape2"),H=m.insert(()=>_);if(e.icon){let t=m.append("g");t.html("<g>".concat(await (0,n.WY)(e.icon,{height:f,width:f,fallbackPrefix:""}),"</g>"));let a=t.node().getBBox(),l=a.width,i=a.height,o=a.x,s=a.y;t.attr("transform","translate(".concat(-l/2-o,",").concat(b?x.height/2+L/2-i/2-s:-x.height/2-L/2-i/2-s,")")),t.attr("style","color: ".concat(null!==(r=N.get("stroke"))&&void 0!==r?r:A,";"))}return v.attr("transform","translate(".concat(-x.width/2-(x.x-(null!==(o=x.left)&&void 0!==o?o:0)),",").concat(b?-W/2:W/2-x.height,")")),E.attr("transform","translate(".concat(0,",").concat(b?x.height/2+L/2:-x.height/2-L/2,")")),u(e,H),e.intersect=function(t){var a,l,n;if(s.Rm.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);let i=null!==(a=e.x)&&void 0!==a?a:0,r=null!==(l=e.y)&&void 0!==l?l:0,o=null!==(n=e.height)&&void 0!==n?n:0,c=[];return c=b?[{x:i-x.width/2,y:r-o/2},{x:i+x.width/2,y:r-o/2},{x:i+x.width/2,y:r-o/2+x.height+L},{x:i+D/2,y:r-o/2+x.height+L},{x:i+D/2,y:r+o/2},{x:i-D/2,y:r+o/2},{x:i-D/2,y:r-o/2+x.height+L},{x:i-x.width/2,y:r-o/2+x.height+L}]:[{x:i-D/2,y:r-o/2},{x:i+D/2,y:r-o/2},{x:i+D/2,y:r-o/2+S},{x:i+x.width/2,y:r-o/2+S},{x:i+x.width/2/2,y:r+o/2},{x:i-x.width/2,y:r+o/2},{x:i-x.width/2,y:r-o/2+S},{x:i-D/2,y:r-o/2+S}],q.polygon(e,c,t)},m}async function tb(t,e,a){var l,i,r,o;let{config:{themeVariables:c,flowchart:g}}=a,{labelStyles:y}=K(e);e.labelStyle=y;let f=Math.max(null!==(l=e.assetHeight)&&void 0!==l?l:48,null!==(i=e.assetWidth)&&void 0!==i?i:48),p=null==g?void 0:g.wrappingWidth;e.width=Math.max(f,null!=p?p:0);let{shapeSvg:m,bbox:x,halfPadding:w,label:v}=await h(t,e,"icon-shape default"),b="t"===e.pos,S=f+2*w,D=f+2*w,{nodeBorder:A,mainBkg:B}=c,{stylesMap:N}=M(e),L=8*!!e.label,R=d.A.svg(m),P=C(e,{});"handDrawn"!==e.look&&(P.roughness=0,P.fillStyle="solid");let I=N.get("fill");P.stroke=null!=I?I:B;let T=R.path(k(-D/2,-S/2,D,S,.1),P),j=Math.max(D,x.width),W=S+x.height+L,_=R.rectangle(-j/2,-W/2,j,W,{...P,fill:"transparent",stroke:"none"}),E=m.insert(()=>T,":first-child"),H=m.insert(()=>_);if(e.icon){let t=m.append("g");t.html("<g>".concat(await (0,n.WY)(e.icon,{height:f,width:f,fallbackPrefix:""}),"</g>"));let a=t.node().getBBox(),l=a.width,i=a.height,o=a.x,s=a.y;t.attr("transform","translate(".concat(-l/2-o,",").concat(b?x.height/2+L/2-i/2-s:-x.height/2-L/2-i/2-s,")")),t.attr("style","color: ".concat(null!==(r=N.get("stroke"))&&void 0!==r?r:A,";"))}return v.attr("transform","translate(".concat(-x.width/2-(x.x-(null!==(o=x.left)&&void 0!==o?o:0)),",").concat(b?-W/2:W/2-x.height,")")),E.attr("transform","translate(".concat(0,",").concat(b?x.height/2+L/2:-x.height/2-L/2,")")),u(e,H),e.intersect=function(t){var a,l,n;if(s.Rm.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);let i=null!==(a=e.x)&&void 0!==a?a:0,r=null!==(l=e.y)&&void 0!==l?l:0,o=null!==(n=e.height)&&void 0!==n?n:0,c=[];return c=b?[{x:i-x.width/2,y:r-o/2},{x:i+x.width/2,y:r-o/2},{x:i+x.width/2,y:r-o/2+x.height+L},{x:i+D/2,y:r-o/2+x.height+L},{x:i+D/2,y:r+o/2},{x:i-D/2,y:r+o/2},{x:i-D/2,y:r-o/2+x.height+L},{x:i-x.width/2,y:r-o/2+x.height+L}]:[{x:i-D/2,y:r-o/2},{x:i+D/2,y:r-o/2},{x:i+D/2,y:r-o/2+S},{x:i+x.width/2,y:r-o/2+S},{x:i+x.width/2/2,y:r+o/2},{x:i-x.width/2,y:r+o/2},{x:i-x.width/2,y:r-o/2+S},{x:i-D/2,y:r-o/2+S}],q.polygon(e,c,t)},m}async function tk(t,e,a){var l,n,i,r;let{config:{flowchart:o}}=a,c=new Image;c.src=null!==(l=null==e?void 0:e.img)&&void 0!==l?l:"",await c.decode();
1let g=Number(c.naturalWidth.toString().replace("px","")),y=Number(c.naturalHeight.toString().replace("px",""));e.imageAspectRatio=g/y;let{labelStyles:f}=K(e);e.labelStyle=f;let p=null==o?void 0:o.wrappingWidth;e.defaultWidth=null==o?void 0:o.wrappingWidth;let m=Math.max(e.label&&null!=p?p:0,null!==(n=null==e?void 0:e.assetWidth)&&void 0!==n?n:g),x="on"===e.constraint&&(null==e?void 0:e.assetHeight)?e.assetHeight*e.imageAspectRatio:m,w="on"===e.constraint?x/e.imageAspectRatio:null!==(i=null==e?void 0:e.assetHeight)&&void 0!==i?i:y;e.width=Math.max(x,null!=p?p:0);let{shapeSvg:v,bbox:b,label:k}=await h(t,e,"image-shape default"),S="t"===e.pos,M=-x/2,D=8*!!e.label,A=d.A.svg(v),B=C(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let N=A.rectangle(M,-w/2,x,w,B),L=Math.max(x,b.width),R=w+b.height+D,P=A.rectangle(-L/2,-R/2,L,R,{...B,fill:"none",stroke:"none"}),I=v.insert(()=>N,":first-child"),T=v.insert(()=>P);if(e.img){let t=v.append("image");t.attr("href",e.img),t.attr("width",x),t.attr("height",w),t.attr("preserveAspectRatio","none"),t.attr("transform","translate(".concat(-x/2,",").concat(S?R/2-w:-R/2,")"))}return k.attr("transform","translate(".concat(-b.width/2-(b.x-(null!==(r=b.left)&&void 0!==r?r:0)),",").concat(S?-w/2-b.height/2-D/2:w/2-b.height/2+D/2,")")),I.attr("transform","translate(".concat(0,",").concat(S?b.height/2+D/2:-b.height/2-D/2,")")),u(e,T),e.intersect=function(t){var a,l,n;if(s.Rm.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);let i=null!==(a=e.x)&&void 0!==a?a:0,r=null!==(l=e.y)&&void 0!==l?l:0,o=null!==(n=e.height)&&void 0!==n?n:0,c=[];return c=S?[{x:i-b.width/2,y:r-o/2},{x:i+b.width/2,y:r-o/2},{x:i+b.width/2,y:r-o/2+b.height+D},{x:i+x/2,y:r-o/2+b.height+D},{x:i+x/2,y:r+o/2},{x:i-x/2,y:r+o/2},{x:i-x/2,y:r-o/2+b.height+D},{x:i-b.width/2,y:r-o/2+b.height+D}]:[{x:i-x/2,y:r-o/2},{x:i+x/2,y:r-o/2},{x:i+x/2,y:r-o/2+w},{x:i+b.width/2,y:r-o/2+w},{x:i+b.width/2/2,y:r+o/2},{x:i-b.width/2,y:r+o/2},{x:i-b.width/2,y:r-o/2+w},{x:i-x/2,y:r-o/2+w}],q.polygon(e,c,t)},v}async function tS(t,e){var a,l,n,i;let r;let{labelStyles:o,nodeStyles:s}=K(e);e.labelStyle=o;let{shapeSvg:c,bbox:g}=await h(t,e,y(e)),p=Math.max(g.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),m=Math.max(g.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),x=[{x:0,y:0},{x:p,y:0},{x:p+3*m/6,y:-m},{x:-3*m/6,y:-m}],{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.A.svg(c),a=C(e,{}),l=f(x),n=t.path(l,a);r=c.insert(()=>n,":first-child").attr("transform","translate(".concat(-p/2,", ").concat(m/2,")")),w&&r.attr("style",w)}else r=X(c,p,m,x);return s&&r.attr("style",s),e.width=p,e.height=m,u(e,r),e.intersect=function(t){return q.polygon(e,x,t)},c}async function tM(t,e,a){let l;let{labelStyles:n,nodeStyles:i}=K(e);e.labelStyle=n;let{shapeSvg:r,bbox:s}=await h(t,e,y(e)),c=Math.max(s.width+2*a.labelPaddingX,(null==e?void 0:e.width)||0),g=Math.max(s.height+2*a.labelPaddingY,(null==e?void 0:e.height)||0),f=-c/2,p=-g/2,{rx:m,ry:x}=e,{cssStyles:w}=e;if((null==a?void 0:a.rx)&&a.ry&&(m=a.rx,x=a.ry),"handDrawn"===e.look){let t=d.A.svg(r),a=C(e,{}),n=m||x?t.path(k(f,p,c,g,m||0),a):t.rectangle(f,p,c,g,a);(l=r.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",(0,o.KL)(w))}else(l=r.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",(0,o.KL)(m)).attr("ry",(0,o.KL)(x)).attr("x",f).attr("y",p).attr("width",c).attr("height",g);return u(e,l),e.intersect=function(t){return q.rect(e,t)},r}async function tD(t,e){var a,l;let{shapeSvg:n,bbox:i,label:r}=await h(t,e,"label"),o=n.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),n.attr("class","label edgeLabel"),r.attr("transform","translate(".concat(-(i.width/2)-(i.x-(null!==(a=i.left)&&void 0!==a?a:0)),", ").concat(-(i.height/2)-(i.y-(null!==(l=i.top)&&void 0!==l?l:0)),")")),u(e,o),e.intersect=function(t){return q.rect(e,t)},n}async function tA(t,e){var a,l,n,i;let r;let{labelStyles:o,nodeStyles:s}=K(e);e.labelStyle=o;let{shapeSvg:c,bbox:g}=await h(t,e,y(e)),p=Math.max(g.width+(null!==(a=e.padding)&&void 0!==a?a:0),null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),m=Math.max(g.height+(null!==(n=e.padding)&&void 0!==n?n:0),null!==(i=null==e?void 0:e.he
1ight)&&void 0!==i?i:0),x=[{x:0,y:0},{x:p+3*m/6,y:0},{x:p,y:-m},{x:-(3*m)/6,y:-m}],{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.A.svg(c),a=C(e,{}),l=f(x),n=t.path(l,a);r=c.insert(()=>n,":first-child").attr("transform","translate(".concat(-p/2,", ").concat(m/2,")")),w&&r.attr("style",w)}else r=X(c,p,m,x);return s&&r.attr("style",s),e.width=p,e.height=m,u(e,r),e.intersect=function(t){return q.polygon(e,x,t)},c}async function tK(t,e){var a,l,n,i;let r;let{labelStyles:o,nodeStyles:s}=K(e);e.labelStyle=o;let{shapeSvg:c,bbox:g}=await h(t,e,y(e)),p=Math.max(g.width+(null!==(a=e.padding)&&void 0!==a?a:0),null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),m=Math.max(g.height+(null!==(n=e.padding)&&void 0!==n?n:0),null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),x=[{x:-3*m/6,y:0},{x:p,y:0},{x:p+3*m/6,y:-m},{x:0,y:-m}],{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.A.svg(c),a=C(e,{}),l=f(x),n=t.path(l,a);r=c.insert(()=>n,":first-child").attr("transform","translate(".concat(-p/2,", ").concat(m/2,")")),w&&r.attr("style",w)}else r=X(c,p,m,x);return s&&r.attr("style",s),e.width=p,e.height=m,u(e,r),e.intersect=function(t){return q.polygon(e,x,t)},c}function tC(t,e){var a,l,n;let{labelStyles:i,nodeStyles:r}=K(e);e.label="",e.labelStyle=i;let o=t.insert("g").attr("class",y(e)).attr("id",null!==(a=e.domId)&&void 0!==a?a:e.id),{cssStyles:c}=e,h=Math.max(35,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),g=Math.max(35,null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0),p=[{x:h,y:0},{x:0,y:g+3.5},{x:h-14,y:g+3.5},{x:0,y:2*g},{x:h,y:g-3.5},{x:14,y:g-3.5}],m=d.A.svg(o),x=C(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=f(p),v=m.path(w,x),b=o.insert(()=>v,":first-child");return c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),r&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",r),b.attr("transform","translate(-".concat(h/2,",").concat(-g,")")),u(e,b),e.intersect=function(t){return s.Rm.info("lightningBolt intersect",e,t),q.polygon(e,p,t)},o}(0,s.K2)(tp,"hexagon"),(0,s.K2)(tm,"hourglass"),(0,s.K2)(tx,"icon"),(0,s.K2)(tw,"iconCircle"),(0,s.K2)(tv,"iconRounded"),(0,s.K2)(tb,"iconSquare"),(0,s.K2)(tk,"imageSquare"),(0,s.K2)(tS,"inv_trapezoid"),(0,s.K2)(tM,"drawRect"),(0,s.K2)(tD,"labelRect"),(0,s.K2)(tA,"lean_left"),(0,s.K2)(tK,"lean_right"),(0,s.K2)(tC,"lightningBolt");var tB=(0,s.K2)((t,e,a,l,n,i,r)=>["M".concat(t,",").concat(e+i),"a".concat(n,",").concat(i," 0,0,0 ").concat(a,",0"),"a".concat(n,",").concat(i," 0,0,0 ").concat(-a,",0"),"l0,".concat(l),"a".concat(n,",").concat(i," 0,0,0 ").concat(a,",0"),"l0,".concat(-l),"M".concat(t,",").concat(e+i+r),"a".concat(n,",").concat(i," 0,0,0 ").concat(a,",0")].join(" "),"createCylinderPathD"),tN=(0,s.K2)((t,e,a,l,n,i,r)=>["M".concat(t,",").concat(e+i),"M".concat(t+a,",").concat(e+i),"a".concat(n,",").concat(i," 0,0,0 ").concat(-a,",0"),"l0,".concat(l),"a".concat(n,",").concat(i," 0,0,0 ").concat(a,",0"),"l0,".concat(-l),"M".concat(t,",").concat(e+i+r),"a".concat(n,",").concat(i," 0,0,0 ").concat(a,",0")].join(" "),"createOuterCylinderPathD"),tL=(0,s.K2)((t,e,a,l,n,i)=>["M".concat(t-a/2,",").concat(-l/2),"a".concat(n,",").concat(i," 0,0,0 ").concat(a,",0")].join(" "),"createInnerCylinderPathD");async function tR(t,e){var a,l,n,i,r,s;let c;let{labelStyles:g,nodeStyles:f}=K(e);e.labelStyle=g;let{shapeSvg:p,bbox:m,label:x}=await h(t,e,y(e)),w=Math.max(m.width+(null!==(a=e.padding)&&void 0!==a?a:0),null!==(l=e.width)&&void 0!==l?l:0),v=w/2,b=v/(2.5+w/50),k=Math.max(m.height+b+(null!==(n=e.padding)&&void 0!==n?n:0),null!==(i=e.height)&&void 0!==i?i:0),S=.1*k,{cssStyles:M}=e;if("handDrawn"===e.look){let t=d.A.svg(p),a=tN(0,0,w,k,v,b,S),l=tL(0,b,w,k,v,b),n=C(e,{}),i=t.path(a,n),r=t.path(l,n);p.insert(()=>r,":first-child").attr("class","line"),(c=p.insert(()=>i,":first-child")).attr("class","basic label-container"),M&&c.attr("style",M)}else{let t=tB(0,0,w,k,v,b,S);c=p.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(M)).attr("style",f)}return c.attr("label-offset-y",b),c.attr("transform","translate(".concat(-w/2,", ").concat(-(k/2+b),")")),u(e,c),x.attr("transform","translate(".concat(-(m.width/2)-(m.x-(null!==(r=m.left)&&void 0!==r?r:0)),", ").concat(-(m.height/2)+b-(m.y-(null!==(s=m.top)&&void 0!==s?s:0)),")")),e.intersect=function(t){var a,l,n,i,r,o;let s=q.rect(e,t),c=s.x-(null!==(a=e.x)&&void 0!==a?a:0);if(0!=v&&(Math.abs(c)<(null!==(l=e.width)&&void 0!==l?l:0)/2||Math.abs(c)==(null!==(n=e.width)&&void 0!==n?n:0)/2&&Math.abs(s.y-(null!==(i=e.y)&&void 0!==i?i:0))>(null!==(r=e.height)&&void 0!==r?r:0)/2-b)){let a=b*b*(1-c*c/(v*v));a>0&&(a=Math.sqrt(a)),a=b-a,t.y-(null!==(o=e.y)&&void 0!==o?o:0)>0&&(a=-a),s.y+=a}return s},p}async function tP(t,e){var a,l,n,i,r,o,s,c;let{labelStyles:g,nodeStyles:f}=K(e);e.labelStyle=g;let{shapeSvg:m,bbox:x,label:w}=await h(t,e,y(e)),v=Math.max(x.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),b=Math.max(x.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.he
1ight)&&void 0!==i?i:0),k=b/4,S=b+k,{cssStyles:M}=e,D=d.A.svg(m),A=C(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let B=[{x:-v/2-v/2*.1,y:-S/2},{x:-v/2-v/2*.1,y:S/2},...p(-v/2-v/2*.1,S/2,v/2+v/2*.1,S/2,k,.8),{x:v/2+v/2*.1,y:-S/2},{x:-v/2-v/2*.1,y:-S/2},{x:-v/2,y:-S/2},{x:-v/2,y:S/2*1.1},{x:-v/2,y:-S/2}],N=D.polygon(B.map(t=>[t.x,t.y]),A),L=m.insert(()=>N,":first-child");return L.attr("class","basic label-container"),M&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",M),f&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",f),L.attr("transform","translate(0,".concat(-k/2,")")),w.attr("transform","translate(".concat(-v/2+(null!==(r=e.padding)&&void 0!==r?r:0)+v/2*.1/2-(x.x-(null!==(o=x.left)&&void 0!==o?o:0)),",").concat(-b/2+(null!==(s=e.padding)&&void 0!==s?s:0)-k/2-(x.y-(null!==(c=x.top)&&void 0!==c?c:0)),")")),u(e,L),e.intersect=function(t){return q.polygon(e,B,t)},m}async function tI(t,e){var a,l,n,i,r,o;let{labelStyles:s,nodeStyles:c}=K(e);e.labelStyle=s;let{shapeSvg:g,bbox:p,label:m}=await h(t,e,y(e)),x=Math.max(p.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),w=Math.max(p.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),v=-x/2,b=-w/2,{cssStyles:k}=e,S=d.A.svg(g),M=C(e,{}),D=[{x:v-5,y:b+5},{x:v-5,y:b+w+5},{x:v+x-5,y:b+w+5},{x:v+x-5,y:b+w},{x:v+x,y:b+w},{x:v+x,y:b+w-5},{x:v+x+5,y:b+w-5},{x:v+x+5,y:b-5},{x:v+5,y:b-5},{x:v+5,y:b},{x:v,y:b},{x:v,y:b+5}];"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let A=f(D),B=S.path(A,M),N=f([{x:v,y:b+5},{x:v+x-5,y:b+5},{x:v+x-5,y:b+w},{x:v+x,y:b+w},{x:v+x,y:b},{x:v,y:b}]),L=S.path(N,{...M,fill:"none"}),R=g.insert(()=>L,":first-child");return R.insert(()=>B,":first-child"),R.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",k),c&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",c),m.attr("transform","translate(".concat(-(p.width/2)-5-(p.x-(null!==(r=p.left)&&void 0!==r?r:0)),", ").concat(-(p.height/2)+5-(p.y-(null!==(o=p.top)&&void 0!==o?o:0)),")")),u(e,R),e.intersect=function(t){return q.polygon(e,D,t)},g}async function tT(t,e){var a,l,n,i,r,o;let{labelStyles:s,nodeStyles:c}=K(e);e.labelStyle=s;let{shapeSvg:g,bbox:m,label:x}=await h(t,e,y(e)),w=Math.max(m.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),v=Math.max(m.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),b=v/4,k=v+b,S=-w/2,M=-k/2,{cssStyles:D}=e,A=p(S-5,M+k+5,S+w-5,M+k+5,b,.8),B=null==A?void 0:A[A.length-1],N=[{x:S-5,y:M+5},{x:S-5,y:M+k+5},...A,{x:S+w-5,y:B.y-5},{x:S+w,y:B.y-5},{x:S+w,y:B.y-10},{x:S+w+5,y:B.y-10},{x:S+w+5,y:M-5},{x:S+5,y:M-5},{x:S+5,y:M},{x:S,y:M},{x:S,y:M+5}],L=[{x:S,y:M+5},{x:S+w-5,y:M+5},{x:S+w-5,y:B.y-5},{x:S+w,y:B.y-5},{x:S+w,y:M},{x:S,y:M}],R=d.A.svg(g),P=C(e,{});"handDrawn"!==e.look&&(P.roughness=0,P.fillStyle="solid");let I=f(N),T=R.path(I,P),j=f(L),W=R.path(j,P),_=g.insert(()=>T,":first-child");return _.insert(()=>W),_.attr("class","basic label-container"),D&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",D),c&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",c),_.attr("transform","translate(0,".concat(-b/2,")")),x.attr("transform","translate(".concat(-(m.width/2)-5-(m.x-(null!==(r=m.left)&&void 0!==r?r:0)),", ").concat(-(m.height/2)+5-b/2-(m.y-(null!==(o=m.top)&&void 0!==o?o:0)),")")),u(e,_),e.intersect=function(t){return q.polygon(e,N,t)},g}async function tj(t,e,a){var l,n,i,r,o;let{config:{themeVariables:c}}=a,{labelStyles:g,nodeStyles:f}=K(e);e.labelStyle=g,e.useHtmlLabels||(null===(l=(0,s.zj)().flowchart)||void 0===l?void 0:l.htmlLabels)!==!1||(e.centerLabel=!0);let{shapeSvg:p,bbox:m}=await h(t,e,y(e)),x=Math.max(m.width+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.width)&&void 0!==i?i:0),w=Math.max(m.height+(null!==(r=e.padding)&&void 0!==r?r:0)*2,null!==(o=null==e?void 0:e.height)&&void 0!==o?o:0),{cssStyles:v}=e,b=d.A.svg(p),k=C(e,{fill:c.noteBkgColor,stroke:c.noteBorderColor});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=b.rectangle(-x/2,-w/2,x,w,k),M=p.insert(()=>S,":first-child");return M.attr("class","basic label-container"),v&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",v),f&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",f),u(e,M),e.intersect=function(t){return q.rect(e,t)},p}(0,s.K2)(tR,"linedCylinder"),(0,s.K2)(tP,"linedWaveEdgedRect"),(0,s.K2)(tI,"multiRect"),(0,s.K2)(tT,"multiWaveEdgedRectangle"),(0,s.K2)(tj,"note");var tW=(0,s.K2)((t,e,a)=>["M".concat(t+a/2,",").concat(e),"L".concat(t+a,",").concat(e-a/2),"L".concat(t+a/2,",").concat(e-a),"L".concat(t,",").concat(e-a/2),"Z"].join(" "),"createDecisionBoxPathD");async function t_(t,e){let a;let{labelStyles:l,nodeStyles:n}=K(e);e.labelStyle=l;let{shapeSvg:i,bbox:r}=await h(t,e,y(e)),o=r.width+e.padding+(r.height+e.padding),c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],{cssStyles:g}=e;
1if("handDrawn"===e.look){let t=d.A.svg(i),l=C(e,{}),n=tW(0,0,o),r=t.path(n,l);a=i.insert(()=>r,":first-child").attr("transform","translate(".concat(-o/2,", ").concat(o/2,")")),g&&a.attr("style",g)}else a=X(i,o,o,c);return n&&a.attr("style",n),u(e,a),e.intersect=function(t){return s.Rm.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",q.polygon(e,c,t)),q.polygon(e,c,t)},i}async function tE(t,e){var a,l,n,i,r,o;let{labelStyles:s,nodeStyles:c}=K(e);e.labelStyle=s;let{shapeSvg:g,bbox:p,label:m}=await h(t,e,y(e)),x=Math.max(p.width+(null!==(a=e.padding)&&void 0!==a?a:0),null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),w=Math.max(p.height+(null!==(n=e.padding)&&void 0!==n?n:0),null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),v=-x/2,b=-w/2,k=b/2,S=[{x:v+k,y:b},{x:v,y:0},{x:v+k,y:-b},{x:-v,y:-b},{x:-v,y:b}],{cssStyles:M}=e,D=d.A.svg(g),A=C(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let B=f(S),N=D.path(B,A),L=g.insert(()=>N,":first-child");return L.attr("class","basic label-container"),M&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",M),c&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",c),L.attr("transform","translate(".concat(-k/2,",0)")),m.attr("transform","translate(".concat(-k/2-p.width/2-(p.x-(null!==(r=p.left)&&void 0!==r?r:0)),", ").concat(-(p.height/2)-(p.y-(null!==(o=p.top)&&void 0!==o?o:0)),")")),u(e,L),e.intersect=function(t){return q.polygon(e,S,t)},g}async function tH(t,e){var a,l;let n,i,r;let{labelStyles:o,nodeStyles:h}=K(e);e.labelStyle=o,n=e.cssClasses?"node "+e.cssClasses:"node default";let g=t.insert("g").attr("class",n).attr("id",e.domId||e.id),y=g.insert("g"),f=g.insert("g").attr("class","label").attr("style",h),p=e.description,m=e.label,x=f.node().appendChild(await b(m,e.labelStyle,!0,!0)),w={width:0,height:0};if((0,s._3)(null===(l=(0,s.D7)())||void 0===l?void 0:null===(a=l.flowchart)||void 0===a?void 0:a.htmlLabels)){let t=x.children[0],e=(0,c.Ltv)(x);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}s.Rm.info("Text 2",p);let v=p||[],S=x.getBBox(),M=f.node().appendChild(await b(v.join?v.join("<br/>"):v,e.labelStyle,!0,!0)),D=M.children[0],A=(0,c.Ltv)(M);w=D.getBoundingClientRect(),A.attr("width",w.width),A.attr("height",w.height);let B=(e.padding||0)/2;(0,c.Ltv)(M).attr("transform","translate( "+(w.width>S.width?0:(S.width-w.width)/2)+", "+(S.height+B+5)+")"),(0,c.Ltv)(x).attr("transform","translate( "+(w.width<S.width?0:-(S.width-w.width)/2)+", 0)"),w=f.node().getBBox(),f.attr("transform","translate("+-w.width/2+", "+(-w.height/2-B+3)+")");let N=w.width+(e.padding||0),L=w.height+(e.padding||0),R=-w.width/2-B,P=-w.height/2-B;if("handDrawn"===e.look){let t=d.A.svg(g),a=C(e,{}),l=t.path(k(R,P,N,L,e.rx||0),a),n=t.line(-w.width/2-B,-w.height/2-B+S.height+B,w.width/2+B,-w.height/2-B+S.height+B,a);r=g.insert(()=>(s.Rm.debug("Rough node insert CXC",l),n),":first-child"),i=g.insert(()=>(s.Rm.debug("Rough node insert CXC",l),l),":first-child")}else i=y.insert("rect",":first-child"),r=y.insert("line"),i.attr("class","outer title-state").attr("style",h).attr("x",-w.width/2-B).attr("y",-w.height/2-B).attr("width",w.width+(e.padding||0)).attr("height",w.height+(e.padding||0)),r.attr("class","divider").attr("x1",-w.width/2-B).attr("x2",w.width/2+B).attr("y1",-w.height/2-B+S.height+B).attr("y2",-w.height/2-B+S.height+B);return u(e,i),e.intersect=function(t){return q.rect(e,t)},g}async function tz(t,e){let a={rx:5,ry:5,classes:"",labelPaddingX:+((null==e?void 0:e.padding)||0),labelPaddingY:+((null==e?void 0:e.padding)||0)};return tM(t,e,a)}async function tq(t,e){var a,l,n,i,r,s,c,g,f;let{labelStyles:p,nodeStyles:m}=K(e);e.labelStyle=p;let{shapeSvg:x,bbox:w,label:v}=await h(t,e,y(e)),b=null!==(a=null==e?void 0:e.padding)&&void 0!==a?a:0,k=Math.max(w.width+(null!==(l=e.padding)&&void 0!==l?l:0)*2,null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0),S=Math.max(w.height+(null!==(i=e.padding)&&void 0!==i?i:0)*2,null!==(r=null==e?void 0:e.height)&&void 0!==r?r:0),M=-w.width/2-b,D=-w.height/2-b,{cssStyles:A}=e,B=d.A.svg(x),N=C(e,{});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let L=B.polygon([{x:M,y:D},{x:M+k+8,y:D},{x:M+k+8,y:D+S},{x:M-8,y:D+S},{x:M-8,y:D},{x:M,y:D},{x:M,y:D+S}].map(t=>[t.x,t.y]),N),R=x.insert(()=>L,":first-child");return R.attr("class","basic label-container").attr("style",(0,o.KL)(A)),m&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",m),A&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",m),v.attr("transform","translate(".concat(-k/2+4+(null!==(s=e.padding)&&void 0!==s?s:0)-(w.x-(null!==(c=w.left)&&void 0!==c?c:0)),",").concat(-S/2+(null!==(g=e.padding)&&void 0!==g?g:0)-(w.y-(null!==(f=w.top)&&void 0!==f?f:0)),")")),u(e,R),e.intersect=function(t){return q.rect(e,t)},x}async function tO(t,e){var a,l,n,i,r,o,s,c;let{labelStyles:g,nodeStyles:p}=K(e);e.labelStyle=g;let{shapeSvg:m,bbox:x,label:w}=await h(t,e,y(e)),v=Math.max(x.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),b=Math.max(x.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.he
1ight)&&void 0!==i?i:0),k=-v/2,S=-b/2,{cssStyles:M}=e,D=d.A.svg(m),A=C(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let B=[{x:k,y:S},{x:k,y:S+b},{x:k+v,y:S+b},{x:k+v,y:S-b/2}],N=f(B),L=D.path(N,A),R=m.insert(()=>L,":first-child");return R.attr("class","basic label-container"),M&&"handDrawn"!==e.look&&R.selectChildren("path").attr("style",M),p&&"handDrawn"!==e.look&&R.selectChildren("path").attr("style",p),R.attr("transform","translate(0, ".concat(b/4,")")),w.attr("transform","translate(".concat(-v/2+(null!==(r=e.padding)&&void 0!==r?r:0)-(x.x-(null!==(o=x.left)&&void 0!==o?o:0)),", ").concat(-b/4+(null!==(s=e.padding)&&void 0!==s?s:0)-(x.y-(null!==(c=x.top)&&void 0!==c?c:0)),")")),u(e,R),e.intersect=function(t){return q.polygon(e,B,t)},m}async function tF(t,e){let a={rx:0,ry:0,classes:"",labelPaddingX:2*((null==e?void 0:e.padding)||0),labelPaddingY:+((null==e?void 0:e.padding)||0)};return tM(t,e,a)}async function tZ(t,e){let a;let{labelStyles:l,nodeStyles:n}=K(e);e.labelStyle=l;let{shapeSvg:i,bbox:r}=await h(t,e,y(e)),s=r.height+e.padding,c=r.width+s/4+e.padding,{cssStyles:g}=e;
1if("handDrawn"===e.look){let t=d.A.svg(i),l=C(e,{}),n=k(-c/2,-s/2,c,s,s/2),r=t.path(n,l);(a=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,o.KL)(g))}else(a=i.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-c/2).attr("y",-s/2).attr("width",c).attr("height",s);return u(e,a),e.intersect=function(t){return q.rect(e,t)},i}async function tX(t,e){return tM(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function tY(t,e,a){let{config:{themeVariables:l}}=a,{labelStyles:n,nodeStyles:i}=K(e);e.labelStyle=n;let{cssStyles:r}=e,{lineColor:o,stateBorder:s,nodeBorder:c}=l,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),g=d.A.svg(h),y=C(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let f=g.circle(0,0,14,{...y,stroke:o,strokeWidth:2}),p=null!=s?s:c,m=g.circle(0,0,5,{...y,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>f,":first-child");return x.insert(()=>m),r&&x.selectAll("path").attr("style",r),i&&x.selectAll("path").attr("style",i),u(e,x),e.intersect=function(t){return q.circle(e,7,t)},h}function tU(t,e,a){let l,{config:{themeVariables:n}}=a,{lineColor:i}=n,r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.A.svg(r).circle(0,0,14,S(i));(l=r.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(l=r.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return u(e,l),e.intersect=function(t){return q.circle(e,7,t)},r}async function tG(t,e){let{labelStyles:a,nodeStyles:l}=K(e);e.labelStyle=a;let{shapeSvg:n,bbox:i}=await h(t,e,y(e)),r=((null==e?void 0:e.padding)||0)/2,s=i.width+e.padding,c=i.height+e.padding,g=-i.width/2-r,f=-i.height/2-r,p=[{x:0,y:0},{x:s,y:0},{x:s,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.A.svg(n),a=C(e,{}),l=t.rectangle(g-8,f,s+16,c,a),i=t.line(g,f,g,f+c,a),r=t.line(g+s,f,g+s,f+c,a);n.insert(()=>i,":first-child"),n.insert(()=>r,":first-child");let h=n.insert(()=>l,":first-child"),{cssStyles:y}=e;h.attr("class","basic label-container").attr("style",(0,o.KL)(y)),u(e,h)}else{let t=X(n,s,c,p);l&&t.attr("style",l),u(e,t)}return e.intersect=function(t){return q.polygon(e,p,t)},n}async function tV(t,e){var a,l,n,i;let{labelStyles:r,nodeStyles:o}=K(e);e.labelStyle=r;let{shapeSvg:s,bbox:c}=await h(t,e,y(e)),g=Math.max(c.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),p=Math.max(c.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),m=-g/2,x=-p/2,w=.2*p,{cssStyles:v}=e,b=d.A.svg(s),k=C(e,{}),S=[{x:m-w/2,y:x},{x:m+g+w/2,y:x},{x:m+g+w/2,y:x+p},{x:m-w/2,y:x+p}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=f(S),D=b.path(M,k),A=f([{x:m+g-w/2,y:x+p},{x:m+g+w/2,y:x+p},{x:m+g+w/2,y:x+p-.2*p}]),B=b.path(A,{...k,fillStyle:"solid"}),N=s.insert(()=>B,":first-child");return N.insert(()=>D,":first-child"),N.attr("class","basic label-container"),v&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",v),o&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",o),u(e,N),e.intersect=function(t){return q.polygon(e,S,t)},s}async function tJ(t,e){var a,l,n,i,r,o,s,c;let{labelStyles:g,nodeStyles:m}=K(e);e.labelStyle=g;let{shapeSvg:x,bbox:w,label:v}=await h(t,e,y(e)),b=Math.max(w.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),k=Math.max(w.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),S=k/4,M=.2*b,D=.2*k,A=k+S,{cssStyles:B}=e,N=d.A.svg(x),L=C(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");let R=[{x:-b/2-b/2*.1,y:A/2},...p(-b/2-b/2*.1,A/2,b/2+b/2*.1,A/2,S,.8),{x:b/2+b/2*.1,y:-A/2},{x:-b/2-b/2*.1,y:-A/2}],P=-b/2+b/2*.1,I=-A/2-.4*D,T=[{x:P+b-M,y:(I+k)*1.4},{x:P+b,y:I+k-D},{x:P+b,y:(I+k)*.9},...p(P+b,(I+k)*1.3,P+b-M,(I+k)*1.5,-(.03*k),.5)],j=f(R),W=N.path(j,L),_=f(T),E=N.path(_,{...L,fillStyle:"solid"}),H=x.insert(()=>E,":first-child");return H.insert(()=>W,":first-child"),H.attr("class","basic label-container"),B&&"handDrawn"!==e.look&&H.selectAll("path").attr("style",B),m&&"handDrawn"!==e.look&&H.selectAll("path").attr("style",m),H.attr("transform","translate(0,".concat(-S/2,")")),v.attr("transform","translate(".concat(-b/2+(null!==(r=e.padding)&&void 0!==r?r:0)-(w.x-(null!==(o=w.left)&&void 0!==o?o:0)),",").concat(-k/2+(null!==(s=e.padding)&&void 0!==s?s:0)-S/2-(w.y-(null!==(c=w.top)&&void 0!==c?c:0)),")")),u(e,H),e.intersect=function(t){return q.polygon(e,R,t)},x}async function tQ(t,e){let{labelStyles:a,nodeStyles:l}=K(e);e.labelStyle=a;let{shapeSvg:n,bbox:i}=await h(t,e,y(e)),r=Math.max(i.width+e.padding,(null==e?void 0:e.width)||0),o=Math.max(i.height+e.padding,(null==e?void 0:e.he
1ight)||0),s=n.insert("rect",":first-child");return s.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-r/2).attr("y",-o/2).attr("width",r).attr("height",o),u(e,s),e.intersect=function(t){return q.rect(e,t)},n}(0,s.K2)(t_,"question"),(0,s.K2)(tE,"rect_left_inv_arrow"),(0,s.K2)(tH,"rectWithTitle"),(0,s.K2)(tz,"roundedRect"),(0,s.K2)(tq,"shadedProcess"),(0,s.K2)(tO,"slopedRect"),(0,s.K2)(tF,"squareRect"),(0,s.K2)(tZ,"stadium"),(0,s.K2)(tX,"state"),(0,s.K2)(tY,"stateEnd"),(0,s.K2)(tU,"stateStart"),(0,s.K2)(tG,"subroutine"),(0,s.K2)(tV,"taggedRect"),(0,s.K2)(tJ,"taggedWaveEdgedRectangle"),(0,s.K2)(tQ,"text");var t$=(0,s.K2)((t,e,a,l,n,i)=>"M".concat(t,",").concat(e,"\n a").concat(n,",").concat(i," 0,0,1 ",0,",").concat(-l,"\n l").concat(a,",",0,"\n a").concat(n,",").concat(i," 0,0,1 ",0,",").concat(l,"\n M").concat(a,",").concat(-l,"\n a").concat(n,",").concat(i," 0,0,0 ",0,",").concat(l,"\n l").concat(-a,",",0),"createCylinderPathD"),t0=(0,s.K2)((t,e,a,l,n,i)=>["M".concat(t,",").concat(e),"M".concat(t+a,",").concat(e),"a".concat(n,",").concat(i," 0,0,0 ",0,",").concat(-l),"l".concat(-a,",0"),"a".concat(n,",").concat(i," 0,0,0 ",0,",").concat(l),"l".concat(a,",0")].join(" "),"createOuterCylinderPathD"),t2=(0,s.K2)((t,e,a,l,n,i)=>["M".concat(t+a/2,",").concat(-l/2),"a".concat(n,",").concat(i," 0,0,0 0,").concat(l)].join(" "),"createInnerCylinderPathD");async function t1(t,e){var a,l;let n;let{labelStyles:i,nodeStyles:r}=K(e);e.labelStyle=i;let{shapeSvg:s,bbox:c,label:g,halfPadding:f}=await h(t,e,y(e)),p="neo"===e.look?2*f:f,m=c.height+p,x=m/2,w=x/(2.5+m/50),v=c.width+w+p,{cssStyles:b}=e;
1if("handDrawn"===e.look){let t=d.A.svg(s),a=t0(0,0,v,m,w,x),l=t2(0,0,v,m,w,x),i=t.path(a,C(e,{})),r=t.path(l,C(e,{fill:"none"}));n=s.insert(()=>r,":first-child"),(n=s.insert(()=>i,":first-child")).attr("class","basic label-container"),b&&n.attr("style",b)}else{let t=t$(0,0,v,m,w,x);(n=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(b)).attr("style",r)).attr("class","basic label-container"),b&&n.selectAll("path").attr("style",b),r&&n.selectAll("path").attr("style",r)}return n.attr("label-offset-x",w),n.attr("transform","translate(".concat(-v/2,", ").concat(m/2," )")),g.attr("transform","translate(".concat(-(c.width/2)-w-(c.x-(null!==(a=c.left)&&void 0!==a?a:0)),", ").concat(-(c.height/2)-(c.y-(null!==(l=c.top)&&void 0!==l?l:0)),")")),u(e,n),e.intersect=function(t){var a,l,n,i,r,o;let s=q.rect(e,t),c=s.y-(null!==(a=e.y)&&void 0!==a?a:0);if(0!=x&&(Math.abs(c)<(null!==(l=e.height)&&void 0!==l?l:0)/2||Math.abs(c)==(null!==(n=e.height)&&void 0!==n?n:0)/2&&Math.abs(s.x-(null!==(i=e.x)&&void 0!==i?i:0))>(null!==(r=e.width)&&void 0!==r?r:0)/2-w)){let a=w*w*(1-c*c/(x*x));0!=a&&(a=Math.sqrt(Math.abs(a))),a=w-a,t.x-(null!==(o=e.x)&&void 0!==o?o:0)>0&&(a=-a),s.x+=a}return s},s}async function t5(t,e){let a;let{labelStyles:l,nodeStyles:n}=K(e);e.labelStyle=l;let{shapeSvg:i,bbox:r}=await h(t,e,y(e)),o=r.width+e.padding,s=r.height+e.padding,c=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}],{cssStyles:g}=e;
1if("handDrawn"===e.look){let t=d.A.svg(i),l=C(e,{}),n=f(c),r=t.path(n,l);a=i.insert(()=>r,":first-child").attr("transform","translate(".concat(-o/2,", ").concat(s/2,")")),g&&a.attr("style",g)}else a=X(i,o,s,c);return n&&a.attr("style",n),e.width=o,e.height=s,u(e,a),e.intersect=function(t){return q.polygon(e,c,t)},i}async function t3(t,e){var a,l,n,i;let{labelStyles:r,nodeStyles:o}=K(e);e.labelStyle=r;let{shapeSvg:s,bbox:c}=await h(t,e,y(e)),g=Math.max(60,c.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),p=Math.max(20,c.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),{cssStyles:m}=e,x=d.A.svg(s),w=C(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let v=[{x:-g/2*.8,y:-p/2},{x:g/2*.8,y:-p/2},{x:g/2,y:-p/2*.6},{x:g/2,y:p/2},{x:-g/2,y:p/2},{x:-g/2,y:-p/2*.6}],b=f(v),k=x.path(b,w),S=s.insert(()=>k,":first-child");return S.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",m),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),u(e,S),e.intersect=function(t){return q.polygon(e,v,t)},s}async function t8(t,e){var a,l,n,i,r;let{labelStyles:o,nodeStyles:c}=K(e);e.labelStyle=o;let{shapeSvg:g,bbox:p,label:m}=await h(t,e,y(e)),x=(0,s._3)(null===(a=(0,s.D7)().flowchart)||void 0===a?void 0:a.htmlLabels),w=p.width+(null!==(l=e.padding)&&void 0!==l?l:0),v=w+p.height,b=w+p.height,k=[{x:0,y:0},{x:b,y:0},{x:b/2,y:-v}],{cssStyles:S}=e,M=d.A.svg(g),D=C(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let A=f(k),B=M.path(A,D),N=g.insert(()=>B,":first-child").attr("transform","translate(".concat(-v/2,", ").concat(v/2,")"));return S&&"handDrawn"!==e.look&&N.selectChildren("path").attr("style",S),c&&"handDrawn"!==e.look&&N.selectChildren("path").attr("style",c),e.width=w,e.height=v,u(e,N),m.attr("transform","translate(".concat(-p.width/2-(p.x-(null!==(n=p.left)&&void 0!==n?n:0)),", ").concat(v/2-(p.height+(null!==(i=e.padding)&&void 0!==i?i:0)/(x?2:1)-(p.y-(null!==(r=p.top)&&void 0!==r?r:0))),")")),e.intersect=function(t){return s.Rm.info("Triangle intersect",e,k,t),q.polygon(e,k,t)},g}async function t4(t,e){var a,l,n,i,r,o,s,c;let{labelStyles:g,nodeStyles:m}=K(e);e.labelStyle=g;let{shapeSvg:x,bbox:w,label:v}=await h(t,e,y(e)),b=Math.max(w.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),k=Math.max(w.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),S=k/8,M=k+S,{cssStyles:D}=e,A=70-b,B=A>0?A/2:0,N=d.A.svg(x),L=C(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");let R=[{x:-b/2-B,y:M/2},...p(-b/2-B,M/2,b/2+B,M/2,S,.8),{x:b/2+B,y:-M/2},{x:-b/2-B,y:-M/2}],P=f(R),I=N.path(P,L),T=x.insert(()=>I,":first-child");return T.attr("class","basic label-container"),D&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",D),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),T.attr("transform","translate(0,".concat(-S/2,")")),v.attr("transform","translate(".concat(-b/2+(null!==(r=e.padding)&&void 0!==r?r:0)-(w.x-(null!==(o=w.left)&&void 0!==o?o:0)),",").concat(-k/2+(null!==(s=e.padding)&&void 0!==s?s:0)-S-(w.y-(null!==(c=w.top)&&void 0!==c?c:0)),")")),u(e,T),e.intersect=function(t){return q.polygon(e,R,t)},x}async function t7(t,e){var a,l,n,i;let{labelStyles:r,nodeStyles:o}=K(e);e.labelStyle=r;let{shapeSvg:s,bbox:c}=await h(t,e,y(e)),g=Math.max(c.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),m=Math.max(c.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.height)&&void 0!==i?i:0),x=g/m,w=g,v=m;w>v*x?v=w/x:w=v*x,w=Math.max(w,100);let b=Math.min(.2*(v=Math.max(v,50)),v/4),k=v+2*b,{cssStyles:S}=e,M=d.A.svg(s),D=C(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let A=[{x:-w/2,y:k/2},...p(-w/2,k/2,w/2,k/2,b,1),{x:w/2,y:-k/2},...p(w/2,-k/2,-w/2,-k/2,b,-1)],B=f(A),N=M.path(B,D),L=s.insert(()=>N,":first-child");return L.attr("class","basic label-container"),S&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",S),o&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",o),u(e,L),e.intersect=function(t){return q.polygon(e,A,t)},s}async function t9(t,e){var a,l,n,i,r,o;let{labelStyles:s,nodeStyles:c}=K(e);e.labelStyle=s;let{shapeSvg:g,bbox:f,label:p}=await h(t,e,y(e)),m=Math.max(f.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),x=Math.max(f.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(i=null==e?void 0:e.he
1ight)&&void 0!==i?i:0),w=-m/2,v=-x/2,{cssStyles:b}=e,k=d.A.svg(g),S=C(e,{}),M=[{x:w-5,y:v-5},{x:w-5,y:v+x},{x:w+m,y:v+x},{x:w+m,y:v-5}],D="M".concat(w-5,",").concat(v-5," L").concat(w+m,",").concat(v-5," L").concat(w+m,",").concat(v+x," L").concat(w-5,",").concat(v+x," L").concat(w-5,",").concat(v-5,"\n M").concat(w-5,",").concat(v," L").concat(w+m,",").concat(v,"\n M").concat(w,",").concat(v-5," L").concat(w,",").concat(v+x);"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let A=k.path(D,S),B=g.insert(()=>A,":first-child");return B.attr("transform","translate(".concat(2.5,", ").concat(2.5,")")),B.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",b),c&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",c),p.attr("transform","translate(".concat(-(f.width/2)+2.5-(f.x-(null!==(r=f.left)&&void 0!==r?r:0)),", ").concat(-(f.height/2)+2.5-(f.y-(null!==(o=f.top)&&void 0!==o?o:0)),")")),u(e,B),e.intersect=function(t){return q.polygon(e,M,t)},g}async function t6(t,e){var a,l,n,i,r,h;if(e.alias&&(e.label=e.alias),"handDrawn"===e.look){let{themeVariables:a}=(0,s.zj)(),{background:l}=a,n={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none","fill: ".concat(l)]};await t6(t,n)}let g=(0,s.zj)();e.useHtmlLabels=g.htmlLabels;let f=null!==(n=null===(a=g.er)||void 0===a?void 0:a.diagramPadding)&&void 0!==n?n:10,p=null!==(i=null===(l=g.er)||void 0===l?void 0:l.entityPadding)&&void 0!==i?i:6,{cssStyles:m}=e,{labelStyles:x}=K(e);if(0===e.attributes.length&&e.label){let a={rx:0,ry:0,labelPaddingX:f,labelPaddingY:1.5*f,classes:""};(0,o.Un)(e.label,g)+2*a.labelPaddingX<g.er.minEntityWidth&&(e.width=g.er.minEntityWidth);let l=await tM(t,e,a);if(!(0,s._3)(g.htmlLabels)){let t=l.select("text"),e=null===(r=t.node())||void 0===r?void 0:r.getBBox();t.attr("transform","translate(".concat(-e.width/2,", 0)"))}return l}g.htmlLabels||(f*=1.25,p*=1.25);let w=y(e);w||(w="node default");let v=t.insert("g").attr("class",w).attr("id",e.domId||e.id),b=await et(v,null!==(h=e.label)&&void 0!==h?h:"",g,0,0,["name"],x);b.height+=p;let k=0,S=[],M=0,D=0,A=0,B=0,N=!0,L=!0;for(let t of e.attributes){let e=await et(v,t.type,g,0,k,["attribute-type"],x);M=Math.max(M,e.width+f);let a=await et(v,t.name,g,0,k,["attribute-name"],x);D=Math.max(D,a.width+f);let l=await et(v,t.keys.join(),g,0,k,["attribute-keys"],x);A=Math.max(A,l.width+f);let n=await et(v,t.comment,g,0,k,["attribute-comment"],x);B=Math.max(B,n.width+f),k+=Math.max(e.height,a.height,l.height,n.height)+p,S.push(k)}S.pop();let R=4;A<=f&&(N=!1,A=0,R--),B<=f&&(L=!1,B=0,R--);let P=v.node().getBBox();if(b.width+2*f-(M+D+A+B)>0){let t=b.width+2*f-(M+D+A+B);M+=t/R,D+=t/R,A>0&&(A+=t/R),B>0&&(B+=t/R)}let I=M+D+A+B,T=d.A.svg(v),j=C(e,{});"handDrawn"!==e.look&&(j.roughness=0,j.fillStyle="solid");let W=Math.max(P.width+2*f,(null==e?void 0:e.width)||0,I),_=Math.max(P.height+(S[0]||k)+p,(null==e?void 0:e.height)||0),E=-W/2,H=-_/2;v.selectAll("g:not(:first-child)").each((t,e,a)=>{let l=(0,c.Ltv)(a[e]),n=l.attr("transform"),i=0,r=0;if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(i=parseFloat(t[1]),r=parseFloat(t[2]),l.attr("class").includes("attribute-name")?i+=M:l.attr("class").includes("attribute-keys")?i+=M+D:l.attr("class").includes("attribute-comment")&&(i+=M+D+A))}l.attr("transform","translate(".concat(E+f/2+i,", ").concat(r+H+b.height+p/2,")"))}),v.select(".name").attr("transform","translate("+-b.width/2+", "+(H+p/2)+")");let z=T.rectangle(E,H,W,_,j),O=v.insert(()=>z,":first-child").attr("style",m.join("")),{themeVariables:F}=(0,s.zj)(),{rowEven:Z,rowOdd:X,nodeBorder:Y}=F;for(let[t,e]of(S.push(0),S.entries())){if(0===t&&S.length>1)continue;let a=t%2==0&&0!==e,l=T.rectangle(E,b.height+H+e,W,b.height,{...j,fill:a?Z:X,stroke:Y});v.insert(()=>l,"g.label").attr("style",m.join("")).attr("class","row-rect-".concat(t%2==0?"even":"odd"))}let U=T.line(E,b.height+H,W+E,b.height+H,j);for(let t of(v.insert(()=>U).attr("class","divider"),U=T.line(M+E,b.height+H,M+E,_+H,j),v.insert(()=>U).attr("class","divider"),N&&(U=T.line(M+D+E,b.height+H,M+D+E,_+H,j),v.insert(()=>U).attr("class","divider")),L&&(U=T.line(M+D+A+E,b.height+H,M+D+A+E,_+H,j),v.insert(()=>U).attr("class","divider")),S))U=T.line(E,b.height+H+t,W+E,b.height+H+t,j),v.insert(()=>U).attr("class","divider");return u(e,O),e.intersect=function(t){return q.rect(e,t)},v}async function et(t,e,a){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],d=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",h=t.insert("g").attr("class","label ".concat(i.join(" "))).attr("transform","translate(".concat(l,", ").concat(n,")")).attr("style",d);e!==(0,s.QO)(e)&&(e=(e=(0,s.QO)(e)).replaceAll("<","<").replaceAll(">",">"));let g=h.node().appendChild(await (0,r.GZ)(h,e,{width:(0,o.Un)(e,a)+100,style:d,useHtmlLabels:a.htmlLabels},a));if(e.includes("<")||e.includes(">")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let u=g.getBBox();
1if((0,s._3)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,c.Ltv)(g);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}return u}async function ee(t,e,a,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null!==(l=a.class.padding)&&void 0!==l?l:12,r=3*!n,o=t.insert("g").attr("class",y(e)).attr("id",e.domId||e.id),s=null,c=null,d=null,h=null,g=0,u=0,f=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await ea(s,{text:"\xab".concat(t,"\xbb")},0),g=s.node().getBBox().height}c=o.insert("g").attr("class","label-group text"),await ea(c,e,0,["font-weight: bolder"]);let p=c.node().getBBox();u=p.height,d=o.insert("g").attr("class","members-group text");let m=0;for(let t of e.members){let e=await ea(d,t,m,[t.parseClassifier()]);m+=e+r}(f=d.node().getBBox().height)<=0&&(f=i/2),h=o.insert("g").attr("class","methods-group text");let x=0;for(let t of e.methods){let e=await ea(h,t,x,[t.parseClassifier()]);x+=e+r}let w=o.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform","translate(".concat(-t.width/2,")"))}return c.attr("transform","translate(".concat(-p.width/2,", ").concat(g,")")),w=o.node().getBBox(),d.attr("transform","translate(".concat(0,", ").concat(g+u+2*i,")")),w=o.node().getBBox(),h.attr("transform","translate(".concat(0,", ").concat(g+u+(f?f+4*i:2*i),")")),w=o.node().getBBox(),{shapeSvg:o,bbox:w}}async function ea(t,e,a){var l;let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],d=t.insert("g").attr("class","label").attr("style",i.join("; ")),h=(0,s.zj)(),g="useHtmlLabels"in e?e.useHtmlLabels:null===(l=(0,s._3)(h.htmlLabels))||void 0===l||l,u="";u="text"in e?e.text:e.label,!g&&u.startsWith("\\")&&(u=u.substring(1)),(0,s.Wi)(u)&&(g=!0);let y=await (0,r.GZ)(d,(0,s.oB)((0,o.Sm)(u)),{width:(0,o.Un)(u,h)+50,classes:"markdown-node-label",useHtmlLabels:g},h),f=1;if(g){let t=y.children[0],e=(0,c.Ltv)(y);f=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(f+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===u.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){var l,n;let t=5*parseInt(null!==(n=null===(l=h.fontSize)||void 0===l?void 0:l.toString())&&void 0!==n?n:window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,s.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}else{i.includes("font-weight: bolder")&&(0,c.Ltv)(y).selectAll("tspan").attr("font-weight",""),f=y.children.length;let t=y.children[0];(""===y.textContent||y.textContent.includes(">"))&&(t.textContent=u[0]+u.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===u[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),n=y.getBBox()}return d.attr("transform","translate(0,"+(-n.height/(2*f)+a)+")"),n.height}async function el(t,e){var a,l,n,i,r,o,h,g;let y=(0,s.D7)(),f=null!==(n=y.class.padding)&&void 0!==n?n:12,p=null===(r=null!==(i=e.useHtmlLabels)&&void 0!==i?i:(0,s._3)(y.htmlLabels))||void 0===r||r;e.annotations=null!==(o=e.annotations)&&void 0!==o?o:[],e.members=null!==(h=e.members)&&void 0!==h?h:[],e.methods=null!==(g=e.methods)&&void 0!==g?g:[];let{shapeSvg:m,bbox:x}=await ee(t,e,y,p,f),{labelStyles:w,nodeStyles:v}=K(e);e.labelStyle=w,e.cssStyles=e.styles||"";let b=(null===(a=e.styles)||void 0===a?void 0:a.join(";"))||v||"";e.cssStyles||(e.cssStyles=b.replaceAll("!important","").split(";"));let k=0===e.members.length&&0===e.methods.length&&!(null===(l=y.class)||void 0===l?void 0:l.hideEmptyMembersBox),S=d.A.svg(m),M=C(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let D=x.width,A=x.height;0===e.members.length&&0===e.methods.length?A+=f:e.members.length>0&&0===e.methods.length&&(A+=2*f);let B=-D/2,N=-A/2,L=S.rectangle(B-f,N-f-(k?f:0===e.members.length&&0===e.methods.length?-f/2:0),D+2*f,A+2*f+(k?2*f:0===e.members.length&&0===e.methods.length?-f:0),M),R=m.insert(()=>L,":first-child");R.attr("class","basic label-container");let P=R.node().getBBox();m.selectAll(".text").each((t,a,l)=>{let n=(0,c.Ltv)(l[a]),i=n.attr("transform"),r=0;
1if(i){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(r=parseFloat(t[2]))}let o=r+N+f-(k?f:0===e.members.length&&0===e.methods.length?-f/2:0);p||(o-=4);let s=B;if(n.attr("class").includes("label-group")||n.attr("class").includes("annotation-group")){var d;s=-(null===(d=n.node())||void 0===d?void 0:d.getBBox().width)/2||0,m.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(s=0)})}n.attr("transform","translate(".concat(s,", ").concat(o,")"))});let I=m.select(".annotation-group").node().getBBox().height-(k?f/2:0)||0,T=m.select(".label-group").node().getBBox().height-(k?f/2:0)||0,j=m.select(".members-group").node().getBBox().height-(k?f/2:0)||0;if(e.members.length>0||e.methods.length>0||k){let t=S.line(P.x,I+T+N+f,P.x+P.width,I+T+N+f,M);m.insert(()=>t).attr("class","divider").attr("style",b)}if(k||e.members.length>0||e.methods.length>0){let t=S.line(P.x,I+T+j+N+2*f+f,P.x+P.width,I+T+j+N+f+2*f,M);m.insert(()=>t).attr("class","divider").attr("style",b)}if("handDrawn"!==e.look&&m.selectAll("path").attr("style",b),R.select(":nth-child(2)").attr("style",b),m.selectAll(".divider").select("path").attr("style",b),e.labelStyle?m.selectAll("span").attr("style",e.labelStyle):m.selectAll("span").attr("style",b),!p){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(b);if(e){let t=e[0].replace("color","fill");m.selectAll("tspan").attr("style",t)}else if(w){let e=t.exec(w);if(e){let t=e[0].replace("color","fill");m.selectAll("tspan").attr("style",t)}}}return u(e,R),e.intersect=function(t){return q.rect(e,t)},m}async function en(t,e){var a,l,n,i,r;let o;let{labelStyles:s,nodeStyles:h}=K(e);e.labelStyle=s;let g="verifyMethod"in e,f=y(e),p=t.insert("g").attr("class",f).attr("id",null!==(n=e.domId)&&void 0!==n?n:e.id),m=o=g?await ei(p,"<<".concat(e.type,">>"),0,e.labelStyle):await ei(p,"<<Element>>",0,e.labelStyle),x=await ei(p,e.name,m,e.labelStyle+"; font-weight: bold;");if(m+=x+20,g){let t=await ei(p,"".concat(e.requirementId?"Id: ".concat(e.requirementId):""),m,e.labelStyle);m+=t;let a=await ei(p,"".concat(e.text?"Text: ".concat(e.text):""),m,e.labelStyle);m+=a;let l=await ei(p,"".concat(e.risk?"Risk: ".concat(e.risk):""),m,e.labelStyle);m+=l,await ei(p,"".concat(e.verifyMethod?"Verification: ".concat(e.verifyMethod):""),m,e.labelStyle)}else{let t=await ei(p,"".concat(e.type?"Type: ".concat(e.type):""),m,e.labelStyle);m+=t,await ei(p,"".concat(e.docRef?"Doc Ref: ".concat(e.docRef):""),m,e.labelStyle)}let w=(null!==(i=null===(a=p.node())||void 0===a?void 0:a.getBBox().width)&&void 0!==i?i:200)+20,v=(null!==(r=null===(l=p.node())||void 0===l?void 0:l.getBBox().height)&&void 0!==r?r:200)+20,b=-w/2,k=-v/2,S=d.A.svg(p),M=C(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let D=S.rectangle(b,k,w,v,M),A=p.insert(()=>D,":first-child");if(A.attr("class","basic label-container").attr("style",h),p.selectAll(".label").each((t,e,a)=>{let l=(0,c.Ltv)(a[e]),n=l.attr("transform"),i=0,r=0;if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(i=parseFloat(t[1]),r=parseFloat(t[2]))}let o=r-v/2,s=b+10;(0===e||1===e)&&(s=i),l.attr("transform","translate(".concat(s,", ").concat(o+20,")"))}),m>o+x+20){let t=S.line(b,k+o+x+20,b+w,k+o+x+20,M);p.insert(()=>t).attr("style",h)}return u(e,A),e.intersect=function(t){return q.rect(e,t)},p}async function ei(t,e,a){var l;let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(""===e)return 0;let d=t.insert("g").attr("class","label").attr("style",i),h=(0,s.D7)(),g=null===(l=h.htmlLabels)||void 0===l||l,u=await (0,r.GZ)(d,(0,s.oB)((0,o.Sm)(e)),{width:(0,o.Un)(e,h)+50,classes:"markdown-node-label",useHtmlLabels:g,style:i},h);if(g){let t=u.children[0],e=(0,c.Ltv)(u);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}else{for(let t of u.children[0].children)t.textContent=t.textContent.replaceAll(">",">").replaceAll("<","<"),i&&t.setAttribute("style",i);n=u.getBBox(),n.height+=6}return d.attr("transform","translate(".concat(-n.width/2,",").concat(-n.height/2+a,")")),n.height}(0,s.K2)(t1,"tiltedCylinder"),(0,s.K2)(t5,"trapezoid"),(0,s.K2)(t3,"trapezoidalPentagon"),(0,s.K2)(t8,"triangle"),(0,s.K2)(t4,"waveEdgedRectangle"),(0,s.K2)(t7,"waveRectangle"),(0,s.K2)(t9,"windowPane"),(0,s.K2)(t6,"erBox"),(0,s.K2)(et,"addText"),(0,s.K2)(ee,"textHelper"),(0,s.K2)(ea,"addText"),(0,s.K2)(el,"classBox"),(0,s.K2)(en,"requirementBox"),(0,s.K2)(ei,"addText");var er=(0,s.K2)(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 eo(t,e,a){var l,n,i;let r,o,s,c,{config:f}=a,{labelStyles:p,nodeStyles:m}=K(e);e.labelStyle=p||"";let x=e.width;e.width=(null!==(n=e.width)&&void 0!==n?n:200)-10;let{shapeSvg:w,bbox:v,label:b}=await h(t,e,y(e)),S=e.padding||10,M="";"ticket"in e&&e.ticket&&(null==f?void 0:null===(l=f.kanban)||void 0===l?void 0:l.ticketBaseUrl)&&(M=null==f?void 0:null===(i=f.kanban)||void 0===i?void 0:i.ticketBaseUrl.replace("#TICKET#",e.ticket),r=w.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",M).attr("target","_blank"));let D={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};r?{label:o,bbox:s}=await g(r,"ticket"in e&&e.ticket||"",D):{label:o,bbox:s}=await g(w,"ticket"in e&&e.ticket||"",D);let{label:A,bbox:B}=await g(w,"assigned"in e&&e.assigned||"",D);e.width=x;let N=(null==e?void 0:e.width)||0,L=Math.max(s.height,B.height)/2,R=Math.max(v.height+20,(null==e?void 0:e.he
1ight)||0)+L,P=-N/2,I=-R/2;b.attr("transform","translate("+(S-N/2)+", "+(-L-v.height/2)+")"),o.attr("transform","translate("+(S-N/2)+", "+(-L+v.height/2)+")"),A.attr("transform","translate("+(S+N/2-B.width-20)+", "+(-L+v.height/2)+")");let{rx:T,ry:j}=e,{cssStyles:W}=e;if("handDrawn"===e.look){let t=d.A.svg(w),a=C(e,{}),l=T||j?t.path(k(P,I,N,R,T||0),a):t.rectangle(P,I,N,R,a);(c=w.insert(()=>l,":first-child")).attr("class","basic label-container").attr("style",W||null)}else{(c=w.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",m).attr("rx",null!=T?T:5).attr("ry",null!=j?j:5).attr("x",P).attr("y",I).attr("width",N).attr("height",R);let t="priority"in e&&e.priority;if(t){let e=w.append("line"),a=P+2,l=I+Math.floor((null!=T?T:0)/2),n=I+R-Math.floor((null!=T?T:0)/2);e.attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",n).attr("stroke-width","4").attr("stroke",er(t))}}return u(e,c),e.height=R,e.intersect=function(t){return q.rect(e,t)},w}(0,s.K2)(eo,"kanbanItem");var es=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tF},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tz},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tZ},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tG},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ts},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:G}
1,{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:t_},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:tp},{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:tA},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:t5},{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:tS},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:td},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tQ}
1,{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Y},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tq},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:tU},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tY},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:tu},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:$},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:te},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:tl},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:tC}
1,{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:t4},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ty},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:t1},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tR},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tn},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tc},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:t8},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t9},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:th},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:t3},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tO},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tT},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tI},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Z},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:J},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tJ},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tV},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t7},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tE},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tP}],ec=(0,s.K2)(()=>Object.fromEntries([...Object.entries({state:tX,choice:U,note:tj,rectWithTitle:tH,labelRect:tD,iconSquare:tb,iconCircle:tw,icon:tx,iconRounded:tv,imageSquare:tk,anchor:O,kanbanItem:eo,classBox:el,erBox:t6,requirementBox:en}),...es.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function ed(t){return t in ec}(0,s.K2)(ed,"isValidShape");var eh=new Map;async function eg(t,e,a){let l,n;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let i=e.shape?ec[e.shape]:void 0;if(!i)throw Error("No such shape: ".concat(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",null!=r?r:null),n=await i(l,e,a)}else l=n=await i(t,e,a);return e.tooltip&&n.attr("title",e.tooltip),eh.set(e.id,l),e.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}
1(0,s.K2)(eg,"insertNode");var eu=(0,s.K2)((t,e)=>{eh.set(e.id,t)},"setNodeElem"),ey=(0,s.K2)(()=>{eh.clear()},"clear"),ef=(0,s.K2)(t=>{let e=eh.get(t.id);s.Rm.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")}}]);
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.