`+n+""+i+`>
`}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Tc(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`${e}
`}checkbox({checked:t}){return" '}paragraph({tokens:t}){return`${this.parser.parseInline(t)}
`}table(t){let e="",r="";for(let i=0;i${n}`),`
`}tablerow({text:t}){return`
${t}
`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`${r}>
`}strong({tokens:t}){return`${this.parser.parseInline(t)} `}em({tokens:t}){return`${this.parser.parseInline(t)} `}codespan({text:t}){return`${Tc(t,!0)}`}br(t){return" "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),i=kZ(t);if(i===null)return n;t=i;let a='"+n+" ",a}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=kZ(t);if(i===null)return Tc(r);t=i;let a=` ",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Tc(t.text)}},x9=class{static{o(this,"$")}strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Iu=class u9{static{o(this,"l")}options;renderer;textRenderer;constructor(e){this.options=e||jd,this.options.renderer=this.options.renderer||new HT,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new x9}static parse(e,r){return new u9(r).parse(e)}static parseInline(e,r){return new u9(r).parseInline(e)}parse(e,r=!0){let n="";for(let i=0;i{let s=i[a].flat(1/0);r=r.concat(this.walkTokens(s,e))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=e.renderers[i.name];a?e.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new HT(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=r.renderer[s],u=i[s];i[s]=(...h)=>{let f=l.apply(i,h);return f===!1&&(f=u.apply(i,h)),f||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new UT(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=r.tokenizer[s],u=i[s];i[s]=(...h)=>{let f=l.apply(i,h);return f===!1&&(f=u.apply(i,h)),f}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new S2;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=r.hooks[s],u=i[s];S2.passThroughHooks.has(a)?i[s]=h=>{if(this.defaults.async&&S2.passThroughHooksRespectAsync.has(a))return Promise.resolve(l.call(i,h)).then(d=>u.call(i,d));let f=l.call(i,h);return u.call(i,f)}:i[s]=(...h)=>{let f=l.apply(i,h);return f===!1&&(f=u.apply(i,h)),f}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Mu.lex(t,e??this.defaults)}parser(t,e){return Iu.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);let s=i.hooks?i.hooks.provideLexer():t?Mu.lex:Mu.lexInline,l=i.hooks?i.hooks.provideParser():t?Iu.parse:Iu.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then(u=>s(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let u=s(e,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let h=l(u,i);return i.hooks&&(h=i.hooks.postprocess(h)),h}catch(u){return a(u)}}}onError(t,e){return r=>{if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let n="An error occurred:
"+Tc(r.message+"",!0)+" ";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Xd=new z9e;o(nn,"d");nn.options=nn.setOptions=function(t){return Xd.setOptions(t),nn.defaults=Xd.defaults,CZ(nn.defaults),nn};nn.getDefaults=h9;nn.defaults=jd;nn.use=function(...t){return Xd.use(...t),nn.defaults=Xd.defaults,CZ(nn.defaults),nn};nn.walkTokens=function(t,e){return Xd.walkTokens(t,e)};nn.parseInline=Xd.parseInline;nn.Parser=Iu;nn.parser=Iu.parse;nn.Renderer=HT;nn.TextRenderer=x9;nn.Lexer=Mu;nn.lexer=Mu.lex;nn.Tokenizer=UT;nn.Hooks=S2;nn.parse=nn;M6t=nn.options,I6t=nn.setOptions,O6t=nn.use,P6t=nn.walkTokens,B6t=nn.parseInline,F6t=Iu.parse,$6t=Mu.lex});function G9e(t,{markdownAutoWrap:e}){let n=t.replace(/ /g,`
`).replace(/\n{2,}/g,`
`),i=P3(n);return e===!1?i.replace(/ /g," "):i}function FZ(t,e={}){let r=G9e(t,e),n=nn.lexer(r),i=[[]],a=0;function s(l,u="normal"){l.type==="text"?l.text.split(`
`).forEach((f,d)=>{d!==0&&(a++,i.push([])),f.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&i[a].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{s(h,l.type)}):l.type==="html"&&i[a].push({content:l.text,type:"normal"})}return o(s,"processNode"),n.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{s(u)}):l.type==="html"?i[a].push({content:l.text,type:"normal"}):i[a].push({content:l.raw,type:"normal"})}),i}function $Z(t,{markdownAutoWrap:e}={}){let r=nn.lexer(t);function n(i){return i.type==="text"?e===!1?i.text.replace(/\n */g," ").replace(/ /g," "):i.text.replace(/\n */g," "):i.type==="strong"?`${i.tokens?.map(n).join("")} `:i.type==="em"?`${i.tokens?.map(n).join("")} `:i.type==="paragraph"?`${i.tokens?.map(n).join("")}
`:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(X.warn(`Unsupported markdown: ${i.type}`),i.raw)}return o(n,"output"),r.map(n).join("")}var zZ=N(()=>{"use strict";BZ();_A();pt();o(G9e,"preprocessMarkdown");o(FZ,"markdownToLines");o($Z,"markdownToHTML")});function V9e(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function U9e(t,e){let r=V9e(e.content);return GZ(t,[],r,e.type)}function GZ(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];let[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?GZ(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function VZ(t,e){if(t.some(({content:r})=>r.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return b9(t,e)}function b9(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());let a=t.shift()??{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),e(s))return b9(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[l,u]=U9e(e,a);r.push([l]),u.content&&t.unshift(u)}return b9(t,e,r)}var UZ=N(()=>{"use strict";o(V9e,"splitTextToChars");o(U9e,"splitWordToFitWidth");o(GZ,"splitWordToFitWidthRecursion");o(VZ,"splitLineToFitWidth");o(b9,"splitLineToFitWidthRecursion")});function HZ(t,e){e&&t.attr("style",e)}async function H9e(t,e,r,n,i=!1,a=Qt()){let s=t.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);let l=s.append("xhtml:div"),u=kn(e.label)?await kh(e.label.replace(tt.lineBreakRegex,`
`),a):sr(e.label,a),h=e.isNode?"nodeLabel":"edgeLabel",f=l.append("span");f.html(u),HZ(f,e.labelStyle),f.attr("class",`${h} ${n}`),HZ(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",r+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),s.node()}function T9(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function q9e(t,e,r){let n=t.append("text"),i=T9(n,1,e);w9(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function qZ(t,e,r){let n=t.append("text"),i=T9(n,1,e);w9(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function W9e(t,e,r,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1"),u=0;for(let h of r){let f=o(p=>q9e(a,1.1,p)<=t,"checkWidth"),d=f(h)?[h]:VZ(h,f);for(let p of d){let m=T9(l,u,1.1);w9(m,p),u++}}if(n){let h=l.node().getBBox(),f=2;return s.attr("x",h.x-f).attr("y",h.y-f).attr("width",h.width+2*f).attr("height",h.height+2*f),a.node()}else return l.node()}function w9(t,e){t.text(""),e.forEach((r,n)=>{let i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}async function k9(t,e={}){let r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,s)=>(r.push((async()=>{let l=`${a}:${s}`;return await eH(l)?await _s(l,void 0,{class:"label-icon"}):` `})()),i));let n=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}var di,zo=N(()=>{"use strict";yr();gr();pt();zZ();tr();nc();UZ();qn();o(HZ,"applyStyle");o(H9e,"addHtmlSpan");o(T9,"createTspan");o(q9e,"computeWidthOfText");o(qZ,"computeDimensionOfText");o(W9e,"createFormattedText");o(w9,"updateTextContentAndStyles");o(k9,"replaceIconSubstring");di=o(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:l=200,addSvgBackground:u=!1}={},h)=>{if(X.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",u),a){let f=$Z(e,h),d=await k9(Ji(f),h),p=e.replace(/\\\\/g,"\\"),m={isNode:s,label:kn(e)?p:d,labelStyle:r.replace("fill:","color:")};return await H9e(t,m,l,i,u,h)}else{let f=e.replace(/ /g," "),d=FZ(f.replace(" "," "),h),p=W9e(l,t,d,e?u:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");qe(p).attr("style",m)}else{let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");qe(p).select("rect").attr("style",m.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");qe(p).select("text").attr("style",g)}return p}},"createText")});function Vt(t){let e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}function Go(t,e,r,n,i,a){let s=[],u=r-t,h=n-e,f=u/a,d=2*Math.PI/f,p=e+h/2;for(let m=0;m<=50;m++){let g=m/50,y=t+g*u,v=p+i*Math.sin(d*(y-t));s.push({x:y,y:v})}return s}function Kd(t,e,r,n,i,a){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;d{"use strict";zo();Xt();yr();La();gr();tr();ut=o(async(t,e,r)=>{let n,i=e.useHtmlLabels||vr(ge()?.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",Cn(e.labelStyle)),l;e.label===void 0?l="":l=typeof e.label=="string"?e.label:e.label[0];let u=await di(s,sr(Ji(l),ge()),{useHtmlLabels:i,width:e.width||ge().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),h=u.getBBox(),f=(e?.padding??0)/2;if(i){let d=u.children[0],p=qe(u),m=d.getElementsByTagName("img");if(m){let g=l.replace(/ ]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=ge().fontSize?ge().fontSize:window.getComputedStyle(document.body).fontSize,T=5,[S=ur.fontSize]=vc(b),w=S*T+"px";y.style.minWidth=w,y.style.maxWidth=w}else y.style.width="100%";v(y)}o(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}return i?s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):s.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:h,halfPadding:f,label:s}},"labelHelper"),YT=o(async(t,e,r)=>{let n=r.useHtmlLabels||vr(ge()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await di(i,sr(Ji(e),ge()),{useHtmlLabels:n,width:r.width||ge()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),l=r.padding/2;if(vr(ge()?.flowchart?.htmlLabels)){let u=a.children[0],h=qe(a);s=u.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:l,label:i}},"insertLabel"),Qe=o((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),st=o((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");o(Vt,"createPathFromPoints");o(Go,"generateFullSineWavePoints");o(Kd,"generateCirclePoints")});function Y9e(t,e){return t.intersect(e)}var WZ,YZ=N(()=>{"use strict";o(Y9e,"intersectNode");WZ=Y9e});function X9e(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*s*s),h=Math.abs(e*r*s/u);n.x{"use strict";o(X9e,"intersectEllipse");XT=X9e});function j9e(t,e,r){return XT(t,e,e,r)}var XZ,jZ=N(()=>{"use strict";E9();o(j9e,"intersectCircle");XZ=j9e});function K9e(t,e,r,n){{let i=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,l=i*r.x+a*r.y+s,u=i*n.x+a*n.y+s,h=1e-6;if(l!==0&&u!==0&&KZ(l,u))return;let f=n.y-r.y,d=r.x-n.x,p=n.x*r.y-r.x*n.y,m=f*t.x+d*t.y+p,g=f*e.x+d*e.y+p;if(Math.abs(m)0}var QZ,ZZ=N(()=>{"use strict";o(K9e,"intersectLine");o(KZ,"sameSign");QZ=K9e});function Q9e(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(f){s=Math.min(s,f.x),l=Math.min(l,f.y)}):(s=Math.min(s,e.x),l=Math.min(l,e.y));let u=n-t.width/2-s,h=i-t.height/2-l;for(let f=0;f1&&a.sort(function(f,d){let p=f.x-r.x,m=f.y-r.y,g=Math.sqrt(p*p+m*m),y=d.x-r.x,v=d.y-r.y,x=Math.sqrt(y*y+v*v);return g{"use strict";ZZ();o(Q9e,"intersectPolygon");JZ=Q9e});var Z9e,Qh,S9=N(()=>{"use strict";Z9e=o((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,l=t.height/2,u,h;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(s=-s),u=s,h=i===0?0:s*a/i),{x:r+u,y:n+h}},"intersectRect"),Qh=Z9e});var Xe,Ut=N(()=>{"use strict";YZ();jZ();E9();eJ();S9();Xe={node:WZ,circle:XZ,ellipse:XT,polygon:JZ,rect:Qh}});var tJ,wc,J9e,_2,je,Je,eRe,$t=N(()=>{"use strict";Xt();tJ=o(t=>{let{handDrawnSeed:e}=ge();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),wc=o(t=>{let e=J9e([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),J9e=o(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),_2=o(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),je=o(t=>{let{stylesArray:e}=wc(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let l=s[0];_2(l)?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),l.includes("stroke")&&i.push(s.join(":")+" !important"),l==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),Je=o((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=ge(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=wc(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:eRe(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),eRe=o(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let i=isNaN(e[0])?0:e[0];return[i,i]}let r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n]},"getStrokeDashArray")});function C9(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),l=Math.sin(a);for(let u of t){let[h,f]=u;u[0]=(h-n)*s-(f-i)*l+n,u[1]=(h-n)*l+(f-i)*s+i}}}function tRe(t,e){return t[0]===e[0]&&t[1]===e[1]}function rRe(t,e,r,n=1){let i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,l=[0,0];if(i)for(let h of s)C9(h,l,i);let u=(function(h,f,d){let p=[];for(let b of h){let T=[...b];tRe(T[0],T[T.length-1])||T.push([T[0][0],T[0][1]]),T.length>2&&p.push(T)}let m=[];f=Math.max(f,.1);let g=[];for(let b of p)for(let T=0;Tb.yminT.ymin?1:b.xT.x?1:b.ymax===T.ymax?0:(b.ymax-T.ymax)/Math.abs(b.ymax-T.ymax))),!g.length)return m;let y=[],v=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let T=0;Tv);T++)b=T;g.splice(0,b+1).forEach((T=>{y.push({s:v,edge:T})}))}if(y=y.filter((b=>!(b.edge.ymax<=v))),y.sort(((b,T)=>b.edge.x===T.edge.x?0:(b.edge.x-T.edge.x)/Math.abs(b.edge.x-T.edge.x))),(d!==1||x%f==0)&&y.length>1)for(let b=0;b=y.length)break;let S=y[b].edge,w=y[T].edge;m.push([[Math.round(S.x),v],[Math.round(w.x),v]])}v+=d,y.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),x++}return m})(s,a,n);if(i){for(let h of s)C9(h,l,-i);(function(h,f,d){let p=[];h.forEach((m=>p.push(...m))),C9(p,f,d)})(u,l,-i)}return u}function N2(t,e){var r;let n=e.hachureAngle+90,i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),rRe(t,i,n,a||1)}function nw(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}function _9(t,e){return t.type===e}function V9(t){let e=[],r=(function(s){let l=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:nRe,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:A9,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return l[l.length]={type:rJ,text:""},l})(t),n="BOD",i=0,a=r[i];for(;!_9(a,rJ);){let s=0,l=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return V9("M0,0"+t);i++,s=jT[a.text],n=a.text}else _9(a,A9)?s=jT[n]:(i++,s=jT[a.text],n=a.text);if(!(i+sf%2?h+r:h+e));a.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":a.push({key:"Q",data:[...l]}),e=l[2],r=l[3];break;case"q":{let u=l.map(((h,f)=>f%2?h+r:h+e));a.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":a.push({key:"A",data:[...l]}),e=l[5],r=l[6];break;case"a":e+=l[5],r+=l[6],a.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],e,r]});break;case"H":a.push({key:"H",data:[...l]}),e=l[0];break;case"h":e+=l[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...l]}),e=l[2],r=l[3];break;case"s":{let u=l.map(((h,f)=>f%2?h+r:h+e));a.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":a.push({key:"T",data:[...l]}),e=l[0],r=l[1];break;case"t":e+=l[0],r+=l[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function hJ(t){let e=[],r="",n=0,i=0,a=0,s=0,l=0,u=0;for(let{key:h,data:f}of t){switch(h){case"M":e.push({key:"M",data:[...f]}),[n,i]=f,[a,s]=f;break;case"C":e.push({key:"C",data:[...f]}),n=f[4],i=f[5],l=f[2],u=f[3];break;case"L":e.push({key:"L",data:[...f]}),[n,i]=f;break;case"H":n=f[0],e.push({key:"L",data:[n,i]});break;case"V":i=f[0],e.push({key:"L",data:[n,i]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=n+(n-l),p=i+(i-u)):(d=n,p=i),e.push({key:"C",data:[d,p,...f]}),l=f[0],u=f[1],n=f[2],i=f[3];break}case"T":{let[d,p]=f,m=0,g=0;r==="Q"||r==="T"?(m=n+(n-l),g=i+(i-u)):(m=n,g=i);let y=n+2*(m-n)/3,v=i+2*(g-i)/3,x=d+2*(m-d)/3,b=p+2*(g-p)/3;e.push({key:"C",data:[y,v,x,b,d,p]}),l=m,u=g,n=d,i=p;break}case"Q":{let[d,p,m,g]=f,y=n+2*(d-n)/3,v=i+2*(p-i)/3,x=m+2*(d-m)/3,b=g+2*(p-g)/3;e.push({key:"C",data:[y,v,x,b,m,g]}),l=d,u=p,n=m,i=g;break}case"A":{let d=Math.abs(f[0]),p=Math.abs(f[1]),m=f[2],g=f[3],y=f[4],v=f[5],x=f[6];d===0||p===0?(e.push({key:"C",data:[n,i,v,x,v,x]}),n=v,i=x):(n!==v||i!==x)&&(fJ(n,i,v,x,d,p,m,g,y).forEach((function(b){e.push({key:"C",data:b})})),n=v,i=x);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=h}return e}function D2(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function fJ(t,e,r,n,i,a,s,l,u,h){let f=(d=s,Math.PI*d/180);var d;let p=[],m=0,g=0,y=0,v=0;if(h)[m,g,y,v]=h;else{[t,e]=D2(t,e,-f),[r,n]=D2(r,n,-f);let D=(t-r)/2,_=(e-n)/2,O=D*D/(i*i)+_*_/(a*a);O>1&&(O=Math.sqrt(O),i*=O,a*=O);let M=i*i,P=a*a,B=M*P-M*_*_-P*D*D,F=M*_*_+P*D*D,G=(l===u?-1:1)*Math.sqrt(Math.abs(B/F));y=G*i*_/a+(t+r)/2,v=G*-a*D/i+(e+n)/2,m=Math.asin(parseFloat(((e-v)/a).toFixed(9))),g=Math.asin(parseFloat(((n-v)/a).toFixed(9))),tg&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let x=g-m;if(Math.abs(x)>120*Math.PI/180){let D=g,_=r,O=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=fJ(r=y+i*Math.cos(g),n=v+a*Math.sin(g),_,O,i,a,s,0,u,[g,D,y,v])}x=g-m;let b=Math.cos(m),T=Math.sin(m),S=Math.cos(g),w=Math.sin(g),k=Math.tan(x/4),A=4/3*i*k,C=4/3*a*k,R=[t,e],I=[t+A*T,e-C*b],L=[r+A*w,n-C*S],E=[r,n];if(I[0]=2*R[0]-I[0],I[1]=2*R[1]-I[1],h)return[I,L,E].concat(p);{p=[I,L,E].concat(p);let D=[];for(let _=0;_2){let i=[];for(let a=0;a2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,v=Math.min(y/2,(g-m)/2),x=lJ(v,h,f,d,p,m,g,1,u);if(!u.disableMultiStroke){let b=lJ(v,h,f,d,p,m,g,1.5,u);x.push(...b)}return s&&(l?x.push(...Zh(h,f,h+d*Math.cos(m),f+p*Math.sin(m),u),...Zh(h,f,h+d*Math.cos(g),f+p*Math.sin(g),u)):x.push({op:"lineTo",data:[h,f]},{op:"lineTo",data:[h+d*Math.cos(m),f+p*Math.sin(m)]})),{type:"path",ops:x}}function aJ(t,e){let r=hJ(uJ(V9(t))),n=[],i=[0,0],a=[0,0];for(let{key:s,data:l}of r)switch(s){case"M":a=[l[0],l[1]],i=[l[0],l[1]];break;case"L":n.push(...Zh(a[0],a[1],l[0],l[1],e)),a=[l[0],l[1]];break;case"C":{let[u,h,f,d,p,m]=l;n.push(...sRe(u,h,f,d,p,m,a,e)),a=[p,m];break}case"Z":n.push(...Zh(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function D9(t,e){let r=[];for(let n of t)if(n.length){let i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+or(i,e),n[0][1]+or(i,e)]});for(let s=1;s500?.4:-.0016668*u+1.233334;let f=i.maxRandomnessOffset||0;f*f*100>l&&(f=u/10);let d=f/2,p=.2+.2*mJ(i),m=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;m=or(m,i,h),g=or(g,i,h);let y=[],v=o(()=>or(d,i,h),"M"),x=o(()=>or(f,i,h),"k"),b=i.preserveVertices;return a&&(s?y.push({op:"move",data:[t+(b?0:v()),e+(b?0:v())]}):y.push({op:"move",data:[t+(b?0:or(f,i,h)),e+(b?0:or(f,i,h))]})),s?y.push({op:"bcurveTo",data:[m+t+(r-t)*p+v(),g+e+(n-e)*p+v(),m+t+2*(r-t)*p+v(),g+e+2*(n-e)*p+v(),r+(b?0:v()),n+(b?0:v())]}):y.push({op:"bcurveTo",data:[m+t+(r-t)*p+x(),g+e+(n-e)*p+x(),m+t+2*(r-t)*p+x(),g+e+2*(n-e)*p+x(),r+(b?0:x()),n+(b?0:x())]}),y}function KT(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+or(e,r),t[0][1]+or(e,r)]),n.push([t[0][0]+or(e,r),t[0][1]+or(e,r)]);for(let i=1;i3){let a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let l=1;l+21&&i.push(l)):i.push(l),i.push(t[e+3])}else{let u=t[e+0],h=t[e+1],f=t[e+2],d=t[e+3],p=Qd(u,h,.5),m=Qd(h,f,.5),g=Qd(f,d,.5),y=Qd(p,m,.5),v=Qd(m,g,.5),x=Qd(y,v,.5);$9([u,p,y,x],0,r,i),$9([x,v,g,d],0,r,i)}var a,s;return i}function lRe(t,e){return rw(t,0,t.length,e)}function rw(t,e,r,n,i){let a=i||[],s=t[e],l=t[r-1],u=0,h=1;for(let f=e+1;fu&&(u=d,h=f)}return Math.sqrt(u)>n?(rw(t,e,h+1,n,a),rw(t,h,r,n,a)):(a.length||a.push(s),a.push(l)),a}function L9(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a0?rw(n,0,n.length,r):n}var R2,R9,N9,M9,I9,O9,Ps,P9,nRe,A9,rJ,jT,iRe,co,Em,z9,QT,G9,Ze,Ht=N(()=>{"use strict";o(C9,"t");o(tRe,"e");o(rRe,"s");o(N2,"n");R2=class{static{o(this,"o")}constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=N2(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){let n=[];for(let i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};o(nw,"a");R9=class extends R2{static{o(this,"h")}fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=N2(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],l=.5*n*Math.cos(a),u=.5*n*Math.sin(a);for(let[h,f]of i)nw([h,f])&&s.push([[h[0]-l,h[1]+u],[...f]],[[h[0]+l,h[1]-u],[...f]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},N9=class extends R2{static{o(this,"r")}fillPolygons(e,r){let n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n}},M9=class{static{o(this,"i")}constructor(e){this.helper=e}fillPolygons(e,r){let n=N2(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let s=i/4;for(let l of e){let u=nw(l),h=u/i,f=Math.ceil(h)-1,d=u-f*i,p=(l[0][0]+l[1][0])/2-i/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g{let l=nw(s),u=Math.floor(l/(n+i)),h=(l+i-u*(n+i))/2,f=s[0],d=s[1];f[0]>d[0]&&(f=s[1],d=s[0]);let p=Math.atan((d[1]-f[1])/(d[0]-f[0]));for(let m=0;m{let s=nw(a),l=Math.round(s/(2*r)),u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);let f=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let d=0;d2*Math.PI&&(A=0,C=2*Math.PI);let R=(C-A)/b.curveStepCount,I=[];for(let L=A;L<=C;L+=R)I.push([T+w*Math.cos(L),S+k*Math.sin(L)]);return I.push([T+w*Math.cos(C),S+k*Math.sin(C)]),I.push([T,S]),km([I],b)})(e,r,n,i,a,s,h));return h.stroke!==co&&f.push(d),this._d("arc",f,h)}curve(e,r){let n=this._o(r),i=[],a=nJ(e,n);if(n.fill&&n.fill!==co)if(n.fillStyle==="solid"){let s=nJ(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],l=e;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?s.push(...h):h.length===3?s.push(...L9(cJ([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):s.push(...L9(cJ(h),10,(1+n.roughness)/2))}s.length&&i.push(km([s],n))}return n.stroke!==co&&i.push(a),this._d("curve",i,n)}polygon(e,r){let n=this._o(r),i=[],a=ZT(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(D9([e],n)):i.push(km([e],n))),n.stroke!==co&&i.push(a),this._d("polygon",i,n)}path(e,r){let n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==co,s=n.stroke!==co,l=!!(n.simplification&&n.simplification<1),u=(function(f,d,p){let m=hJ(uJ(V9(f))),g=[],y=[],v=[0,0],x=[],b=o(()=>{x.length>=4&&y.push(...L9(x,d)),x=[]},"i"),T=o(()=>{b(),y.length&&(g.push(y),y=[])},"c");for(let{key:w,data:k}of m)switch(w){case"M":T(),v=[k[0],k[1]],y.push(v);break;case"L":b(),y.push([k[0],k[1]]);break;case"C":if(!x.length){let A=y.length?y[y.length-1]:v;x.push([A[0],A[1]])}x.push([k[0],k[1]]),x.push([k[2],k[3]]),x.push([k[4],k[5]]);break;case"Z":b(),y.push([v[0],v[1]])}if(T(),!p)return g;let S=[];for(let w of g){let k=lRe(w,p);k.length&&S.push(k)}return S})(e,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=aJ(e,n);if(a)if(n.fillStyle==="solid")if(u.length===1){let f=aJ(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else i.push(D9(u,n));else i.push(km(u,n));return s&&(l?u.forEach((f=>{i.push(ZT(f,!1,n))})):i.push(h)),this._d("path",i,n)}opsToPath(e,r){let n="";for(let i of e.ops){let a=typeof r=="number"&&r>=0?i.data.map((s=>+s.toFixed(r))):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(e){let r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(let a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:co};break;case"fillPath":s={d:this.opsToPath(a),stroke:co,strokeWidth:0,fill:n.fill||co};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||co,strokeWidth:n,fill:co}}_mergedShape(e){return e.filter(((r,n)=>n===0||r.op!=="move"))}},z9=class{static{o(this,"st")}constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Em(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let l=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,l),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(let a of r.ops){let s=typeof n=="number"&&n>=0?a.data.map((l=>+l.toFixed(n))):a.data;switch(a.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s),s}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s),s}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s),s}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a),a}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,a,s,l=!1,u){let h=this.gen.arc(e,r,n,i,a,s,l,u);return this.draw(h),h}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){let n=this.gen.path(e,r);return this.draw(n),n}},QT="http://www.w3.org/2000/svg",G9=class{static{o(this,"ot")}constructor(e,r){this.svg=e,this.gen=new Em(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(QT,"g"),s=e.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(QT,"path"),u.setAttribute("d",this.opsToPath(l,s)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=i.createElementNS(QT,"path"),u.setAttribute("d",this.opsToPath(l,s)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(i,l,n)}u&&a.appendChild(u)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=e.createElementNS(QT,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s)}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s)}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s)}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a)}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,a,s,l=!1,u){let h=this.gen.arc(e,r,n,i,a,s,l,u);return this.draw(h)}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n)}path(e,r){let n=this.gen.path(e,r);return this.draw(n)}},Ze={canvas:o((t,e)=>new z9(t,e),"canvas"),svg:o((t,e)=>new G9(t,e),"svg"),generator:o(t=>new Em(t),"generator"),newSeed:o(()=>Em.newSeed(),"newSeed")}});function gJ(t,e){let{labelStyles:r}=je(e);e.labelStyle=r;let n=st(e),i=n;n||(i="anchor");let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=1,{cssStyles:l}=e,u=Ze.svg(a),h=Je(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);let f=u.circle(0,0,s*2,h),d=a.insert(()=>f,":first-child");return d.attr("class","anchor").attr("style",Cn(l)),Qe(e,d),e.intersect=function(p){return X.info("Circle intersect",e,s,p),Xe.circle(e,s,p)},a}var yJ=N(()=>{"use strict";pt();It();Ut();$t();Ht();tr();o(gJ,"anchor")});function vJ(t,e,r,n,i,a,s){let u=(t+r)/2,h=(e+n)/2,f=Math.atan2(n-e,r-t),d=(r-t)/2,p=(n-e)/2,m=d/i,g=p/a,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-y**2),x=u+v*a*Math.sin(f)*(s?-1:1),b=h-v*i*Math.cos(f)*(s?-1:1),T=Math.atan2((e-b)/a,(t-x)/i),w=Math.atan2((n-b)/a,(r-x)/i)-T;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);let k=[];for(let A=0;A<20;A++){let C=A/19,R=T+C*w,I=x+i*Math.cos(R),L=b+a*Math.sin(R);k.push({x:I,y:L})}return k}async function xJ(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=a.width+e.padding+20,l=a.height+e.padding,u=l/2,h=u/(2.5+l/50),{cssStyles:f}=e,d=[{x:s/2,y:-l/2},{x:-s/2,y:-l/2},...vJ(-s/2,-l/2,-s/2,l/2,h,u,!1),{x:s/2,y:l/2},...vJ(s/2,l/2,s/2,-l/2,h,u,!0)],p=Ze.svg(i),m=Je(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=Vt(d),y=p.path(g,m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${h/2}, 0)`),Qe(e,v),e.intersect=function(x){return Xe.polygon(e,d,x)},i}var bJ=N(()=>{"use strict";It();Ut();$t();Ht();o(vJ,"generateArcPoints");o(xJ,"bowTieRect")});function Bs(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var Jh=N(()=>{"use strict";o(Bs,"insertPolygonShape")});async function TJ(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=a.height+e.padding,l=12,u=a.width+e.padding+l,h=0,f=u,d=-s,p=0,m=[{x:h+l,y:d},{x:f,y:d},{x:f,y:p},{x:h,y:p},{x:h,y:d+l},{x:h+l,y:d}],g,{cssStyles:y}=e;if(e.look==="handDrawn"){let v=Ze.svg(i),x=Je(e,{}),b=Vt(m),T=v.path(b,x);g=i.insert(()=>T,":first-child").attr("transform",`translate(${-u/2}, ${s/2})`),y&&g.attr("style",y)}else g=Bs(i,u,s,m);return n&&g.attr("style",n),Qe(e,g),e.intersect=function(v){return Xe.polygon(e,m,v)},i}var wJ=N(()=>{"use strict";It();Ut();$t();Ht();Jh();It();o(TJ,"card")});function kJ(t,e){let{nodeStyles:r}=je(e);e.label="";let n=t.insert("g").attr("class",st(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=Ze.svg(n),u=Je(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=Vt(s),f=l.path(h,u),d=n.insert(()=>f,":first-child");return i&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",i),r&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(p){return Xe.polygon(e,s,p)},n}var EJ=N(()=>{"use strict";Ut();Ht();$t();It();o(kJ,"choice")});async function iw(t,e,r){let{labelStyles:n,nodeStyles:i}=je(e);e.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:l}=await ut(t,e,st(e)),u=r?.padding??l,h=s.width/2+u,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Ze.svg(a),m=Je(e,{}),g=p.circle(0,0,h*2,m);f=a.insert(()=>g,":first-child"),f.attr("class","basic label-container").attr("style",Cn(d))}else f=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0);return Qe(e,f),e.calcIntersect=function(p,m){let g=p.width/2;return Xe.circle(p,g,m)},e.intersect=function(p){return X.info("Circle intersect",e,h,p),Xe.circle(e,h,p)},a}var U9=N(()=>{"use strict";Ht();pt();tr();Ut();$t();It();o(iw,"circle")});function cRe(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,i={x:n/2*e,y:n/2*r},a={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},l={x:n/2*e,y:-(n/2)*r};return`M ${a.x},${a.y} L ${l.x},${l.y}
M ${i.x},${i.y} L ${s.x},${s.y}`}function SJ(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",st(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,l=Ze.svg(i),u=Je(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,a*2,u),f=cRe(a),d=l.path(f,u),p=i.insert(()=>h,":first-child");return p.insert(()=>d),s&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",n),Qe(e,p),e.intersect=function(m){return X.info("crossedCircle intersect",e,{radius:a,point:m}),Xe.circle(e,a,m)},i}var CJ=N(()=>{"use strict";pt();It();$t();Ht();Ut();o(cRe,"createLine");o(SJ,"crossedCircle")});function ef(t,e,r,n=100,i=0,a=180){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;dT,":first-child").attr("stroke-opacity",0),S.insert(()=>x,":first-child"),S.attr("class","text"),f&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${h}, 0)`),s.attr("transform",`translate(${-l/2+h-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Qe(e,S),e.intersect=function(w){return Xe.polygon(e,p,w)},i}var _J=N(()=>{"use strict";It();Ut();$t();Ht();o(ef,"generateCirclePoints");o(AJ,"curlyBraceLeft")});function tf(t,e,r,n=100,i=0,a=180){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;dT,":first-child").attr("stroke-opacity",0),S.insert(()=>x,":first-child"),S.attr("class","text"),f&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${-h}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Qe(e,S),e.intersect=function(w){return Xe.polygon(e,p,w)},i}var LJ=N(()=>{"use strict";It();Ut();$t();Ht();o(tf,"generateCirclePoints");o(DJ,"curlyBraceRight")});function Oa(t,e,r,n=100,i=0,a=180){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;dA,":first-child").attr("stroke-opacity",0),C.insert(()=>b,":first-child"),C.insert(()=>w,":first-child"),C.attr("class","text"),f&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${h-h/4}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Qe(e,C),e.intersect=function(R){return Xe.polygon(e,m,R)},i}var NJ=N(()=>{"use strict";It();Ut();$t();Ht();o(Oa,"generateCirclePoints");o(RJ,"curlyBraces")});async function MJ(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=80,l=20,u=Math.max(s,(a.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(l,a.height+(e.padding??0)*2,e?.height??0),f=h/2,{cssStyles:d}=e,p=Ze.svg(i),m=Je(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=u,y=h,v=g-f,x=y/4,b=[{x:v,y:0},{x,y:0},{x:0,y:y/2},{x,y},{x:v,y},...Kd(-v,-y/2,f,50,270,90)],T=Vt(b),S=p.path(T,m),w=i.insert(()=>S,":first-child");return w.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",n),w.attr("transform",`translate(${-u/2}, ${-h/2})`),Qe(e,w),e.intersect=function(k){return Xe.polygon(e,b,k)},i}var IJ=N(()=>{"use strict";It();Ut();$t();Ht();o(MJ,"curvedTrapezoid")});async function OJ(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=Math.max(a.width+e.padding,e.width??0),u=l/2,h=u/(2.5+l/50),f=Math.max(a.height+h+e.padding,e.height??0),d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=Ze.svg(i),g=hRe(0,0,l,f,u,h),y=fRe(0,h,l,f,u,h),v=m.path(g,Je(e,{})),x=m.path(y,Je(e,{fill:"none"}));d=i.insert(()=>x,":first-child"),d=i.insert(()=>v,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let m=uRe(0,0,l,f,u,h);d=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Cn(p)).attr("style",n)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Qe(e,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(m){let g=Xe.rect(e,m),y=g.x-(e.x??0);if(u!=0&&(Math.abs(y)<(e.width??0)/2||Math.abs(y)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-h)){let v=h*h*(1-y*y/(u*u));v>0&&(v=Math.sqrt(v)),v=h-v,m.y-(e.y??0)>0&&(v=-v),g.y+=v}return g},i}var uRe,hRe,fRe,PJ=N(()=>{"use strict";It();Ut();$t();Ht();tr();uRe=o((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),hRe=o((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),fRe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");o(OJ,"cylinder")});async function BJ(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=a.width+e.padding,u=a.height+e.padding,h=u*.2,f=-l/2,d=-u/2-h/2,{cssStyles:p}=e,m=Ze.svg(i),g=Je(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:f,y:d+h},{x:-f,y:d+h},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+h}],v=m.polygon(y.map(b=>[b.x,b.y]),g),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),s.attr("transform",`translate(${f+(e.padding??0)/2-(a.x-(a.left??0))}, ${d+h+(e.padding??0)/2-(a.y-(a.top??0))})`),Qe(e,x),e.intersect=function(b){return Xe.rect(e,b)},i}var FJ=N(()=>{"use strict";It();Ut();$t();Ht();o(BJ,"dividedRectangle")});async function $J(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await ut(t,e,st(e)),u=a.width/2+s+5,h=a.width/2+s,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Ze.svg(i),m=Je(e,{roughness:.2,strokeWidth:2.5}),g=Je(e,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,m),v=p.circle(0,0,h*2,g);f=i.insert("g",":first-child"),f.attr("class",Cn(e.cssClasses)).attr("style",Cn(d)),f.node()?.appendChild(y),f.node()?.appendChild(v)}else{f=i.insert("g",":first-child");let p=f.insert("circle",":first-child"),m=f.insert("circle");f.attr("class","basic label-container").attr("style",n),p.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0)}return Qe(e,f),e.intersect=function(p){return X.info("DoubleCircle intersect",e,u,p),Xe.circle(e,u,p)},i}var zJ=N(()=>{"use strict";pt();It();Ut();$t();Ht();tr();o($J,"doublecircle")});function GJ(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=je(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",st(e)).attr("id",e.domId??e.id),s=7,{cssStyles:l}=e,u=Ze.svg(a),{nodeBorder:h}=r,f=Je(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(f.roughness=0);let d=u.circle(0,0,s*2,f),p=a.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",l),i&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Qe(e,p),e.intersect=function(m){return X.info("filledCircle intersect",e,{radius:s,point:m}),Xe.circle(e,s,m)},a}var VJ=N(()=>{"use strict";Ht();pt();Ut();$t();It();o(GJ,"filledCircle")});async function UJ(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=a.width+(e.padding??0),u=l+a.height,h=l+a.height,f=[{x:0,y:-u},{x:h,y:-u},{x:h/2,y:0}],{cssStyles:d}=e,p=Ze.svg(i),m=Je(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=Vt(f),y=p.path(g,m),v=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),e.width=l,e.height=u,Qe(e,v),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-u/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(x){return X.info("Triangle intersect",e,f,x),Xe.polygon(e,f,x)},i}var HJ=N(()=>{"use strict";pt();It();Ut();$t();Ht();It();o(UJ,"flippedTriangle")});function qJ(t,e,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:a}=je(e);e.label="";let s=t.insert("g").attr("class",st(e)).attr("id",e.domId??e.id),{cssStyles:l}=e,u=Math.max(70,e?.width??0),h=Math.max(10,e?.height??0);r==="LR"&&(u=Math.max(10,e?.width??0),h=Math.max(70,e?.height??0));let f=-1*u/2,d=-1*h/2,p=Ze.svg(s),m=Je(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(f,d,u,h,m),y=s.insert(()=>g,":first-child");l&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",l),a&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Qe(e,y);let v=n?.padding??0;return e.width&&e.height&&(e.width+=v/2||0,e.height+=v/2||0),e.intersect=function(x){return Xe.rect(e,x)},s}var WJ=N(()=>{"use strict";Ht();Ut();$t();It();o(qJ,"forkJoin")});async function YJ(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let i=80,a=50,{shapeSvg:s,bbox:l}=await ut(t,e,st(e)),u=Math.max(i,l.width+(e.padding??0)*2,e?.width??0),h=Math.max(a,l.height+(e.padding??0)*2,e?.height??0),f=h/2,{cssStyles:d}=e,p=Ze.svg(s),m=Je(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:-u/2,y:-h/2},{x:u/2-f,y:-h/2},...Kd(-u/2+f,0,f,50,90,270),{x:u/2-f,y:h/2},{x:-u/2,y:h/2}],y=Vt(g),v=p.path(y,m),x=s.insert(()=>v,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),Qe(e,x),e.intersect=function(b){return X.info("Pill intersect",e,{radius:f,point:b}),Xe.polygon(e,g,b)},s}var XJ=N(()=>{"use strict";pt();It();Ut();$t();Ht();o(YJ,"halfRoundedRectangle")});async function jJ(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=a.height+(e.padding??0),l=a.width+(e.padding??0)*2.5,{cssStyles:u}=e,h=Ze.svg(i),f=Je(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=l/2,p=d/6;d=d+p;let m=s/2,g=m/2,y=d-g,v=[{x:-y,y:-m},{x:0,y:-m},{x:y,y:-m},{x:d,y:0},{x:y,y:m},{x:0,y:m},{x:-y,y:m},{x:-d,y:0}],x=Vt(v),b=h.path(x,f),T=i.insert(()=>b,":first-child");return T.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",u),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),e.width=l,e.height=s,Qe(e,T),e.intersect=function(S){return Xe.polygon(e,v,S)},i}var KJ=N(()=>{"use strict";It();Ut();$t();Ht();o(jJ,"hexagon")});async function QJ(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.label="",e.labelStyle=r;let{shapeSvg:i}=await ut(t,e,st(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:l}=e,u=Ze.svg(i),h=Je(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let f=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],d=Vt(f),p=u.path(d,h),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container"),l&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),n&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-a/2}, ${-s/2})`),Qe(e,m),e.intersect=function(g){return X.info("Pill intersect",e,{points:f}),Xe.polygon(e,f,g)},i}var ZJ=N(()=>{"use strict";pt();It();Ut();$t();Ht();o(QJ,"hourglass")});async function JJ(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=je(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,l=Math.max(a,s),u=n?.wrappingWidth;e.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,label:d}=await ut(t,e,"icon-shape default"),p=e.pos==="t",m=l,g=l,{nodeBorder:y}=r,{stylesMap:v}=wc(e),x=-g/2,b=-m/2,T=e.label?8:0,S=Ze.svg(h),w=Je(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let k=S.rectangle(x,b,g,m,w),A=Math.max(g,f.width),C=m+f.height+T,R=S.rectangle(-A/2,-C/2,A,C,{...w,fill:"transparent",stroke:"none"}),I=h.insert(()=>k,":first-child"),L=h.insert(()=>R);if(e.icon){let E=h.append("g");E.html(`${await _s(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let D=E.node().getBBox(),_=D.width,O=D.height,M=D.x,P=D.y;E.attr("transform",`translate(${-_/2-M},${p?f.height/2+T/2-O/2-P:-f.height/2-T/2-O/2-P})`),E.attr("style",`color: ${v.get("stroke")??y};`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-C/2:C/2-f.height})`),I.attr("transform",`translate(0,${p?f.height/2+T/2:-f.height/2-T/2})`),Qe(e,L),e.intersect=function(E){if(X.info("iconSquare intersect",e,E),!e.label)return Xe.rect(e,E);let D=e.x??0,_=e.y??0,O=e.height??0,M=[];return p?M=[{x:D-f.width/2,y:_-O/2},{x:D+f.width/2,y:_-O/2},{x:D+f.width/2,y:_-O/2+f.height+T},{x:D+g/2,y:_-O/2+f.height+T},{x:D+g/2,y:_+O/2},{x:D-g/2,y:_+O/2},{x:D-g/2,y:_-O/2+f.height+T},{x:D-f.width/2,y:_-O/2+f.height+T}]:M=[{x:D-g/2,y:_-O/2},{x:D+g/2,y:_-O/2},{x:D+g/2,y:_-O/2+m},{x:D+f.width/2,y:_-O/2+m},{x:D+f.width/2/2,y:_+O/2},{x:D-f.width/2,y:_+O/2},{x:D-f.width/2,y:_-O/2+m},{x:D-g/2,y:_-O/2+m}],Xe.polygon(e,M,E)},h}var eee=N(()=>{"use strict";Ht();pt();nc();Ut();$t();It();o(JJ,"icon")});async function tee(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=je(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,l=Math.max(a,s),u=n?.wrappingWidth;e.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,label:d}=await ut(t,e,"icon-shape default"),p=20,m=e.label?8:0,g=e.pos==="t",{nodeBorder:y,mainBkg:v}=r,{stylesMap:x}=wc(e),b=Ze.svg(h),T=Je(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let S=x.get("fill");T.stroke=S??v;let w=h.append("g");e.icon&&w.html(`${await _s(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let k=w.node().getBBox(),A=k.width,C=k.height,R=k.x,I=k.y,L=Math.max(A,C)*Math.SQRT2+p*2,E=b.circle(0,0,L,T),D=Math.max(L,f.width),_=L+f.height+m,O=b.rectangle(-D/2,-_/2,D,_,{...T,fill:"transparent",stroke:"none"}),M=h.insert(()=>E,":first-child"),P=h.insert(()=>O);return w.attr("transform",`translate(${-A/2-R},${g?f.height/2+m/2-C/2-I:-f.height/2-m/2-C/2-I})`),w.attr("style",`color: ${x.get("stroke")??y};`),d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-_/2:_/2-f.height})`),M.attr("transform",`translate(0,${g?f.height/2+m/2:-f.height/2-m/2})`),Qe(e,P),e.intersect=function(B){return X.info("iconSquare intersect",e,B),Xe.rect(e,B)},h}var ree=N(()=>{"use strict";Ht();pt();nc();Ut();$t();It();o(tee,"iconCircle")});var Fs,Zd=N(()=>{"use strict";Fs=o((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD")});async function nee(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=je(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,l=Math.max(a,s),u=n?.wrappingWidth;e.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,halfPadding:d,label:p}=await ut(t,e,"icon-shape default"),m=e.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:b}=wc(e),T=-y/2,S=-g/2,w=e.label?8:0,k=Ze.svg(h),A=Je(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let C=b.get("fill");A.stroke=C??x;let R=k.path(Fs(T,S,y,g,5),A),I=Math.max(y,f.width),L=g+f.height+w,E=k.rectangle(-I/2,-L/2,I,L,{...A,fill:"transparent",stroke:"none"}),D=h.insert(()=>R,":first-child").attr("class","icon-shape2"),_=h.insert(()=>E);if(e.icon){let O=h.append("g");O.html(`${await _s(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let M=O.node().getBBox(),P=M.width,B=M.height,F=M.x,G=M.y;O.attr("transform",`translate(${-P/2-F},${m?f.height/2+w/2-B/2-G:-f.height/2-w/2-B/2-G})`),O.attr("style",`color: ${b.get("stroke")??v};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-L/2:L/2-f.height})`),D.attr("transform",`translate(0,${m?f.height/2+w/2:-f.height/2-w/2})`),Qe(e,_),e.intersect=function(O){if(X.info("iconSquare intersect",e,O),!e.label)return Xe.rect(e,O);let M=e.x??0,P=e.y??0,B=e.height??0,F=[];return m?F=[{x:M-f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2+f.height+w},{x:M+y/2,y:P-B/2+f.height+w},{x:M+y/2,y:P+B/2},{x:M-y/2,y:P+B/2},{x:M-y/2,y:P-B/2+f.height+w},{x:M-f.width/2,y:P-B/2+f.height+w}]:F=[{x:M-y/2,y:P-B/2},{x:M+y/2,y:P-B/2},{x:M+y/2,y:P-B/2+g},{x:M+f.width/2,y:P-B/2+g},{x:M+f.width/2/2,y:P+B/2},{x:M-f.width/2,y:P+B/2},{x:M-f.width/2,y:P-B/2+g},{x:M-y/2,y:P-B/2+g}],Xe.polygon(e,F,O)},h}var iee=N(()=>{"use strict";Ht();pt();nc();Ut();$t();Zd();It();o(nee,"iconRounded")});async function aee(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=je(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,l=Math.max(a,s),u=n?.wrappingWidth;e.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,halfPadding:d,label:p}=await ut(t,e,"icon-shape default"),m=e.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:b}=wc(e),T=-y/2,S=-g/2,w=e.label?8:0,k=Ze.svg(h),A=Je(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let C=b.get("fill");A.stroke=C??x;let R=k.path(Fs(T,S,y,g,.1),A),I=Math.max(y,f.width),L=g+f.height+w,E=k.rectangle(-I/2,-L/2,I,L,{...A,fill:"transparent",stroke:"none"}),D=h.insert(()=>R,":first-child"),_=h.insert(()=>E);if(e.icon){let O=h.append("g");O.html(`${await _s(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let M=O.node().getBBox(),P=M.width,B=M.height,F=M.x,G=M.y;O.attr("transform",`translate(${-P/2-F},${m?f.height/2+w/2-B/2-G:-f.height/2-w/2-B/2-G})`),O.attr("style",`color: ${b.get("stroke")??v};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-L/2:L/2-f.height})`),D.attr("transform",`translate(0,${m?f.height/2+w/2:-f.height/2-w/2})`),Qe(e,_),e.intersect=function(O){if(X.info("iconSquare intersect",e,O),!e.label)return Xe.rect(e,O);let M=e.x??0,P=e.y??0,B=e.height??0,F=[];return m?F=[{x:M-f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2+f.height+w},{x:M+y/2,y:P-B/2+f.height+w},{x:M+y/2,y:P+B/2},{x:M-y/2,y:P+B/2},{x:M-y/2,y:P-B/2+f.height+w},{x:M-f.width/2,y:P-B/2+f.height+w}]:F=[{x:M-y/2,y:P-B/2},{x:M+y/2,y:P-B/2},{x:M+y/2,y:P-B/2+g},{x:M+f.width/2,y:P-B/2+g},{x:M+f.width/2/2,y:P+B/2},{x:M-f.width/2,y:P+B/2},{x:M-f.width/2,y:P-B/2+g},{x:M-y/2,y:P-B/2+g}],Xe.polygon(e,F,O)},h}var see=N(()=>{"use strict";Ht();pt();nc();Ut();Zd();$t();It();o(aee,"iconSquare")});async function oee(t,e,{config:{flowchart:r}}){let n=new Image;n.src=e?.img??"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;let{labelStyles:s}=je(e);e.labelStyle=s;let l=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let u=Math.max(e.label?l??0:0,e?.assetWidth??i),h=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:u,f=e.constraint==="on"?h/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(h,l??0);let{shapeSvg:d,bbox:p,label:m}=await ut(t,e,"image-shape default"),g=e.pos==="t",y=-h/2,v=-f/2,x=e.label?8:0,b=Ze.svg(d),T=Je(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let S=b.rectangle(y,v,h,f,T),w=Math.max(h,p.width),k=f+p.height+x,A=b.rectangle(-w/2,-k/2,w,k,{...T,fill:"none",stroke:"none"}),C=d.insert(()=>S,":first-child"),R=d.insert(()=>A);if(e.img){let I=d.append("image");I.attr("href",e.img),I.attr("width",h),I.attr("height",f),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-h/2},${g?k/2-f:-k/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-f/2-p.height/2-x/2:f/2-p.height/2+x/2})`),C.attr("transform",`translate(0,${g?p.height/2+x/2:-p.height/2-x/2})`),Qe(e,R),e.intersect=function(I){if(X.info("iconSquare intersect",e,I),!e.label)return Xe.rect(e,I);let L=e.x??0,E=e.y??0,D=e.height??0,_=[];return g?_=[{x:L-p.width/2,y:E-D/2},{x:L+p.width/2,y:E-D/2},{x:L+p.width/2,y:E-D/2+p.height+x},{x:L+h/2,y:E-D/2+p.height+x},{x:L+h/2,y:E+D/2},{x:L-h/2,y:E+D/2},{x:L-h/2,y:E-D/2+p.height+x},{x:L-p.width/2,y:E-D/2+p.height+x}]:_=[{x:L-h/2,y:E-D/2},{x:L+h/2,y:E-D/2},{x:L+h/2,y:E-D/2+f},{x:L+p.width/2,y:E-D/2+f},{x:L+p.width/2/2,y:E+D/2},{x:L-p.width/2,y:E+D/2},{x:L-p.width/2,y:E-D/2+f},{x:L-h/2,y:E-D/2+f}],Xe.polygon(e,_,I)},d}var lee=N(()=>{"use strict";Ht();pt();Ut();$t();It();o(oee,"imageSquare")});async function cee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=[{x:0,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:-3*l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ze.svg(i),p=Je(e,{}),m=Vt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=Bs(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Qe(e,h),e.intersect=function(d){return Xe.polygon(e,u,d)},i}var uee=N(()=>{"use strict";It();Ut();$t();Ht();Jh();o(cee,"inv_trapezoid")});async function Jd(t,e,r){let{labelStyles:n,nodeStyles:i}=je(e);e.labelStyle=n;let{shapeSvg:a,bbox:s}=await ut(t,e,st(e)),l=Math.max(s.width+r.labelPaddingX*2,e?.width||0),u=Math.max(s.height+r.labelPaddingY*2,e?.height||0),h=-l/2,f=-u/2,d,{rx:p,ry:m}=e,{cssStyles:g}=e;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),e.look==="handDrawn"){let y=Ze.svg(a),v=Je(e,{}),x=p||m?y.path(Fs(h,f,l,u,p||0),v):y.rectangle(h,f,l,u,v);d=a.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",Cn(g))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",i).attr("rx",Cn(p)).attr("ry",Cn(m)).attr("x",h).attr("y",f).attr("width",l).attr("height",u);return Qe(e,d),e.calcIntersect=function(y,v){return Xe.rect(y,v)},e.intersect=function(y){return Xe.rect(e,y)},a}var M2=N(()=>{"use strict";It();Ut();Zd();$t();Ht();tr();o(Jd,"drawRect")});async function hee(t,e){let{shapeSvg:r,bbox:n,label:i}=await ut(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Qe(e,a),e.intersect=function(u){return Xe.rect(e,u)},r}var fee=N(()=>{"use strict";M2();It();Ut();o(hee,"labelRect")});async function dee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),u=[{x:0,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:-(3*l)/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ze.svg(i),p=Je(e,{}),m=Vt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=Bs(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Qe(e,h),e.intersect=function(d){return Xe.polygon(e,u,d)},i}var pee=N(()=>{"use strict";It();Ut();$t();Ht();Jh();o(dee,"lean_left")});async function mee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),u=[{x:-3*l/6,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:0,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ze.svg(i),p=Je(e,{}),m=Vt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=Bs(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Qe(e,h),e.intersect=function(d){return Xe.polygon(e,u,d)},i}var gee=N(()=>{"use strict";It();Ut();$t();Ht();Jh();o(mee,"lean_right")});function yee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",st(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),l=Math.max(35,e?.height??0),u=7,h=[{x:s,y:0},{x:0,y:l+u/2},{x:s-2*u,y:l+u/2},{x:0,y:2*l},{x:s,y:l-u/2},{x:2*u,y:l-u/2}],f=Ze.svg(i),d=Je(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=Vt(h),m=f.path(p,d),g=i.insert(()=>m,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${s/2},${-l})`),Qe(e,g),e.intersect=function(y){return X.info("lightningBolt intersect",e,y),Xe.polygon(e,h,y)},i}var vee=N(()=>{"use strict";pt();It();$t();Ht();Ut();It();o(yee,"lightningBolt")});async function xee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=Math.max(a.width+(e.padding??0),e.width??0),u=l/2,h=u/(2.5+l/50),f=Math.max(a.height+h+(e.padding??0),e.height??0),d=f*.1,p,{cssStyles:m}=e;if(e.look==="handDrawn"){let g=Ze.svg(i),y=pRe(0,0,l,f,u,h,d),v=mRe(0,h,l,f,u,h),x=Je(e,{}),b=g.path(y,x),T=g.path(v,x);i.insert(()=>T,":first-child").attr("class","line"),p=i.insert(()=>b,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m)}else{let g=dRe(0,0,l,f,u,h,d);p=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Cn(m)).attr("style",n)}return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Qe(e,p),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+h-(a.y-(a.top??0))})`),e.intersect=function(g){let y=Xe.rect(e,g),v=y.x-(e.x??0);if(u!=0&&(Math.abs(v)<(e.width??0)/2||Math.abs(v)==(e.width??0)/2&&Math.abs(y.y-(e.y??0))>(e.height??0)/2-h)){let x=h*h*(1-v*v/(u*u));x>0&&(x=Math.sqrt(x)),x=h-x,g.y-(e.y??0)>0&&(x=-x),y.y+=x}return y},i}var dRe,pRe,mRe,bee=N(()=>{"use strict";It();Ut();$t();Ht();tr();dRe=o((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),pRe=o((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),mRe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");o(xee,"linedCylinder")});async function Tee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=u/4,f=u+h,{cssStyles:d}=e,p=Ze.svg(i),m=Je(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:-l/2-l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:f/2},...Go(-l/2-l/2*.1,f/2,l/2+l/2*.1,f/2,h,.8),{x:l/2+l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:-f/2},{x:-l/2,y:-f/2},{x:-l/2,y:f/2*1.1},{x:-l/2,y:-f/2}],y=p.polygon(g.map(x=>[x.x,x.y]),m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)-h/2-(a.y-(a.top??0))})`),Qe(e,v),e.intersect=function(x){return Xe.polygon(e,g,x)},i}var wee=N(()=>{"use strict";It();Ut();Ht();$t();o(Tee,"linedWaveEdgedRect")});async function kee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=5,f=-l/2,d=-u/2,{cssStyles:p}=e,m=Ze.svg(i),g=Je(e,{}),y=[{x:f-h,y:d+h},{x:f-h,y:d+u+h},{x:f+l-h,y:d+u+h},{x:f+l-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d+u-h},{x:f+l+h,y:d+u-h},{x:f+l+h,y:d-h},{x:f+h,y:d-h},{x:f+h,y:d},{x:f,y:d},{x:f,y:d+h}],v=[{x:f,y:d+h},{x:f+l-h,y:d+h},{x:f+l-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d},{x:f,y:d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=Vt(y),b=m.path(x,g),T=Vt(v),S=m.path(T,{...g,fill:"none"}),w=i.insert(()=>S,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-h-(a.x-(a.left??0))}, ${-(a.height/2)+h-(a.y-(a.top??0))})`),Qe(e,w),e.intersect=function(k){return Xe.polygon(e,y,k)},i}var Eee=N(()=>{"use strict";It();$t();Ht();Ut();o(kee,"multiRect")});async function See(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=u/4,f=u+h,d=-l/2,p=-f/2,m=5,{cssStyles:g}=e,y=Go(d-m,p+f+m,d+l-m,p+f+m,h,.8),v=y?.[y.length-1],x=[{x:d-m,y:p+m},{x:d-m,y:p+f+m},...y,{x:d+l-m,y:v.y-m},{x:d+l,y:v.y-m},{x:d+l,y:v.y-2*m},{x:d+l+m,y:v.y-2*m},{x:d+l+m,y:p-m},{x:d+m,y:p-m},{x:d+m,y:p},{x:d,y:p},{x:d,y:p+m}],b=[{x:d,y:p+m},{x:d+l-m,y:p+m},{x:d+l-m,y:v.y-m},{x:d+l,y:v.y-m},{x:d+l,y:p},{x:d,y:p}],T=Ze.svg(i),S=Je(e,{});e.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let w=Vt(x),k=T.path(w,S),A=Vt(b),C=T.path(A,S),R=i.insert(()=>k,":first-child");return R.insert(()=>C),R.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",n),R.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-(a.width/2)-m-(a.x-(a.left??0))}, ${-(a.height/2)+m-h/2-(a.y-(a.top??0))})`),Qe(e,R),e.intersect=function(I){return Xe.polygon(e,x,I)},i}var Cee=N(()=>{"use strict";It();Ut();Ht();$t();o(See,"multiWaveEdgedRectangle")});async function Aee(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=je(e);e.labelStyle=n,e.useHtmlLabels||Qt().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:l,label:u}=await ut(t,e,st(e)),h=Math.max(l.width+(e.padding??0)*2,e?.width??0),f=Math.max(l.height+(e.padding??0)*2,e?.height??0),d=-h/2,p=-f/2,{cssStyles:m}=e,g=Ze.svg(s),y=Je(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=g.rectangle(d,p,h,f,y),x=s.insert(()=>v,":first-child");return x.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",m),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Qe(e,x),e.intersect=function(b){return Xe.rect(e,b)},s}var _ee=N(()=>{"use strict";Ht();Ut();$t();It();qn();o(Aee,"note")});async function Dee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=a.width+e.padding,l=a.height+e.padding,u=s+l,h=.5,f=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=Ze.svg(i),g=Je(e,{}),y=gRe(0,0,u),v=m.path(y,g);d=i.insert(()=>v,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),p&&d.attr("style",p)}else d=Bs(i,u,u,f),d.attr("transform",`translate(${-u/2+h}, ${u/2})`);return n&&d.attr("style",n),Qe(e,d),e.calcIntersect=function(m,g){let y=m.width,v=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=Xe.polygon(m,v,g);return{x:x.x-.5,y:x.y-.5}},e.intersect=function(m){return this.calcIntersect(e,m)},i}var gRe,Lee=N(()=>{"use strict";It();Ut();$t();Ht();Jh();gRe=o((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");o(Dee,"question")});async function Ree(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=Math.max(a.width+(e.padding??0),e?.width??0),u=Math.max(a.height+(e.padding??0),e?.height??0),h=-l/2,f=-u/2,d=f/2,p=[{x:h+d,y:f},{x:h,y:0},{x:h+d,y:-f},{x:-h,y:-f},{x:-h,y:f}],{cssStyles:m}=e,g=Ze.svg(i),y=Je(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=Vt(p),x=g.path(v,y),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-d/2},0)`),s.attr("transform",`translate(${-d/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Qe(e,b),e.intersect=function(T){return Xe.polygon(e,p,T)},i}var Nee=N(()=>{"use strict";It();Ut();$t();Ht();o(Ree,"rect_left_inv_arrow")});function yRe(t,e){e&&t.attr("style",e)}async function vRe(t){let e=qe(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=ge(),i=t.label;t.label&&kn(t.label)&&(i=await kh(t.label.replace(tt.lineBreakRegex,`
`),n));let s='"+i+" ";return r.html(sr(s,n)),yRe(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var xRe,kc,aw=N(()=>{"use strict";yr();Xt();gr();pt();tr();o(yRe,"applyStyle");o(vRe,"addHtmlLabel");xRe=o(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),vr(ge().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g," "),X.info("vertexText"+i);let a={isNode:n,label:Ji(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>` `),labelStyle:e&&e.replace("fill:","color:")};return await vRe(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n| /gi):Array.isArray(i)?s=i:s=[];for(let l of s){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),a.appendChild(u)}return a}},"createLabel"),kc=xRe});async function Mee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",n),u=e.description,h=e.label,f=l.node().appendChild(await kc(h,e.labelStyle,!0,!0)),d={width:0,height:0};if(vr(ge()?.flowchart?.htmlLabels)){let C=f.children[0],R=qe(f);d=C.getBoundingClientRect(),R.attr("width",d.width),R.attr("height",d.height)}X.info("Text 2",u);let p=u||[],m=f.getBBox(),g=l.node().appendChild(await kc(p.join?p.join(" "):p,e.labelStyle,!0,!0)),y=g.children[0],v=qe(g);d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height);let x=(e.padding||0)/2;qe(g).attr("transform","translate( "+(d.width>m.width?0:(m.width-d.width)/2)+", "+(m.height+x+5)+")"),qe(f).attr("transform","translate( "+(d.width(X.debug("Rough node insert CXC",I),L),":first-child"),k=a.insert(()=>(X.debug("Rough node insert CXC",I),I),":first-child")}else k=s.insert("rect",":first-child"),A=s.insert("line"),k.attr("class","outer title-state").attr("style",n).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),A.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+m.height+x).attr("y2",-d.height/2-x+m.height+x);return Qe(e,k),e.intersect=function(C){return Xe.rect(e,C)},a}var Iee=N(()=>{"use strict";yr();gr();It();aw();Ut();$t();Ht();Xt();Zd();pt();o(Mee,"rectWithTitle")});function sw(t,e,r,n,i,a,s){let u=(t+r)/2,h=(e+n)/2,f=Math.atan2(n-e,r-t),d=(r-t)/2,p=(n-e)/2,m=d/i,g=p/a,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-y**2),x=u+v*a*Math.sin(f)*(s?-1:1),b=h-v*i*Math.cos(f)*(s?-1:1),T=Math.atan2((e-b)/a,(t-x)/i),w=Math.atan2((n-b)/a,(r-x)/i)-T;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);let k=[];for(let A=0;A<20;A++){let C=A/19,R=T+C*w,I=x+i*Math.cos(R),L=b+a*Math.sin(R);k.push({x:I,y:L})}return k}async function Oee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=e?.padding??0,l=e?.padding??0,u=(e?.width?e?.width:a.width)+s*2,h=(e?.height?e?.height:a.height)+l*2,f=e.radius||5,d=e.taper||5,{cssStyles:p}=e,m=Ze.svg(i),g=Je(e,{});e.stroke&&(g.stroke=e.stroke),e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:-u/2+d,y:-h/2},{x:u/2-d,y:-h/2},...sw(u/2-d,-h/2,u/2,-h/2+d,f,f,!0),{x:u/2,y:-h/2+d},{x:u/2,y:h/2-d},...sw(u/2,h/2-d,u/2-d,h/2,f,f,!0),{x:u/2-d,y:h/2},{x:-u/2+d,y:h/2},...sw(-u/2+d,h/2,-u/2,h/2-d,f,f,!0),{x:-u/2,y:h/2-d},{x:-u/2,y:-h/2+d},...sw(-u/2,-h/2+d,-u/2+d,-h/2,f,f,!0)],v=Vt(y),x=m.path(v,g),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),p&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),Qe(e,b),e.intersect=function(T){return Xe.polygon(e,y,T)},i}var Pee=N(()=>{"use strict";It();Ut();$t();Ht();o(sw,"generateArcPoints");o(Oee,"roundedRect")});async function Bee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=e?.padding??0,u=Math.max(a.width+(e.padding??0)*2,e?.width??0),h=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=-a.width/2-l,d=-a.height/2-l,{cssStyles:p}=e,m=Ze.svg(i),g=Je(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:f,y:d},{x:f+u+8,y:d},{x:f+u+8,y:d+h},{x:f-8,y:d+h},{x:f-8,y:d},{x:f,y:d},{x:f,y:d+h}],v=m.polygon(y.map(b=>[b.x,b.y]),g),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container").attr("style",Cn(p)),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),s.attr("transform",`translate(${-u/2+4+(e.padding??0)-(a.x-(a.left??0))},${-h/2+(e.padding??0)-(a.y-(a.top??0))})`),Qe(e,x),e.intersect=function(b){return Xe.rect(e,b)},i}var Fee=N(()=>{"use strict";It();Ut();$t();Ht();tr();o(Bee,"shadedProcess")});async function $ee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=-l/2,f=-u/2,{cssStyles:d}=e,p=Ze.svg(i),m=Je(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:h,y:f},{x:h,y:f+u},{x:h+l,y:f+u},{x:h+l,y:f-u/2}],y=Vt(g),v=p.path(y,m),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),x.attr("transform",`translate(0, ${u/4})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))}, ${-u/4+(e.padding??0)-(a.y-(a.top??0))})`),Qe(e,x),e.intersect=function(b){return Xe.polygon(e,g,b)},i}var zee=N(()=>{"use strict";It();Ut();$t();Ht();o($ee,"slopedRect")});async function Gee(t,e){let r={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return Jd(t,e,r)}var Vee=N(()=>{"use strict";M2();o(Gee,"squareRect")});async function Uee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=a.height+e.padding,l=a.width+s/4+e.padding,u=s/2,{cssStyles:h}=e,f=Ze.svg(i),d=Je(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-l/2+u,y:-s/2},{x:l/2-u,y:-s/2},...Kd(-l/2+u,0,u,50,90,270),{x:l/2-u,y:s/2},...Kd(l/2-u,0,u,50,270,450)],m=Vt(p),g=f.path(m,d),y=i.insert(()=>g,":first-child");return y.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),Qe(e,y),e.intersect=function(v){return Xe.polygon(e,p,v)},i}var Hee=N(()=>{"use strict";It();Ut();$t();Ht();o(Uee,"stadium")});async function qee(t,e){return Jd(t,e,{rx:5,ry:5,classes:"flowchart-node"})}var Wee=N(()=>{"use strict";M2();o(qee,"state")});function Yee(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=je(e);e.labelStyle=n;let{cssStyles:a}=e,{lineColor:s,stateBorder:l,nodeBorder:u}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),f=Ze.svg(h),d=Je(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=f.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),m=l??u,g=f.circle(0,0,5,{...d,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),y=h.insert(()=>p,":first-child");return y.insert(()=>g),a&&y.selectAll("path").attr("style",a),i&&y.selectAll("path").attr("style",i),Qe(e,y),e.intersect=function(v){return Xe.circle(e,7,v)},h}var Xee=N(()=>{"use strict";Ht();Ut();$t();It();o(Yee,"stateEnd")});function jee(t,e,{config:{themeVariables:r}}){let{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if(e.look==="handDrawn"){let l=Ze.svg(i).circle(0,0,14,tJ(n));a=i.insert(()=>l),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Qe(e,a),e.intersect=function(s){return Xe.circle(e,7,s)},i}var Kee=N(()=>{"use strict";Ht();Ut();$t();It();o(jee,"stateStart")});async function Qee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=(e?.padding||0)/2,l=a.width+e.padding,u=a.height+e.padding,h=-a.width/2-s,f=-a.height/2-s,d=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(e.look==="handDrawn"){let p=Ze.svg(i),m=Je(e,{}),g=p.rectangle(h-8,f,l+16,u,m),y=p.line(h,f,h,f+u,m),v=p.line(h+l,f,h+l,f+u,m);i.insert(()=>y,":first-child"),i.insert(()=>v,":first-child");let x=i.insert(()=>g,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",Cn(b)),Qe(e,x)}else{let p=Bs(i,l,u,d);n&&p.attr("style",n),Qe(e,p)}return e.intersect=function(p){return Xe.polygon(e,d,p)},i}var Zee=N(()=>{"use strict";It();Ut();$t();Ht();Jh();tr();o(Qee,"subroutine")});async function Jee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=-s/2,h=-l/2,f=.2*l,d=.2*l,{cssStyles:p}=e,m=Ze.svg(i),g=Je(e,{}),y=[{x:u-f/2,y:h},{x:u+s+f/2,y:h},{x:u+s+f/2,y:h+l},{x:u-f/2,y:h+l}],v=[{x:u+s-f/2,y:h+l},{x:u+s+f/2,y:h+l},{x:u+s+f/2,y:h+l-d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=Vt(y),b=m.path(x,g),T=Vt(v),S=m.path(T,{...g,fillStyle:"solid"}),w=i.insert(()=>S,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),Qe(e,w),e.intersect=function(k){return Xe.polygon(e,y,k)},i}var ete=N(()=>{"use strict";It();$t();Ht();Ut();o(Jee,"taggedRect")});async function tte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=u/4,f=.2*l,d=.2*u,p=u+h,{cssStyles:m}=e,g=Ze.svg(i),y=Je(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=[{x:-l/2-l/2*.1,y:p/2},...Go(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,h,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],x=-l/2+l/2*.1,b=-p/2-d*.4,T=[{x:x+l-f,y:(b+u)*1.4},{x:x+l,y:b+u-d},{x:x+l,y:(b+u)*.9},...Go(x+l,(b+u)*1.3,x+l-f,(b+u)*1.5,-u*.03,.5)],S=Vt(v),w=g.path(S,y),k=Vt(T),A=g.path(k,{...y,fillStyle:"solid"}),C=i.insert(()=>A,":first-child");return C.insert(()=>w,":first-child"),C.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-h/2-(a.y-(a.top??0))})`),Qe(e,C),e.intersect=function(R){return Xe.polygon(e,v,R)},i}var rte=N(()=>{"use strict";It();Ut();Ht();$t();o(tte,"taggedWaveEdgedRectangle")});async function nte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=Math.max(a.width+e.padding,e?.width||0),l=Math.max(a.height+e.padding,e?.height||0),u=-s/2,h=-l/2,f=i.insert("rect",":first-child");return f.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",s).attr("height",l),Qe(e,f),e.intersect=function(d){return Xe.rect(e,d)},i}var ite=N(()=>{"use strict";It();Ut();$t();o(nte,"text")});async function ate(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s,halfPadding:l}=await ut(t,e,st(e)),u=e.look==="neo"?l*2:l,h=a.height+u,f=h/2,d=f/(2.5+h/50),p=a.width+d+u,{cssStyles:m}=e,g;if(e.look==="handDrawn"){let y=Ze.svg(i),v=TRe(0,0,p,h,d,f),x=wRe(0,0,p,h,d,f),b=y.path(v,Je(e,{})),T=y.path(x,Je(e,{fill:"none"}));g=i.insert(()=>T,":first-child"),g=i.insert(()=>b,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{let y=bRe(0,0,p,h,d,f);g=i.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",Cn(m)).attr("style",n),g.attr("class","basic label-container"),m&&g.selectAll("path").attr("style",m),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-p/2}, ${h/2} )`),s.attr("transform",`translate(${-(a.width/2)-d-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Qe(e,g),e.intersect=function(y){let v=Xe.rect(e,y),x=v.y-(e.y??0);if(f!=0&&(Math.abs(x)<(e.height??0)/2||Math.abs(x)==(e.height??0)/2&&Math.abs(v.x-(e.x??0))>(e.width??0)/2-d)){let b=d*d*(1-x*x/(f*f));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,y.x-(e.x??0)>0&&(b=-b),v.x+=b}return v},i}var bRe,TRe,wRe,ste=N(()=>{"use strict";It();$t();Ht();Ut();tr();bRe=o((t,e,r,n,i,a)=>`M${t},${e}
a${i},${a} 0,0,1 0,${-n}
l${r},0
a${i},${a} 0,0,1 0,${n}
M${r},${-n}
a${i},${a} 0,0,0 0,${n}
l${-r},0`,"createCylinderPathD"),TRe=o((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),wRe=o((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");o(ate,"tiltedCylinder")});async function ote(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=a.width+e.padding,l=a.height+e.padding,u=[{x:-3*l/6,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:0,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ze.svg(i),p=Je(e,{}),m=Vt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=Bs(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Qe(e,h),e.intersect=function(d){return Xe.polygon(e,u,d)},i}var lte=N(()=>{"use strict";It();Ut();$t();Ht();Jh();o(ote,"trapezoid")});async function cte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=60,l=20,u=Math.max(s,a.width+(e.padding??0)*2,e?.width??0),h=Math.max(l,a.height+(e.padding??0)*2,e?.height??0),{cssStyles:f}=e,d=Ze.svg(i),p=Je(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=[{x:-u/2*.8,y:-h/2},{x:u/2*.8,y:-h/2},{x:u/2,y:-h/2*.6},{x:u/2,y:h/2},{x:-u/2,y:h/2},{x:-u/2,y:-h/2*.6}],g=Vt(m),y=d.path(g,p),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),Qe(e,v),e.intersect=function(x){return Xe.polygon(e,m,x)},i}var ute=N(()=>{"use strict";It();Ut();$t();Ht();o(cte,"trapezoidalPentagon")});async function hte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=vr(ge().flowchart?.htmlLabels),u=a.width+(e.padding??0),h=u+a.height,f=u+a.height,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-h}],{cssStyles:p}=e,m=Ze.svg(i),g=Je(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=Vt(d),v=m.path(y,g),x=i.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return p&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",p),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),e.width=u,e.height=h,Qe(e,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${h/2-(a.height+(e.padding??0)/(l?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(b){return X.info("Triangle intersect",e,d,b),Xe.polygon(e,d,b)},i}var fte=N(()=>{"use strict";pt();It();Ut();$t();Ht();It();gr();Xt();o(hte,"triangle")});async function dte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=u/8,f=u+h,{cssStyles:d}=e,m=70-l,g=m>0?m/2:0,y=Ze.svg(i),v=Je(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let x=[{x:-l/2-g,y:f/2},...Go(-l/2-g,f/2,l/2+g,f/2,h,.8),{x:l/2+g,y:-f/2},{x:-l/2-g,y:-f/2}],b=Vt(x),T=y.path(b,v),S=i.insert(()=>T,":first-child");return S.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-h-(a.y-(a.top??0))})`),Qe(e,S),e.intersect=function(w){return Xe.polygon(e,x,w)},i}var pte=N(()=>{"use strict";It();Ut();Ht();$t();o(dte,"waveEdgedRectangle")});async function mte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ut(t,e,st(e)),s=100,l=50,u=Math.max(a.width+(e.padding??0)*2,e?.width??0),h=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=u/h,d=u,p=h;d>p*f?p=d/f:d=p*f,d=Math.max(d,s),p=Math.max(p,l);let m=Math.min(p*.2,p/4),g=p+m*2,{cssStyles:y}=e,v=Ze.svg(i),x=Je(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-d/2,y:g/2},...Go(-d/2,g/2,d/2,g/2,m,1),{x:d/2,y:-g/2},...Go(d/2,-g/2,-d/2,-g/2,m,-1)],T=Vt(b),S=v.path(T,x),w=i.insert(()=>S,":first-child");return w.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),Qe(e,w),e.intersect=function(k){return Xe.polygon(e,b,k)},i}var gte=N(()=>{"use strict";It();Ut();$t();Ht();o(mte,"waveRectangle")});async function yte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ut(t,e,st(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=5,f=-l/2,d=-u/2,{cssStyles:p}=e,m=Ze.svg(i),g=Je(e,{}),y=[{x:f-h,y:d-h},{x:f-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d-h}],v=`M${f-h},${d-h} L${f+l},${d-h} L${f+l},${d+u} L${f-h},${d+u} L${f-h},${d-h}
M${f-h},${d} L${f+l},${d}
M${f},${d-h} L${f},${d+u}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=m.path(v,g),b=i.insert(()=>x,":first-child");return b.attr("transform",`translate(${h/2}, ${h/2})`),b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+h/2-(a.x-(a.left??0))}, ${-(a.height/2)+h/2-(a.y-(a.top??0))})`),Qe(e,b),e.intersect=function(T){return Xe.polygon(e,y,T)},i}var vte=N(()=>{"use strict";It();$t();Ht();Ut();o(yte,"windowPane")});async function H9(t,e){let r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){let{themeVariables:U}=Qt(),{background:j}=U,te={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${j}`]};await H9(t,te)}let n=Qt();e.useHtmlLabels=n.htmlLabels;let i=n.er?.diagramPadding??10,a=n.er?.entityPadding??6,{cssStyles:s}=e,{labelStyles:l,nodeStyles:u}=je(e);if(r.attributes.length===0&&e.label){let U={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5,classes:""};Zi(e.label,n)+U.labelPaddingX*20){let U=d.width+i*2-(y+v+x+b);y+=U/w,v+=U/w,x>0&&(x+=U/w),b>0&&(b+=U/w)}let A=y+v+x+b,C=Ze.svg(f),R=Je(e,{});e.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let I=0;g.length>0&&(I=g.reduce((U,j)=>U+(j?.rowHeight??0),0));let L=Math.max(k.width+i*2,e?.width||0,A),E=Math.max((I??0)+d.height,e?.height||0),D=-L/2,_=-E/2;f.selectAll("g:not(:first-child)").each((U,j,te)=>{let Y=qe(te[j]),oe=Y.attr("transform"),J=0,ue=0;if(oe){let ee=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(oe);ee&&(J=parseFloat(ee[1]),ue=parseFloat(ee[2]),Y.attr("class").includes("attribute-name")?J+=y:Y.attr("class").includes("attribute-keys")?J+=y+v:Y.attr("class").includes("attribute-comment")&&(J+=y+v+x))}Y.attr("transform",`translate(${D+i/2+J}, ${ue+_+d.height+a/2})`)}),f.select(".name").attr("transform","translate("+-d.width/2+", "+(_+a/2)+")");let O=C.rectangle(D,_,L,E,R),M=f.insert(()=>O,":first-child").attr("style",s.join("")),{themeVariables:P}=Qt(),{rowEven:B,rowOdd:F,nodeBorder:G}=P;m.push(0);for(let[U,j]of g.entries()){let Y=(U+1)%2===0&&j.yOffset!==0,oe=C.rectangle(D,d.height+_+j?.yOffset,L,j?.rowHeight,{...R,fill:Y?B:F,stroke:G});f.insert(()=>oe,"g.label").attr("style",s.join("")).attr("class",`row-rect-${Y?"even":"odd"}`)}let $=C.line(D,d.height+_,L+D,d.height+_,R);f.insert(()=>$).attr("class","divider"),$=C.line(y+D,d.height+_,y+D,E+_,R),f.insert(()=>$).attr("class","divider"),T&&($=C.line(y+v+D,d.height+_,y+v+D,E+_,R),f.insert(()=>$).attr("class","divider")),S&&($=C.line(y+v+x+D,d.height+_,y+v+x+D,E+_,R),f.insert(()=>$).attr("class","divider"));for(let U of m)$=C.line(D,d.height+_+U,L+D,d.height+_+U,R),f.insert(()=>$).attr("class","divider");if(Qe(e,M),u&&e.look!=="handDrawn"){let j=u.split(";")?.filter(te=>te.includes("stroke"))?.map(te=>`${te}`).join("; ");f.selectAll("path").attr("style",j??""),f.selectAll(".row-rect-even path").attr("style",u)}return e.intersect=function(U){return Xe.rect(e,U)},f}async function I2(t,e,r,n=0,i=0,a=[],s=""){let l=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",s);e!==rc(e)&&(e=rc(e),e=e.replaceAll("<","<").replaceAll(">",">"));let u=l.node().appendChild(await di(l,e,{width:Zi(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let f=u.children[0];for(f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">");f.childNodes[0];)f=f.childNodes[0],f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">")}let h=u.getBBox();if(vr(r.htmlLabels)){let f=u.children[0];f.style.textAlign="start";let d=qe(u);h=f.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}var xte=N(()=>{"use strict";It();Ut();$t();Ht();M2();qn();zo();gr();yr();tr();o(H9,"erBox");o(I2,"addText")});async function bte(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",st(e)).attr("id",e.domId||e.id),l=null,u=null,h=null,f=null,d=0,p=0,m=0;if(l=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let b=e.annotations[0];await ow(l,{text:`\xAB${b}\xBB`},0),d=l.node().getBBox().height}u=s.insert("g").attr("class","label-group text"),await ow(u,e,0,["font-weight: bolder"]);let g=u.node().getBBox();p=g.height,h=s.insert("g").attr("class","members-group text");let y=0;for(let b of e.members){let T=await ow(h,b,y,[b.parseClassifier()]);y+=T+a}m=h.node().getBBox().height,m<=0&&(m=i/2),f=s.insert("g").attr("class","methods-group text");let v=0;for(let b of e.methods){let T=await ow(f,b,v,[b.parseClassifier()]);v+=T+a}let x=s.node().getBBox();if(l!==null){let b=l.node().getBBox();l.attr("transform",`translate(${-b.width/2})`)}return u.attr("transform",`translate(${-g.width/2}, ${d})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+i*2})`),x=s.node().getBBox(),f.attr("transform",`translate(0, ${d+p+(m?m+i*4:i*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}async function ow(t,e,r,n=[]){let i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=Qt(),s="useHtmlLabels"in e?e.useHtmlLabels:vr(a.htmlLabels)??!0,l="";"text"in e?l=e.text:l=e.label,!s&&l.startsWith("\\")&&(l=l.substring(1)),kn(l)&&(s=!0);let u=await di(i,iv(Ji(l)),{width:Zi(l,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),h,f=1;if(s){let d=u.children[0],p=qe(u);f=d.innerHTML.split(" ").length,d.innerHTML.includes("")&&(f+=d.innerHTML.split("").length-1);let m=d.getElementsByTagName("img");if(m){let g=l.replace(/ ]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,S=parseInt(b,10)*5+"px";y.style.minWidth=S,y.style.maxWidth=S}else y.style.width="100%";v(y)}o(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{n.includes("font-weight: bolder")&&qe(u).selectAll("tspan").attr("font-weight",""),f=u.children.length;let d=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(d.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=u.getBBox()}return i.attr("transform","translate(0,"+(-h.height/(2*f)+r)+")"),h.height}var Tte=N(()=>{"use strict";yr();qn();It();tr();Xt();zo();gr();o(bte,"textHelper");o(ow,"addText")});async function wte(t,e){let r=ge(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??vr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:l,bbox:u}=await bte(t,e,r,a,i),{labelStyles:h,nodeStyles:f}=je(e);e.labelStyle=h,e.cssStyles=s.styles||"";let d=s.styles?.join(";")||f||"";e.cssStyles||(e.cssStyles=d.replaceAll("!important","").split(";"));let p=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,m=Ze.svg(l),g=Je(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=u.width,v=u.height;s.members.length===0&&s.methods.length===0?v+=i:s.members.length>0&&s.methods.length===0&&(v+=i*2);let x=-y/2,b=-v/2,T=m.rectangle(x-n,b-n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0),y+2*n,v+2*n+(p?n*2:s.members.length===0&&s.methods.length===0?-n:0),g),S=l.insert(()=>T,":first-child");S.attr("class","basic label-container");let w=S.node().getBBox();l.selectAll(".text").each((R,I,L)=>{let E=qe(L[I]),D=E.attr("transform"),_=0;if(D){let B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);B&&(_=parseFloat(B[2]))}let O=_+b+n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(O-=4);let M=x;(E.attr("class").includes("label-group")||E.attr("class").includes("annotation-group"))&&(M=-E.node()?.getBBox().width/2||0,l.selectAll("text").each(function(P,B,F){window.getComputedStyle(F[B]).textAnchor==="middle"&&(M=0)})),E.attr("transform",`translate(${M}, ${O})`)});let k=l.select(".annotation-group").node().getBBox().height-(p?n/2:0)||0,A=l.select(".label-group").node().getBBox().height-(p?n/2:0)||0,C=l.select(".members-group").node().getBBox().height-(p?n/2:0)||0;if(s.members.length>0||s.methods.length>0||p){let R=m.line(w.x,k+A+b+n,w.x+w.width,k+A+b+n,g);l.insert(()=>R).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){let R=m.line(w.x,k+A+C+b+i*2+n,w.x+w.width,k+A+C+b+n+i*2,g);l.insert(()=>R).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&l.selectAll("path").attr("style",d),S.select(":nth-child(2)").attr("style",d),l.selectAll(".divider").select("path").attr("style",d),e.labelStyle?l.selectAll("span").attr("style",e.labelStyle):l.selectAll("span").attr("style",d),!a){let R=RegExp(/color\s*:\s*([^;]*)/),I=R.exec(d);if(I){let L=I[0].replace("color","fill");l.selectAll("tspan").attr("style",L)}else if(h){let L=R.exec(h);if(L){let E=L[0].replace("color","fill");l.selectAll("tspan").attr("style",E)}}}return Qe(e,S),e.intersect=function(R){return Xe.rect(e,R)},l}var kte=N(()=>{"use strict";It();Xt();yr();Ht();$t();Ut();Tte();gr();o(wte,"classBox")});async function Ete(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let i=e,a=e,s=20,l=20,u="verifyMethod"in e,h=st(e),f=t.insert("g").attr("class",h).attr("id",e.domId??e.id),d;u?d=await Ou(f,`<<${i.type}>>`,0,e.labelStyle):d=await Ou(f,"<<Element>>",0,e.labelStyle);let p=d,m=await Ou(f,i.name,p,e.labelStyle+"; font-weight: bold;");if(p+=m+l,u){let k=await Ou(f,`${i.requirementId?`ID: ${i.requirementId}`:""}`,p,e.labelStyle);p+=k;let A=await Ou(f,`${i.text?`Text: ${i.text}`:""}`,p,e.labelStyle);p+=A;let C=await Ou(f,`${i.risk?`Risk: ${i.risk}`:""}`,p,e.labelStyle);p+=C,await Ou(f,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,p,e.labelStyle)}else{let k=await Ou(f,`${a.type?`Type: ${a.type}`:""}`,p,e.labelStyle);p+=k,await Ou(f,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,p,e.labelStyle)}let g=(f.node()?.getBBox().width??200)+s,y=(f.node()?.getBBox().height??200)+s,v=-g/2,x=-y/2,b=Ze.svg(f),T=Je(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let S=b.rectangle(v,x,g,y,T),w=f.insert(()=>S,":first-child");if(w.attr("class","basic label-container").attr("style",n),f.selectAll(".label").each((k,A,C)=>{let R=qe(C[A]),I=R.attr("transform"),L=0,E=0;if(I){let M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);M&&(L=parseFloat(M[1]),E=parseFloat(M[2]))}let D=E-y/2,_=v+s/2;(A===0||A===1)&&(_=L),R.attr("transform",`translate(${_}, ${D+s})`)}),p>d+m+l){let k=b.line(v,x+d+m+l,v+g,x+d+m+l,T);f.insert(()=>k).attr("style",n)}return Qe(e,w),e.intersect=function(k){return Xe.rect(e,k)},f}async function Ou(t,e,r,n=""){if(e==="")return 0;let i=t.insert("g").attr("class","label").attr("style",n),a=ge(),s=a.htmlLabels??!0,l=await di(i,iv(Ji(e)),{width:Zi(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),u;if(s){let h=l.children[0],f=qe(l);u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}else{let h=l.children[0];for(let f of h.children)f.textContent=f.textContent.replaceAll(">",">").replaceAll("<","<"),n&&f.setAttribute("style",n);u=l.getBBox(),u.height+=6}return i.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}var Ste=N(()=>{"use strict";It();Ut();$t();Ht();tr();Xt();zo();yr();o(Ete,"requirementBox");o(Ou,"addText")});async function Cte(t,e,{config:r}){let{labelStyles:n,nodeStyles:i}=je(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:l,bbox:u,label:h}=await ut(t,e,st(e)),f=e.padding||10,d="",p;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),p=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));let m={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await YT(p,"ticket"in e&&e.ticket||"",m):{label:g,bbox:y}=await YT(l,"ticket"in e&&e.ticket||"",m);let{label:v,bbox:x}=await YT(l,"assigned"in e&&e.assigned||"",m);e.width=s;let b=10,T=e?.width||0,S=Math.max(y.height,x.height)/2,w=Math.max(u.height+b*2,e?.height||0)+S,k=-T/2,A=-w/2;h.attr("transform","translate("+(f-T/2)+", "+(-S-u.height/2)+")"),g.attr("transform","translate("+(f-T/2)+", "+(-S+u.height/2)+")"),v.attr("transform","translate("+(f+T/2-x.width-2*a)+", "+(-S+u.height/2)+")");let C,{rx:R,ry:I}=e,{cssStyles:L}=e;if(e.look==="handDrawn"){let E=Ze.svg(l),D=Je(e,{}),_=R||I?E.path(Fs(k,A,T,w,R||0),D):E.rectangle(k,A,T,w,D);C=l.insert(()=>_,":first-child"),C.attr("class","basic label-container").attr("style",L||null)}else{C=l.insert("rect",":first-child"),C.attr("class","basic label-container __APA__").attr("style",i).attr("rx",R??5).attr("ry",I??5).attr("x",k).attr("y",A).attr("width",T).attr("height",w);let E="priority"in e&&e.priority;if(E){let D=l.append("line"),_=k+2,O=A+Math.floor((R??0)/2),M=A+w-Math.floor((R??0)/2);D.attr("x1",_).attr("y1",O).attr("x2",_).attr("y2",M).attr("stroke-width","4").attr("stroke",kRe(E))}}return Qe(e,C),e.height=w,e.intersect=function(E){return Xe.rect(e,E)},l}var kRe,Ate=N(()=>{"use strict";It();Ut();Zd();$t();Ht();kRe=o(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");o(Cte,"kanbanItem")});async function _te(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await ut(t,e,st(e)),u=a.width+10*s,h=a.height+8*s,f=.15*u,{cssStyles:d}=e,p=a.width+20,m=a.height+20,g=Math.max(u,p),y=Math.max(h,m);l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let v,x=`M0 0
a${f},${f} 1 0,0 ${g*.25},${-1*y*.1}
a${f},${f} 1 0,0 ${g*.25},0
a${f},${f} 1 0,0 ${g*.25},0
a${f},${f} 1 0,0 ${g*.25},${y*.1}
a${f},${f} 1 0,0 ${g*.15},${y*.33}
a${f*.8},${f*.8} 1 0,0 0,${y*.34}
a${f},${f} 1 0,0 ${-1*g*.15},${y*.33}
a${f},${f} 1 0,0 ${-1*g*.25},${y*.15}
a${f},${f} 1 0,0 ${-1*g*.25},0
a${f},${f} 1 0,0 ${-1*g*.25},0
a${f},${f} 1 0,0 ${-1*g*.25},${-1*y*.15}
a${f},${f} 1 0,0 ${-1*g*.1},${-1*y*.33}
a${f*.8},${f*.8} 1 0,0 0,${-1*y*.34}
a${f},${f} 1 0,0 ${g*.1},${-1*y*.33}
H0 V0 Z`;if(e.look==="handDrawn"){let b=Ze.svg(i),T=Je(e,{}),S=b.path(x,T);v=i.insert(()=>S,":first-child"),v.attr("class","basic label-container").attr("style",Cn(d))}else v=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",x);return v.attr("transform",`translate(${-g/2}, ${-y/2})`),Qe(e,v),e.calcIntersect=function(b,T){return Xe.rect(b,T)},e.intersect=function(b){return X.info("Bang intersect",e,b),Xe.rect(e,b)},i}var Dte=N(()=>{"use strict";pt();It();Ut();$t();Ht();tr();o(_te,"bang")});async function Lte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await ut(t,e,st(e)),u=a.width+2*s,h=a.height+2*s,f=.15*u,d=.25*u,p=.35*u,m=.2*u,{cssStyles:g}=e,y,v=`M0 0
a${f},${f} 0 0,1 ${u*.25},${-1*u*.1}
a${p},${p} 1 0,1 ${u*.4},${-1*u*.1}
a${d},${d} 1 0,1 ${u*.35},${u*.2}
a${f},${f} 1 0,1 ${u*.15},${h*.35}
a${m},${m} 1 0,1 ${-1*u*.15},${h*.65}
a${d},${f} 1 0,1 ${-1*u*.25},${u*.15}
a${p},${p} 1 0,1 ${-1*u*.5},0
a${f},${f} 1 0,1 ${-1*u*.25},${-1*u*.15}
a${f},${f} 1 0,1 ${-1*u*.1},${-1*h*.35}
a${m},${m} 1 0,1 ${u*.1},${-1*h*.65}
H0 V0 Z`;if(e.look==="handDrawn"){let x=Ze.svg(i),b=Je(e,{}),T=x.path(v,b);y=i.insert(()=>T,":first-child"),y.attr("class","basic label-container").attr("style",Cn(g))}else y=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",v);return l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-u/2}, ${-h/2})`),Qe(e,y),e.calcIntersect=function(x,b){return Xe.rect(x,b)},e.intersect=function(x){return X.info("Cloud intersect",e,x),Xe.rect(e,x)},i}var Rte=N(()=>{"use strict";Ht();pt();tr();Ut();$t();It();o(Lte,"cloud")});async function Nte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await ut(t,e,st(e)),u=a.width+8*s,h=a.height+2*s,f=5,d=`
M${-u/2} ${h/2-f}
v${-h+2*f}
q0,-${f} ${f},-${f}
h${u-2*f}
q${f},0 ${f},${f}
v${h-2*f}
q0,${f} -${f},${f}
h${-u+2*f}
q-${f},0 -${f},-${f}
Z
`,p=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",d);return i.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",h/2).attr("x2",u/2).attr("y2",h/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>l.node()),Qe(e,p),e.calcIntersect=function(m,g){return Xe.rect(m,g)},e.intersect=function(m){return Xe.rect(e,m)},i}var Mte=N(()=>{"use strict";Ut();$t();It();o(Nte,"defaultMindmapNode")});async function Ite(t,e){let r={padding:e.padding??0};return iw(t,e,r)}var Ote=N(()=>{"use strict";U9();o(Ite,"mindmapCircle")});function Pte(t){return t in q9}var ERe,SRe,q9,W9=N(()=>{"use strict";yJ();bJ();wJ();EJ();U9();CJ();_J();LJ();NJ();IJ();PJ();FJ();zJ();VJ();HJ();WJ();XJ();KJ();ZJ();eee();ree();iee();see();lee();uee();fee();pee();gee();vee();bee();wee();Eee();Cee();_ee();Lee();Nee();Iee();Pee();Fee();zee();Vee();Hee();Wee();Xee();Kee();Zee();ete();rte();ite();ste();lte();ute();fte();pte();gte();vte();xte();kte();Ste();Ate();Dte();Rte();Mte();Ote();ERe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Gee},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Oee},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Uee},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Qee},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:OJ},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:iw},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:_te},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Lte},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Dee},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:jJ},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:mee},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:dee},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ote},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:cee},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:$J},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:nte},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:TJ},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Bee},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:jee},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Yee},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:qJ},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:QJ},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:AJ},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:DJ},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:RJ},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:yee},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:dte},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:YJ},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ate},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:xee},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:MJ},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:BJ},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:hte},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:yte},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:GJ},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:cte},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:UJ},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:$ee},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:See},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:kee},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:xJ},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:SJ},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tte},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Jee},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:mte},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Ree},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Tee}],SRe=o(()=>{let e=[...Object.entries({state:qee,choice:kJ,note:Aee,rectWithTitle:Mee,labelRect:hee,iconSquare:aee,iconCircle:tee,icon:JJ,iconRounded:nee,imageSquare:oee,anchor:gJ,kanbanItem:Cte,mindmapCircle:Ite,defaultMindmapNode:Nte,classBox:wte,erBox:H9,requirementBox:Ete}),...ERe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),q9=SRe();o(Pte,"isValidShape")});var CRe,lw,Bte=N(()=>{"use strict";yr();w2();Xt();pt();W9();tr();gr();ci();CRe="flowchart-",lw=class{constructor(){this.vertexCounter=0;this.config=ge();this.vertices=new Map;this.edges=[];this.classes=new Map;this.subGraphs=[];this.subGraphLookup=new Map;this.tooltips=new Map;this.subCount=0;this.firstGraphFlag=!0;this.secCount=-1;this.posCrossRef=[];this.funs=[];this.setAccTitle=Rr;this.setAccDescription=Ir;this.setDiagramTitle=$r;this.getAccTitle=Mr;this.getAccDescription=Or;this.getDiagramTitle=Pr;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{o(this,"FlowDB")}sanitizeText(e){return tt.sanitizeText(e,this.config)}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return r.domId;return e}addVertex(e,r,n,i,a,s,l={},u){if(!e||e.trim().length===0)return;let h;if(u!==void 0){let m;u.includes(`
`)?m=u+`
`:m=`{
`+u+`
}`,h=Kh(m,{schema:jh})}let f=this.edges.find(m=>m.id===e);if(f){let m=h;m?.animate!==void 0&&(f.animate=m.animate),m?.animation!==void 0&&(f.animation=m.animation),m?.curve!==void 0&&(f.interpolate=m.curve);return}let d,p=this.vertices.get(e);if(p===void 0&&(p={id:e,labelType:"text",domId:CRe+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,r!==void 0?(this.config=ge(),d=this.sanitizeText(r.text.trim()),p.labelType=r.type,d.startsWith('"')&&d.endsWith('"')&&(d=d.substring(1,d.length-1)),p.text=d):p.text===void 0&&(p.text=e),n!==void 0&&(p.type=n),i?.forEach(m=>{p.styles.push(m)}),a?.forEach(m=>{p.classes.push(m)}),s!==void 0&&(p.dir=s),p.props===void 0?p.props=l:l!==void 0&&Object.assign(p.props,l),h!==void 0){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!Pte(h.shape))throw new Error(`No such shape: ${h.shape}.`);p.type=h?.shape}h?.label&&(p.text=h?.label),h?.icon&&(p.icon=h?.icon,!h.label?.trim()&&p.text===e&&(p.text="")),h?.form&&(p.form=h?.form),h?.pos&&(p.pos=h?.pos),h?.img&&(p.img=h?.img,!h.label?.trim()&&p.text===e&&(p.text="")),h?.constraint&&(p.constraint=h.constraint),h.w&&(p.assetWidth=Number(h.w)),h.h&&(p.assetHeight=Number(h.h))}}addSingleLink(e,r,n,i){let l={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};X.info("abc78 Got edge...",l);let u=n.text;if(u!==void 0&&(l.text=this.sanitizeText(u.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=u.type),n!==void 0&&(l.type=n.type,l.stroke=n.stroke,l.length=n.length>10?10:n.length),i&&!this.edges.some(h=>h.id===i))l.id=i,l.isUserDefinedId=!0;else{let h=this.edges.filter(f=>f.start===l.start&&f.end===l.end);h.length===0?l.id=xc(l.start,l.end,{counter:0,prefix:"L"}):l.id=xc(l.start,l.end,{counter:h.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))X.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
Initialize mermaid with maxEdges set to a higher number to allow more edges.
You cannot set this config via configuration inside the diagram as it is a secure config.
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string"}addLink(e,r,n){let i=this.isLinkData(n)?n.id.replace("@",""):void 0;X.info("addLink",e,r,i);for(let a of e)for(let s of r){let l=a===e[e.length-1],u=s===r[0];l&&u?this.addSingleLink(a,s,n,i):this.addSingleLink(a,s,n,void 0)}}updateLinkInterpolate(e,r){e.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r})}updateLink(e,r){e.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} 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.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(e,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/ยงยงยง/g,",").split(";");e.split(",").forEach(i=>{let a=this.classes.get(i);a===void 0&&(a={id:i,styles:[],textStyles:[]},this.classes.set(i,a)),n?.forEach(s=>{if(/color/.exec(s)){let l=s.replace("fill","bgFill");a.textStyles.push(l)}a.styles.push(s)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(e,r){for(let n of e.split(",")){let i=this.vertices.get(n);i&&i.classes.push(r);let a=this.edges.find(l=>l.id===n);a&&a.classes.push(r);let s=this.subGraphLookup.get(n);s&&s.classes.push(r)}}setTooltip(e,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(e,r,n){let i=this.lookUpDomId(e);if(ge().securityLevel!=="loose"||r===void 0)return;let a=[];if(typeof n=="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l{let l=document.querySelector(`[id="${i}"]`);l!==null&&l.addEventListener("click",()=>{qt.runFunc(r,...a)},!1)}))}setLink(e,r,n){e.split(",").forEach(i=>{let a=this.vertices.get(i);a!==void 0&&(a.link=qt.formatUrl(r,this.config),a.linkTarget=n)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach(i=>{this.setClickFun(i,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach(r=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let r=qe(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=qe("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),qe(e).select("svg").selectAll("g.node").on("mouseover",a=>{let s=qe(a.currentTarget);if(s.attr("title")===null)return;let u=a.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(s.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(r.html().replace(/<br\/>/g," ")),s.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),qe(a.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=ge(),Sr()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n){let i=e.text.trim(),a=n.text;e===n&&/\s/.exec(n.text)&&(i=void 0);let l=o(p=>{let m={boolean:{},number:{},string:{}},g=[],y;return{nodeList:p.filter(function(x){let b=typeof x;return x.stmt&&x.stmt==="dir"?(y=x.value,!1):x.trim()===""?!1:b in m?m[b].hasOwnProperty(x)?!1:m[b][x]=!0:g.includes(x)?!1:g.push(x)}),dir:y}},"uniq")(r.flat()),u=l.nodeList,h=l.dir,f=ge().flowchart??{};if(h=h??(f.inheritDir?this.getDirection()??ge().direction??void 0:void 0),this.version==="gen-1")for(let p=0;p2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let i=0,a=1;for(;i=0){let l=this.indexNodes2(e,s);if(l.result)return{result:!0,count:a+l.count};a=a+l.count}i=i+1}return{result:!1,count:a}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let r=e.trim(),n="arrow_open";switch(r[0]){case"<":n="arrow_point",r=r.slice(1);break;case"x":n="arrow_cross",r=r.slice(1);break;case"o":n="arrow_circle",r=r.slice(1);break}let i="normal";return r.includes("=")&&(i="thick"),r.includes(".")&&(i="dotted"),{type:n,stroke:i}}countChar(e,r){let n=r.length,i=0;for(let a=0;a":i="arrow_point",r.startsWith("<")&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle",r.startsWith("o")&&(i="double_"+i,n=n.slice(1));break}let a="normal",s=n.length-1;n.startsWith("=")&&(a="thick"),n.startsWith("~")&&(a="invisible");let l=this.countChar(".",n);return l&&(a="dotted",s=l),{type:i,stroke:a,length:s}}destructLink(e,r){let n=this.destructEndLink(e),i;if(r){if(i=this.destructStartLink(r),i.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=n.type;else{if(i.type!==n.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=n.length,i}return n}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){let n=[];return e.nodes.forEach((i,a)=>{this.exists(r,i)||n.push(e.nodes[a])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find(n=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,i,a,s){let l=n.get(e.id),u=i.get(e.id)??!1,h=this.findNode(r,e.id);if(h)h.cssStyles=e.styles,h.cssCompiledStyles=this.getCompiledStyles(e.classes),h.cssClasses=e.classes.join(" ");else{let f={id:e.id,label:e.text,labelStyle:"",parentId:l,padding:a.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:s,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};u?r.push({...f,isGroup:!0,shape:"rect"}):r.push({...f,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let r=[];for(let n of e){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(a=>a.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(a=>a.trim()))}return r}getData(){let e=ge(),r=[],n=[],i=this.getSubGraphs(),a=new Map,s=new Map;for(let h=i.length-1;h>=0;h--){let f=i[h];f.nodes.length>0&&s.set(f.id,!0);for(let d of f.nodes)a.set(d,f.id)}for(let h=i.length-1;h>=0;h--){let f=i[h];r.push({id:f.id,label:f.title,labelStyle:"",parentId:a.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:"rect",dir:f.dir,isGroup:!0,look:e.look})}this.getVertices().forEach(h=>{this.addNodeFromVertex(h,r,a,s,e,e.look||"classic")});let u=this.getEdges();return u.forEach((h,f)=>{let{arrowTypeStart:d,arrowTypeEnd:p}=this.destructEdgeType(h.type),m=[...u.defaultStyle??[]];h.style&&m.push(...h.style);let g={id:xc(h.start,h.end,{counter:f,prefix:"L"},h.id),isUserDefinedId:h.isUserDefinedId,start:h.start,end:h.end,type:h.type??"normal",label:h.text,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":d,arrowTypeEnd:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":p,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(h.classes),labelStyle:m,style:m,pattern:h.stroke,look:e.look,animate:h.animate,animation:h.animation,curve:h.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};n.push(g)}),{nodes:r,edges:n,other:{},config:e}}defaultConfig(){return G3.flowchart}}});var Vo,ep=N(()=>{"use strict";yr();Vo=o((t,e)=>{let r;return e==="sandbox"&&(r=qe("#i"+t)),(e==="sandbox"?qe(r.nodes()[0].contentDocument.body):qe("body")).select(`[id="${t}"]`)},"getDiagramElement")});var Pu,O2=N(()=>{"use strict";Pu=o(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});var Fte,ARe,_Re,DRe,LRe,RRe,NRe,$te,Sm,zte,cw=N(()=>{"use strict";Xt();gr();pt();O2();yr();Ht();zo();S9();aw();Zd();$t();Fte=o(async(t,e)=>{X.info("Creating subgraph rect for ",e.id,e);let r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=je(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=vr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await di(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0}),y=g.getBBox();if(vr(r.flowchart.htmlLabels)){let A=g.children[0],C=qe(g);y=A.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height)}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,T=e.y-x/2;X.trace("Data ",e,JSON.stringify(e));let S;if(e.look==="handDrawn"){let A=Ze.svg(d),C=Je(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),R=A.path(Fs(b,T,v,x,0),C);S=d.insert(()=>(X.debug("Rough node insert CXC",R),R),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",f.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",T).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:w}=Pu(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),l){let A=m.select("span");A&&A.attr("style",l)}let k=S.node().getBBox();return e.offsetX=0,e.width=k.width,e.height=k.height,e.offsetY=y.height-e.padding/2,e.intersect=function(A){return Qh(e,A)},{cluster:d,labelBBox:y}},"rect"),ARe=o((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(l){return Qh(e,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),_Re=o(async(t,e)=>{let r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:l,nodeBorder:u}=n,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),m=d.node().appendChild(await kc(e.label,e.labelStyle,void 0,!0)),g=m.getBBox();if(vr(r.flowchart.htmlLabels)){let R=m.children[0],I=qe(m);g=R.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}let y=0*e.padding,v=y/2,x=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+y;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+y,T=e.height+y-g.height-6,S=e.x-x/2,w=e.y-b/2;e.width=x;let k=e.y-e.height/2-v+g.height+2,A;if(e.look==="handDrawn"){let R=e.cssClasses.includes("statediagram-cluster-alt"),I=Ze.svg(h),L=e.rx||e.ry?I.path(Fs(S,w,x,b,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):I.rectangle(S,w,x,b,{seed:i});A=h.insert(()=>L,":first-child");let E=I.rectangle(S,k,x,T,{fill:R?a:s,fillStyle:R?"hachure":"solid",stroke:u,seed:i});A=h.insert(()=>L,":first-child"),p=h.insert(()=>E)}else A=f.insert("rect",":first-child"),A.attr("class","outer").attr("x",S).attr("y",w).attr("width",x).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",S).attr("y",k).attr("width",x).attr("height",T);d.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(vr(r.flowchart.htmlLabels)?0:3)})`);let C=A.node().getBBox();return e.height=C.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(R){return Qh(e,R)},{cluster:h,labelBBox:g}},"roundedWithTitle"),DRe=o(async(t,e)=>{X.info("Creating subgraph rect for ",e.id,e);let r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=je(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=vr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await di(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}),y=g.getBBox();if(vr(r.flowchart.htmlLabels)){let A=g.children[0],C=qe(g);y=A.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height)}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,T=e.y-x/2;X.trace("Data ",e,JSON.stringify(e));let S;if(e.look==="handDrawn"){let A=Ze.svg(d),C=Je(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),R=A.path(Fs(b,T,v,x,e.rx),C);S=d.insert(()=>(X.debug("Rough node insert CXC",R),R),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",f.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",T).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:w}=Pu(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),l){let A=m.select("span");A&&A.attr("style",l)}let k=S.node().getBBox();return e.offsetX=0,e.width=k.width,e.height=k.height,e.offsetY=y.height-e.padding/2,e.intersect=function(A){return Qh(e,A)},{cluster:d,labelBBox:y}},"kanbanSection"),LRe=o((t,e)=>{let r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=s.insert("g",":first-child"),u=0*e.padding,h=e.width+u;e.diff=-e.padding;let f=e.height+u,d=e.x-h/2,p=e.y-f/2;e.width=h;let m;if(e.look==="handDrawn"){let v=Ze.svg(s).rectangle(d,p,h,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});m=s.insert(()=>v,":first-child")}else m=l.insert("rect",":first-child"),m.attr("class","divider").attr("x",d).attr("y",p).attr("width",h).attr("height",f).attr("data-look",e.look);let g=m.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(y){return Qh(e,y)},{cluster:s,labelBBox:{}}},"divider"),RRe=Fte,NRe={rect:Fte,squareRect:RRe,roundedWithTitle:_Re,noteGroup:ARe,divider:LRe,kanbanSection:DRe},$te=new Map,Sm=o(async(t,e)=>{let r=e.shape||"rect",n=await NRe[r](t,e);return $te.set(e.id,n),n},"insertCluster"),zte=o(()=>{$te=new Map},"clear")});function uw(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=Xn(t),e=Xn(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,l=a-n;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}var fa,Y9,Xn,hw,X9=N(()=>{"use strict";fa={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},Y9={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};o(uw,"calculateDeltaAndAngle");Xn=o(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),hw=o(t=>({x:o(function(e,r,n){let i=0,a=Xn(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(fa,t.arrowTypeEnd)){let{angle:m,deltaX:g}=uw(n[n.length-1],n[n.length-2]);i=fa[t.arrowTypeEnd]*Math.cos(m)*(g>=0?1:-1)}let s=Math.abs(Xn(e).x-Xn(n[n.length-1]).x),l=Math.abs(Xn(e).y-Xn(n[n.length-1]).y),u=Math.abs(Xn(e).x-Xn(n[0]).x),h=Math.abs(Xn(e).y-Xn(n[0]).y),f=fa[t.arrowTypeStart],d=fa[t.arrowTypeEnd],p=1;if(s0&&l0&&h=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(fa,t.arrowTypeEnd)){let{angle:m,deltaY:g}=uw(n[n.length-1],n[n.length-2]);i=fa[t.arrowTypeEnd]*Math.abs(Math.sin(m))*(g>=0?1:-1)}let s=Math.abs(Xn(e).y-Xn(n[n.length-1]).y),l=Math.abs(Xn(e).x-Xn(n[n.length-1]).x),u=Math.abs(Xn(e).y-Xn(n[0]).y),h=Math.abs(Xn(e).x-Xn(n[0]).x),f=fa[t.arrowTypeStart],d=fa[t.arrowTypeEnd],p=1;if(s0&&l0&&h{"use strict";pt();Vte=o((t,e,r,n,i,a)=>{e.arrowTypeStart&&Gte(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&Gte(t,"end",e.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),MRe={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Gte=o((t,e,r,n,i,a,s)=>{let l=MRe[r];if(!l){X.warn(`Unknown arrow type: ${r}`);return}let u=l.type,f=`${i}_${a}-${u}${e==="start"?"Start":"End"}`;if(s&&s.trim()!==""){let d=s.replace(/[^\dA-Za-z]/g,"_"),p=`${f}_${d}`;if(!document.getElementById(p)){let m=document.getElementById(f);if(m){let g=m.cloneNode(!0);g.id=p,g.querySelectorAll("path, circle, line").forEach(v=>{v.setAttribute("stroke",s),l.fill&&v.setAttribute("fill",s)}),m.parentNode?.appendChild(g)}}t.attr(`marker-${e}`,`url(${n}#${p})`)}else t.attr(`marker-${e}`,`url(${n}#${f})`)},"addEdgeMarker")});function dw(t,e){ge().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function PRe(t){let e=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}function $Re(t,e){if(t.length<2)return"";let r="",n=t.length,i=1e-5;for(let a=0;a({...i}));if(t.length>=2&&fa[e.arrowTypeStart]){let i=fa[e.arrowTypeStart],a=t[0],s=t[1],{angle:l}=Wte(a,s),u=i*Math.cos(l),h=i*Math.sin(l);r[0].x=a.x+u,r[0].y=a.y+h}let n=t.length;if(n>=2&&fa[e.arrowTypeEnd]){let i=fa[e.arrowTypeEnd],a=t[n-1],s=t[n-2],{angle:l}=Wte(s,a),u=i*Math.cos(l),h=i*Math.sin(l);r[n-1].x=a.x-u,r[n-1].y=a.y-h}return r}var pw,da,Yte,fw,mw,gw,IRe,ORe,Hte,qte,BRe,FRe,yw,j9=N(()=>{"use strict";Xt();gr();pt();zo();tr();X9();O2();yr();Ht();aw();Ute();$t();pw=new Map,da=new Map,Yte=o(()=>{pw.clear(),da.clear()},"clear"),fw=o(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),mw=o(async(t,e)=>{let r=vr(ge().flowchart.htmlLabels),{labelStyles:n}=je(e);e.labelStyle=n;let i=await di(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});X.info("abc82",e,e.labelType);let a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",e.id);s.node().appendChild(i);let l=i.getBBox();if(r){let h=i.children[0],f=qe(i);l=h.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),pw.set(e.id,a),e.width=l.width,e.height=l.height;let u;if(e.startLabelLeft){let h=await kc(e.startLabelLeft,fw(e.labelStyle)),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),da.get(e.id)||da.set(e.id,{}),da.get(e.id).startLeft=f,dw(u,e.startLabelLeft)}if(e.startLabelRight){let h=await kc(e.startLabelRight,fw(e.labelStyle)),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=f.node().appendChild(h),d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),da.get(e.id)||da.set(e.id,{}),da.get(e.id).startRight=f,dw(u,e.startLabelRight)}if(e.endLabelLeft){let h=await kc(e.endLabelLeft,fw(e.labelStyle)),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),da.get(e.id)||da.set(e.id,{}),da.get(e.id).endLeft=f,dw(u,e.endLabelLeft)}if(e.endLabelRight){let h=await kc(e.endLabelRight,fw(e.labelStyle)),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),da.get(e.id)||da.set(e.id,{}),da.get(e.id).endRight=f,dw(u,e.endLabelRight)}return i},"insertEdgeLabel");o(dw,"setTerminalWidth");gw=o((t,e)=>{X.debug("Moving label abc88 ",t.id,t.label,pw.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=ge(),{subGraphTitleTotalMargin:i}=Pu(n);if(t.label){let a=pw.get(t.id),s=t.x,l=t.y;if(r){let u=qt.calcLabelPosition(r);X.debug("Moving label "+t.label+" from (",s,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(s=u.x,l=u.y)}a.attr("transform",`translate(${s}, ${l+i/2})`)}if(t.startLabelLeft){let a=da.get(t.id).startLeft,s=t.x,l=t.y;if(r){let u=qt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.startLabelRight){let a=da.get(t.id).startRight,s=t.x,l=t.y;if(r){let u=qt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.endLabelLeft){let a=da.get(t.id).endLeft,s=t.x,l=t.y;if(r){let u=qt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.endLabelRight){let a=da.get(t.id).endRight,s=t.x,l=t.y;if(r){let u=qt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),IRe=o((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,l=t.height/2;return i>=s||a>=l},"outsideNode"),ORe=o((t,e,r)=>{X.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(e)}
insidePoint : ${JSON.stringify(r)}
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,l=r.xMath.abs(n-e.x)*u){let d=r.y{X.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(X.info("abc88 checking point",a,e),!IRe(e,a)&&!i){let s=ORe(e,n,a);X.debug("abc88 inside",a,n,s),X.debug("abc88 intersection",s,e);let l=!1;r.forEach(u=>{l=l||u.x===s.x&&u.y===s.y}),r.some(u=>u.x===s.x&&u.y===s.y)?X.warn("abc88 no intersect",s,r):r.push(s),i=!0}else X.warn("abc88 outside",a,n),n=a,i||r.push(a)}),X.debug("returning points",r),r},"cutPathAtIntersect");o(PRe,"extractCornerPoints");qte=o(function(t,e,r){let n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:e.x-s*n,y:e.y-s*i}},"findAdjacentPoint"),BRe=o(function(t){let{cornerPointPositions:e}=PRe(t),r=[];for(let n=0;n10&&Math.abs(a.y-i.y)>=10){X.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let m=5;s.x===l.x?p={x:h<0?l.x-m+d:l.x+m-d,y:f<0?l.y-d:l.y+d}:p={x:h<0?l.x-d:l.x+d,y:f<0?l.y-m+d:l.y+m-d}}else X.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(p,u)}else r.push(t[n]);return r},"fixCorners"),FRe=o((t,e,r)=>{let n=t-e-r,i=2,a=2,s=i+a,l=Math.floor(n/s),u=Array(l).fill(`${i} ${a}`).join(" ");return`0 ${e} ${u} ${r}`},"generateDashArray"),yw=o(function(t,e,r,n,i,a,s,l=!1){let{handDrawnSeed:u}=ge(),h=e.points,f=!1,d=i;var p=a;let m=[];for(let _ in e.cssCompiledStyles)_2(_)||m.push(e.cssCompiledStyles[_]);X.debug("UIO intersect check",e.points,p.x,d.x),p.intersect&&d.intersect&&!l&&(h=h.slice(1,e.points.length-1),h.unshift(d.intersect(h[0])),X.debug("Last point UIO",e.start,"-->",e.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));let g=btoa(JSON.stringify(h));e.toCluster&&(X.info("to cluster abc88",r.get(e.toCluster)),h=Hte(e.points,r.get(e.toCluster).node),f=!0),e.fromCluster&&(X.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(h,null,2)),h=Hte(h.reverse(),r.get(e.fromCluster).node).reverse(),f=!0);let y=h.filter(_=>!Number.isNaN(_.y));y=BRe(y);let v=No;switch(v=Cu,e.curve){case"linear":v=Cu;break;case"basis":v=No;break;case"cardinal":v=Yv;break;case"bumpX":v=Vv;break;case"bumpY":v=Uv;break;case"catmullRom":v=Kv;break;case"monotoneX":v=Qv;break;case"monotoneY":v=Zv;break;case"natural":v=J0;break;case"step":v=em;break;case"stepAfter":v=e2;break;case"stepBefore":v=Jv;break;default:v=No}let{x,y:b}=hw(e),T=Cl().x(x).y(b).curve(v),S;switch(e.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(e.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let w,k=e.curve==="rounded"?$Re(zRe(y,e),5):T(y),A=Array.isArray(e.style)?e.style:[e.style],C=A.find(_=>_?.startsWith("stroke:")),R=!1;if(e.look==="handDrawn"){let _=Ze.svg(t);Object.assign([],y);let O=_.path(k,{roughness:.3,seed:u});S+=" transition",w=qe(O).select("path").attr("id",e.id).attr("class"," "+S+(e.classes?" "+e.classes:"")).attr("style",A?A.reduce((P,B)=>P+";"+B,""):"");let M=w.attr("d");w.attr("d",M),t.node().appendChild(w.node())}else{let _=m.join(";"),O=A?A.reduce((U,j)=>U+j+";",""):"",M="";e.animate&&(M=" edge-animation-fast"),e.animation&&(M=" edge-animation-"+e.animation);let P=(_?_+";"+O+";":O)+";"+(A?A.reduce((U,j)=>U+";"+j,""):"");w=t.append("path").attr("d",k).attr("id",e.id).attr("class"," "+S+(e.classes?" "+e.classes:"")+(M??"")).attr("style",P),C=P.match(/stroke:([^;]+)/)?.[1],R=e.animate===!0||!!e.animation||_.includes("animation");let B=w.node(),F=typeof B.getTotalLength=="function"?B.getTotalLength():0,G=Y9[e.arrowTypeStart]||0,$=Y9[e.arrowTypeEnd]||0;if(e.look==="neo"&&!R){let j=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?FRe(F,G,$):`0 ${G} ${F-G-$} ${$}`}; stroke-dashoffset: 0;`;w.attr("style",j+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",e.id),w.attr("data-points",g),e.showPoints&&y.forEach(_=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",_.x).attr("cy",_.y)});let I="";(ge().flowchart.arrowMarkerAbsolute||ge().state.arrowMarkerAbsolute)&&(I=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,I=I.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),X.info("arrowTypeStart",e.arrowTypeStart),X.info("arrowTypeEnd",e.arrowTypeEnd),Vte(w,e,I,s,n,C);let L=Math.floor(h.length/2),E=h[L];qt.isLabelCoordinateInPath(E,w.attr("d"))||(f=!0);let D={};return f&&(D.updatedPath=h),D.originalPath=e.points,D},"insertEdge");o($Re,"generateRoundedPath");o(Wte,"calculateDeltaAndAngle");o(zRe,"applyMarkerOffsetsToPoints")});var GRe,VRe,URe,HRe,qRe,WRe,YRe,XRe,jRe,KRe,QRe,ZRe,JRe,eNe,tNe,rNe,nNe,vw,K9=N(()=>{"use strict";pt();GRe=o((t,e,r,n)=>{e.forEach(i=>{nNe[i](t,r,n)})},"insertMarkers"),VRe=o((t,e,r)=>{X.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),URe=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),HRe=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),qRe=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),WRe=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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"),YRe=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),XRe=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),jRe=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),KRe=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),QRe=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),ZRe=o((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),JRe=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),eNe=o((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),tNe=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
L20,10
M20,10
L0,20`)},"requirement_arrow"),rNe=o((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),nNe={extension:VRe,composition:URe,aggregation:HRe,dependency:qRe,lollipop:WRe,point:YRe,circle:XRe,cross:jRe,barb:KRe,only_one:QRe,zero_or_one:ZRe,one_or_more:JRe,zero_or_more:eNe,requirement_arrow:tNe,requirement_contains:rNe},vw=GRe});async function Cm(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?q9[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),xw.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var xw,Xte,jte,P2,bw=N(()=>{"use strict";pt();W9();xw=new Map;o(Cm,"insertNode");Xte=o((t,e)=>{xw.set(e.id,t)},"setNodeElem"),jte=o(()=>{xw.clear()},"clear"),P2=o(t=>{let e=xw.get(t.id);X.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});var Kte,Qte=N(()=>{"use strict";qn();gr();pt();cw();j9();K9();bw();It();tr();Kte={common:tt,getConfig:Qt,insertCluster:Sm,insertEdge:yw,insertEdgeLabel:mw,insertMarkers:vw,insertNode:Cm,interpolateToCurve:FL,labelHelper:ut,log:X,positionEdgeLabel:gw}});function aNe(t){return typeof t=="symbol"||ai(t)&&ha(t)==iNe}var iNe,uo,tp=N(()=>{"use strict";_u();Oo();iNe="[object Symbol]";o(aNe,"isSymbol");uo=aNe});function sNe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{"use strict";o(sNe,"arrayMap");$s=sNe});function ere(t){if(typeof t=="string")return t;if(Bt(t))return $s(t,ere)+"";if(uo(t))return Jte?Jte.call(t):"";var e=t+"";return e=="0"&&1/t==-oNe?"-0":e}var oNe,Zte,Jte,tre,rre=N(()=>{"use strict";$d();rp();Yn();tp();oNe=1/0,Zte=Ki?Ki.prototype:void 0,Jte=Zte?Zte.toString:void 0;o(ere,"baseToString");tre=ere});function cNe(t){for(var e=t.length;e--&&lNe.test(t.charAt(e)););return e}var lNe,nre,ire=N(()=>{"use strict";lNe=/\s/;o(cNe,"trimmedEndIndex");nre=cNe});function hNe(t){return t&&t.slice(0,nre(t)+1).replace(uNe,"")}var uNe,are,sre=N(()=>{"use strict";ire();uNe=/^\s+/;o(hNe,"baseTrim");are=hNe});function gNe(t){if(typeof t=="number")return t;if(uo(t))return ore;if(Sn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Sn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=are(t);var r=dNe.test(t);return r||pNe.test(t)?mNe(t.slice(2),r?2:8):fNe.test(t)?ore:+t}var ore,fNe,dNe,pNe,mNe,lre,cre=N(()=>{"use strict";sre();oo();tp();ore=NaN,fNe=/^[-+]0x[0-9a-f]+$/i,dNe=/^0b[01]+$/i,pNe=/^0o[0-7]+$/i,mNe=parseInt;o(gNe,"toNumber");lre=gNe});function vNe(t){if(!t)return t===0?t:0;if(t=lre(t),t===ure||t===-ure){var e=t<0?-1:1;return e*yNe}return t===t?t:0}var ure,yNe,Am,Q9=N(()=>{"use strict";cre();ure=1/0,yNe=17976931348623157e292;o(vNe,"toFinite");Am=vNe});function xNe(t){var e=Am(t),r=e%1;return e===e?r?e-r:e:0}var Ec,_m=N(()=>{"use strict";Q9();o(xNe,"toInteger");Ec=xNe});var bNe,Tw,hre=N(()=>{"use strict";Fh();Mo();bNe=Ls(hi,"WeakMap"),Tw=bNe});function TNe(){}var si,Z9=N(()=>{"use strict";o(TNe,"noop");si=TNe});function wNe(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";o(wNe,"arrayEach");ww=wNe});function kNe(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{"use strict";o(kNe,"baseFindIndex");kw=kNe});function ENe(t){return t!==t}var fre,dre=N(()=>{"use strict";o(ENe,"baseIsNaN");fre=ENe});function SNe(t,e,r){for(var n=r-1,i=t.length;++n{"use strict";o(SNe,"strictIndexOf");pre=SNe});function CNe(t,e,r){return e===e?pre(t,e,r):kw(t,fre,r)}var Dm,Ew=N(()=>{"use strict";eR();dre();mre();o(CNe,"baseIndexOf");Dm=CNe});function ANe(t,e){var r=t==null?0:t.length;return!!r&&Dm(t,e,0)>-1}var Sw,tR=N(()=>{"use strict";Ew();o(ANe,"arrayIncludes");Sw=ANe});var _Ne,gre,yre=N(()=>{"use strict";SL();_Ne=xT(Object.keys,Object),gre=_Ne});function RNe(t){if(!mc(t))return gre(t);var e=[];for(var r in Object(t))LNe.call(t,r)&&r!="constructor"&&e.push(r);return e}var DNe,LNe,Lm,Cw=N(()=>{"use strict";dm();yre();DNe=Object.prototype,LNe=DNe.hasOwnProperty;o(RNe,"baseKeys");Lm=RNe});function NNe(t){return fi(t)?ET(t):Lm(t)}var qr,Sc=N(()=>{"use strict";LL();Cw();Po();o(NNe,"keys");qr=NNe});var MNe,INe,ONe,pa,vre=N(()=>{"use strict";ym();Hd();IL();Po();dm();Sc();MNe=Object.prototype,INe=MNe.hasOwnProperty,ONe=AT(function(t,e){if(mc(e)||fi(e)){$o(e,qr(e),t);return}for(var r in e)INe.call(e,r)&&gc(t,r,e[r])}),pa=ONe});function FNe(t,e){if(Bt(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||uo(t)?!0:BNe.test(t)||!PNe.test(t)||e!=null&&t in Object(e)}var PNe,BNe,Rm,Aw=N(()=>{"use strict";Yn();tp();PNe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,BNe=/^\w*$/;o(FNe,"isKey");Rm=FNe});function zNe(t){var e=am(t,function(n){return r.size===$Ne&&r.clear(),n}),r=e.cache;return e}var $Ne,xre,bre=N(()=>{"use strict";vL();$Ne=500;o(zNe,"memoizeCapped");xre=zNe});var GNe,VNe,UNe,Tre,wre=N(()=>{"use strict";bre();GNe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,VNe=/\\(\\)?/g,UNe=xre(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(GNe,function(r,n,i,a){e.push(i?a.replace(VNe,"$1"):n||r)}),e}),Tre=UNe});function HNe(t){return t==null?"":tre(t)}var _w,rR=N(()=>{"use strict";rre();o(HNe,"toString");_w=HNe});function qNe(t,e){return Bt(t)?t:Rm(t,e)?[t]:Tre(_w(t))}var rf,B2=N(()=>{"use strict";Yn();Aw();wre();rR();o(qNe,"castPath");rf=qNe});function YNe(t){if(typeof t=="string"||uo(t))return t;var e=t+"";return e=="0"&&1/t==-WNe?"-0":e}var WNe,Cc,Nm=N(()=>{"use strict";tp();WNe=1/0;o(YNe,"toKey");Cc=YNe});function XNe(t,e){e=rf(e,t);for(var r=0,n=e.length;t!=null&&r{"use strict";B2();Nm();o(XNe,"baseGet");nf=XNe});function jNe(t,e,r){var n=t==null?void 0:nf(t,e);return n===void 0?r:n}var kre,Ere=N(()=>{"use strict";F2();o(jNe,"get");kre=jNe});function KNe(t,e){for(var r=-1,n=e.length,i=t.length;++r{"use strict";o(KNe,"arrayPush");Mm=KNe});function QNe(t){return Bt(t)||_l(t)||!!(Sre&&t&&t[Sre])}var Sre,Cre,Are=N(()=>{"use strict";$d();pm();Yn();Sre=Ki?Ki.isConcatSpreadable:void 0;o(QNe,"isFlattenable");Cre=QNe});function _re(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=Cre),i||(i=[]);++a0&&r(l)?e>1?_re(l,e-1,r,n,i):Mm(i,l):n||(i[i.length]=l)}return i}var Ac,Im=N(()=>{"use strict";Dw();Are();o(_re,"baseFlatten");Ac=_re});function ZNe(t){var e=t==null?0:t.length;return e?Ac(t,1):[]}var Qr,Lw=N(()=>{"use strict";Im();o(ZNe,"flatten");Qr=ZNe});function JNe(t){return CT(ST(t,void 0,Qr),t+"")}var Dre,Lre=N(()=>{"use strict";Lw();RL();ML();o(JNe,"flatRest");Dre=JNe});function eMe(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n{"use strict";o(eMe,"baseSlice");Rw=eMe});function cMe(t){return lMe.test(t)}var tMe,rMe,nMe,iMe,aMe,sMe,oMe,lMe,Rre,Nre=N(()=>{"use strict";tMe="\\ud800-\\udfff",rMe="\\u0300-\\u036f",nMe="\\ufe20-\\ufe2f",iMe="\\u20d0-\\u20ff",aMe=rMe+nMe+iMe,sMe="\\ufe0e\\ufe0f",oMe="\\u200d",lMe=RegExp("["+oMe+tMe+aMe+sMe+"]");o(cMe,"hasUnicode");Rre=cMe});function uMe(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i{"use strict";o(uMe,"arrayReduce");Mre=uMe});function hMe(t,e){return t&&$o(e,qr(e),t)}var Ore,Pre=N(()=>{"use strict";Hd();Sc();o(hMe,"baseAssign");Ore=hMe});function fMe(t,e){return t&&$o(e,Rs(e),t)}var Bre,Fre=N(()=>{"use strict";Hd();qh();o(fMe,"baseAssignIn");Bre=fMe});function dMe(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r{"use strict";o(dMe,"arrayFilter");Om=dMe});function pMe(){return[]}var Mw,iR=N(()=>{"use strict";o(pMe,"stubArray");Mw=pMe});var mMe,gMe,$re,yMe,Pm,Iw=N(()=>{"use strict";Nw();iR();mMe=Object.prototype,gMe=mMe.propertyIsEnumerable,$re=Object.getOwnPropertySymbols,yMe=$re?function(t){return t==null?[]:(t=Object(t),Om($re(t),function(e){return gMe.call(t,e)}))}:Mw,Pm=yMe});function vMe(t,e){return $o(t,Pm(t),e)}var zre,Gre=N(()=>{"use strict";Hd();Iw();o(vMe,"copySymbols");zre=vMe});var xMe,bMe,Ow,aR=N(()=>{"use strict";Dw();bT();Iw();iR();xMe=Object.getOwnPropertySymbols,bMe=xMe?function(t){for(var e=[];t;)Mm(e,Pm(t)),t=fm(t);return e}:Mw,Ow=bMe});function TMe(t,e){return $o(t,Ow(t),e)}var Vre,Ure=N(()=>{"use strict";Hd();aR();o(TMe,"copySymbolsIn");Vre=TMe});function wMe(t,e,r){var n=e(t);return Bt(t)?n:Mm(n,r(t))}var Pw,sR=N(()=>{"use strict";Dw();Yn();o(wMe,"baseGetAllKeys");Pw=wMe});function kMe(t){return Pw(t,qr,Pm)}var $2,oR=N(()=>{"use strict";sR();Iw();Sc();o(kMe,"getAllKeys");$2=kMe});function EMe(t){return Pw(t,Rs,Ow)}var Bw,lR=N(()=>{"use strict";sR();aR();qh();o(EMe,"getAllKeysIn");Bw=EMe});var SMe,Fw,Hre=N(()=>{"use strict";Fh();Mo();SMe=Ls(hi,"DataView"),Fw=SMe});var CMe,$w,qre=N(()=>{"use strict";Fh();Mo();CMe=Ls(hi,"Promise"),$w=CMe});var AMe,af,cR=N(()=>{"use strict";Fh();Mo();AMe=Ls(hi,"Set"),af=AMe});var Wre,_Me,Yre,Xre,jre,Kre,DMe,LMe,RMe,NMe,MMe,np,ho,ip=N(()=>{"use strict";Hre();fT();qre();cR();hre();_u();mL();Wre="[object Map]",_Me="[object Object]",Yre="[object Promise]",Xre="[object Set]",jre="[object WeakMap]",Kre="[object DataView]",DMe=Du(Fw),LMe=Du(Gh),RMe=Du($w),NMe=Du(af),MMe=Du(Tw),np=ha;(Fw&&np(new Fw(new ArrayBuffer(1)))!=Kre||Gh&&np(new Gh)!=Wre||$w&&np($w.resolve())!=Yre||af&&np(new af)!=Xre||Tw&&np(new Tw)!=jre)&&(np=o(function(t){var e=ha(t),r=e==_Me?t.constructor:void 0,n=r?Du(r):"";if(n)switch(n){case DMe:return Kre;case LMe:return Wre;case RMe:return Yre;case NMe:return Xre;case MMe:return jre}return e},"getTag"));ho=np});function PMe(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&OMe.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var IMe,OMe,Qre,Zre=N(()=>{"use strict";IMe=Object.prototype,OMe=IMe.hasOwnProperty;o(PMe,"initCloneArray");Qre=PMe});function BMe(t,e){var r=e?hm(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Jre,ene=N(()=>{"use strict";gT();o(BMe,"cloneDataView");Jre=BMe});function $Me(t){var e=new t.constructor(t.source,FMe.exec(t));return e.lastIndex=t.lastIndex,e}var FMe,tne,rne=N(()=>{"use strict";FMe=/\w*$/;o($Me,"cloneRegExp");tne=$Me});function zMe(t){return ine?Object(ine.call(t)):{}}var nne,ine,ane,sne=N(()=>{"use strict";$d();nne=Ki?Ki.prototype:void 0,ine=nne?nne.valueOf:void 0;o(zMe,"cloneSymbol");ane=zMe});function sIe(t,e,r){var n=t.constructor;switch(e){case jMe:return hm(t);case GMe:case VMe:return new n(+t);case KMe:return Jre(t,r);case QMe:case ZMe:case JMe:case eIe:case tIe:case rIe:case nIe:case iIe:case aIe:return yT(t,r);case UMe:return new n;case HMe:case YMe:return new n(t);case qMe:return tne(t);case WMe:return new n;case XMe:return ane(t)}}var GMe,VMe,UMe,HMe,qMe,WMe,YMe,XMe,jMe,KMe,QMe,ZMe,JMe,eIe,tIe,rIe,nIe,iIe,aIe,one,lne=N(()=>{"use strict";gT();ene();rne();sne();kL();GMe="[object Boolean]",VMe="[object Date]",UMe="[object Map]",HMe="[object Number]",qMe="[object RegExp]",WMe="[object Set]",YMe="[object String]",XMe="[object Symbol]",jMe="[object ArrayBuffer]",KMe="[object DataView]",QMe="[object Float32Array]",ZMe="[object Float64Array]",JMe="[object Int8Array]",eIe="[object Int16Array]",tIe="[object Int32Array]",rIe="[object Uint8Array]",nIe="[object Uint8ClampedArray]",iIe="[object Uint16Array]",aIe="[object Uint32Array]";o(sIe,"initCloneByTag");one=sIe});function lIe(t){return ai(t)&&ho(t)==oIe}var oIe,cne,une=N(()=>{"use strict";ip();Oo();oIe="[object Map]";o(lIe,"baseIsMap");cne=lIe});var hne,cIe,fne,dne=N(()=>{"use strict";une();Ud();f2();hne=Fo&&Fo.isMap,cIe=hne?Bo(hne):cne,fne=cIe});function hIe(t){return ai(t)&&ho(t)==uIe}var uIe,pne,mne=N(()=>{"use strict";ip();Oo();uIe="[object Set]";o(hIe,"baseIsSet");pne=hIe});var gne,fIe,yne,vne=N(()=>{"use strict";mne();Ud();f2();gne=Fo&&Fo.isSet,fIe=gne?Bo(gne):pne,yne=fIe});function zw(t,e,r,n,i,a){var s,l=e&dIe,u=e&pIe,h=e&mIe;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!Sn(t))return t;var f=Bt(t);if(f){if(s=Qre(t),!l)return vT(t,s)}else{var d=ho(t),p=d==bne||d==bIe;if(Dl(t))return mT(t,l);if(d==Tne||d==xne||p&&!i){if(s=u||p?{}:TT(t),!l)return u?Vre(t,Bre(s,t)):zre(t,Ore(s,t))}else{if(!Mn[d])return i?t:{};s=one(t,d,l)}}a||(a=new dc);var m=a.get(t);if(m)return m;a.set(t,s),yne(t)?t.forEach(function(v){s.add(zw(v,e,r,v,t,a))}):fne(t)&&t.forEach(function(v,x){s.set(x,zw(v,e,r,x,t,a))});var g=h?u?Bw:$2:u?Rs:qr,y=f?void 0:g(t);return ww(y||t,function(v,x){y&&(x=v,v=t[x]),gc(s,x,zw(v,e,r,x,t,a))}),s}var dIe,pIe,mIe,xne,gIe,yIe,vIe,xIe,bne,bIe,TIe,wIe,Tne,kIe,EIe,SIe,CIe,AIe,_Ie,DIe,LIe,RIe,NIe,MIe,IIe,OIe,PIe,BIe,FIe,Mn,Gw,uR=N(()=>{"use strict";c2();J9();ym();Pre();Fre();TL();EL();Gre();Ure();oR();lR();ip();Zre();lne();CL();Yn();gm();dne();oo();vne();Sc();qh();dIe=1,pIe=2,mIe=4,xne="[object Arguments]",gIe="[object Array]",yIe="[object Boolean]",vIe="[object Date]",xIe="[object Error]",bne="[object Function]",bIe="[object GeneratorFunction]",TIe="[object Map]",wIe="[object Number]",Tne="[object Object]",kIe="[object RegExp]",EIe="[object Set]",SIe="[object String]",CIe="[object Symbol]",AIe="[object WeakMap]",_Ie="[object ArrayBuffer]",DIe="[object DataView]",LIe="[object Float32Array]",RIe="[object Float64Array]",NIe="[object Int8Array]",MIe="[object Int16Array]",IIe="[object Int32Array]",OIe="[object Uint8Array]",PIe="[object Uint8ClampedArray]",BIe="[object Uint16Array]",FIe="[object Uint32Array]",Mn={};Mn[xne]=Mn[gIe]=Mn[_Ie]=Mn[DIe]=Mn[yIe]=Mn[vIe]=Mn[LIe]=Mn[RIe]=Mn[NIe]=Mn[MIe]=Mn[IIe]=Mn[TIe]=Mn[wIe]=Mn[Tne]=Mn[kIe]=Mn[EIe]=Mn[SIe]=Mn[CIe]=Mn[OIe]=Mn[PIe]=Mn[BIe]=Mn[FIe]=!0;Mn[xIe]=Mn[bne]=Mn[AIe]=!1;o(zw,"baseClone");Gw=zw});function zIe(t){return Gw(t,$Ie)}var $Ie,ln,hR=N(()=>{"use strict";uR();$Ie=4;o(zIe,"clone");ln=zIe});function UIe(t){return Gw(t,GIe|VIe)}var GIe,VIe,fR,wne=N(()=>{"use strict";uR();GIe=1,VIe=4;o(UIe,"cloneDeep");fR=UIe});function HIe(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e{"use strict";o(HIe,"compact");_c=HIe});function WIe(t){return this.__data__.set(t,qIe),this}var qIe,Ene,Sne=N(()=>{"use strict";qIe="__lodash_hash_undefined__";o(WIe,"setCacheAdd");Ene=WIe});function YIe(t){return this.__data__.has(t)}var Cne,Ane=N(()=>{"use strict";o(YIe,"setCacheHas");Cne=YIe});function Vw(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Gd;++e{"use strict";dT();Sne();Ane();o(Vw,"SetCache");Vw.prototype.add=Vw.prototype.push=Ene;Vw.prototype.has=Cne;Bm=Vw});function XIe(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";o(XIe,"arraySome");Hw=XIe});function jIe(t,e){return t.has(e)}var Fm,qw=N(()=>{"use strict";o(jIe,"cacheHas");Fm=jIe});function ZIe(t,e,r,n,i,a){var s=r&KIe,l=t.length,u=e.length;if(l!=u&&!(s&&u>l))return!1;var h=a.get(t),f=a.get(e);if(h&&f)return h==e&&f==t;var d=-1,p=!0,m=r&QIe?new Bm:void 0;for(a.set(t,e),a.set(e,t);++d{"use strict";Uw();dR();qw();KIe=1,QIe=2;o(ZIe,"equalArrays");Ww=ZIe});function JIe(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var _ne,Dne=N(()=>{"use strict";o(JIe,"mapToArray");_ne=JIe});function eOe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var $m,Yw=N(()=>{"use strict";o(eOe,"setToArray");$m=eOe});function pOe(t,e,r,n,i,a,s){switch(r){case dOe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case fOe:return!(t.byteLength!=e.byteLength||!a(new um(t),new um(e)));case nOe:case iOe:case oOe:return Io(+t,+e);case aOe:return t.name==e.name&&t.message==e.message;case lOe:case uOe:return t==e+"";case sOe:var l=_ne;case cOe:var u=n&tOe;if(l||(l=$m),t.size!=e.size&&!u)return!1;var h=s.get(t);if(h)return h==e;n|=rOe,s.set(t,e);var f=Ww(l(t),l(e),n,i,a,s);return s.delete(t),f;case hOe:if(mR)return mR.call(t)==mR.call(e)}return!1}var tOe,rOe,nOe,iOe,aOe,sOe,oOe,lOe,cOe,uOe,hOe,fOe,dOe,Lne,mR,Rne,Nne=N(()=>{"use strict";$d();wL();zd();pR();Dne();Yw();tOe=1,rOe=2,nOe="[object Boolean]",iOe="[object Date]",aOe="[object Error]",sOe="[object Map]",oOe="[object Number]",lOe="[object RegExp]",cOe="[object Set]",uOe="[object String]",hOe="[object Symbol]",fOe="[object ArrayBuffer]",dOe="[object DataView]",Lne=Ki?Ki.prototype:void 0,mR=Lne?Lne.valueOf:void 0;o(pOe,"equalByTag");Rne=pOe});function vOe(t,e,r,n,i,a){var s=r&mOe,l=$2(t),u=l.length,h=$2(e),f=h.length;if(u!=f&&!s)return!1;for(var d=u;d--;){var p=l[d];if(!(s?p in e:yOe.call(e,p)))return!1}var m=a.get(t),g=a.get(e);if(m&&g)return m==e&&g==t;var y=!0;a.set(t,e),a.set(e,t);for(var v=s;++d