@softistx/pulsarix-widget 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/chunks/{abnfDiagram-XWFEHMT6.rxx9wyp3.js → abnfDiagram-XWFEHMT6.9n16jbeh.js} +1 -1
- package/dist/chunks/architecture-WOLXFQ4H.04w48nbq.js +1 -0
- package/dist/chunks/{architectureDiagram-CSQXQB3N.mrm0pgc0.js → architectureDiagram-CSQXQB3N.3c7xm6kb.js} +6 -6
- package/dist/chunks/{blockDiagram-BEDRHYPZ.f4dfpk7e.js → blockDiagram-BEDRHYPZ.b7d9kkgr.js} +2 -2
- package/dist/chunks/{c4Diagram-M2UUVUY5.rz43j1my.js → c4Diagram-M2UUVUY5.f883rrpb.js} +1 -1
- package/dist/chunks/{chat-markdown-BSu4FB_l.xgn4yj83.js → chat-markdown-BSu4FB_l.ngsfz1hc.js} +15 -15
- package/dist/chunks/{classDiagram-v2-KXABOMEV.m96cfcad.js → classDiagram-v2-KXABOMEV.6gcf0jbx.js} +1 -1
- package/dist/chunks/{cose-bilkent-JH36ORCC.zz2rwyw6.js → cose-bilkent-JH36ORCC.900yznpf.js} +1 -1
- package/dist/chunks/cynefin-EF2NZ3EQ.jp3enwcw.js +1 -0
- package/dist/chunks/{cynefinDiagram-NJNITYFG.az2k68wq.js → cynefinDiagram-NJNITYFG.7y6esx64.js} +1 -1
- package/dist/chunks/{dagre-KIHZ2IZ3.mgwg8bc4.js → dagre-KIHZ2IZ3.2xtjsjjb.js} +2 -2
- package/dist/chunks/{diagram-7YQZDPLS.x8fg6705.js → diagram-7YQZDPLS.5a4btxfh.js} +2 -2
- package/dist/chunks/{diagram-QBROCOUO.db60dsss.js → diagram-QBROCOUO.je55sz0f.js} +1 -1
- package/dist/chunks/{diagram-RJJCUUZO.a7e9w297.js → diagram-RJJCUUZO.19nj7yqv.js} +4 -4
- package/dist/chunks/{diagram-WERXNKYE.a04f53kd.js → diagram-WERXNKYE.h15fxc8e.js} +2 -2
- package/dist/chunks/{diagram-YHHI257C.v19jhmrh.js → diagram-YHHI257C.rjb588jf.js} +1 -1
- package/dist/chunks/{diagram-YR4HJLHV.c5e87gmw.js → diagram-YR4HJLHV.5cj602t4.js} +1 -1
- package/dist/chunks/{ebnfDiagram-N527522P.bjrxfgze.js → ebnfDiagram-N527522P.edah3bz7.js} +1 -1
- package/dist/chunks/{editor-shortcuts-dialog-Cz3T8435.5ve4nsaw.js → editor-shortcuts-dialog-Cz3T8435.kb0b5cra.js} +1 -1
- package/dist/chunks/{editor.yak1qktd.js → editor.ywaw7sz9.js} +3 -3
- package/dist/chunks/{elk-O5DQBFGD.1ydp0b7a.js → elk-O5DQBFGD.qnxmxe5n.js} +8 -8
- package/dist/chunks/{emoji-picker-00Bw2c2b.gzznrrz5.js → emoji-picker-00Bw2c2b.2985hrzf.js} +2 -2
- package/dist/chunks/{erDiagram-K3K3BIDK.g171ckq1.js → erDiagram-K3K3BIDK.9wh4fsa9.js} +1 -1
- package/dist/chunks/eventmodeling-K75KTNOO.xt3yb4h8.js +1 -0
- package/dist/chunks/{flow-diagram-DGZOc1z1.3gbgbm5m.js → flow-diagram-DGZOc1z1.1276ykn3.js} +4 -4
- package/dist/chunks/flowDiagram-Z6JWZHQI.3t1zqq9x.js +1 -0
- package/dist/chunks/{ganttDiagram-3PRQTZWP.3b9dh4nr.js → ganttDiagram-3PRQTZWP.4t4r8jy0.js} +2 -2
- package/dist/chunks/gitGraph-VSP46ZUC.v9e8d46n.js +1 -0
- package/dist/chunks/{gitGraphDiagram-VXDFKS5L.thyp7vsd.js → gitGraphDiagram-VXDFKS5L.x4pypqh9.js} +5 -5
- package/dist/chunks/{grid-E2QIVN74.entqjpa3.js → grid-E2QIVN74.8njsnft0.js} +1 -1
- package/dist/chunks/illustration-BcaGDjvB.ahkxq9mz.js +1 -0
- package/dist/chunks/{index.9n1y396a.js → index.0tz15aew.js} +1 -1
- package/dist/chunks/{index.35d4zbh8.js → index.0yskyw4t.js} +1 -1
- package/dist/chunks/{index.g2ba0pke.js → index.10k18jx6.js} +1 -1
- package/dist/chunks/{index.qr6a02kx.js → index.28jrnjz5.js} +2 -2
- package/dist/chunks/{index.w1516g8q.js → index.2j6fty9j.js} +3 -3
- package/dist/chunks/{index.5fcbba6e.js → index.3c95g5mh.js} +1 -1
- package/dist/chunks/{index.6pzexww5.js → index.3y8baz7q.js} +2 -2
- package/dist/chunks/{index.v02zf4zg.js → index.5n55ccv6.js} +1 -1
- package/dist/chunks/{index.zkx4ryzt.js → index.5sj251kq.js} +39 -39
- package/dist/chunks/{index.0g1t1pjx.js → index.a7m06kba.js} +1 -1
- package/dist/chunks/{index.8vaktk8x.js → index.f1bfv6bh.js} +1 -1
- package/dist/chunks/{index.8zg579vd.js → index.gzgeb5ax.js} +1 -1
- package/dist/chunks/{index.zkngte5k.js → index.mjp06b03.js} +1 -1
- package/dist/chunks/{index.cw97ff3b.js → index.mtrj86e8.js} +2 -2
- package/dist/chunks/{index.sw8gvntb.js → index.n53k66q8.js} +1 -1
- package/dist/chunks/{index.rkgfxpm3.js → index.pg4f51t3.js} +4 -4
- package/dist/chunks/{index.h1xzvasx.js → index.q39061xn.js} +1 -1
- package/dist/chunks/{index.w4emtsqw.js → index.tnx5y2zc.js} +1 -1
- package/dist/chunks/{index.a3njhfdd.js → index.znt11tbm.js} +1 -1
- package/dist/chunks/info-OHQRW6UA.atpz16bq.js +1 -0
- package/dist/chunks/{infoDiagram-EZ3ZOAHP.833fvq8n.js → infoDiagram-EZ3ZOAHP.mq5603w2.js} +1 -1
- package/dist/chunks/{ishikawaDiagram-S3EKX5GW.q3evaw24.js → ishikawaDiagram-S3EKX5GW.sx08qj3j.js} +1 -1
- package/dist/chunks/{journeyDiagram-POQNLL5X.9werrmpy.js → journeyDiagram-POQNLL5X.c3e37ws5.js} +1 -1
- package/dist/chunks/{kanban-definition-BH5XI6FM.f3ssda0m.js → kanban-definition-BH5XI6FM.6b85jkvt.js} +1 -1
- package/dist/chunks/{markup-color-chrome-ykGNUl8y.pcgw4znz.js → markup-color-chrome-ykGNUl8y.76asgnkk.js} +1 -1
- package/dist/chunks/{markup-custom-color-MM-HnrqY.sygnt3gs.js → markup-custom-color-MM-HnrqY.de5f5c2g.js} +1 -1
- package/dist/chunks/{mention-list-6cR5VSPa.x0x55xzp.js → mention-list-6cR5VSPa.r7r4w0q8.js} +1 -1
- package/dist/chunks/{mermaid.core.5cqab0cw.js → mermaid.core.kh4z9f22.js} +3 -3
- package/dist/chunks/{mindmap-definition-WVAN44T4.pjjxgse0.js → mindmap-definition-WVAN44T4.07nv313g.js} +1 -1
- package/dist/chunks/packet-JDAUHWVQ.dmnq0wwq.js +1 -0
- package/dist/chunks/{panel.2vwd6k3h.js → panel.zcphrx3e.js} +1 -1
- package/dist/chunks/{pegDiagram-D4NLKWP3.mdacgbzb.js → pegDiagram-D4NLKWP3.2mqrk2xy.js} +1 -1
- package/dist/chunks/pie-XZMESJXO.0rpk8mwa.js +1 -0
- package/dist/chunks/{pieDiagram-36ENHN4W.fb0d6a9w.js → pieDiagram-36ENHN4W.kx9bhkyj.js} +2 -2
- package/dist/chunks/{plated-illustration-pTqcYOQg.6b9fm4a7.js → plated-illustration-pTqcYOQg.a24pxzgf.js} +1 -1
- package/dist/chunks/{quadrantDiagram-ZQUDMS73.m5cgqatg.js → quadrantDiagram-ZQUDMS73.68vxq0vb.js} +1 -1
- package/dist/chunks/radar-ABXABTNO.xt7snfyy.js +1 -0
- package/dist/chunks/railroad-I3PHUGI6.bjssfxkf.js +1 -0
- package/dist/chunks/railroad-abnf-LNEFI6M7.mchc5mex.js +1 -0
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.wz1e7a1n.js +1 -0
- package/dist/chunks/railroad-peg-JR7BVNR7.xg4e4nsz.js +1 -0
- package/dist/chunks/{railroadDiagram-JIZHGYPL.w2e1k61e.js → railroadDiagram-JIZHGYPL.dnj3h1n0.js} +1 -1
- package/dist/chunks/{render-VIF2ZAQL.exs2rt60.js → render-VIF2ZAQL.cawqkxpf.js} +1 -1
- package/dist/chunks/{requirementDiagram-AXW2TVFA.mrxb120d.js → requirementDiagram-AXW2TVFA.5z51j1hn.js} +1 -1
- package/dist/chunks/{sankeyDiagram-FBCJTAIF.csj5n1sg.js → sankeyDiagram-FBCJTAIF.0dqdm7yd.js} +1 -1
- package/dist/chunks/{sequenceDiagram-3LA2ROMG.73qx1ab4.js → sequenceDiagram-3LA2ROMG.0fpdfwg0.js} +1 -1
- package/dist/chunks/{sizeCapture-2Q2CQKSF.vfe8maj3.js → sizeCapture-2Q2CQKSF.gverqc02.js} +1 -1
- package/dist/chunks/{stateDiagram-v2-ATKHQDJO.h4grfmy4.js → stateDiagram-v2-ATKHQDJO.56dj904f.js} +1 -1
- package/dist/chunks/{swimlanes-YQL5WMAO.e2y8jam1.js → swimlanes-YQL5WMAO.frj4npw4.js} +1 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.834hahmm.js +8 -0
- package/dist/chunks/{timeline-definition-7Z437IG3.2zxa6hz5.js → timeline-definition-7Z437IG3.v99ghwdb.js} +1 -1
- package/dist/chunks/treeView-D4JQ5SDB.tbqcaq5q.js +1 -0
- package/dist/chunks/treemap-SAJKECNS.jgfv37a0.js +1 -0
- package/dist/chunks/{usecaseDiagram-RDK6N6HP.61cdyktj.js → usecaseDiagram-RDK6N6HP.b6317ne8.js} +1 -1
- package/dist/chunks/{vennDiagram-SHRQU5PJ.4tspw3rs.js → vennDiagram-SHRQU5PJ.adr331gc.js} +5 -5
- package/dist/chunks/wardley-7MLQ67FV.4653yv6a.js +1 -0
- package/dist/chunks/{wardleyDiagram-F3OXNVQS.q2p8tshx.js → wardleyDiagram-F3OXNVQS.5tt3knhg.js} +4 -4
- package/dist/chunks/{xychartDiagram-GDYJKCDI.69desp9j.js → xychartDiagram-GDYJKCDI.dqs1thzc.js} +4 -4
- package/dist/index.js +12 -12
- package/docs/integration.md +1 -1
- package/package.json +1 -1
- package/dist/chunks/architecture-WOLXFQ4H.hwrxbct0.js +0 -1
- package/dist/chunks/cynefin-EF2NZ3EQ.y29bn1cz.js +0 -1
- package/dist/chunks/eventmodeling-K75KTNOO.46qfxqj7.js +0 -1
- package/dist/chunks/flowDiagram-Z6JWZHQI.f0eaj70g.js +0 -1
- package/dist/chunks/gitGraph-VSP46ZUC.swware7n.js +0 -1
- package/dist/chunks/illustration-BcaGDjvB.1q9xtmyq.js +0 -1
- package/dist/chunks/info-OHQRW6UA.1er9b42t.js +0 -1
- package/dist/chunks/packet-JDAUHWVQ.t5jwb2rb.js +0 -1
- package/dist/chunks/pie-XZMESJXO.pe88zesw.js +0 -1
- package/dist/chunks/radar-ABXABTNO.jtbddwfq.js +0 -1
- package/dist/chunks/railroad-I3PHUGI6.kvyt0f9s.js +0 -1
- package/dist/chunks/railroad-abnf-LNEFI6M7.ybx0vspg.js +0 -1
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.yx4c4enn.js +0 -1
- package/dist/chunks/railroad-peg-JR7BVNR7.mb71eyqe.js +0 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.dtthssd5.js +0 -8
- package/dist/chunks/treeView-D4JQ5SDB.3kgztv30.js +0 -1
- package/dist/chunks/treemap-SAJKECNS.xj47e2ae.js +0 -1
- package/dist/chunks/wardley-7MLQ67FV.pckbr6zr.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{No,vc}from"./index.0tz15aew.js";import"./index.pg4f51t3.js";export{vc as Illustration,No as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_,he,ie,Ha,H,w,r,ve,la,si,ca,Qr,Zr,Hs,Us,Uo,Ci,zl,Si,qo,jo,ba}from"./index.
|
|
1
|
+
import{_,he,ie,Ha,H,w,r,ve,la,si,ca,Qr,Zr,Hs,Us,Uo,Ci,zl,Si,qo,jo,ba}from"./index.pg4f51t3.js";var I=Symbol("glyphs");function x(e){let t=Math.trunc(e)*2654435761>>>0||1;return()=>{t=t+1831565813|0;let a=Math.imul(t^t>>>15,1|t);return a=a+Math.imul(a^a>>>7,61|a)^a,((a^a>>>14)>>>0)/4294967296}}var P={2:[[[40,42,30],[204,50,26]],[[206,48,32],[36,138,28]],[[44,48,28],[200,104,32]]],3:[[[40,42,30],[204,50,26],[202,138,28]],[[198,38,30],[40,76,26],[192,146,26]],[[44,148,28],[198,44,30],[208,142,24]],[[38,130,30],[122,22,24],[208,104,28]],[[202,36,28],[34,100,28],[122,154,22]],[[34,56,28],[208,60,28],[120,156,22]]],4:[[[40,42,30],[204,50,26],[202,138,28],[38,140,24]],[[36,44,26],[122,24,22],[206,64,26],[204,142,26]]]},C=[7,6,4.5,4],R=[[[88,26],[172,160],[214,96],[24,92]],[[170,24],[60,160],[26,100],[220,120]],[[30,26],[210,24],[150,162],[100,164]],[[120,170],[70,26],[222,74],[18,70]]],G=(e,t,a)=>`M${e} ${t-a}Q${e} ${t} ${e+a} ${t}Q${e} ${t} ${e} ${t+a}Q${e} ${t} ${e-a} ${t}Q${e} ${t} ${e} ${t-a}Z`;function D(e){let t=e.satellites??[];if(t.length>4)throw new ve("count",`${t.length} satellites: at most 4 are drawn.`);let a=e.sparkles??4;if(!(a>=0&&a<=4))throw new ve("count",`${a} sparkles: use 0 to 4.`);let n=e.layout??0;if(!(Number.isInteger(n)&&n>=0))throw new ve("count","The layout is a whole number, 0 or more.");let s=P[Math.min(4,Math.max(2,t.length))];return{sats:t,sparkles:a,places:s[(n>>2)%s.length],sparks:R[n&3]}}var Q=64,i=(e,t,a)=>a?{tag:e,attrs:t,children:a}:{tag:e,attrs:t};function U(e,t,a,n,s,o,{styles:c,rand:d,spriteBase:m,mapIcon:p,glyphs:l}){let u=typeof e==="string"?{name:e}:e;if(!ca(u.name))throw new ve("name",`${JSON.stringify(u.name)} is not an icon name: use lowercase words joined by dashes ("graduation-cap").`);let g=l&&Object.hasOwn(l,u.name)?l[u.name]:void 0;if(g){let v=n-o/2,S=s-o/2,{d:O,detail:M}=g,L=Math.round(o/Q*1000)/1000;return i("g",{id:t,class:a},[i("rect",{class:"ic-box",fill:"none",x:v,y:S,width:o,height:o}),i("g",{transform:`translate(${v} ${S}) scale(${L})`},[i("path",{d:M,fill:"currentColor","fill-opacity":0.4}),i("path",{d:O,fill:"currentColor"})])])}let y=c[c.length>1?Math.floor(d()*c.length):0],[b]=ba({family:u.family??y.family,type:u.type??y.type}),k={name:u.name,...b},h=n-o/2,f=s-o/2;return i("g",{id:t,class:a},[i("rect",{class:"ic-box",fill:"none",x:h,y:f,width:o,height:o}),i("use",{href:si(p?p(k):k,m),x:h,y:f,width:o,height:o})])}function q(e,t){let a=(typeof e==="string"?t?.(e):e?.d)??"M124 62A62 62 0 1 1 0 62A62 62 0 1 1 124 62Z";if(!/^[\d\sMLHVCSQTAZmlhvcsqtaz.,+eE-]*$/.test(a))throw new ve("name","A plate path holds path commands and numbers only.");return a}var E={empty:["cookie-9","primary",0,"box-open","inbox","folder-open"],"no-results":["soft-burst","secondary",0,"magnifying-glass","file-circle-question","sparkles"],"not-found":["flower","tertiary",0,"compass","map","location-dot","ghost"],error:["gem","error",0,"triangle-exclamation","server","bug","gear"],offline:["clover-4","warning",0,"wifi-slash","cloud-slash","plug-circle-xmark"],success:["sunny","success",0,"circle-check","party-horn","trophy"],welcome:["squircle","primary",0,"hand-wave","rocket","lightbulb","star"],forbidden:["gem","error",2,"lock-keyhole","ban","shield-halved","key"],maintenance:["triangle","warning",20,"screwdriver-wrench","gear","helmet-safety","traffic-cone"],invitation:["flower","primary",17,"envelope-open-text","user-plus","paper-plane","handshake"],"sign-in":["squircle","tertiary",15,"door-open","key","user","lock"],"empty-inbox":["oval","secondary",4,"envelope-open","inbox","circle-check","bell"]},N=Object.keys(E);function Mo(e,{idPrefix:t,spriteBase:a=la,plates:n,mapIcon:s}){if(!/^[A-Za-z][\w-]*$/.test(t))throw new ve("name",`The id prefix ${JSON.stringify(t)} is not safe: letters, digits, "_" and "-", a letter first.`);let{sats:o,sparkles:c,places:d,sparks:m}=D(e),p=ba(e.iconStyle),l=x(e.seed??0),u=(h)=>`${t}-${h}`,g=(h,f,v,S,O,M)=>U(h,u(f),v,S,O,M,{styles:p,rand:l,spriteBase:a,mapIcon:s,glyphs:e.glyphs}),y=B(u("plate"),q(e.plate,n)),b=o.flatMap((h,f)=>{let[v,S,O]=d[f];return[i("circle",{class:`ill-satbg ill-s${f}`,cx:v,cy:S,r:Math.round(O*78)/100}),g(h,`sat${f}`,`ill-sat ill-s${f}`,v,S,O)]}),k=g(e.hero,"hero","ill-hero",120,90,76);return i("svg",{id:u("root"),class:`ill ill-${e.tone??"primary"} ill-duo-${e.duotone??"opacity"}`,viewBox:"0 0 240 180",preserveAspectRatio:"xMidYMid meet","aria-hidden":"true",focusable:"false"},[...y,...b,k,...J(m,c)])}var B=(e,t)=>[i("g",{transform:"translate(58 28)"},[i("path",{id:e,class:"ill-plate",d:t})]),i("circle",{class:"ill-ring",cx:120,cy:90,r:74,fill:"none","stroke-dasharray":"2 5"})],J=(e,t)=>Array.from({length:t},(a,n)=>{let[s,o]=e[n];return i("path",{class:`ill-spark ill-k${n%2}`,d:G(s,o,C[n])})});function A(e,t={},a=E){if(!Object.hasOwn(a,e))throw new ve("name",`${JSON.stringify(e)} is not a scene of the table: use one of its ids.`);let[n,s,o,c,...d]=a[e],m=a[I];return{hero:c,satellites:d,plate:n,tone:s,layout:o,...m?{glyphs:m}:{},...t}}var Y=/^(aria|data)-/,Z=(e)=>e==="class"?"className":Y.test(e)?e:e.replace(/-([a-z])/g,(t,a)=>a.toUpperCase()),No=Ha(function e({node:t}){let a=Object.fromEntries(Object.entries(t.attrs).map(([n,s])=>[Z(n),s]));return ie(t.tag,a,...(t.children??[]).map((n,s)=>r(e,{node:n},s)))});function K(e,t,a){let n=Uo(),s=a??(V(e)?void 0:zl(n,e)),o=Hs(),c=Us(),d=`ill${H().replace(/[^\w-]/g,"-")}`,m=JSON.stringify([t,Ci(n,e),n?.iconStyle]);return{built:w(()=>{let p=Object.fromEntries(Object.entries(t).filter(([,l])=>l!==void 0));try{let l=A(e,{...n?.iconStyle===void 0?{}:{iconStyle:n.iconStyle},...Ci(n,e),...p},s);return{spec:l,flat:Mo(l,{idPrefix:d,spriteBase:o,...c==="free"?{mapIcon:Qr}:{}})}}catch(l){if(!(l instanceof ve))throw l;return F(`Illustration: ${l.message} Drawing the built-in art instead.`),null}},[e,s,m,d,o,c]),idPrefix:d,base:o,edition:c}}var j=new Set;function F(e){Zr()||j.has(e)||(j.add(e),console.warn(e))}var V=(e)=>N.includes(e);function T({kind:e}){return r(Si,{kind:e,"data-fallback":"",className:"h-full w-full"})}var X=qo("plated-illustration",async()=>(await (_("a24pxzgf"),import("./plated-illustration-pTqcYOQg.a24pxzgf.js"))).default,T);function vc({scene:e,scenes:t,size:a="md",title:n,animated:s,monochrome:o,hero:c,satellites:d,iconStyle:m,tone:p,duotone:l,className:u,...g}){let y=jo[e]??"empty",{built:b,idPrefix:k,base:h,edition:f}=K(e,{hero:c,satellites:d,iconStyle:m,tone:p,duotone:l},t);return r("div",{"data-slot":"illustration",...g,...n?{role:"img","aria-label":n}:{"aria-hidden":!0},"data-scene":e,"data-size":a,"data-animated":s?"":void 0,"data-monochrome":o?"":void 0,className:u,children:b?r(he,{fallback:r(No,{node:b.flat}),children:r(X,{spec:b.spec,idPrefix:k,base:h,edition:f,kind:y})}):r(T,{kind:y})})}export{Mo,No,vc};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,n,Ie,k,q,j,A,u,X}from"./index.
|
|
1
|
+
import{e,n,Ie,k,q,j,A,u,X}from"./index.5sj251kq.js";var M="",O="",D="",E=[],b=new Map,S=e((t)=>q(t,u()),"sanitizeText"),R=e((t)=>{switch(t.type){case"terminal":return{...t,value:S(t.value)};case"nonterminal":return{...t,name:S(t.name)};case"sequence":return{...t,elements:t.elements.map(R)};case"choice":return{...t,alternatives:t.alternatives.map(R)};case"optional":return{...t,element:R(t.element)};case"repetition":return{...t,element:R(t.element),separator:t.separator?R(t.separator):void 0};case"special":return{...t,text:S(t.text)}}},"sanitizeAstNode"),G=e(()=>{M="",O="",D="",E.length=0,b.clear(),A(),n.debug("[Railroad] Database cleared")},"clear"),Y=e((t)=>{M=S(t),n.debug("[Railroad] Title set:",t)},"setTitle"),P=e(()=>M,"getTitle"),U=e((t)=>{let a={...t,name:S(t.name),definition:R(t.definition),comment:t.comment?S(t.comment):void 0};if(n.debug("[Railroad] Adding rule:",a.name),b.has(a.name))n.warn(`[Railroad] Rule '${a.name}' is already defined. Overwriting.`);E.push(a),b.set(a.name,a)},"addRule"),K=e(()=>E,"getRules"),J=e((t)=>b.get(t),"getRule"),Q=e((t)=>{O=S(t).replace(/^\s+/g,""),n.debug("[Railroad] Accessibility title set:",t)},"setAccTitle"),Z=e(()=>O,"getAccTitle"),V=e((t)=>{D=S(t).replace(/\n\s+/g,`
|
|
2
2
|
`),n.debug("[Railroad] Accessibility description set:",t)},"setAccDescription"),ee=e(()=>D,"getAccDescription"),te=Y,re=P,se={clear:G,setTitle:Y,getTitle:P,addRule:U,getRules:K,getRule:J,setAccTitle:Q,getAccTitle:Z,setAccDescription:V,getAccDescription:ee,setDiagramTitle:te,getDiagramTitle:re},T={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ie=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ne=/^[\w "',.-]+$/,ae=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),L=e((t)=>{if(!t)return!1;return Object.keys(t).every((a)=>a==="railroad"||ae.has(a))},"isRailroadStyleOptions"),oe=e((t)=>{if(!t)return{};if("railroad"in t&&t.railroad)return t.railroad;return L(t)?t:{}},"extractRailroadOverrides"),le=e((t)=>{if(!t||L(t))return{};let{railroad:a,svgId:l,theme:i,look:r,...o}=t;return o},"extractThemeOverrides"),p=e((t,a)=>{if(typeof t!=="string")return a;let l=t.trim();return ie.test(l)?l:a},"sanitizeColorValue"),I=e((t,a)=>{if(typeof t!=="string")return a;let l=t.trim();return ne.test(l)?l:a},"sanitizeFontFamilyValue"),y=e((t,a)=>{let l=typeof t==="number"?t:typeof t==="string"?Number.parseFloat(t):Number.NaN;return Number.isFinite(l)&&l>=0?l:a},"sanitizeNumberValue"),de=e((t)=>{let a=typeof t==="number"?t:typeof t==="string"?Number.parseFloat(t):Number.NaN;return Number.isFinite(a)&&a>0?a:void 0},"parseThemeFontSize"),ce=e((t)=>{let a=I(t.fontFamily,T.fontFamily),l=de(t.fontSize)??T.fontSize;return{...T,fontFamily:a,fontSize:l,terminalFill:p(t.secondBkg??t.secondaryColor,T.terminalFill),terminalStroke:p(t.secondaryBorderColor??t.lineColor,T.terminalStroke),terminalTextColor:p(t.secondaryTextColor??t.textColor,T.terminalTextColor),nonTerminalFill:p(t.mainBkg??t.background,T.nonTerminalFill),nonTerminalStroke:p(t.primaryBorderColor??t.lineColor,T.nonTerminalStroke),nonTerminalTextColor:p(t.primaryTextColor??t.textColor,T.nonTerminalTextColor),lineColor:p(t.lineColor,T.lineColor),markerFill:p(t.lineColor,T.markerFill),commentFill:p(t.labelBackground??t.tertiaryColor,T.commentFill),commentStroke:p(t.tertiaryBorderColor??t.lineColor,T.commentStroke),commentTextColor:p(t.tertiaryTextColor??t.textColor,T.commentTextColor),specialFill:p(t.tertiaryColor??t.secondaryColor,T.specialFill),specialStroke:p(t.tertiaryBorderColor??t.secondaryBorderColor,T.specialStroke),ruleNameColor:p(t.titleColor??t.textColor,T.ruleNameColor)}},"buildThemeDefaults"),W=e((t)=>{let a=k(),l={...Ie(),...a.themeVariables??{},...le(t)},i=ce(l),r={...a.railroad??{},...oe(t)};return{compactMode:r.compactMode??i.compactMode,padding:y(r.padding,i.padding),verticalSeparation:y(r.verticalSeparation,i.verticalSeparation),horizontalSeparation:y(r.horizontalSeparation,i.horizontalSeparation),arcRadius:y(r.arcRadius,i.arcRadius),fontSize:y(r.fontSize,i.fontSize),fontFamily:I(r.fontFamily,i.fontFamily),terminalFill:p(r.terminalFill,i.terminalFill),terminalStroke:p(r.terminalStroke,i.terminalStroke),terminalTextColor:p(r.terminalTextColor,i.terminalTextColor),nonTerminalFill:p(r.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:p(r.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:p(r.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:p(r.lineColor,i.lineColor),strokeWidth:y(r.strokeWidth,i.strokeWidth),markerFill:p(r.markerFill,i.markerFill),commentFill:p(r.commentFill,i.commentFill),commentStroke:p(r.commentStroke,i.commentStroke),commentTextColor:p(r.commentTextColor,i.commentTextColor),specialFill:p(r.specialFill,i.specialFill),specialStroke:p(r.specialStroke,i.specialStroke),ruleNameColor:p(r.ruleNameColor,i.ruleNameColor),showMarkers:r.showMarkers??i.showMarkers,markerRadius:y(r.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),qt=e((t)=>{let{fontFamily:a,fontSize:l,terminalFill:i,terminalStroke:r,terminalTextColor:o,nonTerminalFill:g,nonTerminalStroke:c,nonTerminalTextColor:s,lineColor:f,strokeWidth:h,markerFill:m,commentFill:C,commentStroke:d,commentTextColor:x,specialFill:z,specialStroke:F,ruleNameColor:v}=W(t);return`
|
|
3
3
|
.railroad-diagram {
|
|
4
4
|
font-family: ${a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e,xe,Xr}from"./index.
|
|
1
|
+
import{e,xe,Xr}from"./index.5sj251kq.js";var O=0.00001,X=2,Y=0.6;function Rt(t){if(t===!1)return!1;return t==="gap"?"gap":"arc"}e(Rt,"normalizeLineHops");var w=0.000001;function P(t){let n=[];for(let c=0;c<t.length-1;c++)n.push({a:t[c],b:t[c+1]});return n}e(P,"buildSegmentList");function v(t,n,c,a){let i=n.x-t.x,r=n.y-t.y,d=a.x-c.x,l=a.y-c.y,p=i*l-r*d;if(p===0)return null;let s=c.x-t.x,o=c.y-t.y,u=(s*l-o*d)/p,f=(s*r-o*i)/p;if(u<=w||u>=1-w||f<=w||f>=1-w)return null;return{point:{x:t.x+u*i,y:t.y+u*r},tA:u,tB:f}}e(v,"segmentIntersection");function N(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}e(N,"isHorizontalSeg");function B(t,n,c){if(t.curve!=="rounded")return!1;let a=t.points,i=a[n],r=a[n+1];if(!i||!r)return!1;let d=Math.hypot(r.x-i.x,r.y-i.y),l=c*d,p=Xr(t.cornerRadius),s=n>0?R(a[n-1],i,r,p):null;if(s&&l<s.cutLen)return!0;let o=n+2<a.length?R(i,r,a[n+2],p):null;return o!==null&&d-l<o.cutLen}e(B,"crossingSitsInRoundedCorner");function C(t){let n=[];for(let c=0;c<t.length;c++){let a=t[c],i=P(a.points);for(let r=c+1;r<t.length;r++){let d=t[r],l=P(d.points);for(let[p,s]of i.entries())for(let[o,u]of l.entries()){let f=v(s.a,s.b,u.a,u.b);if(!f)continue;if(B(a,p,f.tA)||B(d,o,f.tB))continue;let y=N(s),E=N(u);if(y!==E?y:!1)n.push({jumpEdgeId:a.id,otherEdgeId:d.id,segIndex:p,t:f.tA,point:f.point});else n.push({jumpEdgeId:d.id,otherEdgeId:a.id,segIndex:o,t:f.tB,point:f.point})}}}return n}e(C,"findEdgeIntersections");function b(t){let n=Math.round(t*1000)/1000;return Number.isInteger(n)?`${n}`:`${n}`}e(b,"fmt");function I(t){return`${b(t.x)},${b(t.y)}`}e(I,"pointToString");function H(t){let n=t.b.x-t.a.x,c=t.b.y-t.a.y;if(Math.abs(n)>=Math.abs(c))return n>=0?1:0;return c>=0?1:0}e(H,"getArcSweepFlag");function _(t,n){if(t.length<2)return t.map((r)=>({...r}));let c=t.map((r)=>({...r})),a=n.arrowTypeStart&&xe[n.arrowTypeStart];if(a){let r=t[0],d=t[1],l=Math.atan2(d.y-r.y,d.x-r.x);c[0].x=r.x+a*Math.cos(l),c[0].y=r.y+a*Math.sin(l)}let i=n.arrowTypeEnd&&xe[n.arrowTypeEnd];if(i){let r=t.length,d=t[r-2],l=t[r-1],p=Math.atan2(l.y-d.y,l.x-d.x);c[r-1].x=l.x-i*Math.cos(p),c[r-1].y=l.y-i*Math.sin(p)}return c}e(_,"applyMarkerOffsets");function D(t,n,c,a,i){let r=t.point.x,d=t.point.y,l={x:r-n*t.r,y:d-c*t.r},p={x:r+n*t.r,y:d+c*t.r},s=[`L${I(l)}`];if(i==="arc")s.push(`A${b(t.r)},${b(t.r)} 0 0 ${a} ${I(p)}`);else s.push(`M${I(p)}`);return s}e(D,"emitJump");function R(t,n,c,a){let i=n.x-t.x,r=n.y-t.y,d=c.x-n.x,l=c.y-n.y,p=Math.hypot(i,r),s=Math.hypot(d,l);if(p<O||s<O)return null;let o=i/p,u=r/p,f=d/s,y=l/s,E=o*f+u*y,S=Math.max(-1,Math.min(1,E)),M=Math.acos(S);if(M<O||Math.abs(Math.PI-M)<O)return null;let g=Math.min(a/Math.sin(M/2),p/2,s/2);return{startX:n.x-o*g,startY:n.y-u*g,endX:n.x+f*g,endY:n.y+y*g,ctrlX:n.x,ctrlY:n.y,cutLen:g}}e(R,"computeRoundedCorner");function k(t,n,c){let a=t.points;if(a.length<2)return"";let i=_(a,t),r=t.curve==="rounded",d=Xr(t.cornerRadius),l=P(i),p=new Map;for(let o of n){let u=l[o.segIndex];if(!u)continue;let f=Math.hypot(u.b.x-u.a.x,u.b.y-u.a.y),y=p.get(o.segIndex)??[];y.push({t:o.t,point:o.point,d:o.t*f,r:c.jumpRadius}),p.set(o.segIndex,y)}let s=[`M${I(i[0])}`];for(let o=0;o<l.length;o++){let u=l[o],f=Math.hypot(u.b.x-u.a.x,u.b.y-u.a.y),y=f===0?0:(u.b.x-u.a.x)/f,E=f===0?0:(u.b.y-u.a.y)/f,S=H(u),M=0;if(r&&o>0){let h=R(i[o-1],i[o],i[o+1]??i[o],d);if(h)M=h.cutLen}let g=f,m=null;if(r&&o<l.length-1){if(m=R(i[o],i[o+1],i[o+2]??i[o+1],d),m)g=f-m.cutLen}let A=c.jumpRadius*Y,x=[...p.get(o)??[]].sort((h,L)=>h.t-L.t).filter((h)=>{let L=Math.min(h.d-M,g-h.d)-X;return h.r=Math.min(h.r,L),h.r>=A});for(let h=0;h<x.length-1;h++){let L=x[h+1].d-x[h].d;if(x[h].r+x[h+1].r>L){let T=L/2;x[h].r=Math.min(x[h].r,T),x[h+1].r=Math.min(x[h+1].r,T)}}for(let h of x){if(h.r<A)continue;s.push(...D(h,y,E,S,c.jumpStyle))}if(r&&m)s.push(`L${b(m.startX)},${b(m.startY)}`),s.push(`Q${b(m.ctrlX)},${b(m.ctrlY)} ${b(m.endX)},${b(m.endY)}`);else s.push(`L${I(u.b)}`)}return s.join(" ")}e(k,"rewriteEdgePath");function J(t){return/^[\d\s+,.LMelm-]*$/.test(t)}e(J,"isStraightPath");function j(t){if(!t)return!0;return t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter"}e(j,"curveSupportsLineHops");function z(t){if(!t)return null;try{let n=typeof atob==="function"?atob(t):Buffer.from(t,"base64").toString(),c=JSON.parse(n);if(!Array.isArray(c))return null;let a=[];for(let i of c)if(i&&typeof i.x==="number"&&typeof i.y==="number")a.push({x:i.x,y:i.y});return a.length>=2?a:null}catch{return null}}e(z,"decodeDataPoints");function Mt(t,n,c){if(!c.enabled)return;let a=t.node();if(!a)return;let i=new Map;for(let s of n)i.set(s.id,s);let r=new Map;for(let s of a.querySelectorAll("path[data-id]")){let o=s.getAttribute("data-id");if(o!==null&&!r.has(o))r.set(o,s)}let d=[];for(let s of n){let o=r.get(s.id);if(!o)continue;let f=z(o.getAttribute("data-points"))??s.points;d.push({...s,points:f})}let l=C(d);if(l.length===0)return;let p=new Map;for(let s of l){let o=p.get(s.jumpEdgeId)??[];o.push(s),p.set(s.jumpEdgeId,o)}for(let s of d){let o=p.get(s.id);if(!o||o.length===0)continue;let f=i.get(s.id)?.curve;if(f!==void 0&&!j(f))continue;let y=r.get(s.id);if(!y)continue;if(f===void 0){let A=y.getAttribute("d")??"";if(!J(A))continue}let E=y.getAttribute("style")??"",S=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(E),M=S?Number.parseFloat(S[1]):null,g=S?Number.parseFloat(S[2]):null,m=k(s,o,c);if(y.setAttribute("d",m),M!==null&&g!==null&&typeof y.getTotalLength==="function"){let A=y.getTotalLength(),x=Math.max(0,A-M-g),h=`0 ${M} ${x} ${g}`,L=E.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${h};`).replace(/;\s*;+/g,";");y.setAttribute("style",L)}}}e(Mt,"applyLineJumpsToSvg");
|
|
2
2
|
export{Rt,Mt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e,n,k,u,F,z,Pt,Bt,Tl,Ct,mr,Cl,
|
|
2
|
-
export{Mi,Ni,
|
|
1
|
+
import{e,n,k,u,F,z,Pt,Bt,Tl,Ct,mr,Cl,vn,ze,Sl,_s,Ft,Ls,gr,xn}from"./index.5sj251kq.js";import{le}from"./index.n53k66q8.js";import{_}from"./index.pg4f51t3.js";function Mi(t,{edgePathsClass:s="edges edgePaths"}={}){let r=t.insert("g").attr("class","root"),o=r.insert("g").attr("class","clusters"),i=r.insert("g").attr("class",s),a=r.insert("g").attr("class","edgeLabels"),l=r.insert("g").attr("class","nodes");return{clusters:o,edgePaths:i,edgeLabels:a,nodes:l,rootGroups:r}}e(Mi,"createLayoutElementGroups");async function L(t,s,r){if(s.label){let{shapeSvg:o,bbox:i}=await z(t,r===void 0?s:{...s,width:r});s.labelBBox={width:i.width,height:i.height},o.remove()}else s.labelBBox={width:0,height:0}}e(L,"measureGroupLabel");async function Ni(t,s,r){let o=await Bt(t,s,r),i=o.node()?.getBBox()??{width:0,height:0};return s.width=i.width,s.height=i.height,o}e(Ni,"insertMeasuredNode");function x(t,s,r){let o=t,i=new Set;while(o){if(o.dir)return o.dir;if(!o.parentId||i.has(o.parentId))break;i.add(o.parentId),o=s.get(o.parentId)}return r}e(x,"resolveNodeDir");async function D(t,s,r={}){let o=new le({multigraph:!0,compound:!0}),i=[...s.edges],a=u(),l=Mi(t),{edgeLabels:d,nodes:c}=l,g=new Map,b=new Map(s.nodes.map((f)=>[f.id,f])),E=s.direction,h=t.node()!=null;await Promise.all(s.nodes.map(async(f)=>{if(f.isGroup){if(h){let w=r.unwrapGroupLabels&&f.labelType!=="markdown";await L(c,f,w?Number.POSITIVE_INFINITY:void 0)}o.setNode(f.id,{...f})}else{if(h){let w=await Ni(c,f,{config:a,dir:x(f,b,E)});g.set(f.id,w)}o.setNode(f.id,{...f})}}));for(let f of i){if(h&&_s(f))await Ft(d,f);if(o.setEdge(f.start,f.end,{...f},f.id),!s.edges.some((v)=>v.id===f.id))s.edges.push(f)}if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:f}=await (_("gverqc02"),import("./sizeCapture-2Q2CQKSF.gverqc02.js"));f(t,s)}return{graph:o,groups:l,nodeElements:g}}e(D,"createGraphWithElements");var Z=new Map,m=new Map,S=new Map,q=e(()=>{m.clear(),S.clear(),Z.clear()},"clear"),p=e((t,s)=>{let r=m.get(s)||[];return n.trace("In isDescendant",s," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),K=e((t,s)=>{let r=m.get(s)||[];if(n.info("Descendants of ",s," is ",r),n.info("Edge is ",t),t.v===s||t.w===s)return!1;if(!r)return n.debug("Tilt, ",s,",not in descendants"),!1;return r.includes(t.v)||p(t.v,s)||p(t.w,s)||r.includes(t.w)},"edgeInCluster"),R=e((t,s,r,o)=>{n.debug("Copying children of ",t,"root",o,"data",s.node(t),o);let i=s.children(t)||[];if(t!==o)i.push(t);n.debug("Copying (nodes) clusterId",t,"nodes",i),i.forEach((a)=>{if(s.children(a).length>0)R(a,s,r,o);else{let l=s.node(a);if(n.info("cp ",a," to ",o," with parent ",t),r.setNode(a,l),o!==s.parent(a))n.debug("Setting parent",a,s.parent(a)),r.setParent(a,s.parent(a));if(t!==o&&a!==t)n.debug("Setting parent",a,t),r.setParent(a,t);else n.info("In copy ",t,"root",o,"data",s.node(t),o),n.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==o,"node!==clusterId",a!==t);let d=s.edges(a);n.debug("Copying Edges",d),d.forEach((c)=>{n.info("Edge",c);let g=s.edge(c.v,c.w,c.name);n.info("Edge data",g,o);try{if(K(c,o))n.info("Copying as ",c.v,c.w,g,c.name),r.setEdge(c.v,c.w,g,c.name),n.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]));else n.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",o," clusterId:",t)}catch(b){n.error(b)}})}n.debug("Removing node",a),s.removeNode(a)})},"copy"),T=e((t,s)=>{let r=s.children(t),o=[...r];for(let i of r)S.set(i,t),o=[...o,...T(i,s)];return o},"extractDescendants"),Q=e((t,s,r)=>{let o=t.edges().filter((c)=>c.v===s||c.w===s),i=t.edges().filter((c)=>c.v===r||c.w===r),a=o.map((c)=>({v:c.v===s?r:c.v,w:c.w===s?s:c.w})),l=i.map((c)=>({v:c.v,w:c.w}));return a.filter((c)=>l.some((g)=>c.v===g.v&&c.w===g.w))},"findCommonEdges"),dn=e((t,s,r)=>{let o=s.children(t);if(n.trace("Searching children of id ",t,o),o.length<1)return t;let i;for(let a of o){let l=dn(a,s,r),d=Q(s,r,l);if(l)if(d.length>0)i=l;else return l}return i},"findNonClusterChild"),y=e((t)=>{if(!Z.has(t))return t;if(!Z.get(t).externalConnections)return t;if(Z.has(t))return Z.get(t).id;return t},"getAnchorId"),ul=e((t,s)=>{if(!t||s>10){n.debug("Opting out, no graph ");return}else n.debug("Opting in, graph ");t.nodes().forEach(function(r){if(t.children(r).length>0)n.debug("Cluster identified",r," Replacement id in edges: ",dn(r,t,r)),m.set(r,T(r,t)),Z.set(r,{id:dn(r,t,r),clusterData:t.node(r)})}),t.nodes().forEach(function(r){let o=t.children(r),i=t.edges();if(o.length>0)n.debug("Cluster identified",r,m),i.forEach((a)=>{let l=p(a.v,r),d=p(a.w,r);if(l^d)n.debug("Edge: ",a," leaves cluster ",r),n.debug("Descendants of XXX ",r,": ",m.get(r)),Z.get(r).externalConnections=!0});else n.debug("Not a cluster ",r,m)});for(let r of Z.keys()){let o=Z.get(r).id,i=t.parent(o);if(i!==r&&Z.has(i)&&!Z.get(i).externalConnections)Z.get(r).id=i;let a=t.edges().some((l)=>l.v===r);if(o&&Z.get(r)?.externalConnections&&a&&M(t,o,r)){let l=U(t,r,t.parent(o));if(l)Z.get(r).id=l}}t.edges().forEach(function(r){let o=t.edge(r);n.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),n.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let{v:i,w:a}=r;if(n.debug("Fix XXX",Z,"ids:",r.v,r.w,"Translating: ",Z.get(r.v)," --- ",Z.get(r.w)),Z.get(r.v)||Z.get(r.w)){if(n.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),i=y(r.v),a=y(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let l=t.parent(i);Z.get(l).externalConnections=!0,o.fromCluster=r.v}if(a!==r.w){let l=t.parent(a);Z.get(l).externalConnections=!0,o.toCluster=r.w}n.debug("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,o,r.name)}}),P(t,0),n.trace(Z)},"adjustClustersAndEdges"),P=e((t,s)=>{if(s>10){n.error("Bailing out");return}let r=t.nodes(),o=!1;for(let i of r){let a=t.children(i);o=o||a.length>0}if(!o){n.debug("Done, no node has children",t.nodes());return}n.debug("Nodes = ",r,s);for(let i of r)if(n.debug("Extracting node",i,Z,Z.has(i)&&!Z.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",s),!Z.has(i))n.debug("Not a cluster",i,s);else if(!Z.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){n.debug("Cluster without external connections, without a parent and with children",i,s);let l=t.graph().rankdir==="TB"?"LR":"TB";if(Z.get(i)?.clusterData?.dir)l=Z.get(i).clusterData.dir,n.debug("Fixing dir",Z.get(i).clusterData.dir,l);let d=new le({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});R(i,t,d,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Z.get(i).clusterData,label:Z.get(i).label,graph:d})}else n.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Z.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),s),n.debug(Z);r=t.nodes(),n.debug("New list of nodes",r);for(let i of r){let a=t.node(i);if(n.debug(" Now next level",i,a),a?.clusterNode)P(a.graph,s+1)}},"extractor"),B=e((t,s)=>{if(s.length===0)return[];let r=Object.assign([],s);return s.forEach((o)=>{let i=t.children(o),a=B(t,i);r=[...r,...a]}),r},"sorter"),Oi=e((t)=>B(t,t.children()),"sortNodesByHierarchy"),M=e((t,s,r)=>{let o=t.parent(s);while(o&&o!==r){let i=Z.get(o);if(i&&!i.externalConnections)return!0;o=t.parent(o)}return!1},"isNodeInExtractableCluster"),U=e((t,s,r)=>{let o=t.children(s)??[];for(let i of o){if(i===r||p(i,r))continue;let a=dn(i,t,s);if(!a)continue;if(!M(t,a,s))return a}return null},"findSafeAnchorNode");function it({prepareLayout:t,measureLayout:s,runLayoutCore:r,paintLayout:o,afterPaint:i,paintOptions:a}){let l=s??fn;return e(async function(c,g,b,E){let h=g.select("g");(b?.insertMarkers??xn)(h,c.markers,c.type,c.diagramId),Di();let f={element:h,helpers:b,options:E};f.preparedLayout=await t?.(c,f);let w=await l(c,f),v=await r(c,f),C={...f,measure:w};if(o)await o(c,C,v);else await A(c,C,a);await i?.(c,C,v)},"render")}e(it,"createCommonLayoutRenderer");function Di(){Tl(),Sl(),Cl(),q()}e(Di,"clearLayoutRenderState");async function fn(t,{element:s},r){return await D(s,t,r)}e(fn,"defaultMeasureLayout");async function A(t,s,r={}){let{measure:o}=s,{groups:i}=o;for(let l of r.getNodes?.(t,s)??t.nodes){if(r.skipNode?.(l,s))continue;await X(i,l,s,r)}let a=O(t.nodes);for(let l of t.edges){if(j(l,r))continue;await H(i,l,a,t,r,s)}}e(A,"paintLayoutData");async function X(t,s,r,o){if(s.clusterNode)Ct(s);else if(G(s,r,o))await mr(t.clusters,s);else Ct(s)}e(X,"paintLayoutNode");function G(t,s,r){return t.isGroup===!0&&(r.isCluster?.(t,s)??!0)}e(G,"shouldPaintAsCluster");function O(t){let s=new Map;for(let r of t)if(r?.id)s.set(r.id,r);return s}e(O,"buildNodeLookup");function j(t,s){return t.isLayoutOnly||Boolean(s.skipEdge?.(t))}e(j,"shouldSkipPaintEdge");async function H(t,s,r,o,i,a){let l=gr(t.edgePaths,{...s},i.clusterDb??new Map,o.type,N(s.start,s,r,a,i),N(s.end,s,r,a,i),o.diagramId,J(s,i),o.layoutAlgorithm);if(_s(s)){if(!vn.has(s.id))await Ft(t.edgeLabels,s);W(s,l)}}e(H,"paintLayoutEdge");function N(t,s,r,o,i){return i.getEdgeNode?.(t,s,o)??(t?r.get(t)??{}:{})}e(N,"getRenderedNode");function J(t,s){return typeof s.skipIntersect==="function"?s.skipIntersect(t):s.skipIntersect??!1}e(J,"shouldSkipIntersect");function W(t,s){let r=s?.updatedPath??s?.originalPath,o=k(),{subGraphTitleTotalMargin:i}=Pt({flowchart:o.flowchart??{}});if(t.label){let a=vn.get(t.id),{x:l,y:d}=Ls(t,s);a.attr("transform",`translate(${l}, ${d+i/2})`)}for(let[a,l]of[["startLeft",t.startLabelLeft],["startRight",t.startLabelRight],["endLeft",t.endLabelLeft],["endRight",t.endLabelRight]])if(l){let{x:d,y:c}=V(t,a,r);ze.get(t.id)[a].attr("transform",`translate(${d}, ${c})`)}}e(W,"positionRenderedEdgeLabel");var I={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function V(t,s,r){let o=t.terminalLabelCenters?.[s];if(o)return{...o};if(!r)return{x:t.x,y:t.y};let i=s.startsWith("start")?t.arrowTypeStart:t.arrowTypeEnd;return F.calcTerminalLabelPosition(i?10:0,I[s],r)}e(V,"terminalLabelTranslate");
|
|
2
|
+
export{Mi,Ni,Z,dn,ul,Oi,it,Di,fn};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{Xn}from"./index.
|
|
1
|
+
import{Xn}from"./index.f1bfv6bh.js";import{e,n,me,mt,Oe,Lr,y,A,L,R,I,M,P,O,u,Dt,Wr,p,ct,ut,ge,de,fe,Je,F,Ve,aa,Cs,bn,Se,Ee}from"./index.5sj251kq.js";import{Kt}from"./index.5n55ccv6.js";import{Ye}from"./index.gzgeb5ax.js";import{Ce}from"./index.3c95g5mh.js";import{pe}from"./index.tnx5y2zc.js";var x1="flowchart-",g1=["row","column","horizontalAlign","verticalAlign"],F1=new Set(["shape","label","icon","form","pos","img","w","h","constraint","priority","assigned","ticket","labelType","view",...g1]);function Bt(t,r=!1){if(!t)return;let o=t,a={};for(let l of g1)if(Object.hasOwn(o,l))a[l]=o[l];if(r&&Object.hasOwn(o,"algorithm"))a.algorithm=o.algorithm;return Object.keys(a).length>0?a:void 0}e(Bt,"pickFlowchartLayoutMetadata");var v1=["laneRole","laneIndex","drawnExtent"];function A1(t){if(!t||typeof t!=="object")return t;let r={...t};for(let o of v1)Reflect.deleteProperty(r,o);return r}e(A1,"withoutInternalKeys");var _1=class{constructor(){this.vertexCounter=0,this.config=u(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=L,this.setAccDescription=I,this.setDiagramTitle=P,this.getAccTitle=R,this.getAccDescription=M,this.getDiagramTitle=O,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{e(this,"FlowDB")}sanitizeText(t){return y.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let r of this.vertices.values())if(r.id===t)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,r,o,a,l,k,d={},D){if(!t||t.trim().length===0)return;let f;if(D!==void 0){let C;if(!D.includes(`
|
|
2
2
|
`))C=`{
|
|
3
3
|
`+D+`
|
|
4
4
|
}`;else C=D+`
|
|
5
|
-
`;f=A1(Xn(ut(C,{schema:ct})))}let j=this.subGraphLookup.get(t);if(j&&f){if(Object.keys(f).length>0)j.metadata={...j.metadata,...f};return}let E=this.edges.find((C)=>C.id===t);if(E){let C=f;if(C?.animate!==void 0)E.animate=C.animate;if(C?.animation!==void 0)E.animation=C.animation;if(C?.curve!==void 0)E.interpolate=C.curve;if(C?.step!==void 0)if(
|
|
5
|
+
`;f=A1(Xn(ut(C,{schema:ct})))}let j=this.subGraphLookup.get(t);if(j&&f){if(Object.keys(f).length>0)j.metadata={...j.metadata,...f};return}let E=this.edges.find((C)=>C.id===t);if(E){let C=f;if(C?.animate!==void 0)E.animate=C.animate;if(C?.animation!==void 0)E.animation=C.animation;if(C?.curve!==void 0)E.interpolate=C.curve;if(C?.step!==void 0)if(bn(C))E.step=C.step;else n.warn(`Ignoring step on edge ${t}: expected a positive integer`,C.step);return}let K,T=this.vertices.get(t);if(T===void 0){if(r===void 0&&o===void 0&&a!==void 0&&a!==null)n.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`);T={id:t,labelType:"text",domId:x1+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,T)}if(this.vertexCounter++,r!==void 0){if(this.config=u(),K=this.sanitizeText(r.text.trim()),T.labelType=r.type,K.startsWith('"')&&K.endsWith('"'))K=K.substring(1,K.length-1);T.text=K}else if(T.text===void 0)T.text=t;if(o!==void 0)T.type=o;if(a!==void 0&&a!==null)a.forEach((C)=>{T.styles.push(C)});if(l!==void 0&&l!==null)l.forEach((C)=>{T.classes.push(C)});if(k!==void 0)T.dir=k;if(T.props===void 0)T.props=d;else if(d!==void 0)Object.assign(T.props,d);if(f!==void 0){if(T.metadata={...T.metadata,...f},f.shape){if(f.shape!==f.shape.toLowerCase()||f.shape.includes("_"))throw Error(`No such shape: ${f.shape}. Shape names should be lowercase.`);else if(!aa(f.shape))throw Error(`No such shape: ${f.shape}.`);T.type=f?.shape}if(f?.label)T.text=f?.label,T.labelType=this.sanitizeNodeLabelType(f?.labelType);if(f?.icon){if(T.icon=f?.icon,!f.label?.trim()&&T.text===t)T.text=""}if(f?.form)T.form=f?.form;if(f?.pos)T.pos=f?.pos;if(f?.img){if(T.img=f?.img,!f.label?.trim()&&T.text===t)T.text=""}if(f?.constraint)T.constraint=f.constraint;if(f.w)T.assetWidth=Number(f.w);if(f.h)T.assetHeight=Number(f.h)}}addSingleLink(t,r,o,a){let d={start:t,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};n.info("abc78 Got edge...",d);let D=o.text;if(D!==void 0){if(d.text=this.sanitizeText(D.text.trim()),d.text.startsWith('"')&&d.text.endsWith('"'))d.text=d.text.substring(1,d.text.length-1);d.labelType=this.sanitizeNodeLabelType(D.type)}if(o!==void 0)d.type=o.type,d.stroke=o.stroke,d.length=o.length>10?10:o.length;if(a&&!this.edges.some((f)=>f.id===a))d.id=a,d.isUserDefinedId=!0;else{let f=this.edges.filter((j)=>j.start===d.start&&j.end===d.end);if(f.length===0)d.id=Ve(d.start,d.end,{counter:0,prefix:"L"});else d.id=Ve(d.start,d.end,{counter:f.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))n.info("Pushing edge..."),this.edges.push(d);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
|
6
6
|
|
|
7
7
|
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
8
8
|
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
9
|
-
You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t==="object"&&"id"in t&&typeof t.id==="string"}addLink(t,r,o){let a=this.isLinkData(o)?o.id.replace("@",""):void 0;n.info("addLink",t,r,a);for(let l of t)for(let k of r){let d=l===t[t.length-1],D=k===r[0];if(d&&D)this.addSingleLink(l,k,o,a);else this.addSingleLink(l,k,o,void 0)}}updateLinkInterpolate(t,r){t.forEach((o)=>{if(o==="default")this.edges.defaultInterpolate=r;else this.edges[o].interpolate=r})}updateLink(t,r){t.forEach((o)=>{if(typeof o==="number"&&o>=this.edges.length)throw Error(`The index ${o} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(o==="default")this.edges.defaultStyle=r;else if(this.edges[o].style=r,(this.edges[o]?.style?.length??0)>0&&!this.edges[o]?.style?.some((a)=>a?.startsWith("fill")))this.edges[o]?.style?.push("fill:none")})}addClass(t,r){let o=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach((a)=>{let l=this.classes.get(a);if(l===void 0)l={id:a,styles:[],textStyles:[]},this.classes.set(a,l);if(o!==void 0&&o!==null)o.forEach((k)=>{if(/color/.exec(k)){let d=k.replace("fill","bgFill");l.textStyles.push(d)}l.styles.push(k)})})}setDirection(t){if(this.direction=t.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(t,r){for(let o of t.split(",")){let a=this.vertices.get(o);if(a)a.classes.push(r);let l=this.edges.find((d)=>d.id===o);if(l)l.classes.push(r);let k=this.subGraphLookup.get(o);if(k)k.classes.push(r)}}setTooltip(t,r){if(r===void 0)return;r=this.sanitizeText(r);for(let o of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(o):o,r)}setClickFun(t,r,o){if(u().securityLevel!=="loose")return;if(r===void 0)return;let a=[];if(typeof o==="string"){a=o.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k<a.length;k++){let d=a[k].trim();if(d.startsWith('"')&&d.endsWith('"'))d=d.substr(1,d.length-2);a[k]=d}}if(a.length===0)a.push(t);let l=this.vertices.get(t);if(l)l.haveCallback=!0,this.funs.push(()=>{let k=this.lookUpDomId(t),d=document.querySelector(`[id="${k}"]`);if(d!==null)d.addEventListener("click",()=>{F.runFunc(r,...a)},!1)})}setLink(t,r,o){t.split(",").forEach((a)=>{let l=this.vertices.get(a);if(l!==void 0)l.link=F.formatUrl(r,this.config),l.linkTarget=o}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,o){t.split(",").forEach((a)=>{this.setClickFun(a,r,o)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach((r)=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=Kt();p(t).select("svg").selectAll("g.node").on("mouseover",(l)=>{let k=p(l.currentTarget),d=k.attr("title");if(d===null)return;let D=l.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(k.attr("title")).style("left",window.scrollX+D.left+(D.right-D.left)/2+"px").style("top",window.scrollY+D.bottom+"px"),r.html(Oe.sanitize(d)),k.classed("hover",!0)}).on("mouseout",(l)=>{r.transition().duration(500).style("opacity",0),p(l.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=u(),A()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,r,o){let a=t.text.trim(),l=o.text;if(t===o&&/\s/.exec(o.text))a=void 0;let d=e((C)=>{let w={boolean:{},number:{},string:{}},Y=[],ce;return{nodeList:C.filter(function(se){let he=typeof se;if(se.stmt&&se.stmt==="dir")return ce=se.value,!1;if(se.trim()==="")return!1;if(he in w)return w[he].hasOwnProperty(se)?!1:w[he][se]=!0;else return Y.includes(se)?!1:Y.push(se)}),dir:ce}},"uniq")(r.flat()),{nodeList:D,dir:f}=d,j=u().flowchart??{};if(f=f??(j.inheritDir?this.getDirection()??u().direction??void 0:void 0),this.version==="gen-1")for(let C=0;C<D.length;C++)D[C]=this.lookUpDomId(D[C]);a=a??"subGraph"+this.subCount,l=l||"",l=this.sanitizeText(l),this.subCount=this.subCount+1;let E={id:a,nodes:D,title:l.trim(),classes:[],dir:f,labelType:this.sanitizeNodeLabelType(o?.type)};n.info("Adding",E.id,E.nodes,E.dir);let K=this.makeUniq(E,this.subGraphs).nodes;this.recordDroppedMembers(E,K),E.nodes=K.filter((C)=>C!==a);let T=this.subGraphs.find((C)=>C.id===a);if(T)T.nodes.push(...E.nodes);else this.subGraphs.push(E);return this.subGraphLookup.set(a,T??E),a}recordDroppedMembers(t,r){let o=new Set(r);for(let a of t.nodes){if(o.has(a)||a===t.id)continue;let l=this.subGraphs.find((k)=>k.nodes.includes(a));if(l&&l.id!==t.id&&!this.isNestedIn(l.id,t))this.droppedSubGraphMembers.push({node:a,keptBy:l.id,droppedFrom:t.id})}}isNestedIn(t,r){let o=new Set,a=t;while(a!==void 0&&!o.has(a)){if(r.nodes.includes(a))return!0;o.add(a);let l=a;a=this.subGraphs.find((k)=>k.nodes.includes(l))?.id}return!1}getPosForId(t){for(let[r,o]of this.subGraphs.entries())if(o.id===t)return r;return-1}indexNodes2(t,r){let o=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===t)return{result:!0,count:0};let a=0,l=1;while(a<o.length){let k=this.getPosForId(o[a]);if(k>=0){let d=this.indexNodes2(t,k);if(d.result)return{result:!0,count:l+d.count};else l=l+d.count}a=a+1}return{result:!1,count:l}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}destructStartLink(t){let r=t.trim(),o="arrow_open";switch(r[0]){case"<":o="arrow_point",r=r.slice(1);break;case"x":o="arrow_cross",r=r.slice(1);break;case"o":o="arrow_circle",r=r.slice(1);break}let a="normal";if(r.includes("="))a="thick";if(r.includes("."))a="dotted";return{type:o,stroke:a}}countChar(t,r){let o=r.length,a=0;for(let l=0;l<o;++l)if(r[l]===t)++a;return a}destructEndLink(t){let r=t.trim(),o=r.slice(0,-1),a="arrow_open";switch(r.slice(-1)){case"x":if(a="arrow_cross",r.startsWith("x"))a="double_"+a,o=o.slice(1);break;case">":if(a="arrow_point",r.startsWith("<"))a="double_"+a,o=o.slice(1);break;case"o":if(a="arrow_circle",r.startsWith("o"))a="double_"+a,o=o.slice(1);break}let l="normal",k=o.length-1;if(o.startsWith("="))l="thick";if(o.startsWith("~"))l="invisible";let d=this.countChar(".",o);if(d)l="dotted",k=d;return{type:a,stroke:l,length:k}}destructLink(t,r){let o=this.destructEndLink(t),a;if(r){if(a=this.destructStartLink(r),a.stroke!==o.stroke)return{type:"INVALID",stroke:"INVALID"};if(a.type==="arrow_open")a.type=o.type;else{if(a.type!==o.type)return{type:"INVALID",stroke:"INVALID"};a.type="double_"+a.type}if(a.type==="double_arrow")a.type="double_arrow_point";return a.length=o.length,a}return o}exists(t,r){for(let o of t)if(o.nodes.includes(r))return!0;return!1}makeUniq(t,r){let o=[];return t.nodes.forEach((a,l)=>{if(!this.exists(r,a))o.push(t.nodes[l])}),{nodes:o}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon){if(t.form==="circle")return"iconCircle";if(t.form==="square")return"iconSquare";if(t.form==="rounded")return"iconRounded";return"icon"}switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,r){return t.find((o)=>o.id===r)}destructEdgeType(t){let r="none",o="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":o=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=t.replace("double_",""),o=r;break}return{arrowTypeStart:r,arrowTypeEnd:o}}addNodeFromVertex(t,r,o,a,l,k){let d=o.get(t.id),D=a.get(t.id)??!1,f=this.findNode(r,t.id);if(f)f.cssStyles=t.styles,f.cssCompiledStyles=this.getCompiledStyles(t.classes),f.cssClasses=t.classes.join(" ");else{let j={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:d,padding:l.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:k,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint,metadata:Bt(t.metadata)};if(D)r.push({...j,isGroup:!0,shape:"rect"});else r.push({...j,isGroup:!1,shape:this.getTypeFromVertex(t),minWidth:l.flowchart?.minNodeWidth})}}getCompiledStyles(t){let r=[];for(let o of t){let a=this.classes.get(o);if(a?.styles)r=[...r,...a.styles??[]].map((l)=>l.trim());if(a?.textStyles)r=[...r,...a.textStyles??[]].map((l)=>l.trim())}return r}getData(){let t=u(),r=[],o=[],a=this.getSubGraphs(),l=new Map,k=new Map,d=new Map;for(let h of a)for(let b of h.nodes)if(this.subGraphLookup.has(b))d.set(b,h.id);let D=new Map,f=new Map;for(let h of a){let b=d.get(h.id);if(b!==void 0)f.set(b,[...f.get(b)??[],h.id])}let j=0,E=e((h)=>{D.set(h,j++);for(let b of f.get(h)??[])E(b)},"walk");for(let h of a)if(!d.has(h.id))E(h.id);let K=e((h)=>this.subGraphLookup.get(h)?.metadata?.view==="collapsed","isCollapsed"),T=e((h)=>{let b,V=new Set,N=h;while(N!==void 0&&!V.has(N)){if(V.add(N),K(N))b=N;N=d.get(N)}return b},"outermostCollapsed"),C=new Set,w=new Map;for(let h of a){let b=T(h.id);if(b===void 0)continue;if(h.id!==b)C.add(h.id),w.set(h.id,b);for(let V of h.nodes){if(V===b)continue;C.add(V),w.set(V,b)}}for(let h=a.length-1;h>=0;h--){let b=a[h];if(C.has(b.id))continue;if(b.nodes.length>0)k.set(b.id,!0);for(let V of b.nodes)l.set(V,b.id)}for(let h=a.length-1;h>=0;h--){let b=a[h];if(C.has(b.id))continue;if(b.metadata?.view==="collapsed")r.push({id:b.id,label:b.title,labelStyle:"",labelType:b.labelType,parentId:l.get(b.id),padding:8,cssCompiledStyles:this.getCompiledStyles(b.classes),cssClasses:b.classes.join(" "),shape:"collapsedGroup",dir:b.dir,isGroup:!1,look:t.look,colorIndex:D.get(b.id)});else r.push({id:b.id,label:b.title,labelStyle:"",labelType:b.labelType,parentId:l.get(b.id),padding:8,cssCompiledStyles:this.getCompiledStyles(b.classes),cssClasses:b.classes.join(" "),shape:"rect",dir:b.dir,isGroup:!0,look:t.look,colorIndex:D.get(b.id),metadata:Bt(b.metadata,!0)})}this.getVertices().forEach((h)=>{if(C.has(h.id))return;this.addNodeFromVertex(h,r,l,k,t,t.look||"classic")});let ce=this.getEdges(),Ge=ce.reduce((h,b)=>vn(b)?Math.max(h,b.step):h,0),se=Cs(t.flowchart?.stepDuration),he=t.flowchart?.stepNumbers===!0?{showStepNumber:!0}:{};ce.forEach((h,b)=>{let{arrowTypeStart:V,arrowTypeEnd:N}=this.destructEdgeType(h.type),H=[...ce.defaultStyle??[]],q=w.get(h.start)??h.start,X=w.get(h.end)??h.end;if(q===X&&(w.has(h.start)||w.has(h.end)))return;if(h.style)H.push(...h.style);let Q={id:Ve(q,X,{counter:b,prefix:"L"},h.id),isUserDefinedId:h.isUserDefinedId,start:q,end:X,type:h.type??"normal",label:h.text,labelType:h.labelType,labelpos:"c",thickness:h.stroke,minlen:h.length,classes:h?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":V,arrowTypeEnd:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":N,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(h.classes),labelStyle:H,style:H,pattern:h.stroke,look:t.look,animate:h.animate,animation:h.animation,...vn(h)?{step:h.step,stepCount:Ge,stepDuration:se,...he}:{},curve:h.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};o.push(Q)});let ze=this.droppedSubGraphMembers.length>0?{droppedSubGraphMembers:[...this.droppedSubGraphMembers]}:{};return{nodes:r,edges:o,other:ze,config:t}}validate(){if(u().layout!=="grid")return;let r=[...this.vertices.values(),...this.subGraphs];Lr(void 0,r);for(let o of r){let a=this.subGraphLookup.has(o.id);for(let l of Object.keys(o.metadata??{})){if(F1.has(l)||a&&l==="algorithm")continue;n.warn(`Unknown metadata key "${l}" on ${a?"subgraph":"node"} "${o.id}" with grid layout.`)}}}defaultConfig(){return Wr.flowchart}},B1=e(function(t,r){return r.db.getClasses()},"getClasses"),L1=e(async function(t,r,o,a){n.info("REF0:"),n.info("Drawing state diagram (v2)",r);let{securityLevel:l,flowchart:k,layout:d}=u();a.db.setDiagramId(r),n.debug("Before getData: ");let D=a.db.getData();n.debug("Data: ",D);let f=Ce(r,l),j=a.db.getDirection();D.type=a.type,D.layoutAlgorithm=Ee(d),D.direction=j,D.nodeSpacing=k?.nodeSpacing||50,D.rankSpacing=k?.rankSpacing||50,D.markers=["point","circle","cross"],D.diagramId=r,n.debug("REF1:",D),await Se(D,f);let E=D.config.flowchart?.diagramPadding??8;F.insertTitle(f,"flowchartTitleText",k?.titleTopMargin||0,a.db.getDiagramTitle()),pe(f,E,"flowchart",k?.useMaxWidth||!1)},"draw"),w1={getClasses:B1,draw:L1},Lt=function(){var t=e(function(Ne,g,m,S){for(m=m||{},S=Ne.length;S--;m[Ne[S]]=g);return m},"o"),r=[1,4],o=[1,3],a=[1,5],l=[1,8,9,10,11,27,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],k=[2,2],d=[1,13],D=[1,14],f=[1,15],j=[1,16],E=[1,23],K=[1,25],T=[1,26],C=[1,27],w=[1,51],Y=[1,50],ce=[1,30],Ge=[1,31],se=[1,32],he=[1,33],ze=[1,34],h=[1,46],b=[1,48],V=[1,44],N=[1,49],H=[1,45],q=[1,52],X=[1,47],Q=[1,53],Z=[1,54],lt=[1,35],ht=[1,36],dt=[1,37],pt=[1,38],ft=[1,39],Me=[1,59],G=[1,8,9,10,11,27,32,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],ke=[1,63],Ae=[1,62],De=[1,64],Ie=[8,9,11,76,78,79],wt=[1,80],St=[1,81],Ke=[1,95],He=[1,100],qe=[1,99],Xe=[1,96],Qe=[1,92],Ze=[1,98],$e=[1,94],et=[1,101],tt=[1,97],st=[1,102],it=[1,93],Pe=[8,9,10,11,40,76,78,79],te=[8,9,10,11,40,47,76,78,79],ne=[8,9,10,11,29,40,45,47,49,51,53,55,57,59,61,64,66,68,69,71,76,78,79,90,103,106,107,110,112,115,116,117],Vt=[8,9,11,45,61,76,78,79,90,103,106,107,110,112,115,116,117],It=[2,26],rt=[45,61,90,103,106,107,110,112,115,116,117],Rt=[1,126],Nt=[1,127],bt=[1,129],kt=[1,128],Gt=[45,61,63,75,90,103,106,107,110,112,115,116,117],Mt=[1,138],Pt=[1,152],Ot=[1,153],Ut=[1,154],Wt=[1,155],jt=[1,140],zt=[1,142],Yt=[1,146],Ht=[1,147],qt=[1,148],Xt=[1,149],Qt=[1,150],Jt=[1,151],Zt=[1,156],$t=[1,157],e1=[1,136],t1=[1,137],s1=[1,144],i1=[1,139],r1=[1,143],a1=[1,141],Tt=[8,9,10,11,27,32,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],n1=[1,159],o1=[8,9,10,11,76,78,79],u1=[1,160],l1=[1,162],z=[8,9,11],oe=[8,9,10,11,14,45,61,90,106,107,110,112,115,116,117],x=[1,182],ie=[1,178],re=[1,179],v=[1,183],_=[1,180],B=[1,181],at=[78,117,120],U=[8,9,10,11,12,14,27,29,32,45,61,76,85,86,87,88,89,90,91,106,110,112,115,116,117],c1=[10,107],Re=[31,50,52,54,56,58,63,65,67,68,70,72,117,118,119],Te=[1,253],ye=[1,251],xe=[1,255],Fe=[1,249],ve=[1,250],_e=[1,252],Be=[1,254],Le=[1,256],nt=[1,273],h1=[8,9,11,107],be=[8,9,10,11,61,85,106,107,110,111,112,113],Et={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,withShape:41,node:42,link:43,styledVertex:44,AMP:45,vertex:46,STYLE_SEPARATOR:47,idString:48,DOUBLECIRCLESTART:49,DOUBLECIRCLEEND:50,PS:51,PE:52,"(-":53,"-)":54,STADIUMSTART:55,STADIUMEND:56,SUBROUTINESTART:57,SUBROUTINEEND:58,VERTEX_WITH_PROPS_START:59,"NODE_STRING[field]":60,COLON:61,"NODE_STRING[value]":62,PIPE:63,CYLINDERSTART:64,CYLINDEREND:65,DIAMOND_START:66,DIAMOND_STOP:67,TAGEND:68,TRAPSTART:69,TRAPEND:70,INVTRAPSTART:71,INVTRAPEND:72,linkStatement:73,arrowText:74,TESTSTR:75,START_LINK:76,edgeText:77,LINK:78,LINK_ID:79,edgeTextToken:80,STR:81,MD_STR:82,textToken:83,keywords:84,STYLE:85,LINKSTYLE:86,CLASSDEF:87,CLASS:88,CLICK:89,DOWN:90,UP:91,textNoTagsToken:92,stylesOpt:93,"idString[vertex]":94,"idString[class]":95,CALLBACKNAME:96,CALLBACKARGS:97,HREF:98,LINK_TARGET:99,"STR[link]":100,"STR[tooltip]":101,alphaNum:102,DEFAULT:103,numList:104,INTERPOLATE:105,NUM:106,COMMA:107,style:108,styleComponent:109,NODE_STRING:110,UNIT:111,BRKT:112,PCT:113,idStringToken:114,MINUS:115,MULT:116,UNICODE_TEXT:117,TEXT:118,TAGSTART:119,EDGE_TEXT:120,alphaNumToken:121,direction_tb:122,direction_bt:123,direction_rl:124,direction_lr:125,direction_td:126,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",45:"AMP",47:"STYLE_SEPARATOR",49:"DOUBLECIRCLESTART",50:"DOUBLECIRCLEEND",51:"PS",52:"PE",53:"(-",54:"-)",55:"STADIUMSTART",56:"STADIUMEND",57:"SUBROUTINESTART",58:"SUBROUTINEEND",59:"VERTEX_WITH_PROPS_START",60:"NODE_STRING[field]",61:"COLON",62:"NODE_STRING[value]",63:"PIPE",64:"CYLINDERSTART",65:"CYLINDEREND",66:"DIAMOND_START",67:"DIAMOND_STOP",68:"TAGEND",69:"TRAPSTART",70:"TRAPEND",71:"INVTRAPSTART",72:"INVTRAPEND",75:"TESTSTR",76:"START_LINK",78:"LINK",79:"LINK_ID",81:"STR",82:"MD_STR",85:"STYLE",86:"LINKSTYLE",87:"CLASSDEF",88:"CLASS",89:"CLICK",90:"DOWN",91:"UP",94:"idString[vertex]",95:"idString[class]",96:"CALLBACKNAME",97:"CALLBACKARGS",98:"HREF",99:"LINK_TARGET",100:"STR[link]",101:"STR[tooltip]",103:"DEFAULT",105:"INTERPOLATE",106:"NUM",107:"COMMA",110:"NODE_STRING",111:"UNIT",112:"BRKT",113:"PCT",115:"MINUS",116:"MULT",117:"UNICODE_TEXT",118:"TEXT",119:"TAGSTART",120:"EDGE_TEXT",122:"direction_tb",123:"direction_bt",124:"direction_rl",125:"direction_lr",126:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[41,2],[41,3],[20,3],[20,4],[20,3],[20,4],[20,2],[20,1],[20,2],[20,1],[42,1],[42,5],[42,5],[44,1],[44,3],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,8],[46,4],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,1],[43,2],[43,3],[43,3],[43,1],[43,3],[43,4],[77,1],[77,2],[77,1],[77,1],[73,1],[73,2],[74,3],[30,1],[30,2],[30,1],[30,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[104,1],[104,3],[93,1],[93,3],[108,1],[108,2],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[83,1],[83,1],[83,1],[83,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[80,1],[80,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[48,1],[48,2],[102,1],[102,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:e(function(g,m,S,c,W,s,Ue){var i=s.length-1;switch(W){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 187:this.$=s[i];break;case 11:c.setDirection("TB"),this.$="TB";break;case 12:c.setDirection(s[i-1]),this.$=s[i-1];break;case 27:this.$=s[i-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=c.addSubGraph(s[i-6],s[i-1],s[i-4]);break;case 34:this.$=c.addSubGraph(s[i-3],s[i-1],s[i-3]);break;case 35:this.$=c.addSubGraph(void 0,s[i-1],void 0);break;case 37:this.$=s[i].trim(),c.setAccTitle(this.$);break;case 38:case 39:this.$=s[i].trim(),c.setAccDescription(this.$);break;case 43:this.$=s[i-1]+s[i];break;case 44:this.$=s[i];break;case 45:this.$={nodes:s[i-1],shapeData:s[i]};break;case 46:this.$={nodes:s[i-2],shapeData:s[i]};break;case 47:c.addVertex(s[i].nodes[s[i].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i].shapeData),c.addLink(s[i-2].stmt,s[i].nodes,s[i-1]),this.$={stmt:s[i].nodes,nodes:s[i].nodes.concat(s[i-2].nodes)};break;case 48:c.addVertex(s[i-1].nodes[s[i-1].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-1].shapeData),c.addLink(s[i-3].stmt,s[i-1].nodes,s[i-2]),this.$={stmt:s[i-1].nodes,nodes:s[i-1].nodes.concat(s[i-3].nodes)};break;case 49:c.addLink(s[i-2].stmt,s[i],s[i-1]),this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 50:c.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 51:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 52:c.addVertex(s[i].nodes[s[i].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i].shapeData),this.$={stmt:s[i].nodes,nodes:s[i].nodes,shapeData:s[i].shapeData};break;case 53:c.addVertex(s[i-1].nodes[s[i-1].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-1].shapeData),this.$={stmt:s[i-1].nodes,nodes:s[i-1].nodes,shapeData:s[i-1].shapeData};break;case 54:this.$={stmt:s[i],nodes:s[i]};break;case 55:this.$=[s[i]];break;case 56:c.addVertex(s[i-4].nodes[s[i-4].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4].shapeData),this.$=s[i-4].nodes.concat(s[i]);break;case 57:this.$=s[i-4].concat(s[i]);break;case 58:this.$=s[i];break;case 59:this.$=s[i-2],c.setClass(s[i-2],s[i]);break;case 60:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"square");break;case 61:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"doublecircle");break;case 62:this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"circle");break;case 63:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"ellipse");break;case 64:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"stadium");break;case 65:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"subroutine");break;case 66:this.$=s[i-7],c.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]]));break;case 67:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"cylinder");break;case 68:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"round");break;case 69:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"diamond");break;case 70:this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"hexagon");break;case 71:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"odd");break;case 72:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"trapezoid");break;case 73:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"inv_trapezoid");break;case 74:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_right");break;case 75:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_left");break;case 76:this.$=s[i],c.addVertex(s[i]);break;case 77:s[i-1].text=s[i],this.$=s[i-1];break;case 78:case 79:s[i-2].text=s[i-1],this.$=s[i-2];break;case 80:this.$=s[i];break;case 81:var J=c.destructLink(s[i],s[i-2]);this.$={type:J.type,stroke:J.stroke,length:J.length,text:s[i-1]};break;case 82:var J=c.destructLink(s[i],s[i-2]);this.$={type:J.type,stroke:J.stroke,length:J.length,text:s[i-1],id:s[i-3]};break;case 83:this.$={text:s[i],type:"text"};break;case 84:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 85:this.$={text:s[i],type:"string"};break;case 86:this.$={text:s[i],type:"markdown"};break;case 87:var J=c.destructLink(s[i]);this.$={type:J.type,stroke:J.stroke,length:J.length};break;case 88:var J=c.destructLink(s[i]);this.$={type:J.type,stroke:J.stroke,length:J.length,id:s[i-1]};break;case 89:this.$=s[i-1];break;case 90:this.$={text:s[i],type:"text"};break;case 91:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 92:this.$={text:s[i],type:"string"};break;case 93:case 108:this.$={text:s[i],type:"markdown"};break;case 105:this.$={text:s[i],type:"text"};break;case 106:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 107:this.$={text:s[i],type:"text"};break;case 109:this.$=s[i-4],c.addClass(s[i-2],s[i]);break;case 110:this.$=s[i-4],c.setClass(s[i-2],s[i]);break;case 111:case 119:this.$=s[i-1],c.setClickEvent(s[i-1],s[i]);break;case 112:case 120:this.$=s[i-3],c.setClickEvent(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 113:this.$=s[i-2],c.setClickEvent(s[i-2],s[i-1],s[i]);break;case 114:this.$=s[i-4],c.setClickEvent(s[i-4],s[i-3],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 115:this.$=s[i-2],c.setLink(s[i-2],s[i]);break;case 116:this.$=s[i-4],c.setLink(s[i-4],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 117:this.$=s[i-4],c.setLink(s[i-4],s[i-2],s[i]);break;case 118:this.$=s[i-6],c.setLink(s[i-6],s[i-4],s[i]),c.setTooltip(s[i-6],s[i-2]);break;case 121:this.$=s[i-1],c.setLink(s[i-1],s[i]);break;case 122:this.$=s[i-3],c.setLink(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 123:this.$=s[i-3],c.setLink(s[i-3],s[i-2],s[i]);break;case 124:this.$=s[i-5],c.setLink(s[i-5],s[i-4],s[i]),c.setTooltip(s[i-5],s[i-2]);break;case 125:this.$=s[i-4],c.addVertex(s[i-2],void 0,void 0,s[i]);break;case 126:this.$=s[i-4],c.updateLink([s[i-2]],s[i]);break;case 127:this.$=s[i-4],c.updateLink(s[i-2],s[i]);break;case 128:this.$=s[i-8],c.updateLinkInterpolate([s[i-6]],s[i-2]),c.updateLink([s[i-6]],s[i]);break;case 129:this.$=s[i-8],c.updateLinkInterpolate(s[i-6],s[i-2]),c.updateLink(s[i-6],s[i]);break;case 130:this.$=s[i-6],c.updateLinkInterpolate([s[i-4]],s[i]);break;case 131:this.$=s[i-6],c.updateLinkInterpolate(s[i-4],s[i]);break;case 132:case 134:this.$=[s[i]];break;case 133:case 135:s[i-2].push(s[i]),this.$=s[i-2];break;case 137:this.$=s[i-1]+s[i];break;case 185:this.$=s[i];break;case 186:this.$=s[i-1]+""+s[i];break;case 188:this.$=s[i-1]+""+s[i];break;case 189:this.$={stmt:"dir",value:"TB"};break;case 190:this.$={stmt:"dir",value:"BT"};break;case 191:this.$={stmt:"dir",value:"RL"};break;case 192:this.$={stmt:"dir",value:"LR"};break;case 193:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:o,12:a},{1:[3]},t(l,k,{5:6}),{4:7,9:r,10:o,12:a},{4:8,9:r,10:o,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:d,9:D,10:f,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:E,33:24,34:K,36:T,38:C,41:29,42:28,44:40,45:w,46:41,48:42,61:Y,85:ce,86:Ge,87:se,88:he,89:ze,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z,122:lt,123:ht,124:dt,125:pt,126:ft},t(l,[2,9]),t(l,[2,10]),t(l,[2,11]),{8:[1,56],9:[1,57],10:Me,15:55,18:58},t(G,[2,3]),t(G,[2,4]),t(G,[2,5]),t(G,[2,6]),t(G,[2,7]),t(G,[2,8]),{8:ke,9:Ae,11:De,21:60,43:61,73:65,76:[1,66],78:[1,68],79:[1,67]},{8:ke,9:Ae,11:De,21:69},{8:ke,9:Ae,11:De,21:70},{8:ke,9:Ae,11:De,21:71},{8:ke,9:Ae,11:De,21:72},{8:ke,9:Ae,11:De,21:73},{8:ke,9:Ae,10:[1,74],11:De,21:75},t(G,[2,36]),{35:[1,76]},{37:[1,77]},t(G,[2,39]),t(Ie,[2,54],{18:78,39:79,10:wt,40:St}),t(Ie,[2,52],{18:82,10:Me}),{10:[1,83]},{10:[1,84]},{10:[1,85]},{10:[1,86]},{14:Ke,45:He,61:qe,81:[1,90],90:Xe,96:[1,87],98:[1,88],102:89,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it,121:91},t(G,[2,189]),t(G,[2,190]),t(G,[2,191]),t(G,[2,192]),t(G,[2,193]),t(Pe,[2,55]),t(Pe,[2,58],{47:[1,103]}),t(te,[2,76],{114:116,29:[1,104],45:w,49:[1,105],51:[1,106],53:[1,107],55:[1,108],57:[1,109],59:[1,110],61:Y,64:[1,111],66:[1,112],68:[1,113],69:[1,114],71:[1,115],90:h,103:b,106:V,107:N,110:H,112:q,115:X,116:Q,117:Z}),t(ne,[2,185]),t(ne,[2,146]),t(ne,[2,147]),t(ne,[2,148]),t(ne,[2,149]),t(ne,[2,150]),t(ne,[2,151]),t(ne,[2,152]),t(ne,[2,153]),t(ne,[2,154]),t(ne,[2,155]),t(ne,[2,156]),t(l,[2,12]),t(l,[2,18]),t(l,[2,19]),{9:[1,117]},t(Vt,It,{18:118,10:Me}),t(G,[2,27]),{41:119,42:120,44:40,45:w,46:41,48:42,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},t(G,[2,40]),t(G,[2,41]),t(G,[2,42]),t(rt,[2,80],{74:121,63:[1,123],75:[1,122]}),{77:124,80:125,81:Rt,82:Nt,117:bt,120:kt},{76:[1,130],78:[1,131]},t(Gt,[2,87]),t(G,[2,28]),t(G,[2,29]),t(G,[2,30]),t(G,[2,31]),t(G,[2,32]),{10:Mt,12:Pt,14:Ot,27:Ut,28:132,32:Wt,45:jt,61:zt,76:Yt,81:[1,134],82:[1,135],84:145,85:Ht,86:qt,87:Xt,88:Qt,89:Jt,90:Zt,91:$t,92:133,106:e1,110:t1,112:s1,115:i1,116:r1,117:a1},t(Tt,k,{5:158}),t(G,[2,37]),t(G,[2,38]),t(Ie,[2,51],{45:n1}),t(o1,[2,45],{40:u1}),t([8,9,11,45,76,78,79],It,{18:118,39:161,10:Me,40:St}),t(Pe,[2,44]),t(Ie,[2,53],{45:l1}),{45:w,48:163,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},{103:[1,164],104:165,106:[1,166]},{45:w,48:167,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},{45:w,48:168,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},t(z,[2,111],{10:[1,169],97:[1,170]}),{81:[1,171]},t(z,[2,119],{121:173,10:[1,172],14:Ke,45:He,61:qe,90:Xe,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it}),t(z,[2,121],{10:[1,174]}),t(oe,[2,187]),t(oe,[2,174]),t(oe,[2,175]),t(oe,[2,176]),t(oe,[2,177]),t(oe,[2,178]),t(oe,[2,179]),t(oe,[2,180]),t(oe,[2,181]),t(oe,[2,182]),t(oe,[2,183]),t(oe,[2,184]),{45:w,48:175,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},{30:176,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:184,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:186,51:[1,185],68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:187,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:188,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:189,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{110:[1,190]},{30:191,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:192,66:[1,193],68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:194,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:195,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:196,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},t(ne,[2,186]),t(l,[2,20]),t(Vt,[2,25]),t(Ie,[2,47],{18:197,10:Me}),t(Ie,[2,49],{39:79,18:198,10:wt,40:St}),t(rt,[2,77],{10:[1,199]}),{10:[1,200]},{30:201,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{78:[1,202],80:203,117:bt,120:kt},t(at,[2,83]),t(at,[2,85]),t(at,[2,86]),t(at,[2,172]),t(at,[2,173]),{77:204,80:125,81:Rt,82:Nt,117:bt,120:kt},t(Gt,[2,88]),{8:ke,9:Ae,10:Mt,11:De,12:Pt,14:Ot,21:206,27:Ut,29:[1,205],32:Wt,45:jt,61:zt,76:Yt,84:145,85:Ht,86:qt,87:Xt,88:Qt,89:Jt,90:Zt,91:$t,92:207,106:e1,110:t1,112:s1,115:i1,116:r1,117:a1},t(U,[2,105]),t(U,[2,107]),t(U,[2,108]),t(U,[2,161]),t(U,[2,162]),t(U,[2,163]),t(U,[2,164]),t(U,[2,165]),t(U,[2,166]),t(U,[2,167]),t(U,[2,168]),t(U,[2,169]),t(U,[2,170]),t(U,[2,171]),t(U,[2,94]),t(U,[2,95]),t(U,[2,96]),t(U,[2,97]),t(U,[2,98]),t(U,[2,99]),t(U,[2,100]),t(U,[2,101]),t(U,[2,102]),t(U,[2,103]),t(U,[2,104]),{6:11,7:12,8:d,9:D,10:f,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:E,32:[1,208],33:24,34:K,36:T,38:C,41:29,42:28,44:40,45:w,46:41,48:42,61:Y,85:ce,86:Ge,87:se,88:he,89:ze,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z,122:lt,123:ht,124:dt,125:pt,126:ft},{10:Me,18:209},t(Pe,[2,43]),t(o1,[2,46],{40:u1}),{10:Me,18:210},{10:[1,211],45:w,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:116,115:X,116:Q,117:Z},{10:[1,212]},{10:[1,213],107:[1,214]},t(c1,[2,132]),{10:[1,215],45:w,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:116,115:X,116:Q,117:Z},{10:[1,216],45:w,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:116,115:X,116:Q,117:Z},{81:[1,217]},t(z,[2,113],{10:[1,218]}),t(z,[2,115],{10:[1,219]}),{81:[1,220]},t(oe,[2,188]),{81:[1,221],99:[1,222]},t(Pe,[2,59],{114:116,45:w,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,115:X,116:Q,117:Z}),{31:[1,223],68:x,83:224,117:v,118:_,119:B},t(Re,[2,90]),t(Re,[2,92]),t(Re,[2,93]),t(Re,[2,157]),t(Re,[2,158]),t(Re,[2,159]),t(Re,[2,160]),{50:[1,225],68:x,83:224,117:v,118:_,119:B},{30:226,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{52:[1,227],68:x,83:224,117:v,118:_,119:B},{54:[1,228],68:x,83:224,117:v,118:_,119:B},{56:[1,229],68:x,83:224,117:v,118:_,119:B},{58:[1,230],68:x,83:224,117:v,118:_,119:B},{61:[1,231]},{65:[1,232],68:x,83:224,117:v,118:_,119:B},{67:[1,233],68:x,83:224,117:v,118:_,119:B},{30:234,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{31:[1,235],68:x,83:224,117:v,118:_,119:B},{68:x,70:[1,236],72:[1,237],83:224,117:v,118:_,119:B},{68:x,70:[1,239],72:[1,238],83:224,117:v,118:_,119:B},t(Ie,[2,48],{45:l1}),t(Ie,[2,50],{45:n1}),t(rt,[2,79]),t(rt,[2,78]),{63:[1,240],68:x,83:224,117:v,118:_,119:B},t(rt,[2,81]),t(at,[2,84]),{78:[1,241],80:203,117:bt,120:kt},{30:242,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},t(Tt,k,{5:243}),t(U,[2,106]),t(G,[2,35]),{44:244,45:w,46:41,48:42,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},{44:245,45:w,46:41,48:42,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},{10:Te,61:ye,85:xe,93:246,106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},{10:Te,61:ye,85:xe,93:257,105:[1,258],106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},{10:Te,61:ye,85:xe,93:259,105:[1,260],106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},{106:[1,261]},{10:Te,61:ye,85:xe,93:262,106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},{45:w,48:263,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},t(z,[2,112]),{81:[1,264]},{81:[1,265],99:[1,266]},t(z,[2,120]),t(z,[2,122],{10:[1,267]}),t(z,[2,123]),t(te,[2,60]),t(Re,[2,91]),t(te,[2,61]),{52:[1,268],68:x,83:224,117:v,118:_,119:B},t(te,[2,68]),t(te,[2,63]),t(te,[2,64]),t(te,[2,65]),{110:[1,269]},t(te,[2,67]),t(te,[2,69]),{67:[1,270],68:x,83:224,117:v,118:_,119:B},t(te,[2,71]),t(te,[2,72]),t(te,[2,74]),t(te,[2,73]),t(te,[2,75]),t([10,45,61,90,103,106,107,110,112,115,116,117],[2,89]),t(rt,[2,82]),{31:[1,271],68:x,83:224,117:v,118:_,119:B},{6:11,7:12,8:d,9:D,10:f,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:E,32:[1,272],33:24,34:K,36:T,38:C,41:29,42:28,44:40,45:w,46:41,48:42,61:Y,85:ce,86:Ge,87:se,88:he,89:ze,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z,122:lt,123:ht,124:dt,125:pt,126:ft},t(Pe,[2,57]),t(Pe,[2,56]),t(z,[2,125],{107:nt}),t(h1,[2,134],{109:274,10:Te,61:ye,85:xe,106:Fe,110:ve,111:_e,112:Be,113:Le}),t(be,[2,136]),t(be,[2,138]),t(be,[2,139]),t(be,[2,140]),t(be,[2,141]),t(be,[2,142]),t(be,[2,143]),t(be,[2,144]),t(be,[2,145]),t(z,[2,126],{107:nt}),{10:[1,275]},t(z,[2,127],{107:nt}),{10:[1,276]},t(c1,[2,133]),t(z,[2,109],{107:nt}),t(z,[2,110],{114:116,45:w,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,115:X,116:Q,117:Z}),t(z,[2,114]),t(z,[2,116],{10:[1,277]}),t(z,[2,117]),{99:[1,278]},{52:[1,279]},{63:[1,280]},{67:[1,281]},{8:ke,9:Ae,11:De,21:282},t(G,[2,34]),{10:Te,61:ye,85:xe,106:Fe,108:283,109:248,110:ve,111:_e,112:Be,113:Le},t(be,[2,137]),{14:Ke,45:He,61:qe,90:Xe,102:284,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it,121:91},{14:Ke,45:He,61:qe,90:Xe,102:285,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it,121:91},{99:[1,286]},t(z,[2,124]),t(te,[2,62]),{30:287,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},t(te,[2,70]),t(Tt,k,{5:288}),t(h1,[2,135],{109:274,10:Te,61:ye,85:xe,106:Fe,110:ve,111:_e,112:Be,113:Le}),t(z,[2,130],{121:173,10:[1,289],14:Ke,45:He,61:qe,90:Xe,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it}),t(z,[2,131],{121:173,10:[1,290],14:Ke,45:He,61:qe,90:Xe,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it}),t(z,[2,118]),{31:[1,291],68:x,83:224,117:v,118:_,119:B},{6:11,7:12,8:d,9:D,10:f,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:E,32:[1,292],33:24,34:K,36:T,38:C,41:29,42:28,44:40,45:w,46:41,48:42,61:Y,85:ce,86:Ge,87:se,88:he,89:ze,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z,122:lt,123:ht,124:dt,125:pt,126:ft},{10:Te,61:ye,85:xe,93:293,106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},{10:Te,61:ye,85:xe,93:294,106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},t(te,[2,66]),t(G,[2,33]),t(z,[2,128],{107:nt}),t(z,[2,129],{107:nt})],defaultActions:{},parseError:e(function(g,m){if(m.recoverable)this.trace(g);else{var S=Error(g);throw S.hash=m,S}},"parseError"),parse:e(function(g){var m=this,S=[0],c=[],W=[null],s=[],Ue=this.table,i="",J=0,d1=0,p1=0,S1=2,f1=1,T1=s.slice.call(arguments,1),ee=Object.create(this.lexer),We={yy:{}};for(var yt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,yt))We.yy[yt]=this.yy[yt];if(ee.setInput(g,We.yy),We.yy.lexer=ee,We.yy.parser=this,typeof ee.yylloc>"u")ee.yylloc={};var xt=ee.yylloc;s.push(xt);var E1=ee.options&&ee.options.ranges;if(typeof We.yy.parseError==="function")this.parseError=We.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function y1(le){S.length=S.length-2*le,W.length=W.length-le,s.length=s.length-le}e(y1,"popStack");function b1(){var le=c.pop()||ee.lex()||f1;if(typeof le!=="number"){if(le instanceof Array)c=le,le=c.pop();le=m.symbols_[le]||le}return le}e(b1,"lex");var ae,Ft,je,ue,G1,vt,ot={},At,we,k1,Ct;while(!0){if(je=S[S.length-1],this.defaultActions[je])ue=this.defaultActions[je];else{if(ae===null||typeof ae>"u")ae=b1();ue=Ue[je]&&Ue[je][ae]}if(typeof ue>"u"||!ue.length||!ue[0]){var _t="";Ct=[];for(At in Ue[je])if(this.terminals_[At]&&At>S1)Ct.push("'"+this.terminals_[At]+"'");if(ee.showPosition)_t="Parse error on line "+(J+1)+`:
|
|
9
|
+
You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t==="object"&&"id"in t&&typeof t.id==="string"}addLink(t,r,o){let a=this.isLinkData(o)?o.id.replace("@",""):void 0;n.info("addLink",t,r,a);for(let l of t)for(let k of r){let d=l===t[t.length-1],D=k===r[0];if(d&&D)this.addSingleLink(l,k,o,a);else this.addSingleLink(l,k,o,void 0)}}updateLinkInterpolate(t,r){t.forEach((o)=>{if(o==="default")this.edges.defaultInterpolate=r;else this.edges[o].interpolate=r})}updateLink(t,r){t.forEach((o)=>{if(typeof o==="number"&&o>=this.edges.length)throw Error(`The index ${o} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(o==="default")this.edges.defaultStyle=r;else if(this.edges[o].style=r,(this.edges[o]?.style?.length??0)>0&&!this.edges[o]?.style?.some((a)=>a?.startsWith("fill")))this.edges[o]?.style?.push("fill:none")})}addClass(t,r){let o=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach((a)=>{let l=this.classes.get(a);if(l===void 0)l={id:a,styles:[],textStyles:[]},this.classes.set(a,l);if(o!==void 0&&o!==null)o.forEach((k)=>{if(/color/.exec(k)){let d=k.replace("fill","bgFill");l.textStyles.push(d)}l.styles.push(k)})})}setDirection(t){if(this.direction=t.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(t,r){for(let o of t.split(",")){let a=this.vertices.get(o);if(a)a.classes.push(r);let l=this.edges.find((d)=>d.id===o);if(l)l.classes.push(r);let k=this.subGraphLookup.get(o);if(k)k.classes.push(r)}}setTooltip(t,r){if(r===void 0)return;r=this.sanitizeText(r);for(let o of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(o):o,r)}setClickFun(t,r,o){if(u().securityLevel!=="loose")return;if(r===void 0)return;let a=[];if(typeof o==="string"){a=o.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k<a.length;k++){let d=a[k].trim();if(d.startsWith('"')&&d.endsWith('"'))d=d.substr(1,d.length-2);a[k]=d}}if(a.length===0)a.push(t);let l=this.vertices.get(t);if(l)l.haveCallback=!0,this.funs.push(()=>{let k=this.lookUpDomId(t),d=document.querySelector(`[id="${k}"]`);if(d!==null)d.addEventListener("click",()=>{F.runFunc(r,...a)},!1)})}setLink(t,r,o){t.split(",").forEach((a)=>{let l=this.vertices.get(a);if(l!==void 0)l.link=F.formatUrl(r,this.config),l.linkTarget=o}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,o){t.split(",").forEach((a)=>{this.setClickFun(a,r,o)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach((r)=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=Kt();p(t).select("svg").selectAll("g.node").on("mouseover",(l)=>{let k=p(l.currentTarget),d=k.attr("title");if(d===null)return;let D=l.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(k.attr("title")).style("left",window.scrollX+D.left+(D.right-D.left)/2+"px").style("top",window.scrollY+D.bottom+"px"),r.html(Oe.sanitize(d)),k.classed("hover",!0)}).on("mouseout",(l)=>{r.transition().duration(500).style("opacity",0),p(l.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=u(),A()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,r,o){let a=t.text.trim(),l=o.text;if(t===o&&/\s/.exec(o.text))a=void 0;let d=e((C)=>{let w={boolean:{},number:{},string:{}},Y=[],ce;return{nodeList:C.filter(function(se){let he=typeof se;if(se.stmt&&se.stmt==="dir")return ce=se.value,!1;if(se.trim()==="")return!1;if(he in w)return w[he].hasOwnProperty(se)?!1:w[he][se]=!0;else return Y.includes(se)?!1:Y.push(se)}),dir:ce}},"uniq")(r.flat()),{nodeList:D,dir:f}=d,j=u().flowchart??{};if(f=f??(j.inheritDir?this.getDirection()??u().direction??void 0:void 0),this.version==="gen-1")for(let C=0;C<D.length;C++)D[C]=this.lookUpDomId(D[C]);a=a??"subGraph"+this.subCount,l=l||"",l=this.sanitizeText(l),this.subCount=this.subCount+1;let E={id:a,nodes:D,title:l.trim(),classes:[],dir:f,labelType:this.sanitizeNodeLabelType(o?.type)};n.info("Adding",E.id,E.nodes,E.dir);let K=this.makeUniq(E,this.subGraphs).nodes;this.recordDroppedMembers(E,K),E.nodes=K.filter((C)=>C!==a);let T=this.subGraphs.find((C)=>C.id===a);if(T)T.nodes.push(...E.nodes);else this.subGraphs.push(E);return this.subGraphLookup.set(a,T??E),a}recordDroppedMembers(t,r){let o=new Set(r);for(let a of t.nodes){if(o.has(a)||a===t.id)continue;let l=this.subGraphs.find((k)=>k.nodes.includes(a));if(l&&l.id!==t.id&&!this.isNestedIn(l.id,t))this.droppedSubGraphMembers.push({node:a,keptBy:l.id,droppedFrom:t.id})}}isNestedIn(t,r){let o=new Set,a=t;while(a!==void 0&&!o.has(a)){if(r.nodes.includes(a))return!0;o.add(a);let l=a;a=this.subGraphs.find((k)=>k.nodes.includes(l))?.id}return!1}getPosForId(t){for(let[r,o]of this.subGraphs.entries())if(o.id===t)return r;return-1}indexNodes2(t,r){let o=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===t)return{result:!0,count:0};let a=0,l=1;while(a<o.length){let k=this.getPosForId(o[a]);if(k>=0){let d=this.indexNodes2(t,k);if(d.result)return{result:!0,count:l+d.count};else l=l+d.count}a=a+1}return{result:!1,count:l}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}destructStartLink(t){let r=t.trim(),o="arrow_open";switch(r[0]){case"<":o="arrow_point",r=r.slice(1);break;case"x":o="arrow_cross",r=r.slice(1);break;case"o":o="arrow_circle",r=r.slice(1);break}let a="normal";if(r.includes("="))a="thick";if(r.includes("."))a="dotted";return{type:o,stroke:a}}countChar(t,r){let o=r.length,a=0;for(let l=0;l<o;++l)if(r[l]===t)++a;return a}destructEndLink(t){let r=t.trim(),o=r.slice(0,-1),a="arrow_open";switch(r.slice(-1)){case"x":if(a="arrow_cross",r.startsWith("x"))a="double_"+a,o=o.slice(1);break;case">":if(a="arrow_point",r.startsWith("<"))a="double_"+a,o=o.slice(1);break;case"o":if(a="arrow_circle",r.startsWith("o"))a="double_"+a,o=o.slice(1);break}let l="normal",k=o.length-1;if(o.startsWith("="))l="thick";if(o.startsWith("~"))l="invisible";let d=this.countChar(".",o);if(d)l="dotted",k=d;return{type:a,stroke:l,length:k}}destructLink(t,r){let o=this.destructEndLink(t),a;if(r){if(a=this.destructStartLink(r),a.stroke!==o.stroke)return{type:"INVALID",stroke:"INVALID"};if(a.type==="arrow_open")a.type=o.type;else{if(a.type!==o.type)return{type:"INVALID",stroke:"INVALID"};a.type="double_"+a.type}if(a.type==="double_arrow")a.type="double_arrow_point";return a.length=o.length,a}return o}exists(t,r){for(let o of t)if(o.nodes.includes(r))return!0;return!1}makeUniq(t,r){let o=[];return t.nodes.forEach((a,l)=>{if(!this.exists(r,a))o.push(t.nodes[l])}),{nodes:o}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon){if(t.form==="circle")return"iconCircle";if(t.form==="square")return"iconSquare";if(t.form==="rounded")return"iconRounded";return"icon"}switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,r){return t.find((o)=>o.id===r)}destructEdgeType(t){let r="none",o="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":o=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=t.replace("double_",""),o=r;break}return{arrowTypeStart:r,arrowTypeEnd:o}}addNodeFromVertex(t,r,o,a,l,k){let d=o.get(t.id),D=a.get(t.id)??!1,f=this.findNode(r,t.id);if(f)f.cssStyles=t.styles,f.cssCompiledStyles=this.getCompiledStyles(t.classes),f.cssClasses=t.classes.join(" ");else{let j={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:d,padding:l.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:k,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint,metadata:Bt(t.metadata)};if(D)r.push({...j,isGroup:!0,shape:"rect"});else r.push({...j,isGroup:!1,shape:this.getTypeFromVertex(t),minWidth:l.flowchart?.minNodeWidth})}}getCompiledStyles(t){let r=[];for(let o of t){let a=this.classes.get(o);if(a?.styles)r=[...r,...a.styles??[]].map((l)=>l.trim());if(a?.textStyles)r=[...r,...a.textStyles??[]].map((l)=>l.trim())}return r}getData(){let t=u(),r=[],o=[],a=this.getSubGraphs(),l=new Map,k=new Map,d=new Map;for(let h of a)for(let b of h.nodes)if(this.subGraphLookup.has(b))d.set(b,h.id);let D=new Map,f=new Map;for(let h of a){let b=d.get(h.id);if(b!==void 0)f.set(b,[...f.get(b)??[],h.id])}let j=0,E=e((h)=>{D.set(h,j++);for(let b of f.get(h)??[])E(b)},"walk");for(let h of a)if(!d.has(h.id))E(h.id);let K=e((h)=>this.subGraphLookup.get(h)?.metadata?.view==="collapsed","isCollapsed"),T=e((h)=>{let b,V=new Set,N=h;while(N!==void 0&&!V.has(N)){if(V.add(N),K(N))b=N;N=d.get(N)}return b},"outermostCollapsed"),C=new Set,w=new Map;for(let h of a){let b=T(h.id);if(b===void 0)continue;if(h.id!==b)C.add(h.id),w.set(h.id,b);for(let V of h.nodes){if(V===b)continue;C.add(V),w.set(V,b)}}for(let h=a.length-1;h>=0;h--){let b=a[h];if(C.has(b.id))continue;if(b.nodes.length>0)k.set(b.id,!0);for(let V of b.nodes)l.set(V,b.id)}for(let h=a.length-1;h>=0;h--){let b=a[h];if(C.has(b.id))continue;if(b.metadata?.view==="collapsed")r.push({id:b.id,label:b.title,labelStyle:"",labelType:b.labelType,parentId:l.get(b.id),padding:8,cssCompiledStyles:this.getCompiledStyles(b.classes),cssClasses:b.classes.join(" "),shape:"collapsedGroup",dir:b.dir,isGroup:!1,look:t.look,colorIndex:D.get(b.id)});else r.push({id:b.id,label:b.title,labelStyle:"",labelType:b.labelType,parentId:l.get(b.id),padding:8,cssCompiledStyles:this.getCompiledStyles(b.classes),cssClasses:b.classes.join(" "),shape:"rect",dir:b.dir,isGroup:!0,look:t.look,colorIndex:D.get(b.id),metadata:Bt(b.metadata,!0)})}this.getVertices().forEach((h)=>{if(C.has(h.id))return;this.addNodeFromVertex(h,r,l,k,t,t.look||"classic")});let ce=this.getEdges(),Ge=ce.reduce((h,b)=>bn(b)?Math.max(h,b.step):h,0),se=Cs(t.flowchart?.stepDuration),he=t.flowchart?.stepNumbers===!0?{showStepNumber:!0}:{};ce.forEach((h,b)=>{let{arrowTypeStart:V,arrowTypeEnd:N}=this.destructEdgeType(h.type),H=[...ce.defaultStyle??[]],q=w.get(h.start)??h.start,X=w.get(h.end)??h.end;if(q===X&&(w.has(h.start)||w.has(h.end)))return;if(h.style)H.push(...h.style);let Q={id:Ve(q,X,{counter:b,prefix:"L"},h.id),isUserDefinedId:h.isUserDefinedId,start:q,end:X,type:h.type??"normal",label:h.text,labelType:h.labelType,labelpos:"c",thickness:h.stroke,minlen:h.length,classes:h?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":V,arrowTypeEnd:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":N,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(h.classes),labelStyle:H,style:H,pattern:h.stroke,look:t.look,animate:h.animate,animation:h.animation,...bn(h)?{step:h.step,stepCount:Ge,stepDuration:se,...he}:{},curve:h.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};o.push(Q)});let ze=this.droppedSubGraphMembers.length>0?{droppedSubGraphMembers:[...this.droppedSubGraphMembers]}:{};return{nodes:r,edges:o,other:ze,config:t}}validate(){if(u().layout!=="grid")return;let r=[...this.vertices.values(),...this.subGraphs];Lr(void 0,r);for(let o of r){let a=this.subGraphLookup.has(o.id);for(let l of Object.keys(o.metadata??{})){if(F1.has(l)||a&&l==="algorithm")continue;n.warn(`Unknown metadata key "${l}" on ${a?"subgraph":"node"} "${o.id}" with grid layout.`)}}}defaultConfig(){return Wr.flowchart}},B1=e(function(t,r){return r.db.getClasses()},"getClasses"),L1=e(async function(t,r,o,a){n.info("REF0:"),n.info("Drawing state diagram (v2)",r);let{securityLevel:l,flowchart:k,layout:d}=u();a.db.setDiagramId(r),n.debug("Before getData: ");let D=a.db.getData();n.debug("Data: ",D);let f=Ce(r,l),j=a.db.getDirection();D.type=a.type,D.layoutAlgorithm=Ee(d),D.direction=j,D.nodeSpacing=k?.nodeSpacing||50,D.rankSpacing=k?.rankSpacing||50,D.markers=["point","circle","cross"],D.diagramId=r,n.debug("REF1:",D),await Se(D,f);let E=D.config.flowchart?.diagramPadding??8;F.insertTitle(f,"flowchartTitleText",k?.titleTopMargin||0,a.db.getDiagramTitle()),pe(f,E,"flowchart",k?.useMaxWidth||!1)},"draw"),w1={getClasses:B1,draw:L1},Lt=function(){var t=e(function(Ne,g,m,S){for(m=m||{},S=Ne.length;S--;m[Ne[S]]=g);return m},"o"),r=[1,4],o=[1,3],a=[1,5],l=[1,8,9,10,11,27,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],k=[2,2],d=[1,13],D=[1,14],f=[1,15],j=[1,16],E=[1,23],K=[1,25],T=[1,26],C=[1,27],w=[1,51],Y=[1,50],ce=[1,30],Ge=[1,31],se=[1,32],he=[1,33],ze=[1,34],h=[1,46],b=[1,48],V=[1,44],N=[1,49],H=[1,45],q=[1,52],X=[1,47],Q=[1,53],Z=[1,54],lt=[1,35],ht=[1,36],dt=[1,37],pt=[1,38],ft=[1,39],Me=[1,59],G=[1,8,9,10,11,27,32,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],ke=[1,63],Ae=[1,62],De=[1,64],Ie=[8,9,11,76,78,79],wt=[1,80],St=[1,81],Ke=[1,95],He=[1,100],qe=[1,99],Xe=[1,96],Qe=[1,92],Ze=[1,98],$e=[1,94],et=[1,101],tt=[1,97],st=[1,102],it=[1,93],Pe=[8,9,10,11,40,76,78,79],te=[8,9,10,11,40,47,76,78,79],ne=[8,9,10,11,29,40,45,47,49,51,53,55,57,59,61,64,66,68,69,71,76,78,79,90,103,106,107,110,112,115,116,117],Vt=[8,9,11,45,61,76,78,79,90,103,106,107,110,112,115,116,117],It=[2,26],rt=[45,61,90,103,106,107,110,112,115,116,117],Rt=[1,126],Nt=[1,127],bt=[1,129],kt=[1,128],Gt=[45,61,63,75,90,103,106,107,110,112,115,116,117],Mt=[1,138],Pt=[1,152],Ot=[1,153],Ut=[1,154],Wt=[1,155],jt=[1,140],zt=[1,142],Yt=[1,146],Ht=[1,147],qt=[1,148],Xt=[1,149],Qt=[1,150],Jt=[1,151],Zt=[1,156],$t=[1,157],e1=[1,136],t1=[1,137],s1=[1,144],i1=[1,139],r1=[1,143],a1=[1,141],Tt=[8,9,10,11,27,32,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],n1=[1,159],o1=[8,9,10,11,76,78,79],u1=[1,160],l1=[1,162],z=[8,9,11],oe=[8,9,10,11,14,45,61,90,106,107,110,112,115,116,117],x=[1,182],ie=[1,178],re=[1,179],v=[1,183],_=[1,180],B=[1,181],at=[78,117,120],U=[8,9,10,11,12,14,27,29,32,45,61,76,85,86,87,88,89,90,91,106,110,112,115,116,117],c1=[10,107],Re=[31,50,52,54,56,58,63,65,67,68,70,72,117,118,119],Te=[1,253],ye=[1,251],xe=[1,255],Fe=[1,249],ve=[1,250],_e=[1,252],Be=[1,254],Le=[1,256],nt=[1,273],h1=[8,9,11,107],be=[8,9,10,11,61,85,106,107,110,111,112,113],Et={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,withShape:41,node:42,link:43,styledVertex:44,AMP:45,vertex:46,STYLE_SEPARATOR:47,idString:48,DOUBLECIRCLESTART:49,DOUBLECIRCLEEND:50,PS:51,PE:52,"(-":53,"-)":54,STADIUMSTART:55,STADIUMEND:56,SUBROUTINESTART:57,SUBROUTINEEND:58,VERTEX_WITH_PROPS_START:59,"NODE_STRING[field]":60,COLON:61,"NODE_STRING[value]":62,PIPE:63,CYLINDERSTART:64,CYLINDEREND:65,DIAMOND_START:66,DIAMOND_STOP:67,TAGEND:68,TRAPSTART:69,TRAPEND:70,INVTRAPSTART:71,INVTRAPEND:72,linkStatement:73,arrowText:74,TESTSTR:75,START_LINK:76,edgeText:77,LINK:78,LINK_ID:79,edgeTextToken:80,STR:81,MD_STR:82,textToken:83,keywords:84,STYLE:85,LINKSTYLE:86,CLASSDEF:87,CLASS:88,CLICK:89,DOWN:90,UP:91,textNoTagsToken:92,stylesOpt:93,"idString[vertex]":94,"idString[class]":95,CALLBACKNAME:96,CALLBACKARGS:97,HREF:98,LINK_TARGET:99,"STR[link]":100,"STR[tooltip]":101,alphaNum:102,DEFAULT:103,numList:104,INTERPOLATE:105,NUM:106,COMMA:107,style:108,styleComponent:109,NODE_STRING:110,UNIT:111,BRKT:112,PCT:113,idStringToken:114,MINUS:115,MULT:116,UNICODE_TEXT:117,TEXT:118,TAGSTART:119,EDGE_TEXT:120,alphaNumToken:121,direction_tb:122,direction_bt:123,direction_rl:124,direction_lr:125,direction_td:126,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",45:"AMP",47:"STYLE_SEPARATOR",49:"DOUBLECIRCLESTART",50:"DOUBLECIRCLEEND",51:"PS",52:"PE",53:"(-",54:"-)",55:"STADIUMSTART",56:"STADIUMEND",57:"SUBROUTINESTART",58:"SUBROUTINEEND",59:"VERTEX_WITH_PROPS_START",60:"NODE_STRING[field]",61:"COLON",62:"NODE_STRING[value]",63:"PIPE",64:"CYLINDERSTART",65:"CYLINDEREND",66:"DIAMOND_START",67:"DIAMOND_STOP",68:"TAGEND",69:"TRAPSTART",70:"TRAPEND",71:"INVTRAPSTART",72:"INVTRAPEND",75:"TESTSTR",76:"START_LINK",78:"LINK",79:"LINK_ID",81:"STR",82:"MD_STR",85:"STYLE",86:"LINKSTYLE",87:"CLASSDEF",88:"CLASS",89:"CLICK",90:"DOWN",91:"UP",94:"idString[vertex]",95:"idString[class]",96:"CALLBACKNAME",97:"CALLBACKARGS",98:"HREF",99:"LINK_TARGET",100:"STR[link]",101:"STR[tooltip]",103:"DEFAULT",105:"INTERPOLATE",106:"NUM",107:"COMMA",110:"NODE_STRING",111:"UNIT",112:"BRKT",113:"PCT",115:"MINUS",116:"MULT",117:"UNICODE_TEXT",118:"TEXT",119:"TAGSTART",120:"EDGE_TEXT",122:"direction_tb",123:"direction_bt",124:"direction_rl",125:"direction_lr",126:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[41,2],[41,3],[20,3],[20,4],[20,3],[20,4],[20,2],[20,1],[20,2],[20,1],[42,1],[42,5],[42,5],[44,1],[44,3],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,8],[46,4],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,1],[43,2],[43,3],[43,3],[43,1],[43,3],[43,4],[77,1],[77,2],[77,1],[77,1],[73,1],[73,2],[74,3],[30,1],[30,2],[30,1],[30,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[104,1],[104,3],[93,1],[93,3],[108,1],[108,2],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[83,1],[83,1],[83,1],[83,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[80,1],[80,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[48,1],[48,2],[102,1],[102,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:e(function(g,m,S,c,W,s,Ue){var i=s.length-1;switch(W){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 187:this.$=s[i];break;case 11:c.setDirection("TB"),this.$="TB";break;case 12:c.setDirection(s[i-1]),this.$=s[i-1];break;case 27:this.$=s[i-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=c.addSubGraph(s[i-6],s[i-1],s[i-4]);break;case 34:this.$=c.addSubGraph(s[i-3],s[i-1],s[i-3]);break;case 35:this.$=c.addSubGraph(void 0,s[i-1],void 0);break;case 37:this.$=s[i].trim(),c.setAccTitle(this.$);break;case 38:case 39:this.$=s[i].trim(),c.setAccDescription(this.$);break;case 43:this.$=s[i-1]+s[i];break;case 44:this.$=s[i];break;case 45:this.$={nodes:s[i-1],shapeData:s[i]};break;case 46:this.$={nodes:s[i-2],shapeData:s[i]};break;case 47:c.addVertex(s[i].nodes[s[i].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i].shapeData),c.addLink(s[i-2].stmt,s[i].nodes,s[i-1]),this.$={stmt:s[i].nodes,nodes:s[i].nodes.concat(s[i-2].nodes)};break;case 48:c.addVertex(s[i-1].nodes[s[i-1].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-1].shapeData),c.addLink(s[i-3].stmt,s[i-1].nodes,s[i-2]),this.$={stmt:s[i-1].nodes,nodes:s[i-1].nodes.concat(s[i-3].nodes)};break;case 49:c.addLink(s[i-2].stmt,s[i],s[i-1]),this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 50:c.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 51:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 52:c.addVertex(s[i].nodes[s[i].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i].shapeData),this.$={stmt:s[i].nodes,nodes:s[i].nodes,shapeData:s[i].shapeData};break;case 53:c.addVertex(s[i-1].nodes[s[i-1].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-1].shapeData),this.$={stmt:s[i-1].nodes,nodes:s[i-1].nodes,shapeData:s[i-1].shapeData};break;case 54:this.$={stmt:s[i],nodes:s[i]};break;case 55:this.$=[s[i]];break;case 56:c.addVertex(s[i-4].nodes[s[i-4].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4].shapeData),this.$=s[i-4].nodes.concat(s[i]);break;case 57:this.$=s[i-4].concat(s[i]);break;case 58:this.$=s[i];break;case 59:this.$=s[i-2],c.setClass(s[i-2],s[i]);break;case 60:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"square");break;case 61:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"doublecircle");break;case 62:this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"circle");break;case 63:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"ellipse");break;case 64:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"stadium");break;case 65:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"subroutine");break;case 66:this.$=s[i-7],c.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]]));break;case 67:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"cylinder");break;case 68:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"round");break;case 69:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"diamond");break;case 70:this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"hexagon");break;case 71:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"odd");break;case 72:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"trapezoid");break;case 73:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"inv_trapezoid");break;case 74:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_right");break;case 75:this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_left");break;case 76:this.$=s[i],c.addVertex(s[i]);break;case 77:s[i-1].text=s[i],this.$=s[i-1];break;case 78:case 79:s[i-2].text=s[i-1],this.$=s[i-2];break;case 80:this.$=s[i];break;case 81:var J=c.destructLink(s[i],s[i-2]);this.$={type:J.type,stroke:J.stroke,length:J.length,text:s[i-1]};break;case 82:var J=c.destructLink(s[i],s[i-2]);this.$={type:J.type,stroke:J.stroke,length:J.length,text:s[i-1],id:s[i-3]};break;case 83:this.$={text:s[i],type:"text"};break;case 84:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 85:this.$={text:s[i],type:"string"};break;case 86:this.$={text:s[i],type:"markdown"};break;case 87:var J=c.destructLink(s[i]);this.$={type:J.type,stroke:J.stroke,length:J.length};break;case 88:var J=c.destructLink(s[i]);this.$={type:J.type,stroke:J.stroke,length:J.length,id:s[i-1]};break;case 89:this.$=s[i-1];break;case 90:this.$={text:s[i],type:"text"};break;case 91:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 92:this.$={text:s[i],type:"string"};break;case 93:case 108:this.$={text:s[i],type:"markdown"};break;case 105:this.$={text:s[i],type:"text"};break;case 106:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 107:this.$={text:s[i],type:"text"};break;case 109:this.$=s[i-4],c.addClass(s[i-2],s[i]);break;case 110:this.$=s[i-4],c.setClass(s[i-2],s[i]);break;case 111:case 119:this.$=s[i-1],c.setClickEvent(s[i-1],s[i]);break;case 112:case 120:this.$=s[i-3],c.setClickEvent(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 113:this.$=s[i-2],c.setClickEvent(s[i-2],s[i-1],s[i]);break;case 114:this.$=s[i-4],c.setClickEvent(s[i-4],s[i-3],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 115:this.$=s[i-2],c.setLink(s[i-2],s[i]);break;case 116:this.$=s[i-4],c.setLink(s[i-4],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 117:this.$=s[i-4],c.setLink(s[i-4],s[i-2],s[i]);break;case 118:this.$=s[i-6],c.setLink(s[i-6],s[i-4],s[i]),c.setTooltip(s[i-6],s[i-2]);break;case 121:this.$=s[i-1],c.setLink(s[i-1],s[i]);break;case 122:this.$=s[i-3],c.setLink(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 123:this.$=s[i-3],c.setLink(s[i-3],s[i-2],s[i]);break;case 124:this.$=s[i-5],c.setLink(s[i-5],s[i-4],s[i]),c.setTooltip(s[i-5],s[i-2]);break;case 125:this.$=s[i-4],c.addVertex(s[i-2],void 0,void 0,s[i]);break;case 126:this.$=s[i-4],c.updateLink([s[i-2]],s[i]);break;case 127:this.$=s[i-4],c.updateLink(s[i-2],s[i]);break;case 128:this.$=s[i-8],c.updateLinkInterpolate([s[i-6]],s[i-2]),c.updateLink([s[i-6]],s[i]);break;case 129:this.$=s[i-8],c.updateLinkInterpolate(s[i-6],s[i-2]),c.updateLink(s[i-6],s[i]);break;case 130:this.$=s[i-6],c.updateLinkInterpolate([s[i-4]],s[i]);break;case 131:this.$=s[i-6],c.updateLinkInterpolate(s[i-4],s[i]);break;case 132:case 134:this.$=[s[i]];break;case 133:case 135:s[i-2].push(s[i]),this.$=s[i-2];break;case 137:this.$=s[i-1]+s[i];break;case 185:this.$=s[i];break;case 186:this.$=s[i-1]+""+s[i];break;case 188:this.$=s[i-1]+""+s[i];break;case 189:this.$={stmt:"dir",value:"TB"};break;case 190:this.$={stmt:"dir",value:"BT"};break;case 191:this.$={stmt:"dir",value:"RL"};break;case 192:this.$={stmt:"dir",value:"LR"};break;case 193:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:o,12:a},{1:[3]},t(l,k,{5:6}),{4:7,9:r,10:o,12:a},{4:8,9:r,10:o,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:d,9:D,10:f,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:E,33:24,34:K,36:T,38:C,41:29,42:28,44:40,45:w,46:41,48:42,61:Y,85:ce,86:Ge,87:se,88:he,89:ze,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z,122:lt,123:ht,124:dt,125:pt,126:ft},t(l,[2,9]),t(l,[2,10]),t(l,[2,11]),{8:[1,56],9:[1,57],10:Me,15:55,18:58},t(G,[2,3]),t(G,[2,4]),t(G,[2,5]),t(G,[2,6]),t(G,[2,7]),t(G,[2,8]),{8:ke,9:Ae,11:De,21:60,43:61,73:65,76:[1,66],78:[1,68],79:[1,67]},{8:ke,9:Ae,11:De,21:69},{8:ke,9:Ae,11:De,21:70},{8:ke,9:Ae,11:De,21:71},{8:ke,9:Ae,11:De,21:72},{8:ke,9:Ae,11:De,21:73},{8:ke,9:Ae,10:[1,74],11:De,21:75},t(G,[2,36]),{35:[1,76]},{37:[1,77]},t(G,[2,39]),t(Ie,[2,54],{18:78,39:79,10:wt,40:St}),t(Ie,[2,52],{18:82,10:Me}),{10:[1,83]},{10:[1,84]},{10:[1,85]},{10:[1,86]},{14:Ke,45:He,61:qe,81:[1,90],90:Xe,96:[1,87],98:[1,88],102:89,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it,121:91},t(G,[2,189]),t(G,[2,190]),t(G,[2,191]),t(G,[2,192]),t(G,[2,193]),t(Pe,[2,55]),t(Pe,[2,58],{47:[1,103]}),t(te,[2,76],{114:116,29:[1,104],45:w,49:[1,105],51:[1,106],53:[1,107],55:[1,108],57:[1,109],59:[1,110],61:Y,64:[1,111],66:[1,112],68:[1,113],69:[1,114],71:[1,115],90:h,103:b,106:V,107:N,110:H,112:q,115:X,116:Q,117:Z}),t(ne,[2,185]),t(ne,[2,146]),t(ne,[2,147]),t(ne,[2,148]),t(ne,[2,149]),t(ne,[2,150]),t(ne,[2,151]),t(ne,[2,152]),t(ne,[2,153]),t(ne,[2,154]),t(ne,[2,155]),t(ne,[2,156]),t(l,[2,12]),t(l,[2,18]),t(l,[2,19]),{9:[1,117]},t(Vt,It,{18:118,10:Me}),t(G,[2,27]),{41:119,42:120,44:40,45:w,46:41,48:42,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},t(G,[2,40]),t(G,[2,41]),t(G,[2,42]),t(rt,[2,80],{74:121,63:[1,123],75:[1,122]}),{77:124,80:125,81:Rt,82:Nt,117:bt,120:kt},{76:[1,130],78:[1,131]},t(Gt,[2,87]),t(G,[2,28]),t(G,[2,29]),t(G,[2,30]),t(G,[2,31]),t(G,[2,32]),{10:Mt,12:Pt,14:Ot,27:Ut,28:132,32:Wt,45:jt,61:zt,76:Yt,81:[1,134],82:[1,135],84:145,85:Ht,86:qt,87:Xt,88:Qt,89:Jt,90:Zt,91:$t,92:133,106:e1,110:t1,112:s1,115:i1,116:r1,117:a1},t(Tt,k,{5:158}),t(G,[2,37]),t(G,[2,38]),t(Ie,[2,51],{45:n1}),t(o1,[2,45],{40:u1}),t([8,9,11,45,76,78,79],It,{18:118,39:161,10:Me,40:St}),t(Pe,[2,44]),t(Ie,[2,53],{45:l1}),{45:w,48:163,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},{103:[1,164],104:165,106:[1,166]},{45:w,48:167,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},{45:w,48:168,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},t(z,[2,111],{10:[1,169],97:[1,170]}),{81:[1,171]},t(z,[2,119],{121:173,10:[1,172],14:Ke,45:He,61:qe,90:Xe,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it}),t(z,[2,121],{10:[1,174]}),t(oe,[2,187]),t(oe,[2,174]),t(oe,[2,175]),t(oe,[2,176]),t(oe,[2,177]),t(oe,[2,178]),t(oe,[2,179]),t(oe,[2,180]),t(oe,[2,181]),t(oe,[2,182]),t(oe,[2,183]),t(oe,[2,184]),{45:w,48:175,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},{30:176,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:184,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:186,51:[1,185],68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:187,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:188,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:189,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{110:[1,190]},{30:191,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:192,66:[1,193],68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:194,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:195,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{30:196,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},t(ne,[2,186]),t(l,[2,20]),t(Vt,[2,25]),t(Ie,[2,47],{18:197,10:Me}),t(Ie,[2,49],{39:79,18:198,10:wt,40:St}),t(rt,[2,77],{10:[1,199]}),{10:[1,200]},{30:201,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{78:[1,202],80:203,117:bt,120:kt},t(at,[2,83]),t(at,[2,85]),t(at,[2,86]),t(at,[2,172]),t(at,[2,173]),{77:204,80:125,81:Rt,82:Nt,117:bt,120:kt},t(Gt,[2,88]),{8:ke,9:Ae,10:Mt,11:De,12:Pt,14:Ot,21:206,27:Ut,29:[1,205],32:Wt,45:jt,61:zt,76:Yt,84:145,85:Ht,86:qt,87:Xt,88:Qt,89:Jt,90:Zt,91:$t,92:207,106:e1,110:t1,112:s1,115:i1,116:r1,117:a1},t(U,[2,105]),t(U,[2,107]),t(U,[2,108]),t(U,[2,161]),t(U,[2,162]),t(U,[2,163]),t(U,[2,164]),t(U,[2,165]),t(U,[2,166]),t(U,[2,167]),t(U,[2,168]),t(U,[2,169]),t(U,[2,170]),t(U,[2,171]),t(U,[2,94]),t(U,[2,95]),t(U,[2,96]),t(U,[2,97]),t(U,[2,98]),t(U,[2,99]),t(U,[2,100]),t(U,[2,101]),t(U,[2,102]),t(U,[2,103]),t(U,[2,104]),{6:11,7:12,8:d,9:D,10:f,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:E,32:[1,208],33:24,34:K,36:T,38:C,41:29,42:28,44:40,45:w,46:41,48:42,61:Y,85:ce,86:Ge,87:se,88:he,89:ze,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z,122:lt,123:ht,124:dt,125:pt,126:ft},{10:Me,18:209},t(Pe,[2,43]),t(o1,[2,46],{40:u1}),{10:Me,18:210},{10:[1,211],45:w,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:116,115:X,116:Q,117:Z},{10:[1,212]},{10:[1,213],107:[1,214]},t(c1,[2,132]),{10:[1,215],45:w,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:116,115:X,116:Q,117:Z},{10:[1,216],45:w,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:116,115:X,116:Q,117:Z},{81:[1,217]},t(z,[2,113],{10:[1,218]}),t(z,[2,115],{10:[1,219]}),{81:[1,220]},t(oe,[2,188]),{81:[1,221],99:[1,222]},t(Pe,[2,59],{114:116,45:w,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,115:X,116:Q,117:Z}),{31:[1,223],68:x,83:224,117:v,118:_,119:B},t(Re,[2,90]),t(Re,[2,92]),t(Re,[2,93]),t(Re,[2,157]),t(Re,[2,158]),t(Re,[2,159]),t(Re,[2,160]),{50:[1,225],68:x,83:224,117:v,118:_,119:B},{30:226,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{52:[1,227],68:x,83:224,117:v,118:_,119:B},{54:[1,228],68:x,83:224,117:v,118:_,119:B},{56:[1,229],68:x,83:224,117:v,118:_,119:B},{58:[1,230],68:x,83:224,117:v,118:_,119:B},{61:[1,231]},{65:[1,232],68:x,83:224,117:v,118:_,119:B},{67:[1,233],68:x,83:224,117:v,118:_,119:B},{30:234,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},{31:[1,235],68:x,83:224,117:v,118:_,119:B},{68:x,70:[1,236],72:[1,237],83:224,117:v,118:_,119:B},{68:x,70:[1,239],72:[1,238],83:224,117:v,118:_,119:B},t(Ie,[2,48],{45:l1}),t(Ie,[2,50],{45:n1}),t(rt,[2,79]),t(rt,[2,78]),{63:[1,240],68:x,83:224,117:v,118:_,119:B},t(rt,[2,81]),t(at,[2,84]),{78:[1,241],80:203,117:bt,120:kt},{30:242,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},t(Tt,k,{5:243}),t(U,[2,106]),t(G,[2,35]),{44:244,45:w,46:41,48:42,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},{44:245,45:w,46:41,48:42,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},{10:Te,61:ye,85:xe,93:246,106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},{10:Te,61:ye,85:xe,93:257,105:[1,258],106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},{10:Te,61:ye,85:xe,93:259,105:[1,260],106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},{106:[1,261]},{10:Te,61:ye,85:xe,93:262,106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},{45:w,48:263,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z},t(z,[2,112]),{81:[1,264]},{81:[1,265],99:[1,266]},t(z,[2,120]),t(z,[2,122],{10:[1,267]}),t(z,[2,123]),t(te,[2,60]),t(Re,[2,91]),t(te,[2,61]),{52:[1,268],68:x,83:224,117:v,118:_,119:B},t(te,[2,68]),t(te,[2,63]),t(te,[2,64]),t(te,[2,65]),{110:[1,269]},t(te,[2,67]),t(te,[2,69]),{67:[1,270],68:x,83:224,117:v,118:_,119:B},t(te,[2,71]),t(te,[2,72]),t(te,[2,74]),t(te,[2,73]),t(te,[2,75]),t([10,45,61,90,103,106,107,110,112,115,116,117],[2,89]),t(rt,[2,82]),{31:[1,271],68:x,83:224,117:v,118:_,119:B},{6:11,7:12,8:d,9:D,10:f,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:E,32:[1,272],33:24,34:K,36:T,38:C,41:29,42:28,44:40,45:w,46:41,48:42,61:Y,85:ce,86:Ge,87:se,88:he,89:ze,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z,122:lt,123:ht,124:dt,125:pt,126:ft},t(Pe,[2,57]),t(Pe,[2,56]),t(z,[2,125],{107:nt}),t(h1,[2,134],{109:274,10:Te,61:ye,85:xe,106:Fe,110:ve,111:_e,112:Be,113:Le}),t(be,[2,136]),t(be,[2,138]),t(be,[2,139]),t(be,[2,140]),t(be,[2,141]),t(be,[2,142]),t(be,[2,143]),t(be,[2,144]),t(be,[2,145]),t(z,[2,126],{107:nt}),{10:[1,275]},t(z,[2,127],{107:nt}),{10:[1,276]},t(c1,[2,133]),t(z,[2,109],{107:nt}),t(z,[2,110],{114:116,45:w,61:Y,90:h,103:b,106:V,107:N,110:H,112:q,115:X,116:Q,117:Z}),t(z,[2,114]),t(z,[2,116],{10:[1,277]}),t(z,[2,117]),{99:[1,278]},{52:[1,279]},{63:[1,280]},{67:[1,281]},{8:ke,9:Ae,11:De,21:282},t(G,[2,34]),{10:Te,61:ye,85:xe,106:Fe,108:283,109:248,110:ve,111:_e,112:Be,113:Le},t(be,[2,137]),{14:Ke,45:He,61:qe,90:Xe,102:284,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it,121:91},{14:Ke,45:He,61:qe,90:Xe,102:285,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it,121:91},{99:[1,286]},t(z,[2,124]),t(te,[2,62]),{30:287,68:x,81:ie,82:re,83:177,117:v,118:_,119:B},t(te,[2,70]),t(Tt,k,{5:288}),t(h1,[2,135],{109:274,10:Te,61:ye,85:xe,106:Fe,110:ve,111:_e,112:Be,113:Le}),t(z,[2,130],{121:173,10:[1,289],14:Ke,45:He,61:qe,90:Xe,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it}),t(z,[2,131],{121:173,10:[1,290],14:Ke,45:He,61:qe,90:Xe,106:Qe,107:Ze,110:$e,112:et,115:tt,116:st,117:it}),t(z,[2,118]),{31:[1,291],68:x,83:224,117:v,118:_,119:B},{6:11,7:12,8:d,9:D,10:f,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:E,32:[1,292],33:24,34:K,36:T,38:C,41:29,42:28,44:40,45:w,46:41,48:42,61:Y,85:ce,86:Ge,87:se,88:he,89:ze,90:h,103:b,106:V,107:N,110:H,112:q,114:43,115:X,116:Q,117:Z,122:lt,123:ht,124:dt,125:pt,126:ft},{10:Te,61:ye,85:xe,93:293,106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},{10:Te,61:ye,85:xe,93:294,106:Fe,108:247,109:248,110:ve,111:_e,112:Be,113:Le},t(te,[2,66]),t(G,[2,33]),t(z,[2,128],{107:nt}),t(z,[2,129],{107:nt})],defaultActions:{},parseError:e(function(g,m){if(m.recoverable)this.trace(g);else{var S=Error(g);throw S.hash=m,S}},"parseError"),parse:e(function(g){var m=this,S=[0],c=[],W=[null],s=[],Ue=this.table,i="",J=0,d1=0,p1=0,S1=2,f1=1,T1=s.slice.call(arguments,1),ee=Object.create(this.lexer),We={yy:{}};for(var yt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,yt))We.yy[yt]=this.yy[yt];if(ee.setInput(g,We.yy),We.yy.lexer=ee,We.yy.parser=this,typeof ee.yylloc>"u")ee.yylloc={};var xt=ee.yylloc;s.push(xt);var E1=ee.options&&ee.options.ranges;if(typeof We.yy.parseError==="function")this.parseError=We.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function y1(le){S.length=S.length-2*le,W.length=W.length-le,s.length=s.length-le}e(y1,"popStack");function b1(){var le=c.pop()||ee.lex()||f1;if(typeof le!=="number"){if(le instanceof Array)c=le,le=c.pop();le=m.symbols_[le]||le}return le}e(b1,"lex");var ae,Ft,je,ue,G1,vt,ot={},At,we,k1,Ct;while(!0){if(je=S[S.length-1],this.defaultActions[je])ue=this.defaultActions[je];else{if(ae===null||typeof ae>"u")ae=b1();ue=Ue[je]&&Ue[je][ae]}if(typeof ue>"u"||!ue.length||!ue[0]){var _t="";Ct=[];for(At in Ue[je])if(this.terminals_[At]&&At>S1)Ct.push("'"+this.terminals_[At]+"'");if(ee.showPosition)_t="Parse error on line "+(J+1)+`:
|
|
10
10
|
`+ee.showPosition()+`
|
|
11
11
|
Expecting `+Ct.join(", ")+", got '"+(this.terminals_[ae]||ae)+"'";else _t="Parse error on line "+(J+1)+": Unexpected "+(ae==f1?"end of input":"'"+(this.terminals_[ae]||ae)+"'");this.parseError(_t,{text:ee.match,token:this.terminals_[ae]||ae,line:ee.yylineno,loc:xt,expected:Ct})}if(ue[0]instanceof Array&&ue.length>1)throw Error("Parse Error: multiple actions possible at state: "+je+", token: "+ae);switch(ue[0]){case 1:if(S.push(ae),W.push(ee.yytext),s.push(ee.yylloc),S.push(ue[1]),ae=null,!Ft){if(d1=ee.yyleng,i=ee.yytext,J=ee.yylineno,xt=ee.yylloc,p1>0)p1--}else ae=Ft,Ft=null;break;case 2:if(we=this.productions_[ue[1]][1],ot.$=W[W.length-we],ot._$={first_line:s[s.length-(we||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(we||1)].first_column,last_column:s[s.length-1].last_column},E1)ot._$.range=[s[s.length-(we||1)].range[0],s[s.length-1].range[1]];if(vt=this.performAction.apply(ot,[i,d1,J,We.yy,ue[1],W,s].concat(T1)),typeof vt<"u")return vt;if(we)S=S.slice(0,-1*we*2),W=W.slice(0,-1*we),s=s.slice(0,-1*we);S.push(this.productions_[ue[1]][0]),W.push(ot.$),s.push(ot._$),k1=Ue[S[S.length-2]][S[S.length-1]],S.push(k1);break;case 3:return!0}}return!0},"parse")},C1=function(){var Ne={EOF:1,parseError:e(function(m,S){if(this.yy.parser)this.yy.parser.parseError(m,S);else throw Error(m)},"parseError"),setInput:e(function(g,m){if(this.yy=m||this.yy||{},this._input=g,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var m=g.match(/(?:\r\n?|\n).*/g);if(m)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),g},"input"),unput:e(function(g){var m=g.length,S=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var c=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),S.length-1)this.yylineno-=S.length-1;var W=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:S?(S.length===c.length?this.yylloc.first_column:0)+c[c.length-S.length].length-S[0].length:this.yylloc.first_column-m},this.options.ranges)this.yylloc.range=[W[0],W[0]+this.yyleng-m];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
12
12
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(g){this.unput(this.match.slice(g))},"less"),pastInput:e(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var g=this.match;if(g.length<20)g+=this._input.substr(0,20-g.length);return(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var g=this.pastInput(),m=Array(g.length+1).join("-");return g+this.upcomingInput()+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e,p}from"./index.
|
|
1
|
+
import{e,p}from"./index.5sj251kq.js";var Ce=e((o,t)=>{let n;if(t==="sandbox")n=p("#i"+o);return(t==="sandbox"?p(n.nodes()[0].contentDocument.body):p("body")).select(`[id="${o}"]`)},"getDiagramElement");
|
|
2
2
|
export{Ce};
|