=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(i,e.arrowTypeEnd)){const{angle:t,deltaX:n}=o(r[r.length-1],r[r.length-2]);s=i[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}const c=Math.abs(a(t).x-a(r[r.length-1]).x),u=Math.abs(a(t).y-a(r[r.length-1]).y),h=Math.abs(a(t).x-a(r[0]).x),d=Math.abs(a(t).y-a(r[0]).y),f=i[e.arrowTypeStart],p=i[e.arrowTypeEnd];if(c0&&u
0&&d=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(i,e.arrowTypeEnd)){const{angle:t,deltaY:n}=o(r[r.length-1],r[r.length-2]);s=i[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}const c=Math.abs(a(t).y-a(r[r.length-1]).y),u=Math.abs(a(t).x-a(r[r.length-1]).x),h=Math.abs(a(t).y-a(r[0]).y),d=Math.abs(a(t).x-a(r[0]).x),f=i[e.arrowTypeStart],p=i[e.arrowTypeEnd];if(c0&&u
0&&d{"use strict";n.d(t,{O:()=>r});var r=(0,n(3072).K2)((e=>{let{flowchart:t}=e;const n=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:n,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n+r}}),"getSubGraphTitleMargins")},9895:(e,t,n)=>{"use strict";n.d(t,{IU:()=>m,Jo:()=>T,T_:()=>x,g0:()=>F,jP:()=>b});var r=n(5155),i=n(5713),o=n(2970),a=n(5036),s=n(8862),l=n(3072),c=n(3638),u=n(8205),h=(0,l.K2)(((e,t,n,r,i)=>{t.arrowTypeStart&&f(e,"start",t.arrowTypeStart,n,r,i),t.arrowTypeEnd&&f(e,"end",t.arrowTypeEnd,n,r,i)}),"addEdgeMarkers"),d={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},f=(0,l.K2)(((e,t,n,r,i,o)=>{const a=d[n];if(!a)return void l.Rm.warn(`Unknown arrow type: ${n}`);const s="start"===t?"Start":"End";e.attr(`marker-${t}`,`url(${r}#${i}_${o}-${a}${s})`)}),"addEdgeMarker"),p=new Map,g=new Map,m=(0,l.K2)((()=>{p.clear(),g.clear()}),"clear"),y=(0,l.K2)((e=>e?e.reduce(((e,t)=>e+";"+t),""):""),"getLabelStyles"),b=(0,l.K2)((async(e,t)=>{let n=(0,l._3)((0,l.D7)().flowchart.htmlLabels);const i=await(0,a.GZ)(e,t.label,{style:y(t.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1});l.Rm.info("abc82",t,t.labelType);const o=e.insert("g").attr("class","edgeLabel"),s=o.insert("g").attr("class","label");s.node().appendChild(i);let u,h=i.getBBox();if(n){const e=i.children[0],t=(0,c.Ltv)(i);h=e.getBoundingClientRect(),t.attr("width",h.width),t.attr("height",h.height)}if(s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),p.set(t.id,o),t.width=h.width,t.height=h.height,t.startLabelLeft){const n=await(0,r.DA)(t.startLabelLeft,y(t.labelStyle)),i=e.insert("g").attr("class","edgeTerminals"),o=i.insert("g").attr("class","inner");u=o.node().appendChild(n);const a=n.getBBox();o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),g.get(t.id)||g.set(t.id,{}),g.get(t.id).startLeft=i,v(u,t.startLabelLeft)}if(t.startLabelRight){const n=await(0,r.DA)(t.startLabelRight,y(t.labelStyle)),i=e.insert("g").attr("class","edgeTerminals"),o=i.insert("g").attr("class","inner");u=i.node().appendChild(n),o.node().appendChild(n);const a=n.getBBox();o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),g.get(t.id)||g.set(t.id,{}),g.get(t.id).startRight=i,v(u,t.startLabelRight)}if(t.endLabelLeft){const n=await(0,r.DA)(t.endLabelLeft,y(t.labelStyle)),i=e.insert("g").attr("class","edgeTerminals"),o=i.insert("g").attr("class","inner");u=o.node().appendChild(n);const a=n.getBBox();o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),i.node().appendChild(n),g.get(t.id)||g.set(t.id,{}),g.get(t.id).endLeft=i,v(u,t.endLabelLeft)}if(t.endLabelRight){const n=await(0,r.DA)(t.endLabelRight,y(t.labelStyle)),i=e.insert("g").attr("class","edgeTerminals"),o=i.insert("g").attr("class","inner");u=o.node().appendChild(n);const a=n.getBBox();o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),i.node().appendChild(n),g.get(t.id)||g.set(t.id,{}),g.get(t.id).endRight=i,v(u,t.endLabelRight)}return i}),"insertEdgeLabel");function v(e,t){(0,l.D7)().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}(0,l.K2)(v,"setTerminalWidth");var x=(0,l.K2)(((e,t)=>{l.Rm.debug("Moving label abc88 ",e.id,e.label,p.get(e.id),t);let n=t.updatedPath?t.updatedPath:t.originalPath;const r=(0,l.D7)(),{subGraphTitleTotalMargin:i}=(0,o.O)(r);if(e.label){const r=p.get(e.id);let o=e.x,a=e.y;if(n){const r=s._K.calcLabelPosition(n);l.Rm.debug("Moving label "+e.label+" from (",o,",",a,") to (",r.x,",",r.y,") abc88"),t.updatedPath&&(o=r.x,a=r.y)}r.attr("transform",`translate(${o}, ${a+i/2})`)}if(e.startLabelLeft){const t=g.get(e.id).startLeft;let r=e.x,i=e.y;if(n){const t=s._K.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",n);r=t.x,i=t.y}t.attr("transform",`translate(${r}, ${i})`)}if(e.startLabelRight){const t=g.get(e.id).startRight;let r=e.x,i=e.y;if(n){const t=s._K.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",n);r=t.x,i=t.y}t.attr("transform",`translate(${r}, ${i})`)}if(e.endLabelLeft){const t=g.get(e.id).endLeft;let r=e.x,i=e.y;if(n){const t=s._K.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",n);r=t.x,i=t.y}t.attr("transform",`translate(${r}, ${i})`)}if(e.endLabelRight){const t=g.get(e.id).endRight;let r=e.x,i=e.y;if(n){const t=s._K.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",n);r=t.x,i=t.y}t.attr("transform",`translate(${r}, ${i})`)}}),"positionEdgeLabel"),k=(0,l.K2)(((e,t)=>{const n=e.x,r=e.y,i=Math.abs(t.x-n),o=Math.abs(t.y-r),a=e.width/2,s=e.height/2;return i>=a||o>=s}),"outsideNode"),w=(0,l.K2)(((e,t,n)=>{l.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(t)}\n insidePoint : ${JSON.stringify(n)}\n node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const r=e.x,i=e.y,o=Math.abs(r-n.x),a=e.width/2;let s=n.xMath.abs(r-t.x)*c){let e=n.y{l.Rm.warn("abc88 cutPathAtIntersect",e,t);let n=[],r=e[0],i=!1;return e.forEach((e=>{if(l.Rm.info("abc88 checking point",e,t),k(t,e)||i)l.Rm.warn("abc88 outside",e,r),r=e,i||n.push(e);else{const o=w(t,r,e);l.Rm.debug("abc88 inside",e,r,o),l.Rm.debug("abc88 intersection",o,t);let a=!1;n.forEach((e=>{a=a||e.x===o.x&&e.y===o.y})),n.some((e=>e.x===o.x&&e.y===o.y))?l.Rm.warn("abc88 no intersect",o,n):n.push(o),i=!0}})),l.Rm.debug("returning points",n),n}),"cutPathAtIntersect");function S(e){const t=[],n=[];for(let r=1;r5&&Math.abs(o.y-i.y)>5||i.y===o.y&&o.x===a.x&&Math.abs(o.x-i.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}(0,l.K2)(S,"extractCornerPoints");var _=(0,l.K2)((function(e,t,n){const r=t.x-e.x,i=t.y-e.y,o=n/Math.sqrt(r*r+i*i);return{x:t.x-o*r,y:t.y-o*i}}),"findAdjacentPoint"),A=(0,l.K2)((function(e){const{cornerPointPositions:t}=S(e),n=[];for(let r=0;r10&&Math.abs(i.y-t.y)>=10){l.Rm.debug("Corner point fixing",Math.abs(i.x-t.x),Math.abs(i.y-t.y));const e=5;d=o.x===a.x?{x:c<0?a.x-e+h:a.x+e-h,y:u<0?a.y-h:a.y+h}:{x:c<0?a.x-h:a.x+h,y:u<0?a.y-e+h:a.y+e-h}}else l.Rm.debug("Corner point skipping fixing",Math.abs(i.x-t.x),Math.abs(i.y-t.y));n.push(d,s)}else n.push(e[r]);return n}),"fixCorners"),T=(0,l.K2)((function(e,t,n,r,o,a,s){const{handDrawnSeed:d}=(0,l.D7)();let f=t.points,p=!1;const g=o;var m=a;m.intersect&&g.intersect&&(f=f.slice(1,t.points.length-1),f.unshift(g.intersect(f[0])),l.Rm.debug("Last point APA12",t.start,"--\x3e",t.end,f[f.length-1],m,m.intersect(f[f.length-1])),f.push(m.intersect(f[f.length-1]))),t.toCluster&&(l.Rm.info("to cluster abc88",n.get(t.toCluster)),f=C(t.points,n.get(t.toCluster).node),p=!0),t.fromCluster&&(l.Rm.debug("from cluster abc88",n.get(t.fromCluster),JSON.stringify(f,null,2)),f=C(f.reverse(),n.get(t.fromCluster).node).reverse(),p=!0);let y=f.filter((e=>!Number.isNaN(e.y)));y=A(y);let b=c.qrM;t.curve&&(b=t.curve);const{x:v,y:x}=(0,i.R)(t),k=(0,c.n8j)().x(v).y(x).curve(b);let w,S;switch(t.thickness){case"normal":default:w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible"}switch(t.pattern){case"solid":default:w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed"}let _=k(y);const T=Array.isArray(t.style)?t.style:[t.style];if("handDrawn"===t.look){const n=u.A.svg(e);Object.assign([],y);const r=n.path(_,{roughness:.3,seed:d});w+=" transition",S=(0,c.Ltv)(r).select("path").attr("id",t.id).attr("class"," "+w+(t.classes?" "+t.classes:"")).attr("style",T?T.reduce(((e,t)=>e+";"+t),""):"");let i=S.attr("d");S.attr("d",i),e.node().appendChild(S.node())}else S=e.append("path").attr("d",_).attr("id",t.id).attr("class"," "+w+(t.classes?" "+t.classes:"")).attr("style",T?T.reduce(((e,t)=>e+";"+t),""):"");let E="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,E=E.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),l.Rm.info("arrowTypeStart",t.arrowTypeStart),l.Rm.info("arrowTypeEnd",t.arrowTypeEnd),h(S,t,E,s,r);let M={};return p&&(M.updatedPath=f),M.originalPath=t.points,M}),"insertEdge"),E=(0,l.K2)(((e,t,n,r)=>{t.forEach((t=>{M[t](e,n,r)}))}),"insertMarkers"),M={extension:(0,l.K2)(((e,t,n)=>{l.Rm.trace("Making markers for ",n),e.append("defs").append("marker").attr("id",n+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",n+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")}),"extension"),composition:(0,l.K2)(((e,t,n)=>{e.append("defs").append("marker").attr("id",n+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",n+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"composition"),aggregation:(0,l.K2)(((e,t,n)=>{e.append("defs").append("marker").attr("id",n+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",n+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"aggregation"),dependency:(0,l.K2)(((e,t,n)=>{e.append("defs").append("marker").attr("id",n+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",n+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"dependency"),lollipop:(0,l.K2)(((e,t,n)=>{e.append("defs").append("marker").attr("id",n+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",n+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:(0,l.K2)(((e,t,n)=>{e.append("marker").attr("id",n+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",n+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"point"),circle:(0,l.K2)(((e,t,n)=>{e.append("marker").attr("id",n+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",n+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"circle"),cross:(0,l.K2)(((e,t,n)=>{e.append("marker").attr("id",n+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",n+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")}),"cross"),barb:(0,l.K2)(((e,t,n)=>{e.append("defs").append("marker").attr("id",n+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"barb")},F=E},3072:(e,t,n)=>{"use strict";n.d(t,{C0:()=>_,VA:()=>y,K2:()=>m,xA:()=>he,hH:()=>P,Dl:()=>Re,IU:()=>nt,Wt:()=>Xe,Y2:()=>qe,a$:()=>Ke,sb:()=>J,ME:()=>ft,UI:()=>Q,Ch:()=>T,mW:()=>A,DB:()=>C,_3:()=>Fe,EJ:()=>w,m7:()=>at,iN:()=>it,zj:()=>ce,D7:()=>ht,Gs:()=>vt,J$:()=>F,ab:()=>lt,Q2:()=>se,P$:()=>j,Wi:()=>ze,H1:()=>ye,Rm:()=>v,QO:()=>$e,Js:()=>bt,Xd:()=>E,VJ:()=>je,cL:()=>de,$i:()=>X,jZ:()=>Ce,oB:()=>pt,wZ:()=>oe,EI:()=>ot,SV:()=>rt,Nk:()=>le,XV:()=>dt,ke:()=>st,He:()=>x,UU:()=>ie,ot:()=>Ue,mj:()=>gt,tM:()=>Qe,H$:()=>K,B6:()=>ae});var r=n(446),i=n(1458),o=n(6453);const a=(e,t)=>{const n=i.A.parse(e),r={};for(const i in t)t[i]&&(r[i]=n[i]+t[i]);return(0,o.A)(e,r)};var s=n(6471);const l=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;const{r:r,g:o,b:a,a:l}=i.A.parse(e),{r:c,g:u,b:h,a:d}=i.A.parse(t),f=n/100,p=2*f-1,g=l-d,m=((p*g===-1?p:(p+g)/(1+p*g))+1)/2,y=1-m,b=r*m+c*y,v=o*m+u*y,x=a*m+h*y,k=l*f+d*(1-f);return(0,s.A)(b,v,x,k)},c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;const n=i.A.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,l(n,e,t)};var u,h=n(5554),d=n(6362),f=n(8194),p=n(7977),g=Object.defineProperty,m=(e,t)=>g(e,"name",{value:t,configurable:!0}),y=(e,t)=>{for(var n in t)g(e,n,{get:t[n],enumerable:!0})},b={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},v={trace:m((function(){}),"trace"),debug:m((function(){}),"debug"),info:m((function(){}),"info"),warn:m((function(){}),"warn"),error:m((function(){}),"error"),fatal:m((function(){}),"fatal")},x=m((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal",t=b.fatal;"string"===typeof e?e.toLowerCase()in b&&(t=b[e]):"number"===typeof e&&(t=e),v.trace=()=>{},v.debug=()=>{},v.info=()=>{},v.warn=()=>{},v.error=()=>{},v.fatal=()=>{},t<=b.fatal&&(v.fatal=console.error?console.error.bind(console,k("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",k("FATAL"))),t<=b.error&&(v.error=console.error?console.error.bind(console,k("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",k("ERROR"))),t<=b.warn&&(v.warn=console.warn?console.warn.bind(console,k("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",k("WARN"))),t<=b.info&&(v.info=console.info?console.info.bind(console,k("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",k("INFO"))),t<=b.debug&&(v.debug=console.debug?console.debug.bind(console,k("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",k("DEBUG"))),t<=b.trace&&(v.trace=console.debug?console.debug.bind(console,k("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",k("TRACE")))}),"setLogLevel"),k=m((e=>`%c${r().format("ss.SSS")} : ${e} : `),"format"),w=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,C=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,S=/\s*%%.*\n/gm,_=class extends Error{static#e=(()=>m(this,"UnknownDiagramError"))();constructor(e){super(e),this.name="UnknownDiagramError"}},A={},T=m((function(e,t){e=e.replace(w,"").replace(C,"").replace(S,"\n");for(const[n,{detector:r}]of Object.entries(A)){if(r(e,t))return n}throw new _(`No diagram type detected matching given configuration for text: ${e}`)}),"detectType"),E=m((function(){for(var e=arguments.length,t=new Array(e),n=0;n{A[e]&&v.warn(`Detector with key ${e} already exists. Overwriting.`),A[e]={detector:t,loader:n},v.debug(`Detector with key ${e} added${n?" with loader":""}`)}),"addDetector"),F=m((e=>A[e].loader),"getDiagramLoader"),L=m((function(e,t){let{depth:n=2,clobber:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={depth:n,clobber:r};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach((t=>L(e,t,i))),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach((t=>{e.includes(t)||e.push(t)})),e):void 0===e||n<=0?void 0!==e&&null!==e&&"object"===typeof e&&"object"===typeof t?Object.assign(e,t):t:(void 0!==t&&"object"===typeof e&&"object"===typeof t&&Object.keys(t).forEach((i=>{"object"!==typeof t[i]||void 0!==e[i]&&"object"!==typeof e[i]?(r||"object"!==typeof e[i]&&"object"!==typeof t[i])&&(e[i]=t[i]):(void 0===e[i]&&(e[i]=Array.isArray(t[i])?[]:{}),e[i]=L(e[i],t[i],{depth:n-1,clobber:r}))})),e)}),"assignWithDepth"),P=L,$="#ffffff",B="#f2f2f2",O=m(((e,t)=>a(e,t?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),I=class{static#e=(()=>m(this,"Theme"))();constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,h.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[t]=e[t]})),this.updateColors(),t.forEach((t=>{this[t]=e[t]}))}},D=m((e=>{const t=new I;return t.calculate(e),t}),"getThemeVariables"),N=class{static#e=(()=>m(this,"Theme"))();constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.A)(c("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,h.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,h.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,d.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,d.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,d.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330});for(let e=0;e{this[t]=e[t]})),this.updateColors(),t.forEach((t=>{this[t]=e[t]}))}},z=m((e=>{const t=new N;return t.calculate(e),t}),"getThemeVariables"),R=class{static#e=(()=>m(this,"Theme"))();constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=a(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=(0,s.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.A)(this.tertiaryColor,40);for(let e=0;e{this[t]=e[t]})),this.updateColors(),t.forEach((t=>{this[t]=e[t]}))}},j=m((e=>{const t=new R;return t.calculate(e),t}),"getThemeVariables"),q=class{static#e=(()=>m(this,"Theme"))();constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,d.A)("#cde498",10),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.primaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,h.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.A)(this.tertiaryColor,40);for(let e=0;e{this[t]=e[t]})),this.updateColors(),t.forEach((t=>{this[t]=e[t]}))}},H=m((e=>{const t=new q;return t.calculate(e),t}),"getThemeVariables"),W=class{static#e=(()=>m(this,"Theme"))();constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,d.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,d.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,d.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[t]=e[t]})),this.updateColors(),t.forEach((t=>{this[t]=e[t]}))}},K={base:{getThemeVariables:D},dark:{getThemeVariables:z},default:{getThemeVariables:j},forest:{getThemeVariables:H},neutral:{getThemeVariables:m((e=>{const t=new W;return t.calculate(e),t}),"getThemeVariables")}},U={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},V={...U,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:K.default.getThemeVariables(),sequence:{...U.sequence,messageFont:m((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:m((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:m((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...U.gantt,tickInterval:void 0,useWidth:void 0},c4:{...U.c4,useWidth:void 0,personFont:m((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:m((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:m((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:m((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:m((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:m((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:m((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:m((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:m((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:m((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:m((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:m((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:m((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:m((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:m((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:m((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:m((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:m((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:m((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:m((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:m((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:m((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...U.pie,useWidth:984},xyChart:{...U.xyChart,useWidth:void 0},requirement:{...U.requirement,useWidth:void 0},packet:{...U.packet}},Y=m((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.keys(e).reduce(((n,r)=>Array.isArray(e[r])?n:"object"===typeof e[r]&&null!==e[r]?[...n,t+r,...Y(e[r],"")]:[...n,t+r]),[])}),"keyify"),G=new Set(Y(V,"")),Q=V,X=m((e=>{if(v.debug("sanitizeDirective called with",e),"object"===typeof e&&null!=e)if(Array.isArray(e))e.forEach((e=>X(e)));else{for(const t of Object.keys(e)){if(v.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!G.has(t)||null==e[t]){v.debug("sanitize deleting key: ",t),delete e[t];continue}if("object"===typeof e[t]){v.debug("sanitizing object",t),X(e[t]);continue}const n=["themeCSS","fontFamily","altFontFamily"];for(const r of n)t.includes(r)&&(v.debug("sanitizing css option",t),e[t]=Z(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}v.debug("After sanitization",e)}}),"sanitizeDirective"),Z=m((e=>{let t=0,n=0;for(const r of e){if(t{let n=P({},e),r={};for(const i of t)ue(i),r=P(r,i);if(n=P(n,r),r.theme&&r.theme in K){const e=P({},u),t=P(e.themeVariables||{},r.themeVariables);n.theme&&n.theme in K&&(n.themeVariables=K[n.theme].getThemeVariables(t))}return me(ne=n),ne}),"updateCurrentConfig"),ie=m((e=>(ee=P({},J),ee=P(ee,e),e.theme&&K[e.theme]&&(ee.themeVariables=K[e.theme].getThemeVariables(e.themeVariables)),re(ee,te),ee)),"setSiteConfig"),oe=m((e=>{u=P({},e)}),"saveConfigFromInitialize"),ae=m((e=>(ee=P(ee,e),re(ee,te),ee)),"updateSiteConfig"),se=m((()=>P({},ee)),"getSiteConfig"),le=m((e=>(me(e),P(ne,e),ce())),"setConfig"),ce=m((()=>P({},ne)),"getConfig"),ue=m((e=>{e&&(["secure",...ee.secure??[]].forEach((t=>{Object.hasOwn(e,t)&&(v.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])})),Object.keys(e).forEach((t=>{t.startsWith("__")&&delete e[t]})),Object.keys(e).forEach((t=>{"string"===typeof e[t]&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],"object"===typeof e[t]&&ue(e[t])})))}),"sanitize"),he=m((e=>{X(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),te.push(e),re(ee,te)}),"addDirective"),de=m((function(){re(arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee,te=[])}),"reset"),fe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},pe={},ge=m((e=>{pe[e]||(v.warn(fe[e]),pe[e]=!0)}),"issueWarning"),me=m((e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ge("LAZY_LOAD_DEPRECATED")}),"checkConfig"),ye=/
/gi,be=m((e=>{if(!e)return[""];return Ee(e).replace(/\\n/g,"#br#").split("#br#")}),"getRows"),ve=(()=>{let e=!1;return()=>{e||(xe(),e=!0)}})();function xe(){const e="data-temp-href-target";p.A.addHook("beforeSanitizeAttributes",(t=>{t instanceof Element&&"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")})),p.A.addHook("afterSanitizeAttributes",(t=>{t instanceof Element&&"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target")&&t.setAttribute("rel","noopener"))}))}m(xe,"setupDompurifyHooks");var ke=m((e=>{ve();return p.A.sanitize(e)}),"removeScript"),we=m(((e,t)=>{if(!1!==t.flowchart?.htmlLabels){const n=t.securityLevel;"antiscript"===n||"strict"===n?e=ke(e):"loose"!==n&&(e=(e=(e=Ee(e)).replace(/