@eeshaai/code 1.0.0 → 1.0.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/LICENSE.md +3 -3
- package/README.md +337 -322
- package/dist/cli.js +4 -4
- package/dist/resources/styles/custom/instructions/design.md +283 -283
- package/dist/resources/styles/custom/instructions/requirements.md +161 -161
- package/dist/resources/styles/custom/instructions/tasks-implement.md +90 -90
- package/dist/resources/styles/custom/instructions/tasks.md +159 -159
- package/dist/resources/styles/custom/process.md +49 -49
- package/dist/resources/styles/custom/prompts/first.md +29 -29
- package/dist/resources/styles/custom/prompts/implement.md +27 -27
- package/dist/resources/styles/custom/prompts/rewrite-note.md +40 -40
- package/dist/resources/styles/custom/prompts/rewrite.md +32 -32
- package/dist/resources/styles/custom/style.yml +46 -46
- package/dist/resources/styles/grammar.md +727 -731
- package/dist/resources/styles/kiro/style.yml +63 -0
- package/dist/resources/styles/speckit/style.yml +59 -0
- package/dist/server.js +465 -486
- package/dist/web/chunks/{abnfDiagram-VCTEODGH-6KC3BO47.js → abnfDiagram-VCTEODGH-P6AZFXJU.js} +2 -2
- package/dist/web/chunks/architecture-7GRP2DOG-K6PMPK7N.js +2 -0
- package/dist/web/chunks/{architectureDiagram-5GKGNRK7-QKPCVOD2.js → architectureDiagram-5GKGNRK7-JB5DD7KL.js} +2 -2
- package/dist/web/chunks/{blockDiagram-I7D4REHJ-4XZWNXLB.js → blockDiagram-I7D4REHJ-ARCDWS5D.js} +2 -2
- package/dist/web/chunks/{c4Diagram-7LVT6UL2-4HJHKNE3.js → c4Diagram-7LVT6UL2-57CIXPJZ.js} +2 -2
- package/dist/web/chunks/{chunk-GQPX4EIC.js → chunk-3EZ2OKHV.js} +2 -2
- package/dist/web/chunks/{chunk-37NHO5VO.js → chunk-4KJ2U3VQ.js} +2 -2
- package/dist/web/chunks/{chunk-OXLTOJNY.js → chunk-4ZUFUR3U.js} +2 -2
- package/dist/web/chunks/{chunk-46RPN6IE.js → chunk-63W35XXT.js} +2 -2
- package/dist/web/chunks/{chunk-LSVIQRSY.js → chunk-6YVFH4BZ.js} +2 -2
- package/dist/web/chunks/{chunk-6VRLULJH.js → chunk-7PUK2GON.js} +2 -2
- package/dist/web/chunks/{chunk-TPXX77KB.js → chunk-7Q4TXKAS.js} +2 -2
- package/dist/web/chunks/{chunk-4S2DRQJ6.js → chunk-7QRY2XB7.js} +2 -2
- package/dist/web/chunks/{chunk-2DLEMZHM.js → chunk-CA2KMNVI.js} +2 -2
- package/dist/web/chunks/{chunk-LHNPPNB7.js → chunk-CFMSYLIK.js} +2 -2
- package/dist/web/chunks/{chunk-4TORDSRR.js → chunk-CKJRXIX7.js} +2 -2
- package/dist/web/chunks/{chunk-L34PKG4P.js → chunk-CXXG5KL5.js} +2 -2
- package/dist/web/chunks/chunk-EFBAEJZJ.js +2 -0
- package/dist/web/chunks/{chunk-LQ6CTWX6.js → chunk-FKTXB6RJ.js} +2 -2
- package/dist/web/chunks/{chunk-TXNHMPKM.js → chunk-FU7R4QOG.js} +2 -2
- package/dist/web/chunks/{chunk-DIRT34TZ.js → chunk-GEV6X2TZ.js} +2 -2
- package/dist/web/chunks/{chunk-II6WN3ZG.js → chunk-GPW7TXQS.js} +2 -2
- package/dist/web/chunks/{chunk-5KNOHX5X.js → chunk-I6RMTJPN.js} +2 -2
- package/dist/web/chunks/{chunk-6TGTE6CF.js → chunk-IKC3ZQV7.js} +2 -2
- package/dist/web/chunks/{chunk-LDXBIOBF.js → chunk-ITN3D7RJ.js} +2 -2
- package/dist/web/chunks/{chunk-OODDZ447.js → chunk-J6N7AUC2.js} +2 -2
- package/dist/web/chunks/{chunk-FGASMJTA.js → chunk-J7VDGOTK.js} +2 -2
- package/dist/web/chunks/chunk-KVRWT2YT.js +2 -0
- package/dist/web/chunks/{chunk-6URXM4C4.js → chunk-NBC6B3KN.js} +2 -2
- package/dist/web/chunks/{chunk-HBEUVMXY.js → chunk-NLHJT4GD.js} +2 -2
- package/dist/web/chunks/{chunk-HNYXDXPN.js → chunk-NOVL2262.js} +2 -2
- package/dist/web/chunks/{chunk-FPLIRG3U.js → chunk-NQ2XP5EN.js} +2 -2
- package/dist/web/chunks/chunk-P44J6WNO.js +2 -0
- package/dist/web/chunks/{chunk-6KSWTVXD.js → chunk-QBOSTM7Q.js} +2 -2
- package/dist/web/chunks/{chunk-HAKJ3AUV.js → chunk-QKU4ZFG5.js} +2 -2
- package/dist/web/chunks/{chunk-T4HEWXAQ.js → chunk-RINQGKTH.js} +2 -2
- package/dist/web/chunks/{chunk-TPYBIPJG.js → chunk-RK4EOCHJ.js} +2 -2
- package/dist/web/chunks/{chunk-YM7LHP34.js → chunk-S4X6ERXI.js} +2 -2
- package/dist/web/chunks/{chunk-VY4GEFSG.js → chunk-SE57RN36.js} +2 -2
- package/dist/web/chunks/{chunk-6FQEBIA3.js → chunk-SGL7WI35.js} +3 -3
- package/dist/web/chunks/chunk-SOAWGUAD.js +2 -0
- package/dist/web/chunks/{chunk-7XAOOQR4.js → chunk-U6ILIHMR.js} +2 -2
- package/dist/web/chunks/{chunk-M3SWKTLZ.js → chunk-USZ3ZJYA.js} +2 -2
- package/dist/web/chunks/{chunk-MBZYSJFT.js → chunk-UU7BHEBD.js} +2 -2
- package/dist/web/chunks/{chunk-QNEZP2TE.js → chunk-WL4ZMLPV.js} +2 -2
- package/dist/web/chunks/{chunk-MZEMPN3C.js → chunk-XE4RLI22.js} +2 -2
- package/dist/web/chunks/{chunk-VAKN3BTM.js → chunk-XJ6FSQEO.js} +2 -2
- package/dist/web/chunks/{chunk-XBYCKXUJ.js → chunk-XM7VXEGI.js} +2 -2
- package/dist/web/chunks/{chunk-2RFQIKC6.js → chunk-XO4SHRSO.js} +2 -2
- package/dist/web/chunks/{chunk-BUZPUGIT.js → chunk-XOZZFIHV.js} +2 -2
- package/dist/web/chunks/{chunk-FNIFXWXL.js → chunk-YYJ5VFH5.js} +2 -2
- package/dist/web/chunks/{chunk-JOSXY3EP.js → chunk-ZX45GMMJ.js} +2 -2
- package/dist/web/chunks/{chunk-4IPDIKAU.js → chunk-ZXMMITLE.js} +2 -2
- package/dist/web/chunks/classDiagram-ZZMXUADV-ALD5ECFE.js +2 -0
- package/dist/web/chunks/classDiagram-v2-VYDZK3BY-IMIEVQNX.js +2 -0
- package/dist/web/chunks/{cose-bilkent-JH36ORCC-ZPRW5JRW.js → cose-bilkent-JH36ORCC-YVEPG7XZ.js} +2 -2
- package/dist/web/chunks/cynefin-OW5HDTMX-5G3MG4ZJ.js +2 -0
- package/dist/web/chunks/{cynefinDiagram-5FMLGOSQ-O7GURHJG.js → cynefinDiagram-5FMLGOSQ-A3E3NM6X.js} +2 -2
- package/dist/web/chunks/{dagre-GXQ25YYZ-WK67O4N6.js → dagre-GXQ25YYZ-WKL3XLC6.js} +2 -2
- package/dist/web/chunks/{diagram-S7CK7UJ4-2CEO2EN2.js → diagram-S7CK7UJ4-AENTNBTM.js} +2 -2
- package/dist/web/chunks/{diagram-UQ7AKVKN-2Z4VHGF3.js → diagram-UQ7AKVKN-BN6IVDBP.js} +2 -2
- package/dist/web/chunks/{diagram-VSXAHHWV-AN4BOWYB.js → diagram-VSXAHHWV-X7IW7FU6.js} +2 -2
- package/dist/web/chunks/{diagram-VX7I27RA-VEZ2GXCM.js → diagram-VX7I27RA-4V6RQ6IS.js} +2 -2
- package/dist/web/chunks/{diagram-Z3DM3KII-TGGNDSLW.js → diagram-Z3DM3KII-ODYVRYAT.js} +2 -2
- package/dist/web/chunks/{ebnfDiagram-PWID7BFC-7RM57IJV.js → ebnfDiagram-PWID7BFC-2KD46JNN.js} +2 -2
- package/dist/web/chunks/{erDiagram-RLTQ6QDP-LCATC3YT.js → erDiagram-RLTQ6QDP-6MYZ2NRT.js} +2 -2
- package/dist/web/chunks/eventmodeling-NTZA5JFV-QZXC5VKS.js +2 -0
- package/dist/web/chunks/flowDiagram-HODETNUW-BILJ37ZX.js +2 -0
- package/dist/web/chunks/{ganttDiagram-EL5Y4UJY-5VPBBF2V.js → ganttDiagram-EL5Y4UJY-LVA23DND.js} +2 -2
- package/dist/web/chunks/gitGraph-4MIJSDKK-H43S2MKN.js +2 -0
- package/dist/web/chunks/{gitGraphDiagram-WWUBYQGX-HZMAGPIJ.js → gitGraphDiagram-WWUBYQGX-JRB4SUZI.js} +2 -2
- package/dist/web/chunks/info-A6RAGUB7-DKS7Q63Q.js +2 -0
- package/dist/web/chunks/infoDiagram-27XIBGKW-JLOVILVF.js +3 -0
- package/dist/web/chunks/{ishikawaDiagram-5VMMS53U-A54WWBPX.js → ishikawaDiagram-5VMMS53U-SUA2YN5D.js} +2 -2
- package/dist/web/chunks/{journeyDiagram-3NMN7TZE-XRCTMTR7.js → journeyDiagram-3NMN7TZE-ORMC2WB2.js} +2 -2
- package/dist/web/chunks/{kanban-definition-UXKFOSKX-UW2PQXZF.js → kanban-definition-UXKFOSKX-TPRG3VMF.js} +2 -2
- package/dist/web/chunks/{katex-B7HWCVTN.js → katex-DLHJF5VS.js} +2 -2
- package/dist/web/chunks/{mermaid.core-VL5SQK5M.js → mermaid.core-ZM3JSPVU.js} +3 -3
- package/dist/web/chunks/{mindmap-definition-YA3MSWOX-2H2Z6CVN.js → mindmap-definition-YA3MSWOX-BLW6WWFS.js} +2 -2
- package/dist/web/chunks/packet-AYTQ26CC-FIXQVEDM.js +2 -0
- package/dist/web/chunks/{pegDiagram-XKGWAZYB-KC4BYUN7.js → pegDiagram-XKGWAZYB-BYMP3YHY.js} +2 -2
- package/dist/web/chunks/pie-WAS4IAKB-R4EUNVPB.js +2 -0
- package/dist/web/chunks/{pieDiagram-E7YTZNPT-54T6XSU5.js → pieDiagram-E7YTZNPT-XOJE3H3L.js} +2 -2
- package/dist/web/chunks/{quadrantDiagram-AXDQQJYC-3G3RXSTE.js → quadrantDiagram-AXDQQJYC-23VSADTC.js} +2 -2
- package/dist/web/chunks/radar-RG4KPBEZ-O6Y2TENX.js +2 -0
- package/dist/web/chunks/railroad-74A4TZTK-PHWZ7KVH.js +2 -0
- package/dist/web/chunks/railroad-abnf-HS5TGJTU-DZ4OSJAN.js +2 -0
- package/dist/web/chunks/railroad-ebnf-LZEXJU2U-GYBLRQUL.js +2 -0
- package/dist/web/chunks/railroad-peg-WCYAUIDC-ZK4ZOBSX.js +2 -0
- package/dist/web/chunks/{railroadDiagram-O6MQD6OU-3LHKFF5N.js → railroadDiagram-O6MQD6OU-Z5IEAZJK.js} +2 -2
- package/dist/web/chunks/{requirementDiagram-BXWQKSXE-M4LF54YT.js → requirementDiagram-BXWQKSXE-MNP4O73E.js} +2 -2
- package/dist/web/chunks/{sankeyDiagram-P5KCCOFB-USCKKKNT.js → sankeyDiagram-P5KCCOFB-PADI35QR.js} +2 -2
- package/dist/web/chunks/{sequenceDiagram-WJ2MYXX4-QZ2O4KWV.js → sequenceDiagram-WJ2MYXX4-FGWOVXU4.js} +2 -2
- package/dist/web/chunks/{sizeCapture-INFHLROL-DZI5JWEV.js → sizeCapture-INFHLROL-Y6H3VQLE.js} +2 -2
- package/dist/web/chunks/{stateDiagram-D77RDMKH-EQJNTBF3.js → stateDiagram-D77RDMKH-7PRO4WYR.js} +2 -2
- package/dist/web/chunks/stateDiagram-v2-MP3YSRHH-2Y6SWEJW.js +2 -0
- package/dist/web/chunks/{swimlanes-42K2YHIH-H7SZ2HG6.js → swimlanes-42K2YHIH-DXVTFB6Q.js} +2 -2
- package/dist/web/chunks/swimlanesDiagram-VR7AAH4N-U2LP4OEE.js +9 -0
- package/dist/web/chunks/{timeline-definition-24CTP7MA-4Q2ARIQ6.js → timeline-definition-24CTP7MA-7ZIALE6C.js} +2 -2
- package/dist/web/chunks/treeView-Q6P3EWNA-VSJ7TJ36.js +2 -0
- package/dist/web/chunks/treemap-WGGIJYW6-JZWFGRKS.js +2 -0
- package/dist/web/chunks/{vennDiagram-4TSXK5OY-WMJVK74C.js → vennDiagram-4TSXK5OY-IPXNDYWM.js} +2 -2
- package/dist/web/chunks/wardley-WFR3VGLG-PAUUFL5N.js +2 -0
- package/dist/web/chunks/{wardleyDiagram-VM6X3IG4-CLB324RQ.js → wardleyDiagram-VM6X3IG4-4Z2U2NNR.js} +2 -2
- package/dist/web/chunks/{xychartDiagram-S5SC5T6Z-G5C2R7C2.js → xychartDiagram-S5SC5T6Z-NAEIWN4K.js} +2 -2
- package/dist/web/page.css +1 -1
- package/dist/web/page.js +156 -125
- package/package.json +64 -62
- package/dist/web/chunks/architecture-7GRP2DOG-JLXNDD4H.js +0 -2
- package/dist/web/chunks/chunk-4KP3BIPB.js +0 -2
- package/dist/web/chunks/chunk-HX7W7GSO.js +0 -2
- package/dist/web/chunks/chunk-PR453BYT.js +0 -2
- package/dist/web/chunks/chunk-R7TFKRNM.js +0 -2
- package/dist/web/chunks/classDiagram-ZZMXUADV-4J5HHZD6.js +0 -2
- package/dist/web/chunks/classDiagram-v2-VYDZK3BY-X6WY2DAS.js +0 -2
- package/dist/web/chunks/cynefin-OW5HDTMX-SVVTQRRB.js +0 -2
- package/dist/web/chunks/eventmodeling-NTZA5JFV-2SR57JAH.js +0 -2
- package/dist/web/chunks/flowDiagram-HODETNUW-HU6Y2EYQ.js +0 -2
- package/dist/web/chunks/gitGraph-4MIJSDKK-25JPIQP7.js +0 -2
- package/dist/web/chunks/info-A6RAGUB7-72MROTVX.js +0 -2
- package/dist/web/chunks/infoDiagram-27XIBGKW-BQYTPGNG.js +0 -3
- package/dist/web/chunks/packet-AYTQ26CC-NEGDW4B6.js +0 -2
- package/dist/web/chunks/pie-WAS4IAKB-OT3EMGHT.js +0 -2
- package/dist/web/chunks/radar-RG4KPBEZ-DCHU5FOQ.js +0 -2
- package/dist/web/chunks/railroad-74A4TZTK-RZX6D7H6.js +0 -2
- package/dist/web/chunks/railroad-abnf-HS5TGJTU-STTFN7R4.js +0 -2
- package/dist/web/chunks/railroad-ebnf-LZEXJU2U-RBXU3IBK.js +0 -2
- package/dist/web/chunks/railroad-peg-WCYAUIDC-OD5BXOH6.js +0 -2
- package/dist/web/chunks/stateDiagram-v2-MP3YSRHH-WSCDKLG6.js +0 -2
- package/dist/web/chunks/swimlanesDiagram-VR7AAH4N-DFYTBPVS.js +0 -9
- package/dist/web/chunks/treeView-Q6P3EWNA-ADCP6RPT.js +0 -2
- package/dist/web/chunks/treemap-WGGIJYW6-NEV7DUDY.js +0 -2
- package/dist/web/chunks/wardley-WFR3VGLG-4QZOFDI5.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v}from"./chunk-M3SWKTLZ.js";import{a as Qt,b as Mt,d as L,e as H}from"./chunk-OODDZ447.js";import{b as Bt,d as ft}from"./chunk-FPLIRG3U.js";import{d as Dt}from"./chunk-II6WN3ZG.js";import{k as Nt,n as ta,r as St,t as Q}from"./chunk-LHNPPNB7.js";import{H as At,J as It,K as Ut,_ as K,ba as Lt,k as Kt,o as dt,u as bt,y as mt}from"./chunk-6FQEBIA3.js";import{b as J,h as V}from"./chunk-L34PKG4P.js";import{a as $}from"./chunk-LDXBIOBF.js";import{d as Jt}from"./chunk-R7TFKRNM.js";Jt();var Xs=1,Os=3;async function jt(g){let t=g.getElementsByTagName("img");if(!t||t.length===0)return;let r=!Gt(g);await Promise.all([...t].map(c=>new Promise(h=>{function l(){if(c.style.display="flex",c.style.flexDirection="column",r){let f=K().fontSize?K().fontSize:window.getComputedStyle(document.body).fontSize,i=5,[n=Kt.fontSize]=ta(f),e=n*i+"px";c.style.minWidth=e,c.style.maxWidth=e}else c.style.width="100%";h(c)}$(l,"setupImage"),setTimeout(()=>{c.complete&&l()}),c.addEventListener("error",l),c.addEventListener("load",l)})))}$(jt,"configureLabelImages");function Gt(g){return g.nodeType===Os?g.textContent?.trim()!=="":g.nodeType!==Xs||g.tagName.toLowerCase()==="img"?!1:[...g.childNodes].some(Gt)}$(Gt,"hasTextBesidesImages");var aa=3,Fs=32,js=$(async(g,t,r)=>{let c=K(),h=g.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),l=h.insert("g").attr("class","label").attr("style",Q(t.labelStyle)),i=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(d=>({text:d,cssClass:"c4-descr"}))].filter(d=>d.text),n=t.width?Math.max(t.width-2*(t.padding??0),Fs):K().flowchart?.wrappingWidth??200,a=c.c4?.wrap??!0?n:Number.POSITIVE_INFINITY,s=await Promise.all(i.map(async d=>{let x=l.append("g").attr("class",d.cssClass),w=await ft(x,At(St(d.text??""),c),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:a,style:t.labelStyle},c);return V(w).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),V(w).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:x,box:x.node().getBBox()}})),o=Math.max(...s.map(({box:d})=>d.width),0),y=0;for(let{el:d,box:x}of s)d.attr("transform",`translate(${o/2-x.x-x.width/2}, ${y-x.y})`),y+=x.height+aa;let p=s.length>0?y-aa:0;l.insert("rect",":first-child"),l.attr("transform",`translate(${-o/2}, ${-p/2})`);let u=l.node().getBBox(),m=(t.padding??0)/2;return{shapeSvg:h,bbox:u,halfPadding:m,label:l}},"c4LabelHelper"),X=$(async(g,t,r)=>{if(t.stereotype!==void 0)return js(g,t,r);let c,h=t.useHtmlLabels||dt(K()?.htmlLabels);r?c=r:c="node default";let l=g.insert("g").attr("class",c).attr("id",t.domId||t.id),f=l.insert("g").attr("class","label").attr("style",Q(t.labelStyle)),i;t.label===void 0?i="":i=typeof t.label=="string"?t.label:t.label[0];let n=!!t.icon||!!t.img,e=t.labelType==="markdown",a=await ft(f,At(St(i),K()),{useHtmlLabels:h,width:t.width||t.wrappingWidth||K().flowchart?.wrappingWidth,classes:e?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:e},K()),s=(t?.padding??0)/2,o;if(h){let y=a.children[0],p=V(a);await jt(y),o=await Bt.measure(()=>y.getBoundingClientRect()),p.attr("width",o.width),p.attr("height",o.height)}else o=await Bt.measure(()=>a.getBBox());return h?f.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):f.attr("transform","translate(0, "+-o.height/2+")"),t.centerLabel&&f.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),f.insert("rect",":first-child"),{shapeSvg:l,bbox:o,halfPadding:s,label:f}},"labelHelper"),Wt=$(async(g,t,r)=>{let c=r.useHtmlLabels??mt(K()),h=g.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await ft(h,At(St(t),K()),{useHtmlLabels:c,width:r.width||K()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),f=r.padding/2,i;if(mt(K())){let n=l.children[0],e=V(l);i=await Bt.measure(()=>n.getBoundingClientRect()),e.attr("width",i.width),e.attr("height",i.height)}else i=await Bt.measure(()=>l.getBBox());return c?h.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"):h.attr("transform","translate(0, "+-i.height/2+")"),r.centerLabel&&h.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:g,bbox:i,halfPadding:f,label:h}},"insertLabel"),C=$((g,t,r)=>{if(r){g.width=r.width,g.height=r.height;return}let c=t.node().getBBox();g.width=c.width,g.height=c.height},"updateNodeBounds"),Y=$((g,t)=>(g.look==="handDrawn"?"rough-node":"node")+" "+g.cssClasses+" "+(t||""),"getNodeClasses");function j(g){let t=g.map((r,c)=>`${c===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}$(j,"createPathFromPoints");function pt(g,t,r,c,h,l){let f=[],n=r-g,e=c-t,a=n/l,s=2*Math.PI/a,o=t+e/2;for(let y=0;y<=50;y++){let p=y/50,u=g+p*n,m=o+h*Math.sin(s*(u-g));f.push({x:u,y:m})}return f}$(pt,"generateFullSineWavePoints");function it(g,t,r,c,h,l){let f=[],i=h*Math.PI/180,a=(l*Math.PI/180-i)/(c-1);for(let s=0;s<c;s++){let o=i+s*a,y=g+r*Math.cos(o),p=t+r*Math.sin(o);f.push({x:-y,y:-p})}return f}$(it,"generateCirclePoints");function Xt(g){let t=Array.from(g.childNodes).filter(n=>n.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),c=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");r.setAttribute("d",c);let h=t.find(n=>n.getAttribute("fill")!=="none"),l=t.find(n=>n.getAttribute("stroke")!=="none"),f=$((n,e)=>n?.getAttribute(e)??void 0,"getAttr");if(h){let n={fill:f(h,"fill"),"fill-opacity":f(h,"fill-opacity")??"1"};Object.entries(n).forEach(([e,a])=>{a&&r.setAttribute(e,a)})}if(l){let n={stroke:f(l,"stroke"),"stroke-width":f(l,"stroke-width")??"1","stroke-opacity":f(l,"stroke-opacity")??"1"};Object.entries(n).forEach(([e,a])=>{a&&r.setAttribute(e,a)})}let i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(r),i}$(Xt,"mergePaths");var Gs=$((g,t)=>{var r=g.x,c=g.y,h=t.x-r,l=t.y-c,f=g.width/2,i=g.height/2,n,e;return Math.abs(l)*f>Math.abs(h)*i?(l<0&&(i=-i),n=l===0?0:i*h/l,e=i):(h<0&&(f=-f),n=f,e=h===0?0:f*l/h),{x:r+n,y:c+e}},"intersectRect"),qs=Gs,gt=$((g,t,r,c,h)=>["M",g+h,t,"H",g+r-h,"A",h,h,0,0,1,g+r,t+h,"V",t+c-h,"A",h,h,0,0,1,g+r-h,t+c,"H",g+h,"A",h,h,0,0,1,g,t+c-h,"V",t+h,"A",h,h,0,0,1,g+h,t,"Z"].join(" "),"createRoundedRectPathD"),zs=$(async(g,t,r,c=!1,h=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);let f=K(),i=mt(f);return await ft(g,l,{style:r,isTitle:c,useHtmlLabels:i,markdown:!1,isNode:h,width:Number.POSITIVE_INFINITY},f)},"createLabel"),sa=zs;function ua(g,t){return g.intersect(t)}$(ua,"intersectNode");var Vs=ua;function da(g,t,r,c){var h=g.x,l=g.y,f=h-c.x,i=l-c.y,n=Math.sqrt(t*t*i*i+r*r*f*f),e=Math.abs(t*r*f/n);c.x<h&&(e=-e);var a=Math.abs(t*r*i/n);return c.y<l&&(a=-a),{x:h+e,y:l+a}}$(da,"intersectEllipse");var ma=da;function xa(g,t,r){return ma(g,t,t,r)}$(xa,"intersectCircle");var Zs=xa;function wa(g,t,r,c){{let h=t.y-g.y,l=g.x-t.x,f=t.x*g.y-g.x*t.y,i=h*r.x+l*r.y+f,n=h*c.x+l*c.y+f,e=1e-6;if(i!==0&&n!==0&&Ot(i,n))return;let a=c.y-r.y,s=r.x-c.x,o=c.x*r.y-r.x*c.y,y=a*g.x+s*g.y+o,p=a*t.x+s*t.y+o;if(Math.abs(y)<e&&Math.abs(p)<e&&Ot(y,p))return;let u=h*s-a*l;if(u===0)return;let m=Math.abs(u/2),d=l*o-s*f,x=d<0?(d-m)/u:(d+m)/u;d=a*f-h*o;let w=d<0?(d-m)/u:(d+m)/u;return{x,y:w}}}$(wa,"intersectLine");function Ot(g,t){return g*t>0}$(Ot,"sameSign");var Js=wa;function ba(g,t,r){let c=g.x,h=g.y,l=[],f=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(a){f=Math.min(f,a.x),i=Math.min(i,a.y)}):(f=Math.min(f,t.x),i=Math.min(i,t.y));let n=c-g.width/2-f,e=h-g.height/2-i;for(let a=0;a<t.length;a++){let s=t[a],o=t[a<t.length-1?a+1:0],y=Js(g,r,{x:n+s.x,y:e+s.y},{x:n+o.x,y:e+o.y});y&&l.push(y)}return l.length?(l.length>1&&l.sort(function(a,s){let o=a.x-r.x,y=a.y-r.y,p=Math.sqrt(o*o+y*y),u=s.x-r.x,m=s.y-r.y,d=Math.sqrt(u*u+m*m);return p<d?-1:p===d?0:1}),l[0]):g}$(ba,"intersectPolygon");var Ks=ba,N={node:Vs,circle:Zs,ellipse:ma,polygon:Ks,rect:qs};function Sa(g,t){let{labelStyles:r}=L(t);t.labelStyle=r;let c=Y(t),h=c;c||(h="anchor");let l=g.insert("g").attr("class",h).attr("id",t.domId||t.id),f=1,{cssStyles:i}=t,n=v.svg(l),e=H(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);let a=n.circle(0,0,f*2,e),s=l.insert(()=>a,":first-child");return s.attr("class","anchor").attr("style",Q(i)),C(t,s),t.intersect=function(o){return J.info("Circle intersect",t,f,o),N.circle(t,f,o)},l}$(Sa,"anchor");function Ft(g,t,r,c,h,l,f){let n=(g+r)/2,e=(t+c)/2,a=Math.atan2(c-t,r-g),s=(r-g)/2,o=(c-t)/2,y=s/h,p=o/l,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.");let m=Math.sqrt(1-u**2),d=n+m*l*Math.sin(a)*(f?-1:1),x=e-m*h*Math.cos(a)*(f?-1:1),w=Math.atan2((t-x)/l,(g-d)/h),b=Math.atan2((c-x)/l,(r-d)/h)-w;f&&b<0&&(b+=2*Math.PI),!f&&b>0&&(b-=2*Math.PI);let k=[];for(let M=0;M<20;M++){let P=M/19,W=w+P*b,B=d+h*Math.cos(W),D=x+l*Math.sin(W);k.push({x:B,y:D})}return k}$(Ft,"generateArcPoints");function $a(g,t,r){let[c,h]=[t,r].sort((l,f)=>f-l);return h*(1-Math.sqrt(1-(g/c/2)**2))}$($a,"calculateArcSagitta");async function va(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h,i=$(W=>W+f,"calcTotalHeight"),n=$(W=>{let B=W/2;return[B/(2.5+W/50),B]},"calcEllipseRadius"),{shapeSvg:e,bbox:a}=await X(g,t,Y(t)),s=i(t?.height?t?.height:a.height),[o,y]=n(s),p=$a(s,o,y),m=(t?.width?t?.width:a.width)+l*2+p-p,d=s,{cssStyles:x}=t,w=[{x:m/2,y:-d/2},{x:-m/2,y:-d/2},...Ft(-m/2,-d/2,-m/2,d/2,o,y,!1),{x:m/2,y:d/2},...Ft(m/2,d/2,m/2,-d/2,o,y,!0)],S=v.svg(e),b=H(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=j(w),M=S.path(k,b),P=e.insert(()=>M,":first-child");return P.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",x),c&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",c),P.attr("transform",`translate(${o/2}, 0)`),C(t,P),t.intersect=function(W){return N.polygon(t,w,W)},e}$(va,"bowTieRect");async function ka(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,label:i}=await X(g,t,Y(t)),n=r?.nodeBorder??r?.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),o=Math.max(f.height+e*2+s,t.height??0),y=-o/2+s,p=o/2,u=a*.72,m=[`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:d}=t,x=l.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let P=v.svg(l).path(m,H(t,{}));x.node()?.appendChild(P),d&&x.attr("style",d)}else x.append("path").attr("d",m).attr("style",h);x.append("ellipse").attr("cx",0).attr("cy",y).attr("rx",a/2).attr("ry",s).attr("style",`fill:none;stroke:${n};stroke-width:1px`),C(t,x);let w=y+(p-y)/2;i.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${w-f.height/2-(f.y-(f.top??0))})`);let S=12,b=$((M,P,W)=>Array.from({length:S+1},(B,D)=>{let T=Math.PI-D*Math.PI/S;return{x:M*Math.cos(T),y:P+W*s*Math.sin(T)}}),"arc"),k=[...b(a/2,y,-1),...b(u/2,p,1).reverse()];return t.intersect=function(M){return N.polygon(t,k,M)},l}$(ka,"bucket");var Et=20,Tt=8,Us=80,_t=8;async function Pa(g,t){let{themeVariables:r}=K(),c=r.clusterBkg,h=r.clusterBorder,{nodeStyles:l}=L(t),{shapeSvg:f,bbox:i}=await X(g,t,Y(t)),n=t.padding??8,e=i.height,a=Math.max(i.width+n*2,Us,t?.width??0),s=Math.max(e+Tt+Et+n*2,t?.height??0),o=-a/2,y=-s/2,p=-(Tt+Et)/2,u=f.select(".label");u&&(t.useHtmlLabels??mt(K())?u.attr("transform",`translate(${-i.width/2}, ${-i.height/2+p})`):u.attr("transform",`translate(0, ${-i.height/2+p})`));let m;if(t.look==="handDrawn"){let b=v.svg(f),k=H(t,{fill:c,stroke:h,fillStyle:"solid"}),M=b.path(gt(o,y,a,s,_t),k);m=f.insert(()=>M,":first-child"),m.attr("class","basic label-container collapsed-group").attr("style",Q(t.cssStyles))}else m=f.insert("rect",":first-child"),m.attr("class","basic label-container collapsed-group").attr("style",l).attr("rx",_t).attr("ry",_t).attr("x",o).attr("y",y).attr("width",a).attr("height",s).attr("fill",c).attr("stroke",h);let d=y+n+e+Tt;f.append("line").attr("class","collapsed-separator").attr("x1",o+8).attr("y1",d).attr("x2",o+a-8).attr("y2",d).attr("stroke",h).attr("stroke-dasharray","3, 3");let x=d+Et/2,w=2.5,S=10;for(let b=-1;b<=1;b++)f.append("circle").attr("class","collapsed-indicator").attr("cx",b*S).attr("cy",x).attr("r",w).attr("fill",h);return C(t,m),t.calcIntersect=function(b,k){return N.rect(b,k)},t.intersect=function(b){return N.rect(t,b)},f}$(Pa,"collapsedGroup");function lt(g,t,r,c){return g.insert("polygon",":first-child").attr("points",c.map(function(h){return h.x+","+h.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}$(lt,"insertPolygonShape");var Qs=["right","left","up","down"],qt="point",te=$(g=>{let t=new Set;for(let r of g)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),ae=$(g=>Qs.filter(t=>g.has(t)).join("|")||qt,"getDirectionKey"),ea={"right|left|up|down":$(({height:g,midpoint:t,padding:r,width:c})=>[{x:0,y:0},{x:t,y:0},{x:c/2,y:2*r},{x:c-t,y:0},{x:c,y:0},{x:c,y:-g/3},{x:c+2*r,y:-g/2},{x:c,y:-2*g/3},{x:c,y:-g},{x:c-t,y:-g},{x:c/2,y:-g-2*r},{x:t,y:-g},{x:0,y:-g},{x:0,y:-2*g/3},{x:-2*r,y:-g/2},{x:0,y:-g/3}],"right|left|up|down"),"right|left|up":$(({height:g,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-g/2},{x:r-t,y:-g},{x:t,y:-g},{x:0,y:-g/2}],"right|left|up"),"right|left|down":$(({height:g,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-g},{x:r-t,y:-g},{x:r,y:0}],"right|left|down"),"right|up|down":$(({height:g,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-g+t},{x:0,y:-g}],"right|up|down"),"left|up|down":$(({height:g,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-g+t},{x:r,y:-g}],"left|up|down"),"right|left":$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:0},{x:t,y:-r},{x:c-t,y:-r},{x:c-t,y:0},{x:c,y:-g/2},{x:c-t,y:-g},{x:c-t,y:-g+r},{x:t,y:-g+r},{x:t,y:-g},{x:0,y:-g/2}],"right|left"),"up|down":$(({height:g,midpoint:t,padding:r,width:c})=>[{x:c/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-g+r},{x:0,y:-g+r},{x:c/2,y:-g},{x:c,y:-g+r},{x:c-t,y:-g+r},{x:c-t,y:-r},{x:c,y:-r}],"up|down"),"right|up":$(({height:g,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-g}],"right|up"),"right|down":$(({height:g,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-g}],"right|down"),"left|up":$(({height:g,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-g}],"left|up"),"left|down":$(({height:g,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-g}],"left|down"),right:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:-r},{x:t,y:-r},{x:c-t,y:-r},{x:c-t,y:0},{x:c,y:-g/2},{x:c-t,y:-g},{x:c-t,y:-g+r},{x:t,y:-g+r},{x:t,y:-g+r}],"right"),left:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:0},{x:t,y:-r},{x:c-t,y:-r},{x:c-t,y:-g+r},{x:t,y:-g+r},{x:t,y:-g},{x:0,y:-g/2}],"left"),up:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:-r},{x:t,y:-g+r},{x:0,y:-g+r},{x:c/2,y:-g},{x:c,y:-g+r},{x:c-t,y:-g+r},{x:c-t,y:-r}],"up"),down:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:c/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-g+r},{x:c-t,y:-g+r},{x:c-t,y:-r},{x:c,y:-r}],"down"),[qt]:()=>[{x:0,y:0}]},se=$((g,t,r,c)=>{let h=te(g),l=(r.padding??0)/2,f=t.height+4*l,i=f/2,n=c??t.width+2*i+2*l,e=ae(h);return(ea[e]??ea[qt])({height:f,midpoint:i,padding:l,width:n})},"getArrowPoints");async function Ma(g,t){let r=t,{shapeSvg:c,bbox:h}=await X(g,r,Y(r)),l=r.padding??0,f=h.height+2*l,i=f/2,n=h.width+2*i+l,e=r.width??0,s=r.positioned&&(r.widthInColumns??1)>1&&e>n?e:n,o=se(r.directions??[],h,r,s),y=lt(c,s,f,o);return y.attr("style",r.style??null),C(r,y),r.intersect=function(p){return N.polygon(r,o,p)},c}$(Ma,"block_arrow");async function Da(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,label:i}=await X(g,t,Y(t)),n=r?.nodeBorder??r?.lineColor??"currentColor",e=t.padding??12,a=18,s=12,o=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,m=l.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let w=v.svg(l).path(gt(-o/2,p,o,y,s),H(t,{}));m.node()?.appendChild(w),u&&m.attr("style",u)}else m.append("rect").attr("x",-o/2).attr("y",p).attr("width",o).attr("height",y).attr("rx",s).attr("ry",s).attr("style",h);m.append("line").attr("x1",-o/2).attr("y1",p+a).attr("x2",o/2).attr("y2",p+a).attr("style",`stroke:${n};stroke-width:1px`);for(let x=0;x<3;x++)m.append("circle").attr("cx",-o/2+12+x*9).attr("cy",p+a/2).attr("r",2.5).attr("style",`fill:${n};stroke:none`);m.append("rect").attr("class","browser-address-bar").attr("x",-o/2+44).attr("y",p+4).attr("width",Math.max(o-56,10)).attr("height",a-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${n};stroke-width:1px;opacity:0.6`),C(t,m);let d=p+a+(y-a)/2;return i.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${d-f.height/2-(f.y-(f.top??0))})`),t.intersect=function(x){return N.rect(t,x)},l}$(Da,"browser");var Rt=12;async function Na(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?28:h,f=t.look==="neo"?24:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=(t?.width??n.width)+(t.look==="neo"?l*2:l+Rt),a=(t?.height??n.height)+(t.look==="neo"?f*2:f),s=0,o=e,y=-a,p=0,u=[{x:s+Rt,y},{x:o,y},{x:o,y:p},{x:s,y:p},{x:s,y:y+Rt},{x:s+Rt,y}],m,{cssStyles:d}=t;if(t.look==="handDrawn"){let x=v.svg(i),w=H(t,{}),S=j(u),b=x.path(S,w);m=i.insert(()=>b,":first-child").attr("transform",`translate(${-e/2}, ${a/2})`),d&&m.attr("style",d)}else m=lt(i,e,a,u);return c&&m.attr("style",c),C(t,m),t.intersect=function(x){return N.polygon(t,u,x)},i}$(Na,"card");function Ba(g,t){let{nodeStyles:r}=L(t);t.label="";let c=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:h}=t,l=Math.max(28,t.width??0),f=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],i=v.svg(c),n=H(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=j(f),a=i.path(e,n),s=c.insert(()=>a,":first-child");return h&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",h),r&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(o){return N.polygon(t,f,o)},c}$(Ba,"choice");async function zt(g,t,r){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,halfPadding:i}=await X(g,t,Y(t)),n=16,e=r?.padding??i,a=t.look==="neo"?f.width/2+n*2:f.width/2+e,s,{cssStyles:o}=t;if(t.look==="handDrawn"){let y=v.svg(l),p=H(t,{}),u=y.circle(0,0,a*2,p);s=l.insert(()=>u,":first-child"),s.attr("class","basic label-container").attr("style",Q(o))}else s=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",h).attr("r",a).attr("cx",0).attr("cy",0);return C(t,s),t.calcIntersect=function(y,p){let u=y.width/2;return N.circle(y,u,p)},t.intersect=function(y){return J.info("Circle intersect",t,a,y),N.circle(t,a,y)},l}$(zt,"circle");async function Ca(g,t){let r=t,c=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:h,bbox:l,halfPadding:f}=await X(g,r,c),i=h.insert("rect",":first-child"),n=r.padding??0,e=r.positioned?r.width??0:l.width+n,a=r.positioned?r.height??0:l.height+n,s=r.positioned?-e/2:-l.width/2-f,o=r.positioned?-a/2:-l.height/2-f;return i.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",s).attr("y",o).attr("width",e).attr("height",a),C(r,i),r.intersect=function(y){return N.rect(r,y)},h}$(Ca,"composite");async function Aa(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,label:i}=await X(g,t,Y(t)),n=r?.nodeBorder??r?.lineColor??"currentColor",e=t.padding??12,a=20,s=12,o=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,m=l.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let w=v.svg(l).path(gt(-o/2,p,o,y,s),H(t,{}));m.node()?.appendChild(w),u&&m.attr("style",u)}else m.append("rect").attr("x",-o/2).attr("y",p).attr("width",o).attr("height",y).attr("rx",s).attr("ry",s).attr("style",h);m.append("text").attr("x",-o/2+12).attr("y",p+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${n}`).text(">_"),C(t,m);let d=p+a+(y-a)/2;return i.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${d-f.height/2-(f.y-(f.top??0))})`),t.intersect=function(x){return N.rect(t,x)},l}$(Aa,"consoleWindow");function Ra(g){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),c=g*2,h={x:c/2*t,y:c/2*r},l={x:-(c/2)*t,y:c/2*r},f={x:-(c/2)*t,y:-(c/2)*r},i={x:c/2*t,y:-(c/2)*r};return`M ${l.x},${l.y} L ${i.x},${i.y}
|
|
1
|
+
import{a as v}from"./chunk-USZ3ZJYA.js";import{a as Qt,b as Mt,d as L,e as H}from"./chunk-J6N7AUC2.js";import{b as Bt,d as ft}from"./chunk-NQ2XP5EN.js";import{d as Dt}from"./chunk-GPW7TXQS.js";import{k as Nt,n as ta,r as St,t as Q}from"./chunk-CFMSYLIK.js";import{H as At,J as It,K as Ut,_ as K,ba as Lt,k as Kt,o as dt,u as bt,y as mt}from"./chunk-SGL7WI35.js";import{b as J,h as V}from"./chunk-CXXG5KL5.js";import{a as $}from"./chunk-ITN3D7RJ.js";import{d as Jt}from"./chunk-SOAWGUAD.js";Jt();var Xs=1,Os=3;async function jt(g){let t=g.getElementsByTagName("img");if(!t||t.length===0)return;let r=!Gt(g);await Promise.all([...t].map(c=>new Promise(h=>{function l(){if(c.style.display="flex",c.style.flexDirection="column",r){let f=K().fontSize?K().fontSize:window.getComputedStyle(document.body).fontSize,i=5,[n=Kt.fontSize]=ta(f),e=n*i+"px";c.style.minWidth=e,c.style.maxWidth=e}else c.style.width="100%";h(c)}$(l,"setupImage"),setTimeout(()=>{c.complete&&l()}),c.addEventListener("error",l),c.addEventListener("load",l)})))}$(jt,"configureLabelImages");function Gt(g){return g.nodeType===Os?g.textContent?.trim()!=="":g.nodeType!==Xs||g.tagName.toLowerCase()==="img"?!1:[...g.childNodes].some(Gt)}$(Gt,"hasTextBesidesImages");var aa=3,Fs=32,js=$(async(g,t,r)=>{let c=K(),h=g.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),l=h.insert("g").attr("class","label").attr("style",Q(t.labelStyle)),i=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(d=>({text:d,cssClass:"c4-descr"}))].filter(d=>d.text),n=t.width?Math.max(t.width-2*(t.padding??0),Fs):K().flowchart?.wrappingWidth??200,a=c.c4?.wrap??!0?n:Number.POSITIVE_INFINITY,s=await Promise.all(i.map(async d=>{let x=l.append("g").attr("class",d.cssClass),w=await ft(x,At(St(d.text??""),c),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:a,style:t.labelStyle},c);return V(w).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),V(w).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:x,box:x.node().getBBox()}})),o=Math.max(...s.map(({box:d})=>d.width),0),y=0;for(let{el:d,box:x}of s)d.attr("transform",`translate(${o/2-x.x-x.width/2}, ${y-x.y})`),y+=x.height+aa;let p=s.length>0?y-aa:0;l.insert("rect",":first-child"),l.attr("transform",`translate(${-o/2}, ${-p/2})`);let u=l.node().getBBox(),m=(t.padding??0)/2;return{shapeSvg:h,bbox:u,halfPadding:m,label:l}},"c4LabelHelper"),X=$(async(g,t,r)=>{if(t.stereotype!==void 0)return js(g,t,r);let c,h=t.useHtmlLabels||dt(K()?.htmlLabels);r?c=r:c="node default";let l=g.insert("g").attr("class",c).attr("id",t.domId||t.id),f=l.insert("g").attr("class","label").attr("style",Q(t.labelStyle)),i;t.label===void 0?i="":i=typeof t.label=="string"?t.label:t.label[0];let n=!!t.icon||!!t.img,e=t.labelType==="markdown",a=await ft(f,At(St(i),K()),{useHtmlLabels:h,width:t.width||t.wrappingWidth||K().flowchart?.wrappingWidth,classes:e?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:e},K()),s=(t?.padding??0)/2,o;if(h){let y=a.children[0],p=V(a);await jt(y),o=await Bt.measure(()=>y.getBoundingClientRect()),p.attr("width",o.width),p.attr("height",o.height)}else o=await Bt.measure(()=>a.getBBox());return h?f.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):f.attr("transform","translate(0, "+-o.height/2+")"),t.centerLabel&&f.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),f.insert("rect",":first-child"),{shapeSvg:l,bbox:o,halfPadding:s,label:f}},"labelHelper"),Wt=$(async(g,t,r)=>{let c=r.useHtmlLabels??mt(K()),h=g.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await ft(h,At(St(t),K()),{useHtmlLabels:c,width:r.width||K()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),f=r.padding/2,i;if(mt(K())){let n=l.children[0],e=V(l);i=await Bt.measure(()=>n.getBoundingClientRect()),e.attr("width",i.width),e.attr("height",i.height)}else i=await Bt.measure(()=>l.getBBox());return c?h.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"):h.attr("transform","translate(0, "+-i.height/2+")"),r.centerLabel&&h.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:g,bbox:i,halfPadding:f,label:h}},"insertLabel"),C=$((g,t,r)=>{if(r){g.width=r.width,g.height=r.height;return}let c=t.node().getBBox();g.width=c.width,g.height=c.height},"updateNodeBounds"),Y=$((g,t)=>(g.look==="handDrawn"?"rough-node":"node")+" "+g.cssClasses+" "+(t||""),"getNodeClasses");function j(g){let t=g.map((r,c)=>`${c===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}$(j,"createPathFromPoints");function pt(g,t,r,c,h,l){let f=[],n=r-g,e=c-t,a=n/l,s=2*Math.PI/a,o=t+e/2;for(let y=0;y<=50;y++){let p=y/50,u=g+p*n,m=o+h*Math.sin(s*(u-g));f.push({x:u,y:m})}return f}$(pt,"generateFullSineWavePoints");function it(g,t,r,c,h,l){let f=[],i=h*Math.PI/180,a=(l*Math.PI/180-i)/(c-1);for(let s=0;s<c;s++){let o=i+s*a,y=g+r*Math.cos(o),p=t+r*Math.sin(o);f.push({x:-y,y:-p})}return f}$(it,"generateCirclePoints");function Xt(g){let t=Array.from(g.childNodes).filter(n=>n.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),c=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");r.setAttribute("d",c);let h=t.find(n=>n.getAttribute("fill")!=="none"),l=t.find(n=>n.getAttribute("stroke")!=="none"),f=$((n,e)=>n?.getAttribute(e)??void 0,"getAttr");if(h){let n={fill:f(h,"fill"),"fill-opacity":f(h,"fill-opacity")??"1"};Object.entries(n).forEach(([e,a])=>{a&&r.setAttribute(e,a)})}if(l){let n={stroke:f(l,"stroke"),"stroke-width":f(l,"stroke-width")??"1","stroke-opacity":f(l,"stroke-opacity")??"1"};Object.entries(n).forEach(([e,a])=>{a&&r.setAttribute(e,a)})}let i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(r),i}$(Xt,"mergePaths");var Gs=$((g,t)=>{var r=g.x,c=g.y,h=t.x-r,l=t.y-c,f=g.width/2,i=g.height/2,n,e;return Math.abs(l)*f>Math.abs(h)*i?(l<0&&(i=-i),n=l===0?0:i*h/l,e=i):(h<0&&(f=-f),n=f,e=h===0?0:f*l/h),{x:r+n,y:c+e}},"intersectRect"),qs=Gs,gt=$((g,t,r,c,h)=>["M",g+h,t,"H",g+r-h,"A",h,h,0,0,1,g+r,t+h,"V",t+c-h,"A",h,h,0,0,1,g+r-h,t+c,"H",g+h,"A",h,h,0,0,1,g,t+c-h,"V",t+h,"A",h,h,0,0,1,g+h,t,"Z"].join(" "),"createRoundedRectPathD"),zs=$(async(g,t,r,c=!1,h=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);let f=K(),i=mt(f);return await ft(g,l,{style:r,isTitle:c,useHtmlLabels:i,markdown:!1,isNode:h,width:Number.POSITIVE_INFINITY},f)},"createLabel"),sa=zs;function ua(g,t){return g.intersect(t)}$(ua,"intersectNode");var Vs=ua;function da(g,t,r,c){var h=g.x,l=g.y,f=h-c.x,i=l-c.y,n=Math.sqrt(t*t*i*i+r*r*f*f),e=Math.abs(t*r*f/n);c.x<h&&(e=-e);var a=Math.abs(t*r*i/n);return c.y<l&&(a=-a),{x:h+e,y:l+a}}$(da,"intersectEllipse");var ma=da;function xa(g,t,r){return ma(g,t,t,r)}$(xa,"intersectCircle");var Zs=xa;function wa(g,t,r,c){{let h=t.y-g.y,l=g.x-t.x,f=t.x*g.y-g.x*t.y,i=h*r.x+l*r.y+f,n=h*c.x+l*c.y+f,e=1e-6;if(i!==0&&n!==0&&Ot(i,n))return;let a=c.y-r.y,s=r.x-c.x,o=c.x*r.y-r.x*c.y,y=a*g.x+s*g.y+o,p=a*t.x+s*t.y+o;if(Math.abs(y)<e&&Math.abs(p)<e&&Ot(y,p))return;let u=h*s-a*l;if(u===0)return;let m=Math.abs(u/2),d=l*o-s*f,x=d<0?(d-m)/u:(d+m)/u;d=a*f-h*o;let w=d<0?(d-m)/u:(d+m)/u;return{x,y:w}}}$(wa,"intersectLine");function Ot(g,t){return g*t>0}$(Ot,"sameSign");var Js=wa;function ba(g,t,r){let c=g.x,h=g.y,l=[],f=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(a){f=Math.min(f,a.x),i=Math.min(i,a.y)}):(f=Math.min(f,t.x),i=Math.min(i,t.y));let n=c-g.width/2-f,e=h-g.height/2-i;for(let a=0;a<t.length;a++){let s=t[a],o=t[a<t.length-1?a+1:0],y=Js(g,r,{x:n+s.x,y:e+s.y},{x:n+o.x,y:e+o.y});y&&l.push(y)}return l.length?(l.length>1&&l.sort(function(a,s){let o=a.x-r.x,y=a.y-r.y,p=Math.sqrt(o*o+y*y),u=s.x-r.x,m=s.y-r.y,d=Math.sqrt(u*u+m*m);return p<d?-1:p===d?0:1}),l[0]):g}$(ba,"intersectPolygon");var Ks=ba,N={node:Vs,circle:Zs,ellipse:ma,polygon:Ks,rect:qs};function Sa(g,t){let{labelStyles:r}=L(t);t.labelStyle=r;let c=Y(t),h=c;c||(h="anchor");let l=g.insert("g").attr("class",h).attr("id",t.domId||t.id),f=1,{cssStyles:i}=t,n=v.svg(l),e=H(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);let a=n.circle(0,0,f*2,e),s=l.insert(()=>a,":first-child");return s.attr("class","anchor").attr("style",Q(i)),C(t,s),t.intersect=function(o){return J.info("Circle intersect",t,f,o),N.circle(t,f,o)},l}$(Sa,"anchor");function Ft(g,t,r,c,h,l,f){let n=(g+r)/2,e=(t+c)/2,a=Math.atan2(c-t,r-g),s=(r-g)/2,o=(c-t)/2,y=s/h,p=o/l,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.");let m=Math.sqrt(1-u**2),d=n+m*l*Math.sin(a)*(f?-1:1),x=e-m*h*Math.cos(a)*(f?-1:1),w=Math.atan2((t-x)/l,(g-d)/h),b=Math.atan2((c-x)/l,(r-d)/h)-w;f&&b<0&&(b+=2*Math.PI),!f&&b>0&&(b-=2*Math.PI);let k=[];for(let M=0;M<20;M++){let P=M/19,W=w+P*b,B=d+h*Math.cos(W),D=x+l*Math.sin(W);k.push({x:B,y:D})}return k}$(Ft,"generateArcPoints");function $a(g,t,r){let[c,h]=[t,r].sort((l,f)=>f-l);return h*(1-Math.sqrt(1-(g/c/2)**2))}$($a,"calculateArcSagitta");async function va(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h,i=$(W=>W+f,"calcTotalHeight"),n=$(W=>{let B=W/2;return[B/(2.5+W/50),B]},"calcEllipseRadius"),{shapeSvg:e,bbox:a}=await X(g,t,Y(t)),s=i(t?.height?t?.height:a.height),[o,y]=n(s),p=$a(s,o,y),m=(t?.width?t?.width:a.width)+l*2+p-p,d=s,{cssStyles:x}=t,w=[{x:m/2,y:-d/2},{x:-m/2,y:-d/2},...Ft(-m/2,-d/2,-m/2,d/2,o,y,!1),{x:m/2,y:d/2},...Ft(m/2,d/2,m/2,-d/2,o,y,!0)],S=v.svg(e),b=H(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=j(w),M=S.path(k,b),P=e.insert(()=>M,":first-child");return P.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",x),c&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",c),P.attr("transform",`translate(${o/2}, 0)`),C(t,P),t.intersect=function(W){return N.polygon(t,w,W)},e}$(va,"bowTieRect");async function ka(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,label:i}=await X(g,t,Y(t)),n=r?.nodeBorder??r?.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),o=Math.max(f.height+e*2+s,t.height??0),y=-o/2+s,p=o/2,u=a*.72,m=[`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:d}=t,x=l.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let P=v.svg(l).path(m,H(t,{}));x.node()?.appendChild(P),d&&x.attr("style",d)}else x.append("path").attr("d",m).attr("style",h);x.append("ellipse").attr("cx",0).attr("cy",y).attr("rx",a/2).attr("ry",s).attr("style",`fill:none;stroke:${n};stroke-width:1px`),C(t,x);let w=y+(p-y)/2;i.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${w-f.height/2-(f.y-(f.top??0))})`);let S=12,b=$((M,P,W)=>Array.from({length:S+1},(B,D)=>{let T=Math.PI-D*Math.PI/S;return{x:M*Math.cos(T),y:P+W*s*Math.sin(T)}}),"arc"),k=[...b(a/2,y,-1),...b(u/2,p,1).reverse()];return t.intersect=function(M){return N.polygon(t,k,M)},l}$(ka,"bucket");var Et=20,Tt=8,Us=80,_t=8;async function Pa(g,t){let{themeVariables:r}=K(),c=r.clusterBkg,h=r.clusterBorder,{nodeStyles:l}=L(t),{shapeSvg:f,bbox:i}=await X(g,t,Y(t)),n=t.padding??8,e=i.height,a=Math.max(i.width+n*2,Us,t?.width??0),s=Math.max(e+Tt+Et+n*2,t?.height??0),o=-a/2,y=-s/2,p=-(Tt+Et)/2,u=f.select(".label");u&&(t.useHtmlLabels??mt(K())?u.attr("transform",`translate(${-i.width/2}, ${-i.height/2+p})`):u.attr("transform",`translate(0, ${-i.height/2+p})`));let m;if(t.look==="handDrawn"){let b=v.svg(f),k=H(t,{fill:c,stroke:h,fillStyle:"solid"}),M=b.path(gt(o,y,a,s,_t),k);m=f.insert(()=>M,":first-child"),m.attr("class","basic label-container collapsed-group").attr("style",Q(t.cssStyles))}else m=f.insert("rect",":first-child"),m.attr("class","basic label-container collapsed-group").attr("style",l).attr("rx",_t).attr("ry",_t).attr("x",o).attr("y",y).attr("width",a).attr("height",s).attr("fill",c).attr("stroke",h);let d=y+n+e+Tt;f.append("line").attr("class","collapsed-separator").attr("x1",o+8).attr("y1",d).attr("x2",o+a-8).attr("y2",d).attr("stroke",h).attr("stroke-dasharray","3, 3");let x=d+Et/2,w=2.5,S=10;for(let b=-1;b<=1;b++)f.append("circle").attr("class","collapsed-indicator").attr("cx",b*S).attr("cy",x).attr("r",w).attr("fill",h);return C(t,m),t.calcIntersect=function(b,k){return N.rect(b,k)},t.intersect=function(b){return N.rect(t,b)},f}$(Pa,"collapsedGroup");function lt(g,t,r,c){return g.insert("polygon",":first-child").attr("points",c.map(function(h){return h.x+","+h.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}$(lt,"insertPolygonShape");var Qs=["right","left","up","down"],qt="point",te=$(g=>{let t=new Set;for(let r of g)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),ae=$(g=>Qs.filter(t=>g.has(t)).join("|")||qt,"getDirectionKey"),ea={"right|left|up|down":$(({height:g,midpoint:t,padding:r,width:c})=>[{x:0,y:0},{x:t,y:0},{x:c/2,y:2*r},{x:c-t,y:0},{x:c,y:0},{x:c,y:-g/3},{x:c+2*r,y:-g/2},{x:c,y:-2*g/3},{x:c,y:-g},{x:c-t,y:-g},{x:c/2,y:-g-2*r},{x:t,y:-g},{x:0,y:-g},{x:0,y:-2*g/3},{x:-2*r,y:-g/2},{x:0,y:-g/3}],"right|left|up|down"),"right|left|up":$(({height:g,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-g/2},{x:r-t,y:-g},{x:t,y:-g},{x:0,y:-g/2}],"right|left|up"),"right|left|down":$(({height:g,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-g},{x:r-t,y:-g},{x:r,y:0}],"right|left|down"),"right|up|down":$(({height:g,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-g+t},{x:0,y:-g}],"right|up|down"),"left|up|down":$(({height:g,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-g+t},{x:r,y:-g}],"left|up|down"),"right|left":$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:0},{x:t,y:-r},{x:c-t,y:-r},{x:c-t,y:0},{x:c,y:-g/2},{x:c-t,y:-g},{x:c-t,y:-g+r},{x:t,y:-g+r},{x:t,y:-g},{x:0,y:-g/2}],"right|left"),"up|down":$(({height:g,midpoint:t,padding:r,width:c})=>[{x:c/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-g+r},{x:0,y:-g+r},{x:c/2,y:-g},{x:c,y:-g+r},{x:c-t,y:-g+r},{x:c-t,y:-r},{x:c,y:-r}],"up|down"),"right|up":$(({height:g,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-g}],"right|up"),"right|down":$(({height:g,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-g}],"right|down"),"left|up":$(({height:g,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-g}],"left|up"),"left|down":$(({height:g,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-g}],"left|down"),right:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:-r},{x:t,y:-r},{x:c-t,y:-r},{x:c-t,y:0},{x:c,y:-g/2},{x:c-t,y:-g},{x:c-t,y:-g+r},{x:t,y:-g+r},{x:t,y:-g+r}],"right"),left:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:0},{x:t,y:-r},{x:c-t,y:-r},{x:c-t,y:-g+r},{x:t,y:-g+r},{x:t,y:-g},{x:0,y:-g/2}],"left"),up:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:-r},{x:t,y:-g+r},{x:0,y:-g+r},{x:c/2,y:-g},{x:c,y:-g+r},{x:c-t,y:-g+r},{x:c-t,y:-r}],"up"),down:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:c/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-g+r},{x:c-t,y:-g+r},{x:c-t,y:-r},{x:c,y:-r}],"down"),[qt]:()=>[{x:0,y:0}]},se=$((g,t,r,c)=>{let h=te(g),l=(r.padding??0)/2,f=t.height+4*l,i=f/2,n=c??t.width+2*i+2*l,e=ae(h);return(ea[e]??ea[qt])({height:f,midpoint:i,padding:l,width:n})},"getArrowPoints");async function Ma(g,t){let r=t,{shapeSvg:c,bbox:h}=await X(g,r,Y(r)),l=r.padding??0,f=h.height+2*l,i=f/2,n=h.width+2*i+l,e=r.width??0,s=r.positioned&&(r.widthInColumns??1)>1&&e>n?e:n,o=se(r.directions??[],h,r,s),y=lt(c,s,f,o);return y.attr("style",r.style??null),C(r,y),r.intersect=function(p){return N.polygon(r,o,p)},c}$(Ma,"block_arrow");async function Da(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,label:i}=await X(g,t,Y(t)),n=r?.nodeBorder??r?.lineColor??"currentColor",e=t.padding??12,a=18,s=12,o=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,m=l.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let w=v.svg(l).path(gt(-o/2,p,o,y,s),H(t,{}));m.node()?.appendChild(w),u&&m.attr("style",u)}else m.append("rect").attr("x",-o/2).attr("y",p).attr("width",o).attr("height",y).attr("rx",s).attr("ry",s).attr("style",h);m.append("line").attr("x1",-o/2).attr("y1",p+a).attr("x2",o/2).attr("y2",p+a).attr("style",`stroke:${n};stroke-width:1px`);for(let x=0;x<3;x++)m.append("circle").attr("cx",-o/2+12+x*9).attr("cy",p+a/2).attr("r",2.5).attr("style",`fill:${n};stroke:none`);m.append("rect").attr("class","browser-address-bar").attr("x",-o/2+44).attr("y",p+4).attr("width",Math.max(o-56,10)).attr("height",a-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${n};stroke-width:1px;opacity:0.6`),C(t,m);let d=p+a+(y-a)/2;return i.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${d-f.height/2-(f.y-(f.top??0))})`),t.intersect=function(x){return N.rect(t,x)},l}$(Da,"browser");var Rt=12;async function Na(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?28:h,f=t.look==="neo"?24:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=(t?.width??n.width)+(t.look==="neo"?l*2:l+Rt),a=(t?.height??n.height)+(t.look==="neo"?f*2:f),s=0,o=e,y=-a,p=0,u=[{x:s+Rt,y},{x:o,y},{x:o,y:p},{x:s,y:p},{x:s,y:y+Rt},{x:s+Rt,y}],m,{cssStyles:d}=t;if(t.look==="handDrawn"){let x=v.svg(i),w=H(t,{}),S=j(u),b=x.path(S,w);m=i.insert(()=>b,":first-child").attr("transform",`translate(${-e/2}, ${a/2})`),d&&m.attr("style",d)}else m=lt(i,e,a,u);return c&&m.attr("style",c),C(t,m),t.intersect=function(x){return N.polygon(t,u,x)},i}$(Na,"card");function Ba(g,t){let{nodeStyles:r}=L(t);t.label="";let c=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:h}=t,l=Math.max(28,t.width??0),f=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],i=v.svg(c),n=H(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=j(f),a=i.path(e,n),s=c.insert(()=>a,":first-child");return h&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",h),r&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(o){return N.polygon(t,f,o)},c}$(Ba,"choice");async function zt(g,t,r){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,halfPadding:i}=await X(g,t,Y(t)),n=16,e=r?.padding??i,a=t.look==="neo"?f.width/2+n*2:f.width/2+e,s,{cssStyles:o}=t;if(t.look==="handDrawn"){let y=v.svg(l),p=H(t,{}),u=y.circle(0,0,a*2,p);s=l.insert(()=>u,":first-child"),s.attr("class","basic label-container").attr("style",Q(o))}else s=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",h).attr("r",a).attr("cx",0).attr("cy",0);return C(t,s),t.calcIntersect=function(y,p){let u=y.width/2;return N.circle(y,u,p)},t.intersect=function(y){return J.info("Circle intersect",t,a,y),N.circle(t,a,y)},l}$(zt,"circle");async function Ca(g,t){let r=t,c=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:h,bbox:l,halfPadding:f}=await X(g,r,c),i=h.insert("rect",":first-child"),n=r.padding??0,e=r.positioned?r.width??0:l.width+n,a=r.positioned?r.height??0:l.height+n,s=r.positioned?-e/2:-l.width/2-f,o=r.positioned?-a/2:-l.height/2-f;return i.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",s).attr("y",o).attr("width",e).attr("height",a),C(r,i),r.intersect=function(y){return N.rect(r,y)},h}$(Ca,"composite");async function Aa(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,label:i}=await X(g,t,Y(t)),n=r?.nodeBorder??r?.lineColor??"currentColor",e=t.padding??12,a=20,s=12,o=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,m=l.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let w=v.svg(l).path(gt(-o/2,p,o,y,s),H(t,{}));m.node()?.appendChild(w),u&&m.attr("style",u)}else m.append("rect").attr("x",-o/2).attr("y",p).attr("width",o).attr("height",y).attr("rx",s).attr("ry",s).attr("style",h);m.append("text").attr("x",-o/2+12).attr("y",p+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${n}`).text(">_"),C(t,m);let d=p+a+(y-a)/2;return i.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${d-f.height/2-(f.y-(f.top??0))})`),t.intersect=function(x){return N.rect(t,x)},l}$(Aa,"consoleWindow");function Ra(g){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),c=g*2,h={x:c/2*t,y:c/2*r},l={x:-(c/2)*t,y:c/2*r},f={x:-(c/2)*t,y:-(c/2)*r},i={x:c/2*t,y:-(c/2)*r};return`M ${l.x},${l.y} L ${i.x},${i.y}
|
|
2
2
|
M ${h.x},${h.y} L ${f.x},${f.y}`}$(Ra,"createLine");function Ha(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r,t.label="";let h=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),l=Math.max(30,t?.width??0),{cssStyles:f}=t,i=v.svg(h),n=H(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=i.circle(0,0,l*2,n),a=Ra(l),s=i.path(a,n),o=h.insert(()=>e,":first-child");return o.insert(()=>s),o.attr("class","outer-path"),f&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",f),c&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",c),C(t,o),t.intersect=function(y){return J.info("crossedCircle intersect",t,{radius:l,point:y}),N.circle(t,l,y)},h}$(Ha,"crossedCircle");function ot(g,t,r,c=100,h=0,l=180){let f=[],i=h*Math.PI/180,a=(l*Math.PI/180-i)/(c-1);for(let s=0;s<c;s++){let o=i+s*a,y=g+r*Math.cos(o),p=t+r*Math.sin(o);f.push({x:-y,y:-p})}return f}$(ot,"generateCirclePoints");async function Ia(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=l.width+i,a=l.height+n,s=Math.max(5,a*.1),{cssStyles:o}=t,y=[...ot(e/2,-a/2,s,30,-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+e*.1,-s,s,20,-180,-270),...ot(e/2+e*.1,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=v.svg(h),m=H(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let x=j(y).replace("Z",""),w=u.path(x,m),S=j(p),b=u.path(S,{...m}),k=h.insert("g",":first-child");return k.insert(()=>b,":first-child").attr("stroke-opacity",0),k.insert(()=>w,":first-child"),k.attr("class","text"),o&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",o),c&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",c),k.attr("transform",`translate(${s}, 0)`),f.attr("transform",`translate(${-e/2+s-(l.x-(l.left??0))},${-a/2+(t.padding??0)/2-(l.y-(l.top??0))})`),C(t,k),t.intersect=function(M){return N.polygon(t,p,M)},h}$(Ia,"curlyBraceLeft");function ht(g,t,r,c=100,h=0,l=180){let f=[],i=h*Math.PI/180,a=(l*Math.PI/180-i)/(c-1);for(let s=0;s<c;s++){let o=i+s*a,y=g+r*Math.cos(o),p=t+r*Math.sin(o);f.push({x:y,y:p})}return f}$(ht,"generateCirclePoints");async function La(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=l.width+(t.look==="neo"?i*2:i),a=l.height+(t.look==="neo"?n*2:n),s=Math.max(5,a*.1),{cssStyles:o}=t,y=[...ht(e/2,-a/2,s,20,-90,0),{x:e/2+s,y:-s},...ht(e/2+s*2,-s,s,20,-180,-270),...ht(e/2+s*2,s,s,20,-90,-180),{x:e/2+s,y:a/2},...ht(e/2,a/2,s,20,0,90)],p=[{x:-e/2,y:-a/2-s},{x:e/2,y:-a/2-s},...ht(e/2,-a/2,s,20,-90,0),{x:e/2+s,y:-s},...ht(e/2+s*2,-s,s,20,-180,-270),...ht(e/2+s*2,s,s,20,-90,-180),{x:e/2+s,y:a/2},...ht(e/2,a/2,s,20,0,90),{x:e/2,y:a/2+s},{x:-e/2,y:a/2+s}],u=v.svg(h),m=H(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let x=j(y).replace("Z",""),w=u.path(x,m),S=j(p),b=u.path(S,{...m}),k=h.insert("g",":first-child");return k.insert(()=>b,":first-child").attr("stroke-opacity",0),k.insert(()=>w,":first-child"),k.attr("class","text"),o&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",o),c&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",c),k.attr("transform",`translate(${-s}, 0)`),f.attr("transform",`translate(${-e/2+(t.padding??0)/2-(l.x-(l.left??0))},${-a/2+(t.padding??0)/2-(l.y-(l.top??0))})`),C(t,k),t.intersect=function(M){return N.polygon(t,p,M)},h}$(La,"curlyBraceRight");function tt(g,t,r,c=100,h=0,l=180){let f=[],i=h*Math.PI/180,a=(l*Math.PI/180-i)/(c-1);for(let s=0;s<c;s++){let o=i+s*a,y=g+r*Math.cos(o),p=t+r*Math.sin(o);f.push({x:-y,y:-p})}return f}$(tt,"generateCirclePoints");async function Wa(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=l.width+(t.look==="neo"?i*2:i),a=l.height+(t.look==="neo"?n*2:n),s=Math.max(5,a*.1),{cssStyles:o}=t,y=[...tt(e/2,-a/2,s,30,-90,0),{x:-e/2-s,y:s},...tt(e/2+s*2,-s,s,20,-180,-270),...tt(e/2+s*2,s,s,20,-90,-180),{x:-e/2-s,y:-a/2},...tt(e/2,a/2,s,20,0,90)],p=[...tt(-e/2+s+s/2,-a/2,s,20,-90,-180),{x:e/2-s/2,y:s},...tt(-e/2-s/2,-s,s,20,0,90),...tt(-e/2-s/2,s,s,20,-90,0),{x:e/2-s/2,y:-s},...tt(-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},...tt(e/2,-a/2,s,20,-90,0),{x:-e/2-s,y:-s},...tt(e/2+s*2,-s,s,20,-180,-270),...tt(e/2+s*2,s,s,20,-90,-180),{x:-e/2-s,y:a/2},...tt(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},...tt(-e/2+s+s/2,-a/2,s,20,-90,-180),{x:e/2-s/2,y:s},...tt(-e/2-s/2,-s,s,20,0,90),...tt(-e/2-s/2,s,s,20,-90,0),{x:e/2-s/2,y:-s},...tt(-e/2+s+s/2,a/2,s,30,-180,-270)],m=v.svg(h),d=H(t,{fill:"none"});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let w=j(y).replace("Z",""),S=m.path(w,d),k=j(p).replace("Z",""),M=m.path(k,d),P=j(u),W=m.path(P,{...d}),B=h.insert("g",":first-child");return B.insert(()=>W,":first-child").attr("stroke-opacity",0),B.insert(()=>S,":first-child"),B.insert(()=>M,":first-child"),B.attr("class","text"),o&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",o),c&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",c),B.attr("transform",`translate(${s-s/4}, 0)`),f.attr("transform",`translate(${-e/2+(t.padding??0)/2-(l.x-(l.left??0))},${-a/2+(t.padding??0)/2-(l.y-(l.top??0))})`),C(t,B),t.intersect=function(D){return N.polygon(t,u,D)},h}$(Wa,"curlyBraces");async function Ea(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h,i=20,n=5,{shapeSvg:e,bbox:a}=await X(g,t,Y(t)),s=Math.max(i,(a.width+l*2)*1.25,t?.width??0),o=Math.max(n,a.height+f*2,t?.height??0),y=o/2,{cssStyles:p}=t,u=v.svg(e),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=s,x=o,w=d-y,S=x/4,b=[{x:w,y:0},{x:S,y:0},{x:0,y:x/2},{x:S,y:x},{x:w,y:x},...it(-w,-x/2,y,50,270,90)],k=j(b),M=u.path(k,m),P=e.insert(()=>M,":first-child");return P.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&P.selectChildren("path").attr("style",p),c&&t.look!=="handDrawn"&&P.selectChildren("path").attr("style",c),P.attr("transform",`translate(${-s/2}, ${-o/2})`),C(t,P),t.intersect=function(W){return N.polygon(t,b,W)},e}$(Ea,"curvedTrapezoid");async function Ta(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.padding??20,n=Math.max(l.width+i*2,t.width??0,100),e=Math.min(Math.max(n*.23,16),56),a=e*.27,s=Math.max(l.height+i*2,t.height?t.height-(2*e-a):0),o=Math.min(n*.177,s*.45),y=s+2*e-a,p=-y/2,u=p+2*e-a,m=h.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:d}=t;if(t.look==="handDrawn"){let P=v.svg(h),W=H(t,{}),B=P.path(gt(-n/2,u,n,s,o),W),D=P.circle(0,p+e,e*2,W);m.insert(()=>D,":first-child"),m.insert(()=>B,":first-child"),d&&m.attr("style",d)}else m.append("rect").attr("x",-n/2).attr("y",u).attr("width",n).attr("height",s).attr("rx",o).attr("ry",o).attr("style",c),m.append("circle").attr("cx",0).attr("cy",p+e).attr("r",e).attr("style",c);C(t,m);let x=u+s/2;f.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${x-l.height/2-(l.y-(l.top??0))})`);let w=p+e,S=Math.asin(Math.min(1,(u-w)/e))*180/Math.PI,M=[...it(0,-w,e,24,180+S,-S),...it(-(-n/2+o),-(u+o),o,12,90,0),...it(-(-n/2+o),-(y/2-o),o,12,360,270),...it(-(n/2-o),-(y/2-o),o,12,270,180),...it(-(n/2-o),-(u+o),o,12,180,90)];return t.intersect=function(P){return N.polygon(t,M,P)},h}$(Ta,"person");var ee=$((g,t,r,c,h,l)=>[`M${g},${t+l}`,`a${h},${l} 0,0,0 ${r},0`,`a${h},${l} 0,0,0 ${-r},0`,`l0,${c}`,`a${h},${l} 0,0,0 ${r},0`,`l0,${-c}`].join(" "),"createCylinderPathD"),re=$((g,t,r,c,h,l)=>[`M${g},${t+l}`,`M${g+r},${t+l}`,`a${h},${l} 0,0,0 ${-r},0`,`l0,${c}`,`a${h},${l} 0,0,0 ${r},0`,`l0,${-c}`].join(" "),"createOuterCylinderPathD"),ie=$((g,t,r,c,h,l)=>[`M${g-r/2},${-c/2}`,`a${h},${l} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ra=8,ia=8;async function _a(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?24:h,f=t.look==="neo"?24:h,i=t.width??0;if(t.width&&(t.width=t.width-f,t.width<ia&&(t.width=ia)),t.height){let x=i/2/(2.5+i/50);t.height=t.height-l-x*3,t.height<ra&&(t.height=ra)}let{shapeSvg:n,bbox:e,label:a}=await X(g,t,Y(t)),s=Math.max(t.width??0,e.width)+f,o=s/2,y=o/(2.5+s/50),p=Math.max(t.height??0,e.height)+l+y,u,{cssStyles:m}=t;if(t.look==="handDrawn"){let d=v.svg(n),x=re(0,0,s,p,o,y),w=ie(0,y,s,p,o,y),S=H(t,{}),b=d.path(x,S),k=d.path(w,H(t,{fill:"none"}));u=n.insert(()=>k,":first-child"),u=n.insert(()=>b,":first-child"),u.attr("class","basic label-container"),m&&u.attr("style",m)}else{let d=ee(0,0,s,p,o,y);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container outer-path").attr("style",Q(m)).attr("style",c)}return u.attr("label-offset-y",y),u.attr("transform",`translate(${-s/2}, ${-(p/2+y)})`),C(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(d){let x=N.rect(t,d),w=x.x-(t.x??0);if(o!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-y)){let S=y*y*(1-w*w/(o*o));S>0&&(S=Math.sqrt(S)),S=y-S,d.y-(t.y??0)>0&&(S=-S),x.y+=S}return x},n}$(_a,"cylinder");async function Pt(g,t,r){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f}=await X(g,t,Y(t)),i=Math.max(f.width+r.labelPaddingX*2,t?.width||0),n=Math.max(f.height+r.labelPaddingY*2,t?.height||0),e=-i/2,a=-n/2,s,{rx:o,ry:y}=t,{cssStyles:p}=t;if(r?.rx&&r.ry&&(o=r.rx,y=r.ry),t.look==="handDrawn"){let u=v.svg(l),m=H(t,{}),d=o||y?u.path(gt(e,a,i,n,o||0),m):u.rectangle(e,a,i,n,m);s=l.insert(()=>d,":first-child"),s.attr("class","basic label-container").attr("style",Q(p))}else s=l.insert("rect",":first-child"),s.attr("class","basic label-container").attr("style",h).attr("rx",Q(o)).attr("ry",Q(y)).attr("x",e).attr("y",a).attr("width",i).attr("height",n);return C(t,s,t.look==="handDrawn"?void 0:{width:i,height:n}),t.calcIntersect=function(u,m){return N.rect(u,m)},t.intersect=function(u){return N.rect(t,u)},l}$(Pt,"drawRect");async function Ya(g,t){let{cssClasses:r,labelPaddingX:c,labelPaddingY:h,padding:l,width:f,height:i}=t,n={rx:0,ry:0,classes:r??"",labelPaddingX:c??(l??0)*2,labelPaddingY:h??l??0},e=await Pt(g,t,n);if(t.look==="handDrawn"){let y=v.svg(e),p=H(t,{}),u=e.select(".basic.label-container > path:nth-child(2)"),m=u.node();if(!m)return e;let d=null;if(m instanceof SVGGraphicsElement)d=m.getBBox();else return e;return e.insert(()=>y.line(d.x,d.y,d.x+d.width,d.y,p),".basic.label-container g.label"),e.insert(()=>y.line(d.x,d.y+d.height,d.x+d.width,d.y+d.height,p),".basic.label-container g.label"),u.remove(),e}let a=e.select(".basic.label-container"),s=(Number(a.attr("width"))||f)??0,o=(Number(a.attr("height"))||i)??0;return s>0&&o>0&&a.attr("stroke-dasharray",`${s} ${o}`),e}$(Ya,"datastore");async function Xa(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?16:t.padding??0,{shapeSvg:f,bbox:i,label:n}=await X(g,t,Y(t)),e=i.width+h,a=i.height+l,s=a*.2,o=-e/2,y=-a/2-s/2,{cssStyles:p}=t,u=v.svg(f),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=[{x:o,y:y+s},{x:-o,y:y+s},{x:-o,y:-y},{x:o,y:-y},{x:o,y},{x:-o,y},{x:-o,y:y+s}],x=u.polygon(d.map(S=>[S.x,S.y]),m),w=f.insert(()=>x,":first-child");return w.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),c&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",c),n.attr("transform",`translate(${o+(t.padding??0)/2-(i.x-(i.left??0))}, ${y+s+(t.padding??0)/2-(i.y-(i.top??0))})`),C(t,w),t.intersect=function(S){return N.rect(t,S)},f}$(Xa,"dividedRectangle");async function Oa(g,t){let{labelStyles:r,nodeStyles:c}=L(t),h=t.look==="neo"?12:5;t.labelStyle=r;let l=t.padding??0,f=t.look==="neo"?16:l,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=(t?.width?t?.width/2:n.width/2)+(f??0),a=e-h,s,{cssStyles:o}=t;if(t.look==="handDrawn"){let y=v.svg(i),p=H(t,{roughness:.2,strokeWidth:2.5}),u=H(t,{roughness:.2,strokeWidth:1.5}),m=y.circle(0,0,e*2,p),d=y.circle(0,0,a*2,u);s=i.insert("g",":first-child"),s.attr("class",Q(t.cssClasses)).attr("style",Q(o)),s.node()?.appendChild(m),s.node()?.appendChild(d)}else{s=i.insert("g",":first-child");let y=s.insert("circle",":first-child"),p=s.insert("circle");s.attr("class","basic label-container").attr("style",c),y.attr("class","outer-circle").attr("style",c).attr("r",e).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",c).attr("r",a).attr("cx",0).attr("cy",0)}return C(t,s),t.intersect=function(y){return J.info("DoubleCircle intersect",t,e,y),N.circle(t,e,y)},i}$(Oa,"doublecircle");function Fa(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.label="",t.labelStyle=c;let l=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),f=7,{cssStyles:i}=t,n=v.svg(l),{nodeBorder:e}=r,a=H(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(a.roughness=0);let s=n.circle(0,0,f*2,a),o=l.insert(()=>s,":first-child");return o.selectAll("path").attr("style",`fill: ${e} !important;`),i&&i.length>0&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",i),h&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",h),C(t,o),t.intersect=function(y){return J.info("filledCircle intersect",t,{radius:f,point:y}),N.circle(t,f,y)},l}$(Fa,"filledCircle");var la=10,na=10;async function ja(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?h*2:h;(t.width||t.height)&&(t.height=t?.height??0,t.height<la&&(t.height=la),t.width=(t?.width??0)-l-l/2,t.width<na&&(t.width=na));let{shapeSvg:f,bbox:i,label:n}=await X(g,t,Y(t)),e=(t?.width?t?.width:i.width)+(l??0),a=t?.height?t?.height:e+i.height,s=a,o=[{x:0,y:-a},{x:s,y:-a},{x:s/2,y:0}],{cssStyles:y}=t,p=v.svg(f),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=j(o),d=p.path(m,u),x=f.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${a/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",y),c&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",c),t.width=e,t.height=a,C(t,x),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-a/2+(t.padding??0)/2+(i.y-(i.top??0))})`),t.intersect=function(w){return J.info("Triangle intersect",t,o,w),N.polygon(t,o,w)},f}$(ja,"flippedTriangle");async function Ga(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.padding??12,n=Math.max(l.width+i*2,t.width??0,90),e=l.height+i*2,a=Math.max(Math.min(e*.16,14),8),s=Math.max(e+a,t.height??0),o=s-a,y=Math.max(n*.38,28),p=-s/2,u=[{x:-n/2,y:p},{x:-n/2+y,y:p},{x:-n/2+y,y:p+a},{x:n/2,y:p+a},{x:n/2,y:s/2},{x:-n/2,y:s/2}],m=[`M${u[0].x},${u[0].y}`,...u.slice(1).map(S=>`L${S.x},${S.y}`),"Z"].join(" "),{cssStyles:d}=t,x;if(t.look==="handDrawn"){let b=v.svg(h).path(m,H(t,{}));x=h.insert(()=>b,":first-child").attr("class","basic label-container"),d&&x.attr("style",d)}else x=h.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",c);t.look==="handDrawn"?C(t,x):C(t,x,{width:n,height:s});let w=p+a+o/2;return f.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${w-l.height/2-(l.y-(l.top??0))})`),t.intersect=function(S){return N.polygon(t,u,S)},h}$(Ga,"folder");function qa(g,t,{dir:r,config:{state:c,themeVariables:h}}){let{nodeStyles:l}=L(t);t.label="";let f=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,n=Math.max(70,t?.width??0),e=Math.max(10,t?.height??0);r==="LR"&&(n=Math.max(10,t?.width??0),e=Math.max(70,t?.height??0));let a=-1*n/2,s=-1*e/2,o=v.svg(f),y=H(t,{stroke:h.lineColor,fill:h.lineColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let p=o.rectangle(a,s,n,e,y),u=f.insert(()=>p,":first-child");i&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",i),l&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",l),C(t,u);let m=c?.padding??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(d){return N.rect(t,d)},f}$(qa,"forkJoin");async function za(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=15,l=10,f=t.look==="neo"?16:t.padding??0,i=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-i*2,t.height<l&&(t.height=l),t.width=(t?.width??0)-f*2,t.width<h&&(t.width=h));let{shapeSvg:n,bbox:e}=await X(g,t,Y(t)),a=(t?.width?t?.width:Math.max(h,e.width))+f*2,s=(t?.height?t?.height:Math.max(l,e.height))+i*2,o=s/2,{cssStyles:y}=t,p=v.svg(n),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-a/2,y:-s/2},{x:a/2-o,y:-s/2},...it(-a/2+o,0,o,50,90,270),{x:a/2-o,y:s/2},{x:-a/2,y:s/2}],d=j(m),x=p.path(d,u),w=n.insert(()=>x,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",y),c&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",c),C(t,w),t.intersect=function(S){return J.info("Pill intersect",t,{radius:o,point:S}),N.polygon(t,m,S)},n}$(za,"halfRoundedRectangle");var le=$((g,t,r,c,h)=>[`M${g+h},${t}`,`L${g+r-h},${t}`,`L${g+r},${t-c/2}`,`L${g+r-h},${t-c}`,`L${g+h},${t-c}`,`L${g},${t-c/2}`,"Z"].join(" "),"createHexagonPathD");async function Va(g,t){let{labelStyles:r,nodeStyles:c}=L(t),h=t.look==="neo"?3.5:4;t.labelStyle=r;let l=t.padding??0,f=70,i=32,n=t.look==="neo"?f:l,e=t.look==="neo"?i:l;if(t.width||t.height){let w=(t.height??0)/h;t.width=(t?.width??0)-2*w-e,t.height=(t.height??0)-n}let{shapeSvg:a,bbox:s}=await X(g,t,Y(t)),o=(t?.height?t?.height:s.height)+n,y=o/h,p=(t?.width?t?.width:s.width)+2*y+e,u=[{x:y,y:0},{x:p-y,y:0},{x:p,y:-o/2},{x:p-y,y:-o},{x:y,y:-o},{x:0,y:-o/2}],m,{cssStyles:d}=t;if(t.look==="handDrawn"){let x=v.svg(a),w=H(t,{}),S=le(0,0,p,o,y),b=x.path(S,w);m=a.insert(()=>b,":first-child").attr("transform",`translate(${-p/2}, ${o/2})`),d&&m.attr("style",d)}else m=lt(a,p,o,u);return c&&m.attr("style",c),t.width=p,t.height=o,C(t,m),t.intersect=function(x){return N.polygon(t,u,x)},a}$(Va,"hexagon");async function Za(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.label="",t.labelStyle=r;let{shapeSvg:h}=await X(g,t,Y(t)),l=Math.max(30,t?.width??0),f=Math.max(30,t?.height??0),{cssStyles:i}=t,n=v.svg(h),e=H(t,{});t.look!=="handDrawn"&&(e.roughness=0,e.fillStyle="solid");let a=[{x:0,y:0},{x:l,y:0},{x:0,y:f},{x:l,y:f}],s=j(a),o=n.path(s,e),y=h.insert(()=>o,":first-child");return y.attr("class","basic label-container outer-path"),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),c&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",c),y.attr("transform",`translate(${-l/2}, ${-f/2})`),C(t,y),t.intersect=function(p){return J.info("Pill intersect",t,{points:a}),N.polygon(t,a,p)},h}$(Za,"hourglass");async function Ja(g,t,{config:{themeVariables:r,flowchart:c}}){let{labelStyles:h}=L(t);t.labelStyle=h;let l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=c?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:a,label:s}=await X(g,t,"icon-shape default"),o=t.pos==="t",y=i,p=i,{nodeBorder:u}=r,{stylesMap:m}=Mt(t),d=-p/2,x=-y/2,w=t.label?8:0,S=v.svg(e),b=H(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=S.rectangle(d,x,p,y,b),M=Math.max(p,a.width),P=y+a.height+w,W=S.rectangle(-M/2,-P/2,M,P,{...b,fill:"transparent",stroke:"none"}),B=e.insert(()=>k,":first-child"),D=e.insert(()=>W);if(t.icon){let T=e.append("g");T.html(`<g>${await Dt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let A=T.node().getBBox(),E=A.width,I=A.height,R=A.x,_=A.y;T.attr("transform",`translate(${-E/2-R},${o?a.height/2+w/2-I/2-_:-a.height/2-w/2-I/2-_})`),T.attr("style",`color: ${m.get("stroke")??u};`)}return s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${o?-P/2:P/2-a.height})`),B.attr("transform",`translate(0,${o?a.height/2+w/2:-a.height/2-w/2})`),C(t,D),t.intersect=function(T){if(J.info("iconSquare intersect",t,T),!t.label)return N.rect(t,T);let A=t.x??0,E=t.y??0,I=t.height??0,R=[];return o?R=[{x:A-a.width/2,y:E-I/2},{x:A+a.width/2,y:E-I/2},{x:A+a.width/2,y:E-I/2+a.height+w},{x:A+p/2,y:E-I/2+a.height+w},{x:A+p/2,y:E+I/2},{x:A-p/2,y:E+I/2},{x:A-p/2,y:E-I/2+a.height+w},{x:A-a.width/2,y:E-I/2+a.height+w}]:R=[{x:A-p/2,y:E-I/2},{x:A+p/2,y:E-I/2},{x:A+p/2,y:E-I/2+y},{x:A+a.width/2,y:E-I/2+y},{x:A+a.width/2/2,y:E+I/2},{x:A-a.width/2,y:E+I/2},{x:A-a.width/2,y:E-I/2+y},{x:A-p/2,y:E-I/2+y}],N.polygon(t,R,T)},e}$(Ja,"icon");async function Ka(g,t,{config:{themeVariables:r,flowchart:c}}){let{labelStyles:h}=L(t);t.labelStyle=h;let l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=c?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:a,label:s}=await X(g,t,"icon-shape default"),o=20,y=t.label?8:0,p=t.pos==="t",{nodeBorder:u,mainBkg:m}=r,{stylesMap:d}=Mt(t),x=v.svg(e),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let S=d.get("fill");w.stroke=S??m;let b=e.append("g");t.icon&&b.html(`<g>${await Dt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let k=b.node().getBBox(),M=k.width,P=k.height,W=k.x,B=k.y,D=Math.max(M,P)*Math.SQRT2+o*2,T=x.circle(0,0,D,w),A=Math.max(D,a.width),E=D+a.height+y,I=x.rectangle(-A/2,-E/2,A,E,{...w,fill:"transparent",stroke:"none"}),R=e.insert(()=>T,":first-child"),_=e.insert(()=>I);return b.attr("transform",`translate(${-M/2-W},${p?a.height/2+y/2-P/2-B:-a.height/2-y/2-P/2-B})`),b.attr("style",`color: ${d.get("stroke")??u};`),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${p?-E/2:E/2-a.height})`),R.attr("transform",`translate(0,${p?a.height/2+y/2:-a.height/2-y/2})`),C(t,_),t.intersect=function(O){return J.info("iconSquare intersect",t,O),N.rect(t,O)},e}$(Ka,"iconCircle");async function Ua(g,t,{config:{themeVariables:r,flowchart:c}}){let{labelStyles:h}=L(t);t.labelStyle=h;let l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=c?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:a,halfPadding:s,label:o}=await X(g,t,"icon-shape default"),y=t.pos==="t",p=i+s*2,u=i+s*2,{nodeBorder:m,mainBkg:d}=r,{stylesMap:x}=Mt(t),w=-u/2,S=-p/2,b=t.label?8:0,k=v.svg(e),M=H(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let P=x.get("fill");M.stroke=P??d;let W=k.path(gt(w,S,u,p,5),M),B=Math.max(u,a.width),D=p+a.height+b,T=k.rectangle(-B/2,-D/2,B,D,{...M,fill:"transparent",stroke:"none"}),A=e.insert(()=>W,":first-child").attr("class","icon-shape2"),E=e.insert(()=>T);if(t.icon){let I=e.append("g");I.html(`<g>${await Dt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let R=I.node().getBBox(),_=R.width,O=R.height,G=R.x,q=R.y;I.attr("transform",`translate(${-_/2-G},${y?a.height/2+b/2-O/2-q:-a.height/2-b/2-O/2-q})`),I.attr("style",`color: ${x.get("stroke")??m};`)}return o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${y?-D/2:D/2-a.height})`),A.attr("transform",`translate(0,${y?a.height/2+b/2:-a.height/2-b/2})`),C(t,E),t.intersect=function(I){if(J.info("iconSquare intersect",t,I),!t.label)return N.rect(t,I);let R=t.x??0,_=t.y??0,O=t.height??0,G=[];return y?G=[{x:R-a.width/2,y:_-O/2},{x:R+a.width/2,y:_-O/2},{x:R+a.width/2,y:_-O/2+a.height+b},{x:R+u/2,y:_-O/2+a.height+b},{x:R+u/2,y:_+O/2},{x:R-u/2,y:_+O/2},{x:R-u/2,y:_-O/2+a.height+b},{x:R-a.width/2,y:_-O/2+a.height+b}]:G=[{x:R-u/2,y:_-O/2},{x:R+u/2,y:_-O/2},{x:R+u/2,y:_-O/2+p},{x:R+a.width/2,y:_-O/2+p},{x:R+a.width/2/2,y:_+O/2},{x:R-a.width/2,y:_+O/2},{x:R-a.width/2,y:_-O/2+p},{x:R-u/2,y:_-O/2+p}],N.polygon(t,G,I)},e}$(Ua,"iconRounded");async function Qa(g,t,{config:{themeVariables:r,flowchart:c}}){let{labelStyles:h}=L(t);t.labelStyle=h;let l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=c?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:a,halfPadding:s,label:o}=await X(g,t,"icon-shape default"),y=t.pos==="t",p=i+s*2,u=i+s*2,{nodeBorder:m,mainBkg:d}=r,{stylesMap:x}=Mt(t),w=-u/2,S=-p/2,b=t.label?8:0,k=v.svg(e),M=H(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let P=x.get("fill");M.stroke=P??d;let W=k.path(gt(w,S,u,p,.1),M),B=Math.max(u,a.width),D=p+a.height+b,T=k.rectangle(-B/2,-D/2,B,D,{...M,fill:"transparent",stroke:"none"}),A=e.insert(()=>W,":first-child"),E=e.insert(()=>T);if(t.icon){let I=e.append("g");I.html(`<g>${await Dt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let R=I.node().getBBox(),_=R.width,O=R.height,G=R.x,q=R.y;I.attr("transform",`translate(${-_/2-G},${y?a.height/2+b/2-O/2-q:-a.height/2-b/2-O/2-q})`),I.attr("style",`color: ${x.get("stroke")??m};`)}return o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${y?-D/2:D/2-a.height})`),A.attr("transform",`translate(0,${y?a.height/2+b/2:-a.height/2-b/2})`),C(t,E),t.intersect=function(I){if(J.info("iconSquare intersect",t,I),!t.label)return N.rect(t,I);let R=t.x??0,_=t.y??0,O=t.height??0,G=[];return y?G=[{x:R-a.width/2,y:_-O/2},{x:R+a.width/2,y:_-O/2},{x:R+a.width/2,y:_-O/2+a.height+b},{x:R+u/2,y:_-O/2+a.height+b},{x:R+u/2,y:_+O/2},{x:R-u/2,y:_+O/2},{x:R-u/2,y:_-O/2+a.height+b},{x:R-a.width/2,y:_-O/2+a.height+b}]:G=[{x:R-u/2,y:_-O/2},{x:R+u/2,y:_-O/2},{x:R+u/2,y:_-O/2+p},{x:R+a.width/2,y:_-O/2+p},{x:R+a.width/2/2,y:_+O/2},{x:R-a.width/2,y:_+O/2},{x:R-a.width/2,y:_-O/2+p},{x:R-u/2,y:_-O/2+p}],N.polygon(t,G,I)},e}$(Qa,"iconSquare");async function ts(g,t,{config:{flowchart:r}}){let c=new Image;c.src=t?.img??"",await c.decode();let h=Number(c.naturalWidth.toString().replace("px","")),l=Number(c.naturalHeight.toString().replace("px",""));t.imageAspectRatio=h/l;let{labelStyles:f}=L(t);t.labelStyle=f;let i=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let n=Math.max(t.label?i??0:0,t?.assetWidth??h),e=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:n,a=t.constraint==="on"?e/t.imageAspectRatio:t?.assetHeight??l;t.width=Math.max(e,i??0);let{shapeSvg:s,bbox:o,label:y}=await X(g,t,"image-shape default"),p=t.pos==="t",u=-e/2,m=-a/2,d=t.label?8:0,x=v.svg(s),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let S=x.rectangle(u,m,e,a,w),b=Math.max(e,o.width),k=a+o.height+d,M=x.rectangle(-b/2,-k/2,b,k,{...w,fill:"none",stroke:"none"}),P=s.insert(()=>S,":first-child"),W=s.insert(()=>M);if(t.img){let B=s.append("image");B.attr("href",t.img),B.attr("width",e),B.attr("height",a),B.attr("preserveAspectRatio","none"),B.attr("transform",`translate(${-e/2},${p?k/2-a:-k/2})`)}return y.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${p?-a/2-o.height/2-d/2:a/2-o.height/2+d/2})`),P.attr("transform",`translate(0,${p?o.height/2+d/2:-o.height/2-d/2})`),C(t,W),t.intersect=function(B){if(J.info("iconSquare intersect",t,B),!t.label)return N.rect(t,B);let D=t.x??0,T=t.y??0,A=t.height??0,E=[];return p?E=[{x:D-o.width/2,y:T-A/2},{x:D+o.width/2,y:T-A/2},{x:D+o.width/2,y:T-A/2+o.height+d},{x:D+e/2,y:T-A/2+o.height+d},{x:D+e/2,y:T+A/2},{x:D-e/2,y:T+A/2},{x:D-e/2,y:T-A/2+o.height+d},{x:D-o.width/2,y:T-A/2+o.height+d}]:E=[{x:D-e/2,y:T-A/2},{x:D+e/2,y:T-A/2},{x:D+e/2,y:T-A/2+a},{x:D+o.width/2,y:T-A/2+a},{x:D+o.width/2/2,y:T+A/2},{x:D-o.width/2,y:T+A/2},{x:D-o.width/2,y:T-A/2+a},{x:D-e/2,y:T-A/2+a}],N.polygon(t,E,B)},s}$(ts,"imageSquare");async function as(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=h,f=t.look==="neo"?h*2:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=Math.max(n.height+l*2,t.height??0),a=Math.max(n.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}],o,{cssStyles:y}=t;if(t.look==="handDrawn"){let p=v.svg(i),u=H(t,{}),m=j(s),d=p.path(m,u);o=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),y&&o.attr("style",y)}else o=lt(i,a,e,s);return c&&o.attr("style",c),t.width=a,t.height=e,C(t,o),t.intersect=function(p){return N.polygon(t,s,p)},i}$(as,"inv_trapezoid");async function ss(g,t){let{shapeSvg:r,bbox:c,label:h}=await X(g,t,"label"),l=r.insert("rect",":first-child");return l.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),C(t,l),t.intersect=function(n){return N.rect(t,n)},r}$(ss,"labelRect");async function es(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=h,f=t.look==="neo"?h*2:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=Math.max(n.height+l,t.height??0),a=Math.max(n.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}],o,{cssStyles:y}=t;if(t.look==="handDrawn"){let p=v.svg(i),u=H(t,{}),m=j(s),d=p.path(m,u);o=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),y&&o.attr("style",y)}else o=lt(i,a,e,s);return c&&o.attr("style",c),t.width=a,t.height=e,C(t,o),t.intersect=function(p){return N.polygon(t,s,p)},i}$(es,"lean_left");async function rs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=h,f=t.look==="neo"?h*2:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=Math.max(n.height+l,t.height??0),a=Math.max(n.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}],o,{cssStyles:y}=t;if(t.look==="handDrawn"){let p=v.svg(i),u=H(t,{}),m=j(s),d=p.path(m,u);o=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),y&&o.attr("style",y)}else o=lt(i,a,e,s);return c&&o.attr("style",c),t.width=a,t.height=e,C(t,o),t.intersect=function(p){return N.polygon(t,s,p)},i}$(rs,"lean_right");function is(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.label="",t.labelStyle=r;let h=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,f=Math.max(35,t?.width??0),i=Math.max(35,t?.height??0),n=7,e=[{x:f,y:0},{x:0,y:i+n/2},{x:f-2*n,y:i+n/2},{x:0,y:2*i},{x:f,y:i-n/2},{x:2*n,y:i-n/2}],a=v.svg(h),s=H(t,{});t.look!=="handDrawn"&&(s.roughness=0,s.fillStyle="solid");let o=j(e),y=a.path(o,s),p=h.insert(()=>y,":first-child");return p.attr("class","outer-path"),l&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",l),c&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",c),p.attr("transform",`translate(-${f/2},${-i})`),C(t,p),t.intersect=function(u){return J.info("lightningBolt intersect",t,u),N.polygon(t,e,u)},h}$(is,"lightningBolt");var ne=$((g,t,r,c,h,l,f)=>[`M${g},${t+l}`,`a${h},${l} 0,0,0 ${r},0`,`a${h},${l} 0,0,0 ${-r},0`,`l0,${c}`,`a${h},${l} 0,0,0 ${r},0`,`l0,${-c}`,`M${g},${t+l+f}`,`a${h},${l} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),ce=$((g,t,r,c,h,l,f)=>[`M${g},${t+l}`,`M${g+r},${t+l}`,`a${h},${l} 0,0,0 ${-r},0`,`l0,${c}`,`a${h},${l} 0,0,0 ${r},0`,`l0,${-c}`,`M${g},${t+l+f}`,`a${h},${l} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),oe=$((g,t,r,c,h,l)=>[`M${g-r/2},${-c/2}`,`a${h},${l} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ca=10,oa=10;async function ls(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?24:h;if(t.width||t.height){let d=t.width??0;t.width=(t.width??0)-l,t.width<oa&&(t.width=oa);let w=d/2/(2.5+d/50);t.height=(t.height??0)-f-w*3,t.height<ca&&(t.height=ca)}let{shapeSvg:i,bbox:n,label:e}=await X(g,t,Y(t)),a=(t?.width?t?.width:n.width)+l*2,s=a/2,o=s/(2.5+a/50),y=(t?.height?t?.height:n.height)+o+f*2,p=y*.1,u,{cssStyles:m}=t;if(t.look==="handDrawn"){let d=v.svg(i),x=ce(0,0,a,y,s,o,p),w=oe(0,o,a,y,s,o),S=H(t,{}),b=d.path(x,S),k=d.path(w,S);i.insert(()=>k,":first-child").attr("class","line"),u=i.insert(()=>b,":first-child"),u.attr("class","basic label-container"),m&&u.attr("style",m)}else{let d=ne(0,0,a,y,s,o,p);u=i.insert("path",":first-child").attr("d",d).attr("class","basic label-container outer-path").attr("style",Q(m)).attr("style",c)}return u.attr("label-offset-y",o),u.attr("transform",`translate(${-a/2}, ${-(y/2+o)})`),C(t,u),e.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+o-(n.y-(n.top??0))})`),t.intersect=function(d){let x=N.rect(t,d),w=x.x-(t.x??0);if(s!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-o)){let S=o*o*(1-w*w/(s*s));S>0&&(S=Math.sqrt(S)),S=o-S,d.y-(t.y??0)>0&&(S=-S),x.y+=S}return x},i}$(ls,"linedCylinder");async function ns(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h;if(t.width||t.height){let S=t.width;t.width=(S??0)*10/11-l*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-f*2,t.height<10&&(t.height=10)}let{shapeSvg:i,bbox:n,label:e}=await X(g,t,Y(t)),a=(t?.width?t?.width:n.width)+(l??0)*2,s=(t?.height?t?.height:n.height)+(f??0)*2,o=t.look==="neo"?s/4:s/8,y=s+o,{cssStyles:p}=t,u=v.svg(i),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=[{x:-a/2-a/2*.1,y:-y/2},{x:-a/2-a/2*.1,y:y/2},...pt(-a/2-a/2*.1,y/2,a/2+a/2*.1,y/2,o,.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}],x=u.polygon(d.map(S=>[S.x,S.y]),m),w=i.insert(()=>x,":first-child");return w.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),c&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",c),w.attr("transform",`translate(0,${-o/2})`),e.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(n.x-(n.left??0))},${-s/2+(t.padding??0)-o/2-(n.y-(n.top??0))})`),C(t,w),t.intersect=function(S){return N.polygon(t,d,S)},i}$(ns,"linedWaveEdgedRect");async function cs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h,i=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-l*2-2*i,10),t.height=Math.max((t?.height??0)-f*2-2*i,10));let{shapeSvg:n,bbox:e,label:a}=await X(g,t,Y(t)),s=(t?.width?t?.width:e.width)+l*2+2*i,o=(t?.height?t?.height:e.height)+f*2+2*i,y=s-2*i,p=o-2*i,u=-y/2,m=-p/2,{cssStyles:d}=t,x=v.svg(n),w=H(t,{}),S=[{x:u-i,y:m+i},{x:u-i,y:m+p+i},{x:u+y-i,y:m+p+i},{x:u+y-i,y:m+p},{x:u+y,y:m+p},{x:u+y,y:m+p-i},{x:u+y+i,y:m+p-i},{x:u+y+i,y:m-i},{x:u+i,y:m-i},{x:u+i,y:m},{x:u,y:m},{x:u,y:m+i}],b=[{x:u,y:m+i},{x:u+y-i,y:m+i},{x:u+y-i,y:m+p},{x:u+y,y:m+p},{x:u+y,y:m},{x:u,y:m}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let k=j(S),M=x.path(k,w),P=j(b),W=x.path(P,w);t.look!=="handDrawn"&&(M=Xt(M),W=Xt(W));let B=n.insert("g",":first-child");return B.insert(()=>M),B.insert(()=>W),B.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),c&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",c),a.attr("transform",`translate(${-(e.width/2)-i-(e.x-(e.left??0))}, ${-(e.height/2)+i-(e.y-(e.top??0))})`),C(t,B),t.intersect=function(D){return N.polygon(t,S,D)},n}$(cs,"multiRect");async function os(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.padding??0,n=t.look==="neo"?16:i,e=t.look==="neo"?12:i,a=!0;(t.width||t.height)&&(a=!1,t.width=(t?.width??0)-n*2,t.height=(t?.height??0)-e*3);let s=Math.max(l.width,t?.width??0)+n*2,o=Math.max(l.height,t?.height??0)+e*3,y=t.look==="neo"?o/4:o/8,p=o+(a?y/2:-y/2),u=-s/2,m=-p/2,d=10,{cssStyles:x}=t,w=pt(u-d,m+p+d,u+s-d,m+p+d,y,.8),S=w?.[w.length-1],b=[{x:u-d,y:m+d},{x:u-d,y:m+p+d},...w,{x:u+s-d,y:S.y-d},{x:u+s,y:S.y-d},{x:u+s,y:S.y-2*d},{x:u+s+d,y:S.y-2*d},{x:u+s+d,y:m-d},{x:u+d,y:m-d},{x:u+d,y:m},{x:u,y:m},{x:u,y:m+d}],k=[{x:u,y:m+d},{x:u+s-d,y:m+d},{x:u+s-d,y:S.y-d},{x:u+s,y:S.y-d},{x:u+s,y:m},{x:u,y:m}],M=v.svg(h),P=H(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let W=j(b),B=M.path(W,P),D=j(k),T=M.path(D,P),A=h.insert(()=>B,":first-child");return A.insert(()=>T),A.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",x),c&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",c),A.attr("transform",`translate(0,${-y/2})`),f.attr("transform",`translate(${-(l.width/2)-d-(l.x-(l.left??0))}, ${-(l.height/2)+d-y/2-(l.y-(l.top??0))})`),C(t,A),t.intersect=function(E){return N.polygon(t,b,E)},h}$(os,"multiWaveEdgedRectangle");async function hs(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c,t.useHtmlLabels||mt(bt())||(t.centerLabel=!0);let{shapeSvg:f,bbox:i,label:n}=await X(g,t,Y(t)),e=Math.max(i.width+(t.padding??0)*2,t?.width??0),a=Math.max(i.height+(t.padding??0)*2,t?.height??0),s=-e/2,o=-a/2,{cssStyles:y}=t,p=v.svg(f),u=H(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=p.rectangle(s,o,e,a,u),d=f.insert(()=>m,":first-child");return d.attr("class","basic label-container outer-path"),n.attr("class","label noteLabel"),y&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",y),h&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",h),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),C(t,d),t.intersect=function(x){return N.rect(t,x)},f}$(hs,"note");var he=$((g,t,r)=>[`M${g+r/2},${t}`,`L${g+r},${t-r/2}`,`L${g+r/2},${t-r}`,`L${g},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function gs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l}=await X(g,t,Y(t)),f=l.width+(t.padding??0),i=l.height+(t.padding??0),n=f+i,e=.5,a=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],s,{cssStyles:o}=t;if(t.look==="handDrawn"){let y=v.svg(h),p=H(t,{}),u=he(0,0,n),m=y.path(u,p);s=h.insert(()=>m,":first-child").attr("transform",`translate(${-n/2+e}, ${n/2})`),o&&s.attr("style",o)}else s=lt(h,n,n,a),s.attr("transform",`translate(${-n/2+e}, ${n/2})`);return c&&s.attr("style",c),C(t,s),t.calcIntersect=function(y,p){let u=y.width,m=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],d=N.polygon(y,m,p);return{x:d.x-.5,y:d.y-.5}},t.intersect=function(y){return this.calcIntersect(t,y)},h}$(gs,"question");async function ys(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?21:h??0,f=t.look==="neo"?12:h??0,{shapeSvg:i,bbox:n,label:e}=await X(g,t,Y(t)),a=n.width+(t.look==="neo"?l*2:l),s=Math.max(n.height+(t.look==="neo"?f*2:f),t.height??0),o=s/4,p=-Math.max(a,(t.width??0)-o)/2,u=-s/2,m=u/2,d=[{x:p+m,y:u},{x:p,y:0},{x:p+m,y:-u},{x:-p,y:-u},{x:-p,y:u}],{cssStyles:x}=t,w=v.svg(i),S=H(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let b=j(d),k=w.path(b,S),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",x),c&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",c),M.attr("transform",`translate(${-m/2},0)`),e.attr("transform",`translate(${-m/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),C(t,M),t.intersect=function(P){return N.polygon(t,d,P)},i}$(ys,"rect_left_inv_arrow");async function fs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h;t.cssClasses?h="node "+t.cssClasses:h="node default";let l=g.insert("g").attr("class",h).attr("id",t.domId||t.id),f=l.insert("g"),i=l.insert("g").attr("class","label").attr("style",c),n=t.description,e=t.label,a=await sa(i,e,t.labelStyle,!0,!0),s={width:0,height:0};if(mt(K())){let P=a.children[0],W=V(a);s=P.getBoundingClientRect(),W.attr("width",s.width),W.attr("height",s.height)}J.info("Text 2",n);let o=n||[],y=a.getBBox(),p=await sa(i,Array.isArray(o)?o.join("<br/>"):o,t.labelStyle,!0,!0),u=p.children[0],m=V(p);s=u.getBoundingClientRect(),m.attr("width",s.width),m.attr("height",s.height);let d=(t.padding||0)/2;V(p).attr("transform","translate( "+(s.width>y.width?0:(y.width-s.width)/2)+", "+(y.height+d+5)+")"),V(a).attr("transform","translate( "+(s.width<y.width?0:-(y.width-s.width)/2)+", 0)"),s=i.node().getBBox(),i.attr("transform","translate("+-s.width/2+", "+(-s.height/2-d+3)+")");let x=s.width+(t.padding||0),w=s.height+(t.padding||0),S=-s.width/2-d,b=-s.height/2-d,k,M;if(t.look==="handDrawn"){let P=v.svg(l),W=H(t,{}),B=P.path(gt(S,b,x,w,t.rx||0),W),D=P.line(-s.width/2-d,-s.height/2-d+y.height+d,s.width/2+d,-s.height/2-d+y.height+d,W);M=l.insert(()=>(J.debug("Rough node insert CXC",B),D),":first-child"),k=l.insert(()=>(J.debug("Rough node insert CXC",B),B),":first-child")}else k=f.insert("rect",":first-child"),M=f.insert("line"),k.attr("class","outer title-state").attr("style",c).attr("x",-s.width/2-d).attr("y",-s.height/2-d).attr("width",s.width+(t.padding||0)).attr("height",s.height+(t.padding||0)),M.attr("class","divider").attr("x1",-s.width/2-d).attr("x2",s.width/2+d).attr("y1",-s.height/2-d+y.height+d).attr("y2",-s.height/2-d+y.height+d);return C(t,k),t.intersect=function(P){return N.rect(t,P)},l}$(fs,"rectWithTitle");async function ps(g,t,{config:{themeVariables:r}}){let c=r?.radius??5,h={rx:c,ry:c,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Pt(g,t,h)}$(ps,"roundedRect");var xt=8;async function us(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0,{shapeSvg:f,bbox:i,label:n}=await X(g,t,Y(t)),e=(t?.width??i.width)+h*2+(t.look==="neo"?xt:xt*2),a=(t?.height??i.height)+l*2,s=e-xt,o=a,y=xt-e/2,p=-a/2,{cssStyles:u}=t,m=v.svg(f),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let x=[{x:y,y:p},{x:y+s,y:p},{x:y+s,y:p+o},{x:y-xt,y:p+o},{x:y-xt,y:p},{x:y,y:p},{x:y,y:p+o}],w=m.polygon(x.map(b=>[b.x,b.y]),d),S=f.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path").attr("style",Q(u)),c&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",c),u&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",c),n.attr("transform",`translate(${xt/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),C(t,S),t.intersect=function(b){return N.rect(t,b)},f}$(us,"shadedProcess");async function ds(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-l*2,10),t.height=Math.max((t?.height??0)/1.5-f*2,10));let{shapeSvg:i,bbox:n,label:e}=await X(g,t,Y(t)),a=(t?.width?t?.width:n.width)+l*2,s=((t?.height?t?.height:n.height)+f*2)*1.5,o=a,y=s/1.5,p=-o/2,u=-y/2,{cssStyles:m}=t,d=v.svg(i),x=H(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let w=[{x:p,y:u},{x:p,y:u+y},{x:p+o,y:u+y},{x:p+o,y:u-y/2}],S=j(w),b=d.path(S,x),k=i.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),c&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",c),k.attr("transform",`translate(0, ${y/4})`),e.attr("transform",`translate(${-o/2+(t.padding??0)-(n.x-(n.left??0))}, ${-y/4+(t.padding??0)-(n.y-(n.top??0))})`),C(t,k),t.intersect=function(M){return N.polygon(t,w,M)},i}$(ds,"slopedRect");async function ms(g,t){let r=t.padding??0,c=t.look==="neo"?16:r*2,h=t.look==="neo"?12:r,l={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??c,labelPaddingY:h};return Pt(g,t,l)}$(ms,"squareRect");async function xs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?20:h,f=t.look==="neo"?12:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=n.height+(t.look==="neo"?f*2:f),a=n.width+e/4+(t.look==="neo"?l*2:l),s=e/2,{cssStyles:o}=t,y=v.svg(i),p=H(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let u=[{x:-a/2+s,y:-e/2},{x:a/2-s,y:-e/2},...it(-a/2+s,0,s,50,90,270),{x:a/2-s,y:e/2},...it(a/2-s,0,s,50,270,450)],m=j(u),d=y.path(m,p),x=i.insert(()=>d,":first-child");return x.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",o),c&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",c),C(t,x),t.intersect=function(w){return N.polygon(t,u,w)},i}$(xs,"stadium");async function ws(g,t){let r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return Pt(g,t,r)}$(ws,"state");function bs(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{cssStyles:l}=t,{lineColor:f,stateBorder:i,nodeBorder:n,nodeShadow:e}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let a=g.insert("g").attr("class","node default").attr("id",t.domId??t.id),s=v.svg(a),o=H(t,{});t.look!=="handDrawn"&&(o.roughness=0,o.fillStyle="solid");let y=s.circle(0,0,t.width,{...o,stroke:f,strokeWidth:2}),p=i??n,u=(t.width??0)*5/14,m=s.circle(0,0,u,{...o,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),d=a.insert(()=>y,":first-child");if(d.insert(()=>m),t.look!=="handDrawn"&&d.attr("class","outer-path"),l&&d.selectAll("path").attr("style",l),h&&d.selectAll("path").attr("style",h),t.width<25&&e&&t.look!=="handDrawn"){let x=g.node()?.ownerSVGElement?.id??"",w=x?`${x}-drop-shadow-small`:"drop-shadow-small";d.attr("style",`filter:url(#${w})`)}return C(t,d),t.intersect=function(x){return N.circle(t,(t.width??0)/2,x)},a}$(bs,"stateEnd");function Ss(g,t,{config:{themeVariables:r}}){let{lineColor:c,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let l=g.insert("g").attr("class","node default").attr("id",t.domId||t.id),f;if(t.look==="handDrawn"){let n=v.svg(l).circle(0,0,t.width,Qt(c));f=l.insert(()=>n),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else f=l.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&&h&&t.look!=="handDrawn"){let i=g.node()?.ownerSVGElement?.id??"",n=i?`${i}-drop-shadow-small`:"drop-shadow-small";f.attr("style",`filter:url(#${n})`)}return C(t,f),t.intersect=function(i){return N.circle(t,(t.width??7)/2,i)},l}$(Ss,"stateStart");var $t=8;async function $s(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t?.padding??8,l=t.look==="neo"?28:h,f=t.look==="neo"?12:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=Math.max(n.width+2*$t+l,t.width??0),a=Math.max(n.height+f,t.height??0),s=e-2*$t,o=a,y=-e/2,p=-a/2,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-o},{x:-8,y:-o},{x:-8,y:0}];if(t.look==="handDrawn"){let m=v.svg(i),d=H(t,{}),x=m.rectangle(y,p,s+16,o,d),w=m.line(y+$t,p,y+$t,p+o,d),S=m.line(y+$t+s,p,y+$t+s,p+o,d);i.insert(()=>w,":first-child"),i.insert(()=>S,":first-child");let b=i.insert(()=>x,":first-child"),{cssStyles:k}=t;b.attr("class","basic label-container").attr("style",Q(k)),C(t,b)}else{let m=lt(i,s,o,u);c&&m.attr("style",c),C(t,m)}return t.intersect=function(m){return N.polygon(t,u,m)},i}$($s,"subroutine");var Yt=.2;async function vs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-f*2,10),t.width=Math.max((t?.width??0)-l*2-Yt*(t.height+f*2),10));let{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=(t?.height?t?.height:n.height)+f*2,a=Yt*e,s=Yt*e,y=(t?.width?t?.width:n.width)+l*2+a-a,p=e,u=-y/2,m=-p/2,{cssStyles:d}=t,x=v.svg(i),w=H(t,{}),S=[{x:u-a/2,y:m},{x:u+y+a/2,y:m},{x:u+y+a/2,y:m+p},{x:u-a/2,y:m+p}],b=[{x:u+y-a/2,y:m+p},{x:u+y+a/2,y:m+p},{x:u+y+a/2,y:m+p-s}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let k=j(S),M=x.path(k,w),P=j(b),W=x.path(P,{...w,fillStyle:"solid"}),B=i.insert(()=>W,":first-child");return B.insert(()=>M,":first-child"),B.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),c&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",c),C(t,B),t.intersect=function(D){return N.polygon(t,S,D)},i}$(vs,"taggedRect");async function ks(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=Math.max(l.width+(t.padding??0)*2,t?.width??0),n=Math.max(l.height+(t.padding??0)*2,t?.height??0),e=n/8,a=.2*i,s=.2*n,o=n+e,{cssStyles:y}=t,p=v.svg(h),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-i/2-i/2*.1,y:o/2},...pt(-i/2-i/2*.1,o/2,i/2+i/2*.1,o/2,e,.8),{x:i/2+i/2*.1,y:-o/2},{x:-i/2-i/2*.1,y:-o/2}],d=-i/2+i/2*.1,x=-o/2-s*.4,w=[{x:d+i-a,y:(x+n)*1.3},{x:d+i,y:x+n-s},{x:d+i,y:(x+n)*.9},...pt(d+i,(x+n)*1.25,d+i-a,(x+n)*1.3,-n*.02,.5)],S=j(m),b=p.path(S,u),k=j(w),M=p.path(k,{...u,fillStyle:"solid"}),P=h.insert(()=>M,":first-child");return P.insert(()=>b,":first-child"),P.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",y),c&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",c),P.attr("transform",`translate(0,${-e/2})`),f.attr("transform",`translate(${-i/2+(t.padding??0)-(l.x-(l.left??0))},${-n/2+(t.padding??0)-e/2-(l.y-(l.top??0))})`),C(t,P),t.intersect=function(W){return N.polygon(t,m,W)},h}$(ks,"taggedWaveEdgedRectangle");async function Ps(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l}=await X(g,t,Y(t)),f=Math.max(l.width+(t.padding??0),t?.width||0),i=Math.max(l.height+(t.padding??0),t?.height||0),n=-f/2,e=-i/2,a=h.insert("rect",":first-child");return a.attr("class","text").attr("style",c).attr("rx",0).attr("ry",0).attr("x",n).attr("y",e).attr("width",f).attr("height",i),C(t,a),t.intersect=function(s){return N.rect(t,s)},h}$(Ps,"text");var ge=$((g,t,r,c,h,l)=>`M${g},${t}
|
|
3
3
|
a${h},${l} 0,0,1 0,${-c}
|
|
4
4
|
l${r},0
|
|
@@ -60,4 +60,4 @@ import{a as v}from"./chunk-M3SWKTLZ.js";import{a as Qt,b as Mt,d as L,e as H}fro
|
|
|
60
60
|
q${-a},0 ${-a},${-a}
|
|
61
61
|
Z
|
|
62
62
|
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let o=h.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",c).attr("d",s);return h.append("line").attr("class","node-line-").attr("x1",-n/2).attr("y1",e/2).attr("x2",n/2).attr("y2",e/2),i.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),h.append(()=>i.node()),C(t,o),t.calcIntersect=function(y,p){return N.rect(y,p)},t.intersect=function(y){return N.rect(t,y)},h}$(_s,"defaultMindmapNode");async function Ys(g,t){let r={padding:t.padding??0};return zt(g,t,r)}$(Ys,"mindmapCircle");var de=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ms},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ps},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:xs},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:$s},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:_a},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Ya},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Ga},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:ka},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Aa},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Da},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Ta},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:zt},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Es},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Ts},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:gs},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Va},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:rs},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:es},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ds},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:as},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Oa},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Ps},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Na},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:us},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ss},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:bs},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:qa},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Za},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Ia},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:La},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Wa},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:is},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Cs},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:za},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Ms},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:ls},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Ea},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Xa},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Bs},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Rs},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Fa},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Ns},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ja},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:ds},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:os},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:cs},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:va},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Ha},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ks},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:vs},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:As},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:ys},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:ns}],me=$(()=>{let t=[...Object.entries({state:ws,choice:Ba,note:hs,composite:Ca,rectWithTitle:fs,labelRect:ss,block_arrow:Ma,collapsedGroup:Pa,iconSquare:Qa,iconCircle:Ka,icon:Ja,iconRounded:Ua,imageSquare:ts,anchor:Sa,kanbanItem:Ws,mindmapCircle:Ys,defaultMindmapNode:_s,classBox:Is,erBox:Vt,requirementBox:Ls}),...de.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(h=>[h,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),xe=me();function we(g){return g in xe}$(we,"isValidShape");export{X as a,C as b,qs as c,gt as d,sa as e,xe as f,we as g};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-NOVL2262.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Re,d as ve}from"./chunk-
|
|
1
|
+
import{c as Re,d as ve}from"./chunk-GPW7TXQS.js";import{r as K}from"./chunk-CFMSYLIK.js";import{H as Q,K as U,M as $e,N as Se,u as Te}from"./chunk-SGL7WI35.js";import{b as G,h as v}from"./chunk-CXXG5KL5.js";import{a as x}from"./chunk-ITN3D7RJ.js";import{a as we,c as ye,d as T}from"./chunk-SOAWGUAD.js";var Ae=we((X,V)=>{T();(function(r){"use strict";var e=function(){},n=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(c){return setTimeout(c,16)};function s(){var c=this;c.reads=[],c.writes=[],c.raf=n.bind(r),e("initialized",c)}s.prototype={constructor:s,runTasks:function(c){e("run tasks");for(var p;p=c.shift();)p()},measure:function(c,p){e("measure");var h=p?c.bind(p):c;return this.reads.push(h),t(this),h},mutate:function(c,p){e("mutate");var h=p?c.bind(p):c;return this.writes.push(h),t(this),h},clear:function(c){return e("clear",c),i(this.reads,c)||i(this.writes,c)},extend:function(c){if(e("extend",c),typeof c!="object")throw new Error("expected object");var p=Object.create(this);return a(p,c),p.fastdom=this,p.initialize&&p.initialize(),p},catch:null};function t(c){c.scheduled||(c.scheduled=!0,c.raf(l.bind(null,c)),e("flush scheduled"))}function l(c){e("flush");var p=c.writes,h=c.reads,u;try{e("flushing reads",h.length),c.runTasks(h),e("flushing writes",p.length),c.runTasks(p)}catch(f){u=f}if(c.scheduled=!1,(h.length||p.length)&&t(c),u)if(e("task errored",u.message),c.catch)c.catch(u);else throw u}function i(c,p){var h=c.indexOf(p);return!!~h&&!!c.splice(h,1)}function a(c,p){for(var h in p)p.hasOwnProperty(h)&&(c[h]=p[h])}var o=r.fastdom=r.fastdom||new s;typeof define=="function"?define(function(){return o}):typeof V=="object"&&(V.exports=o)})(typeof window<"u"?window:typeof X<"u"?X:globalThis)});var Le=we((tr,Y)=>{T();(function(){var r={initialize:function(){this._tasks=new Map},mutate:function(n,s){return e(this,"mutate",n,s)},measure:function(n,s){return e(this,"measure",n,s)},clear:function(n){var s=this._tasks,t=s.get(n);this.fastdom.clear(t),s.delete(n)}};function e(n,s,t,l){var i=n._tasks,a=n.fastdom,o,c=new Promise(function(p,h){o=a[s](function(){i.delete(c);try{p(l?t.call(l):t())}catch(u){h(u)}},l)});return i.set(c,o),c}(typeof define)[0]=="f"?define(function(){return r}):(typeof Y)[0]=="o"?Y.exports=r:window.fastdomPromised=r})()});T();function ze(r){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var s=Array.from(typeof r=="string"?[r]:r);s[s.length-1]=s[s.length-1].replace(/\r?\n([\t ]*)$/,"");var t=s.reduce(function(a,o){var c=o.match(/\n([\t ]+|(?!\s).)/g);return c?a.concat(c.map(function(p){var h,u;return(u=(h=p.match(/[\t ]/g))===null||h===void 0?void 0:h.length)!==null&&u!==void 0?u:0})):a},[]);if(t.length){var l=new RegExp(`
|
|
2
2
|
[ ]{`.concat(Math.min.apply(Math,t),"}"),"g");s=s.map(function(a){return a.replace(l,`
|
|
3
3
|
`)})}s[0]=s[0].replace(/^\r?\n/,"");var i=s[0];return e.forEach(function(a,o){var c=i.match(/(?:^|\n)( *)$/),p=c?c[1]:"",h=a;typeof a=="string"&&a.includes(`
|
|
4
4
|
`)&&(h=String(a).split(`
|
|
@@ -70,4 +70,4 @@ ${t.join(`
|
|
|
70
70
|
`).forEach((p,h)=>{h!==0&&(l++,t.push([])),p.split(" ").forEach(u=>{u=u.replace(/'/g,"'"),u&&t[l].push({content:u,type:o})})}):a.type==="strong"||a.type==="em"?a.tokens.forEach(c=>{i(c,a.type)}):a.type==="html"&&t[l].push({content:a.text,type:"normal"})}return x(i,"processNode"),s.forEach(a=>{a.type==="paragraph"?a.tokens?.forEach(o=>{i(o)}):a.type==="html"?t[l].push({content:a.text,type:"normal"}):t[l].push({content:a.raw,type:"normal"})}),t}x(Ye,"markdownToLines");function Je(r){return r?`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`:""}x(Je,"nonMarkdownToHTML");function et(r,{markdownAutoWrap:e}={}){let n=k.lexer(r);function s(t){return t.type==="text"?e===!1?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):t.type==="strong"?`<strong>${t.tokens?.map(s).join("")}</strong>`:t.type==="em"?`<em>${t.tokens?.map(s).join("")}</em>`:t.type==="paragraph"?`<p>${t.tokens?.map(s).join("")}</p>`:t.type==="space"?"":t.type==="html"?`${t.text}`:t.type==="escape"?t.text:(G.warn(`Unsupported markdown: ${t.type}`),t.raw)}return x(s,"output"),n.map(s).join("")}x(et,"markdownToHTML");function tt(r){return Intl.Segmenter?[...new Intl.Segmenter().segment(r)].map(e=>e.segment):[...r]}x(tt,"splitTextToChars");function rt(r,e){let n=tt(e.content);return de(r,[],n,e.type)}x(rt,"splitWordToFitWidth");function de(r,e,n,s){if(n.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[t,...l]=n,i=[...e,t];return r([{content:i.join(""),type:s}])?de(r,i,l,s):(e.length===0&&t&&(e.push(t),n.shift()),[{content:e.join(""),type:s},{content:n.join(""),type:s}])}x(de,"splitWordToFitWidthRecursion");function nt(r,e){if(r.some(({content:n})=>n.includes(`
|
|
71
71
|
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return W(r,e)}x(nt,"splitLineToFitWidth");function W(r,e,n=[],s=[]){if(r.length===0)return s.length>0&&n.push(s),n.length>0?n:[];let t="";r[0].content===" "&&(t=" ",r.shift());let l=r.shift()??{content:" ",type:"normal"},i=[...s];if(t!==""&&i.push({content:t,type:"normal"}),i.push(l),e(i))return W(r,e,n,i);if(s.length>0)n.push(s),r.unshift(l);else if(l.content){let[a,o]=rt(e,l);n.push([a]),o.content&&r.unshift(o)}return W(r,e,n)}x(W,"splitLineToFitWidthRecursion");function fe(r,e){e&&r.attr("style",e)}x(fe,"applyStyle");var Qe=16384;async function st(r,e,n,s,t=!1,l=Te()){let i=r.append("foreignObject");i.attr("width",`${Math.min(10*n,Qe)}px`),i.attr("height",`${Math.min(10*n,Qe)}px`);let a=i.append("xhtml:div"),o=U(e.label)?await $e(e.label.replace(Se.lineBreakRegex,`
|
|
72
72
|
`),l):Q(e.label,l),c=e.isNode?"nodeLabel":"edgeLabel",p=a.append("span");return p.html(o),fe(p,e.labelStyle),p.attr("class",`${c} ${s}`),fe(a,e.labelStyle),a.style("display","table-cell"),a.style("white-space","nowrap"),a.style("line-height","1.5"),n!==Number.POSITIVE_INFINITY&&(a.style("max-width",n+"px"),a.style("text-align","center")),a.attr("xmlns","http://www.w3.org/1999/xhtml"),t&&a.attr("class","labelBkg"),(await Xt.measure(()=>a.node().getBoundingClientRect())).width===n&&(a.style("display","table"),a.style("white-space","break-spaces"),a.style("width",n+"px")),i.node()}x(st,"addHtmlSpan");function Z(r,e,n,s=!1){let t=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em");return s&&t.attr("text-anchor","middle"),t}x(Z,"createTspan");function it(r,e,n){let s=r.append("text"),t=Z(s,1,e);D(t,n);let l=t.node().getComputedTextLength();return s.remove(),l}x(it,"computeWidthOfText");function Vt(r,e,n){let s=r.append("text"),t=Z(s,1,e);D(t,[{content:n,type:"normal"}]);let l=t.node()?.getBoundingClientRect();return l&&s.remove(),l}x(Vt,"computeDimensionOfText");function lt(r,e,n,s=!1,t=!1){let i=e.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),o=i.append("text").attr("y","-10.1");t&&o.attr("text-anchor","middle");let c=0;for(let p of n){let h=x(f=>it(i,1.1,f)<=r,"checkWidth"),u=h(p)?[p]:nt(p,h);for(let f of u){let g=Z(o,c,1.1,t);D(g,f),c++}}if(s){let p=o.node().getBBox(),h=2;return a.attr("x",p.x-h).attr("y",p.y-h).attr("width",p.width+2*h).attr("height",p.height+2*h),i.node()}else return o.node()}x(lt,"createFormattedText");function ge(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(n,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return n}})}x(ge,"decodeHTMLEntities");function D(r,e){r.text(""),e.forEach((n,s)=>{let t=r.append("tspan").attr("font-style",n.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",n.type==="strong"?"bold":"normal");s===0?t.text(ge(n.content)):t.text(" "+ge(n.content))})}x(D,"updateTextContentAndStyles");async function at(r,e={}){let n=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,l,i)=>(n.push((async()=>{let a=`${l}:${i}`;return await Re(a)?await ve(a,void 0,{class:"label-icon"}):`<i class='${Q(t,e).replace(":"," ")}'></i>`})()),t));let s=await Promise.all(n);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}x(at,"replaceIconSubstring");var vr=x(async(r,e="",{style:n="",isTitle:s=!1,classes:t="",useHtmlLabels:l=!0,markdown:i=!0,isNode:a=!0,width:o=200,addSvgBackground:c=!1}={},p)=>{if(G.debug("XYZ createText",e,n,s,t,l,a,"addSvgBackground: ",c),l){let h=i?et(e,p):Je(e),u=await at(K(h),p),f=e.replace(/\\\\/g,"\\"),g={isNode:a,label:U(e)?f:u,labelStyle:n.replace("fill:","color:")};return await st(r,g,o,t,c,p)}else{let h=K(e.replace(/<br\s*\/?>/g,"<br/>")),u=i?Ye(h.replace("<br>","<br/>"),p):Ve(h),f=lt(o,r,u,e?c:!1,!a);if(a){/stroke:/.exec(n)&&(n=n.replace("stroke:","lineColor:"));let g=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");v(f).attr("style",g)}else{let g=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");v(f).select("rect").attr("style",g.replace(/background:/g,"fill:"));let m=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");v(f).select("text").attr("style",m)}return s?v(f).selectAll("tspan.text-outer-tspan").classed("title-row",!0):v(f).selectAll("tspan.text-outer-tspan").classed("row",!0),f}},"createText");export{ze as a,Xt as b,Vt as c,vr as d};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-NQ2XP5EN.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as c}from"./chunk-SGL7WI35.js";import{h as e}from"./chunk-CXXG5KL5.js";import{a as s}from"./chunk-ITN3D7RJ.js";import{d as n}from"./chunk-SOAWGUAD.js";n();var v=s(t=>{let{securityLevel:m}=c(),o=e("body");if(m==="sandbox"){let r=e(`#i${t}`).node()?.contentDocument??document;o=e(r.body)}return o.select(`#${t}`)},"selectSvgElement");export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-P44J6WNO.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as o,b as c,c as l,d as i,e as u,g as v,r as m,w as h,y as R}from"./chunk-
|
|
1
|
+
import{a as o,b as c,c as l,d as i,e as u,g as v,r as m,w as h,y as R}from"./chunk-WL4ZMLPV.js";import{d}from"./chunk-SOAWGUAD.js";d();var p=class extends R{static{o(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},f=o(a=>{let e=a.slice(1,-1),r="";for(let t=0;t<e.length;t++){let n=e[t];if(n==="\\"&&t+1<e.length){t++;let s=e[t];switch(s){case"n":r+=`
|
|
2
2
|
`;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=s}continue}r+=n}return r},"decodeEscapedString"),C=class extends h{static{o(this,"RailroadValueConverter")}runConverter(a,e,r){let t=super.runConverter(a,e,r);if(a.name==="TITLE"&&typeof t=="string"){let n=t.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return f(n)}return t}runCustomConverter(a,e,r){if(a.name==="RR_STRING")return f(e)}},S={parser:{TokenBuilder:o(()=>new p,"TokenBuilder"),ValueConverter:o(()=>new C,"ValueConverter")}};function k(a=u){let e=i(l(a),v),r=i(c({shared:e}),m,S);return e.ServiceRegistry.register(r),{shared:e,Railroad:r}}o(k,"createRailroadServices");export{S as a,k as b};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-QBOSTM7Q.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r,b as l,c as s,d as o,e as n,g as u,v as i,w as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r,b as l,c as s,d as o,e as n,g as u,v as i,w as c}from"./chunk-WL4ZMLPV.js";import{d}from"./chunk-SOAWGUAD.js";d();var m=class extends c{static{r(this,"WardleyValueConverter")}runCustomConverter(t,e,a){if(t.name.toUpperCase()==="LINK_LABEL")return e.substring(1).trim()}},v={parser:{ValueConverter:r(()=>new m,"ValueConverter")}};function y(t=n){let e=o(s(t),u),a=o(l({shared:e}),i,v);return e.ServiceRegistry.register(a),{shared:e,Wardley:a}}r(y,"createWardleyServices");export{v as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-QKU4ZFG5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-UU7BHEBD.js";import{G as p}from"./chunk-SGL7WI35.js";import{h as o}from"./chunk-CXXG5KL5.js";import{a as i}from"./chunk-ITN3D7RJ.js";import{c as x,d}from"./chunk-SOAWGUAD.js";d();var l=x(c(),1);var m=i((r,t)=>{let e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(let s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),w=i((r,t)=>{let e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};m(r,e).lower()},"drawBackgroundRect"),k=i((r,t)=>{let e=t.text.replace(p," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);let a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),v=i((r,t,e,s)=>{let a=r.append("image");a.attr("x",t),a.attr("y",e);let n=(0,l.sanitizeUrl)(s);a.attr("xlink:href",n)},"drawImage"),E=i((r,t,e,s)=>{let a=r.append("use");a.attr("x",t),a.attr("y",e);let n=(0,l.sanitizeUrl)(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),R=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),T=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),u=i(()=>{let r=o(".mermaidTooltip");return r.empty()&&(r=o("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{m as a,w as b,k as c,v as d,E as e,R as f,T as g,u as h};
|
|
2
|
+
//# sourceMappingURL=chunk-RINQGKTH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,b as a,c as i,d as o,e as s,g as u,l as d,x as l,y as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e,b as a,c as i,d as o,e as s,g as u,l as d,x as l,y as c}from"./chunk-WL4ZMLPV.js";import{d as t}from"./chunk-SOAWGUAD.js";t();var m=class extends c{static{e(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},v={parser:{TokenBuilder:e(()=>new m,"TokenBuilder"),ValueConverter:e(()=>new l,"ValueConverter")}};function I(f=s){let r=o(i(f),u),n=o(a({shared:r}),d,v);return r.ServiceRegistry.register(n),{shared:r,Info:n}}e(I,"createInfoServices");export{v as a,I as b};
|
|
2
|
+
//# sourceMappingURL=chunk-RK4EOCHJ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-ITN3D7RJ.js";import{d as e}from"./chunk-SOAWGUAD.js";e();var i=o(()=>`
|
|
2
2
|
/* Font Awesome icon styling - consolidated */
|
|
3
3
|
.label-icon {
|
|
4
4
|
display: inline-block;
|
|
@@ -13,4 +13,4 @@ import{a as o}from"./chunk-LDXBIOBF.js";import{d as e}from"./chunk-R7TFKRNM.js";
|
|
|
13
13
|
stroke-width: revert;
|
|
14
14
|
}
|
|
15
15
|
`,"getIconStyles");export{i as a};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-S4X6ERXI.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,b as n,c as s,d as i,e as u,g as d,n as l,w as c,y as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e,b as n,c as s,d as i,e as u,g as d,n as l,w as c,y as m}from"./chunk-WL4ZMLPV.js";import{d as o}from"./chunk-SOAWGUAD.js";o();var v=class extends m{static{e(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},C=class extends c{static{e(this,"PieValueConverter")}runCustomConverter(t,r,a){if(t.name==="PIE_SECTION_LABEL")return r.replace(/"/g,"").trim()}},P={parser:{TokenBuilder:e(()=>new v,"TokenBuilder"),ValueConverter:e(()=>new C,"ValueConverter")}};function p(t=u){let r=i(s(t),d),a=i(n({shared:r}),l,P);return r.ServiceRegistry.register(a),{shared:r,Pie:a}}e(p,"createPieServices");export{P as a,p as b};
|
|
2
|
+
//# sourceMappingURL=chunk-SE57RN36.js.map
|