@tickernelz/paperclip-pro-ui 2026.1006.0 → 2026.1006.2
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/assets/{AgentAvatar-D6FB0fuO.js → AgentAvatar-lnkDMHMh.js} +1 -1
- package/dist/assets/AgentIdentity-Cpb2VddX.js +1 -0
- package/dist/assets/Agents.production-pGUwDC7r.js +2 -0
- package/dist/assets/CompanyActivity.production-ZGgxxisV.js +1 -0
- package/dist/assets/{CompanyExport-BX6imgeR.js → CompanyExport-GeY3_TXI.js} +4 -4
- package/dist/assets/CompanySkills.production-BN9MKK7o.js +10 -0
- package/dist/assets/{Costs.production-CfN-y0WT.js → Costs.production-B4oABBSg.js} +1 -1
- package/dist/assets/EmptyState-CqqJOoXs.js +1 -0
- package/dist/assets/MarkdownBody-CEnh9lVM.js +16 -0
- package/dist/assets/{MarkdownEditor-BGjNjqa2.js → MarkdownEditor-seU_oAfy.js} +38 -38
- package/dist/assets/{OrgChart.production-BQUvMu4Q.js → OrgChart.production-JOfw43w3.js} +1 -1
- package/dist/assets/{PageSkeleton-CgAHzFTc.js → PageSkeleton-C9WV_Qyq.js} +1 -1
- package/dist/assets/RoutineDetail.production-A472lDXj.js +1 -0
- package/dist/assets/RoutineRunVariablesDialog-yR5DLc68.js +5 -0
- package/dist/assets/Routines.production-LvomJjv8.js +1 -0
- package/dist/assets/{SidebarContext-C7OpDbXX.js → SidebarContext-Dpto7Kf2.js} +1 -1
- package/dist/assets/StatusIcon-BtBa0xK_.js +1 -0
- package/dist/assets/{abnfDiagram-VCTEODGH-wiE_K2ku.js → abnfDiagram-VCTEODGH-CElI5h6o.js} +1 -1
- package/dist/assets/agent-avatar-url-270oGkoO.js +92 -0
- package/dist/assets/agents-BlxRXAz3.js +1 -0
- package/dist/assets/{architectureDiagram-5GKGNRK7-BkhBoP5_.js → architectureDiagram-5GKGNRK7-DUBpjYei.js} +1 -1
- package/dist/assets/{badge-dhlY-PQY.js → badge-D0Ti-OuU.js} +1 -1
- package/dist/assets/{blockDiagram-I7D4REHJ-fyVn7r-9.js → blockDiagram-I7D4REHJ-CD5_3VhC.js} +1 -1
- package/dist/assets/bot-CGOpwPIZ.js +1 -0
- package/dist/assets/boxes-xBZV8xLw.js +41 -0
- package/dist/assets/button-DLWREze0.js +1 -0
- package/dist/assets/{c4Diagram-7LVT6UL2-BqC3qTZS.js → c4Diagram-7LVT6UL2-CSASNZeo.js} +1 -1
- package/dist/assets/{card-DmOCHnV1.js → card-Qk8smcrQ.js} +1 -1
- package/dist/assets/channel-CtmRoUn0.js +1 -0
- package/dist/assets/check-5Tuqm2aI.js +1 -0
- package/dist/assets/checkbox-SNvdBfci.js +1 -0
- package/dist/assets/chevron-down-ZMnYk9j3.js +1 -0
- package/dist/assets/chevron-right-Dv6dHZgu.js +1 -0
- package/dist/assets/{chunk-4HAMMTFA-CGGd_Pxz.js → chunk-4HAMMTFA-Duh1dbZg.js} +1 -1
- package/dist/assets/{chunk-75Z2AOVW-BaPl5WA6.js → chunk-75Z2AOVW-CTyOxDW3.js} +1 -1
- package/dist/assets/{chunk-DU6HZSFF-2P5iNHqg.js → chunk-DU6HZSFF-mLZ_DAj9.js} +17 -17
- package/dist/assets/{chunk-F27PBJKO-Ci7GmRgM.js → chunk-F27PBJKO-BI6MjXNA.js} +1 -1
- package/dist/assets/{chunk-GMAD6QVW-BfvaaEBW.js → chunk-GMAD6QVW-Vk29EsOn.js} +1 -1
- package/dist/assets/{chunk-GVQU2GXP-Cwp_Wpj2.js → chunk-GVQU2GXP-D5bNpR4K.js} +1 -1
- package/dist/assets/{chunk-IMKFNOWR-BjXu-u1C.js → chunk-IMKFNOWR-DlfITCc_.js} +1 -1
- package/dist/assets/{chunk-L3NEJ4N5-JUd1UqX1.js → chunk-L3NEJ4N5-GADujcju.js} +1 -1
- package/dist/assets/{chunk-OSK3NFVY-DlrxddG-.js → chunk-OSK3NFVY-BfvIkdmA.js} +1 -1
- package/dist/assets/{chunk-P2QGCYS3-CjqEi3mx.js → chunk-P2QGCYS3-DD1uZyrA.js} +1 -1
- package/dist/assets/{chunk-POPQ4Y6H-BytmIqFc.js → chunk-POPQ4Y6H-B0MtQqlF.js} +1 -1
- package/dist/assets/{chunk-PWAF6VOD-CR3rNBNB.js → chunk-PWAF6VOD-DHqPPKbd.js} +1 -1
- package/dist/assets/{chunk-SHT3W25Y-B1Klag0Z.js → chunk-SHT3W25Y-CorllSkN.js} +1 -1
- package/dist/assets/{chunk-SVP7TREG-A4BO1_5v.js → chunk-SVP7TREG-BNLl-Ok9.js} +1 -1
- package/dist/assets/{chunk-TICWLB2K-B4lRXha0.js → chunk-TICWLB2K-BWKPkn9E.js} +1 -1
- package/dist/assets/classDiagram-ZZMXUADV-DDCCAOna.js +1 -0
- package/dist/assets/classDiagram-v2-VYDZK3BY-DDCCAOna.js +1 -0
- package/dist/assets/clipboard-BPoFQAy2.js +1 -0
- package/dist/assets/{company-members-BCWB1iQ_.js → company-members-BKdmkDTe.js} +1 -1
- package/dist/assets/{cynefinDiagram-5FMLGOSQ-Qp2NNXUx.js → cynefinDiagram-5FMLGOSQ-CGZNoppH.js} +1 -1
- package/dist/assets/{dagre-GXQ25YYZ-C1bu-Sbk.js → dagre-GXQ25YYZ-D0kXJo1b.js} +1 -1
- package/dist/assets/{definition-B0A7Y2Kz.js → definition-DTQCzcR3.js} +1 -1
- package/dist/assets/{diagram-S7CK7UJ4-D0cqRe3j.js → diagram-S7CK7UJ4-BMOu70sn.js} +1 -1
- package/dist/assets/{diagram-UQ7AKVKN-DdEgR6LR.js → diagram-UQ7AKVKN-dAmEsEgr.js} +1 -1
- package/dist/assets/{diagram-VSXAHHWV-B_APewr5.js → diagram-VSXAHHWV-zD92DhH2.js} +1 -1
- package/dist/assets/{diagram-VX7I27RA-B2quR8-z.js → diagram-VX7I27RA-C6F4NzHd.js} +1 -1
- package/dist/assets/{diagram-Z3DM3KII-BpQRCt5N.js → diagram-Z3DM3KII-BxGljaP6.js} +1 -1
- package/dist/assets/{dist-CJ2IjArq.js → dist-BzPgY729.js} +1 -1
- package/dist/assets/{dist-C0aY0Z9q.js → dist-DvMfIbJ9.js} +1 -1
- package/dist/assets/{ebnfDiagram-PWID7BFC-C9x73jSZ.js → ebnfDiagram-PWID7BFC-DFhVsGcz.js} +1 -1
- package/dist/assets/{environments-DgYKMH7B.js → environments-BNSxsEsE.js} +1 -1
- package/dist/assets/{erDiagram-RLTQ6QDP-Dkp7z94L.js → erDiagram-RLTQ6QDP-CExzemcW.js} +1 -1
- package/dist/assets/external-link-rfTzFbSd.js +1 -0
- package/dist/assets/file-text-dks7zWRZ.js +1 -0
- package/dist/assets/flowDiagram-HODETNUW-DEjrdPyS.js +1 -0
- package/dist/assets/{ganttDiagram-EL5Y4UJY-CJs7mNJX.js → ganttDiagram-EL5Y4UJY-DStsnXzo.js} +1 -1
- package/dist/assets/{gitGraphDiagram-WWUBYQGX-ByeD7NPE.js → gitGraphDiagram-WWUBYQGX-BejeRC3-.js} +1 -1
- package/dist/assets/health-DsHGAxc8.js +1 -0
- package/dist/assets/heartbeats-DWUL5tSL.js +1 -0
- package/dist/assets/index-Cx882YTU.css +1 -0
- package/dist/assets/index-DTMtHDxt.js +779 -0
- package/dist/assets/{infoDiagram-27XIBGKW-B6sR9qVK.js → infoDiagram-27XIBGKW-Cch-IRh-.js} +1 -1
- package/dist/assets/{input-BYys7uph.js → input-BWYuMr4z.js} +1 -1
- package/dist/assets/{ishikawaDiagram-5VMMS53U-HFQ3gYGN.js → ishikawaDiagram-5VMMS53U-DDvnGaeJ.js} +1 -1
- package/dist/assets/{journeyDiagram-3NMN7TZE-BtoNErTz.js → journeyDiagram-3NMN7TZE-rmjbLNr7.js} +1 -1
- package/dist/assets/{kanban-definition-UXKFOSKX-Y55yoRj4.js → kanban-definition-UXKFOSKX-hvO2tDhG.js} +1 -1
- package/dist/assets/label-TkPoSJhK.js +5 -0
- package/dist/assets/{line-CJEZO7lL.js → line-Dk_ouzM8.js} +1 -1
- package/dist/assets/loader-circle-DiqjntTX.js +1 -0
- package/dist/assets/mention-chips-B_zVTnHY.js +17 -0
- package/dist/assets/{mermaid.core-G_BSi0G0.js → mermaid.core-Be3XJK9z.js} +4 -4
- package/dist/assets/{mindmap-definition-YA3MSWOX-BnlANYwV.js → mindmap-definition-YA3MSWOX-Dislw6JU.js} +1 -1
- package/dist/assets/octagon-alert-HfSAYnSC.js +1 -0
- package/dist/assets/{pegDiagram-XKGWAZYB-CHhCzuLt.js → pegDiagram-XKGWAZYB-CizC38c5.js} +1 -1
- package/dist/assets/{pieDiagram-E7YTZNPT-CEGI1j0Q.js → pieDiagram-E7YTZNPT-DvHDuZK1.js} +1 -1
- package/dist/assets/{quadrantDiagram-AXDQQJYC-BfVC-A1t.js → quadrantDiagram-AXDQQJYC-DTAvsUNT.js} +1 -1
- package/dist/assets/{railroadDiagram-O6MQD6OU-Bwh6snZb.js → railroadDiagram-O6MQD6OU-DGlhxzAn.js} +1 -1
- package/dist/assets/{requirementDiagram-BXWQKSXE-NEvTOdsw.js → requirementDiagram-BXWQKSXE-BzY8WPIy.js} +1 -1
- package/dist/assets/rotate-ccw-C9ZF1aqD.js +1 -0
- package/dist/assets/router-BC2Duaf5.js +15 -0
- package/dist/assets/{sankeyDiagram-P5KCCOFB-AvKb1lr-.js → sankeyDiagram-P5KCCOFB-Be3A08ra.js} +1 -1
- package/dist/assets/save-yPNdO-t7.js +1 -0
- package/dist/assets/select-DsMS_Sad.js +1 -0
- package/dist/assets/{sequenceDiagram-WJ2MYXX4-BP0QZnHN.js → sequenceDiagram-WJ2MYXX4-BJuFaGQ8.js} +1 -1
- package/dist/assets/sheet-CFbmpBhA.js +1 -0
- package/dist/assets/skeleton-DtakB_VA.js +1 -0
- package/dist/assets/{stateDiagram-D77RDMKH-Ce0Wj7yz.js → stateDiagram-D77RDMKH-BWwUdBob.js} +1 -1
- package/dist/assets/stateDiagram-v2-MP3YSRHH-P6gPsRNv.js +1 -0
- package/dist/assets/{swimlanes-42K2YHIH-CX7zPtNU.js → swimlanes-42K2YHIH-CMos3UkM.js} +1 -1
- package/dist/assets/swimlanesDiagram-VR7AAH4N-BjRksHrL.js +8 -0
- package/dist/assets/{tabs-BTWtgE_e.js → tabs-DCzsHrwQ.js} +1 -1
- package/dist/assets/{timeline-definition-24CTP7MA-Bw21rjHm.js → timeline-definition-24CTP7MA-5RQLEOvu.js} +1 -1
- package/dist/assets/triangle-alert-CrLKyTUa.js +1 -0
- package/dist/assets/use-adapter-capabilities-CVwppNII.js +1 -0
- package/dist/assets/useHiddenSettings-COOnS4sa.js +1 -0
- package/dist/assets/{vennDiagram-4TSXK5OY-BuncstTm.js → vennDiagram-4TSXK5OY-BZm-uDwq.js} +1 -1
- package/dist/assets/{wardleyDiagram-VM6X3IG4-DOHY7xcd.js → wardleyDiagram-VM6X3IG4-Y317P_uV.js} +1 -1
- package/dist/assets/{xychartDiagram-S5SC5T6Z-qOWxoNte.js → xychartDiagram-S5SC5T6Z-DIOiLKNy.js} +1 -1
- package/dist/brands/apps/browser-use.svg +6 -0
- package/dist/brands/apps/cognee.png +0 -0
- package/dist/brands/apps/connection-pool.svg +1 -0
- package/dist/brands/apps/honcho.svg +33 -0
- package/dist/brands/apps/manifest.json +45 -0
- package/dist/brands/apps/neon.png +0 -0
- package/dist/brands/apps/supermemory.png +0 -0
- package/dist/brands/apps/zep.png +0 -0
- package/dist/index.html +108 -46
- package/dist/sw.js +17 -3
- package/package.json +1 -1
- package/dist/assets/AgentIdentity-DjRFrNXO.js +0 -1
- package/dist/assets/Agents.production-BRdUzpF6.js +0 -2
- package/dist/assets/CompanyActivity.production-dD0_52Wu.js +0 -1
- package/dist/assets/CompanySkills.production-DGbZb0AI.js +0 -10
- package/dist/assets/EmptyState-C4lXde64.js +0 -1
- package/dist/assets/MarkdownBody--RIJLCMA.js +0 -16
- package/dist/assets/RoutineDetail.production-Bsf338vO.js +0 -1
- package/dist/assets/RoutineRunVariablesDialog-DP1tcp7X.js +0 -5
- package/dist/assets/Routines.production-BGR6_EI9.js +0 -1
- package/dist/assets/StatusIcon-VpulllGv.js +0 -1
- package/dist/assets/agents-BP_X6XtR.js +0 -1
- package/dist/assets/bot-LA1HiarN.js +0 -1
- package/dist/assets/button-C4DIaoFo.js +0 -1
- package/dist/assets/channel-0B5iAV5A.js +0 -1
- package/dist/assets/check-CYgpX7OA.js +0 -1
- package/dist/assets/checkbox-CKFq766c.js +0 -1
- package/dist/assets/chevron-down-BU9R1R4F.js +0 -1
- package/dist/assets/chevron-right-BmxFehfD.js +0 -1
- package/dist/assets/classDiagram-ZZMXUADV-icHQAbF4.js +0 -1
- package/dist/assets/classDiagram-v2-VYDZK3BY-icHQAbF4.js +0 -1
- package/dist/assets/clipboard-DMxSLEQ6.js +0 -1
- package/dist/assets/createLucideIcon-B54j0Sae.js +0 -92
- package/dist/assets/external-link-Bi7tqIF1.js +0 -1
- package/dist/assets/file-text-MN4vnW0c.js +0 -1
- package/dist/assets/flowDiagram-HODETNUW-CDvpIOlT.js +0 -1
- package/dist/assets/health-Cu3NB6y9.js +0 -1
- package/dist/assets/heartbeats-Bjbu1IYj.js +0 -1
- package/dist/assets/index-DRWrweZf.js +0 -737
- package/dist/assets/index-L45mDhY7.css +0 -1
- package/dist/assets/label-_X3u-iq9.js +0 -5
- package/dist/assets/loader-circle-D6KkdGol.js +0 -1
- package/dist/assets/mention-chips-B6d93utO.js +0 -17
- package/dist/assets/octagon-alert-BgFrORnN.js +0 -1
- package/dist/assets/rotate-ccw-DP6ACo04.js +0 -1
- package/dist/assets/router-D63KhMWd.js +0 -15
- package/dist/assets/save-C2ttL8uR.js +0 -1
- package/dist/assets/select-DrSnWvLC.js +0 -1
- package/dist/assets/sheet-CdR6tW8E.js +0 -1
- package/dist/assets/skeleton-C0oo8l5C.js +0 -1
- package/dist/assets/stateDiagram-v2-MP3YSRHH-CREL-f_f.js +0 -1
- package/dist/assets/swimlanesDiagram-VR7AAH4N-B22pD4D6.js +0 -8
- package/dist/assets/triangle-alert-BhrZ1ChK.js +0 -1
- package/dist/assets/use-adapter-capabilities-DHgLdZ1V.js +0 -1
- package/dist/assets/useHiddenSettings-C5RuvqCg.js +0 -1
- package/dist/assets/zap-md9c-4bv.js +0 -41
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Es=Object.defineProperty;var v=(h,t)=>Es(h,"name",{value:t,configurable:!0});import{n as $}from"./chunk-Y2CYZVJY-OvsAdhaO.js";import{m as K,p as tt}from"./src-Bssc388C.js";import{A as Ts,B as ha,M as Zt,T as bt,b as Mt,f as _s,g as St,x as J,z as Ot}from"./chunk-DU6HZSFF-2P5iNHqg.js";import{a as Dt,p as Ys,r as Bt,u as Q}from"./chunk-75Z2AOVW-BaPl5WA6.js";import{t as At}from"./chunk-PWAF6VOD-CR3rNBNB.js";import{n as dt,r as Ct}from"./chunk-GMAD6QVW-BfvaaEBW.js";import{a as H,i as R,r as Xs,t as Ht}from"./chunk-P2QGCYS3-CjqEi3mx.js";import{t as I}from"./rough.esm-DnC5Tr1g.js";var Os=1,js=3;async function jt(h){const t=h.getElementsByTagName("img");if(!t||t.length===0)return;const i=!Ft(h);await Promise.all([...t].map(o=>new Promise(g=>{function r(){if(o.style.display="flex",o.style.flexDirection="column",i){const f=J().fontSize?J().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=_s.fontSize]=Ys(f),e=c*l+"px";o.style.minWidth=e,o.style.maxWidth=e}else o.style.width="100%";g(o)}v(r,"setupImage"),$(r,"setupImage"),setTimeout(()=>{o.complete&&r()}),o.addEventListener("error",r),o.addEventListener("load",r)})))}v(jt,"configureLabelImages");$(jt,"configureLabelImages");function Ft(h){return h.nodeType===js?h.textContent?.trim()!=="":h.nodeType!==Os||h.tagName.toLowerCase()==="img"?!1:[...h.childNodes].some(Ft)}v(Ft,"hasTextBesidesImages");$(Ft,"hasTextBesidesImages");var Jt=3,Fs=32,Gs=$(async(h,t,i)=>{const o=J(),g=h.insert("g").attr("class",i??"node default").attr("id",t.domId||t.id),r=g.insert("g").attr("class","label").attr("style",Q(t.labelStyle)),f=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(y=>({text:y,cssClass:"c4-descr"}))].filter(y=>y.text),l=t.width?Math.max(t.width-2*(t.padding??0),Fs):J().flowchart?.wrappingWidth??200,c=o.c4?.wrap??!0?l:Number.POSITIVE_INFINITY,e=await Promise.all(f.map(async y=>{const p=r.append("g").attr("class",y.cssClass),u=await dt(p,Ot(Dt(y.text??""),o),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:c,style:t.labelStyle},o);return tt(u).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),tt(u).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:p,box:p.node().getBBox()}})),a=Math.max(...e.map(({box:y})=>y.width),0);let s=0;for(const{el:y,box:p}of e)y.attr("transform",`translate(${a/2-p.x-p.width/2}, ${s-p.y})`),s+=p.height+Jt;const n=e.length>0?s-Jt:0;return r.insert("rect",":first-child"),r.attr("transform",`translate(${-a/2}, ${-n/2})`),{shapeSvg:g,bbox:r.node().getBBox(),halfPadding:(t.padding??0)/2,label:r}},"c4LabelHelper"),O=$(async(h,t,i)=>{if(t.stereotype!==void 0)return Gs(h,t,i);let o;const g=t.useHtmlLabels||St(J()?.htmlLabels);i?o=i:o="node default";const r=h.insert("g").attr("class",o).attr("id",t.domId||t.id),f=r.insert("g").attr("class","label").attr("style",Q(t.labelStyle));let l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];const c=!!t.icon||!!t.img,e=t.labelType==="markdown",a=await dt(f,Ot(Dt(l),J()),{useHtmlLabels:g,width:t.width||t.wrappingWidth||J().flowchart?.wrappingWidth,classes:e?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:c,markdown:e},J()),s=(t?.padding??0)/2;let n;if(g){const y=a.children[0],p=tt(a);await jt(y),n=await Ct.measure(()=>y.getBoundingClientRect()),p.attr("width",n.width),p.attr("height",n.height)}else n=await Ct.measure(()=>a.getBBox());return g?f.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):f.attr("transform","translate(0, "+-n.height/2+")"),t.centerLabel&&f.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),f.insert("rect",":first-child"),{shapeSvg:r,bbox:n,halfPadding:s,label:f}},"labelHelper"),It=$(async(h,t,i)=>{const o=i.useHtmlLabels??bt(J()),g=h.insert("g").attr("class","label").attr("style",i.labelStyle||""),r=await dt(g,Ot(Dt(t),J()),{useHtmlLabels:o,width:i.width||J()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),f=i.padding/2;let l;if(bt(J())){const c=r.children[0],e=tt(r);l=await Ct.measure(()=>c.getBoundingClientRect()),e.attr("width",l.width),e.attr("height",l.height)}else l=await Ct.measure(()=>r.getBBox());return o?g.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):g.attr("transform","translate(0, "+-l.height/2+")"),i.centerLabel&&g.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:h,bbox:l,halfPadding:f,label:g}},"insertLabel"),B=$((h,t,i)=>{if(i){h.width=i.width,h.height=i.height;return}const o=t.node().getBBox();h.width=o.width,h.height=o.height},"updateNodeBounds"),X=$((h,t)=>(h.look==="handDrawn"?"rough-node":"node")+" "+h.cssClasses+" "+(t||""),"getNodeClasses");function F(h){const t=h.map((i,o)=>`${o===0?"M":"L"}${i.x},${i.y}`);return t.push("Z"),t.join(" ")}v(F,"createPathFromPoints");$(F,"createPathFromPoints");function ft(h,t,i,o,g,r){const f=[],c=i-h,e=o-t,a=c/r,s=2*Math.PI/a,n=t+e/2;for(let y=0;y<=50;y++){const p=h+y/50*c,u=n+g*Math.sin(s*(p-h));f.push({x:p,y:u})}return f}v(ft,"generateFullSineWavePoints");$(ft,"generateFullSineWavePoints");function lt(h,t,i,o,g,r){const f=[],l=g*Math.PI/180,c=(r*Math.PI/180-l)/(o-1);for(let e=0;e<o;e++){const a=l+e*c,s=h+i*Math.cos(a),n=t+i*Math.sin(a);f.push({x:-s,y:-n})}return f}v(lt,"generateCirclePoints");$(lt,"generateCirclePoints");function _t(h){const t=Array.from(h.childNodes).filter(c=>c.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),o=t.map(c=>c.getAttribute("d")).filter(c=>c!==null).join(" ");i.setAttribute("d",o);const g=t.find(c=>c.getAttribute("fill")!=="none"),r=t.find(c=>c.getAttribute("stroke")!=="none"),f=$((c,e)=>c?.getAttribute(e)??void 0,"getAttr");if(g){const c={fill:f(g,"fill"),"fill-opacity":f(g,"fill-opacity")??"1"};Object.entries(c).forEach(([e,a])=>{a&&i.setAttribute(e,a)})}if(r){const c={stroke:f(r,"stroke"),"stroke-width":f(r,"stroke-width")??"1","stroke-opacity":f(r,"stroke-opacity")??"1"};Object.entries(c).forEach(([e,a])=>{a&&i.setAttribute(e,a)})}const l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(i),l}v(_t,"mergePaths");$(_t,"mergePaths");var qs=$((h,t)=>{var i=h.x,o=h.y,g=t.x-i,r=t.y-o,f=h.width/2,l=h.height/2,c,e;return Math.abs(r)*f>Math.abs(g)*l?(r<0&&(l=-l),c=r===0?0:l*g/r,e=l):(g<0&&(f=-f),c=f,e=g===0?0:f*r/g),{x:i+c,y:o+e}},"intersectRect"),ht=$((h,t,i,o,g)=>["M",h+g,t,"H",h+i-g,"A",g,g,0,0,1,h+i,t+g,"V",t+o-g,"A",g,g,0,0,1,h+i-g,t+o,"H",h+g,"A",g,g,0,0,1,h,t+o-g,"V",t+g,"A",g,g,0,0,1,h+g,t,"Z"].join(" "),"createRoundedRectPathD"),Kt=$(async(h,t,i,o=!1,g=!1)=>{let r=t||"";typeof r=="object"&&(r=r[0]);const f=J(),l=bt(f);return await dt(h,r,{style:i,isTitle:o,useHtmlLabels:l,markdown:!1,isNode:g,width:Number.POSITIVE_INFINITY},f)},"createLabel");function ga(h,t){return h.intersect(t)}v(ga,"intersectNode");$(ga,"intersectNode");var zs=ga;function ya(h,t,i,o){var g=h.x,r=h.y,f=g-o.x,l=r-o.y,c=Math.sqrt(t*t*l*l+i*i*f*f),e=Math.abs(t*i*f/c);o.x<g&&(e=-e);var a=Math.abs(t*i*l/c);return o.y<r&&(a=-a),{x:g+e,y:r+a}}v(ya,"intersectEllipse");$(ya,"intersectEllipse");var fa=ya;function pa(h,t,i){return fa(h,t,t,i)}v(pa,"intersectCircle");$(pa,"intersectCircle");var Vs=pa;function ua(h,t,i,o){{const g=t.y-h.y,r=h.x-t.x,f=t.x*h.y-h.x*t.y,l=g*i.x+r*i.y+f,c=g*o.x+r*o.y+f,e=1e-6;if(l!==0&&c!==0&&Yt(l,c))return;const a=o.y-i.y,s=i.x-o.x,n=o.x*i.y-i.x*o.y,y=a*h.x+s*h.y+n,p=a*t.x+s*t.y+n;if(Math.abs(y)<e&&Math.abs(p)<e&&Yt(y,p))return;const u=g*s-a*r;if(u===0)return;const d=Math.abs(u/2);let x=r*n-s*f;const m=x<0?(x-d)/u:(x+d)/u;return x=a*f-g*n,{x:m,y:x<0?(x-d)/u:(x+d)/u}}}v(ua,"intersectLine");$(ua,"intersectLine");function Yt(h,t){return h*t>0}v(Yt,"sameSign");$(Yt,"sameSign");var Zs=ua;function da(h,t,i){let o=h.x,g=h.y,r=[],f=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(a){f=Math.min(f,a.x),l=Math.min(l,a.y)}):(f=Math.min(f,t.x),l=Math.min(l,t.y));let c=o-h.width/2-f,e=g-h.height/2-l;for(let a=0;a<t.length;a++){let s=t[a],n=t[a<t.length-1?a+1:0],y=Zs(h,i,{x:c+s.x,y:e+s.y},{x:c+n.x,y:e+n.y});y&&r.push(y)}return r.length?(r.length>1&&r.sort(function(a,s){let n=a.x-i.x,y=a.y-i.y,p=Math.sqrt(n*n+y*y),u=s.x-i.x,d=s.y-i.y,x=Math.sqrt(u*u+d*d);return p<x?-1:p===x?0:1}),r[0]):h}v(da,"intersectPolygon");$(da,"intersectPolygon");var N={node:zs,circle:Vs,ellipse:fa,polygon:da,rect:qs};function xa(h,t){const{labelStyles:i}=R(t);t.labelStyle=i;const o=X(t);let g=o;o||(g="anchor");const r=h.insert("g").attr("class",g).attr("id",t.domId||t.id),f=1,{cssStyles:l}=t,c=I.svg(r),e=H(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);const a=c.circle(0,0,2,e),s=r.insert(()=>a,":first-child");return s.attr("class","anchor").attr("style",Q(l)),B(t,s),t.intersect=function(n){return K.info("Circle intersect",t,f,n),N.circle(t,f,n)},r}v(xa,"anchor");$(xa,"anchor");function Xt(h,t,i,o,g,r,f){const c=(h+i)/2,e=(t+o)/2,a=Math.atan2(o-t,i-h),s=(i-h)/2,n=(o-t)/2,y=s/g,p=n/r,u=Math.sqrt(y**2+p**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const d=Math.sqrt(1-u**2),x=c+d*r*Math.sin(a)*(f?-1:1),m=e-d*g*Math.cos(a)*(f?-1:1),w=Math.atan2((t-m)/r,(h-x)/g);let b=Math.atan2((o-m)/r,(i-x)/g)-w;f&&b<0&&(b+=2*Math.PI),!f&&b>0&&(b-=2*Math.PI);const S=[];for(let k=0;k<20;k++){const P=w+k/19*b,M=x+g*Math.cos(P),W=m+r*Math.sin(P);S.push({x:M,y:W})}return S}v(Xt,"generateArcPoints");$(Xt,"generateArcPoints");function ma(h,t,i){const[o,g]=[t,i].sort((r,f)=>f-r);return g*(1-Math.sqrt(1-(h/o/2)**2))}v(ma,"calculateArcSagitta");$(ma,"calculateArcSagitta");async function wa(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?16:g,f=t.look==="neo"?12:g,l=$(M=>M+f,"calcTotalHeight"),c=$(M=>{const W=M/2;return[W/(2.5+M/50),W]},"calcEllipseRadius"),{shapeSvg:e,bbox:a}=await O(h,t,X(t)),s=l(t?.height?t?.height:a.height),[n,y]=c(s),p=ma(s,n,y),u=(t?.width?t?.width:a.width)+r*2+p-p,d=s,{cssStyles:x}=t,m=[{x:u/2,y:-d/2},{x:-u/2,y:-d/2},...Xt(-u/2,-d/2,-u/2,d/2,n,y,!1),{x:u/2,y:d/2},...Xt(u/2,d/2,u/2,-d/2,n,y,!0)],w=I.svg(e),b=H(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=F(m),k=w.path(S,b),P=e.insert(()=>k,":first-child");return P.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",x),o&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",o),P.attr("transform",`translate(${n/2}, 0)`),B(t,P),t.intersect=function(M){return N.polygon(t,m,M)},e}v(wa,"bowTieRect");$(wa,"bowTieRect");async function ba(h,t,{config:{themeVariables:i}}){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o;const{shapeSvg:r,bbox:f,label:l}=await O(h,t,X(t)),c=i?.nodeBorder??i?.lineColor??"currentColor",e=t.padding??12,a=Math.max(f.width+e*2,t.width??0,80),s=Math.max(Math.min(a*.08,12),5),n=Math.max(f.height+e*2+s,t.height??0),y=-n/2+s,p=n/2,u=a*.72,d=[`M${-a/2},${y}`,`L${-u/2},${p}`,`A${u/2},${s} 0 0 0 ${u/2},${p}`,`L${a/2},${y}`,`A${a/2},${s} 0 0 0 ${-a/2},${y}`,"Z"].join(" "),{cssStyles:x}=t,m=r.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const P=I.svg(r).path(d,H(t,{}));m.node()?.appendChild(P),x&&m.attr("style",x)}else m.append("path").attr("d",d).attr("style",g);m.append("ellipse").attr("cx",0).attr("cy",y).attr("rx",a/2).attr("ry",s).attr("style",`fill:none;stroke:${c};stroke-width:1px`),B(t,m);const w=y+(p-y)/2;l.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${w-f.height/2-(f.y-(f.top??0))})`);const b=12,S=$((P,M,W)=>Array.from({length:13},(T,A)=>{const _=Math.PI-A*Math.PI/b;return{x:P*Math.cos(_),y:M+W*s*Math.sin(_)}}),"arc"),k=[...S(a/2,y,-1),...S(u/2,p,1).reverse()];return t.intersect=function(P){return N.polygon(t,k,P)},r}v(ba,"bucket");$(ba,"bucket");var Lt=20,Wt=8,Js=80,Et=8;async function Sa(h,t){const{themeVariables:i}=J(),o=i.clusterBkg,g=i.clusterBorder,{nodeStyles:r}=R(t),{shapeSvg:f,bbox:l}=await O(h,t,X(t)),c=t.padding??8,e=l.height,a=Math.max(l.width+c*2,Js,t?.width??0),s=Math.max(e+Wt+Lt+c*2,t?.height??0),n=-a/2,y=-s/2,p=-(Wt+Lt)/2,u=f.select(".label");u&&(t.useHtmlLabels??bt(J())?u.attr("transform",`translate(${-l.width/2}, ${-l.height/2+p})`):u.attr("transform",`translate(0, ${-l.height/2+p})`));let d;if(t.look==="handDrawn"){const S=I.svg(f),k=H(t,{fill:o,stroke:g,fillStyle:"solid"}),P=S.path(ht(n,y,a,s,Et),k);d=f.insert(()=>P,":first-child"),d.attr("class","basic label-container collapsed-group").attr("style",Q(t.cssStyles))}else d=f.insert("rect",":first-child"),d.attr("class","basic label-container collapsed-group").attr("style",r).attr("rx",Et).attr("ry",Et).attr("x",n).attr("y",y).attr("width",a).attr("height",s).attr("fill",o).attr("stroke",g);const x=y+c+e+Wt;f.append("line").attr("class","collapsed-separator").attr("x1",n+8).attr("y1",x).attr("x2",n+a-8).attr("y2",x).attr("stroke",g).attr("stroke-dasharray","3, 3");const m=x+Lt/2,w=2.5,b=10;for(let S=-1;S<=1;S++)f.append("circle").attr("class","collapsed-indicator").attr("cx",S*b).attr("cy",m).attr("r",w).attr("fill",g);return B(t,d),t.calcIntersect=function(S,k){return N.rect(S,k)},t.intersect=function(S){return N.rect(t,S)},f}v(Sa,"collapsedGroup");$(Sa,"collapsedGroup");function rt(h,t,i,o){return h.insert("polygon",":first-child").attr("points",o.map(function(g){return g.x+","+g.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+i/2+")")}v(rt,"insertPolygonShape");$(rt,"insertPolygonShape");var Ks=["right","left","up","down"],Gt="point",Us=$(h=>{const t=new Set;for(const i of h)switch(i){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(i)}return t},"expandAndDeduplicateDirections"),Qs=$(h=>Ks.filter(t=>h.has(t)).join("|")||Gt,"getDirectionKey"),Ut={"right|left|up|down":$(({height:h,midpoint:t,padding:i,width:o})=>[{x:0,y:0},{x:t,y:0},{x:o/2,y:2*i},{x:o-t,y:0},{x:o,y:0},{x:o,y:-h/3},{x:o+2*i,y:-h/2},{x:o,y:-2*h/3},{x:o,y:-h},{x:o-t,y:-h},{x:o/2,y:-h-2*i},{x:t,y:-h},{x:0,y:-h},{x:0,y:-2*h/3},{x:-2*i,y:-h/2},{x:0,y:-h/3}],"right|left|up|down"),"right|left|up":$(({height:h,midpoint:t,width:i})=>[{x:t,y:0},{x:i-t,y:0},{x:i,y:-h/2},{x:i-t,y:-h},{x:t,y:-h},{x:0,y:-h/2}],"right|left|up"),"right|left|down":$(({height:h,midpoint:t,width:i})=>[{x:0,y:0},{x:t,y:-h},{x:i-t,y:-h},{x:i,y:0}],"right|left|down"),"right|up|down":$(({height:h,midpoint:t,width:i})=>[{x:0,y:0},{x:i,y:-t},{x:i,y:-h+t},{x:0,y:-h}],"right|up|down"),"left|up|down":$(({height:h,midpoint:t,width:i})=>[{x:i,y:0},{x:0,y:-t},{x:0,y:-h+t},{x:i,y:-h}],"left|up|down"),"right|left":$(({height:h,midpoint:t,padding:i,width:o})=>[{x:t,y:0},{x:t,y:-i},{x:o-t,y:-i},{x:o-t,y:0},{x:o,y:-h/2},{x:o-t,y:-h},{x:o-t,y:-h+i},{x:t,y:-h+i},{x:t,y:-h},{x:0,y:-h/2}],"right|left"),"up|down":$(({height:h,midpoint:t,padding:i,width:o})=>[{x:o/2,y:0},{x:0,y:-i},{x:t,y:-i},{x:t,y:-h+i},{x:0,y:-h+i},{x:o/2,y:-h},{x:o,y:-h+i},{x:o-t,y:-h+i},{x:o-t,y:-i},{x:o,y:-i}],"up|down"),"right|up":$(({height:h,midpoint:t,width:i})=>[{x:0,y:0},{x:i,y:-t},{x:0,y:-h}],"right|up"),"right|down":$(({height:h,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-h}],"right|down"),"left|up":$(({height:h,midpoint:t,width:i})=>[{x:i,y:0},{x:0,y:-t},{x:i,y:-h}],"left|up"),"left|down":$(({height:h,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-h}],"left|down"),right:$(({height:h,midpoint:t,padding:i,width:o})=>[{x:t,y:-i},{x:t,y:-i},{x:o-t,y:-i},{x:o-t,y:0},{x:o,y:-h/2},{x:o-t,y:-h},{x:o-t,y:-h+i},{x:t,y:-h+i},{x:t,y:-h+i}],"right"),left:$(({height:h,midpoint:t,padding:i,width:o})=>[{x:t,y:0},{x:t,y:-i},{x:o-t,y:-i},{x:o-t,y:-h+i},{x:t,y:-h+i},{x:t,y:-h},{x:0,y:-h/2}],"left"),up:$(({height:h,midpoint:t,padding:i,width:o})=>[{x:t,y:-i},{x:t,y:-h+i},{x:0,y:-h+i},{x:o/2,y:-h},{x:o,y:-h+i},{x:o-t,y:-h+i},{x:o-t,y:-i}],"up"),down:$(({height:h,midpoint:t,padding:i,width:o})=>[{x:o/2,y:0},{x:0,y:-i},{x:t,y:-i},{x:t,y:-h+i},{x:o-t,y:-h+i},{x:o-t,y:-i},{x:o,y:-i}],"down"),[Gt]:()=>[{x:0,y:0}]},te=$((h,t,i,o)=>{const g=Us(h),r=(i.padding??0)/2,f=t.height+4*r,l=f/2,c=o??t.width+2*l+2*r;return(Ut[Qs(g)]??Ut[Gt])({height:f,midpoint:l,padding:r,width:c})},"getArrowPoints");async function $a(h,t){const i=t,{shapeSvg:o,bbox:g}=await O(h,i,X(i)),r=i.padding??0,f=g.height+2*r,l=f/2,c=g.width+2*l+r,e=i.width??0,a=i.positioned&&(i.widthInColumns??1)>1&&e>c?e:c,s=te(i.directions??[],g,i,a),n=rt(o,a,f,s);return n.attr("style",i.style??null),B(i,n),i.intersect=function(y){return N.polygon(i,s,y)},o}v($a,"block_arrow");$($a,"block_arrow");async function va(h,t,{config:{themeVariables:i}}){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o;const{shapeSvg:r,bbox:f,label:l}=await O(h,t,X(t)),c=i?.nodeBorder??i?.lineColor??"currentColor",e=t.padding??12,a=18,s=12,n=Math.max(f.width+e*2,t.width??0,90),y=Math.max(f.height+e*2+a,t.height??0),p=-y/2,{cssStyles:u}=t,d=r.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const m=I.svg(r).path(ht(-n/2,p,n,y,s),H(t,{}));d.node()?.appendChild(m),u&&d.attr("style",u)}else d.append("rect").attr("x",-n/2).attr("y",p).attr("width",n).attr("height",y).attr("rx",s).attr("ry",s).attr("style",g);d.append("line").attr("x1",-n/2).attr("y1",p+a).attr("x2",n/2).attr("y2",p+a).attr("style",`stroke:${c};stroke-width:1px`);for(let m=0;m<3;m++)d.append("circle").attr("cx",-n/2+12+m*9).attr("cy",p+a/2).attr("r",2.5).attr("style",`fill:${c};stroke:none`);d.append("rect").attr("class","browser-address-bar").attr("x",-n/2+44).attr("y",p+4).attr("width",Math.max(n-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),B(t,d);const x=p+a+(y-a)/2;return l.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${x-f.height/2-(f.y-(f.top??0))})`),t.intersect=function(m){return N.rect(t,m)},r}v(va,"browser");$(va,"browser");var Nt=12;async function ka(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?28:g,f=t.look==="neo"?24:g,{shapeSvg:l,bbox:c}=await O(h,t,X(t)),e=(t?.width??c.width)+(t.look==="neo"?r*2:r+Nt),a=(t?.height??c.height)+(t.look==="neo"?f*2:f),s=0,n=e,y=-a,p=0,u=[{x:s+Nt,y},{x:n,y},{x:n,y:p},{x:s,y:p},{x:s,y:y+Nt},{x:s+Nt,y}];let d;const{cssStyles:x}=t;if(t.look==="handDrawn"){const m=I.svg(l),w=H(t,{}),b=F(u),S=m.path(b,w);d=l.insert(()=>S,":first-child").attr("transform",`translate(${-e/2}, ${a/2})`),x&&d.attr("style",x)}else d=rt(l,e,a,u);return o&&d.attr("style",o),B(t,d),t.intersect=function(m){return N.polygon(t,u,m)},l}v(ka,"card");$(ka,"card");function Pa(h,t){const{nodeStyles:i}=R(t);t.label="";const o=h.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:g}=t,r=Math.max(28,t.width??0),f=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}],l=I.svg(o),c=H(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const e=F(f),a=l.path(e,c),s=o.insert(()=>a,":first-child");return g&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",i),t.width=28,t.height=28,t.intersect=function(n){return N.polygon(t,f,n)},o}v(Pa,"choice");$(Pa,"choice");async function qt(h,t,i){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o;const{shapeSvg:r,bbox:f,halfPadding:l}=await O(h,t,X(t)),c=i?.padding??l,e=t.look==="neo"?f.width/2+32:f.width/2+c;let a;const{cssStyles:s}=t;if(t.look==="handDrawn"){const n=I.svg(r),y=H(t,{}),p=n.circle(0,0,e*2,y);a=r.insert(()=>p,":first-child"),a.attr("class","basic label-container").attr("style",Q(s))}else a=r.insert("circle",":first-child").attr("class","basic label-container").attr("style",g).attr("r",e).attr("cx",0).attr("cy",0);return B(t,a),t.calcIntersect=function(n,y){const p=n.width/2;return N.circle(n,p,y)},t.intersect=function(n){return K.info("Circle intersect",t,e,n),N.circle(t,e,n)},r}v(qt,"circle");$(qt,"circle");async function Ma(h,t){const i=t,{shapeSvg:o,bbox:g,halfPadding:r}=await O(h,i,["node",i.cssClasses,i.class].filter(Boolean).join(" ")),f=o.insert("rect",":first-child"),l=i.padding??0,c=i.positioned?i.width??0:g.width+l,e=i.positioned?i.height??0:g.height+l,a=i.positioned?-c/2:-g.width/2-r,s=i.positioned?-e/2:-g.height/2-r;return f.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",a).attr("y",s).attr("width",c).attr("height",e),B(i,f),i.intersect=function(n){return N.rect(i,n)},o}v(Ma,"composite");$(Ma,"composite");async function Da(h,t,{config:{themeVariables:i}}){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o;const{shapeSvg:r,bbox:f,label:l}=await O(h,t,X(t)),c=i?.nodeBorder??i?.lineColor??"currentColor",e=t.padding??12,a=20,s=12,n=Math.max(f.width+e*2,t.width??0,90),y=Math.max(f.height+e*2+a,t.height??0),p=-y/2,{cssStyles:u}=t,d=r.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const m=I.svg(r).path(ht(-n/2,p,n,y,s),H(t,{}));d.node()?.appendChild(m),u&&d.attr("style",u)}else d.append("rect").attr("x",-n/2).attr("y",p).attr("width",n).attr("height",y).attr("rx",s).attr("ry",s).attr("style",g);d.append("text").attr("x",-n/2+12).attr("y",p+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(">_"),B(t,d);const x=p+a+(y-a)/2;return l.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${x-f.height/2-(f.y-(f.top??0))})`),t.intersect=function(m){return N.rect(t,m)},r}v(Da,"consoleWindow");$(Da,"consoleWindow");function Na(h){const t=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),o=h*2,g={x:o/2*t,y:o/2*i},r={x:-(o/2)*t,y:o/2*i},f={x:-(o/2)*t,y:-(o/2)*i},l={x:o/2*t,y:-(o/2)*i};return`M ${r.x},${r.y} L ${l.x},${l.y}
|
|
1
|
+
var Es=Object.defineProperty;var v=(h,t)=>Es(h,"name",{value:t,configurable:!0});import{n as $}from"./chunk-Y2CYZVJY-OvsAdhaO.js";import{m as K,p as tt}from"./src-Bssc388C.js";import{A as Ts,B as ha,M as Zt,T as bt,b as Mt,f as _s,g as St,x as J,z as Ot}from"./chunk-DU6HZSFF-mLZ_DAj9.js";import{a as Dt,p as Ys,r as Bt,u as Q}from"./chunk-75Z2AOVW-CTyOxDW3.js";import{t as At}from"./chunk-PWAF6VOD-DHqPPKbd.js";import{n as dt,r as Ct}from"./chunk-GMAD6QVW-Vk29EsOn.js";import{a as H,i as R,r as Xs,t as Ht}from"./chunk-P2QGCYS3-DD1uZyrA.js";import{t as I}from"./rough.esm-DnC5Tr1g.js";var Os=1,js=3;async function jt(h){const t=h.getElementsByTagName("img");if(!t||t.length===0)return;const i=!Ft(h);await Promise.all([...t].map(o=>new Promise(g=>{function r(){if(o.style.display="flex",o.style.flexDirection="column",i){const f=J().fontSize?J().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=_s.fontSize]=Ys(f),e=c*l+"px";o.style.minWidth=e,o.style.maxWidth=e}else o.style.width="100%";g(o)}v(r,"setupImage"),$(r,"setupImage"),setTimeout(()=>{o.complete&&r()}),o.addEventListener("error",r),o.addEventListener("load",r)})))}v(jt,"configureLabelImages");$(jt,"configureLabelImages");function Ft(h){return h.nodeType===js?h.textContent?.trim()!=="":h.nodeType!==Os||h.tagName.toLowerCase()==="img"?!1:[...h.childNodes].some(Ft)}v(Ft,"hasTextBesidesImages");$(Ft,"hasTextBesidesImages");var Jt=3,Fs=32,Gs=$(async(h,t,i)=>{const o=J(),g=h.insert("g").attr("class",i??"node default").attr("id",t.domId||t.id),r=g.insert("g").attr("class","label").attr("style",Q(t.labelStyle)),f=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(y=>({text:y,cssClass:"c4-descr"}))].filter(y=>y.text),l=t.width?Math.max(t.width-2*(t.padding??0),Fs):J().flowchart?.wrappingWidth??200,c=o.c4?.wrap??!0?l:Number.POSITIVE_INFINITY,e=await Promise.all(f.map(async y=>{const p=r.append("g").attr("class",y.cssClass),u=await dt(p,Ot(Dt(y.text??""),o),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:c,style:t.labelStyle},o);return tt(u).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),tt(u).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:p,box:p.node().getBBox()}})),a=Math.max(...e.map(({box:y})=>y.width),0);let s=0;for(const{el:y,box:p}of e)y.attr("transform",`translate(${a/2-p.x-p.width/2}, ${s-p.y})`),s+=p.height+Jt;const n=e.length>0?s-Jt:0;return r.insert("rect",":first-child"),r.attr("transform",`translate(${-a/2}, ${-n/2})`),{shapeSvg:g,bbox:r.node().getBBox(),halfPadding:(t.padding??0)/2,label:r}},"c4LabelHelper"),O=$(async(h,t,i)=>{if(t.stereotype!==void 0)return Gs(h,t,i);let o;const g=t.useHtmlLabels||St(J()?.htmlLabels);i?o=i:o="node default";const r=h.insert("g").attr("class",o).attr("id",t.domId||t.id),f=r.insert("g").attr("class","label").attr("style",Q(t.labelStyle));let l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];const c=!!t.icon||!!t.img,e=t.labelType==="markdown",a=await dt(f,Ot(Dt(l),J()),{useHtmlLabels:g,width:t.width||t.wrappingWidth||J().flowchart?.wrappingWidth,classes:e?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:c,markdown:e},J()),s=(t?.padding??0)/2;let n;if(g){const y=a.children[0],p=tt(a);await jt(y),n=await Ct.measure(()=>y.getBoundingClientRect()),p.attr("width",n.width),p.attr("height",n.height)}else n=await Ct.measure(()=>a.getBBox());return g?f.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):f.attr("transform","translate(0, "+-n.height/2+")"),t.centerLabel&&f.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),f.insert("rect",":first-child"),{shapeSvg:r,bbox:n,halfPadding:s,label:f}},"labelHelper"),It=$(async(h,t,i)=>{const o=i.useHtmlLabels??bt(J()),g=h.insert("g").attr("class","label").attr("style",i.labelStyle||""),r=await dt(g,Ot(Dt(t),J()),{useHtmlLabels:o,width:i.width||J()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),f=i.padding/2;let l;if(bt(J())){const c=r.children[0],e=tt(r);l=await Ct.measure(()=>c.getBoundingClientRect()),e.attr("width",l.width),e.attr("height",l.height)}else l=await Ct.measure(()=>r.getBBox());return o?g.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):g.attr("transform","translate(0, "+-l.height/2+")"),i.centerLabel&&g.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:h,bbox:l,halfPadding:f,label:g}},"insertLabel"),B=$((h,t,i)=>{if(i){h.width=i.width,h.height=i.height;return}const o=t.node().getBBox();h.width=o.width,h.height=o.height},"updateNodeBounds"),X=$((h,t)=>(h.look==="handDrawn"?"rough-node":"node")+" "+h.cssClasses+" "+(t||""),"getNodeClasses");function F(h){const t=h.map((i,o)=>`${o===0?"M":"L"}${i.x},${i.y}`);return t.push("Z"),t.join(" ")}v(F,"createPathFromPoints");$(F,"createPathFromPoints");function ft(h,t,i,o,g,r){const f=[],c=i-h,e=o-t,a=c/r,s=2*Math.PI/a,n=t+e/2;for(let y=0;y<=50;y++){const p=h+y/50*c,u=n+g*Math.sin(s*(p-h));f.push({x:p,y:u})}return f}v(ft,"generateFullSineWavePoints");$(ft,"generateFullSineWavePoints");function lt(h,t,i,o,g,r){const f=[],l=g*Math.PI/180,c=(r*Math.PI/180-l)/(o-1);for(let e=0;e<o;e++){const a=l+e*c,s=h+i*Math.cos(a),n=t+i*Math.sin(a);f.push({x:-s,y:-n})}return f}v(lt,"generateCirclePoints");$(lt,"generateCirclePoints");function _t(h){const t=Array.from(h.childNodes).filter(c=>c.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),o=t.map(c=>c.getAttribute("d")).filter(c=>c!==null).join(" ");i.setAttribute("d",o);const g=t.find(c=>c.getAttribute("fill")!=="none"),r=t.find(c=>c.getAttribute("stroke")!=="none"),f=$((c,e)=>c?.getAttribute(e)??void 0,"getAttr");if(g){const c={fill:f(g,"fill"),"fill-opacity":f(g,"fill-opacity")??"1"};Object.entries(c).forEach(([e,a])=>{a&&i.setAttribute(e,a)})}if(r){const c={stroke:f(r,"stroke"),"stroke-width":f(r,"stroke-width")??"1","stroke-opacity":f(r,"stroke-opacity")??"1"};Object.entries(c).forEach(([e,a])=>{a&&i.setAttribute(e,a)})}const l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(i),l}v(_t,"mergePaths");$(_t,"mergePaths");var qs=$((h,t)=>{var i=h.x,o=h.y,g=t.x-i,r=t.y-o,f=h.width/2,l=h.height/2,c,e;return Math.abs(r)*f>Math.abs(g)*l?(r<0&&(l=-l),c=r===0?0:l*g/r,e=l):(g<0&&(f=-f),c=f,e=g===0?0:f*r/g),{x:i+c,y:o+e}},"intersectRect"),ht=$((h,t,i,o,g)=>["M",h+g,t,"H",h+i-g,"A",g,g,0,0,1,h+i,t+g,"V",t+o-g,"A",g,g,0,0,1,h+i-g,t+o,"H",h+g,"A",g,g,0,0,1,h,t+o-g,"V",t+g,"A",g,g,0,0,1,h+g,t,"Z"].join(" "),"createRoundedRectPathD"),Kt=$(async(h,t,i,o=!1,g=!1)=>{let r=t||"";typeof r=="object"&&(r=r[0]);const f=J(),l=bt(f);return await dt(h,r,{style:i,isTitle:o,useHtmlLabels:l,markdown:!1,isNode:g,width:Number.POSITIVE_INFINITY},f)},"createLabel");function ga(h,t){return h.intersect(t)}v(ga,"intersectNode");$(ga,"intersectNode");var zs=ga;function ya(h,t,i,o){var g=h.x,r=h.y,f=g-o.x,l=r-o.y,c=Math.sqrt(t*t*l*l+i*i*f*f),e=Math.abs(t*i*f/c);o.x<g&&(e=-e);var a=Math.abs(t*i*l/c);return o.y<r&&(a=-a),{x:g+e,y:r+a}}v(ya,"intersectEllipse");$(ya,"intersectEllipse");var fa=ya;function pa(h,t,i){return fa(h,t,t,i)}v(pa,"intersectCircle");$(pa,"intersectCircle");var Vs=pa;function ua(h,t,i,o){{const g=t.y-h.y,r=h.x-t.x,f=t.x*h.y-h.x*t.y,l=g*i.x+r*i.y+f,c=g*o.x+r*o.y+f,e=1e-6;if(l!==0&&c!==0&&Yt(l,c))return;const a=o.y-i.y,s=i.x-o.x,n=o.x*i.y-i.x*o.y,y=a*h.x+s*h.y+n,p=a*t.x+s*t.y+n;if(Math.abs(y)<e&&Math.abs(p)<e&&Yt(y,p))return;const u=g*s-a*r;if(u===0)return;const d=Math.abs(u/2);let x=r*n-s*f;const m=x<0?(x-d)/u:(x+d)/u;return x=a*f-g*n,{x:m,y:x<0?(x-d)/u:(x+d)/u}}}v(ua,"intersectLine");$(ua,"intersectLine");function Yt(h,t){return h*t>0}v(Yt,"sameSign");$(Yt,"sameSign");var Zs=ua;function da(h,t,i){let o=h.x,g=h.y,r=[],f=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(a){f=Math.min(f,a.x),l=Math.min(l,a.y)}):(f=Math.min(f,t.x),l=Math.min(l,t.y));let c=o-h.width/2-f,e=g-h.height/2-l;for(let a=0;a<t.length;a++){let s=t[a],n=t[a<t.length-1?a+1:0],y=Zs(h,i,{x:c+s.x,y:e+s.y},{x:c+n.x,y:e+n.y});y&&r.push(y)}return r.length?(r.length>1&&r.sort(function(a,s){let n=a.x-i.x,y=a.y-i.y,p=Math.sqrt(n*n+y*y),u=s.x-i.x,d=s.y-i.y,x=Math.sqrt(u*u+d*d);return p<x?-1:p===x?0:1}),r[0]):h}v(da,"intersectPolygon");$(da,"intersectPolygon");var N={node:zs,circle:Vs,ellipse:fa,polygon:da,rect:qs};function xa(h,t){const{labelStyles:i}=R(t);t.labelStyle=i;const o=X(t);let g=o;o||(g="anchor");const r=h.insert("g").attr("class",g).attr("id",t.domId||t.id),f=1,{cssStyles:l}=t,c=I.svg(r),e=H(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);const a=c.circle(0,0,2,e),s=r.insert(()=>a,":first-child");return s.attr("class","anchor").attr("style",Q(l)),B(t,s),t.intersect=function(n){return K.info("Circle intersect",t,f,n),N.circle(t,f,n)},r}v(xa,"anchor");$(xa,"anchor");function Xt(h,t,i,o,g,r,f){const c=(h+i)/2,e=(t+o)/2,a=Math.atan2(o-t,i-h),s=(i-h)/2,n=(o-t)/2,y=s/g,p=n/r,u=Math.sqrt(y**2+p**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const d=Math.sqrt(1-u**2),x=c+d*r*Math.sin(a)*(f?-1:1),m=e-d*g*Math.cos(a)*(f?-1:1),w=Math.atan2((t-m)/r,(h-x)/g);let b=Math.atan2((o-m)/r,(i-x)/g)-w;f&&b<0&&(b+=2*Math.PI),!f&&b>0&&(b-=2*Math.PI);const S=[];for(let k=0;k<20;k++){const P=w+k/19*b,M=x+g*Math.cos(P),W=m+r*Math.sin(P);S.push({x:M,y:W})}return S}v(Xt,"generateArcPoints");$(Xt,"generateArcPoints");function ma(h,t,i){const[o,g]=[t,i].sort((r,f)=>f-r);return g*(1-Math.sqrt(1-(h/o/2)**2))}v(ma,"calculateArcSagitta");$(ma,"calculateArcSagitta");async function wa(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?16:g,f=t.look==="neo"?12:g,l=$(M=>M+f,"calcTotalHeight"),c=$(M=>{const W=M/2;return[W/(2.5+M/50),W]},"calcEllipseRadius"),{shapeSvg:e,bbox:a}=await O(h,t,X(t)),s=l(t?.height?t?.height:a.height),[n,y]=c(s),p=ma(s,n,y),u=(t?.width?t?.width:a.width)+r*2+p-p,d=s,{cssStyles:x}=t,m=[{x:u/2,y:-d/2},{x:-u/2,y:-d/2},...Xt(-u/2,-d/2,-u/2,d/2,n,y,!1),{x:u/2,y:d/2},...Xt(u/2,d/2,u/2,-d/2,n,y,!0)],w=I.svg(e),b=H(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=F(m),k=w.path(S,b),P=e.insert(()=>k,":first-child");return P.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",x),o&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",o),P.attr("transform",`translate(${n/2}, 0)`),B(t,P),t.intersect=function(M){return N.polygon(t,m,M)},e}v(wa,"bowTieRect");$(wa,"bowTieRect");async function ba(h,t,{config:{themeVariables:i}}){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o;const{shapeSvg:r,bbox:f,label:l}=await O(h,t,X(t)),c=i?.nodeBorder??i?.lineColor??"currentColor",e=t.padding??12,a=Math.max(f.width+e*2,t.width??0,80),s=Math.max(Math.min(a*.08,12),5),n=Math.max(f.height+e*2+s,t.height??0),y=-n/2+s,p=n/2,u=a*.72,d=[`M${-a/2},${y}`,`L${-u/2},${p}`,`A${u/2},${s} 0 0 0 ${u/2},${p}`,`L${a/2},${y}`,`A${a/2},${s} 0 0 0 ${-a/2},${y}`,"Z"].join(" "),{cssStyles:x}=t,m=r.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const P=I.svg(r).path(d,H(t,{}));m.node()?.appendChild(P),x&&m.attr("style",x)}else m.append("path").attr("d",d).attr("style",g);m.append("ellipse").attr("cx",0).attr("cy",y).attr("rx",a/2).attr("ry",s).attr("style",`fill:none;stroke:${c};stroke-width:1px`),B(t,m);const w=y+(p-y)/2;l.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${w-f.height/2-(f.y-(f.top??0))})`);const b=12,S=$((P,M,W)=>Array.from({length:13},(T,A)=>{const _=Math.PI-A*Math.PI/b;return{x:P*Math.cos(_),y:M+W*s*Math.sin(_)}}),"arc"),k=[...S(a/2,y,-1),...S(u/2,p,1).reverse()];return t.intersect=function(P){return N.polygon(t,k,P)},r}v(ba,"bucket");$(ba,"bucket");var Lt=20,Wt=8,Js=80,Et=8;async function Sa(h,t){const{themeVariables:i}=J(),o=i.clusterBkg,g=i.clusterBorder,{nodeStyles:r}=R(t),{shapeSvg:f,bbox:l}=await O(h,t,X(t)),c=t.padding??8,e=l.height,a=Math.max(l.width+c*2,Js,t?.width??0),s=Math.max(e+Wt+Lt+c*2,t?.height??0),n=-a/2,y=-s/2,p=-(Wt+Lt)/2,u=f.select(".label");u&&(t.useHtmlLabels??bt(J())?u.attr("transform",`translate(${-l.width/2}, ${-l.height/2+p})`):u.attr("transform",`translate(0, ${-l.height/2+p})`));let d;if(t.look==="handDrawn"){const S=I.svg(f),k=H(t,{fill:o,stroke:g,fillStyle:"solid"}),P=S.path(ht(n,y,a,s,Et),k);d=f.insert(()=>P,":first-child"),d.attr("class","basic label-container collapsed-group").attr("style",Q(t.cssStyles))}else d=f.insert("rect",":first-child"),d.attr("class","basic label-container collapsed-group").attr("style",r).attr("rx",Et).attr("ry",Et).attr("x",n).attr("y",y).attr("width",a).attr("height",s).attr("fill",o).attr("stroke",g);const x=y+c+e+Wt;f.append("line").attr("class","collapsed-separator").attr("x1",n+8).attr("y1",x).attr("x2",n+a-8).attr("y2",x).attr("stroke",g).attr("stroke-dasharray","3, 3");const m=x+Lt/2,w=2.5,b=10;for(let S=-1;S<=1;S++)f.append("circle").attr("class","collapsed-indicator").attr("cx",S*b).attr("cy",m).attr("r",w).attr("fill",g);return B(t,d),t.calcIntersect=function(S,k){return N.rect(S,k)},t.intersect=function(S){return N.rect(t,S)},f}v(Sa,"collapsedGroup");$(Sa,"collapsedGroup");function rt(h,t,i,o){return h.insert("polygon",":first-child").attr("points",o.map(function(g){return g.x+","+g.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+i/2+")")}v(rt,"insertPolygonShape");$(rt,"insertPolygonShape");var Ks=["right","left","up","down"],Gt="point",Us=$(h=>{const t=new Set;for(const i of h)switch(i){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(i)}return t},"expandAndDeduplicateDirections"),Qs=$(h=>Ks.filter(t=>h.has(t)).join("|")||Gt,"getDirectionKey"),Ut={"right|left|up|down":$(({height:h,midpoint:t,padding:i,width:o})=>[{x:0,y:0},{x:t,y:0},{x:o/2,y:2*i},{x:o-t,y:0},{x:o,y:0},{x:o,y:-h/3},{x:o+2*i,y:-h/2},{x:o,y:-2*h/3},{x:o,y:-h},{x:o-t,y:-h},{x:o/2,y:-h-2*i},{x:t,y:-h},{x:0,y:-h},{x:0,y:-2*h/3},{x:-2*i,y:-h/2},{x:0,y:-h/3}],"right|left|up|down"),"right|left|up":$(({height:h,midpoint:t,width:i})=>[{x:t,y:0},{x:i-t,y:0},{x:i,y:-h/2},{x:i-t,y:-h},{x:t,y:-h},{x:0,y:-h/2}],"right|left|up"),"right|left|down":$(({height:h,midpoint:t,width:i})=>[{x:0,y:0},{x:t,y:-h},{x:i-t,y:-h},{x:i,y:0}],"right|left|down"),"right|up|down":$(({height:h,midpoint:t,width:i})=>[{x:0,y:0},{x:i,y:-t},{x:i,y:-h+t},{x:0,y:-h}],"right|up|down"),"left|up|down":$(({height:h,midpoint:t,width:i})=>[{x:i,y:0},{x:0,y:-t},{x:0,y:-h+t},{x:i,y:-h}],"left|up|down"),"right|left":$(({height:h,midpoint:t,padding:i,width:o})=>[{x:t,y:0},{x:t,y:-i},{x:o-t,y:-i},{x:o-t,y:0},{x:o,y:-h/2},{x:o-t,y:-h},{x:o-t,y:-h+i},{x:t,y:-h+i},{x:t,y:-h},{x:0,y:-h/2}],"right|left"),"up|down":$(({height:h,midpoint:t,padding:i,width:o})=>[{x:o/2,y:0},{x:0,y:-i},{x:t,y:-i},{x:t,y:-h+i},{x:0,y:-h+i},{x:o/2,y:-h},{x:o,y:-h+i},{x:o-t,y:-h+i},{x:o-t,y:-i},{x:o,y:-i}],"up|down"),"right|up":$(({height:h,midpoint:t,width:i})=>[{x:0,y:0},{x:i,y:-t},{x:0,y:-h}],"right|up"),"right|down":$(({height:h,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-h}],"right|down"),"left|up":$(({height:h,midpoint:t,width:i})=>[{x:i,y:0},{x:0,y:-t},{x:i,y:-h}],"left|up"),"left|down":$(({height:h,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-h}],"left|down"),right:$(({height:h,midpoint:t,padding:i,width:o})=>[{x:t,y:-i},{x:t,y:-i},{x:o-t,y:-i},{x:o-t,y:0},{x:o,y:-h/2},{x:o-t,y:-h},{x:o-t,y:-h+i},{x:t,y:-h+i},{x:t,y:-h+i}],"right"),left:$(({height:h,midpoint:t,padding:i,width:o})=>[{x:t,y:0},{x:t,y:-i},{x:o-t,y:-i},{x:o-t,y:-h+i},{x:t,y:-h+i},{x:t,y:-h},{x:0,y:-h/2}],"left"),up:$(({height:h,midpoint:t,padding:i,width:o})=>[{x:t,y:-i},{x:t,y:-h+i},{x:0,y:-h+i},{x:o/2,y:-h},{x:o,y:-h+i},{x:o-t,y:-h+i},{x:o-t,y:-i}],"up"),down:$(({height:h,midpoint:t,padding:i,width:o})=>[{x:o/2,y:0},{x:0,y:-i},{x:t,y:-i},{x:t,y:-h+i},{x:o-t,y:-h+i},{x:o-t,y:-i},{x:o,y:-i}],"down"),[Gt]:()=>[{x:0,y:0}]},te=$((h,t,i,o)=>{const g=Us(h),r=(i.padding??0)/2,f=t.height+4*r,l=f/2,c=o??t.width+2*l+2*r;return(Ut[Qs(g)]??Ut[Gt])({height:f,midpoint:l,padding:r,width:c})},"getArrowPoints");async function $a(h,t){const i=t,{shapeSvg:o,bbox:g}=await O(h,i,X(i)),r=i.padding??0,f=g.height+2*r,l=f/2,c=g.width+2*l+r,e=i.width??0,a=i.positioned&&(i.widthInColumns??1)>1&&e>c?e:c,s=te(i.directions??[],g,i,a),n=rt(o,a,f,s);return n.attr("style",i.style??null),B(i,n),i.intersect=function(y){return N.polygon(i,s,y)},o}v($a,"block_arrow");$($a,"block_arrow");async function va(h,t,{config:{themeVariables:i}}){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o;const{shapeSvg:r,bbox:f,label:l}=await O(h,t,X(t)),c=i?.nodeBorder??i?.lineColor??"currentColor",e=t.padding??12,a=18,s=12,n=Math.max(f.width+e*2,t.width??0,90),y=Math.max(f.height+e*2+a,t.height??0),p=-y/2,{cssStyles:u}=t,d=r.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const m=I.svg(r).path(ht(-n/2,p,n,y,s),H(t,{}));d.node()?.appendChild(m),u&&d.attr("style",u)}else d.append("rect").attr("x",-n/2).attr("y",p).attr("width",n).attr("height",y).attr("rx",s).attr("ry",s).attr("style",g);d.append("line").attr("x1",-n/2).attr("y1",p+a).attr("x2",n/2).attr("y2",p+a).attr("style",`stroke:${c};stroke-width:1px`);for(let m=0;m<3;m++)d.append("circle").attr("cx",-n/2+12+m*9).attr("cy",p+a/2).attr("r",2.5).attr("style",`fill:${c};stroke:none`);d.append("rect").attr("class","browser-address-bar").attr("x",-n/2+44).attr("y",p+4).attr("width",Math.max(n-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),B(t,d);const x=p+a+(y-a)/2;return l.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${x-f.height/2-(f.y-(f.top??0))})`),t.intersect=function(m){return N.rect(t,m)},r}v(va,"browser");$(va,"browser");var Nt=12;async function ka(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?28:g,f=t.look==="neo"?24:g,{shapeSvg:l,bbox:c}=await O(h,t,X(t)),e=(t?.width??c.width)+(t.look==="neo"?r*2:r+Nt),a=(t?.height??c.height)+(t.look==="neo"?f*2:f),s=0,n=e,y=-a,p=0,u=[{x:s+Nt,y},{x:n,y},{x:n,y:p},{x:s,y:p},{x:s,y:y+Nt},{x:s+Nt,y}];let d;const{cssStyles:x}=t;if(t.look==="handDrawn"){const m=I.svg(l),w=H(t,{}),b=F(u),S=m.path(b,w);d=l.insert(()=>S,":first-child").attr("transform",`translate(${-e/2}, ${a/2})`),x&&d.attr("style",x)}else d=rt(l,e,a,u);return o&&d.attr("style",o),B(t,d),t.intersect=function(m){return N.polygon(t,u,m)},l}v(ka,"card");$(ka,"card");function Pa(h,t){const{nodeStyles:i}=R(t);t.label="";const o=h.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:g}=t,r=Math.max(28,t.width??0),f=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}],l=I.svg(o),c=H(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const e=F(f),a=l.path(e,c),s=o.insert(()=>a,":first-child");return g&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",i),t.width=28,t.height=28,t.intersect=function(n){return N.polygon(t,f,n)},o}v(Pa,"choice");$(Pa,"choice");async function qt(h,t,i){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o;const{shapeSvg:r,bbox:f,halfPadding:l}=await O(h,t,X(t)),c=i?.padding??l,e=t.look==="neo"?f.width/2+32:f.width/2+c;let a;const{cssStyles:s}=t;if(t.look==="handDrawn"){const n=I.svg(r),y=H(t,{}),p=n.circle(0,0,e*2,y);a=r.insert(()=>p,":first-child"),a.attr("class","basic label-container").attr("style",Q(s))}else a=r.insert("circle",":first-child").attr("class","basic label-container").attr("style",g).attr("r",e).attr("cx",0).attr("cy",0);return B(t,a),t.calcIntersect=function(n,y){const p=n.width/2;return N.circle(n,p,y)},t.intersect=function(n){return K.info("Circle intersect",t,e,n),N.circle(t,e,n)},r}v(qt,"circle");$(qt,"circle");async function Ma(h,t){const i=t,{shapeSvg:o,bbox:g,halfPadding:r}=await O(h,i,["node",i.cssClasses,i.class].filter(Boolean).join(" ")),f=o.insert("rect",":first-child"),l=i.padding??0,c=i.positioned?i.width??0:g.width+l,e=i.positioned?i.height??0:g.height+l,a=i.positioned?-c/2:-g.width/2-r,s=i.positioned?-e/2:-g.height/2-r;return f.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",a).attr("y",s).attr("width",c).attr("height",e),B(i,f),i.intersect=function(n){return N.rect(i,n)},o}v(Ma,"composite");$(Ma,"composite");async function Da(h,t,{config:{themeVariables:i}}){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o;const{shapeSvg:r,bbox:f,label:l}=await O(h,t,X(t)),c=i?.nodeBorder??i?.lineColor??"currentColor",e=t.padding??12,a=20,s=12,n=Math.max(f.width+e*2,t.width??0,90),y=Math.max(f.height+e*2+a,t.height??0),p=-y/2,{cssStyles:u}=t,d=r.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const m=I.svg(r).path(ht(-n/2,p,n,y,s),H(t,{}));d.node()?.appendChild(m),u&&d.attr("style",u)}else d.append("rect").attr("x",-n/2).attr("y",p).attr("width",n).attr("height",y).attr("rx",s).attr("ry",s).attr("style",g);d.append("text").attr("x",-n/2+12).attr("y",p+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(">_"),B(t,d);const x=p+a+(y-a)/2;return l.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${x-f.height/2-(f.y-(f.top??0))})`),t.intersect=function(m){return N.rect(t,m)},r}v(Da,"consoleWindow");$(Da,"consoleWindow");function Na(h){const t=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),o=h*2,g={x:o/2*t,y:o/2*i},r={x:-(o/2)*t,y:o/2*i},f={x:-(o/2)*t,y:-(o/2)*i},l={x:o/2*t,y:-(o/2)*i};return`M ${r.x},${r.y} L ${l.x},${l.y}
|
|
2
2
|
M ${g.x},${g.y} L ${f.x},${f.y}`}v(Na,"createLine");$(Na,"createLine");function Ca(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i,t.label="";const g=h.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),r=Math.max(30,t?.width??0),{cssStyles:f}=t,l=I.svg(g),c=H(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const e=l.circle(0,0,r*2,c),a=Na(r),s=l.path(a,c),n=g.insert(()=>e,":first-child");return n.insert(()=>s),n.attr("class","outer-path"),f&&t.look!=="handDrawn"&&n.selectAll("path").attr("style",f),o&&t.look!=="handDrawn"&&n.selectAll("path").attr("style",o),B(t,n),t.intersect=function(y){return K.info("crossedCircle intersect",t,{radius:r,point:y}),N.circle(t,r,y)},g}v(Ca,"crossedCircle");$(Ca,"crossedCircle");function ct(h,t,i,o=100,g=0,r=180){const f=[],l=g*Math.PI/180,c=(r*Math.PI/180-l)/(o-1);for(let e=0;e<o;e++){const a=l+e*c,s=h+i*Math.cos(a),n=t+i*Math.sin(a);f.push({x:-s,y:-n})}return f}v(ct,"generateCirclePoints2");$(ct,"generateCirclePoints");async function Ba(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const{shapeSvg:g,bbox:r,label:f}=await O(h,t,X(t)),l=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,e=r.width+l,a=r.height+c,s=Math.max(5,a*.1),{cssStyles:n}=t,y=[...ct(e/2,-a/2,s,30,-90,0),{x:-e/2-s,y:s},...ct(e/2+s*2,-s,s,20,-180,-270),...ct(e/2+s*2,s,s,20,-90,-180),{x:-e/2-s,y:-a/2},...ct(e/2,a/2,s,20,0,90)],p=[{x:e/2,y:-a/2-s},{x:-e/2,y:-a/2-s},...ct(e/2,-a/2,s,20,-90,0),{x:-e/2-s,y:-s},...ct(e/2+e*.1,-s,s,20,-180,-270),...ct(e/2+e*.1,s,s,20,-90,-180),{x:-e/2-s,y:a/2},...ct(e/2,a/2,s,20,0,90),{x:-e/2,y:a/2+s},{x:e/2,y:a/2+s}],u=I.svg(g),d=H(t,{fill:"none"});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const x=F(y).replace("Z",""),m=u.path(x,d),w=F(p),b=u.path(w,{...d}),S=g.insert("g",":first-child");return S.insert(()=>b,":first-child").attr("stroke-opacity",0),S.insert(()=>m,":first-child"),S.attr("class","text"),n&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",o),S.attr("transform",`translate(${s}, 0)`),f.attr("transform",`translate(${-e/2+s-(r.x-(r.left??0))},${-a/2+(t.padding??0)/2-(r.y-(r.top??0))})`),B(t,S),t.intersect=function(k){return N.polygon(t,p,k)},g}v(Ba,"curlyBraceLeft");$(Ba,"curlyBraceLeft");function ot(h,t,i,o=100,g=0,r=180){const f=[],l=g*Math.PI/180,c=(r*Math.PI/180-l)/(o-1);for(let e=0;e<o;e++){const a=l+e*c,s=h+i*Math.cos(a),n=t+i*Math.sin(a);f.push({x:s,y:n})}return f}v(ot,"generateCirclePoints3");$(ot,"generateCirclePoints");async function Aa(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const{shapeSvg:g,bbox:r,label:f}=await O(h,t,X(t)),l=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,e=r.width+(t.look==="neo"?l*2:l),a=r.height+(t.look==="neo"?c*2:c),s=Math.max(5,a*.1),{cssStyles:n}=t,y=[...ot(e/2,-a/2,s,20,-90,0),{x:e/2+s,y:-s},...ot(e/2+s*2,-s,s,20,-180,-270),...ot(e/2+s*2,s,s,20,-90,-180),{x:e/2+s,y:a/2},...ot(e/2,a/2,s,20,0,90)],p=[{x:-e/2,y:-a/2-s},{x:e/2,y:-a/2-s},...ot(e/2,-a/2,s,20,-90,0),{x:e/2+s,y:-s},...ot(e/2+s*2,-s,s,20,-180,-270),...ot(e/2+s*2,s,s,20,-90,-180),{x:e/2+s,y:a/2},...ot(e/2,a/2,s,20,0,90),{x:e/2,y:a/2+s},{x:-e/2,y:a/2+s}],u=I.svg(g),d=H(t,{fill:"none"});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const x=F(y).replace("Z",""),m=u.path(x,d),w=F(p),b=u.path(w,{...d}),S=g.insert("g",":first-child");return S.insert(()=>b,":first-child").attr("stroke-opacity",0),S.insert(()=>m,":first-child"),S.attr("class","text"),n&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",o),S.attr("transform",`translate(${-s}, 0)`),f.attr("transform",`translate(${-e/2+(t.padding??0)/2-(r.x-(r.left??0))},${-a/2+(t.padding??0)/2-(r.y-(r.top??0))})`),B(t,S),t.intersect=function(k){return N.polygon(t,p,k)},g}v(Aa,"curlyBraceRight");$(Aa,"curlyBraceRight");function U(h,t,i,o=100,g=0,r=180){const f=[],l=g*Math.PI/180,c=(r*Math.PI/180-l)/(o-1);for(let e=0;e<o;e++){const a=l+e*c,s=h+i*Math.cos(a),n=t+i*Math.sin(a);f.push({x:-s,y:-n})}return f}v(U,"generateCirclePoints4");$(U,"generateCirclePoints");async function Ha(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const{shapeSvg:g,bbox:r,label:f}=await O(h,t,X(t)),l=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,e=r.width+(t.look==="neo"?l*2:l),a=r.height+(t.look==="neo"?c*2:c),s=Math.max(5,a*.1),{cssStyles:n}=t,y=[...U(e/2,-a/2,s,30,-90,0),{x:-e/2-s,y:s},...U(e/2+s*2,-s,s,20,-180,-270),...U(e/2+s*2,s,s,20,-90,-180),{x:-e/2-s,y:-a/2},...U(e/2,a/2,s,20,0,90)],p=[...U(-e/2+s+s/2,-a/2,s,20,-90,-180),{x:e/2-s/2,y:s},...U(-e/2-s/2,-s,s,20,0,90),...U(-e/2-s/2,s,s,20,-90,0),{x:e/2-s/2,y:-s},...U(-e/2+s+s/2,a/2,s,30,-180,-270)],u=[{x:e/2,y:-a/2-s},{x:-e/2,y:-a/2-s},...U(e/2,-a/2,s,20,-90,0),{x:-e/2-s,y:-s},...U(e/2+s*2,-s,s,20,-180,-270),...U(e/2+s*2,s,s,20,-90,-180),{x:-e/2-s,y:a/2},...U(e/2,a/2,s,20,0,90),{x:-e/2,y:a/2+s},{x:e/2-s-s/2,y:a/2+s},...U(-e/2+s+s/2,-a/2,s,20,-90,-180),{x:e/2-s/2,y:s},...U(-e/2-s/2,-s,s,20,0,90),...U(-e/2-s/2,s,s,20,-90,0),{x:e/2-s/2,y:-s},...U(-e/2+s+s/2,a/2,s,30,-180,-270)],d=I.svg(g),x=H(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const m=F(y).replace("Z",""),w=d.path(m,x),b=F(p).replace("Z",""),S=d.path(b,x),k=F(u),P=d.path(k,{...x}),M=g.insert("g",":first-child");return M.insert(()=>P,":first-child").attr("stroke-opacity",0),M.insert(()=>w,":first-child"),M.insert(()=>S,":first-child"),M.attr("class","text"),n&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",o),M.attr("transform",`translate(${s-s/4}, 0)`),f.attr("transform",`translate(${-e/2+(t.padding??0)/2-(r.x-(r.left??0))},${-a/2+(t.padding??0)/2-(r.y-(r.top??0))})`),B(t,M),t.intersect=function(W){return N.polygon(t,u,W)},g}v(Ha,"curlyBraces");$(Ha,"curlyBraces");async function Ra(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?16:g,f=t.look==="neo"?12:g,l=20,c=5,{shapeSvg:e,bbox:a}=await O(h,t,X(t)),s=Math.max(l,(a.width+r*2)*1.25,t?.width??0),n=Math.max(c,a.height+f*2,t?.height??0),y=n/2,{cssStyles:p}=t,u=I.svg(e),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const x=s,m=n,w=x-y,b=m/4,S=[{x:w,y:0},{x:b,y:0},{x:0,y:m/2},{x:b,y:m},{x:w,y:m},...lt(-w,-m/2,y,50,270,90)],k=F(S),P=u.path(k,d),M=e.insert(()=>P,":first-child");return M.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&M.selectChildren("path").attr("style",p),o&&t.look!=="handDrawn"&&M.selectChildren("path").attr("style",o),M.attr("transform",`translate(${-s/2}, ${-n/2})`),B(t,M),t.intersect=function(W){return N.polygon(t,S,W)},e}v(Ra,"curvedTrapezoid");$(Ra,"curvedTrapezoid");async function Ia(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const{shapeSvg:g,bbox:r,label:f}=await O(h,t,X(t)),l=t.padding??20,c=Math.max(r.width+l*2,t.width??0,100),e=Math.min(Math.max(c*.23,16),56),a=e*.27,s=Math.max(r.height+l*2,t.height?t.height-(2*e-a):0),n=Math.min(c*.177,s*.45),y=s+2*e-a,p=-y/2,u=p+2*e-a,d=g.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const k=I.svg(g),P=H(t,{}),M=k.path(ht(-c/2,u,c,s,n),P),W=k.circle(0,p+e,e*2,P);d.insert(()=>W,":first-child"),d.insert(()=>M,":first-child"),x&&d.attr("style",x)}else d.append("rect").attr("x",-c/2).attr("y",u).attr("width",c).attr("height",s).attr("rx",n).attr("ry",n).attr("style",o),d.append("circle").attr("cx",0).attr("cy",p+e).attr("r",e).attr("style",o);B(t,d);const m=u+s/2;f.attr("transform",`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${m-r.height/2-(r.y-(r.top??0))})`);const w=p+e,b=Math.asin(Math.min(1,(u-w)/e))*180/Math.PI,S=[...lt(0,-w,e,24,180+b,-b),...lt(-(-c/2+n),-(u+n),n,12,90,0),...lt(-(-c/2+n),-(y/2-n),n,12,360,270),...lt(-(c/2-n),-(y/2-n),n,12,270,180),...lt(-(c/2-n),-(u+n),n,12,180,90)];return t.intersect=function(k){return N.polygon(t,S,k)},g}v(Ia,"person");$(Ia,"person");var ae=$((h,t,i,o,g,r)=>[`M${h},${t+r}`,`a${g},${r} 0,0,0 ${i},0`,`a${g},${r} 0,0,0 ${-i},0`,`l0,${o}`,`a${g},${r} 0,0,0 ${i},0`,`l0,${-o}`].join(" "),"createCylinderPathD"),se=$((h,t,i,o,g,r)=>[`M${h},${t+r}`,`M${h+i},${t+r}`,`a${g},${r} 0,0,0 ${-i},0`,`l0,${o}`,`a${g},${r} 0,0,0 ${i},0`,`l0,${-o}`].join(" "),"createOuterCylinderPathD"),ee=$((h,t,i,o,g,r)=>[`M${h-i/2},${-o/2}`,`a${g},${r} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Qt=8,ta=8;async function La(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?24:g,f=t.look==="neo"?24:g,l=t.width??0;if(t.width&&(t.width=t.width-f,t.width<ta&&(t.width=ta)),t.height){const x=l/2/(2.5+l/50);t.height=t.height-r-x*3,t.height<Qt&&(t.height=Qt)}const{shapeSvg:c,bbox:e,label:a}=await O(h,t,X(t)),s=Math.max(t.width??0,e.width)+f,n=s/2,y=n/(2.5+s/50),p=Math.max(t.height??0,e.height)+r+y;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const x=I.svg(c),m=se(0,0,s,p,n,y),w=ee(0,y,s,p,n,y),b=H(t,{}),S=x.path(m,b),k=x.path(w,H(t,{fill:"none"}));u=c.insert(()=>k,":first-child"),u=c.insert(()=>S,":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const x=ae(0,0,s,p,n,y);u=c.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Q(d)).attr("style",o)}return u.attr("label-offset-y",y),u.attr("transform",`translate(${-s/2}, ${-(p/2+y)})`),B(t,u),a.attr("transform",`translate(${-(e.width/2)-(e.x-(e.left??0))}, ${-(e.height/2)+(t.padding??0)/1.5-(e.y-(e.top??0))})`),t.intersect=function(x){const m=N.rect(t,x),w=m.x-(t.x??0);if(n!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-y)){let b=y*y*(1-w*w/(n*n));b>0&&(b=Math.sqrt(b)),b=y-b,x.y-(t.y??0)>0&&(b=-b),m.y+=b}return m},c}v(La,"cylinder");$(La,"cylinder");async function $t(h,t,i){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o;const{shapeSvg:r,bbox:f}=await O(h,t,X(t)),l=Math.max(f.width+i.labelPaddingX*2,t?.width||0),c=Math.max(f.height+i.labelPaddingY*2,t?.height||0),e=-l/2,a=-c/2;let s,{rx:n,ry:y}=t;const{cssStyles:p}=t;if(i?.rx&&i.ry&&(n=i.rx,y=i.ry),t.look==="handDrawn"){const u=I.svg(r),d=H(t,{}),x=n||y?u.path(ht(e,a,l,c,n||0),d):u.rectangle(e,a,l,c,d);s=r.insert(()=>x,":first-child"),s.attr("class","basic label-container").attr("style",Q(p))}else s=r.insert("rect",":first-child"),s.attr("class","basic label-container").attr("style",g).attr("rx",Q(n)).attr("ry",Q(y)).attr("x",e).attr("y",a).attr("width",l).attr("height",c);return B(t,s,t.look==="handDrawn"?void 0:{width:l,height:c}),t.calcIntersect=function(u,d){return N.rect(u,d)},t.intersect=function(u){return N.rect(t,u)},r}v($t,"drawRect");$($t,"drawRect");async function Wa(h,t){const{cssClasses:i,labelPaddingX:o,labelPaddingY:g,padding:r,width:f,height:l}=t,c=await $t(h,t,{rx:0,ry:0,classes:i??"",labelPaddingX:o??(r??0)*2,labelPaddingY:g??r??0});if(t.look==="handDrawn"){const n=I.svg(c),y=H(t,{}),p=c.select(".basic.label-container > path:nth-child(2)"),u=p.node();if(!u)return c;let d=null;if(u instanceof SVGGraphicsElement)d=u.getBBox();else return c;return c.insert(()=>n.line(d.x,d.y,d.x+d.width,d.y,y),".basic.label-container g.label"),c.insert(()=>n.line(d.x,d.y+d.height,d.x+d.width,d.y+d.height,y),".basic.label-container g.label"),p.remove(),c}const e=c.select(".basic.label-container"),a=(Number(e.attr("width"))||f)??0,s=(Number(e.attr("height"))||l)??0;return a>0&&s>0&&e.attr("stroke-dasharray",`${a} ${s}`),c}v(Wa,"datastore");$(Wa,"datastore");async function Ea(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?16:t.padding??0,{shapeSvg:f,bbox:l,label:c}=await O(h,t,X(t)),e=l.width+g,a=l.height+r,s=a*.2,n=-e/2,y=-a/2-s/2,{cssStyles:p}=t,u=I.svg(f),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const x=[{x:n,y:y+s},{x:-n,y:y+s},{x:-n,y:-y},{x:n,y:-y},{x:n,y},{x:-n,y},{x:-n,y:y+s}],m=u.polygon(x.map(b=>[b.x,b.y]),d),w=f.insert(()=>m,":first-child");return w.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),o&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",o),c.attr("transform",`translate(${n+(t.padding??0)/2-(l.x-(l.left??0))}, ${y+s+(t.padding??0)/2-(l.y-(l.top??0))})`),B(t,w),t.intersect=function(b){return N.rect(t,b)},f}v(Ea,"dividedRectangle");$(Ea,"dividedRectangle");async function Ta(h,t){const{labelStyles:i,nodeStyles:o}=R(t),g=t.look==="neo"?12:5;t.labelStyle=i;const r=t.padding??0,f=t.look==="neo"?16:r,{shapeSvg:l,bbox:c}=await O(h,t,X(t)),e=(t?.width?t?.width/2:c.width/2)+(f??0),a=e-g;let s;const{cssStyles:n}=t;if(t.look==="handDrawn"){const y=I.svg(l),p=H(t,{roughness:.2,strokeWidth:2.5}),u=H(t,{roughness:.2,strokeWidth:1.5}),d=y.circle(0,0,e*2,p),x=y.circle(0,0,a*2,u);s=l.insert("g",":first-child"),s.attr("class",Q(t.cssClasses)).attr("style",Q(n)),s.node()?.appendChild(d),s.node()?.appendChild(x)}else{s=l.insert("g",":first-child");const y=s.insert("circle",":first-child"),p=s.insert("circle");s.attr("class","basic label-container").attr("style",o),y.attr("class","outer-circle").attr("style",o).attr("r",e).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",o).attr("r",a).attr("cx",0).attr("cy",0)}return B(t,s),t.intersect=function(y){return K.info("DoubleCircle intersect",t,e,y),N.circle(t,e,y)},l}v(Ta,"doublecircle");$(Ta,"doublecircle");function _a(h,t,{config:{themeVariables:i}}){const{labelStyles:o,nodeStyles:g}=R(t);t.label="",t.labelStyle=o;const r=h.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),f=7,{cssStyles:l}=t,c=I.svg(r),{nodeBorder:e}=i,a=H(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(a.roughness=0);const s=c.circle(0,0,14,a),n=r.insert(()=>s,":first-child");return n.selectAll("path").attr("style",`fill: ${e} !important;`),l&&l.length>0&&t.look!=="handDrawn"&&n.selectAll("path").attr("style",l),g&&t.look!=="handDrawn"&&n.selectAll("path").attr("style",g),B(t,n),t.intersect=function(y){return K.info("filledCircle intersect",t,{radius:f,point:y}),N.circle(t,f,y)},r}v(_a,"filledCircle");$(_a,"filledCircle");var aa=10,sa=10;async function Ya(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?g*2:g;(t.width||t.height)&&(t.height=t?.height??0,t.height<aa&&(t.height=aa),t.width=(t?.width??0)-r-r/2,t.width<sa&&(t.width=sa));const{shapeSvg:f,bbox:l,label:c}=await O(h,t,X(t)),e=(t?.width?t?.width:l.width)+(r??0),a=t?.height?t?.height:e+l.height,s=a,n=[{x:0,y:-a},{x:s,y:-a},{x:s/2,y:0}],{cssStyles:y}=t,p=I.svg(f),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=F(n),x=p.path(d,u),m=f.insert(()=>x,":first-child").attr("transform",`translate(${-a/2}, ${a/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",y),o&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",o),t.width=e,t.height=a,B(t,m),c.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-a/2+(t.padding??0)/2+(l.y-(l.top??0))})`),t.intersect=function(w){return K.info("Triangle intersect",t,n,w),N.polygon(t,n,w)},f}v(Ya,"flippedTriangle");$(Ya,"flippedTriangle");async function Xa(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const{shapeSvg:g,bbox:r,label:f}=await O(h,t,X(t)),l=t.padding??12,c=Math.max(r.width+l*2,t.width??0,90),e=r.height+l*2,a=Math.max(Math.min(e*.16,14),8),s=Math.max(e+a,t.height??0),n=s-a,y=Math.max(c*.38,28),p=-s/2,u=[{x:-c/2,y:p},{x:-c/2+y,y:p},{x:-c/2+y,y:p+a},{x:c/2,y:p+a},{x:c/2,y:s/2},{x:-c/2,y:s/2}],d=[`M${u[0].x},${u[0].y}`,...u.slice(1).map(b=>`L${b.x},${b.y}`),"Z"].join(" "),{cssStyles:x}=t;let m;if(t.look==="handDrawn"){const b=I.svg(g).path(d,H(t,{}));m=g.insert(()=>b,":first-child").attr("class","basic label-container"),x&&m.attr("style",x)}else m=g.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",o);t.look==="handDrawn"?B(t,m):B(t,m,{width:c,height:s});const w=p+a+n/2;return f.attr("transform",`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${w-r.height/2-(r.y-(r.top??0))})`),t.intersect=function(b){return N.polygon(t,u,b)},g}v(Xa,"folder");$(Xa,"folder");function Oa(h,t,{dir:i,config:{state:o,themeVariables:g}}){const{nodeStyles:r}=R(t);t.label="";const f=h.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:l}=t;let c=Math.max(70,t?.width??0),e=Math.max(10,t?.height??0);i==="LR"&&(c=Math.max(10,t?.width??0),e=Math.max(70,t?.height??0));const a=-1*c/2,s=-1*e/2,n=I.svg(f),y=H(t,{stroke:g.lineColor,fill:g.lineColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const p=n.rectangle(a,s,c,e,y),u=f.insert(()=>p,":first-child");l&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",l),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),B(t,u);const d=o?.padding??0;return t.width&&t.height&&(t.width+=d/2||0,t.height+=d/2||0),t.intersect=function(x){return N.rect(t,x)},f}v(Oa,"forkJoin");$(Oa,"forkJoin");async function ja(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=15,r=10,f=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-l*2,t.height<r&&(t.height=r),t.width=(t?.width??0)-f*2,t.width<g&&(t.width=g));const{shapeSvg:c,bbox:e}=await O(h,t,X(t)),a=(t?.width?t?.width:Math.max(g,e.width))+f*2,s=(t?.height?t?.height:Math.max(r,e.height))+l*2,n=s/2,{cssStyles:y}=t,p=I.svg(c),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-a/2,y:-s/2},{x:a/2-n,y:-s/2},...lt(-a/2+n,0,n,50,90,270),{x:a/2-n,y:s/2},{x:-a/2,y:s/2}],x=F(d),m=p.path(x,u),w=c.insert(()=>m,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",y),o&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",o),B(t,w),t.intersect=function(b){return K.info("Pill intersect",t,{radius:n,point:b}),N.polygon(t,d,b)},c}v(ja,"halfRoundedRectangle");$(ja,"halfRoundedRectangle");var ie=$((h,t,i,o,g)=>[`M${h+g},${t}`,`L${h+i-g},${t}`,`L${h+i},${t-o/2}`,`L${h+i-g},${t-o}`,`L${h+g},${t-o}`,`L${h},${t-o/2}`,"Z"].join(" "),"createHexagonPathD");async function Fa(h,t){const{labelStyles:i,nodeStyles:o}=R(t),g=t.look==="neo"?3.5:4;t.labelStyle=i;const r=t.padding??0,f=70,l=32,c=t.look==="neo"?f:r,e=t.look==="neo"?l:r;if(t.width||t.height){const m=(t.height??0)/g;t.width=(t?.width??0)-2*m-e,t.height=(t.height??0)-c}const{shapeSvg:a,bbox:s}=await O(h,t,X(t)),n=(t?.height?t?.height:s.height)+c,y=n/g,p=(t?.width?t?.width:s.width)+2*y+e,u=[{x:y,y:0},{x:p-y,y:0},{x:p,y:-n/2},{x:p-y,y:-n},{x:y,y:-n},{x:0,y:-n/2}];let d;const{cssStyles:x}=t;if(t.look==="handDrawn"){const m=I.svg(a),w=H(t,{}),b=ie(0,0,p,n,y),S=m.path(b,w);d=a.insert(()=>S,":first-child").attr("transform",`translate(${-p/2}, ${n/2})`),x&&d.attr("style",x)}else d=rt(a,p,n,u);return o&&d.attr("style",o),t.width=p,t.height=n,B(t,d),t.intersect=function(m){return N.polygon(t,u,m)},a}v(Fa,"hexagon");$(Fa,"hexagon");async function Ga(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.label="",t.labelStyle=i;const{shapeSvg:g}=await O(h,t,X(t)),r=Math.max(30,t?.width??0),f=Math.max(30,t?.height??0),{cssStyles:l}=t,c=I.svg(g),e=H(t,{});t.look!=="handDrawn"&&(e.roughness=0,e.fillStyle="solid");const a=[{x:0,y:0},{x:r,y:0},{x:0,y:f},{x:r,y:f}],s=F(a),n=c.path(s,e),y=g.insert(()=>n,":first-child");return y.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",l),o&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",o),y.attr("transform",`translate(${-r/2}, ${-f/2})`),B(t,y),t.intersect=function(p){return K.info("Pill intersect",t,{points:a}),N.polygon(t,a,p)},g}v(Ga,"hourglass");$(Ga,"hourglass");async function qa(h,t,{config:{themeVariables:i,flowchart:o}}){const{labelStyles:g}=R(t);t.labelStyle=g;const r=t.assetHeight??48,f=t.assetWidth??48,l=Math.max(r,f),c=o?.wrappingWidth;t.width=Math.max(l,c??0);const{shapeSvg:e,bbox:a,label:s}=await O(h,t,"icon-shape default"),n=t.pos==="t",y=l,p=l,{nodeBorder:u}=i,{stylesMap:d}=Ht(t),x=-p/2,m=-y/2,w=t.label?8:0,b=I.svg(e),S=H(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const k=b.rectangle(x,m,p,y,S),P=Math.max(p,a.width),M=y+a.height+w,W=b.rectangle(-P/2,-M/2,P,M,{...S,fill:"transparent",stroke:"none"}),T=e.insert(()=>k,":first-child"),A=e.insert(()=>W);if(t.icon){const _=e.append("g");_.html(`<g>${await At(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const L=_.node().getBBox(),C=L.width,D=L.height,Y=L.x,E=L.y;_.attr("transform",`translate(${-C/2-Y},${n?a.height/2+w/2-D/2-E:-a.height/2-w/2-D/2-E})`),_.attr("style",`color: ${d.get("stroke")??u};`)}return s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${n?-M/2:M/2-a.height})`),T.attr("transform",`translate(0,${n?a.height/2+w/2:-a.height/2-w/2})`),B(t,A),t.intersect=function(_){if(K.info("iconSquare intersect",t,_),!t.label)return N.rect(t,_);const L=t.x??0,C=t.y??0,D=t.height??0;let Y=[];return n?Y=[{x:L-a.width/2,y:C-D/2},{x:L+a.width/2,y:C-D/2},{x:L+a.width/2,y:C-D/2+a.height+w},{x:L+p/2,y:C-D/2+a.height+w},{x:L+p/2,y:C+D/2},{x:L-p/2,y:C+D/2},{x:L-p/2,y:C-D/2+a.height+w},{x:L-a.width/2,y:C-D/2+a.height+w}]:Y=[{x:L-p/2,y:C-D/2},{x:L+p/2,y:C-D/2},{x:L+p/2,y:C-D/2+y},{x:L+a.width/2,y:C-D/2+y},{x:L+a.width/2/2,y:C+D/2},{x:L-a.width/2,y:C+D/2},{x:L-a.width/2,y:C-D/2+y},{x:L-p/2,y:C-D/2+y}],N.polygon(t,Y,_)},e}v(qa,"icon");$(qa,"icon");async function za(h,t,{config:{themeVariables:i,flowchart:o}}){const{labelStyles:g}=R(t);t.labelStyle=g;const r=t.assetHeight??48,f=t.assetWidth??48,l=Math.max(r,f),c=o?.wrappingWidth;t.width=Math.max(l,c??0);const{shapeSvg:e,bbox:a,label:s}=await O(h,t,"icon-shape default"),n=t.label?8:0,y=t.pos==="t",{nodeBorder:p,mainBkg:u}=i,{stylesMap:d}=Ht(t),x=I.svg(e),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid"),m.stroke=d.get("fill")??u;const w=e.append("g");t.icon&&w.html(`<g>${await At(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const b=w.node().getBBox(),S=b.width,k=b.height,P=b.x,M=b.y,W=Math.max(S,k)*Math.SQRT2+40,T=x.circle(0,0,W,m),A=Math.max(W,a.width),_=W+a.height+n,L=x.rectangle(-A/2,-_/2,A,_,{...m,fill:"transparent",stroke:"none"}),C=e.insert(()=>T,":first-child"),D=e.insert(()=>L);return w.attr("transform",`translate(${-S/2-P},${y?a.height/2+n/2-k/2-M:-a.height/2-n/2-k/2-M})`),w.attr("style",`color: ${d.get("stroke")??p};`),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${y?-_/2:_/2-a.height})`),C.attr("transform",`translate(0,${y?a.height/2+n/2:-a.height/2-n/2})`),B(t,D),t.intersect=function(Y){return K.info("iconSquare intersect",t,Y),N.rect(t,Y)},e}v(za,"iconCircle");$(za,"iconCircle");async function Va(h,t,{config:{themeVariables:i,flowchart:o}}){const{labelStyles:g}=R(t);t.labelStyle=g;const r=t.assetHeight??48,f=t.assetWidth??48,l=Math.max(r,f),c=o?.wrappingWidth;t.width=Math.max(l,c??0);const{shapeSvg:e,bbox:a,halfPadding:s,label:n}=await O(h,t,"icon-shape default"),y=t.pos==="t",p=l+s*2,u=l+s*2,{nodeBorder:d,mainBkg:x}=i,{stylesMap:m}=Ht(t),w=-u/2,b=-p/2,S=t.label?8:0,k=I.svg(e),P=H(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid"),P.stroke=m.get("fill")??x;const M=k.path(ht(w,b,u,p,5),P),W=Math.max(u,a.width),T=p+a.height+S,A=k.rectangle(-W/2,-T/2,W,T,{...P,fill:"transparent",stroke:"none"}),_=e.insert(()=>M,":first-child").attr("class","icon-shape2"),L=e.insert(()=>A);if(t.icon){const C=e.append("g");C.html(`<g>${await At(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const D=C.node().getBBox(),Y=D.width,E=D.height,V=D.x,q=D.y;C.attr("transform",`translate(${-Y/2-V},${y?a.height/2+S/2-E/2-q:-a.height/2-S/2-E/2-q})`),C.attr("style",`color: ${m.get("stroke")??d};`)}return n.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${y?-T/2:T/2-a.height})`),_.attr("transform",`translate(0,${y?a.height/2+S/2:-a.height/2-S/2})`),B(t,L),t.intersect=function(C){if(K.info("iconSquare intersect",t,C),!t.label)return N.rect(t,C);const D=t.x??0,Y=t.y??0,E=t.height??0;let V=[];return y?V=[{x:D-a.width/2,y:Y-E/2},{x:D+a.width/2,y:Y-E/2},{x:D+a.width/2,y:Y-E/2+a.height+S},{x:D+u/2,y:Y-E/2+a.height+S},{x:D+u/2,y:Y+E/2},{x:D-u/2,y:Y+E/2},{x:D-u/2,y:Y-E/2+a.height+S},{x:D-a.width/2,y:Y-E/2+a.height+S}]:V=[{x:D-u/2,y:Y-E/2},{x:D+u/2,y:Y-E/2},{x:D+u/2,y:Y-E/2+p},{x:D+a.width/2,y:Y-E/2+p},{x:D+a.width/2/2,y:Y+E/2},{x:D-a.width/2,y:Y+E/2},{x:D-a.width/2,y:Y-E/2+p},{x:D-u/2,y:Y-E/2+p}],N.polygon(t,V,C)},e}v(Va,"iconRounded");$(Va,"iconRounded");async function Za(h,t,{config:{themeVariables:i,flowchart:o}}){const{labelStyles:g}=R(t);t.labelStyle=g;const r=t.assetHeight??48,f=t.assetWidth??48,l=Math.max(r,f),c=o?.wrappingWidth;t.width=Math.max(l,c??0);const{shapeSvg:e,bbox:a,halfPadding:s,label:n}=await O(h,t,"icon-shape default"),y=t.pos==="t",p=l+s*2,u=l+s*2,{nodeBorder:d,mainBkg:x}=i,{stylesMap:m}=Ht(t),w=-u/2,b=-p/2,S=t.label?8:0,k=I.svg(e),P=H(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid"),P.stroke=m.get("fill")??x;const M=k.path(ht(w,b,u,p,.1),P),W=Math.max(u,a.width),T=p+a.height+S,A=k.rectangle(-W/2,-T/2,W,T,{...P,fill:"transparent",stroke:"none"}),_=e.insert(()=>M,":first-child"),L=e.insert(()=>A);if(t.icon){const C=e.append("g");C.html(`<g>${await At(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const D=C.node().getBBox(),Y=D.width,E=D.height,V=D.x,q=D.y;C.attr("transform",`translate(${-Y/2-V},${y?a.height/2+S/2-E/2-q:-a.height/2-S/2-E/2-q})`),C.attr("style",`color: ${m.get("stroke")??d};`)}return n.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${y?-T/2:T/2-a.height})`),_.attr("transform",`translate(0,${y?a.height/2+S/2:-a.height/2-S/2})`),B(t,L),t.intersect=function(C){if(K.info("iconSquare intersect",t,C),!t.label)return N.rect(t,C);const D=t.x??0,Y=t.y??0,E=t.height??0;let V=[];return y?V=[{x:D-a.width/2,y:Y-E/2},{x:D+a.width/2,y:Y-E/2},{x:D+a.width/2,y:Y-E/2+a.height+S},{x:D+u/2,y:Y-E/2+a.height+S},{x:D+u/2,y:Y+E/2},{x:D-u/2,y:Y+E/2},{x:D-u/2,y:Y-E/2+a.height+S},{x:D-a.width/2,y:Y-E/2+a.height+S}]:V=[{x:D-u/2,y:Y-E/2},{x:D+u/2,y:Y-E/2},{x:D+u/2,y:Y-E/2+p},{x:D+a.width/2,y:Y-E/2+p},{x:D+a.width/2/2,y:Y+E/2},{x:D-a.width/2,y:Y+E/2},{x:D-a.width/2,y:Y-E/2+p},{x:D-u/2,y:Y-E/2+p}],N.polygon(t,V,C)},e}v(Za,"iconSquare");$(Za,"iconSquare");async function Ja(h,t,{config:{flowchart:i}}){const o=new Image;o.src=t?.img??"",await o.decode();const g=Number(o.naturalWidth.toString().replace("px","")),r=Number(o.naturalHeight.toString().replace("px",""));t.imageAspectRatio=g/r;const{labelStyles:f}=R(t);t.labelStyle=f;const l=i?.wrappingWidth;t.defaultWidth=i?.wrappingWidth;const c=Math.max(t.label?l??0:0,t?.assetWidth??g),e=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:c,a=t.constraint==="on"?e/t.imageAspectRatio:t?.assetHeight??r;t.width=Math.max(e,l??0);const{shapeSvg:s,bbox:n,label:y}=await O(h,t,"image-shape default"),p=t.pos==="t",u=-e/2,d=-a/2,x=t.label?8:0,m=I.svg(s),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const b=m.rectangle(u,d,e,a,w),S=Math.max(e,n.width),k=a+n.height+x,P=m.rectangle(-S/2,-k/2,S,k,{...w,fill:"none",stroke:"none"}),M=s.insert(()=>b,":first-child"),W=s.insert(()=>P);if(t.img){const T=s.append("image");T.attr("href",t.img),T.attr("width",e),T.attr("height",a),T.attr("preserveAspectRatio","none"),T.attr("transform",`translate(${-e/2},${p?k/2-a:-k/2})`)}return y.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))},${p?-a/2-n.height/2-x/2:a/2-n.height/2+x/2})`),M.attr("transform",`translate(0,${p?n.height/2+x/2:-n.height/2-x/2})`),B(t,W),t.intersect=function(T){if(K.info("iconSquare intersect",t,T),!t.label)return N.rect(t,T);const A=t.x??0,_=t.y??0,L=t.height??0;let C=[];return p?C=[{x:A-n.width/2,y:_-L/2},{x:A+n.width/2,y:_-L/2},{x:A+n.width/2,y:_-L/2+n.height+x},{x:A+e/2,y:_-L/2+n.height+x},{x:A+e/2,y:_+L/2},{x:A-e/2,y:_+L/2},{x:A-e/2,y:_-L/2+n.height+x},{x:A-n.width/2,y:_-L/2+n.height+x}]:C=[{x:A-e/2,y:_-L/2},{x:A+e/2,y:_-L/2},{x:A+e/2,y:_-L/2+a},{x:A+n.width/2,y:_-L/2+a},{x:A+n.width/2/2,y:_+L/2},{x:A-n.width/2,y:_+L/2},{x:A-n.width/2,y:_-L/2+a},{x:A-e/2,y:_-L/2+a}],N.polygon(t,C,T)},s}v(Ja,"imageSquare");$(Ja,"imageSquare");async function Ka(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=g,f=t.look==="neo"?g*2:g,{shapeSvg:l,bbox:c}=await O(h,t,X(t)),e=Math.max(c.height+r*2,t.height??0),a=Math.max(c.width+f*2,(t.width??0)-e),s=[{x:0,y:0},{x:a,y:0},{x:a+3*e/6,y:-e},{x:-3*e/6,y:-e}];let n;const{cssStyles:y}=t;if(t.look==="handDrawn"){const p=I.svg(l),u=H(t,{}),d=F(s),x=p.path(d,u);n=l.insert(()=>x,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),y&&n.attr("style",y)}else n=rt(l,a,e,s);return o&&n.attr("style",o),t.width=a,t.height=e,B(t,n),t.intersect=function(p){return N.polygon(t,s,p)},l}v(Ka,"inv_trapezoid");$(Ka,"inv_trapezoid");async function Ua(h,t){const{shapeSvg:i,bbox:o,label:g}=await O(h,t,"label"),r=i.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),i.attr("class","label edgeLabel"),g.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),B(t,r),t.intersect=function(f){return N.rect(t,f)},i}v(Ua,"labelRect");$(Ua,"labelRect");async function Qa(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=g,f=t.look==="neo"?g*2:g,{shapeSvg:l,bbox:c}=await O(h,t,X(t)),e=Math.max(c.height+r,t.height??0),a=Math.max(c.width+f,(t.width??0)-e),s=[{x:0,y:0},{x:a+3*e/6,y:0},{x:a,y:-e},{x:-(3*e)/6,y:-e}];let n;const{cssStyles:y}=t;if(t.look==="handDrawn"){const p=I.svg(l),u=H(t,{}),d=F(s),x=p.path(d,u);n=l.insert(()=>x,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),y&&n.attr("style",y)}else n=rt(l,a,e,s);return o&&n.attr("style",o),t.width=a,t.height=e,B(t,n),t.intersect=function(p){return N.polygon(t,s,p)},l}v(Qa,"lean_left");$(Qa,"lean_left");async function ts(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=g,f=t.look==="neo"?g*2:g,{shapeSvg:l,bbox:c}=await O(h,t,X(t)),e=Math.max(c.height+r,t.height??0),a=Math.max(c.width+f,(t.width??0)-e),s=[{x:-3*e/6,y:0},{x:a,y:0},{x:a+3*e/6,y:-e},{x:0,y:-e}];let n;const{cssStyles:y}=t;if(t.look==="handDrawn"){const p=I.svg(l),u=H(t,{}),d=F(s),x=p.path(d,u);n=l.insert(()=>x,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),y&&n.attr("style",y)}else n=rt(l,a,e,s);return o&&n.attr("style",o),t.width=a,t.height=e,B(t,n),t.intersect=function(p){return N.polygon(t,s,p)},l}v(ts,"lean_right");$(ts,"lean_right");function as(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.label="",t.labelStyle=i;const g=h.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:r}=t,f=Math.max(35,t?.width??0),l=Math.max(35,t?.height??0),c=7,e=[{x:f,y:0},{x:0,y:l+c/2},{x:f-14,y:l+c/2},{x:0,y:2*l},{x:f,y:l-c/2},{x:14,y:l-c/2}],a=I.svg(g),s=H(t,{});t.look!=="handDrawn"&&(s.roughness=0,s.fillStyle="solid");const n=F(e),y=a.path(n,s),p=g.insert(()=>y,":first-child");return p.attr("class","outer-path"),r&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",r),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),p.attr("transform",`translate(-${f/2},${-l})`),B(t,p),t.intersect=function(u){return K.info("lightningBolt intersect",t,u),N.polygon(t,e,u)},g}v(as,"lightningBolt");$(as,"lightningBolt");var le=$((h,t,i,o,g,r,f)=>[`M${h},${t+r}`,`a${g},${r} 0,0,0 ${i},0`,`a${g},${r} 0,0,0 ${-i},0`,`l0,${o}`,`a${g},${r} 0,0,0 ${i},0`,`l0,${-o}`,`M${h},${t+r+f}`,`a${g},${r} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),re=$((h,t,i,o,g,r,f)=>[`M${h},${t+r}`,`M${h+i},${t+r}`,`a${g},${r} 0,0,0 ${-i},0`,`l0,${o}`,`a${g},${r} 0,0,0 ${i},0`,`l0,${-o}`,`M${h},${t+r+f}`,`a${g},${r} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),ne=$((h,t,i,o,g,r)=>[`M${h-i/2},${-o/2}`,`a${g},${r} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),ea=10,ia=10;async function ss(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?16:g,f=t.look==="neo"?24:g;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-r,t.width<ia&&(t.width=ia);const m=x/2/(2.5+x/50);t.height=(t.height??0)-f-m*3,t.height<ea&&(t.height=ea)}const{shapeSvg:l,bbox:c,label:e}=await O(h,t,X(t)),a=(t?.width?t?.width:c.width)+r*2,s=a/2,n=s/(2.5+a/50),y=(t?.height?t?.height:c.height)+n+f*2,p=y*.1;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const x=I.svg(l),m=re(0,0,a,y,s,n,p),w=ne(0,n,a,y,s,n),b=H(t,{}),S=x.path(m,b),k=x.path(w,b);l.insert(()=>k,":first-child").attr("class","line"),u=l.insert(()=>S,":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const x=le(0,0,a,y,s,n,p);u=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Q(d)).attr("style",o)}return u.attr("label-offset-y",n),u.attr("transform",`translate(${-a/2}, ${-(y/2+n)})`),B(t,u),e.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),t.intersect=function(x){const m=N.rect(t,x),w=m.x-(t.x??0);if(s!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-n)){let b=n*n*(1-w*w/(s*s));b>0&&(b=Math.sqrt(b)),b=n-b,x.y-(t.y??0)>0&&(b=-b),m.y+=b}return m},l}v(ss,"linedCylinder");$(ss,"linedCylinder");async function es(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?16:g,f=t.look==="neo"?12:g;(t.width||t.height)&&(t.width=(t.width??0)*10/11-r*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-f*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:e}=await O(h,t,X(t)),a=(t?.width?t?.width:c.width)+(r??0)*2,s=(t?.height?t?.height:c.height)+(f??0)*2,n=t.look==="neo"?s/4:s/8,y=s+n,{cssStyles:p}=t,u=I.svg(l),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const x=[{x:-a/2-a/2*.1,y:-y/2},{x:-a/2-a/2*.1,y:y/2},...ft(-a/2-a/2*.1,y/2,a/2+a/2*.1,y/2,n,.8),{x:a/2+a/2*.1,y:-y/2},{x:-a/2-a/2*.1,y:-y/2},{x:-a/2,y:-y/2},{x:-a/2,y:y/2*1.1},{x:-a/2,y:-y/2}],m=u.polygon(x.map(b=>[b.x,b.y]),d),w=l.insert(()=>m,":first-child");return w.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),o&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",o),w.attr("transform",`translate(0,${-n/2})`),e.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(c.x-(c.left??0))},${-s/2+(t.padding??0)-n/2-(c.y-(c.top??0))})`),B(t,w),t.intersect=function(b){return N.polygon(t,x,b)},l}v(es,"linedWaveEdgedRect");$(es,"linedWaveEdgedRect");async function is(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?16:g,f=t.look==="neo"?12:g,l=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2-2*l,10),t.height=Math.max((t?.height??0)-f*2-2*l,10));const{shapeSvg:c,bbox:e,label:a}=await O(h,t,X(t)),s=(t?.width?t?.width:e.width)+r*2+2*l,n=(t?.height?t?.height:e.height)+f*2+2*l,y=s-2*l,p=n-2*l,u=-y/2,d=-p/2,{cssStyles:x}=t,m=I.svg(c),w=H(t,{}),b=[{x:u-l,y:d+l},{x:u-l,y:d+p+l},{x:u+y-l,y:d+p+l},{x:u+y-l,y:d+p},{x:u+y,y:d+p},{x:u+y,y:d+p-l},{x:u+y+l,y:d+p-l},{x:u+y+l,y:d-l},{x:u+l,y:d-l},{x:u+l,y:d},{x:u,y:d},{x:u,y:d+l}],S=[{x:u,y:d+l},{x:u+y-l,y:d+l},{x:u+y-l,y:d+p},{x:u+y,y:d+p},{x:u+y,y:d},{x:u,y:d}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const k=F(b);let P=m.path(k,w);const M=F(S);let W=m.path(M,w);t.look!=="handDrawn"&&(P=_t(P),W=_t(W));const T=c.insert("g",":first-child");return T.insert(()=>P),T.insert(()=>W),T.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",x),o&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",o),a.attr("transform",`translate(${-(e.width/2)-l-(e.x-(e.left??0))}, ${-(e.height/2)+l-(e.y-(e.top??0))})`),B(t,T),t.intersect=function(A){return N.polygon(t,b,A)},c}v(is,"multiRect");$(is,"multiRect");async function ls(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const{shapeSvg:g,bbox:r,label:f}=await O(h,t,X(t)),l=t.padding??0,c=t.look==="neo"?16:l,e=t.look==="neo"?12:l;let a=!0;(t.width||t.height)&&(a=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-e*3);const s=Math.max(r.width,t?.width??0)+c*2,n=Math.max(r.height,t?.height??0)+e*3,y=t.look==="neo"?n/4:n/8,p=n+(a?y/2:-y/2),u=-s/2,d=-p/2,x=10,{cssStyles:m}=t,w=ft(u-x,d+p+x,u+s-x,d+p+x,y,.8),b=w?.[w.length-1],S=[{x:u-x,y:d+x},{x:u-x,y:d+p+x},...w,{x:u+s-x,y:b.y-x},{x:u+s,y:b.y-x},{x:u+s,y:b.y-20},{x:u+s+x,y:b.y-20},{x:u+s+x,y:d-x},{x:u+x,y:d-x},{x:u+x,y:d},{x:u,y:d},{x:u,y:d+x}],k=[{x:u,y:d+x},{x:u+s-x,y:d+x},{x:u+s-x,y:b.y-x},{x:u+s,y:b.y-x},{x:u+s,y:d},{x:u,y:d}],P=I.svg(g),M=H(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const W=F(S),T=P.path(W,M),A=F(k),_=P.path(A,M),L=g.insert(()=>T,":first-child");return L.insert(()=>_),L.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",m),o&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",o),L.attr("transform",`translate(0,${-y/2})`),f.attr("transform",`translate(${-(r.width/2)-x-(r.x-(r.left??0))}, ${-(r.height/2)+x-y/2-(r.y-(r.top??0))})`),B(t,L),t.intersect=function(C){return N.polygon(t,S,C)},g}v(ls,"multiWaveEdgedRectangle");$(ls,"multiWaveEdgedRectangle");async function rs(h,t,{config:{themeVariables:i}}){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o,t.useHtmlLabels||bt(Mt())||(t.centerLabel=!0);const{shapeSvg:r,bbox:f,label:l}=await O(h,t,X(t)),c=Math.max(f.width+(t.padding??0)*2,t?.width??0),e=Math.max(f.height+(t.padding??0)*2,t?.height??0),a=-c/2,s=-e/2,{cssStyles:n}=t,y=I.svg(r),p=H(t,{fill:i.noteBkgColor,stroke:i.noteBorderColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const u=y.rectangle(a,s,c,e,p),d=r.insert(()=>u,":first-child");return d.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),g&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",g),l.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))}, ${-(f.height/2)-(f.y-(f.top??0))})`),B(t,d),t.intersect=function(x){return N.rect(t,x)},r}v(rs,"note");$(rs,"note");var ce=$((h,t,i)=>[`M${h+i/2},${t}`,`L${h+i},${t-i/2}`,`L${h+i/2},${t-i}`,`L${h},${t-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function ns(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const{shapeSvg:g,bbox:r}=await O(h,t,X(t)),f=r.width+(t.padding??0)+(r.height+(t.padding??0)),l=.5,c=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}];let e;const{cssStyles:a}=t;if(t.look==="handDrawn"){const s=I.svg(g),n=H(t,{}),y=ce(0,0,f),p=s.path(y,n);e=g.insert(()=>p,":first-child").attr("transform",`translate(${-f/2+l}, ${f/2})`),a&&e.attr("style",a)}else e=rt(g,f,f,c),e.attr("transform",`translate(${-f/2+l}, ${f/2})`);return o&&e.attr("style",o),B(t,e),t.calcIntersect=function(s,n){const y=s.width,p=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],u=N.polygon(s,p,n);return{x:u.x-.5,y:u.y-.5}},t.intersect=function(s){return this.calcIntersect(t,s)},g}v(ns,"question");$(ns,"question");async function cs(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?21:g??0,f=t.look==="neo"?12:g??0,{shapeSvg:l,bbox:c,label:e}=await O(h,t,X(t)),a=c.width+(t.look==="neo"?r*2:r),s=Math.max(c.height+(t.look==="neo"?f*2:f),t.height??0),n=s/4,y=-Math.max(a,(t.width??0)-n)/2,p=-s/2,u=p/2,d=[{x:y+u,y:p},{x:y,y:0},{x:y+u,y:-p},{x:-y,y:-p},{x:-y,y:p}],{cssStyles:x}=t,m=I.svg(l),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const b=F(d),S=m.path(b,w),k=l.insert(()=>S,":first-child");return k.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",x),o&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",o),k.attr("transform",`translate(${-u/2},0)`),e.attr("transform",`translate(${-u/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),B(t,k),t.intersect=function(P){return N.polygon(t,d,P)},l}v(cs,"rect_left_inv_arrow");$(cs,"rect_left_inv_arrow");async function os(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;let g;t.cssClasses?g="node "+t.cssClasses:g="node default";const r=h.insert("g").attr("class",g).attr("id",t.domId||t.id),f=r.insert("g"),l=r.insert("g").attr("class","label").attr("style",o),c=t.description,e=t.label,a=await Kt(l,e,t.labelStyle,!0,!0);let s={width:0,height:0};if(bt(J())){const M=a.children[0],W=tt(a);s=M.getBoundingClientRect(),W.attr("width",s.width),W.attr("height",s.height)}K.info("Text 2",c);const n=c||[],y=a.getBBox(),p=await Kt(l,Array.isArray(n)?n.join("<br/>"):n,t.labelStyle,!0,!0),u=p.children[0],d=tt(p);s=u.getBoundingClientRect(),d.attr("width",s.width),d.attr("height",s.height);const x=(t.padding||0)/2;tt(p).attr("transform","translate( "+(s.width>y.width?0:(y.width-s.width)/2)+", "+(y.height+x+5)+")"),tt(a).attr("transform","translate( "+(s.width<y.width?0:-(y.width-s.width)/2)+", 0)"),s=l.node().getBBox(),l.attr("transform","translate("+-s.width/2+", "+(-s.height/2-x+3)+")");const m=s.width+(t.padding||0),w=s.height+(t.padding||0),b=-s.width/2-x,S=-s.height/2-x;let k,P;if(t.look==="handDrawn"){const M=I.svg(r),W=H(t,{}),T=M.path(ht(b,S,m,w,t.rx||0),W),A=M.line(-s.width/2-x,-s.height/2-x+y.height+x,s.width/2+x,-s.height/2-x+y.height+x,W);P=r.insert(()=>(K.debug("Rough node insert CXC",T),A),":first-child"),k=r.insert(()=>(K.debug("Rough node insert CXC",T),T),":first-child")}else k=f.insert("rect",":first-child"),P=f.insert("line"),k.attr("class","outer title-state").attr("style",o).attr("x",-s.width/2-x).attr("y",-s.height/2-x).attr("width",s.width+(t.padding||0)).attr("height",s.height+(t.padding||0)),P.attr("class","divider").attr("x1",-s.width/2-x).attr("x2",s.width/2+x).attr("y1",-s.height/2-x+y.height+x).attr("y2",-s.height/2-x+y.height+x);return B(t,k),t.intersect=function(M){return N.rect(t,M)},r}v(os,"rectWithTitle");$(os,"rectWithTitle");async function hs(h,t,{config:{themeVariables:i}}){const o=i?.radius??5;return $t(h,t,{rx:o,ry:o,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}v(hs,"roundedRect");$(hs,"roundedRect");var ut=8;async function gs(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?12:t.padding??0,{shapeSvg:f,bbox:l,label:c}=await O(h,t,X(t)),e=(t?.width??l.width)+g*2+(t.look==="neo"?ut:ut*2),a=(t?.height??l.height)+r*2,s=e-ut,n=a,y=ut-e/2,p=-a/2,{cssStyles:u}=t,d=I.svg(f),x=H(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const m=[{x:y,y:p},{x:y+s,y:p},{x:y+s,y:p+n},{x:y-ut,y:p+n},{x:y-ut,y:p},{x:y,y:p},{x:y,y:p+n}],w=d.polygon(m.map(S=>[S.x,S.y]),x),b=f.insert(()=>w,":first-child");return b.attr("class","basic label-container outer-path").attr("style",Q(u)),o&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",o),u&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",o),c.attr("transform",`translate(${ut/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),B(t,b),t.intersect=function(S){return N.rect(t,S)},f}v(gs,"shadedProcess");$(gs,"shadedProcess");async function ys(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?16:g,f=t.look==="neo"?12:g;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2,10),t.height=Math.max((t?.height??0)/1.5-f*2,10));const{shapeSvg:l,bbox:c,label:e}=await O(h,t,X(t)),a=(t?.width?t?.width:c.width)+r*2,s=((t?.height?t?.height:c.height)+f*2)*1.5,n=a,y=s/1.5,p=-n/2,u=-y/2,{cssStyles:d}=t,x=I.svg(l),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const w=[{x:p,y:u},{x:p,y:u+y},{x:p+n,y:u+y},{x:p+n,y:u-y/2}],b=F(w),S=x.path(b,m),k=l.insert(()=>S,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),o&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",o),k.attr("transform",`translate(0, ${y/4})`),e.attr("transform",`translate(${-n/2+(t.padding??0)-(c.x-(c.left??0))}, ${-y/4+(t.padding??0)-(c.y-(c.top??0))})`),B(t,k),t.intersect=function(P){return N.polygon(t,w,P)},l}v(ys,"slopedRect");$(ys,"slopedRect");async function fs(h,t){const i=t.padding??0,o=t.look==="neo"?16:i*2,g=t.look==="neo"?12:i;return $t(h,t,{rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??o,labelPaddingY:g})}v(fs,"squareRect");$(fs,"squareRect");async function ps(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?20:g,f=t.look==="neo"?12:g,{shapeSvg:l,bbox:c}=await O(h,t,X(t)),e=c.height+(t.look==="neo"?f*2:f),a=c.width+e/4+(t.look==="neo"?r*2:r),s=e/2,{cssStyles:n}=t,y=I.svg(l),p=H(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const u=[{x:-a/2+s,y:-e/2},{x:a/2-s,y:-e/2},...lt(-a/2+s,0,s,50,90,270),{x:a/2-s,y:e/2},...lt(a/2-s,0,s,50,270,450)],d=F(u),x=y.path(d,p),m=l.insert(()=>x,":first-child");return m.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),o&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",o),B(t,m),t.intersect=function(w){return N.polygon(t,u,w)},l}v(ps,"stadium");$(ps,"stadium");async function us(h,t){return $t(h,t,{rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"})}v(us,"state");$(us,"state");function ds(h,t,{config:{themeVariables:i}}){const{labelStyles:o,nodeStyles:g}=R(t);t.labelStyle=o;const{cssStyles:r}=t,{lineColor:f,stateBorder:l,nodeBorder:c,nodeShadow:e}=i;(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);const a=h.insert("g").attr("class","node default").attr("id",t.domId??t.id),s=I.svg(a),n=H(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");const y=s.circle(0,0,t.width,{...n,stroke:f,strokeWidth:2}),p=l??c,u=(t.width??0)*5/14,d=s.circle(0,0,u,{...n,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),x=a.insert(()=>y,":first-child");if(x.insert(()=>d),t.look!=="handDrawn"&&x.attr("class","outer-path"),r&&x.selectAll("path").attr("style",r),g&&x.selectAll("path").attr("style",g),t.width<25&&e&&t.look!=="handDrawn"){const m=h.node()?.ownerSVGElement?.id??"",w=m?`${m}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${w})`)}return B(t,x),t.intersect=function(m){return N.circle(t,(t.width??0)/2,m)},a}v(ds,"stateEnd");$(ds,"stateEnd");function xs(h,t,{config:{themeVariables:i}}){const{lineColor:o,nodeShadow:g}=i;(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);const r=h.insert("g").attr("class","node default").attr("id",t.domId||t.id);let f;if(t.look==="handDrawn"){const l=I.svg(r).circle(0,0,t.width,Xs(o));f=r.insert(()=>l),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else f=r.insert("circle",":first-child"),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&g&&t.look!=="handDrawn"){const l=h.node()?.ownerSVGElement?.id??"",c=l?`${l}-drop-shadow-small`:"drop-shadow-small";f.attr("style",`filter:url(#${c})`)}return B(t,f),t.intersect=function(l){return N.circle(t,(t.width??7)/2,l)},r}v(xs,"stateStart");$(xs,"stateStart");var xt=8;async function ms(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t?.padding??8,r=t.look==="neo"?28:g,f=t.look==="neo"?12:g,{shapeSvg:l,bbox:c}=await O(h,t,X(t)),e=Math.max(c.width+2*xt+r,t.width??0),a=Math.max(c.height+f,t.height??0),s=e-2*xt,n=a,y=-e/2,p=-a/2,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-n},{x:-8,y:-n},{x:-8,y:0}];if(t.look==="handDrawn"){const d=I.svg(l),x=H(t,{}),m=d.rectangle(y,p,s+16,n,x),w=d.line(y+xt,p,y+xt,p+n,x),b=d.line(y+xt+s,p,y+xt+s,p+n,x);l.insert(()=>w,":first-child"),l.insert(()=>b,":first-child");const S=l.insert(()=>m,":first-child"),{cssStyles:k}=t;S.attr("class","basic label-container").attr("style",Q(k)),B(t,S)}else{const d=rt(l,s,n,u);o&&d.attr("style",o),B(t,d)}return t.intersect=function(d){return N.polygon(t,u,d)},l}v(ms,"subroutine");$(ms,"subroutine");var Tt=.2;async function ws(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const g=t.padding??0,r=t.look==="neo"?16:g,f=t.look==="neo"?12:g;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-f*2,10),t.width=Math.max((t?.width??0)-r*2-Tt*(t.height+f*2),10));const{shapeSvg:l,bbox:c}=await O(h,t,X(t)),e=(t?.height?t?.height:c.height)+f*2,a=Tt*e,s=Tt*e,n=(t?.width?t?.width:c.width)+r*2+a-a,y=e,p=-n/2,u=-y/2,{cssStyles:d}=t,x=I.svg(l),m=H(t,{}),w=[{x:p-a/2,y:u},{x:p+n+a/2,y:u},{x:p+n+a/2,y:u+y},{x:p-a/2,y:u+y}],b=[{x:p+n-a/2,y:u+y},{x:p+n+a/2,y:u+y},{x:p+n+a/2,y:u+y-s}];t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const S=F(w),k=x.path(S,m),P=F(b),M=x.path(P,{...m,fillStyle:"solid"}),W=l.insert(()=>M,":first-child");return W.insert(()=>k,":first-child"),W.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",d),o&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",o),B(t,W),t.intersect=function(T){return N.polygon(t,w,T)},l}v(ws,"taggedRect");$(ws,"taggedRect");async function bs(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const{shapeSvg:g,bbox:r,label:f}=await O(h,t,X(t)),l=Math.max(r.width+(t.padding??0)*2,t?.width??0),c=Math.max(r.height+(t.padding??0)*2,t?.height??0),e=c/8,a=.2*l,s=.2*c,n=c+e,{cssStyles:y}=t,p=I.svg(g),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-l/2-l/2*.1,y:n/2},...ft(-l/2-l/2*.1,n/2,l/2+l/2*.1,n/2,e,.8),{x:l/2+l/2*.1,y:-n/2},{x:-l/2-l/2*.1,y:-n/2}],x=-l/2+l/2*.1,m=-n/2-s*.4,w=[{x:x+l-a,y:(m+c)*1.3},{x:x+l,y:m+c-s},{x:x+l,y:(m+c)*.9},...ft(x+l,(m+c)*1.25,x+l-a,(m+c)*1.3,-c*.02,.5)],b=F(d),S=p.path(b,u),k=F(w),P=p.path(k,{...u,fillStyle:"solid"}),M=g.insert(()=>P,":first-child");return M.insert(()=>S,":first-child"),M.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",y),o&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",o),M.attr("transform",`translate(0,${-e/2})`),f.attr("transform",`translate(${-l/2+(t.padding??0)-(r.x-(r.left??0))},${-c/2+(t.padding??0)-e/2-(r.y-(r.top??0))})`),B(t,M),t.intersect=function(W){return N.polygon(t,d,W)},g}v(bs,"taggedWaveEdgedRectangle");$(bs,"taggedWaveEdgedRectangle");async function Ss(h,t){const{labelStyles:i,nodeStyles:o}=R(t);t.labelStyle=i;const{shapeSvg:g,bbox:r}=await O(h,t,X(t)),f=Math.max(r.width+(t.padding??0),t?.width||0),l=Math.max(r.height+(t.padding??0),t?.height||0),c=-f/2,e=-l/2,a=g.insert("rect",":first-child");return a.attr("class","text").attr("style",o).attr("rx",0).attr("ry",0).attr("x",c).attr("y",e).attr("width",f).attr("height",l),B(t,a),t.intersect=function(s){return N.rect(t,s)},g}v(Ss,"text");$(Ss,"text");var oe=$((h,t,i,o,g,r)=>`M${h},${t}
|
|
3
3
|
a${g},${r} 0,0,1 0,${-o}
|
|
4
4
|
l${i},0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Lt=Object.defineProperty;var s=(t,i)=>Lt(t,"name",{value:i,configurable:!0});import{n as c}from"./chunk-Y2CYZVJY-OvsAdhaO.js";import{m,p as Dt}from"./src-Bssc388C.js";import{R as Ft,h as O,p as Wt,r as st,s as L}from"./chunk-DU6HZSFF-2P5iNHqg.js";import{t as zt}from"./dist-Cj4C2HPs.js";function rt(t){this._context=t}s(rt,"Linear");rt.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}},"point")};function Tt(t){return new rt(t)}s(Tt,"linear_default");var ht=class{static{s(this,"Bump")}constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i)}this._x0=t,this._y0=i}};function jt(t){return new ht(t,!0)}s(jt,"bumpX");function Ht(t){return new ht(t,!1)}s(Ht,"bumpY");function x(){}s(x,"noop_default");function A(t,i,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+n)/6)}s(A,"point$3");function P(t){this._context=t}s(P,"Basis");P.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 3:A(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:A(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i},"point")};function Ut(t){return new P(t)}s(Ut,"basis_default");function ot(t){this._context=t}s(ot,"BasisClosed");ot.prototype={areaStart:x,areaEnd:x,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:A(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i},"point")};function Xt(t){return new ot(t)}s(Xt,"basisClosed_default");function at(t){this._context=t}s(at,"BasisOpen");at.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(n,e):this._context.moveTo(n,e);break;case 3:this._point=4;default:A(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i},"point")};function Yt(t){return new at(t)}s(Yt,"basisOpen_default");function _t(t,i){this._basis=new P(t),this._beta=i}s(_t,"Bundle");_t.prototype={lineStart:s(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:s(function(){var t=this._x,i=this._y,n=t.length-1;if(n>0)for(var e=t[0],h=i[0],o=t[n]-e,r=i[n]-h,a=-1,_;++a<=n;)_=a/n,this._basis.point(this._beta*t[a]+(1-this._beta)*(e+_*o),this._beta*i[a]+(1-this._beta)*(h+_*r));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:s(function(t,i){this._x.push(+t),this._y.push(+i)},"point")};var qt=s((function t(i){function n(e){return i===1?new P(e):new _t(e,i)}return s(n,"bundle"),n.beta=function(e){return t(+e)},n}),"custom")(.85);function E(t,i,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-n),t._x2,t._y2)}s(E,"point$2");function D(t,i){this._context=t,this._k=(1-i)/6}s(D,"Cardinal");D.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:E(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:E(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Kt=s((function t(i){function n(e){return new D(e,i)}return s(n,"cardinal"),n.tension=function(e){return t(+e)},n}),"custom")(0);function F(t,i){this._context=t,this._k=(1-i)/6}s(F,"CardinalClosed");F.prototype={areaStart:x,areaEnd:x,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:E(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Gt=s((function t(i){function n(e){return new F(e,i)}return s(n,"cardinal"),n.tension=function(e){return t(+e)},n}),"custom")(0);function W(t,i){this._context=t,this._k=(1-i)/6}s(W,"CardinalOpen");W.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:E(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Jt=s((function t(i){function n(e){return new W(e,i)}return s(n,"cardinal"),n.tension=function(e){return t(+e)},n}),"custom")(0);function z(t,i,n){var e=t._x1,h=t._y1,o=t._x2,r=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,_=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/_,h=(h*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/_}if(t._l23_a>1e-12){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-i*t._l12_2a)/l,r=(r*f+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(e,h,o,r,t._x2,t._y2)}s(z,"point$1");function ct(t,i){this._context=t,this._alpha=i}s(ct,"CatmullRom");ct.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:z(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Zt=s((function t(i){function n(e){return i?new ct(e,i):new D(e,0)}return s(n,"catmullRom"),n.alpha=function(e){return t(+e)},n}),"custom")(.5);function ft(t,i){this._context=t,this._alpha=i}s(ft,"CatmullRomClosed");ft.prototype={areaStart:x,areaEnd:x,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},"lineEnd"),point:s(function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:z(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Qt=s((function t(i){function n(e){return i?new ft(e,i):new F(e,0)}return s(n,"catmullRom"),n.alpha=function(e){return t(+e)},n}),"custom")(.5);function lt(t,i){this._context=t,this._alpha=i}s(lt,"CatmullRomOpen");lt.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:z(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Vt=s((function t(i){function n(e){return i?new lt(e,i):new W(e,0)}return s(n,"catmullRom"),n.alpha=function(e){return t(+e)},n}),"custom")(.5);function ut(t){this._context=t}s(ut,"LinearClosed");ut.prototype={areaStart:x,areaEnd:x,lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){this._point&&this._context.closePath()},"lineEnd"),point:s(function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))},"point")};function Ct(t){return new ut(t)}s(Ct,"linearClosed_default");function J(t){return t<0?-1:1}s(J,"sign");function Z(t,i,n){var e=t._x1-t._x0,h=i-t._x1,o=(t._y1-t._y0)/(e||h<0&&-0),r=(n-t._y1)/(h||e<0&&-0),a=(o*h+r*e)/(e+h);return(J(o)+J(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}s(Z,"slope3");function Q(t,i){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-i)/2:i}s(Q,"slope2");function B(t,i,n){var e=t._x0,h=t._y0,o=t._x1,r=t._y1,a=(o-e)/3;t._context.bezierCurveTo(e+a,h+a*i,o-a,r-a*n,o,r)}s(B,"point");function M(t){this._context=t}s(M,"MonotoneX");M.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:B(this,this._t0,Q(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){var n=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,B(this,Q(this,n=Z(this,t,i)),n);break;default:B(this,this._t0,n=Z(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=n}},"point")};function pt(t){this._context=new yt(t)}s(pt,"MonotoneY");(pt.prototype=Object.create(M.prototype)).point=function(t,i){M.prototype.point.call(this,i,t)};function yt(t){this._context=t}s(yt,"ReflectContext");yt.prototype={moveTo:s(function(t,i){this._context.moveTo(i,t)},"moveTo"),closePath:s(function(){this._context.closePath()},"closePath"),lineTo:s(function(t,i){this._context.lineTo(i,t)},"lineTo"),bezierCurveTo:s(function(t,i,n,e,h,o){this._context.bezierCurveTo(i,t,e,n,o,h)},"bezierCurveTo")};function ti(t){return new M(t)}s(ti,"monotoneX");function ii(t){return new pt(t)}s(ii,"monotoneY");function dt(t){this._context=t}s(dt,"Natural");dt.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:s(function(){var t=this._x,i=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),n===2)this._context.lineTo(t[1],i[1]);else for(var e=V(t),h=V(i),o=0,r=1;r<n;++o,++r)this._context.bezierCurveTo(e[0][o],h[0][o],e[1][o],h[1][o],t[r],i[r]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:s(function(t,i){this._x.push(+t),this._y.push(+i)},"point")};function V(t){var i,n=t.length-1,e,h=new Array(n),o=new Array(n),r=new Array(n);for(h[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<n-1;++i)h[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(h[n-1]=2,o[n-1]=7,r[n-1]=8*t[n-1]+t[n],i=1;i<n;++i)e=h[i]/o[i-1],o[i]-=e,r[i]-=e*r[i-1];for(h[n-1]=r[n-1]/o[n-1],i=n-2;i>=0;--i)h[i]=(r[i]-h[i+1])/o[i];for(o[n-1]=(t[n]+h[n-1])/2,i=0;i<n-1;++i)o[i]=2*t[i+1]-h[i+1];return[h,o]}s(V,"controlPoints");function ei(t){return new dt(t)}s(ei,"natural_default");function $(t,i){this._context=t,this._t=i}s($,"Step");$.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:s(function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,i)}}this._x=t,this._y=i},"point")};function ni(t){return new $(t,.5)}s(ni,"step_default");function si(t){return new $(t,0)}s(si,"stepBefore");function ri(t){return new $(t,1)}s(ri,"stepAfter");function I(t){if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!=="[object Object]"){const n=t[Symbol.toStringTag];return n==null||!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable?!1:t.toString()===`[object ${n}]`}let i=t;for(;Object.getPrototypeOf(i)!==null;)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(t)===i}s(I,"isPlainObject");function hi(){}s(hi,"noop");function xt(t){return Object.getOwnPropertySymbols(t).filter(i=>Object.prototype.propertyIsEnumerable.call(t,i))}s(xt,"getSymbols");function T(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}s(T,"getTag");var oi="[object RegExp]",gt="[object String]",mt="[object Number]",wt="[object Boolean]",bt="[object Arguments]",ai="[object Symbol]",_i="[object Date]",ci="[object Map]",fi="[object Set]",li="[object Array]",ui="[object ArrayBuffer]",pi="[object Object]",yi="[object DataView]",di="[object Uint8Array]",xi="[object Uint8ClampedArray]",gi="[object Uint16Array]",mi="[object Uint32Array]",wi="[object Int8Array]",bi="[object Int16Array]",vi="[object Int32Array]",Si="[object Float32Array]",Oi="[object Float64Array]",C=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function vt(t){return typeof C.Buffer<"u"&&C.Buffer.isBuffer(t)}s(vt,"isBuffer");function Ni(t){return Number.isSafeInteger(t)&&t>=0}s(Ni,"isLength");function Ai(t){return t!=null&&typeof t!="function"&&Ni(t.length)}s(Ai,"isArrayLike");function Ei(t){return t==="__proto__"}s(Ei,"isUnsafeProperty");function j(t){return t==null||typeof t!="object"&&typeof t!="function"}s(j,"isPrimitive");function H(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}s(H,"isTypedArray$1");function Mi(t,i){return g(t,void 0,t,new Map,i)}s(Mi,"cloneDeepWith$1");function g(t,i,n,e=new Map,h=void 0){const o=h?.(t,i,n,e);if(o!==void 0)return o;if(j(t))return t;if(e.has(t))return e.get(t);if(Array.isArray(t)){const r=new Array(t.length);e.set(t,r);for(let a=0;a<t.length;a++)r[a]=g(t[a],a,n,e,h);return Object.hasOwn(t,"index")&&(r.index=t.index),Object.hasOwn(t,"input")&&(r.input=t.input),r}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const r=new RegExp(t.source,t.flags);return r.lastIndex=t.lastIndex,r}if(t instanceof Map){const r=new Map;e.set(t,r);for(const[a,_]of t)r.set(a,g(_,a,n,e,h));return r}if(t instanceof Set){const r=new Set;e.set(t,r);for(const a of t)r.add(g(a,void 0,n,e,h));return r}if(vt(t))return t.subarray();if(H(t)){const r=new(Object.getPrototypeOf(t)).constructor(t.length);e.set(t,r);for(let a=0;a<t.length;a++)r[a]=g(t[a],a,n,e,h);return r}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const r=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return e.set(t,r),p(r,t,n,e,h),r}if(typeof File<"u"&&t instanceof File){const r=new File([t],t.name,{type:t.type});return e.set(t,r),p(r,t,n,e,h),r}if(typeof Blob<"u"&&t instanceof Blob){const r=new Blob([t],{type:t.type});return e.set(t,r),p(r,t,n,e,h),r}if(t instanceof Error){const r=structuredClone(t);return e.set(t,r),r.message=t.message,r.name=t.name,r.stack=t.stack,r.cause=t.cause,r.constructor=t.constructor,p(r,t,n,e,h),r}if(t instanceof Boolean){const r=new Boolean(t.valueOf());return e.set(t,r),p(r,t,n,e,h),r}if(t instanceof Number){const r=new Number(t.valueOf());return e.set(t,r),p(r,t,n,e,h),r}if(t instanceof String){const r=new String(t.valueOf());return e.set(t,r),p(r,t,n,e,h),r}if(typeof t=="object"&&Pi(t)){const r=Object.create(Object.getPrototypeOf(t));return e.set(t,r),p(r,t,n,e,h),r}return t}s(g,"cloneDeepWithImpl");function p(t,i,n=t,e,h){const o=[...Object.keys(i),...xt(i)];for(let r=0;r<o.length;r++){const a=o[r],_=Object.getOwnPropertyDescriptor(t,a);(_==null||_.writable)&&(t[a]=g(i[a],a,n,e,h))}}s(p,"copyProperties");function Pi(t){switch(T(t)){case bt:case li:case ui:case yi:case wt:case _i:case Si:case Oi:case wi:case bi:case vi:case ci:case mt:case pi:case oi:case fi:case gt:case ai:case di:case xi:case gi:case mi:return!0;default:return!1}}s(Pi,"isCloneableObject");function $i(t,i){return Mi(t,(n,e,h,o)=>{const r=i?.(n,e,h,o);if(r!==void 0)return r;if(typeof t=="object"){if(T(t)==="[object Object]"&&typeof t.constructor!="function"){const a={};return o.set(t,a),p(a,t,h,o),a}switch(Object.prototype.toString.call(t)){case mt:case gt:case wt:{const a=new t.constructor(t?.valueOf());return p(a,t),a}case bt:{const a={};return p(a,t),a.length=t.length,a[Symbol.iterator]=t[Symbol.iterator],a}default:return}}})}s($i,"cloneDeepWith");function tt(t){return $i(t)}s(tt,"cloneDeep");function it(t){return t!==null&&typeof t=="object"&&T(t)==="[object Arguments]"}s(it,"isArguments");function k(t){return typeof t=="object"&&t!==null}s(k,"isObjectLike");function Bi(t){return k(t)&&Ai(t)}s(Bi,"isArrayLikeObject");function R(t){return H(t)}s(R,"isTypedArray");function b(t,i){if(typeof t!="function"||i!=null&&typeof i!="function")throw new TypeError("Expected a function");const n=s(function(...e){const h=i?i.apply(this,e):e[0],o=n.cache;if(o.has(h))return o.get(h);const r=t.apply(this,e);return n.cache=o.set(h,r)||o,r},"memoized");return n.cache=new(b.Cache||Map),n}s(b,"memoize");b.Cache=Map;function Ii(t){if(j(t))return t;if(Array.isArray(t)||H(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);const i=Object.getPrototypeOf(t);if(i==null)return Object.assign(Object.create(i),t);const n=i.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new n(t);if(t instanceof RegExp){const e=new n(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new n(t.buffer.slice(0));if(t instanceof Error){let e;return t instanceof AggregateError?e=new n(t.errors,t.message,{cause:t.cause}):e=new n(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}return typeof File<"u"&&t instanceof File?new n([t],t.name,{type:t.type,lastModified:t.lastModified}):typeof t=="object"?Object.assign(Object.create(i),t):t}s(Ii,"clone");function Ri(t,...i){const n=i.slice(0,-1),e=i[i.length-1];let h=t;for(let o=0;o<n.length;o++){const r=n[o];h=N(h,r,e,new Map)}return h}s(Ri,"mergeWith");function N(t,i,n,e){if(j(t)&&(t=Object(t)),i==null||typeof i!="object")return t;if(e.has(i))return Ii(e.get(i));if(e.set(i,t),Array.isArray(i)){i=i.slice();for(let o=0;o<i.length;o++)o in i||(i[o]=void 0)}const h=[...Object.keys(i),...xt(i)];for(let o=0;o<h.length;o++){const r=h[o];if(Ei(r))continue;let a=i[r],_=t[r];if(it(a)&&(a={...a}),it(_)&&(_={..._}),vt(a)&&(a=tt(a)),Array.isArray(a))if(Array.isArray(_)){const l=[],u=Reflect.ownKeys(_);for(let y=0;y<u.length;y++){const d=u[y];l[d]=_[d]}_=l}else if(Bi(_)){const l=[];for(let u=0;u<_.length;u++)l[u]=_[u];_=l}else _=[];const f=n(_,a,r,t,i,e);f!==void 0?t[r]=f:Array.isArray(a)||k(_)&&k(a)&&(I(_)||I(a)||R(_)||R(a))?t[r]=N(_,a,n,e):_==null&&I(a)?t[r]=N({},a,n,e):_==null&&R(a)?t[r]=tt(a):(_===void 0||a!==void 0)&&(t[r]=a)}return t}s(N,"mergeWithDeep");function ki(t,...i){return Ri(t,...i,hi)}s(ki,"merge");var Li=zt();var Di={curveBasis:Ut,curveBasisClosed:Xt,curveBasisOpen:Yt,curveBumpX:jt,curveBumpY:Ht,curveBundle:qt,curveCardinalClosed:Gt,curveCardinalOpen:Jt,curveCardinal:Kt,curveCatmullRomClosed:Qt,curveCatmullRomOpen:Vt,curveCatmullRom:Zt,curveLinear:Tt,curveLinearClosed:Ct,curveMonotoneX:ti,curveMonotoneY:ii,curveNatural:ei,curveStep:ni,curveStepAfter:ri,curveStepBefore:si},Fi=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Wi=c(function(t,i){const n=St(t,/(?:init\b)|(?:initialize\b)/);let e={};if(Array.isArray(n)){const r=n.map(a=>a.args);Ft(r),e=st(e,[...r])}else e=n.args;if(!e)return;let h=Wt(t,i);const o="config";return e[o]!==void 0&&(h==="flowchart-v2"&&(h="flowchart"),e[h]=e[o],delete e[o]),e},"detectInit"),St=c(function(t,i=null){try{const n=new RegExp(`[%]{2}(?![{]${Fi.source})(?=[}][%]{2}).*
|
|
1
|
+
var Lt=Object.defineProperty;var s=(t,i)=>Lt(t,"name",{value:i,configurable:!0});import{n as c}from"./chunk-Y2CYZVJY-OvsAdhaO.js";import{m,p as Dt}from"./src-Bssc388C.js";import{R as Ft,h as O,p as Wt,r as st,s as L}from"./chunk-DU6HZSFF-mLZ_DAj9.js";import{t as zt}from"./dist-Cj4C2HPs.js";function rt(t){this._context=t}s(rt,"Linear");rt.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}},"point")};function Tt(t){return new rt(t)}s(Tt,"linear_default");var ht=class{static{s(this,"Bump")}constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i)}this._x0=t,this._y0=i}};function jt(t){return new ht(t,!0)}s(jt,"bumpX");function Ht(t){return new ht(t,!1)}s(Ht,"bumpY");function x(){}s(x,"noop_default");function A(t,i,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+n)/6)}s(A,"point$3");function P(t){this._context=t}s(P,"Basis");P.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 3:A(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:A(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i},"point")};function Ut(t){return new P(t)}s(Ut,"basis_default");function ot(t){this._context=t}s(ot,"BasisClosed");ot.prototype={areaStart:x,areaEnd:x,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:A(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i},"point")};function Xt(t){return new ot(t)}s(Xt,"basisClosed_default");function at(t){this._context=t}s(at,"BasisOpen");at.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(n,e):this._context.moveTo(n,e);break;case 3:this._point=4;default:A(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i},"point")};function Yt(t){return new at(t)}s(Yt,"basisOpen_default");function _t(t,i){this._basis=new P(t),this._beta=i}s(_t,"Bundle");_t.prototype={lineStart:s(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:s(function(){var t=this._x,i=this._y,n=t.length-1;if(n>0)for(var e=t[0],h=i[0],o=t[n]-e,r=i[n]-h,a=-1,_;++a<=n;)_=a/n,this._basis.point(this._beta*t[a]+(1-this._beta)*(e+_*o),this._beta*i[a]+(1-this._beta)*(h+_*r));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:s(function(t,i){this._x.push(+t),this._y.push(+i)},"point")};var qt=s((function t(i){function n(e){return i===1?new P(e):new _t(e,i)}return s(n,"bundle"),n.beta=function(e){return t(+e)},n}),"custom")(.85);function E(t,i,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-n),t._x2,t._y2)}s(E,"point$2");function D(t,i){this._context=t,this._k=(1-i)/6}s(D,"Cardinal");D.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:E(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:E(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Kt=s((function t(i){function n(e){return new D(e,i)}return s(n,"cardinal"),n.tension=function(e){return t(+e)},n}),"custom")(0);function F(t,i){this._context=t,this._k=(1-i)/6}s(F,"CardinalClosed");F.prototype={areaStart:x,areaEnd:x,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:E(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Gt=s((function t(i){function n(e){return new F(e,i)}return s(n,"cardinal"),n.tension=function(e){return t(+e)},n}),"custom")(0);function W(t,i){this._context=t,this._k=(1-i)/6}s(W,"CardinalOpen");W.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:E(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Jt=s((function t(i){function n(e){return new W(e,i)}return s(n,"cardinal"),n.tension=function(e){return t(+e)},n}),"custom")(0);function z(t,i,n){var e=t._x1,h=t._y1,o=t._x2,r=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,_=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/_,h=(h*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/_}if(t._l23_a>1e-12){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-i*t._l12_2a)/l,r=(r*f+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(e,h,o,r,t._x2,t._y2)}s(z,"point$1");function ct(t,i){this._context=t,this._alpha=i}s(ct,"CatmullRom");ct.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:z(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Zt=s((function t(i){function n(e){return i?new ct(e,i):new D(e,0)}return s(n,"catmullRom"),n.alpha=function(e){return t(+e)},n}),"custom")(.5);function ft(t,i){this._context=t,this._alpha=i}s(ft,"CatmullRomClosed");ft.prototype={areaStart:x,areaEnd:x,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},"lineEnd"),point:s(function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:z(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Qt=s((function t(i){function n(e){return i?new ft(e,i):new F(e,0)}return s(n,"catmullRom"),n.alpha=function(e){return t(+e)},n}),"custom")(.5);function lt(t,i){this._context=t,this._alpha=i}s(lt,"CatmullRomOpen");lt.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:z(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i},"point")};var Vt=s((function t(i){function n(e){return i?new lt(e,i):new W(e,0)}return s(n,"catmullRom"),n.alpha=function(e){return t(+e)},n}),"custom")(.5);function ut(t){this._context=t}s(ut,"LinearClosed");ut.prototype={areaStart:x,areaEnd:x,lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){this._point&&this._context.closePath()},"lineEnd"),point:s(function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))},"point")};function Ct(t){return new ut(t)}s(Ct,"linearClosed_default");function J(t){return t<0?-1:1}s(J,"sign");function Z(t,i,n){var e=t._x1-t._x0,h=i-t._x1,o=(t._y1-t._y0)/(e||h<0&&-0),r=(n-t._y1)/(h||e<0&&-0),a=(o*h+r*e)/(e+h);return(J(o)+J(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}s(Z,"slope3");function Q(t,i){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-i)/2:i}s(Q,"slope2");function B(t,i,n){var e=t._x0,h=t._y0,o=t._x1,r=t._y1,a=(o-e)/3;t._context.bezierCurveTo(e+a,h+a*i,o-a,r-a*n,o,r)}s(B,"point");function M(t){this._context=t}s(M,"MonotoneX");M.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:B(this,this._t0,Q(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,i){var n=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,B(this,Q(this,n=Z(this,t,i)),n);break;default:B(this,this._t0,n=Z(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=n}},"point")};function pt(t){this._context=new yt(t)}s(pt,"MonotoneY");(pt.prototype=Object.create(M.prototype)).point=function(t,i){M.prototype.point.call(this,i,t)};function yt(t){this._context=t}s(yt,"ReflectContext");yt.prototype={moveTo:s(function(t,i){this._context.moveTo(i,t)},"moveTo"),closePath:s(function(){this._context.closePath()},"closePath"),lineTo:s(function(t,i){this._context.lineTo(i,t)},"lineTo"),bezierCurveTo:s(function(t,i,n,e,h,o){this._context.bezierCurveTo(i,t,e,n,o,h)},"bezierCurveTo")};function ti(t){return new M(t)}s(ti,"monotoneX");function ii(t){return new pt(t)}s(ii,"monotoneY");function dt(t){this._context=t}s(dt,"Natural");dt.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:s(function(){var t=this._x,i=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),n===2)this._context.lineTo(t[1],i[1]);else for(var e=V(t),h=V(i),o=0,r=1;r<n;++o,++r)this._context.bezierCurveTo(e[0][o],h[0][o],e[1][o],h[1][o],t[r],i[r]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:s(function(t,i){this._x.push(+t),this._y.push(+i)},"point")};function V(t){var i,n=t.length-1,e,h=new Array(n),o=new Array(n),r=new Array(n);for(h[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<n-1;++i)h[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(h[n-1]=2,o[n-1]=7,r[n-1]=8*t[n-1]+t[n],i=1;i<n;++i)e=h[i]/o[i-1],o[i]-=e,r[i]-=e*r[i-1];for(h[n-1]=r[n-1]/o[n-1],i=n-2;i>=0;--i)h[i]=(r[i]-h[i+1])/o[i];for(o[n-1]=(t[n]+h[n-1])/2,i=0;i<n-1;++i)o[i]=2*t[i+1]-h[i+1];return[h,o]}s(V,"controlPoints");function ei(t){return new dt(t)}s(ei,"natural_default");function $(t,i){this._context=t,this._t=i}s($,"Step");$.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:s(function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:s(function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,i)}}this._x=t,this._y=i},"point")};function ni(t){return new $(t,.5)}s(ni,"step_default");function si(t){return new $(t,0)}s(si,"stepBefore");function ri(t){return new $(t,1)}s(ri,"stepAfter");function I(t){if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!=="[object Object]"){const n=t[Symbol.toStringTag];return n==null||!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable?!1:t.toString()===`[object ${n}]`}let i=t;for(;Object.getPrototypeOf(i)!==null;)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(t)===i}s(I,"isPlainObject");function hi(){}s(hi,"noop");function xt(t){return Object.getOwnPropertySymbols(t).filter(i=>Object.prototype.propertyIsEnumerable.call(t,i))}s(xt,"getSymbols");function T(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}s(T,"getTag");var oi="[object RegExp]",gt="[object String]",mt="[object Number]",wt="[object Boolean]",bt="[object Arguments]",ai="[object Symbol]",_i="[object Date]",ci="[object Map]",fi="[object Set]",li="[object Array]",ui="[object ArrayBuffer]",pi="[object Object]",yi="[object DataView]",di="[object Uint8Array]",xi="[object Uint8ClampedArray]",gi="[object Uint16Array]",mi="[object Uint32Array]",wi="[object Int8Array]",bi="[object Int16Array]",vi="[object Int32Array]",Si="[object Float32Array]",Oi="[object Float64Array]",C=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function vt(t){return typeof C.Buffer<"u"&&C.Buffer.isBuffer(t)}s(vt,"isBuffer");function Ni(t){return Number.isSafeInteger(t)&&t>=0}s(Ni,"isLength");function Ai(t){return t!=null&&typeof t!="function"&&Ni(t.length)}s(Ai,"isArrayLike");function Ei(t){return t==="__proto__"}s(Ei,"isUnsafeProperty");function j(t){return t==null||typeof t!="object"&&typeof t!="function"}s(j,"isPrimitive");function H(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}s(H,"isTypedArray$1");function Mi(t,i){return g(t,void 0,t,new Map,i)}s(Mi,"cloneDeepWith$1");function g(t,i,n,e=new Map,h=void 0){const o=h?.(t,i,n,e);if(o!==void 0)return o;if(j(t))return t;if(e.has(t))return e.get(t);if(Array.isArray(t)){const r=new Array(t.length);e.set(t,r);for(let a=0;a<t.length;a++)r[a]=g(t[a],a,n,e,h);return Object.hasOwn(t,"index")&&(r.index=t.index),Object.hasOwn(t,"input")&&(r.input=t.input),r}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const r=new RegExp(t.source,t.flags);return r.lastIndex=t.lastIndex,r}if(t instanceof Map){const r=new Map;e.set(t,r);for(const[a,_]of t)r.set(a,g(_,a,n,e,h));return r}if(t instanceof Set){const r=new Set;e.set(t,r);for(const a of t)r.add(g(a,void 0,n,e,h));return r}if(vt(t))return t.subarray();if(H(t)){const r=new(Object.getPrototypeOf(t)).constructor(t.length);e.set(t,r);for(let a=0;a<t.length;a++)r[a]=g(t[a],a,n,e,h);return r}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const r=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return e.set(t,r),p(r,t,n,e,h),r}if(typeof File<"u"&&t instanceof File){const r=new File([t],t.name,{type:t.type});return e.set(t,r),p(r,t,n,e,h),r}if(typeof Blob<"u"&&t instanceof Blob){const r=new Blob([t],{type:t.type});return e.set(t,r),p(r,t,n,e,h),r}if(t instanceof Error){const r=structuredClone(t);return e.set(t,r),r.message=t.message,r.name=t.name,r.stack=t.stack,r.cause=t.cause,r.constructor=t.constructor,p(r,t,n,e,h),r}if(t instanceof Boolean){const r=new Boolean(t.valueOf());return e.set(t,r),p(r,t,n,e,h),r}if(t instanceof Number){const r=new Number(t.valueOf());return e.set(t,r),p(r,t,n,e,h),r}if(t instanceof String){const r=new String(t.valueOf());return e.set(t,r),p(r,t,n,e,h),r}if(typeof t=="object"&&Pi(t)){const r=Object.create(Object.getPrototypeOf(t));return e.set(t,r),p(r,t,n,e,h),r}return t}s(g,"cloneDeepWithImpl");function p(t,i,n=t,e,h){const o=[...Object.keys(i),...xt(i)];for(let r=0;r<o.length;r++){const a=o[r],_=Object.getOwnPropertyDescriptor(t,a);(_==null||_.writable)&&(t[a]=g(i[a],a,n,e,h))}}s(p,"copyProperties");function Pi(t){switch(T(t)){case bt:case li:case ui:case yi:case wt:case _i:case Si:case Oi:case wi:case bi:case vi:case ci:case mt:case pi:case oi:case fi:case gt:case ai:case di:case xi:case gi:case mi:return!0;default:return!1}}s(Pi,"isCloneableObject");function $i(t,i){return Mi(t,(n,e,h,o)=>{const r=i?.(n,e,h,o);if(r!==void 0)return r;if(typeof t=="object"){if(T(t)==="[object Object]"&&typeof t.constructor!="function"){const a={};return o.set(t,a),p(a,t,h,o),a}switch(Object.prototype.toString.call(t)){case mt:case gt:case wt:{const a=new t.constructor(t?.valueOf());return p(a,t),a}case bt:{const a={};return p(a,t),a.length=t.length,a[Symbol.iterator]=t[Symbol.iterator],a}default:return}}})}s($i,"cloneDeepWith");function tt(t){return $i(t)}s(tt,"cloneDeep");function it(t){return t!==null&&typeof t=="object"&&T(t)==="[object Arguments]"}s(it,"isArguments");function k(t){return typeof t=="object"&&t!==null}s(k,"isObjectLike");function Bi(t){return k(t)&&Ai(t)}s(Bi,"isArrayLikeObject");function R(t){return H(t)}s(R,"isTypedArray");function b(t,i){if(typeof t!="function"||i!=null&&typeof i!="function")throw new TypeError("Expected a function");const n=s(function(...e){const h=i?i.apply(this,e):e[0],o=n.cache;if(o.has(h))return o.get(h);const r=t.apply(this,e);return n.cache=o.set(h,r)||o,r},"memoized");return n.cache=new(b.Cache||Map),n}s(b,"memoize");b.Cache=Map;function Ii(t){if(j(t))return t;if(Array.isArray(t)||H(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);const i=Object.getPrototypeOf(t);if(i==null)return Object.assign(Object.create(i),t);const n=i.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new n(t);if(t instanceof RegExp){const e=new n(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new n(t.buffer.slice(0));if(t instanceof Error){let e;return t instanceof AggregateError?e=new n(t.errors,t.message,{cause:t.cause}):e=new n(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}return typeof File<"u"&&t instanceof File?new n([t],t.name,{type:t.type,lastModified:t.lastModified}):typeof t=="object"?Object.assign(Object.create(i),t):t}s(Ii,"clone");function Ri(t,...i){const n=i.slice(0,-1),e=i[i.length-1];let h=t;for(let o=0;o<n.length;o++){const r=n[o];h=N(h,r,e,new Map)}return h}s(Ri,"mergeWith");function N(t,i,n,e){if(j(t)&&(t=Object(t)),i==null||typeof i!="object")return t;if(e.has(i))return Ii(e.get(i));if(e.set(i,t),Array.isArray(i)){i=i.slice();for(let o=0;o<i.length;o++)o in i||(i[o]=void 0)}const h=[...Object.keys(i),...xt(i)];for(let o=0;o<h.length;o++){const r=h[o];if(Ei(r))continue;let a=i[r],_=t[r];if(it(a)&&(a={...a}),it(_)&&(_={..._}),vt(a)&&(a=tt(a)),Array.isArray(a))if(Array.isArray(_)){const l=[],u=Reflect.ownKeys(_);for(let y=0;y<u.length;y++){const d=u[y];l[d]=_[d]}_=l}else if(Bi(_)){const l=[];for(let u=0;u<_.length;u++)l[u]=_[u];_=l}else _=[];const f=n(_,a,r,t,i,e);f!==void 0?t[r]=f:Array.isArray(a)||k(_)&&k(a)&&(I(_)||I(a)||R(_)||R(a))?t[r]=N(_,a,n,e):_==null&&I(a)?t[r]=N({},a,n,e):_==null&&R(a)?t[r]=tt(a):(_===void 0||a!==void 0)&&(t[r]=a)}return t}s(N,"mergeWithDeep");function ki(t,...i){return Ri(t,...i,hi)}s(ki,"merge");var Li=zt();var Di={curveBasis:Ut,curveBasisClosed:Xt,curveBasisOpen:Yt,curveBumpX:jt,curveBumpY:Ht,curveBundle:qt,curveCardinalClosed:Gt,curveCardinalOpen:Jt,curveCardinal:Kt,curveCatmullRomClosed:Qt,curveCatmullRomOpen:Vt,curveCatmullRom:Zt,curveLinear:Tt,curveLinearClosed:Ct,curveMonotoneX:ti,curveMonotoneY:ii,curveNatural:ei,curveStep:ni,curveStepAfter:ri,curveStepBefore:si},Fi=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Wi=c(function(t,i){const n=St(t,/(?:init\b)|(?:initialize\b)/);let e={};if(Array.isArray(n)){const r=n.map(a=>a.args);Ft(r),e=st(e,[...r])}else e=n.args;if(!e)return;let h=Wt(t,i);const o="config";return e[o]!==void 0&&(h==="flowchart-v2"&&(h="flowchart"),e[h]=e[o],delete e[o]),e},"detectInit"),St=c(function(t,i=null){try{const n=new RegExp(`[%]{2}(?![{]${Fi.source})(?=[}][%]{2}).*
|
|
2
2
|
`,"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),m.debug(`Detecting diagram directive${i!==null?" type:"+i:""} based on the text:${t}`);let e;const h=[];for(;(e=O.exec(t))!==null;)if(e.index===O.lastIndex&&O.lastIndex++,e&&!i||i&&e[1]?.match(i)||i&&e[2]?.match(i)){const o=e[1]?e[1]:e[2],r=e[3]?e[3].trim():e[4]?JSON.parse(e[4].trim()):null;h.push({type:o,args:r})}return h.length===0?{type:t,args:null}:h.length===1?h[0]:h}catch(n){return m.error(`ERROR: ${n.message} - Unable to parse directive type: '${i}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),re=c(function(t){return t.replace(O,"")},"removeDirectives"),zi=c(function(t,i){for(const[n,e]of i.entries())if(e.match(t))return n;return-1},"isSubstringInArray");function Ot(t,i){return t?Di[`curve${t.charAt(0).toUpperCase()+t.slice(1)}`]??i:i}s(Ot,"interpolateToCurve");c(Ot,"interpolateToCurve");function Nt(t,i){const n=t.trim();if(n)return i.securityLevel!=="loose"?(0,Li.sanitizeUrl)(n):n}s(Nt,"formatUrl");c(Nt,"formatUrl");var Ti=c((t,...i)=>{const n=t.split("."),e=n.length-1,h=n[e];let o=window;for(let r=0;r<e;r++)if(o=o[n[r]],!o){m.error(`Function name: ${t} not found in window`);return}o[h](...i)},"runFunc");function U(t,i){return!t||!i?0:Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))}s(U,"distance");c(U,"distance");function At(t){let i,n=0;return t.forEach(e=>{n+=U(e,i),i=e}),X(t,n/2)}s(At,"traverseEdge");c(At,"traverseEdge");function Et(t){return t.length===1?t[0]:At(t)}s(Et,"calcLabelPosition");c(Et,"calcLabelPosition");var et=c((t,i=2)=>{const n=Math.pow(10,i);return Math.round(t*n)/n},"roundNumber"),X=c((t,i)=>{let n,e=i;for(const h of t){if(n){const o=U(h,n);if(o===0)return n;if(o<e)e-=o;else{const r=e/o;if(r<=0)return n;if(r>=1)return{x:h.x,y:h.y};if(r>0&&r<1)return{x:et((1-r)*n.x+r*h.x,5),y:et((1-r)*n.y+r*h.y,5)}}}n=h}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),ji=c((t,i,n)=>{m.info(`our points ${JSON.stringify(i)}`),i[0]!==n&&(i=i.reverse());const e=X(i,25),h=t?10:5,o=Math.atan2(i[0].y-e.y,i[0].x-e.x),r={x:0,y:0};return r.x=Math.sin(o)*h+(i[0].x+e.x)/2,r.y=-Math.cos(o)*h+(i[0].y+e.y)/2,r},"calcCardinalityPosition");function Mt(t,i,n){const e=structuredClone(n);m.info("our points",e),i!=="start_left"&&i!=="start_right"&&e.reverse();const h=X(e,25+t),o=10+t*.5,r=Math.atan2(e[0].y-h.y,e[0].x-h.x),a={x:0,y:0};return i==="start_left"?(a.x=Math.sin(r+Math.PI)*o+(e[0].x+h.x)/2,a.y=-Math.cos(r+Math.PI)*o+(e[0].y+h.y)/2):i==="end_right"?(a.x=Math.sin(r-Math.PI)*o+(e[0].x+h.x)/2-5,a.y=-Math.cos(r-Math.PI)*o+(e[0].y+h.y)/2-5):i==="end_left"?(a.x=Math.sin(r)*o+(e[0].x+h.x)/2-5,a.y=-Math.cos(r)*o+(e[0].y+h.y)/2-5):(a.x=Math.sin(r)*o+(e[0].x+h.x)/2,a.y=-Math.cos(r)*o+(e[0].y+h.y)/2),a}s(Mt,"calcTerminalLabelPosition");c(Mt,"calcTerminalLabelPosition");function Pt(t){let i="",n="";for(const e of t)e!==void 0&&(e.startsWith("color:")||e.startsWith("text-align:")?n=n+e+";":i=i+e+";");return{style:i,labelStyle:n}}s(Pt,"getStylesFromArray");c(Pt,"getStylesFromArray");var nt=0,Hi=c(()=>(nt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+nt),"generateId");function $t(t){let i="";const n="0123456789abcdef";for(let h=0;h<t;h++)i+=n.charAt(Math.floor(Math.random()*16));return i}s($t,"makeRandomHex");c($t,"makeRandomHex");var Ui=c(t=>$t(t.length),"random"),Xi=c(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Yi=c(function(t,i){const n=i.text.replace(L.lineBreakRegex," "),[,e]=q(i.fontSize),h=t.append("text");h.attr("x",i.x),h.attr("y",i.y),h.style("text-anchor",i.anchor),h.style("font-family",i.fontFamily),h.style("font-size",e),h.style("font-weight",i.fontWeight),h.attr("fill",i.fill),i.class!==void 0&&h.attr("class",i.class);const o=h.append("tspan");return o.attr("x",i.x+i.textMargin*2),o.attr("fill",i.fill),o.text(n),h},"drawSimpleText"),qi=b((t,i,n)=>{if(!t||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),L.lineBreakRegex.test(t)))return t;const e=t.split(" ").filter(Boolean),h=[];let o="";return e.forEach((r,a)=>{const _=w(`${r} `,n),f=w(o,n);if(_>i){const{hyphenatedStrings:l,remainingWord:u}=Ki(r,i,"-",n);h.push(o,...l),o=u}else f+_>=i?(h.push(o),o=r):o=[o,r].filter(Boolean).join(" ");a+1===e.length&&h.push(o)}),h.filter(r=>r!=="").join(n.joinWith)},(t,i,n)=>`${t}${i}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Ki=b((t,i,n="-",e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},e);const h=[...t],o=[];let r="";return h.forEach((a,_)=>{const f=`${r}${a}`;if(w(f,e)>=i){const l=_+1,u=h.length===l,y=`${f}${n}`;o.push(u?f:y),r=""}else r=f}),{hyphenatedStrings:o,remainingWord:r}},(t,i,n="-",e)=>`${t}${i}${n}${e.fontSize}${e.fontWeight}${e.fontFamily}`);function Bt(t,i){return Y(t,i).height}s(Bt,"calculateTextHeight");c(Bt,"calculateTextHeight");function w(t,i){return Y(t,i).width}s(w,"calculateTextWidth");c(w,"calculateTextWidth");var Y=b((t,i)=>{const{fontSize:n=12,fontFamily:e="Arial",fontWeight:h=400}=i;if(!t)return{width:0,height:0};const[,o]=q(n),r=["sans-serif",e],a=t.split(L.lineBreakRegex),_=[],f=Dt("body");if(!f.remove)return{width:0,height:0,lineHeight:0};const l=f.append("svg");for(const u of r){let y=0;const d={width:0,height:0,lineHeight:0};for(const kt of a){const K=Xi();K.text=kt||"";const G=Yi(l,K).style("font-size",o).style("font-weight",h).style("font-family",u),v=(G._groups||G)[0][0].getBBox();if(v.width===0&&v.height===0)throw new Error("svg element not in render tree");d.width=Math.round(Math.max(d.width,v.width)),y=Math.round(v.height),d.height+=y,d.lineHeight=Math.round(Math.max(d.lineHeight,y))}_.push(d)}return l.remove(),_[isNaN(_[1].height)||isNaN(_[1].width)||isNaN(_[1].lineHeight)||_[0].height>_[1].height&&_[0].width>_[1].width&&_[0].lineHeight>_[1].lineHeight?0:1]},(t,i)=>`${t}${i.fontSize}${i.fontWeight}${i.fontFamily}`),Gi=class{static{s(this,"InitIDGenerator")}constructor(t=!1,i){this.count=0,this.count=i?i.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{c(this,"InitIDGenerator")}},S,Ji=c(function(t){return S=S||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),S.innerHTML=t,unescape(S.textContent)},"entityDecode");function Zi(t){return"str"in t}s(Zi,"isDetailedError");c(Zi,"isDetailedError");var Qi=c((t,i,n,e)=>{if(!e)return;const h=t.node()?.getBBox();h&&t.append("text").text(e).attr("text-anchor","middle").attr("x",h.x+h.width/2).attr("y",-n).attr("class",i)},"insertTitle"),q=c(t=>{if(typeof t=="number")return[t,t+"px"];const i=parseInt(t??"",10);return Number.isNaN(i)?[void 0,void 0]:t===String(i)?[i,t+"px"]:[i,t]},"parseFontSize");function It(t,i){return ki({},t,i)}s(It,"cleanAndMerge");c(It,"cleanAndMerge");var he={assignWithDepth:st,wrapLabel:qi,calculateTextHeight:Bt,calculateTextWidth:w,calculateTextDimensions:Y,cleanAndMerge:It,detectInit:Wi,detectDirective:St,isSubstringInArray:zi,interpolateToCurve:Ot,calcLabelPosition:Et,calcCardinalityPosition:ji,calcTerminalLabelPosition:Mt,formatUrl:Nt,getStylesFromArray:Pt,generateId:Hi,random:Ui,runFunc:Ti,entityDecode:Ji,insertTitle:Qi,isLabelCoordinateInPath:Rt,parseFontSize:q,InitIDGenerator:Gi},oe=c(function(t){let i=t;return i=i.replace(/style.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),i=i.replace(/classDef.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),i=i.replace(/#\w+;/g,function(n){const e=n.substring(1,n.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),i},"encodeEntities"),ae=c(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),_e=c((t,i,{counter:n=0,prefix:e,suffix:h},o)=>o||`${e?`${e}_`:""}${t}_${i}_${n}${h?`_${h}`:""}`,"getEdgeId");function Vi(t){return t??null}s(Vi,"handleUndefinedAttr");c(Vi,"handleUndefinedAttr");function Rt(t,i){const n=Math.round(t.x),e=Math.round(t.y),h=i.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return h.includes(n.toString())||h.includes(e.toString())}s(Rt,"isLabelCoordinateInPath");c(Rt,"isLabelCoordinateInPath");export{Kt as $,Oi as A,ai as B,bt as C,yi as D,wt as E,mt as F,T as G,mi as H,pi as I,ni as J,ri as K,oi as L,vi as M,wi as N,_i as O,ci as P,Zt as Q,fi as R,vt as S,li as T,di as U,gi as V,xi as W,ti as X,ei as Y,ii as Z,qi as _,ae as a,j as b,_e as c,Ot as d,Ut as et,Zi as f,he as g,re as h,It as i,bi as j,Si as k,Pt as l,Ui as m,Bt as n,Ht as nt,oe as o,q as p,si as q,w as r,Tt as rt,Hi as s,Y as t,jt as tt,Vi as u,R as v,ui as w,Ai as x,it as y,gt as z};
|