@axiom-lattice/gateway 10.3.0 → 10.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embed/embed-page-AgentDetailSideApp-HQMDIT7S.js +1 -0
- package/dist/embed/embed-page-AgentGovernanceWorkbench-T26AS6KD.js +1 -0
- package/dist/embed/{embed-page-LangfuseDashboard-C5ZHCYOD.js → embed-page-LangfuseDashboard-WU5WJUBH.js} +1 -1
- package/dist/embed/embed-page-MessageGraph-AB5JL57B.js +6 -0
- package/dist/embed/embed-page-ReactChart-OFCUVHIA.js +1 -0
- package/dist/embed/{embed-page-SkillFlow-4WN6SBBR.js → embed-page-SkillFlow-3Z4KXWBR.js} +1 -1
- package/dist/embed/{embed-page-TasksSideApp-JWXHAGJ3.js → embed-page-TasksSideApp-5J5KPJGJ.js} +1 -1
- package/dist/embed/{embed-page-ThreadMaintenancePanel-BIPYRPG7.js → embed-page-ThreadMaintenancePanel-TOPARLQN.js} +1 -1
- package/dist/embed/{embed-page-TopologyRuntimeView-FPLRJ3NO.js → embed-page-TopologyRuntimeView-DNYSW2GN.js} +1 -1
- package/dist/embed/{embed-page-WorkflowAutomationView-5Z5LIL2H.js → embed-page-WorkflowAutomationView-3CGPGS7D.js} +1 -1
- package/dist/embed/{embed-page-abnfDiagram-N423BO3Z-G35TGDL3.js → embed-page-abnfDiagram-N423BO3Z-4HBLZWO7.js} +1 -1
- package/dist/embed/{embed-page-architectureDiagram-T3A2C74G-3BPO7RRI.js → embed-page-architectureDiagram-T3A2C74G-ZMH2RUZR.js} +1 -1
- package/dist/embed/{embed-page-blockDiagram-VBNYF7ZC-4IOAZLE3.js → embed-page-blockDiagram-VBNYF7ZC-DOS6CKB7.js} +1 -1
- package/dist/embed/{embed-page-c4Diagram-5PPSVZJV-7FVWUUL4.js → embed-page-c4Diagram-5PPSVZJV-GCQQWQJ4.js} +1 -1
- package/dist/embed/{embed-page-chunk-2EHKMAOV.js → embed-page-chunk-4T3AWQQQ.js} +1 -1
- package/dist/embed/{embed-page-chunk-YJQVMCUN.js → embed-page-chunk-5UOSSN26.js} +1 -1
- package/dist/embed/{embed-page-chunk-Z4KLLEUH.js → embed-page-chunk-5ZRWN6T7.js} +1 -1
- package/dist/embed/{embed-page-chunk-D4ICPD5X.js → embed-page-chunk-7IPWMDQ3.js} +1 -1
- package/dist/embed/embed-page-chunk-CWVHIM56.js +69 -0
- package/dist/embed/embed-page-chunk-DLSQ2OWQ.js +1 -0
- package/dist/embed/{embed-page-chunk-3MT44IAN.js → embed-page-chunk-FPA5BD6K.js} +1 -1
- package/dist/embed/{embed-page-chunk-KOCOGP7G.js → embed-page-chunk-GA5A7NLC.js} +1 -1
- package/dist/embed/{embed-page-chunk-OJORJR7X.js → embed-page-chunk-GMLPPJZP.js} +1 -1
- package/dist/embed/{embed-page-chunk-X2ALKNHQ.js → embed-page-chunk-GXHZDCWF.js} +1 -1
- package/dist/embed/{embed-page-chunk-DVOV6TZI.js → embed-page-chunk-I7EMCZI6.js} +1 -1
- package/dist/embed/{embed-page-chunk-EZBBN23V.js → embed-page-chunk-JRGR5W3C.js} +1 -1
- package/dist/embed/{embed-page-chunk-JRORGMGI.js → embed-page-chunk-KJTJI54Q.js} +150 -150
- package/dist/embed/{embed-page-chunk-IK542MPZ.js → embed-page-chunk-ME637LUU.js} +1 -1
- package/dist/embed/{embed-page-chunk-I7ESIG2O.js → embed-page-chunk-MM3IA4HE.js} +1 -1
- package/dist/embed/{embed-page-chunk-B4EAWKYT.js → embed-page-chunk-N2Y3D6YG.js} +1 -1
- package/dist/embed/{embed-page-chunk-YUWPQRVF.js → embed-page-chunk-NY2J2ZAX.js} +1 -1
- package/dist/embed/{embed-page-chunk-XWR7WUUN.js → embed-page-chunk-RPGUOUD3.js} +1 -1
- package/dist/embed/{embed-page-chunk-NUKT6SH3.js → embed-page-chunk-S2XGVDY7.js} +1 -1
- package/dist/embed/{embed-page-chunk-EP6TRRST.js → embed-page-chunk-T2GL7G2Z.js} +1 -1
- package/dist/embed/{embed-page-chunk-BL44I3VR.js → embed-page-chunk-U3XF7MHJ.js} +6 -6
- package/dist/embed/{embed-page-chunk-7E2Z7TAR.js → embed-page-chunk-U6PURUXV.js} +1 -1
- package/dist/embed/{embed-page-chunk-LKNA7XLR.js → embed-page-chunk-UAXOXJ4N.js} +1 -1
- package/dist/embed/{embed-page-chunk-CV2LFQZA.js → embed-page-chunk-UWC5QL3B.js} +1 -1
- package/dist/embed/{embed-page-chunk-CJYKMTD7.js → embed-page-chunk-V3HPWIF4.js} +1 -1
- package/dist/embed/{embed-page-chunk-JAHIW5IQ.js → embed-page-chunk-W4W6GR5T.js} +1 -1
- package/dist/embed/{embed-page-chunk-JAMKPUN7.js → embed-page-chunk-X2TOGOMH.js} +1 -1
- package/dist/embed/{embed-page-chunk-UVNC53TL.js → embed-page-chunk-YGBGMNRQ.js} +1 -1
- package/dist/embed/embed-page-classDiagram-JCYQIIEL-QS7YU54N.js +1 -0
- package/dist/embed/embed-page-classDiagram-v2-OCEON4UE-EMQVQCCM.js +1 -0
- package/dist/embed/{embed-page-cynefinDiagram-MW4NZA55-3QBH5TCJ.js → embed-page-cynefinDiagram-MW4NZA55-PAQOPJV2.js} +1 -1
- package/dist/embed/{embed-page-dagre-VZM6K2ZE-JB3F5OD3.js → embed-page-dagre-VZM6K2ZE-35URH6ZO.js} +1 -1
- package/dist/embed/{embed-page-diagram-7IWD3JNH-33KTKPAG.js → embed-page-diagram-7IWD3JNH-CYEWFX2M.js} +1 -1
- package/dist/embed/{embed-page-diagram-B4RE2ZJO-HURI4UTY.js → embed-page-diagram-B4RE2ZJO-YQLA7HKI.js} +1 -1
- package/dist/embed/{embed-page-diagram-LBJQPF4R-XDFU7A3K.js → embed-page-diagram-LBJQPF4R-R5X23WLT.js} +1 -1
- package/dist/embed/{embed-page-diagram-Q27KOJAE-WCF3Y7MH.js → embed-page-diagram-Q27KOJAE-CSOUXGQI.js} +1 -1
- package/dist/embed/{embed-page-diagram-UB23O5K3-A4XJCZZ2.js → embed-page-diagram-UB23O5K3-ZYKI7DKR.js} +1 -1
- package/dist/embed/{embed-page-ebnfDiagram-BXEA7PRR-XZ65TQZ5.js → embed-page-ebnfDiagram-BXEA7PRR-AXHHSO6J.js} +1 -1
- package/dist/embed/embed-page-echarts-AD736F33.js +1 -0
- package/dist/embed/{embed-page-erDiagram-JOGREHBK-HAMRJORU.js → embed-page-erDiagram-JOGREHBK-TIWNY54V.js} +1 -1
- package/dist/embed/embed-page-flowDiagram-UKHOOZJN-YZBV5FD5.js +1 -0
- package/dist/embed/{embed-page-ganttDiagram-PKOTCBZU-K5INERM6.js → embed-page-ganttDiagram-PKOTCBZU-LQ65QV2D.js} +1 -1
- package/dist/embed/{embed-page-gitGraphDiagram-DS77QQ5N-GZ5MSQH3.js → embed-page-gitGraphDiagram-DS77QQ5N-JXOCEBS4.js} +1 -1
- package/dist/embed/{embed-page-infoDiagram-6WML65LV-U6G3NNSP.js → embed-page-infoDiagram-6WML65LV-JXXYLFOE.js} +1 -1
- package/dist/embed/{embed-page-ishikawaDiagram-WSZJBQD7-EYGGRQN3.js → embed-page-ishikawaDiagram-WSZJBQD7-AXPRA54P.js} +1 -1
- package/dist/embed/{embed-page-journeyDiagram-NVQOT4AX-XS4LDJC3.js → embed-page-journeyDiagram-NVQOT4AX-FLTEDSGP.js} +1 -1
- package/dist/embed/{embed-page-jspdf.es.min-XOYWIBVE.js → embed-page-jspdf.es.min-Y4RIBUHC.js} +17 -17
- package/dist/embed/{embed-page-kanban-definition-27J2QSJJ-FW7UGXYI.js → embed-page-kanban-definition-27J2QSJJ-GLES277J.js} +1 -1
- package/dist/embed/embed-page-katex-JBKN2BFH.js +257 -0
- package/dist/embed/{embed-page-mermaid-AQNL2ZVI.js → embed-page-mermaid-TRGRXQWI.js} +2 -2
- package/dist/embed/embed-page-mindmap-definition-FAOFIHXS-IK7SJKOY.js +96 -0
- package/dist/embed/{embed-page-pegDiagram-VL7TDLO6-KNUT3CIR.js → embed-page-pegDiagram-VL7TDLO6-WTW3QO5Z.js} +1 -1
- package/dist/embed/{embed-page-pieDiagram-7S7Q4E2Y-NA5D6ASE.js → embed-page-pieDiagram-7S7Q4E2Y-IO7RF3AF.js} +1 -1
- package/dist/embed/{embed-page-quadrantDiagram-CIZ2JOQS-ZP6CLE62.js → embed-page-quadrantDiagram-CIZ2JOQS-77SBD3YG.js} +1 -1
- package/dist/embed/{embed-page-railroadDiagram-AXF67PYL-2IW2UZXA.js → embed-page-railroadDiagram-AXF67PYL-OW3L5JI4.js} +1 -1
- package/dist/embed/{embed-page-requirementDiagram-LRYGKXZP-CXPDAY5Y.js → embed-page-requirementDiagram-LRYGKXZP-APMTCGOA.js} +1 -1
- package/dist/embed/{embed-page-sankeyDiagram-W5VNT64P-F2LGR2H3.js → embed-page-sankeyDiagram-W5VNT64P-FZX3QVUX.js} +1 -1
- package/dist/embed/{embed-page-sequenceDiagram-SI44F4Z6-GJMWRLXS.js → embed-page-sequenceDiagram-SI44F4Z6-HGLMDT4H.js} +1 -1
- package/dist/embed/{embed-page-stateDiagram-OKZ733FA-2C3LJEVN.js → embed-page-stateDiagram-OKZ733FA-DYGG6K57.js} +1 -1
- package/dist/embed/embed-page-stateDiagram-v2-UEYNNEHI-BZIFN7WW.js +1 -0
- package/dist/embed/{embed-page-swimlanes-SLNWSIFB-FVZEOHUB.js → embed-page-swimlanes-SLNWSIFB-OKHSRANK.js} +1 -1
- package/dist/embed/embed-page-swimlanesDiagram-ULZ7WXOC-CTOAIWO4.js +8 -0
- package/dist/embed/{embed-page-timeline-definition-Z64GVDOM-G7N7WGUT.js → embed-page-timeline-definition-Z64GVDOM-F6LUVHOK.js} +1 -1
- package/dist/embed/{embed-page-vennDiagram-T6HMQDX7-F7T3NLBE.js → embed-page-vennDiagram-T6HMQDX7-QA2TWRL4.js} +1 -1
- package/dist/embed/{embed-page-wardleyDiagram-T6FBY63Y-KQ66EZSM.js → embed-page-wardleyDiagram-T6FBY63Y-DL57P2VA.js} +1 -1
- package/dist/embed/{embed-page-xychartDiagram-ELKLHX3M-22WT4PGT.js → embed-page-xychartDiagram-ELKLHX3M-V2Q7NF4U.js} +1 -1
- package/dist/embed/embed-page.js +1 -1
- package/dist/embed/mcp-app-page.js +2 -2
- package/dist/index.js +47 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -8
- package/dist/embed/embed-page-AgentDetailSideApp-7KV3SLDR.js +0 -1
- package/dist/embed/embed-page-AgentGovernanceWorkbench-SVXBIDD2.js +0 -1
- package/dist/embed/embed-page-MessageGraph-YU76I7TO.js +0 -6
- package/dist/embed/embed-page-ReactChart-KN2C7M65.js +0 -1
- package/dist/embed/embed-page-chunk-NXYALHX3.js +0 -69
- package/dist/embed/embed-page-classDiagram-JCYQIIEL-F3ZGV5RH.js +0 -1
- package/dist/embed/embed-page-classDiagram-v2-OCEON4UE-WK33F7MR.js +0 -1
- package/dist/embed/embed-page-echarts-EYVCOS2L.js +0 -1
- package/dist/embed/embed-page-flowDiagram-UKHOOZJN-FCTARXK6.js +0 -1
- package/dist/embed/embed-page-katex-W5DMKJAE.js +0 -257
- package/dist/embed/embed-page-mindmap-definition-FAOFIHXS-LS6BVRC5.js +0 -96
- package/dist/embed/embed-page-stateDiagram-v2-UEYNNEHI-QI633DEL.js +0 -1
- package/dist/embed/embed-page-swimlanesDiagram-ULZ7WXOC-7W6HH2PU.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Vt,b as Pt,d as T,e as W}from"./embed-page-chunk-IK542MPZ.js";import{a as Et,b as Zt}from"./embed-page-chunk-JAMKPUN7.js";import{a as k}from"./embed-page-chunk-7TH7FFVA.js";import{c as lt}from"./embed-page-chunk-DVOV6TZI.js";import{d as Mt}from"./embed-page-chunk-Z4KLLEUH.js";import{k as Dt,r as Bt,t as K}from"./embed-page-chunk-LKNA7XLR.js";import{G as It,I as Wt,J as zt,Z as Q,aa as Tt,n as pt,t as bt,x as it}from"./embed-page-chunk-3MT44IAN.js";import{b as z}from"./embed-page-chunk-2BOYLGSX.js";import{b as Z}from"./embed-page-chunk-S4XZPBRM.js";import{a as $}from"./embed-page-chunk-444E5YR2.js";var O=$(async(d,t,h)=>{let g,l=t.useHtmlLabels||pt(Q()?.htmlLabels);h?g=h:g="node default";let r=d.insert("g").attr("class",g).attr("id",t.domId||t.id),p=r.insert("g").attr("class","label").attr("style",K(t.labelStyle)),i;t.label===void 0?i="":i=typeof t.label=="string"?t.label:t.label[0];let n=!!t.icon||!!t.img,e=t.labelType==="markdown",s=await lt(p,It(Bt(i),Q()),{useHtmlLabels:l,width:t.width||Q().flowchart?.wrappingWidth,classes:e?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:e},Q()),a=s.getBBox(),o=(t?.padding??0)/2;if(l){let c=s.children[0],y=Z(s);await Zt(c,i),a=c.getBoundingClientRect(),y.attr("width",a.width),y.attr("height",a.height)}return l?p.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):p.attr("transform","translate(0, "+-a.height/2+")"),t.centerLabel&&p.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),p.insert("rect",":first-child"),{shapeSvg:r,bbox:a,halfPadding:o,label:p}},"labelHelper"),Xt=$(async(d,t,h)=>{let g=h.useHtmlLabels??it(Q()),l=d.insert("g").attr("class","label").attr("style",h.labelStyle||""),r=await lt(l,It(Bt(t),Q()),{useHtmlLabels:g,width:h.width||Q()?.flowchart?.wrappingWidth,style:h.labelStyle,addSvgBackground:!!h.icon||!!h.img}),p=r.getBBox(),i=h.padding/2;if(it(Q())){let n=r.children[0],e=Z(r);p=n.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return g?l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):l.attr("transform","translate(0, "+-p.height/2+")"),h.centerLabel&&l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:d,bbox:p,halfPadding:i,label:l}},"insertLabel"),X=$((d,t)=>{let h=t.node().getBBox();d.width=h.width,d.height=h.height},"updateNodeBounds"),_=$((d,t)=>(d.look==="handDrawn"?"rough-node":"node")+" "+d.cssClasses+" "+(t||""),"getNodeClasses");function F(d){let t=d.map((h,g)=>`${g===0?"M":"L"}${h.x},${h.y}`);return t.push("Z"),t.join(" ")}$(F,"createPathFromPoints");function ut(d,t,h,g,l,r){let p=[],n=h-d,e=g-t,s=n/r,a=2*Math.PI/s,o=t+e/2;for(let c=0;c<=50;c++){let y=c/50,f=d+y*n,m=o+l*Math.sin(a*(f-d));p.push({x:f,y:m})}return p}$(ut,"generateFullSineWavePoints");function Ct(d,t,h,g,l,r){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(g-1);for(let a=0;a<g;a++){let o=i+a*s,c=d+h*Math.cos(o),y=t+h*Math.sin(o);p.push({x:-c,y:-y})}return p}$(Ct,"generateCirclePoints");function _t(d){let t=Array.from(d.childNodes).filter(n=>n.tagName==="path"),h=document.createElementNS("http://www.w3.org/2000/svg","path"),g=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");h.setAttribute("d",g);let l=t.find(n=>n.getAttribute("fill")!=="none"),r=t.find(n=>n.getAttribute("stroke")!=="none"),p=$((n,e)=>n?.getAttribute(e)??void 0,"getAttr");if(l){let n={fill:p(l,"fill"),"fill-opacity":p(l,"fill-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&h.setAttribute(e,s)})}if(r){let n={stroke:p(r,"stroke"),"stroke-width":p(r,"stroke-width")??"1","stroke-opacity":p(r,"stroke-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&h.setAttribute(e,s)})}let i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(h),i}$(_t,"mergePaths");var Ma=$((d,t)=>{var h=d.x,g=d.y,l=t.x-h,r=t.y-g,p=d.width/2,i=d.height/2,n,e;return Math.abs(r)*p>Math.abs(l)*i?(r<0&&(i=-i),n=r===0?0:i*l/r,e=i):(l<0&&(p=-p),n=p,e=l===0?0:p*r/l),{x:h+n,y:g+e}},"intersectRect"),xt=Ma,Na=$(async(d,t,h,g=!1,l=!1)=>{let r=t||"";typeof r=="object"&&(r=r[0]);let p=Q(),i=it(p);return await lt(d,r,{style:h,isTitle:g,useHtmlLabels:i,markdown:!1,isNode:l,width:Number.POSITIVE_INFINITY},p)},"createLabel"),At=Na,dt=$((d,t,h,g,l)=>["M",d+l,t,"H",d+h-l,"A",l,l,0,0,1,d+h,t+l,"V",t+g-l,"A",l,l,0,0,1,d+h-l,t+g,"H",d+l,"A",l,l,0,0,1,d,t+g-l,"V",t+l,"A",l,l,0,0,1,d+l,t,"Z"].join(" "),"createRoundedRectPathD"),Ca=$(async(d,t)=>{let h=Q(),{themeVariables:g,handDrawnSeed:l}=h,{clusterBkg:r,clusterBorder:p}=g,i=p,{labelStyles:n,nodeStyles:e,borderStyles:s,backgroundStyles:a}=T(t),o=d.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),c=pt(h.flowchart.htmlLabels),y=t.direction==="LR",f=o.insert("g").attr("class","cluster-label swimlane-label"),m=await lt(f,t.label,{style:t.labelStyle,useHtmlLabels:c,isNode:!0,width:t.width}),u=m.getBBox();if(c){let N=m.children[0],R=Z(m);u=N.getBoundingClientRect(),R.attr("width",u.width),R.attr("height",u.height)}let w=t.padding??0,x=t.width<=u.width+w?u.width+w:t.width;t.width<=u.width+w?t.diff=(x-t.width)/2-w:t.diff=-w;let S=t.height,b=t.y-S/2,v=t.y+S/2,P=t.x-x/2,D=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:b+S/3,B=y?4:0,M=u.height+2*B,C,E;if(y){let N=Math.max(M,u.height+2*B),R=P+N,A=Math.max(0,x-N);if(t.look==="handDrawn"){let Y=k.svg(o),G=W(t,{roughness:.7,fill:r,stroke:i,fillWeight:3,seed:l}),q=W(t,{roughness:.7,fill:"none",stroke:i,seed:l}),ct=Y.rectangle(P,b,N,S,G);C=o.insert(()=>ct,":first-child");let rt=Y.rectangle(R,b,A,S,q);E=o.insert(()=>rt,":first-child"),C.select("path:nth-child(2)").attr("style",s.join(";")),C.select("path").attr("style",a.join(";").replace("fill","stroke"))}else C=o.insert("rect",":first-child"),E=o.insert("rect",":first-child"),C.attr("class","swimlane-title").attr("style",e).attr("x",P).attr("y",b).attr("width",N).attr("height",S).attr("fill",r).attr("stroke",i),E.attr("class","swimlane-body").attr("style",e).attr("x",R).attr("y",b).attr("width",A).attr("height",S).attr("fill","none").attr("stroke",i);let H=P+N/2,I=t.y;f.attr("transform",`translate(${H}, ${I}) rotate(-90) translate(${-u.width/2}, ${-u.height/2})`)}else{let N=Math.max(0,D-b),R=Math.min(M,N),A=b+R,H=Math.max(0,v-A),I=t.x-x/2;if(t.look==="handDrawn"){let q=k.svg(o),ct=W(t,{roughness:.7,fill:r,stroke:i,fillWeight:3,seed:l}),rt=W(t,{roughness:.7,fill:"none",stroke:i,seed:l}),et=q.rectangle(I,b,x,R,ct);C=o.insert(()=>et,":first-child");let st=q.rectangle(I,A,x,H,rt);E=o.insert(()=>st,":first-child"),C.select("path:nth-child(2)").attr("style",s.join(";")),C.select("path").attr("style",a.join(";").replace("fill","stroke"))}else C=o.insert("rect",":first-child"),E=o.insert("rect",":first-child"),C.attr("class","swimlane-title").attr("style",e).attr("x",I).attr("y",b).attr("width",x).attr("height",R).attr("fill",r).attr("stroke",i),E.attr("class","swimlane-body").attr("style",e).attr("x",I).attr("y",A).attr("width",x).attr("height",H).attr("fill","none").attr("stroke",i);let Y=t.x-u.width/2,G=b+(R-u.height)/2;f.attr("transform",`translate(${Y}, ${G})`)}if(z.trace("Swimlane data ",t,JSON.stringify(t)),n){let N=f.select("span");N&&N.attr("style",n)}return t.offsetX=0,t.width=x,t.height=S,t.offsetY=u.height-w/2,t.intersect=function(N){return xt(t,N)},{cluster:o,labelBBox:u}},"swimlane"),ns=$(async(d,t)=>{z.info("Creating subgraph rect for ",t.id,t);let h=Q(),{themeVariables:g,handDrawnSeed:l}=h,{clusterBkg:r,clusterBorder:p}=g,{labelStyles:i,nodeStyles:n,borderStyles:e,backgroundStyles:s}=T(t),a=d.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=it(h),c=a.insert("g").attr("class","cluster-label "),y;t.labelType==="markdown"?y=await lt(c,t.label,{style:t.labelStyle,useHtmlLabels:o,isNode:!0,width:t.width}):y=await At(c,t.label,t.labelStyle||"",!1,!0);let f=y.getBBox();if(it(h)){let P=y.children[0],D=Z(y);f=P.getBoundingClientRect(),D.attr("width",f.width),D.attr("height",f.height)}let m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let u=t.height,w=t.x-m/2,x=t.y-u/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let P=k.svg(a),D=W(t,{roughness:.7,fill:r,stroke:p,fillWeight:3,seed:l}),B=P.path(dt(w,x,m,u,0),D);S=a.insert(()=>(z.debug("Rough node insert CXC",B),B),":first-child"),S.select("path:nth-child(2)").attr("style",e.join(";")),S.select("path").attr("style",s.join(";").replace("fill","stroke"))}else S=a.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",x).attr("width",m).attr("height",u);let{subGraphTitleTopMargin:b}=Et(h);if(c.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+b})`),i){let P=c.select("span");P&&P.attr("style",i)}let v=S.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=f.height-t.padding/2,t.intersect=function(P){return xt(t,P)},{cluster:a,labelBBox:f}},"rect"),Ra=$((d,t)=>{let h=d.insert("g").attr("class","note-cluster").attr("id",t.domId),g=h.insert("rect",":first-child"),l=0*t.padding,r=l/2;g.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-r).attr("y",t.y-t.height/2-r).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");let p=g.node().getBBox();return t.width=p.width,t.height=p.height,t.intersect=function(i){return xt(t,i)},{cluster:h,labelBBox:{width:0,height:0}}},"noteGroup"),Aa=$(async(d,t)=>{let h=Q(),{themeVariables:g,handDrawnSeed:l}=h,{altBackground:r,compositeBackground:p,compositeTitleBackground:i,nodeBorder:n}=g,e=d.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),s=e.insert("g",":first-child"),a=e.insert("g").attr("class","cluster-label"),o=e.append("rect"),c=await At(a,t.label,t.labelStyle,void 0,!0),y=c.getBBox();if(it(h)){let B=c.children[0],M=Z(c);y=B.getBoundingClientRect(),M.attr("width",y.width),M.attr("height",y.height)}let f=0*t.padding,m=f/2,u=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+f;t.width<=y.width+t.padding?t.diff=(u-t.width)/2-t.padding:t.diff=-t.padding;let w=t.height+f,x=t.height+f-y.height-6,S=t.x-u/2,b=t.y-w/2;t.width=u;let v=t.y-t.height/2-m+y.height+2,P;if(t.look==="handDrawn"){let B=t.cssClasses.includes("statediagram-cluster-alt"),M=k.svg(e),C=t.rx||t.ry?M.path(dt(S,b,u,w,10),{roughness:.7,fill:i,fillStyle:"solid",stroke:n,seed:l}):M.rectangle(S,b,u,w,{seed:l});P=e.insert(()=>C,":first-child");let E=M.rectangle(S,v,u,x,{fill:B?r:p,fillStyle:B?"hachure":"solid",stroke:n,seed:l});P=e.insert(()=>C,":first-child"),o=e.insert(()=>E)}else P=s.insert("rect",":first-child"),P.attr("class","outer").attr("x",S).attr("y",b).attr("width",u).attr("height",w).attr("data-look",t.look),o.attr("class","inner").attr("x",S).attr("y",v).attr("width",u).attr("height",x);a.attr("transform",`translate(${t.x-y.width/2}, ${b+1-(it(h)?0:3)})`);let D=P.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(B){return xt(t,B)},{cluster:e,labelBBox:y}},"roundedWithTitle"),Ha=$(async(d,t)=>{z.info("Creating subgraph rect for ",t.id,t);let h=Q(),{themeVariables:g,handDrawnSeed:l}=h,{clusterBkg:r,clusterBorder:p}=g,{labelStyles:i,nodeStyles:n,borderStyles:e,backgroundStyles:s}=T(t),a=d.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=it(h),c=a.insert("g").attr("class","cluster-label "),y=await lt(c,t.label,{style:t.labelStyle,useHtmlLabels:o,isNode:!0,width:t.width}),f=y.getBBox();if(it(h)){let P=y.children[0],D=Z(y);f=P.getBoundingClientRect(),D.attr("width",f.width),D.attr("height",f.height)}let m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let u=t.height,w=t.x-m/2,x=t.y-u/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let P=k.svg(a),D=W(t,{roughness:.7,fill:r,stroke:p,fillWeight:4,seed:l}),B=P.path(dt(w,x,m,u,t.rx),D);S=a.insert(()=>(z.debug("Rough node insert CXC",B),B),":first-child"),S.select("path:nth-child(2)").attr("style",e.join(";")),S.select("path").attr("style",s.join(";").replace("fill","stroke"))}else S=a.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",x).attr("width",m).attr("height",u);let{subGraphTitleTopMargin:b}=Et(h);if(c.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+b})`),i){let P=c.select("span");P&&P.attr("style",i)}let v=S.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=f.height-t.padding/2,t.intersect=function(P){return xt(t,P)},{cluster:a,labelBBox:f}},"kanbanSection"),La=$((d,t)=>{let h=Q(),{themeVariables:g,handDrawnSeed:l}=h,{nodeBorder:r}=g,p=d.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),i=p.insert("g",":first-child"),n=0*t.padding,e=t.width+n;t.diff=-t.padding;let s=t.height+n,a=t.x-e/2,o=t.y-s/2;t.width=e;let c;if(t.look==="handDrawn"){let m=k.svg(p).rectangle(a,o,e,s,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:l});c=p.insert(()=>m,":first-child")}else{c=i.insert("rect",":first-child");let f="outer";t.look,f="divider",c.attr("class",f).attr("x",a).attr("y",o).attr("width",e).attr("height",s).attr("data-look",t.look)}let y=c.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(f){return xt(t,f)},{cluster:p,labelBBox:{}}},"divider"),Ia=ns,Wa={rect:ns,squareRect:Ia,roundedWithTitle:Aa,noteGroup:Ra,divider:La,kanbanSection:Ha,swimlane:Ca},cs=new Map,we=$(async(d,t)=>{let h=t.shape||"rect",g=await Wa[h](d,t);return cs.set(t.id,g),g},"insertCluster"),xe=$(()=>{cs=new Map},"clear");function os(d,t){return d.intersect(t)}$(os,"intersectNode");var Ta=os;function hs(d,t,h,g){var l=d.x,r=d.y,p=l-g.x,i=r-g.y,n=Math.sqrt(t*t*i*i+h*h*p*p),e=Math.abs(t*h*p/n);g.x<l&&(e=-e);var s=Math.abs(t*h*i/n);return g.y<r&&(s=-s),{x:l+e,y:r+s}}$(hs,"intersectEllipse");var gs=hs;function fs(d,t,h){return gs(d,t,t,h)}$(fs,"intersectCircle");var Ea=fs;function ys(d,t,h,g){{let l=t.y-d.y,r=d.x-t.x,p=t.x*d.y-d.x*t.y,i=l*h.x+r*h.y+p,n=l*g.x+r*g.y+p,e=1e-6;if(i!==0&&n!==0&&Ot(i,n))return;let s=g.y-h.y,a=h.x-g.x,o=g.x*h.y-h.x*g.y,c=s*d.x+a*d.y+o,y=s*t.x+a*t.y+o;if(Math.abs(c)<e&&Math.abs(y)<e&&Ot(c,y))return;let f=l*a-s*r;if(f===0)return;let m=Math.abs(f/2),u=r*o-a*p,w=u<0?(u-m)/f:(u+m)/f;u=s*p-l*o;let x=u<0?(u-m)/f:(u+m)/f;return{x:w,y:x}}}$(ys,"intersectLine");function Ot(d,t){return d*t>0}$(Ot,"sameSign");var Xa=ys;function ps(d,t,h){let g=d.x,l=d.y,r=[],p=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(s){p=Math.min(p,s.x),i=Math.min(i,s.y)}):(p=Math.min(p,t.x),i=Math.min(i,t.y));let n=g-d.width/2-p,e=l-d.height/2-i;for(let s=0;s<t.length;s++){let a=t[s],o=t[s<t.length-1?s+1:0],c=Xa(d,h,{x:n+a.x,y:e+a.y},{x:n+o.x,y:e+o.y});c&&r.push(c)}return r.length?(r.length>1&&r.sort(function(s,a){let o=s.x-h.x,c=s.y-h.y,y=Math.sqrt(o*o+c*c),f=a.x-h.x,m=a.y-h.y,u=Math.sqrt(f*f+m*m);return y<u?-1:y===u?0:1}),r[0]):d}$(ps,"intersectPolygon");var Ya=ps,L={node:Ta,circle:Ea,ellipse:gs,polygon:Ya,rect:xt};function us(d,t){let{labelStyles:h}=T(t);t.labelStyle=h;let g=_(t),l=g;g||(l="anchor");let r=d.insert("g").attr("class",l).attr("id",t.domId||t.id),p=1,{cssStyles:i}=t,n=k.svg(r),e=W(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);let s=n.circle(0,0,p*2,e),a=r.insert(()=>s,":first-child");return a.attr("class","anchor").attr("style",K(i)),X(t,a),t.intersect=function(o){return z.info("Circle intersect",t,p,o),L.circle(t,p,o)},r}$(us,"anchor");function jt(d,t,h,g,l,r,p){let n=(d+h)/2,e=(t+g)/2,s=Math.atan2(g-t,h-d),a=(h-d)/2,o=(g-t)/2,c=a/l,y=o/r,f=Math.sqrt(c**2+y**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");let m=Math.sqrt(1-f**2),u=n+m*r*Math.sin(s)*(p?-1:1),w=e-m*l*Math.cos(s)*(p?-1:1),x=Math.atan2((t-w)/r,(d-u)/l),b=Math.atan2((g-w)/r,(h-u)/l)-x;p&&b<0&&(b+=2*Math.PI),!p&&b>0&&(b-=2*Math.PI);let v=[];for(let P=0;P<20;P++){let D=P/19,B=x+D*b,M=u+l*Math.cos(B),C=w+r*Math.sin(B);v.push({x:M,y:C})}return v}$(jt,"generateArcPoints");function ds(d,t,h){let[g,l]=[t,h].sort((r,p)=>p-r);return l*(1-Math.sqrt(1-(d/g/2)**2))}$(ds,"calculateArcSagitta");async function ms(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=$(B=>B+p,"calcTotalHeight"),n=$(B=>{let M=B/2;return[M/(2.5+B/50),M]},"calcEllipseRadius"),{shapeSvg:e,bbox:s}=await O(d,t,_(t)),a=i(t?.height?t?.height:s.height),[o,c]=n(a),y=ds(a,o,c),m=(t?.width?t?.width:s.width)+r*2+y-y,u=a,{cssStyles:w}=t,x=[{x:m/2,y:-u/2},{x:-m/2,y:-u/2},...jt(-m/2,-u/2,-m/2,u/2,o,c,!1),{x:m/2,y:u/2},...jt(m/2,u/2,m/2,-u/2,o,c,!0)],S=k.svg(e),b=W(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let v=F(x),P=S.path(v,b),D=e.insert(()=>P,":first-child");return D.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",w),g&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",g),D.attr("transform",`translate(${o/2}, 0)`),X(t,D),t.intersect=function(B){return L.polygon(t,x,B)},e}$(ms,"bowTieRect");function ft(d,t,h,g){return d.insert("polygon",":first-child").attr("points",g.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+h/2+")")}$(ft,"insertPolygonShape");var Rt=12;async function ws(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?28:l,p=t.look==="neo"?24:l,{shapeSvg:i,bbox:n}=await O(d,t,_(t)),e=(t?.width??n.width)+(t.look==="neo"?r*2:r+Rt),s=(t?.height??n.height)+(t.look==="neo"?p*2:p),a=0,o=e,c=-s,y=0,f=[{x:a+Rt,y:c},{x:o,y:c},{x:o,y},{x:a,y},{x:a,y:c+Rt},{x:a+Rt,y:c}],m,{cssStyles:u}=t;if(t.look==="handDrawn"){let w=k.svg(i),x=W(t,{}),S=F(f),b=w.path(S,x);m=i.insert(()=>b,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),u&&m.attr("style",u)}else m=ft(i,e,s,f);return g&&m.attr("style",g),X(t,m),t.intersect=function(w){return L.polygon(t,f,w)},i}$(ws,"card");function xs(d,t){let{nodeStyles:h}=T(t);t.label="";let g=d.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,r=Math.max(28,t.width??0),p=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}],i=k.svg(g),n=W(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=F(p),s=i.path(e,n),a=g.insert(()=>s,":first-child");return l&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",l),h&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",h),t.width=28,t.height=28,t.intersect=function(o){return L.polygon(t,p,o)},g}$(xs,"choice");async function Gt(d,t,h){let{labelStyles:g,nodeStyles:l}=T(t);t.labelStyle=g;let{shapeSvg:r,bbox:p,halfPadding:i}=await O(d,t,_(t)),n=16,e=h?.padding??i,s=t.look==="neo"?p.width/2+n*2:p.width/2+e,a,{cssStyles:o}=t;if(t.look==="handDrawn"){let c=k.svg(r),y=W(t,{}),f=c.circle(0,0,s*2,y);a=r.insert(()=>f,":first-child"),a.attr("class","basic label-container").attr("style",K(o))}else a=r.insert("circle",":first-child").attr("class","basic label-container").attr("style",l).attr("r",s).attr("cx",0).attr("cy",0);return X(t,a),t.calcIntersect=function(c,y){let f=c.width/2;return L.circle(c,f,y)},t.intersect=function(c){return z.info("Circle intersect",t,s,c),L.circle(t,s,c)},r}$(Gt,"circle");function bs(d){let t=Math.cos(Math.PI/4),h=Math.sin(Math.PI/4),g=d*2,l={x:g/2*t,y:g/2*h},r={x:-(g/2)*t,y:g/2*h},p={x:-(g/2)*t,y:-(g/2)*h},i={x:g/2*t,y:-(g/2)*h};return`M ${r.x},${r.y} L ${i.x},${i.y}
|
|
1
|
+
import{a as Vt,b as Pt,d as T,e as W}from"./embed-page-chunk-ME637LUU.js";import{a as Et,b as Zt}from"./embed-page-chunk-X2TOGOMH.js";import{a as k}from"./embed-page-chunk-7TH7FFVA.js";import{c as lt}from"./embed-page-chunk-I7EMCZI6.js";import{d as Mt}from"./embed-page-chunk-5ZRWN6T7.js";import{k as Dt,r as Bt,t as K}from"./embed-page-chunk-UAXOXJ4N.js";import{G as It,I as Wt,J as zt,Z as Q,aa as Tt,n as pt,t as bt,x as it}from"./embed-page-chunk-FPA5BD6K.js";import{b as z}from"./embed-page-chunk-2BOYLGSX.js";import{b as Z}from"./embed-page-chunk-S4XZPBRM.js";import{a as $}from"./embed-page-chunk-444E5YR2.js";var O=$(async(d,t,h)=>{let g,l=t.useHtmlLabels||pt(Q()?.htmlLabels);h?g=h:g="node default";let r=d.insert("g").attr("class",g).attr("id",t.domId||t.id),p=r.insert("g").attr("class","label").attr("style",K(t.labelStyle)),i;t.label===void 0?i="":i=typeof t.label=="string"?t.label:t.label[0];let n=!!t.icon||!!t.img,e=t.labelType==="markdown",s=await lt(p,It(Bt(i),Q()),{useHtmlLabels:l,width:t.width||Q().flowchart?.wrappingWidth,classes:e?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:e},Q()),a=s.getBBox(),o=(t?.padding??0)/2;if(l){let c=s.children[0],y=Z(s);await Zt(c,i),a=c.getBoundingClientRect(),y.attr("width",a.width),y.attr("height",a.height)}return l?p.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):p.attr("transform","translate(0, "+-a.height/2+")"),t.centerLabel&&p.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),p.insert("rect",":first-child"),{shapeSvg:r,bbox:a,halfPadding:o,label:p}},"labelHelper"),Xt=$(async(d,t,h)=>{let g=h.useHtmlLabels??it(Q()),l=d.insert("g").attr("class","label").attr("style",h.labelStyle||""),r=await lt(l,It(Bt(t),Q()),{useHtmlLabels:g,width:h.width||Q()?.flowchart?.wrappingWidth,style:h.labelStyle,addSvgBackground:!!h.icon||!!h.img}),p=r.getBBox(),i=h.padding/2;if(it(Q())){let n=r.children[0],e=Z(r);p=n.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return g?l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):l.attr("transform","translate(0, "+-p.height/2+")"),h.centerLabel&&l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:d,bbox:p,halfPadding:i,label:l}},"insertLabel"),X=$((d,t)=>{let h=t.node().getBBox();d.width=h.width,d.height=h.height},"updateNodeBounds"),_=$((d,t)=>(d.look==="handDrawn"?"rough-node":"node")+" "+d.cssClasses+" "+(t||""),"getNodeClasses");function F(d){let t=d.map((h,g)=>`${g===0?"M":"L"}${h.x},${h.y}`);return t.push("Z"),t.join(" ")}$(F,"createPathFromPoints");function ut(d,t,h,g,l,r){let p=[],n=h-d,e=g-t,s=n/r,a=2*Math.PI/s,o=t+e/2;for(let c=0;c<=50;c++){let y=c/50,f=d+y*n,m=o+l*Math.sin(a*(f-d));p.push({x:f,y:m})}return p}$(ut,"generateFullSineWavePoints");function Ct(d,t,h,g,l,r){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(g-1);for(let a=0;a<g;a++){let o=i+a*s,c=d+h*Math.cos(o),y=t+h*Math.sin(o);p.push({x:-c,y:-y})}return p}$(Ct,"generateCirclePoints");function _t(d){let t=Array.from(d.childNodes).filter(n=>n.tagName==="path"),h=document.createElementNS("http://www.w3.org/2000/svg","path"),g=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");h.setAttribute("d",g);let l=t.find(n=>n.getAttribute("fill")!=="none"),r=t.find(n=>n.getAttribute("stroke")!=="none"),p=$((n,e)=>n?.getAttribute(e)??void 0,"getAttr");if(l){let n={fill:p(l,"fill"),"fill-opacity":p(l,"fill-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&h.setAttribute(e,s)})}if(r){let n={stroke:p(r,"stroke"),"stroke-width":p(r,"stroke-width")??"1","stroke-opacity":p(r,"stroke-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&h.setAttribute(e,s)})}let i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(h),i}$(_t,"mergePaths");var Ma=$((d,t)=>{var h=d.x,g=d.y,l=t.x-h,r=t.y-g,p=d.width/2,i=d.height/2,n,e;return Math.abs(r)*p>Math.abs(l)*i?(r<0&&(i=-i),n=r===0?0:i*l/r,e=i):(l<0&&(p=-p),n=p,e=l===0?0:p*r/l),{x:h+n,y:g+e}},"intersectRect"),xt=Ma,Na=$(async(d,t,h,g=!1,l=!1)=>{let r=t||"";typeof r=="object"&&(r=r[0]);let p=Q(),i=it(p);return await lt(d,r,{style:h,isTitle:g,useHtmlLabels:i,markdown:!1,isNode:l,width:Number.POSITIVE_INFINITY},p)},"createLabel"),At=Na,dt=$((d,t,h,g,l)=>["M",d+l,t,"H",d+h-l,"A",l,l,0,0,1,d+h,t+l,"V",t+g-l,"A",l,l,0,0,1,d+h-l,t+g,"H",d+l,"A",l,l,0,0,1,d,t+g-l,"V",t+l,"A",l,l,0,0,1,d+l,t,"Z"].join(" "),"createRoundedRectPathD"),Ca=$(async(d,t)=>{let h=Q(),{themeVariables:g,handDrawnSeed:l}=h,{clusterBkg:r,clusterBorder:p}=g,i=p,{labelStyles:n,nodeStyles:e,borderStyles:s,backgroundStyles:a}=T(t),o=d.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),c=pt(h.flowchart.htmlLabels),y=t.direction==="LR",f=o.insert("g").attr("class","cluster-label swimlane-label"),m=await lt(f,t.label,{style:t.labelStyle,useHtmlLabels:c,isNode:!0,width:t.width}),u=m.getBBox();if(c){let N=m.children[0],R=Z(m);u=N.getBoundingClientRect(),R.attr("width",u.width),R.attr("height",u.height)}let w=t.padding??0,x=t.width<=u.width+w?u.width+w:t.width;t.width<=u.width+w?t.diff=(x-t.width)/2-w:t.diff=-w;let S=t.height,b=t.y-S/2,v=t.y+S/2,P=t.x-x/2,D=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:b+S/3,B=y?4:0,M=u.height+2*B,C,E;if(y){let N=Math.max(M,u.height+2*B),R=P+N,A=Math.max(0,x-N);if(t.look==="handDrawn"){let Y=k.svg(o),G=W(t,{roughness:.7,fill:r,stroke:i,fillWeight:3,seed:l}),q=W(t,{roughness:.7,fill:"none",stroke:i,seed:l}),ct=Y.rectangle(P,b,N,S,G);C=o.insert(()=>ct,":first-child");let rt=Y.rectangle(R,b,A,S,q);E=o.insert(()=>rt,":first-child"),C.select("path:nth-child(2)").attr("style",s.join(";")),C.select("path").attr("style",a.join(";").replace("fill","stroke"))}else C=o.insert("rect",":first-child"),E=o.insert("rect",":first-child"),C.attr("class","swimlane-title").attr("style",e).attr("x",P).attr("y",b).attr("width",N).attr("height",S).attr("fill",r).attr("stroke",i),E.attr("class","swimlane-body").attr("style",e).attr("x",R).attr("y",b).attr("width",A).attr("height",S).attr("fill","none").attr("stroke",i);let H=P+N/2,I=t.y;f.attr("transform",`translate(${H}, ${I}) rotate(-90) translate(${-u.width/2}, ${-u.height/2})`)}else{let N=Math.max(0,D-b),R=Math.min(M,N),A=b+R,H=Math.max(0,v-A),I=t.x-x/2;if(t.look==="handDrawn"){let q=k.svg(o),ct=W(t,{roughness:.7,fill:r,stroke:i,fillWeight:3,seed:l}),rt=W(t,{roughness:.7,fill:"none",stroke:i,seed:l}),et=q.rectangle(I,b,x,R,ct);C=o.insert(()=>et,":first-child");let st=q.rectangle(I,A,x,H,rt);E=o.insert(()=>st,":first-child"),C.select("path:nth-child(2)").attr("style",s.join(";")),C.select("path").attr("style",a.join(";").replace("fill","stroke"))}else C=o.insert("rect",":first-child"),E=o.insert("rect",":first-child"),C.attr("class","swimlane-title").attr("style",e).attr("x",I).attr("y",b).attr("width",x).attr("height",R).attr("fill",r).attr("stroke",i),E.attr("class","swimlane-body").attr("style",e).attr("x",I).attr("y",A).attr("width",x).attr("height",H).attr("fill","none").attr("stroke",i);let Y=t.x-u.width/2,G=b+(R-u.height)/2;f.attr("transform",`translate(${Y}, ${G})`)}if(z.trace("Swimlane data ",t,JSON.stringify(t)),n){let N=f.select("span");N&&N.attr("style",n)}return t.offsetX=0,t.width=x,t.height=S,t.offsetY=u.height-w/2,t.intersect=function(N){return xt(t,N)},{cluster:o,labelBBox:u}},"swimlane"),ns=$(async(d,t)=>{z.info("Creating subgraph rect for ",t.id,t);let h=Q(),{themeVariables:g,handDrawnSeed:l}=h,{clusterBkg:r,clusterBorder:p}=g,{labelStyles:i,nodeStyles:n,borderStyles:e,backgroundStyles:s}=T(t),a=d.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=it(h),c=a.insert("g").attr("class","cluster-label "),y;t.labelType==="markdown"?y=await lt(c,t.label,{style:t.labelStyle,useHtmlLabels:o,isNode:!0,width:t.width}):y=await At(c,t.label,t.labelStyle||"",!1,!0);let f=y.getBBox();if(it(h)){let P=y.children[0],D=Z(y);f=P.getBoundingClientRect(),D.attr("width",f.width),D.attr("height",f.height)}let m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let u=t.height,w=t.x-m/2,x=t.y-u/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let P=k.svg(a),D=W(t,{roughness:.7,fill:r,stroke:p,fillWeight:3,seed:l}),B=P.path(dt(w,x,m,u,0),D);S=a.insert(()=>(z.debug("Rough node insert CXC",B),B),":first-child"),S.select("path:nth-child(2)").attr("style",e.join(";")),S.select("path").attr("style",s.join(";").replace("fill","stroke"))}else S=a.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",x).attr("width",m).attr("height",u);let{subGraphTitleTopMargin:b}=Et(h);if(c.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+b})`),i){let P=c.select("span");P&&P.attr("style",i)}let v=S.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=f.height-t.padding/2,t.intersect=function(P){return xt(t,P)},{cluster:a,labelBBox:f}},"rect"),Ra=$((d,t)=>{let h=d.insert("g").attr("class","note-cluster").attr("id",t.domId),g=h.insert("rect",":first-child"),l=0*t.padding,r=l/2;g.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-r).attr("y",t.y-t.height/2-r).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");let p=g.node().getBBox();return t.width=p.width,t.height=p.height,t.intersect=function(i){return xt(t,i)},{cluster:h,labelBBox:{width:0,height:0}}},"noteGroup"),Aa=$(async(d,t)=>{let h=Q(),{themeVariables:g,handDrawnSeed:l}=h,{altBackground:r,compositeBackground:p,compositeTitleBackground:i,nodeBorder:n}=g,e=d.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),s=e.insert("g",":first-child"),a=e.insert("g").attr("class","cluster-label"),o=e.append("rect"),c=await At(a,t.label,t.labelStyle,void 0,!0),y=c.getBBox();if(it(h)){let B=c.children[0],M=Z(c);y=B.getBoundingClientRect(),M.attr("width",y.width),M.attr("height",y.height)}let f=0*t.padding,m=f/2,u=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+f;t.width<=y.width+t.padding?t.diff=(u-t.width)/2-t.padding:t.diff=-t.padding;let w=t.height+f,x=t.height+f-y.height-6,S=t.x-u/2,b=t.y-w/2;t.width=u;let v=t.y-t.height/2-m+y.height+2,P;if(t.look==="handDrawn"){let B=t.cssClasses.includes("statediagram-cluster-alt"),M=k.svg(e),C=t.rx||t.ry?M.path(dt(S,b,u,w,10),{roughness:.7,fill:i,fillStyle:"solid",stroke:n,seed:l}):M.rectangle(S,b,u,w,{seed:l});P=e.insert(()=>C,":first-child");let E=M.rectangle(S,v,u,x,{fill:B?r:p,fillStyle:B?"hachure":"solid",stroke:n,seed:l});P=e.insert(()=>C,":first-child"),o=e.insert(()=>E)}else P=s.insert("rect",":first-child"),P.attr("class","outer").attr("x",S).attr("y",b).attr("width",u).attr("height",w).attr("data-look",t.look),o.attr("class","inner").attr("x",S).attr("y",v).attr("width",u).attr("height",x);a.attr("transform",`translate(${t.x-y.width/2}, ${b+1-(it(h)?0:3)})`);let D=P.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(B){return xt(t,B)},{cluster:e,labelBBox:y}},"roundedWithTitle"),Ha=$(async(d,t)=>{z.info("Creating subgraph rect for ",t.id,t);let h=Q(),{themeVariables:g,handDrawnSeed:l}=h,{clusterBkg:r,clusterBorder:p}=g,{labelStyles:i,nodeStyles:n,borderStyles:e,backgroundStyles:s}=T(t),a=d.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=it(h),c=a.insert("g").attr("class","cluster-label "),y=await lt(c,t.label,{style:t.labelStyle,useHtmlLabels:o,isNode:!0,width:t.width}),f=y.getBBox();if(it(h)){let P=y.children[0],D=Z(y);f=P.getBoundingClientRect(),D.attr("width",f.width),D.attr("height",f.height)}let m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let u=t.height,w=t.x-m/2,x=t.y-u/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let P=k.svg(a),D=W(t,{roughness:.7,fill:r,stroke:p,fillWeight:4,seed:l}),B=P.path(dt(w,x,m,u,t.rx),D);S=a.insert(()=>(z.debug("Rough node insert CXC",B),B),":first-child"),S.select("path:nth-child(2)").attr("style",e.join(";")),S.select("path").attr("style",s.join(";").replace("fill","stroke"))}else S=a.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",x).attr("width",m).attr("height",u);let{subGraphTitleTopMargin:b}=Et(h);if(c.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+b})`),i){let P=c.select("span");P&&P.attr("style",i)}let v=S.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=f.height-t.padding/2,t.intersect=function(P){return xt(t,P)},{cluster:a,labelBBox:f}},"kanbanSection"),La=$((d,t)=>{let h=Q(),{themeVariables:g,handDrawnSeed:l}=h,{nodeBorder:r}=g,p=d.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),i=p.insert("g",":first-child"),n=0*t.padding,e=t.width+n;t.diff=-t.padding;let s=t.height+n,a=t.x-e/2,o=t.y-s/2;t.width=e;let c;if(t.look==="handDrawn"){let m=k.svg(p).rectangle(a,o,e,s,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:l});c=p.insert(()=>m,":first-child")}else{c=i.insert("rect",":first-child");let f="outer";t.look,f="divider",c.attr("class",f).attr("x",a).attr("y",o).attr("width",e).attr("height",s).attr("data-look",t.look)}let y=c.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(f){return xt(t,f)},{cluster:p,labelBBox:{}}},"divider"),Ia=ns,Wa={rect:ns,squareRect:Ia,roundedWithTitle:Aa,noteGroup:Ra,divider:La,kanbanSection:Ha,swimlane:Ca},cs=new Map,we=$(async(d,t)=>{let h=t.shape||"rect",g=await Wa[h](d,t);return cs.set(t.id,g),g},"insertCluster"),xe=$(()=>{cs=new Map},"clear");function os(d,t){return d.intersect(t)}$(os,"intersectNode");var Ta=os;function hs(d,t,h,g){var l=d.x,r=d.y,p=l-g.x,i=r-g.y,n=Math.sqrt(t*t*i*i+h*h*p*p),e=Math.abs(t*h*p/n);g.x<l&&(e=-e);var s=Math.abs(t*h*i/n);return g.y<r&&(s=-s),{x:l+e,y:r+s}}$(hs,"intersectEllipse");var gs=hs;function fs(d,t,h){return gs(d,t,t,h)}$(fs,"intersectCircle");var Ea=fs;function ys(d,t,h,g){{let l=t.y-d.y,r=d.x-t.x,p=t.x*d.y-d.x*t.y,i=l*h.x+r*h.y+p,n=l*g.x+r*g.y+p,e=1e-6;if(i!==0&&n!==0&&Ot(i,n))return;let s=g.y-h.y,a=h.x-g.x,o=g.x*h.y-h.x*g.y,c=s*d.x+a*d.y+o,y=s*t.x+a*t.y+o;if(Math.abs(c)<e&&Math.abs(y)<e&&Ot(c,y))return;let f=l*a-s*r;if(f===0)return;let m=Math.abs(f/2),u=r*o-a*p,w=u<0?(u-m)/f:(u+m)/f;u=s*p-l*o;let x=u<0?(u-m)/f:(u+m)/f;return{x:w,y:x}}}$(ys,"intersectLine");function Ot(d,t){return d*t>0}$(Ot,"sameSign");var Xa=ys;function ps(d,t,h){let g=d.x,l=d.y,r=[],p=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(s){p=Math.min(p,s.x),i=Math.min(i,s.y)}):(p=Math.min(p,t.x),i=Math.min(i,t.y));let n=g-d.width/2-p,e=l-d.height/2-i;for(let s=0;s<t.length;s++){let a=t[s],o=t[s<t.length-1?s+1:0],c=Xa(d,h,{x:n+a.x,y:e+a.y},{x:n+o.x,y:e+o.y});c&&r.push(c)}return r.length?(r.length>1&&r.sort(function(s,a){let o=s.x-h.x,c=s.y-h.y,y=Math.sqrt(o*o+c*c),f=a.x-h.x,m=a.y-h.y,u=Math.sqrt(f*f+m*m);return y<u?-1:y===u?0:1}),r[0]):d}$(ps,"intersectPolygon");var Ya=ps,L={node:Ta,circle:Ea,ellipse:gs,polygon:Ya,rect:xt};function us(d,t){let{labelStyles:h}=T(t);t.labelStyle=h;let g=_(t),l=g;g||(l="anchor");let r=d.insert("g").attr("class",l).attr("id",t.domId||t.id),p=1,{cssStyles:i}=t,n=k.svg(r),e=W(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);let s=n.circle(0,0,p*2,e),a=r.insert(()=>s,":first-child");return a.attr("class","anchor").attr("style",K(i)),X(t,a),t.intersect=function(o){return z.info("Circle intersect",t,p,o),L.circle(t,p,o)},r}$(us,"anchor");function jt(d,t,h,g,l,r,p){let n=(d+h)/2,e=(t+g)/2,s=Math.atan2(g-t,h-d),a=(h-d)/2,o=(g-t)/2,c=a/l,y=o/r,f=Math.sqrt(c**2+y**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");let m=Math.sqrt(1-f**2),u=n+m*r*Math.sin(s)*(p?-1:1),w=e-m*l*Math.cos(s)*(p?-1:1),x=Math.atan2((t-w)/r,(d-u)/l),b=Math.atan2((g-w)/r,(h-u)/l)-x;p&&b<0&&(b+=2*Math.PI),!p&&b>0&&(b-=2*Math.PI);let v=[];for(let P=0;P<20;P++){let D=P/19,B=x+D*b,M=u+l*Math.cos(B),C=w+r*Math.sin(B);v.push({x:M,y:C})}return v}$(jt,"generateArcPoints");function ds(d,t,h){let[g,l]=[t,h].sort((r,p)=>p-r);return l*(1-Math.sqrt(1-(d/g/2)**2))}$(ds,"calculateArcSagitta");async function ms(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=$(B=>B+p,"calcTotalHeight"),n=$(B=>{let M=B/2;return[M/(2.5+B/50),M]},"calcEllipseRadius"),{shapeSvg:e,bbox:s}=await O(d,t,_(t)),a=i(t?.height?t?.height:s.height),[o,c]=n(a),y=ds(a,o,c),m=(t?.width?t?.width:s.width)+r*2+y-y,u=a,{cssStyles:w}=t,x=[{x:m/2,y:-u/2},{x:-m/2,y:-u/2},...jt(-m/2,-u/2,-m/2,u/2,o,c,!1),{x:m/2,y:u/2},...jt(m/2,u/2,m/2,-u/2,o,c,!0)],S=k.svg(e),b=W(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let v=F(x),P=S.path(v,b),D=e.insert(()=>P,":first-child");return D.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",w),g&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",g),D.attr("transform",`translate(${o/2}, 0)`),X(t,D),t.intersect=function(B){return L.polygon(t,x,B)},e}$(ms,"bowTieRect");function ft(d,t,h,g){return d.insert("polygon",":first-child").attr("points",g.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+h/2+")")}$(ft,"insertPolygonShape");var Rt=12;async function ws(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?28:l,p=t.look==="neo"?24:l,{shapeSvg:i,bbox:n}=await O(d,t,_(t)),e=(t?.width??n.width)+(t.look==="neo"?r*2:r+Rt),s=(t?.height??n.height)+(t.look==="neo"?p*2:p),a=0,o=e,c=-s,y=0,f=[{x:a+Rt,y:c},{x:o,y:c},{x:o,y},{x:a,y},{x:a,y:c+Rt},{x:a+Rt,y:c}],m,{cssStyles:u}=t;if(t.look==="handDrawn"){let w=k.svg(i),x=W(t,{}),S=F(f),b=w.path(S,x);m=i.insert(()=>b,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),u&&m.attr("style",u)}else m=ft(i,e,s,f);return g&&m.attr("style",g),X(t,m),t.intersect=function(w){return L.polygon(t,f,w)},i}$(ws,"card");function xs(d,t){let{nodeStyles:h}=T(t);t.label="";let g=d.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,r=Math.max(28,t.width??0),p=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}],i=k.svg(g),n=W(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=F(p),s=i.path(e,n),a=g.insert(()=>s,":first-child");return l&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",l),h&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",h),t.width=28,t.height=28,t.intersect=function(o){return L.polygon(t,p,o)},g}$(xs,"choice");async function Gt(d,t,h){let{labelStyles:g,nodeStyles:l}=T(t);t.labelStyle=g;let{shapeSvg:r,bbox:p,halfPadding:i}=await O(d,t,_(t)),n=16,e=h?.padding??i,s=t.look==="neo"?p.width/2+n*2:p.width/2+e,a,{cssStyles:o}=t;if(t.look==="handDrawn"){let c=k.svg(r),y=W(t,{}),f=c.circle(0,0,s*2,y);a=r.insert(()=>f,":first-child"),a.attr("class","basic label-container").attr("style",K(o))}else a=r.insert("circle",":first-child").attr("class","basic label-container").attr("style",l).attr("r",s).attr("cx",0).attr("cy",0);return X(t,a),t.calcIntersect=function(c,y){let f=c.width/2;return L.circle(c,f,y)},t.intersect=function(c){return z.info("Circle intersect",t,s,c),L.circle(t,s,c)},r}$(Gt,"circle");function bs(d){let t=Math.cos(Math.PI/4),h=Math.sin(Math.PI/4),g=d*2,l={x:g/2*t,y:g/2*h},r={x:-(g/2)*t,y:g/2*h},p={x:-(g/2)*t,y:-(g/2)*h},i={x:g/2*t,y:-(g/2)*h};return`M ${r.x},${r.y} L ${i.x},${i.y}
|
|
2
2
|
M ${l.x},${l.y} L ${p.x},${p.y}`}$(bs,"createLine");function Ss(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h,t.label="";let l=d.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),r=Math.max(30,t?.width??0),{cssStyles:p}=t,i=k.svg(l),n=W(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=i.circle(0,0,r*2,n),s=bs(r),a=i.path(s,n),o=l.insert(()=>e,":first-child");return o.insert(()=>a),o.attr("class","outer-path"),p&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",p),g&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",g),X(t,o),t.intersect=function(c){return z.info("crossedCircle intersect",t,{radius:r,point:c}),L.circle(t,r,c)},l}$(Ss,"crossedCircle");function ht(d,t,h,g=100,l=0,r=180){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(g-1);for(let a=0;a<g;a++){let o=i+a*s,c=d+h*Math.cos(o),y=t+h*Math.sin(o);p.push({x:-c,y:-y})}return p}$(ht,"generateCirclePoints");async function $s(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let{shapeSvg:l,bbox:r,label:p}=await O(d,t,_(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=r.width+i,s=r.height+n,a=Math.max(5,s*.1),{cssStyles:o}=t,c=[...ht(e/2,-s/2,a,30,-90,0),{x:-e/2-a,y:a},...ht(e/2+a*2,-a,a,20,-180,-270),...ht(e/2+a*2,a,a,20,-90,-180),{x:-e/2-a,y:-s/2},...ht(e/2,s/2,a,20,0,90)],y=[{x:e/2,y:-s/2-a},{x:-e/2,y:-s/2-a},...ht(e/2,-s/2,a,20,-90,0),{x:-e/2-a,y:-a},...ht(e/2+e*.1,-a,a,20,-180,-270),...ht(e/2+e*.1,a,a,20,-90,-180),{x:-e/2-a,y:s/2},...ht(e/2,s/2,a,20,0,90),{x:-e/2,y:s/2+a},{x:e/2,y:s/2+a}],f=k.svg(l),m=W(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let w=F(c).replace("Z",""),x=f.path(w,m),S=F(y),b=f.path(S,{...m}),v=l.insert("g",":first-child");return v.insert(()=>b,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),o&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",o),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),v.attr("transform",`translate(${a}, 0)`),p.attr("transform",`translate(${-e/2+a-(r.x-(r.left??0))},${-s/2+(t.padding??0)/2-(r.y-(r.top??0))})`),X(t,v),t.intersect=function(P){return L.polygon(t,y,P)},l}$($s,"curlyBraceLeft");function gt(d,t,h,g=100,l=0,r=180){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(g-1);for(let a=0;a<g;a++){let o=i+a*s,c=d+h*Math.cos(o),y=t+h*Math.sin(o);p.push({x:c,y})}return p}$(gt,"generateCirclePoints");async function ks(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let{shapeSvg:l,bbox:r,label:p}=await O(d,t,_(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=r.width+(t.look==="neo"?i*2:i),s=r.height+(t.look==="neo"?n*2:n),a=Math.max(5,s*.1),{cssStyles:o}=t,c=[...gt(e/2,-s/2,a,20,-90,0),{x:e/2+a,y:-a},...gt(e/2+a*2,-a,a,20,-180,-270),...gt(e/2+a*2,a,a,20,-90,-180),{x:e/2+a,y:s/2},...gt(e/2,s/2,a,20,0,90)],y=[{x:-e/2,y:-s/2-a},{x:e/2,y:-s/2-a},...gt(e/2,-s/2,a,20,-90,0),{x:e/2+a,y:-a},...gt(e/2+a*2,-a,a,20,-180,-270),...gt(e/2+a*2,a,a,20,-90,-180),{x:e/2+a,y:s/2},...gt(e/2,s/2,a,20,0,90),{x:e/2,y:s/2+a},{x:-e/2,y:s/2+a}],f=k.svg(l),m=W(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let w=F(c).replace("Z",""),x=f.path(w,m),S=F(y),b=f.path(S,{...m}),v=l.insert("g",":first-child");return v.insert(()=>b,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),o&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",o),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),v.attr("transform",`translate(${-a}, 0)`),p.attr("transform",`translate(${-e/2+(t.padding??0)/2-(r.x-(r.left??0))},${-s/2+(t.padding??0)/2-(r.y-(r.top??0))})`),X(t,v),t.intersect=function(P){return L.polygon(t,y,P)},l}$(ks,"curlyBraceRight");function tt(d,t,h,g=100,l=0,r=180){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(g-1);for(let a=0;a<g;a++){let o=i+a*s,c=d+h*Math.cos(o),y=t+h*Math.sin(o);p.push({x:-c,y:-y})}return p}$(tt,"generateCirclePoints");async function vs(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let{shapeSvg:l,bbox:r,label:p}=await O(d,t,_(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=r.width+(t.look==="neo"?i*2:i),s=r.height+(t.look==="neo"?n*2:n),a=Math.max(5,s*.1),{cssStyles:o}=t,c=[...tt(e/2,-s/2,a,30,-90,0),{x:-e/2-a,y:a},...tt(e/2+a*2,-a,a,20,-180,-270),...tt(e/2+a*2,a,a,20,-90,-180),{x:-e/2-a,y:-s/2},...tt(e/2,s/2,a,20,0,90)],y=[...tt(-e/2+a+a/2,-s/2,a,20,-90,-180),{x:e/2-a/2,y:a},...tt(-e/2-a/2,-a,a,20,0,90),...tt(-e/2-a/2,a,a,20,-90,0),{x:e/2-a/2,y:-a},...tt(-e/2+a+a/2,s/2,a,30,-180,-270)],f=[{x:e/2,y:-s/2-a},{x:-e/2,y:-s/2-a},...tt(e/2,-s/2,a,20,-90,0),{x:-e/2-a,y:-a},...tt(e/2+a*2,-a,a,20,-180,-270),...tt(e/2+a*2,a,a,20,-90,-180),{x:-e/2-a,y:s/2},...tt(e/2,s/2,a,20,0,90),{x:-e/2,y:s/2+a},{x:e/2-a-a/2,y:s/2+a},...tt(-e/2+a+a/2,-s/2,a,20,-90,-180),{x:e/2-a/2,y:a},...tt(-e/2-a/2,-a,a,20,0,90),...tt(-e/2-a/2,a,a,20,-90,0),{x:e/2-a/2,y:-a},...tt(-e/2+a+a/2,s/2,a,30,-180,-270)],m=k.svg(l),u=W(t,{fill:"none"});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let x=F(c).replace("Z",""),S=m.path(x,u),v=F(y).replace("Z",""),P=m.path(v,u),D=F(f),B=m.path(D,{...u}),M=l.insert("g",":first-child");return M.insert(()=>B,":first-child").attr("stroke-opacity",0),M.insert(()=>S,":first-child"),M.insert(()=>P,":first-child"),M.attr("class","text"),o&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",o),g&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",g),M.attr("transform",`translate(${a-a/4}, 0)`),p.attr("transform",`translate(${-e/2+(t.padding??0)/2-(r.x-(r.left??0))},${-s/2+(t.padding??0)/2-(r.y-(r.top??0))})`),X(t,M),t.intersect=function(C){return L.polygon(t,f,C)},l}$(vs,"curlyBraces");async function Ps(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=20,n=5,{shapeSvg:e,bbox:s}=await O(d,t,_(t)),a=Math.max(i,(s.width+r*2)*1.25,t?.width??0),o=Math.max(n,s.height+p*2,t?.height??0),c=o/2,{cssStyles:y}=t,f=k.svg(e),m=W(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let u=a,w=o,x=u-c,S=w/4,b=[{x,y:0},{x:S,y:0},{x:0,y:w/2},{x:S,y:w},{x,y:w},...Ct(-x,-w/2,c,50,270,90)],v=F(b),P=f.path(v,m),D=e.insert(()=>P,":first-child");return D.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",y),g&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",g),D.attr("transform",`translate(${-a/2}, ${-o/2})`),X(t,D),t.intersect=function(B){return L.polygon(t,b,B)},e}$(Ps,"curvedTrapezoid");var _a=$((d,t,h,g,l,r)=>[`M${d},${t+r}`,`a${l},${r} 0,0,0 ${h},0`,`a${l},${r} 0,0,0 ${-h},0`,`l0,${g}`,`a${l},${r} 0,0,0 ${h},0`,`l0,${-g}`].join(" "),"createCylinderPathD"),Oa=$((d,t,h,g,l,r)=>[`M${d},${t+r}`,`M${d+h},${t+r}`,`a${l},${r} 0,0,0 ${-h},0`,`l0,${g}`,`a${l},${r} 0,0,0 ${h},0`,`l0,${-g}`].join(" "),"createOuterCylinderPathD"),ja=$((d,t,h,g,l,r)=>[`M${d-h/2},${-g/2}`,`a${l},${r} 0,0,0 ${h},0`].join(" "),"createInnerCylinderPathD"),Jt=8,Qt=8;async function Ds(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?24:l,p=t.look==="neo"?24:l;if(t.width||t.height){let m=t.width??0;t.width=(t.width??0)-p,t.width<Qt&&(t.width=Qt);let w=m/2/(2.5+m/50);t.height=(t.height??0)-r-w*3,t.height<Jt&&(t.height=Jt)}let{shapeSvg:i,bbox:n,label:e}=await O(d,t,_(t)),s=(t.width?t.width:n.width)+p,a=s/2,o=a/(2.5+s/50),c=(t.height?t.height:n.height)+r+o,y,{cssStyles:f}=t;if(t.look==="handDrawn"){let m=k.svg(i),u=Oa(0,0,s,c,a,o),w=ja(0,o,s,c,a,o),x=W(t,{}),S=m.path(u,x),b=m.path(w,W(t,{fill:"none"}));y=i.insert(()=>b,":first-child"),y=i.insert(()=>S,":first-child"),y.attr("class","basic label-container"),f&&y.attr("style",f)}else{let m=_a(0,0,s,c,a,o);y=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",K(f)).attr("style",g)}return y.attr("label-offset-y",o),y.attr("transform",`translate(${-s/2}, ${-(c/2+o)})`),X(t,y),e.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(m){let u=L.rect(t,m),w=u.x-(t.x??0);if(a!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(u.y-(t.y??0))>(t.height??0)/2-o)){let x=o*o*(1-w*w/(a*a));x>0&&(x=Math.sqrt(x)),x=o-x,m.y-(t.y??0)>0&&(x=-x),u.y+=x}return u},i}$(Ds,"cylinder");async function vt(d,t,h){let{labelStyles:g,nodeStyles:l}=T(t);t.labelStyle=g;let{shapeSvg:r,bbox:p}=await O(d,t,_(t)),i=Math.max(p.width+h.labelPaddingX*2,t?.width||0),n=Math.max(p.height+h.labelPaddingY*2,t?.height||0),e=-i/2,s=-n/2,a,{rx:o,ry:c}=t,{cssStyles:y}=t;if(h?.rx&&h.ry&&(o=h.rx,c=h.ry),t.look==="handDrawn"){let f=k.svg(r),m=W(t,{}),u=o||c?f.path(dt(e,s,i,n,o||0),m):f.rectangle(e,s,i,n,m);a=r.insert(()=>u,":first-child"),a.attr("class","basic label-container").attr("style",K(y))}else a=r.insert("rect",":first-child"),a.attr("class","basic label-container").attr("style",l).attr("rx",K(o)).attr("ry",K(c)).attr("x",e).attr("y",s).attr("width",i).attr("height",n);return X(t,a),t.calcIntersect=function(f,m){return L.rect(f,m)},t.intersect=function(f){return L.rect(t,f)},r}$(vt,"drawRect");async function Bs(d,t){let{cssClasses:h,labelPaddingX:g,labelPaddingY:l,padding:r,width:p,height:i}=t,n={rx:0,ry:0,classes:h??"",labelPaddingX:g??(r??0)*2,labelPaddingY:l??r??0},e=await vt(d,t,n);if(t.look==="handDrawn"){let c=k.svg(e),y=W(t,{}),f=e.select(".basic.label-container > path:nth-child(2)"),m=f.node();if(!m)return e;let u=null;if(m instanceof SVGGraphicsElement)u=m.getBBox();else return e;return e.insert(()=>c.line(u.x,u.y,u.x+u.width,u.y,y),".basic.label-container g.label"),e.insert(()=>c.line(u.x,u.y+u.height,u.x+u.width,u.y+u.height,y),".basic.label-container g.label"),f.remove(),e}let s=e.select(".basic.label-container"),a=(Number(s.attr("width"))||p)??0,o=(Number(s.attr("height"))||i)??0;return a>0&&o>0&&s.attr("stroke-dasharray",`${a} ${o}`),e}$(Bs,"datastore");async function Ms(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?16:t.padding??0,{shapeSvg:p,bbox:i,label:n}=await O(d,t,_(t)),e=i.width+l,s=i.height+r,a=s*.2,o=-e/2,c=-s/2-a/2,{cssStyles:y}=t,f=k.svg(p),m=W(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let u=[{x:o,y:c+a},{x:-o,y:c+a},{x:-o,y:-c},{x:o,y:-c},{x:o,y:c},{x:-o,y:c},{x:-o,y:c+a}],w=f.polygon(u.map(S=>[S.x,S.y]),m),x=p.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",y),g&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",g),n.attr("transform",`translate(${o+(t.padding??0)/2-(i.x-(i.left??0))}, ${c+a+(t.padding??0)/2-(i.y-(i.top??0))})`),X(t,x),t.intersect=function(S){return L.rect(t,S)},p}$(Ms,"dividedRectangle");async function Ns(d,t){let{labelStyles:h,nodeStyles:g}=T(t),l=t.look==="neo"?12:5;t.labelStyle=h;let r=t.padding??0,p=t.look==="neo"?16:r,{shapeSvg:i,bbox:n}=await O(d,t,_(t)),e=(t?.width?t?.width/2:n.width/2)+(p??0),s=e-l,a,{cssStyles:o}=t;if(t.look==="handDrawn"){let c=k.svg(i),y=W(t,{roughness:.2,strokeWidth:2.5}),f=W(t,{roughness:.2,strokeWidth:1.5}),m=c.circle(0,0,e*2,y),u=c.circle(0,0,s*2,f);a=i.insert("g",":first-child"),a.attr("class",K(t.cssClasses)).attr("style",K(o)),a.node()?.appendChild(m),a.node()?.appendChild(u)}else{a=i.insert("g",":first-child");let c=a.insert("circle",":first-child"),y=a.insert("circle");a.attr("class","basic label-container").attr("style",g),c.attr("class","outer-circle").attr("style",g).attr("r",e).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",g).attr("r",s).attr("cx",0).attr("cy",0)}return X(t,a),t.intersect=function(c){return z.info("DoubleCircle intersect",t,e,c),L.circle(t,e,c)},i}$(Ns,"doublecircle");function Cs(d,t,{config:{themeVariables:h}}){let{labelStyles:g,nodeStyles:l}=T(t);t.label="",t.labelStyle=g;let r=d.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),p=7,{cssStyles:i}=t,n=k.svg(r),{nodeBorder:e}=h,s=W(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(s.roughness=0);let a=n.circle(0,0,p*2,s),o=r.insert(()=>a,":first-child");return o.selectAll("path").attr("style",`fill: ${e} !important;`),i&&i.length>0&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",i),l&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",l),X(t,o),t.intersect=function(c){return z.info("filledCircle intersect",t,{radius:p,point:c}),L.circle(t,p,c)},r}$(Cs,"filledCircle");var Ut=10,Kt=10;async function Rs(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?l*2:l;(t.width||t.height)&&(t.height=t?.height??0,t.height<Ut&&(t.height=Ut),t.width=(t?.width??0)-r-r/2,t.width<Kt&&(t.width=Kt));let{shapeSvg:p,bbox:i,label:n}=await O(d,t,_(t)),e=(t?.width?t?.width:i.width)+(r??0),s=t?.height?t?.height:e+i.height,a=s,o=[{x:0,y:-s},{x:a,y:-s},{x:a/2,y:0}],{cssStyles:c}=t,y=k.svg(p),f=W(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let m=F(o),u=y.path(m,f),w=p.insert(()=>u,":first-child").attr("transform",`translate(${-s/2}, ${s/2})`).attr("class","outer-path");return c&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",c),g&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",g),t.width=e,t.height=s,X(t,w),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-s/2+(t.padding??0)/2+(i.y-(i.top??0))})`),t.intersect=function(x){return z.info("Triangle intersect",t,o,x),L.polygon(t,o,x)},p}$(Rs,"flippedTriangle");function As(d,t,{dir:h,config:{state:g,themeVariables:l}}){let{nodeStyles:r}=T(t);t.label="";let p=d.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,n=Math.max(70,t?.width??0),e=Math.max(10,t?.height??0);h==="LR"&&(n=Math.max(10,t?.width??0),e=Math.max(70,t?.height??0));let s=-1*n/2,a=-1*e/2,o=k.svg(p),c=W(t,{stroke:l.lineColor,fill:l.lineColor});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");let y=o.rectangle(s,a,n,e,c),f=p.insert(()=>y,":first-child");i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",r),X(t,f);let m=g?.padding??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(u){return L.rect(t,u)},p}$(As,"forkJoin");async function Hs(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=15,r=10,p=t.look==="neo"?16:t.padding??0,i=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-i*2,t.height<r&&(t.height=r),t.width=(t?.width??0)-p*2,t.width<l&&(t.width=l));let{shapeSvg:n,bbox:e}=await O(d,t,_(t)),s=(t?.width?t?.width:Math.max(l,e.width))+p*2,a=(t?.height?t?.height:Math.max(r,e.height))+i*2,o=a/2,{cssStyles:c}=t,y=k.svg(n),f=W(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let m=[{x:-s/2,y:-a/2},{x:s/2-o,y:-a/2},...Ct(-s/2+o,0,o,50,90,270),{x:s/2-o,y:a/2},{x:-s/2,y:a/2}],u=F(m),w=y.path(u,f),x=n.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",c),g&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",g),X(t,x),t.intersect=function(S){return z.info("Pill intersect",t,{radius:o,point:S}),L.polygon(t,m,S)},n}$(Hs,"halfRoundedRectangle");var Ga=$((d,t,h,g,l)=>[`M${d+l},${t}`,`L${d+h-l},${t}`,`L${d+h},${t-g/2}`,`L${d+h-l},${t-g}`,`L${d+l},${t-g}`,`L${d},${t-g/2}`,"Z"].join(" "),"createHexagonPathD");async function Ls(d,t){let{labelStyles:h,nodeStyles:g}=T(t),l=t.look==="neo"?3.5:4;t.labelStyle=h;let r=t.padding??0,p=70,i=32,n=t.look==="neo"?p:r,e=t.look==="neo"?i:r;if(t.width||t.height){let x=(t.height??0)/l;t.width=(t?.width??0)-2*x-e,t.height=(t.height??0)-n}let{shapeSvg:s,bbox:a}=await O(d,t,_(t)),o=(t?.height?t?.height:a.height)+n,c=o/l,y=(t?.width?t?.width:a.width)+2*c+e,f=[{x:c,y:0},{x:y-c,y:0},{x:y,y:-o/2},{x:y-c,y:-o},{x:c,y:-o},{x:0,y:-o/2}],m,{cssStyles:u}=t;if(t.look==="handDrawn"){let w=k.svg(s),x=W(t,{}),S=Ga(0,0,y,o,c),b=w.path(S,x);m=s.insert(()=>b,":first-child").attr("transform",`translate(${-y/2}, ${o/2})`),u&&m.attr("style",u)}else m=ft(s,y,o,f);return g&&m.attr("style",g),t.width=y,t.height=o,X(t,m),t.intersect=function(w){return L.polygon(t,f,w)},s}$(Ls,"hexagon");async function Is(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.label="",t.labelStyle=h;let{shapeSvg:l}=await O(d,t,_(t)),r=Math.max(30,t?.width??0),p=Math.max(30,t?.height??0),{cssStyles:i}=t,n=k.svg(l),e=W(t,{});t.look!=="handDrawn"&&(e.roughness=0,e.fillStyle="solid");let s=[{x:0,y:0},{x:r,y:0},{x:0,y:p},{x:r,y:p}],a=F(s),o=n.path(a,e),c=l.insert(()=>o,":first-child");return c.attr("class","basic label-container outer-path"),i&&t.look!=="handDrawn"&&c.selectChildren("path").attr("style",i),g&&t.look!=="handDrawn"&&c.selectChildren("path").attr("style",g),c.attr("transform",`translate(${-r/2}, ${-p/2})`),X(t,c),t.intersect=function(y){return z.info("Pill intersect",t,{points:s}),L.polygon(t,s,y)},l}$(Is,"hourglass");async function Ws(d,t,{config:{themeVariables:h,flowchart:g}}){let{labelStyles:l}=T(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=g?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,label:a}=await O(d,t,"icon-shape default"),o=t.pos==="t",c=i,y=i,{nodeBorder:f}=h,{stylesMap:m}=Pt(t),u=-y/2,w=-c/2,x=t.label?8:0,S=k.svg(e),b=W(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let v=S.rectangle(u,w,y,c,b),P=Math.max(y,s.width),D=c+s.height+x,B=S.rectangle(-P/2,-D/2,P,D,{...b,fill:"transparent",stroke:"none"}),M=e.insert(()=>v,":first-child"),C=e.insert(()=>B);if(t.icon){let E=e.append("g");E.html(`<g>${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let N=E.node().getBBox(),R=N.width,A=N.height,H=N.x,I=N.y;E.attr("transform",`translate(${-R/2-H},${o?s.height/2+x/2-A/2-I:-s.height/2-x/2-A/2-I})`),E.attr("style",`color: ${m.get("stroke")??f};`)}return a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${o?-D/2:D/2-s.height})`),M.attr("transform",`translate(0,${o?s.height/2+x/2:-s.height/2-x/2})`),X(t,C),t.intersect=function(E){if(z.info("iconSquare intersect",t,E),!t.label)return L.rect(t,E);let N=t.x??0,R=t.y??0,A=t.height??0,H=[];return o?H=[{x:N-s.width/2,y:R-A/2},{x:N+s.width/2,y:R-A/2},{x:N+s.width/2,y:R-A/2+s.height+x},{x:N+y/2,y:R-A/2+s.height+x},{x:N+y/2,y:R+A/2},{x:N-y/2,y:R+A/2},{x:N-y/2,y:R-A/2+s.height+x},{x:N-s.width/2,y:R-A/2+s.height+x}]:H=[{x:N-y/2,y:R-A/2},{x:N+y/2,y:R-A/2},{x:N+y/2,y:R-A/2+c},{x:N+s.width/2,y:R-A/2+c},{x:N+s.width/2/2,y:R+A/2},{x:N-s.width/2,y:R+A/2},{x:N-s.width/2,y:R-A/2+c},{x:N-y/2,y:R-A/2+c}],L.polygon(t,H,E)},e}$(Ws,"icon");async function Ts(d,t,{config:{themeVariables:h,flowchart:g}}){let{labelStyles:l}=T(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=g?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,label:a}=await O(d,t,"icon-shape default"),o=20,c=t.label?8:0,y=t.pos==="t",{nodeBorder:f,mainBkg:m}=h,{stylesMap:u}=Pt(t),w=k.svg(e),x=W(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let S=u.get("fill");x.stroke=S??m;let b=e.append("g");t.icon&&b.html(`<g>${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let v=b.node().getBBox(),P=v.width,D=v.height,B=v.x,M=v.y,C=Math.max(P,D)*Math.SQRT2+o*2,E=w.circle(0,0,C,x),N=Math.max(C,s.width),R=C+s.height+c,A=w.rectangle(-N/2,-R/2,N,R,{...x,fill:"transparent",stroke:"none"}),H=e.insert(()=>E,":first-child"),I=e.insert(()=>A);return b.attr("transform",`translate(${-P/2-B},${y?s.height/2+c/2-D/2-M:-s.height/2-c/2-D/2-M})`),b.attr("style",`color: ${u.get("stroke")??f};`),a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${y?-R/2:R/2-s.height})`),H.attr("transform",`translate(0,${y?s.height/2+c/2:-s.height/2-c/2})`),X(t,I),t.intersect=function(Y){return z.info("iconSquare intersect",t,Y),L.rect(t,Y)},e}$(Ts,"iconCircle");async function Es(d,t,{config:{themeVariables:h,flowchart:g}}){let{labelStyles:l}=T(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=g?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,halfPadding:a,label:o}=await O(d,t,"icon-shape default"),c=t.pos==="t",y=i+a*2,f=i+a*2,{nodeBorder:m,mainBkg:u}=h,{stylesMap:w}=Pt(t),x=-f/2,S=-y/2,b=t.label?8:0,v=k.svg(e),P=W(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let D=w.get("fill");P.stroke=D??u;let B=v.path(dt(x,S,f,y,5),P),M=Math.max(f,s.width),C=y+s.height+b,E=v.rectangle(-M/2,-C/2,M,C,{...P,fill:"transparent",stroke:"none"}),N=e.insert(()=>B,":first-child").attr("class","icon-shape2"),R=e.insert(()=>E);if(t.icon){let A=e.append("g");A.html(`<g>${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let H=A.node().getBBox(),I=H.width,Y=H.height,G=H.x,q=H.y;A.attr("transform",`translate(${-I/2-G},${c?s.height/2+b/2-Y/2-q:-s.height/2-b/2-Y/2-q})`),A.attr("style",`color: ${w.get("stroke")??m};`)}return o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-C/2:C/2-s.height})`),N.attr("transform",`translate(0,${c?s.height/2+b/2:-s.height/2-b/2})`),X(t,R),t.intersect=function(A){if(z.info("iconSquare intersect",t,A),!t.label)return L.rect(t,A);let H=t.x??0,I=t.y??0,Y=t.height??0,G=[];return c?G=[{x:H-s.width/2,y:I-Y/2},{x:H+s.width/2,y:I-Y/2},{x:H+s.width/2,y:I-Y/2+s.height+b},{x:H+f/2,y:I-Y/2+s.height+b},{x:H+f/2,y:I+Y/2},{x:H-f/2,y:I+Y/2},{x:H-f/2,y:I-Y/2+s.height+b},{x:H-s.width/2,y:I-Y/2+s.height+b}]:G=[{x:H-f/2,y:I-Y/2},{x:H+f/2,y:I-Y/2},{x:H+f/2,y:I-Y/2+y},{x:H+s.width/2,y:I-Y/2+y},{x:H+s.width/2/2,y:I+Y/2},{x:H-s.width/2,y:I+Y/2},{x:H-s.width/2,y:I-Y/2+y},{x:H-f/2,y:I-Y/2+y}],L.polygon(t,G,A)},e}$(Es,"iconRounded");async function Xs(d,t,{config:{themeVariables:h,flowchart:g}}){let{labelStyles:l}=T(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=g?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,halfPadding:a,label:o}=await O(d,t,"icon-shape default"),c=t.pos==="t",y=i+a*2,f=i+a*2,{nodeBorder:m,mainBkg:u}=h,{stylesMap:w}=Pt(t),x=-f/2,S=-y/2,b=t.label?8:0,v=k.svg(e),P=W(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let D=w.get("fill");P.stroke=D??u;let B=v.path(dt(x,S,f,y,.1),P),M=Math.max(f,s.width),C=y+s.height+b,E=v.rectangle(-M/2,-C/2,M,C,{...P,fill:"transparent",stroke:"none"}),N=e.insert(()=>B,":first-child"),R=e.insert(()=>E);if(t.icon){let A=e.append("g");A.html(`<g>${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let H=A.node().getBBox(),I=H.width,Y=H.height,G=H.x,q=H.y;A.attr("transform",`translate(${-I/2-G},${c?s.height/2+b/2-Y/2-q:-s.height/2-b/2-Y/2-q})`),A.attr("style",`color: ${w.get("stroke")??m};`)}return o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-C/2:C/2-s.height})`),N.attr("transform",`translate(0,${c?s.height/2+b/2:-s.height/2-b/2})`),X(t,R),t.intersect=function(A){if(z.info("iconSquare intersect",t,A),!t.label)return L.rect(t,A);let H=t.x??0,I=t.y??0,Y=t.height??0,G=[];return c?G=[{x:H-s.width/2,y:I-Y/2},{x:H+s.width/2,y:I-Y/2},{x:H+s.width/2,y:I-Y/2+s.height+b},{x:H+f/2,y:I-Y/2+s.height+b},{x:H+f/2,y:I+Y/2},{x:H-f/2,y:I+Y/2},{x:H-f/2,y:I-Y/2+s.height+b},{x:H-s.width/2,y:I-Y/2+s.height+b}]:G=[{x:H-f/2,y:I-Y/2},{x:H+f/2,y:I-Y/2},{x:H+f/2,y:I-Y/2+y},{x:H+s.width/2,y:I-Y/2+y},{x:H+s.width/2/2,y:I+Y/2},{x:H-s.width/2,y:I+Y/2},{x:H-s.width/2,y:I-Y/2+y},{x:H-f/2,y:I-Y/2+y}],L.polygon(t,G,A)},e}$(Xs,"iconSquare");async function Ys(d,t,{config:{flowchart:h}}){let g=new Image;g.src=t?.img??"",await g.decode();let l=Number(g.naturalWidth.toString().replace("px","")),r=Number(g.naturalHeight.toString().replace("px",""));t.imageAspectRatio=l/r;let{labelStyles:p}=T(t);t.labelStyle=p;let i=h?.wrappingWidth;t.defaultWidth=h?.wrappingWidth;let n=Math.max(t.label?i??0:0,t?.assetWidth??l),e=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:n,s=t.constraint==="on"?e/t.imageAspectRatio:t?.assetHeight??r;t.width=Math.max(e,i??0);let{shapeSvg:a,bbox:o,label:c}=await O(d,t,"image-shape default"),y=t.pos==="t",f=-e/2,m=-s/2,u=t.label?8:0,w=k.svg(a),x=W(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let S=w.rectangle(f,m,e,s,x),b=Math.max(e,o.width),v=s+o.height+u,P=w.rectangle(-b/2,-v/2,b,v,{...x,fill:"none",stroke:"none"}),D=a.insert(()=>S,":first-child"),B=a.insert(()=>P);if(t.img){let M=a.append("image");M.attr("href",t.img),M.attr("width",e),M.attr("height",s),M.attr("preserveAspectRatio","none"),M.attr("transform",`translate(${-e/2},${y?v/2-s:-v/2})`)}return c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${y?-s/2-o.height/2-u/2:s/2-o.height/2+u/2})`),D.attr("transform",`translate(0,${y?o.height/2+u/2:-o.height/2-u/2})`),X(t,B),t.intersect=function(M){if(z.info("iconSquare intersect",t,M),!t.label)return L.rect(t,M);let C=t.x??0,E=t.y??0,N=t.height??0,R=[];return y?R=[{x:C-o.width/2,y:E-N/2},{x:C+o.width/2,y:E-N/2},{x:C+o.width/2,y:E-N/2+o.height+u},{x:C+e/2,y:E-N/2+o.height+u},{x:C+e/2,y:E+N/2},{x:C-e/2,y:E+N/2},{x:C-e/2,y:E-N/2+o.height+u},{x:C-o.width/2,y:E-N/2+o.height+u}]:R=[{x:C-e/2,y:E-N/2},{x:C+e/2,y:E-N/2},{x:C+e/2,y:E-N/2+s},{x:C+o.width/2,y:E-N/2+s},{x:C+o.width/2/2,y:E+N/2},{x:C-o.width/2,y:E+N/2},{x:C-o.width/2,y:E-N/2+s},{x:C-e/2,y:E-N/2+s}],L.polygon(t,R,M)},a}$(Ys,"imageSquare");async function _s(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=l,p=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await O(d,t,_(t)),e=Math.max(n.width+(p??0)*2,t?.width??0),s=Math.max(n.height+(r??0)*2,t?.height??0),a=[{x:0,y:0},{x:e,y:0},{x:e+3*s/6,y:-s},{x:-3*s/6,y:-s}],o,{cssStyles:c}=t;if(t.look==="handDrawn"){let y=k.svg(i),f=W(t,{}),m=F(a),u=y.path(m,f);o=i.insert(()=>u,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),c&&o.attr("style",c)}else o=ft(i,e,s,a);return g&&o.attr("style",g),t.width=e,t.height=s,X(t,o),t.intersect=function(y){return L.polygon(t,a,y)},i}$(_s,"inv_trapezoid");async function Os(d,t){let{shapeSvg:h,bbox:g,label:l}=await O(d,t,"label"),r=h.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),h.attr("class","label edgeLabel"),l.attr("transform",`translate(${-(g.width/2)-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),X(t,r),t.intersect=function(n){return L.rect(t,n)},h}$(Os,"labelRect");async function js(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=l,p=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await O(d,t,_(t)),e=(t?.height??n.height)+r,s=(t?.width??n.width)+p,a=[{x:0,y:0},{x:s+3*e/6,y:0},{x:s,y:-e},{x:-(3*e)/6,y:-e}],o,{cssStyles:c}=t;if(t.look==="handDrawn"){let y=k.svg(i),f=W(t,{}),m=F(a),u=y.path(m,f);o=i.insert(()=>u,":first-child").attr("transform",`translate(${-s/2}, ${e/2})`),c&&o.attr("style",c)}else o=ft(i,s,e,a);return g&&o.attr("style",g),t.width=s,t.height=e,X(t,o),t.intersect=function(y){return L.polygon(t,a,y)},i}$(js,"lean_left");async function Gs(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=l,p=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await O(d,t,_(t)),e=(t?.height??n.height)+r,s=(t?.width??n.width)+p,a=[{x:-3*e/6,y:0},{x:s,y:0},{x:s+3*e/6,y:-e},{x:0,y:-e}],o,{cssStyles:c}=t;if(t.look==="handDrawn"){let y=k.svg(i),f=W(t,{}),m=F(a),u=y.path(m,f);o=i.insert(()=>u,":first-child").attr("transform",`translate(${-s/2}, ${e/2})`),c&&o.attr("style",c)}else o=ft(i,s,e,a);return g&&o.attr("style",g),t.width=s,t.height=e,X(t,o),t.intersect=function(y){return L.polygon(t,a,y)},i}$(Gs,"lean_right");function Fs(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.label="",t.labelStyle=h;let l=d.insert("g").attr("class",_(t)).attr("id",t.domId??t.id),{cssStyles:r}=t,p=Math.max(35,t?.width??0),i=Math.max(35,t?.height??0),n=7,e=[{x:p,y:0},{x:0,y:i+n/2},{x:p-2*n,y:i+n/2},{x:0,y:2*i},{x:p,y:i-n/2},{x:2*n,y:i-n/2}],s=k.svg(l),a=W(t,{});t.look!=="handDrawn"&&(a.roughness=0,a.fillStyle="solid");let o=F(e),c=s.path(o,a),y=l.insert(()=>c,":first-child");return y.attr("class","outer-path"),r&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",r),g&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",g),y.attr("transform",`translate(-${p/2},${-i})`),X(t,y),t.intersect=function(f){return z.info("lightningBolt intersect",t,f),L.polygon(t,e,f)},l}$(Fs,"lightningBolt");var Fa=$((d,t,h,g,l,r,p)=>[`M${d},${t+r}`,`a${l},${r} 0,0,0 ${h},0`,`a${l},${r} 0,0,0 ${-h},0`,`l0,${g}`,`a${l},${r} 0,0,0 ${h},0`,`l0,${-g}`,`M${d},${t+r+p}`,`a${l},${r} 0,0,0 ${h},0`].join(" "),"createCylinderPathD"),qa=$((d,t,h,g,l,r,p)=>[`M${d},${t+r}`,`M${d+h},${t+r}`,`a${l},${r} 0,0,0 ${-h},0`,`l0,${g}`,`a${l},${r} 0,0,0 ${h},0`,`l0,${-g}`,`M${d},${t+r+p}`,`a${l},${r} 0,0,0 ${h},0`].join(" "),"createOuterCylinderPathD"),za=$((d,t,h,g,l,r)=>[`M${d-h/2},${-g/2}`,`a${l},${r} 0,0,0 ${h},0`].join(" "),"createInnerCylinderPathD"),ts=10,ss=10;async function qs(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?24:l;if(t.width||t.height){let u=t.width??0;t.width=(t.width??0)-r,t.width<ss&&(t.width=ss);let x=u/2/(2.5+u/50);t.height=(t.height??0)-p-x*3,t.height<ts&&(t.height=ts)}let{shapeSvg:i,bbox:n,label:e}=await O(d,t,_(t)),s=(t?.width?t?.width:n.width)+r*2,a=s/2,o=a/(2.5+s/50),c=(t?.height?t?.height:n.height)+o+p*2,y=c*.1,f,{cssStyles:m}=t;if(t.look==="handDrawn"){let u=k.svg(i),w=qa(0,0,s,c,a,o,y),x=za(0,o,s,c,a,o),S=W(t,{}),b=u.path(w,S),v=u.path(x,S);i.insert(()=>v,":first-child").attr("class","line"),f=i.insert(()=>b,":first-child"),f.attr("class","basic label-container"),m&&f.attr("style",m)}else{let u=Fa(0,0,s,c,a,o,y);f=i.insert("path",":first-child").attr("d",u).attr("class","basic label-container outer-path").attr("style",K(m)).attr("style",g)}return f.attr("label-offset-y",o),f.attr("transform",`translate(${-s/2}, ${-(c/2+o)})`),X(t,f),e.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+o-(n.y-(n.top??0))})`),t.intersect=function(u){let w=L.rect(t,u),x=w.x-(t.x??0);if(a!=0&&(Math.abs(x)<(t.width??0)/2||Math.abs(x)==(t.width??0)/2&&Math.abs(w.y-(t.y??0))>(t.height??0)/2-o)){let S=o*o*(1-x*x/(a*a));S>0&&(S=Math.sqrt(S)),S=o-S,u.y-(t.y??0)>0&&(S=-S),w.y+=S}return w},i}$(qs,"linedCylinder");async function zs(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l;if(t.width||t.height){let S=t.width;t.width=(S??0)*10/11-r*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-p*2,t.height<10&&(t.height=10)}let{shapeSvg:i,bbox:n,label:e}=await O(d,t,_(t)),s=(t?.width?t?.width:n.width)+(r??0)*2,a=(t?.height?t?.height:n.height)+(p??0)*2,o=t.look==="neo"?a/4:a/8,c=a+o,{cssStyles:y}=t,f=k.svg(i),m=W(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let u=[{x:-s/2-s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:c/2},...ut(-s/2-s/2*.1,c/2,s/2+s/2*.1,c/2,o,.8),{x:s/2+s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:-c/2},{x:-s/2,y:-c/2},{x:-s/2,y:c/2*1.1},{x:-s/2,y:-c/2}],w=f.polygon(u.map(S=>[S.x,S.y]),m),x=i.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",y),g&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",g),x.attr("transform",`translate(0,${-o/2})`),e.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-a/2+(t.padding??0)-o/2-(n.y-(n.top??0))})`),X(t,x),t.intersect=function(S){return L.polygon(t,u,S)},i}$(zs,"linedWaveEdgedRect");async function Vs(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2-2*i,10),t.height=Math.max((t?.height??0)-p*2-2*i,10));let{shapeSvg:n,bbox:e,label:s}=await O(d,t,_(t)),a=(t?.width?t?.width:e.width)+r*2+2*i,o=(t?.height?t?.height:e.height)+p*2+2*i,c=a-2*i,y=o-2*i,f=-c/2,m=-y/2,{cssStyles:u}=t,w=k.svg(n),x=W(t,{}),S=[{x:f-i,y:m+i},{x:f-i,y:m+y+i},{x:f+c-i,y:m+y+i},{x:f+c-i,y:m+y},{x:f+c,y:m+y},{x:f+c,y:m+y-i},{x:f+c+i,y:m+y-i},{x:f+c+i,y:m-i},{x:f+i,y:m-i},{x:f+i,y:m},{x:f,y:m},{x:f,y:m+i}],b=[{x:f,y:m+i},{x:f+c-i,y:m+i},{x:f+c-i,y:m+y},{x:f+c,y:m+y},{x:f+c,y:m},{x:f,y:m}];t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let v=F(S),P=w.path(v,x),D=F(b),B=w.path(D,x);t.look!=="handDrawn"&&(P=_t(P),B=_t(B));let M=n.insert("g",":first-child");return M.insert(()=>P),M.insert(()=>B),M.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",u),g&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",g),s.attr("transform",`translate(${-(e.width/2)-i-(e.x-(e.left??0))}, ${-(e.height/2)+i-(e.y-(e.top??0))})`),X(t,M),t.intersect=function(C){return L.polygon(t,S,C)},n}$(Vs,"multiRect");async function Zs(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let{shapeSvg:l,bbox:r,label:p}=await O(d,t,_(t)),i=t.padding??0,n=t.look==="neo"?16:i,e=t.look==="neo"?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-n*2,t.height=(t?.height??0)-e*3);let a=Math.max(r.width,t?.width??0)+n*2,o=Math.max(r.height,t?.height??0)+e*3,c=t.look==="neo"?o/4:o/8,y=o+(s?c/2:-c/2),f=-a/2,m=-y/2,u=10,{cssStyles:w}=t,x=ut(f-u,m+y+u,f+a-u,m+y+u,c,.8),S=x?.[x.length-1],b=[{x:f-u,y:m+u},{x:f-u,y:m+y+u},...x,{x:f+a-u,y:S.y-u},{x:f+a,y:S.y-u},{x:f+a,y:S.y-2*u},{x:f+a+u,y:S.y-2*u},{x:f+a+u,y:m-u},{x:f+u,y:m-u},{x:f+u,y:m},{x:f,y:m},{x:f,y:m+u}],v=[{x:f,y:m+u},{x:f+a-u,y:m+u},{x:f+a-u,y:S.y-u},{x:f+a,y:S.y-u},{x:f+a,y:m},{x:f,y:m}],P=k.svg(l),D=W(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let B=F(b),M=P.path(B,D),C=F(v),E=P.path(C,D),N=l.insert(()=>M,":first-child");return N.insert(()=>E),N.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",w),g&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",g),N.attr("transform",`translate(0,${-c/2})`),p.attr("transform",`translate(${-(r.width/2)-u-(r.x-(r.left??0))}, ${-(r.height/2)+u-c/2-(r.y-(r.top??0))})`),X(t,N),t.intersect=function(R){return L.polygon(t,b,R)},l}$(Zs,"multiWaveEdgedRectangle");async function Js(d,t,{config:{themeVariables:h}}){let{labelStyles:g,nodeStyles:l}=T(t);t.labelStyle=g,t.useHtmlLabels||it(bt())||(t.centerLabel=!0);let{shapeSvg:p,bbox:i,label:n}=await O(d,t,_(t)),e=Math.max(i.width+(t.padding??0)*2,t?.width??0),s=Math.max(i.height+(t.padding??0)*2,t?.height??0),a=-e/2,o=-s/2,{cssStyles:c}=t,y=k.svg(p),f=W(t,{fill:h.noteBkgColor,stroke:h.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let m=y.rectangle(a,o,e,s,f),u=p.insert(()=>m,":first-child");return u.attr("class","basic label-container outer-path"),n.attr("class","label noteLabel"),c&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",c),l&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",l),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),X(t,u),t.intersect=function(w){return L.rect(t,w)},p}$(Js,"note");var Va=$((d,t,h)=>[`M${d+h/2},${t}`,`L${d+h},${t-h/2}`,`L${d+h/2},${t-h}`,`L${d},${t-h/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Qs(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let{shapeSvg:l,bbox:r}=await O(d,t,_(t)),p=r.width+(t.padding??0),i=r.height+(t.padding??0),n=p+i,e=.5,s=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],a,{cssStyles:o}=t;if(t.look==="handDrawn"){let c=k.svg(l),y=W(t,{}),f=Va(0,0,n),m=c.path(f,y);a=l.insert(()=>m,":first-child").attr("transform",`translate(${-n/2+e}, ${n/2})`),o&&a.attr("style",o)}else a=ft(l,n,n,s),a.attr("transform",`translate(${-n/2+e}, ${n/2})`);return g&&a.attr("style",g),X(t,a),t.calcIntersect=function(c,y){let f=c.width,m=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}],u=L.polygon(c,m,y);return{x:u.x-.5,y:u.y-.5}},t.intersect=function(c){return this.calcIntersect(t,c)},l}$(Qs,"question");async function Us(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?21:l??0,p=t.look==="neo"?12:l??0,{shapeSvg:i,bbox:n,label:e}=await O(d,t,_(t)),s=(t?.width??n.width)+(t.look==="neo"?r*2:r),a=(t?.height??n.height)+(t.look==="neo"?p*2:p),o=-s/2,c=-a/2,y=c/2,f=[{x:o+y,y:c},{x:o,y:0},{x:o+y,y:-c},{x:-o,y:-c},{x:-o,y:c}],{cssStyles:m}=t,u=k.svg(i),w=W(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let x=F(f),S=u.path(x,w),b=i.insert(()=>S,":first-child");return b.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",m),g&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",g),b.attr("transform",`translate(${-y/2},0)`),e.attr("transform",`translate(${-y/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),X(t,b),t.intersect=function(v){return L.polygon(t,f,v)},i}$(Us,"rect_left_inv_arrow");async function Ks(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l;t.cssClasses?l="node "+t.cssClasses:l="node default";let r=d.insert("g").attr("class",l).attr("id",t.domId||t.id),p=r.insert("g"),i=r.insert("g").attr("class","label").attr("style",g),n=t.description,e=t.label,s=await At(i,e,t.labelStyle,!0,!0),a={width:0,height:0};if(it(Q())){let D=s.children[0],B=Z(s);a=D.getBoundingClientRect(),B.attr("width",a.width),B.attr("height",a.height)}z.info("Text 2",n);let o=n||[],c=s.getBBox(),y=await At(i,Array.isArray(o)?o.join("<br/>"):o,t.labelStyle,!0,!0),f=y.children[0],m=Z(y);a=f.getBoundingClientRect(),m.attr("width",a.width),m.attr("height",a.height);let u=(t.padding||0)/2;Z(y).attr("transform","translate( "+(a.width>c.width?0:(c.width-a.width)/2)+", "+(c.height+u+5)+")"),Z(s).attr("transform","translate( "+(a.width<c.width?0:-(c.width-a.width)/2)+", 0)"),a=i.node().getBBox(),i.attr("transform","translate("+-a.width/2+", "+(-a.height/2-u+3)+")");let w=a.width+(t.padding||0),x=a.height+(t.padding||0),S=-a.width/2-u,b=-a.height/2-u,v,P;if(t.look==="handDrawn"){let D=k.svg(r),B=W(t,{}),M=D.path(dt(S,b,w,x,t.rx||0),B),C=D.line(-a.width/2-u,-a.height/2-u+c.height+u,a.width/2+u,-a.height/2-u+c.height+u,B);P=r.insert(()=>(z.debug("Rough node insert CXC",M),C),":first-child"),v=r.insert(()=>(z.debug("Rough node insert CXC",M),M),":first-child")}else v=p.insert("rect",":first-child"),P=p.insert("line"),v.attr("class","outer title-state").attr("style",g).attr("x",-a.width/2-u).attr("y",-a.height/2-u).attr("width",a.width+(t.padding||0)).attr("height",a.height+(t.padding||0)),P.attr("class","divider").attr("x1",-a.width/2-u).attr("x2",a.width/2+u).attr("y1",-a.height/2-u+c.height+u).attr("y2",-a.height/2-u+c.height+u);return X(t,v),t.intersect=function(D){return L.rect(t,D)},r}$(Ks,"rectWithTitle");async function ta(d,t,{config:{themeVariables:h}}){let g=h?.radius??5,l={rx:g,ry:g,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return vt(d,t,l)}$(ta,"roundedRect");var wt=8;async function sa(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?12:t.padding??0,{shapeSvg:p,bbox:i,label:n}=await O(d,t,_(t)),e=(t?.width??i.width)+l*2+(t.look==="neo"?wt:wt*2),s=(t?.height??i.height)+r*2,a=e-wt,o=s,c=wt-e/2,y=-s/2,{cssStyles:f}=t,m=k.svg(p),u=W(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let w=[{x:c,y},{x:c+a,y},{x:c+a,y:y+o},{x:c-wt,y:y+o},{x:c-wt,y},{x:c,y},{x:c,y:y+o}],x=m.polygon(w.map(b=>[b.x,b.y]),u),S=p.insert(()=>x,":first-child");return S.attr("class","basic label-container outer-path").attr("style",K(f)),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),n.attr("transform",`translate(${wt/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),X(t,S),t.intersect=function(b){return L.rect(t,b)},p}$(sa,"shadedProcess");async function aa(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2,10),t.height=Math.max((t?.height??0)/1.5-p*2,10));let{shapeSvg:i,bbox:n,label:e}=await O(d,t,_(t)),s=(t?.width?t?.width:n.width)+r*2,a=((t?.height?t?.height:n.height)+p*2)*1.5,o=s,c=a/1.5,y=-o/2,f=-c/2,{cssStyles:m}=t,u=k.svg(i),w=W(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let x=[{x:y,y:f},{x:y,y:f+c},{x:y+o,y:f+c},{x:y+o,y:f-c/2}],S=F(x),b=u.path(S,w),v=i.insert(()=>b,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",m),g&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",g),v.attr("transform",`translate(0, ${c/4})`),e.attr("transform",`translate(${-o/2+(t.padding??0)-(n.x-(n.left??0))}, ${-c/4+(t.padding??0)-(n.y-(n.top??0))})`),X(t,v),t.intersect=function(P){return L.polygon(t,x,P)},i}$(aa,"slopedRect");async function ea(d,t){let h=t.padding??0,g=t.look==="neo"?16:h*2,l=t.look==="neo"?12:h,r={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??g,labelPaddingY:l};return vt(d,t,r)}$(ea,"squareRect");async function ia(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?20:l,p=t.look==="neo"?12:l,{shapeSvg:i,bbox:n}=await O(d,t,_(t)),e=n.height+(t.look==="neo"?p*2:p),s=n.width+e/4+(t.look==="neo"?r*2:r),a=e/2,{cssStyles:o}=t,c=k.svg(i),y=W(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let f=[{x:-s/2+a,y:-e/2},{x:s/2-a,y:-e/2},...Ct(-s/2+a,0,a,50,90,270),{x:s/2-a,y:e/2},...Ct(s/2-a,0,a,50,270,450)],m=F(f),u=c.path(m,y),w=i.insert(()=>u,":first-child");return w.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",o),g&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",g),X(t,w),t.intersect=function(x){return L.polygon(t,f,x)},i}$(ia,"stadium");async function ra(d,t){let h={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return vt(d,t,h)}$(ra,"state");function la(d,t,{config:{themeVariables:h}}){let{labelStyles:g,nodeStyles:l}=T(t);t.labelStyle=g;let{cssStyles:r}=t,{lineColor:p,stateBorder:i,nodeBorder:n,nodeShadow:e}=h;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let s=d.insert("g").attr("class","node default").attr("id",t.domId??t.id),a=k.svg(s),o=W(t,{});t.look!=="handDrawn"&&(o.roughness=0,o.fillStyle="solid");let c=a.circle(0,0,t.width,{...o,stroke:p,strokeWidth:2}),y=i??n,f=(t.width??0)*5/14,m=a.circle(0,0,f,{...o,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),u=s.insert(()=>c,":first-child");if(u.insert(()=>m),t.look!=="handDrawn"&&u.attr("class","outer-path"),r&&u.selectAll("path").attr("style",r),l&&u.selectAll("path").attr("style",l),t.width<25&&e&&t.look!=="handDrawn"){let w=d.node()?.ownerSVGElement?.id??"",x=w?`${w}-drop-shadow-small`:"drop-shadow-small";u.attr("style",`filter:url(#${x})`)}return X(t,u),t.intersect=function(w){return L.circle(t,(t.width??0)/2,w)},s}$(la,"stateEnd");function na(d,t,{config:{themeVariables:h}}){let{lineColor:g,nodeShadow:l}=h;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let r=d.insert("g").attr("class","node default").attr("id",t.domId||t.id),p;if(t.look==="handDrawn"){let n=k.svg(r).circle(0,0,t.width,Vt(g));p=r.insert(()=>n),p.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else p=r.insert("circle",":first-child"),p.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&l&&t.look!=="handDrawn"){let i=d.node()?.ownerSVGElement?.id??"",n=i?`${i}-drop-shadow-small`:"drop-shadow-small";p.attr("style",`filter:url(#${n})`)}return X(t,p),t.intersect=function(i){return L.circle(t,(t.width??7)/2,i)},r}$(na,"stateStart");var St=8;async function ca(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t?.padding??8,r=t.look==="neo"?28:l,p=t.look==="neo"?12:l,{shapeSvg:i,bbox:n}=await O(d,t,_(t)),e=(t?.width??n.width)+2*St+r,s=(t?.height??n.height)+p,a=e-2*St,o=s,c=-e/2,y=-s/2,f=[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}];if(t.look==="handDrawn"){let m=k.svg(i),u=W(t,{}),w=m.rectangle(c,y,a+16,o,u),x=m.line(c+St,y,c+St,y+o,u),S=m.line(c+St+a,y,c+St+a,y+o,u);i.insert(()=>x,":first-child"),i.insert(()=>S,":first-child");let b=i.insert(()=>w,":first-child"),{cssStyles:v}=t;b.attr("class","basic label-container").attr("style",K(v)),X(t,b)}else{let m=ft(i,a,o,f);g&&m.attr("style",g),X(t,m)}return t.intersect=function(m){return L.polygon(t,f,m)},i}$(ca,"subroutine");var Yt=.2;async function oa(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-p*2,10),t.width=Math.max((t?.width??0)-r*2-Yt*(t.height+p*2),10));let{shapeSvg:i,bbox:n}=await O(d,t,_(t)),e=(t?.height?t?.height:n.height)+p*2,s=Yt*e,a=Yt*e,c=(t?.width?t?.width:n.width)+r*2+s-s,y=e,f=-c/2,m=-y/2,{cssStyles:u}=t,w=k.svg(i),x=W(t,{}),S=[{x:f-s/2,y:m},{x:f+c+s/2,y:m},{x:f+c+s/2,y:m+y},{x:f-s/2,y:m+y}],b=[{x:f+c-s/2,y:m+y},{x:f+c+s/2,y:m+y},{x:f+c+s/2,y:m+y-a}];t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let v=F(S),P=w.path(v,x),D=F(b),B=w.path(D,{...x,fillStyle:"solid"}),M=i.insert(()=>B,":first-child");return M.insert(()=>P,":first-child"),M.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",u),g&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",g),X(t,M),t.intersect=function(C){return L.polygon(t,S,C)},i}$(oa,"taggedRect");async function ha(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let{shapeSvg:l,bbox:r,label:p}=await O(d,t,_(t)),i=Math.max(r.width+(t.padding??0)*2,t?.width??0),n=Math.max(r.height+(t.padding??0)*2,t?.height??0),e=n/8,s=.2*i,a=.2*n,o=n+e,{cssStyles:c}=t,y=k.svg(l),f=W(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let m=[{x:-i/2-i/2*.1,y:o/2},...ut(-i/2-i/2*.1,o/2,i/2+i/2*.1,o/2,e,.8),{x:i/2+i/2*.1,y:-o/2},{x:-i/2-i/2*.1,y:-o/2}],u=-i/2+i/2*.1,w=-o/2-a*.4,x=[{x:u+i-s,y:(w+n)*1.3},{x:u+i,y:w+n-a},{x:u+i,y:(w+n)*.9},...ut(u+i,(w+n)*1.25,u+i-s,(w+n)*1.3,-n*.02,.5)],S=F(m),b=y.path(S,f),v=F(x),P=y.path(v,{...f,fillStyle:"solid"}),D=l.insert(()=>P,":first-child");return D.insert(()=>b,":first-child"),D.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",c),g&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",g),D.attr("transform",`translate(0,${-e/2})`),p.attr("transform",`translate(${-i/2+(t.padding??0)-(r.x-(r.left??0))},${-n/2+(t.padding??0)-e/2-(r.y-(r.top??0))})`),X(t,D),t.intersect=function(B){return L.polygon(t,m,B)},l}$(ha,"taggedWaveEdgedRectangle");async function ga(d,t){let{labelStyles:h,nodeStyles:g}=T(t);t.labelStyle=h;let{shapeSvg:l,bbox:r}=await O(d,t,_(t)),p=Math.max(r.width+(t.padding??0),t?.width||0),i=Math.max(r.height+(t.padding??0),t?.height||0),n=-p/2,e=-i/2,s=l.insert("rect",":first-child");return s.attr("class","text").attr("style",g).attr("rx",0).attr("ry",0).attr("x",n).attr("y",e).attr("width",p).attr("height",i),X(t,s),t.intersect=function(a){return L.rect(t,a)},l}$(ga,"text");var Za=$((d,t,h,g,l,r)=>`M${d},${t}
|
|
3
3
|
a${l},${r} 0,0,1 0,${-g}
|
|
4
4
|
l${h},0
|