`+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+" "+xc(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`${xc(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=nQ(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=nQ(t);if(i===null)return xc(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:xc(t.text)}},d9=class{static{o(this,"_TextRenderer")}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""}},Nu=class i9{static{o(this,"__Parser")}options;renderer;textRenderer;constructor(e){this.options=e||Wd,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 d9}static parse(e,r){return new i9(r).parse(e)}static parseInline(e,r){return new i9(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 zT;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];zT.passThroughHooks.has(a)?i[s]=h=>{if(this.defaults.async)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 Ru.lex(t,e??this.defaults)}parser(t,e){return Nu.parse(t,e??this.defaults)}parseMarkdown(t){return o((r,n)=>{let i={...n},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(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 r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);let l=a.hooks?a.hooks.provideLexer():t?Ru.lex:Ru.lexInline,u=a.hooks?a.hooks.provideParser():t?Nu.parse:Nu.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(h=>l(h,a)).then(h=>a.hooks?a.hooks.processAllTokens(h):h).then(h=>a.walkTokens?Promise.all(this.walkTokens(h,a.walkTokens)).then(()=>h):h).then(h=>u(h,a)).then(h=>a.hooks?a.hooks.postprocess(h):h).catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let h=l(r,a);a.hooks&&(h=a.hooks.processAllTokens(h)),a.walkTokens&&this.walkTokens(h,a.walkTokens);let f=u(h,a);return a.hooks&&(f=a.hooks.postprocess(f)),f}catch(h){return s(h)}},"parse2")}onError(t,e){return r=>{if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let n="An error occurred:
"+xc(r.message+"",!0)+" ";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Hd=new pDe;o(Jr,"marked");Jr.options=Jr.setOptions=function(t){return Hd.setOptions(t),Jr.defaults=Hd.defaults,sQ(Jr.defaults),Jr};Jr.getDefaults=a9;Jr.defaults=Wd;Jr.use=function(...t){return Hd.use(...t),Jr.defaults=Hd.defaults,sQ(Jr.defaults),Jr};Jr.walkTokens=function(t,e){return Hd.walkTokens(t,e)};Jr.parseInline=Hd.parseInline;Jr.Parser=Nu;Jr.parser=Nu.parse;Jr.Renderer=HT;Jr.TextRenderer=d9;Jr.Lexer=Ru;Jr.lexer=Ru.lex;Jr.Tokenizer=UT;Jr.Hooks=zT;Jr.parse=Jr;RSt=Jr.options,NSt=Jr.setOptions,MSt=Jr.use,ISt=Jr.walkTokens,OSt=Jr.parseInline,PSt=Nu.parse,BSt=Ru.lex});function mDe(t,{markdownAutoWrap:e}){let n=t.replace(/ /g,`
`).replace(/\n{2,}/g,`
`),i=O3(n);return e===!1?i.replace(/ /g," "):i}function vQ(t,e={}){let r=mDe(t,e),n=Jr.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 xQ(t,{markdownAutoWrap:e}={}){let r=Jr.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 bQ=N(()=>{"use strict";yQ();wA();pt();o(mDe,"preprocessMarkdown");o(vQ,"markdownToLines");o(xQ,"markdownToHTML")});function gDe(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function yDe(t,e){let r=gDe(e.content);return TQ(t,[],r,e.type)}function TQ(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}])?TQ(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function wQ(t,e){if(t.some(({content:r})=>r.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return p9(t,e)}function p9(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 p9(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[l,u]=yDe(e,a);r.push([l]),u.content&&t.unshift(u)}return p9(t,e,r)}var kQ=N(()=>{"use strict";o(gDe,"splitTextToChars");o(yDe,"splitWordToFitWidth");o(TQ,"splitWordToFitWidthRecursion");o(wQ,"splitLineToFitWidth");o(p9,"splitLineToFitWidthRecursion")});function EQ(t,e){e&&t.attr("style",e)}async function vDe(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=xn(e.label)?await bh(e.label.replace(Je.lineBreakRegex,`
`),a):ar(e.label,a),h=e.isNode?"nodeLabel":"edgeLabel",f=l.append("span");f.html(u),EQ(f,e.labelStyle),f.attr("class",`${h} ${n}`),EQ(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 m9(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 xDe(t,e,r){let n=t.append("text"),i=m9(n,1,e);g9(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function SQ(t,e,r){let n=t.append("text"),i=m9(n,1,e);g9(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function bDe(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=>xDe(a,1.1,p)<=t,"checkWidth"),d=f(h)?[h]:wQ(h,f);for(let p of d){let m=m9(l,u,1.1);g9(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 g9(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 y9(t,e={}){let r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,s)=>(r.push((async()=>{let l=`${a}:${s}`;return await MV(l)?await As(l,void 0,{class:"label-icon"}):` `})()),i));let n=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}var pi,$o=N(()=>{"use strict";pr();dr();pt();bQ();tr();rc();kQ();Wn();o(EQ,"applyStyle");o(vDe,"addHtmlSpan");o(m9,"createTspan");o(xDe,"computeWidthOfText");o(SQ,"computeDimensionOfText");o(bDe,"createFormattedText");o(g9,"updateTextContentAndStyles");o(y9,"replaceIconSubstring");pi=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=xQ(e,h),d=await y9(ea(f),h),p=e.replace(/\\\\/g,"\\"),m={isNode:s,label:xn(e)?p:d,labelStyle:r.replace("fill:","color:")};return await vDe(t,m,l,i,u,h)}else{let f=e.replace(/ /g," "),d=vQ(f.replace(" "," "),h),p=bDe(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:");ze(p).attr("style",m)}else{let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ze(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:");ze(p).select("text").attr("style",g)}return p}},"createText")});function zt(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,x=p+i*Math.sin(d*(y-t));s.push({x:y,y:x})}return s}function qd(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";$o();Xt();pr();_a();dr();tr();lt=o(async(t,e,r)=>{let n,i=e.useHtmlLabels||mr(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",wn(e.labelStyle)),l;e.label===void 0?l="":l=typeof e.label=="string"?e.label:e.label[0];let u=await pi(s,ar(ea(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=ze(u),m=d.getElementsByTagName("img");if(m){let g=l.replace(/ ]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(x=>{function v(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=ge().fontSize?ge().fontSize:window.getComputedStyle(document.body).fontSize,T=5,[S=lr.fontSize]=yc(b),w=S*T+"px";y.style.minWidth=w,y.style.maxWidth=w}else y.style.width="100%";x(y)}o(v,"setupImage"),setTimeout(()=>{y.complete&&v()}),y.addEventListener("error",v),y.addEventListener("load",v)})))}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||mr(ge()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await pi(i,ar(ea(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(mr(ge()?.flowchart?.htmlLabels)){let u=a.children[0],h=ze(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"),Xe=o((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),rt=o((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");o(zt,"createPathFromPoints");o(Go,"generateFullSineWavePoints");o(qd,"generateCirclePoints")});function TDe(t,e){return t.intersect(e)}var CQ,AQ=N(()=>{"use strict";o(TDe,"intersectNode");CQ=TDe});function wDe(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(wDe,"intersectEllipse");XT=wDe});function kDe(t,e,r){return XT(t,e,e,r)}var _Q,DQ=N(()=>{"use strict";v9();o(kDe,"intersectCircle");_Q=kDe});function EDe(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&&LQ(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 RQ,NQ=N(()=>{"use strict";o(EDe,"intersectLine");o(LQ,"sameSign");RQ=EDe});function SDe(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,x=d.y-r.y,v=Math.sqrt(y*y+x*x);return g{"use strict";NQ();o(SDe,"intersectPolygon");MQ=SDe});var CDe,jh,x9=N(()=>{"use strict";CDe=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"),jh=CDe});var He,Vt=N(()=>{"use strict";AQ();DQ();v9();IQ();x9();He={node:CQ,circle:_Q,ellipse:XT,polygon:MQ,rect:jh}});var OQ,bc,ADe,S2,We,Ke,_De,Ft=N(()=>{"use strict";Xt();OQ=o(t=>{let{handDrawnSeed:e}=ge();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),bc=o(t=>{let e=ADe([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),ADe=o(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),S2=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"),We=o(t=>{let{stylesArray:e}=bc(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let l=s[0];S2(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"),Ke=o((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=ge(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=bc(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:_De(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),_De=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 b9(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 DDe(t,e){return t[0]===e[0]&&t[1]===e[1]}function LDe(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)b9(h,l,i);let u=function(h,f,d){let p=[];for(let b of h){let T=[...b];DDe(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=[],x=g[0].ymin,v=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let T=0;Tx);T++)b=T;g.splice(0,b+1).forEach(T=>{y.push({s:x,edge:T})})}if(y=y.filter(b=>!(b.edge.ymax<=x)),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||v%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),x],[Math.round(w.x),x]])}x+=d,y.forEach(b=>{b.edge.x=b.edge.x+d*b.edge.islope}),v++}return m}(s,a,n);if(i){for(let h of s)b9(h,l,-i);(function(h,f,d){let p=[];h.forEach(m=>p.push(...m)),b9(p,f,d)})(u,l,-i)}return u}function D2(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),LDe(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 w9(t,e){return t.type===e}function P9(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:RDe,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:T9,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return l[l.length]={type:PQ,text:""},l}(t),n="BOD",i=0,a=r[i];for(;!w9(a,PQ);){let s=0,l=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return P9("M0,0"+t);i++,s=jT[a.text],n=a.text}else w9(a,T9)?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 WQ(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,x=i+2*(g-i)/3,v=d+2*(m-d)/3,b=p+2*(g-p)/3;e.push({key:"C",data:[y,x,v,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,x=i+2*(p-i)/3,v=m+2*(d-m)/3,b=g+2*(p-g)/3;e.push({key:"C",data:[y,x,v,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],x=f[5],v=f[6];d===0||p===0?(e.push({key:"C",data:[n,i,x,v,x,v]}),n=x,i=v):(n!==x||i!==v)&&(qQ(n,i,x,v,d,p,m,g,y).forEach(function(b){e.push({key:"C",data:b})}),n=x,i=v);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=h}return e}function C2(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function qQ(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,x=0;if(h)[m,g,y,x]=h;else{[t,e]=C2(t,e,-f),[r,n]=C2(r,n,-f);let L=(t-r)/2,C=(e-n)/2,I=L*L/(i*i)+C*C/(a*a);I>1&&(I=Math.sqrt(I),i*=I,a*=I);let M=i*i,P=a*a,B=M*P-M*C*C-P*L*L,F=M*C*C+P*L*L,G=(l===u?-1:1)*Math.sqrt(Math.abs(B/F));y=G*i*C/a+(t+r)/2,x=G*-a*L/i+(e+n)/2,m=Math.asin(parseFloat(((e-x)/a).toFixed(9))),g=Math.asin(parseFloat(((n-x)/a).toFixed(9))),tg&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let v=g-m;if(Math.abs(v)>120*Math.PI/180){let L=g,C=r,I=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=qQ(r=y+i*Math.cos(g),n=x+a*Math.sin(g),C,I,i,a,s,0,u,[g,L,y,x])}v=g-m;let b=Math.cos(m),T=Math.sin(m),S=Math.cos(g),w=Math.sin(g),E=Math.tan(v/4),_=4/3*i*E,A=4/3*a*E,D=[t,e],O=[t+_*T,e-A*b],R=[r+_*w,n-A*S],k=[r,n];if(O[0]=2*D[0]-O[0],O[1]=2*D[1]-O[1],h)return[O,R,k].concat(p);{p=[O,R,k].concat(p);let L=[];for(let C=0;C2){let i=[];for(let a=0;a2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,x=Math.min(y/2,(g-m)/2),v=VQ(x,h,f,d,p,m,g,1,u);if(!u.disableMultiStroke){let b=VQ(x,h,f,d,p,m,g,1.5,u);v.push(...b)}return s&&(l?v.push(...Kh(h,f,h+d*Math.cos(m),f+p*Math.sin(m),u),...Kh(h,f,h+d*Math.cos(g),f+p*Math.sin(g),u)):v.push({op:"lineTo",data:[h,f]},{op:"lineTo",data:[h+d*Math.cos(m),f+p*Math.sin(m)]})),{type:"path",ops:v}}function $Q(t,e){let r=WQ(HQ(P9(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(...Kh(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(...IDe(u,h,f,d,p,m,a,e)),a=[p,m];break}case"Z":n.push(...Kh(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function k9(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]+sr(i,e),n[0][1]+sr(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*jQ(i),m=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;m=sr(m,i,h),g=sr(g,i,h);let y=[],x=o(()=>sr(d,i,h),"M"),v=o(()=>sr(f,i,h),"k"),b=i.preserveVertices;return a&&(s?y.push({op:"move",data:[t+(b?0:x()),e+(b?0:x())]}):y.push({op:"move",data:[t+(b?0:sr(f,i,h)),e+(b?0:sr(f,i,h))]})),s?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.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}function KT(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+sr(e,r),t[0][1]+sr(e,r)]),n.push([t[0][0]+sr(e,r),t[0][1]+sr(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=Yd(u,h,.5),m=Yd(h,f,.5),g=Yd(f,d,.5),y=Yd(p,m,.5),x=Yd(m,g,.5),v=Yd(y,x,.5);M9([u,p,y,v],0,r,i),M9([v,x,g,d],0,r,i)}var a,s;return i}function PDe(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 E9(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a0?rw(n,0,n.length,r):n}var _2,S9,C9,A9,_9,D9,Os,L9,RDe,T9,PQ,jT,NDe,so,bm,I9,QT,O9,je,Ut=N(()=>{"use strict";o(b9,"t");o(DDe,"e");o(LDe,"s");o(D2,"n");_2=class{static{o(this,"o")}constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=D2(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");S9=class extends _2{static{o(this,"h")}fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=D2(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)}}},C9=class extends _2{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}},A9=class{static{o(this,"i")}constructor(e){this.helper=e}fillPolygons(e,r){let n=D2(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&&(_=0,A=2*Math.PI);let D=(A-_)/b.curveStepCount,O=[];for(let R=_;R<=A;R+=D)O.push([T+w*Math.cos(R),S+E*Math.sin(R)]);return O.push([T+w*Math.cos(A),S+E*Math.sin(A)]),O.push([T,S]),xm([O],b)}(e,r,n,i,a,s,h));return h.stroke!==so&&f.push(d),this._d("arc",f,h)}curve(e,r){let n=this._o(r),i=[],a=BQ(e,n);if(n.fill&&n.fill!==so)if(n.fillStyle==="solid"){let s=BQ(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(...E9(UQ([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):s.push(...E9(UQ(h),10,(1+n.roughness)/2))}s.length&&i.push(xm([s],n))}return n.stroke!==so&&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(k9([e],n)):i.push(xm([e],n))),n.stroke!==so&&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!==so,s=n.stroke!==so,l=!!(n.simplification&&n.simplification<1),u=function(f,d,p){let m=WQ(HQ(P9(f))),g=[],y=[],x=[0,0],v=[],b=o(()=>{v.length>=4&&y.push(...E9(v,d)),v=[]},"i"),T=o(()=>{b(),y.length&&(g.push(y),y=[])},"c");for(let{key:w,data:E}of m)switch(w){case"M":T(),x=[E[0],E[1]],y.push(x);break;case"L":b(),y.push([E[0],E[1]]);break;case"C":if(!v.length){let _=y.length?y[y.length-1]:x;v.push([_[0],_[1]])}v.push([E[0],E[1]]),v.push([E[2],E[3]]),v.push([E[4],E[5]]);break;case"Z":b(),y.push([x[0],x[1]])}if(T(),!p)return g;let S=[];for(let w of g){let E=PDe(w,p);E.length&&S.push(E)}return S}(e,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=$Q(e,n);if(a)if(n.fillStyle==="solid")if(u.length===1){let f=$Q(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(k9(u,n));else i.push(xm(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:so};break;case"fillPath":s={d:this.opsToPath(a),stroke:so,strokeWidth:0,fill:n.fill||so};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||so,strokeWidth:n,fill:so}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}},I9=class{static{o(this,"st")}constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new bm(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",O9=class{static{o(this,"ot")}constructor(e,r){this.svg=e,this.gen=new bm(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)}},je={canvas:o((t,e)=>new I9(t,e),"canvas"),svg:o((t,e)=>new O9(t,e),"svg"),generator:o(t=>new bm(t),"generator"),newSeed:o(()=>bm.newSeed(),"newSeed")}});function KQ(t,e){let{labelStyles:r}=We(e);e.labelStyle=r;let n=rt(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=je.svg(a),h=Ke(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",wn(l)),Xe(e,d),e.intersect=function(p){return X.info("Circle intersect",e,s,p),He.circle(e,s,p)},a}var QQ=N(()=>{"use strict";pt();Nt();Vt();Ft();Ut();tr();o(KQ,"anchor")});function ZQ(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 x=Math.sqrt(1-y**2),v=u+x*a*Math.sin(f)*(s?-1:1),b=h-x*i*Math.cos(f)*(s?-1:1),T=Math.atan2((e-b)/a,(t-v)/i),w=Math.atan2((n-b)/a,(r-v)/i)-T;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);let E=[];for(let _=0;_<20;_++){let A=_/19,D=T+A*w,O=v+i*Math.cos(D),R=b+a*Math.sin(D);E.push({x:O,y:R})}return E}async function JQ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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},...ZQ(-s/2,-l/2,-s/2,l/2,h,u,!1),{x:s/2,y:l/2},...ZQ(s/2,l/2,s/2,-l/2,h,u,!0)],p=je.svg(i),m=Ke(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=zt(d),y=p.path(g,m),x=i.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${h/2}, 0)`),Xe(e,x),e.intersect=function(v){return He.polygon(e,d,v)},i}var eZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(ZQ,"generateArcPoints");o(JQ,"bowTieRect")});function Ps(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 Qh=N(()=>{"use strict";o(Ps,"insertPolygonShape")});async function tZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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 x=je.svg(i),v=Ke(e,{}),b=zt(m),T=x.path(b,v);g=i.insert(()=>T,":first-child").attr("transform",`translate(${-u/2}, ${s/2})`),y&&g.attr("style",y)}else g=Ps(i,u,s,m);return n&&g.attr("style",n),Xe(e,g),e.intersect=function(x){return He.polygon(e,m,x)},i}var rZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();Qh();Nt();o(tZ,"card")});function nZ(t,e){let{nodeStyles:r}=We(e);e.label="";let n=t.insert("g").attr("class",rt(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=je.svg(n),u=Ke(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=zt(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 He.polygon(e,s,p)},n}var iZ=N(()=>{"use strict";Vt();Ut();Ft();Nt();o(nZ,"choice")});async function iw(t,e,r){let{labelStyles:n,nodeStyles:i}=We(e);e.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:l}=await lt(t,e,rt(e)),u=r?.padding??l,h=s.width/2+u,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=je.svg(a),m=Ke(e,{}),g=p.circle(0,0,h*2,m);f=a.insert(()=>g,":first-child"),f.attr("class","basic label-container").attr("style",wn(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 Xe(e,f),e.calcIntersect=function(p,m){let g=p.width/2;return He.circle(p,g,m)},e.intersect=function(p){return X.info("Circle intersect",e,h,p),He.circle(e,h,p)},a}var B9=N(()=>{"use strict";Ut();pt();tr();Vt();Ft();Nt();o(iw,"circle")});function BDe(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 aZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",rt(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,l=je.svg(i),u=Ke(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,a*2,u),f=BDe(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),Xe(e,p),e.intersect=function(m){return X.info("crossedCircle intersect",e,{radius:a,point:m}),He.circle(e,a,m)},i}var sZ=N(()=>{"use strict";pt();Nt();Ft();Ut();Vt();o(BDe,"createLine");o(aZ,"crossedCircle")});function Zh(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(()=>v,":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))})`),Xe(e,S),e.intersect=function(w){return He.polygon(e,p,w)},i}var lZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(Zh,"generateCirclePoints");o(oZ,"curlyBraceLeft")});function Jh(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(()=>v,":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))})`),Xe(e,S),e.intersect=function(w){return He.polygon(e,p,w)},i}var uZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(Jh,"generateCirclePoints");o(cZ,"curlyBraceRight")});function Ma(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;d_,":first-child").attr("stroke-opacity",0),A.insert(()=>b,":first-child"),A.insert(()=>w,":first-child"),A.attr("class","text"),f&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.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))})`),Xe(e,A),e.intersect=function(D){return He.polygon(e,m,D)},i}var fZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(Ma,"generateCirclePoints");o(hZ,"curlyBraces")});async function dZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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=je.svg(i),m=Ke(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=u,y=h,x=g-f,v=y/4,b=[{x,y:0},{x:v,y:0},{x:0,y:y/2},{x:v,y},{x,y},...qd(-x,-y/2,f,50,270,90)],T=zt(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})`),Xe(e,w),e.intersect=function(E){return He.polygon(e,b,E)},i}var pZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(dZ,"curvedTrapezoid")});async function mZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),g=$De(0,0,l,f,u,h),y=GDe(0,h,l,f,u,h),x=m.path(g,Ke(e,{})),v=m.path(y,Ke(e,{fill:"none"}));d=i.insert(()=>v,":first-child"),d=i.insert(()=>x,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let m=FDe(0,0,l,f,u,h);d=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",wn(p)).attr("style",n)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Xe(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=He.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 x=h*h*(1-y*y/(u*u));x>0&&(x=Math.sqrt(x)),x=h-x,m.y-(e.y??0)>0&&(x=-x),g.y+=x}return g},i}var FDe,$De,GDe,gZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();tr();FDe=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"),$De=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"),GDe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");o(mZ,"cylinder")});async function yZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),g=Ke(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}],x=m.polygon(y.map(b=>[b.x,b.y]),g),v=i.insert(()=>x,":first-child");return v.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&v.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))})`),Xe(e,v),e.intersect=function(b){return He.rect(e,b)},i}var vZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(yZ,"dividedRectangle")});async function xZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await lt(t,e,rt(e)),u=a.width/2+s+5,h=a.width/2+s,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=je.svg(i),m=Ke(e,{roughness:.2,strokeWidth:2.5}),g=Ke(e,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,m),x=p.circle(0,0,h*2,g);f=i.insert("g",":first-child"),f.attr("class",wn(e.cssClasses)).attr("style",wn(d)),f.node()?.appendChild(y),f.node()?.appendChild(x)}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 Xe(e,f),e.intersect=function(p){return X.info("DoubleCircle intersect",e,u,p),He.circle(e,u,p)},i}var bZ=N(()=>{"use strict";pt();Nt();Vt();Ft();Ut();tr();o(xZ,"doublecircle")});function TZ(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=We(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",rt(e)).attr("id",e.domId??e.id),s=7,{cssStyles:l}=e,u=je.svg(a),{nodeBorder:h}=r,f=Ke(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),Xe(e,p),e.intersect=function(m){return X.info("filledCircle intersect",e,{radius:s,point:m}),He.circle(e,s,m)},a}var wZ=N(()=>{"use strict";Ut();pt();Vt();Ft();Nt();o(TZ,"filledCircle")});async function kZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),m=Ke(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=zt(f),y=p.path(g,m),x=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),e.width=l,e.height=u,Xe(e,x),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(v){return X.info("Triangle intersect",e,f,v),He.polygon(e,f,v)},i}var EZ=N(()=>{"use strict";pt();Nt();Vt();Ft();Ut();Nt();o(kZ,"flippedTriangle")});function SZ(t,e,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:a}=We(e);e.label="";let s=t.insert("g").attr("class",rt(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=je.svg(s),m=Ke(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),Xe(e,y);let x=n?.padding??0;return e.width&&e.height&&(e.width+=x/2||0,e.height+=x/2||0),e.intersect=function(v){return He.rect(e,v)},s}var CZ=N(()=>{"use strict";Ut();Vt();Ft();Nt();o(SZ,"forkJoin")});async function AZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let i=80,a=50,{shapeSvg:s,bbox:l}=await lt(t,e,rt(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=je.svg(s),m=Ke(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},...qd(-u/2+f,0,f,50,90,270),{x:u/2-f,y:h/2},{x:-u/2,y:h/2}],y=zt(g),x=p.path(y,m),v=s.insert(()=>x,":first-child");return v.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),Xe(e,v),e.intersect=function(b){return X.info("Pill intersect",e,{radius:f,point:b}),He.polygon(e,g,b)},s}var _Z=N(()=>{"use strict";pt();Nt();Vt();Ft();Ut();o(AZ,"halfRoundedRectangle")});async function DZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(e)),s=a.height+(e.padding??0),l=a.width+(e.padding??0)*2.5,{cssStyles:u}=e,h=je.svg(i),f=Ke(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,x=[{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}],v=zt(x),b=h.path(v,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,Xe(e,T),e.intersect=function(S){return He.polygon(e,x,S)},i}var LZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(DZ,"hexagon")});async function RZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.label="",e.labelStyle=r;let{shapeSvg:i}=await lt(t,e,rt(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:l}=e,u=je.svg(i),h=Ke(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=zt(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})`),Xe(e,m),e.intersect=function(g){return X.info("Pill intersect",e,{points:f}),He.polygon(e,f,g)},i}var NZ=N(()=>{"use strict";pt();Nt();Vt();Ft();Ut();o(RZ,"hourglass")});async function MZ(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=We(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 lt(t,e,"icon-shape default"),p=e.pos==="t",m=l,g=l,{nodeBorder:y}=r,{stylesMap:x}=bc(e),v=-g/2,b=-m/2,T=e.label?8:0,S=je.svg(h),w=Ke(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let E=S.rectangle(v,b,g,m,w),_=Math.max(g,f.width),A=m+f.height+T,D=S.rectangle(-_/2,-A/2,_,A,{...w,fill:"transparent",stroke:"none"}),O=h.insert(()=>E,":first-child"),R=h.insert(()=>D);if(e.icon){let k=h.append("g");k.html(`${await As(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let L=k.node().getBBox(),C=L.width,I=L.height,M=L.x,P=L.y;k.attr("transform",`translate(${-C/2-M},${p?f.height/2+T/2-I/2-P:-f.height/2-T/2-I/2-P})`),k.attr("style",`color: ${x.get("stroke")??y};`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-A/2:A/2-f.height})`),O.attr("transform",`translate(0,${p?f.height/2+T/2:-f.height/2-T/2})`),Xe(e,R),e.intersect=function(k){if(X.info("iconSquare intersect",e,k),!e.label)return He.rect(e,k);let L=e.x??0,C=e.y??0,I=e.height??0,M=[];return p?M=[{x:L-f.width/2,y:C-I/2},{x:L+f.width/2,y:C-I/2},{x:L+f.width/2,y:C-I/2+f.height+T},{x:L+g/2,y:C-I/2+f.height+T},{x:L+g/2,y:C+I/2},{x:L-g/2,y:C+I/2},{x:L-g/2,y:C-I/2+f.height+T},{x:L-f.width/2,y:C-I/2+f.height+T}]:M=[{x:L-g/2,y:C-I/2},{x:L+g/2,y:C-I/2},{x:L+g/2,y:C-I/2+m},{x:L+f.width/2,y:C-I/2+m},{x:L+f.width/2/2,y:C+I/2},{x:L-f.width/2,y:C+I/2},{x:L-f.width/2,y:C-I/2+m},{x:L-g/2,y:C-I/2+m}],He.polygon(e,M,k)},h}var IZ=N(()=>{"use strict";Ut();pt();rc();Vt();Ft();Nt();o(MZ,"icon")});async function OZ(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=We(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 lt(t,e,"icon-shape default"),p=20,m=e.label?8:0,g=e.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:v}=bc(e),b=je.svg(h),T=Ke(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let S=v.get("fill");T.stroke=S??x;let w=h.append("g");e.icon&&w.html(`${await As(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let E=w.node().getBBox(),_=E.width,A=E.height,D=E.x,O=E.y,R=Math.max(_,A)*Math.SQRT2+p*2,k=b.circle(0,0,R,T),L=Math.max(R,f.width),C=R+f.height+m,I=b.rectangle(-L/2,-C/2,L,C,{...T,fill:"transparent",stroke:"none"}),M=h.insert(()=>k,":first-child"),P=h.insert(()=>I);return w.attr("transform",`translate(${-_/2-D},${g?f.height/2+m/2-A/2-O:-f.height/2-m/2-A/2-O})`),w.attr("style",`color: ${v.get("stroke")??y};`),d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-C/2:C/2-f.height})`),M.attr("transform",`translate(0,${g?f.height/2+m/2:-f.height/2-m/2})`),Xe(e,P),e.intersect=function(B){return X.info("iconSquare intersect",e,B),He.rect(e,B)},h}var PZ=N(()=>{"use strict";Ut();pt();rc();Vt();Ft();Nt();o(OZ,"iconCircle")});var Bs,Xd=N(()=>{"use strict";Bs=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 BZ(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=We(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 lt(t,e,"icon-shape default"),m=e.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:x,mainBkg:v}=r,{stylesMap:b}=bc(e),T=-y/2,S=-g/2,w=e.label?8:0,E=je.svg(h),_=Ke(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let A=b.get("fill");_.stroke=A??v;let D=E.path(Bs(T,S,y,g,5),_),O=Math.max(y,f.width),R=g+f.height+w,k=E.rectangle(-O/2,-R/2,O,R,{..._,fill:"transparent",stroke:"none"}),L=h.insert(()=>D,":first-child").attr("class","icon-shape2"),C=h.insert(()=>k);if(e.icon){let I=h.append("g");I.html(`${await As(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let M=I.node().getBBox(),P=M.width,B=M.height,F=M.x,G=M.y;I.attr("transform",`translate(${-P/2-F},${m?f.height/2+w/2-B/2-G:-f.height/2-w/2-B/2-G})`),I.attr("style",`color: ${b.get("stroke")??x};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-R/2:R/2-f.height})`),L.attr("transform",`translate(0,${m?f.height/2+w/2:-f.height/2-w/2})`),Xe(e,C),e.intersect=function(I){if(X.info("iconSquare intersect",e,I),!e.label)return He.rect(e,I);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}],He.polygon(e,F,I)},h}var FZ=N(()=>{"use strict";Ut();pt();rc();Vt();Ft();Xd();Nt();o(BZ,"iconRounded")});async function $Z(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=We(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 lt(t,e,"icon-shape default"),m=e.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:x,mainBkg:v}=r,{stylesMap:b}=bc(e),T=-y/2,S=-g/2,w=e.label?8:0,E=je.svg(h),_=Ke(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let A=b.get("fill");_.stroke=A??v;let D=E.path(Bs(T,S,y,g,.1),_),O=Math.max(y,f.width),R=g+f.height+w,k=E.rectangle(-O/2,-R/2,O,R,{..._,fill:"transparent",stroke:"none"}),L=h.insert(()=>D,":first-child"),C=h.insert(()=>k);if(e.icon){let I=h.append("g");I.html(`${await As(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let M=I.node().getBBox(),P=M.width,B=M.height,F=M.x,G=M.y;I.attr("transform",`translate(${-P/2-F},${m?f.height/2+w/2-B/2-G:-f.height/2-w/2-B/2-G})`),I.attr("style",`color: ${b.get("stroke")??x};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-R/2:R/2-f.height})`),L.attr("transform",`translate(0,${m?f.height/2+w/2:-f.height/2-w/2})`),Xe(e,C),e.intersect=function(I){if(X.info("iconSquare intersect",e,I),!e.label)return He.rect(e,I);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}],He.polygon(e,F,I)},h}var GZ=N(()=>{"use strict";Ut();pt();rc();Vt();Xd();Ft();Nt();o($Z,"iconSquare")});async function zZ(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}=We(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 lt(t,e,"image-shape default"),g=e.pos==="t",y=-h/2,x=-f/2,v=e.label?8:0,b=je.svg(d),T=Ke(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let S=b.rectangle(y,x,h,f,T),w=Math.max(h,p.width),E=f+p.height+v,_=b.rectangle(-w/2,-E/2,w,E,{...T,fill:"none",stroke:"none"}),A=d.insert(()=>S,":first-child"),D=d.insert(()=>_);if(e.img){let O=d.append("image");O.attr("href",e.img),O.attr("width",h),O.attr("height",f),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-h/2},${g?E/2-f:-E/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-f/2-p.height/2-v/2:f/2-p.height/2+v/2})`),A.attr("transform",`translate(0,${g?p.height/2+v/2:-p.height/2-v/2})`),Xe(e,D),e.intersect=function(O){if(X.info("iconSquare intersect",e,O),!e.label)return He.rect(e,O);let R=e.x??0,k=e.y??0,L=e.height??0,C=[];return g?C=[{x:R-p.width/2,y:k-L/2},{x:R+p.width/2,y:k-L/2},{x:R+p.width/2,y:k-L/2+p.height+v},{x:R+h/2,y:k-L/2+p.height+v},{x:R+h/2,y:k+L/2},{x:R-h/2,y:k+L/2},{x:R-h/2,y:k-L/2+p.height+v},{x:R-p.width/2,y:k-L/2+p.height+v}]:C=[{x:R-h/2,y:k-L/2},{x:R+h/2,y:k-L/2},{x:R+h/2,y:k-L/2+f},{x:R+p.width/2,y:k-L/2+f},{x:R+p.width/2/2,y:k+L/2},{x:R-p.width/2,y:k+L/2},{x:R-p.width/2,y:k-L/2+f},{x:R-h/2,y:k-L/2+f}],He.polygon(e,C,O)},d}var VZ=N(()=>{"use strict";Ut();pt();Vt();Ft();Nt();o(zZ,"imageSquare")});async function UZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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=je.svg(i),p=Ke(e,{}),m=zt(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=Ps(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Xe(e,h),e.intersect=function(d){return He.polygon(e,u,d)},i}var HZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();Qh();o(UZ,"inv_trapezoid")});async function jd(t,e,r){let{labelStyles:n,nodeStyles:i}=We(e);e.labelStyle=n;let{shapeSvg:a,bbox:s}=await lt(t,e,rt(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=je.svg(a),x=Ke(e,{}),v=p||m?y.path(Bs(h,f,l,u,p||0),x):y.rectangle(h,f,l,u,x);d=a.insert(()=>v,":first-child"),d.attr("class","basic label-container").attr("style",wn(g))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",i).attr("rx",wn(p)).attr("ry",wn(m)).attr("x",h).attr("y",f).attr("width",l).attr("height",u);return Xe(e,d),e.calcIntersect=function(y,x){return He.rect(y,x)},e.intersect=function(y){return He.rect(e,y)},a}var L2=N(()=>{"use strict";Nt();Vt();Xd();Ft();Ut();tr();o(jd,"drawRect")});async function WZ(t,e){let{shapeSvg:r,bbox:n,label:i}=await lt(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))})`),Xe(e,a),e.intersect=function(u){return He.rect(e,u)},r}var qZ=N(()=>{"use strict";L2();Nt();Vt();o(WZ,"labelRect")});async function YZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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=je.svg(i),p=Ke(e,{}),m=zt(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=Ps(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Xe(e,h),e.intersect=function(d){return He.polygon(e,u,d)},i}var XZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();Qh();o(YZ,"lean_left")});async function jZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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=je.svg(i),p=Ke(e,{}),m=zt(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=Ps(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Xe(e,h),e.intersect=function(d){return He.polygon(e,u,d)},i}var KZ=N(()=>{"use strict";Nt();Vt();Ft();Ut();Qh();o(jZ,"lean_right")});function QZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",rt(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=je.svg(i),d=Ke(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=zt(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})`),Xe(e,g),e.intersect=function(y){return X.info("lightningBolt intersect",e,y),He.polygon(e,h,y)},i}var ZZ=N(()=>{"use strict";pt();Nt();Ft();Ut();Vt();Nt();o(QZ,"lightningBolt")});async function JZ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),y=VDe(0,0,l,f,u,h,d),x=UDe(0,h,l,f,u,h),v=Ke(e,{}),b=g.path(y,v),T=g.path(x,v);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=zDe(0,0,l,f,u,h,d);p=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",wn(m)).attr("style",n)}return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Xe(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=He.rect(e,g),x=y.x-(e.x??0);if(u!=0&&(Math.abs(x)<(e.width??0)/2||Math.abs(x)==(e.width??0)/2&&Math.abs(y.y-(e.y??0))>(e.height??0)/2-h)){let v=h*h*(1-x*x/(u*u));v>0&&(v=Math.sqrt(v)),v=h-v,g.y-(e.y??0)>0&&(v=-v),y.y+=v}return y},i}var zDe,VDe,UDe,eJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();tr();zDe=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"),VDe=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"),UDe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");o(JZ,"linedCylinder")});async function tJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),m=Ke(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(v=>[v.x,v.y]),m),x=i.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.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))})`),Xe(e,x),e.intersect=function(v){return He.polygon(e,g,v)},i}var rJ=N(()=>{"use strict";Nt();Vt();Ut();Ft();o(tJ,"linedWaveEdgedRect")});async function nJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),g=Ke(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}],x=[{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 v=zt(y),b=m.path(v,g),T=zt(x),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))})`),Xe(e,w),e.intersect=function(E){return He.polygon(e,y,E)},i}var iJ=N(()=>{"use strict";Nt();Ft();Ut();Vt();o(nJ,"multiRect")});async function aJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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),x=y?.[y.length-1],v=[{x:d-m,y:p+m},{x:d-m,y:p+f+m},...y,{x:d+l-m,y:x.y-m},{x:d+l,y:x.y-m},{x:d+l,y:x.y-2*m},{x:d+l+m,y:x.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:x.y-m},{x:d+l,y:x.y-m},{x:d+l,y:p},{x:d,y:p}],T=je.svg(i),S=Ke(e,{});e.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let w=zt(v),E=T.path(w,S),_=zt(b),A=T.path(_,S),D=i.insert(()=>E,":first-child");return D.insert(()=>A),D.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.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))})`),Xe(e,D),e.intersect=function(O){return He.polygon(e,v,O)},i}var sJ=N(()=>{"use strict";Nt();Vt();Ut();Ft();o(aJ,"multiWaveEdgedRectangle")});async function oJ(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=We(e);e.labelStyle=n,e.useHtmlLabels||Qt().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:l,label:u}=await lt(t,e,rt(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=je.svg(s),y=Ke(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=g.rectangle(d,p,h,f,y),v=s.insert(()=>x,":first-child");return v.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&e.look!=="handDrawn"&&v.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))})`),Xe(e,v),e.intersect=function(b){return He.rect(e,b)},s}var lJ=N(()=>{"use strict";Ut();Vt();Ft();Nt();Wn();o(oJ,"note")});async function cJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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=je.svg(i),g=Ke(e,{}),y=HDe(0,0,u),x=m.path(y,g);d=i.insert(()=>x,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),p&&d.attr("style",p)}else d=Ps(i,u,u,f),d.attr("transform",`translate(${-u/2+h}, ${u/2})`);return n&&d.attr("style",n),Xe(e,d),e.calcIntersect=function(m,g){let y=m.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],v=He.polygon(m,x,g);return{x:v.x-.5,y:v.y-.5}},e.intersect=function(m){return this.calcIntersect(e,m)},i}var HDe,uJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();Qh();HDe=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(cJ,"question")});async function hJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),y=Ke(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=zt(p),v=g.path(x,y),b=i.insert(()=>v,":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))})`),Xe(e,b),e.intersect=function(T){return He.polygon(e,p,T)},i}var fJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(hJ,"rect_left_inv_arrow")});function WDe(t,e){e&&t.attr("style",e)}async function qDe(t){let e=ze(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=ge(),i=t.label;t.label&&xn(t.label)&&(i=await bh(t.label.replace(Je.lineBreakRegex,`
`),n));let s='"+i+" ";return r.html(ar(s,n)),WDe(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 YDe,Tc,aw=N(()=>{"use strict";pr();Xt();dr();pt();tr();o(WDe,"applyStyle");o(qDe,"addHtmlLabel");YDe=o(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),mr(ge().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g," "),X.info("vertexText"+i);let a={isNode:n,label:ea(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>` `),labelStyle:e&&e.replace("fill:","color:")};return await qDe(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"),Tc=YDe});async function dJ(t,e){let{labelStyles:r,nodeStyles:n}=We(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 Tc(h,e.labelStyle,!0,!0)),d={width:0,height:0};if(mr(ge()?.flowchart?.htmlLabels)){let A=f.children[0],D=ze(f);d=A.getBoundingClientRect(),D.attr("width",d.width),D.attr("height",d.height)}X.info("Text 2",u);let p=u||[],m=f.getBBox(),g=l.node().appendChild(await Tc(p.join?p.join(" "):p,e.labelStyle,!0,!0)),y=g.children[0],x=ze(g);d=y.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height);let v=(e.padding||0)/2;ze(g).attr("transform","translate( "+(d.width>m.width?0:(m.width-d.width)/2)+", "+(m.height+v+5)+")"),ze(f).attr("transform","translate( "+(d.width(X.debug("Rough node insert CXC",O),R),":first-child"),E=a.insert(()=>(X.debug("Rough node insert CXC",O),O),":first-child")}else E=s.insert("rect",":first-child"),_=s.insert("line"),E.attr("class","outer title-state").attr("style",n).attr("x",-d.width/2-v).attr("y",-d.height/2-v).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),_.attr("class","divider").attr("x1",-d.width/2-v).attr("x2",d.width/2+v).attr("y1",-d.height/2-v+m.height+v).attr("y2",-d.height/2-v+m.height+v);return Xe(e,E),e.intersect=function(A){return He.rect(e,A)},a}var pJ=N(()=>{"use strict";pr();dr();Nt();aw();Vt();Ft();Ut();Xt();Xd();pt();o(dJ,"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 x=Math.sqrt(1-y**2),v=u+x*a*Math.sin(f)*(s?-1:1),b=h-x*i*Math.cos(f)*(s?-1:1),T=Math.atan2((e-b)/a,(t-v)/i),w=Math.atan2((n-b)/a,(r-v)/i)-T;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);let E=[];for(let _=0;_<20;_++){let A=_/19,D=T+A*w,O=v+i*Math.cos(D),R=b+a*Math.sin(D);E.push({x:O,y:R})}return E}async function mJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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=je.svg(i),g=Ke(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)],x=zt(y),v=m.path(x,g),b=i.insert(()=>v,":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),Xe(e,b),e.intersect=function(T){return He.polygon(e,y,T)},i}var gJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(sw,"generateArcPoints");o(mJ,"roundedRect")});async function yJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),g=Ke(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}],x=m.polygon(y.map(b=>[b.x,b.y]),g),v=i.insert(()=>x,":first-child");return v.attr("class","basic label-container").attr("style",wn(p)),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),p&&e.look!=="handDrawn"&&v.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))})`),Xe(e,v),e.intersect=function(b){return He.rect(e,b)},i}var vJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();tr();o(yJ,"shadedProcess")});async function xJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),m=Ke(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=zt(g),x=p.path(y,m),v=i.insert(()=>x,":first-child");return v.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),v.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))})`),Xe(e,v),e.intersect=function(b){return He.polygon(e,g,b)},i}var bJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(xJ,"slopedRect")});async function TJ(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 wJ=N(()=>{"use strict";L2();o(TJ,"squareRect")});async function kJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(e)),s=a.height+e.padding,l=a.width+s/4+e.padding,u=s/2,{cssStyles:h}=e,f=je.svg(i),d=Ke(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},...qd(-l/2+u,0,u,50,90,270),{x:l/2-u,y:s/2},...qd(l/2-u,0,u,50,270,450)],m=zt(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),Xe(e,y),e.intersect=function(x){return He.polygon(e,p,x)},i}var EJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(kJ,"stadium")});async function SJ(t,e){return jd(t,e,{rx:5,ry:5,classes:"flowchart-node"})}var CJ=N(()=>{"use strict";L2();o(SJ,"state")});function AJ(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=We(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=je.svg(h),d=Ke(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),Xe(e,y),e.intersect=function(x){return He.circle(e,7,x)},h}var _J=N(()=>{"use strict";Ut();Vt();Ft();Nt();o(AJ,"stateEnd")});function DJ(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=je.svg(i).circle(0,0,14,OQ(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 Xe(e,a),e.intersect=function(s){return He.circle(e,7,s)},i}var LJ=N(()=>{"use strict";Ut();Vt();Ft();Nt();o(DJ,"stateStart")});async function RJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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=je.svg(i),m=Ke(e,{}),g=p.rectangle(h-8,f,l+16,u,m),y=p.line(h,f,h,f+u,m),x=p.line(h+l,f,h+l,f+u,m);i.insert(()=>y,":first-child"),i.insert(()=>x,":first-child");let v=i.insert(()=>g,":first-child"),{cssStyles:b}=e;v.attr("class","basic label-container").attr("style",wn(b)),Xe(e,v)}else{let p=Ps(i,l,u,d);n&&p.attr("style",n),Xe(e,p)}return e.intersect=function(p){return He.polygon(e,d,p)},i}var NJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();Qh();tr();o(RJ,"subroutine")});async function MJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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=je.svg(i),g=Ke(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}],x=[{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 v=zt(y),b=m.path(v,g),T=zt(x),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),Xe(e,w),e.intersect=function(E){return He.polygon(e,y,E)},i}var IJ=N(()=>{"use strict";Nt();Ft();Ut();Vt();o(MJ,"taggedRect")});async function OJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),y=Ke(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=[{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}],v=-l/2+l/2*.1,b=-p/2-d*.4,T=[{x:v+l-f,y:(b+u)*1.4},{x:v+l,y:b+u-d},{x:v+l,y:(b+u)*.9},...Go(v+l,(b+u)*1.3,v+l-f,(b+u)*1.5,-u*.03,.5)],S=zt(x),w=g.path(S,y),E=zt(T),_=g.path(E,{...y,fillStyle:"solid"}),A=i.insert(()=>_,":first-child");return A.insert(()=>w,":first-child"),A.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.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))})`),Xe(e,A),e.intersect=function(D){return He.polygon(e,x,D)},i}var PJ=N(()=>{"use strict";Nt();Vt();Ut();Ft();o(OJ,"taggedWaveEdgedRectangle")});async function BJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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),Xe(e,f),e.intersect=function(d){return He.rect(e,d)},i}var FJ=N(()=>{"use strict";Nt();Vt();Ft();o(BJ,"text")});async function $J(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s,halfPadding:l}=await lt(t,e,rt(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=je.svg(i),x=jDe(0,0,p,h,d,f),v=KDe(0,0,p,h,d,f),b=y.path(x,Ke(e,{})),T=y.path(v,Ke(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=XDe(0,0,p,h,d,f);g=i.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",wn(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))})`),Xe(e,g),e.intersect=function(y){let x=He.rect(e,y),v=x.y-(e.y??0);if(f!=0&&(Math.abs(v)<(e.height??0)/2||Math.abs(v)==(e.height??0)/2&&Math.abs(x.x-(e.x??0))>(e.width??0)/2-d)){let b=d*d*(1-v*v/(f*f));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,y.x-(e.x??0)>0&&(b=-b),x.x+=b}return x},i}var XDe,jDe,KDe,GJ=N(()=>{"use strict";Nt();Ft();Ut();Vt();tr();XDe=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"),jDe=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"),KDe=o((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");o($J,"tiltedCylinder")});async function zJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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=je.svg(i),p=Ke(e,{}),m=zt(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=Ps(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Xe(e,h),e.intersect=function(d){return He.polygon(e,u,d)},i}var VJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();Qh();o(zJ,"trapezoid")});async function UJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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=je.svg(i),p=Ke(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=zt(m),y=d.path(g,p),x=i.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),Xe(e,x),e.intersect=function(v){return He.polygon(e,m,v)},i}var HJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(UJ,"trapezoidalPentagon")});async function WJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(e)),l=mr(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=je.svg(i),g=Ke(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=zt(d),x=m.path(y,g),v=i.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return p&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",p),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),e.width=u,e.height=h,Xe(e,v),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),He.polygon(e,d,b)},i}var qJ=N(()=>{"use strict";pt();Nt();Vt();Ft();Ut();Nt();dr();Xt();o(WJ,"triangle")});async function YJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),x=Ke(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let v=[{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=zt(v),T=y.path(b,x),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))})`),Xe(e,S),e.intersect=function(w){return He.polygon(e,v,w)},i}var XJ=N(()=>{"use strict";Nt();Vt();Ut();Ft();o(YJ,"waveEdgedRectangle")});async function jJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await lt(t,e,rt(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,x=je.svg(i),v=Ke(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.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=zt(b),S=x.path(T,v),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),Xe(e,w),e.intersect=function(E){return He.polygon(e,b,E)},i}var KJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();o(jJ,"waveRectangle")});async function QJ(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await lt(t,e,rt(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=je.svg(i),g=Ke(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}],x=`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 v=m.path(x,g),b=i.insert(()=>v,":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))})`),Xe(e,b),e.intersect=function(T){return He.polygon(e,y,T)},i}var ZJ=N(()=>{"use strict";Nt();Ft();Ut();Vt();o(QJ,"windowPane")});async function F9(t,e){let r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){let{themeVariables:U}=Qt(),{background:K}=U,ne={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${K}`]};await F9(t,ne)}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}=We(e);if(r.attributes.length===0&&e.label){let U={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5,classes:""};Ji(e.label,n)+U.labelPaddingX*20){let U=d.width+i*2-(y+x+v+b);y+=U/w,x+=U/w,v>0&&(v+=U/w),b>0&&(b+=U/w)}let _=y+x+v+b,A=je.svg(f),D=Ke(e,{});e.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let O=0;g.length>0&&(O=g.reduce((U,K)=>U+(K?.rowHeight??0),0));let R=Math.max(E.width+i*2,e?.width||0,_),k=Math.max((O??0)+d.height,e?.height||0),L=-R/2,C=-k/2;f.selectAll("g:not(:first-child)").each((U,K,ne)=>{let j=ze(ne[K]),le=j.attr("transform"),Z=0,ce=0;if(le){let ee=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(le);ee&&(Z=parseFloat(ee[1]),ce=parseFloat(ee[2]),j.attr("class").includes("attribute-name")?Z+=y:j.attr("class").includes("attribute-keys")?Z+=y+x:j.attr("class").includes("attribute-comment")&&(Z+=y+x+v))}j.attr("transform",`translate(${L+i/2+Z}, ${ce+C+d.height+a/2})`)}),f.select(".name").attr("transform","translate("+-d.width/2+", "+(C+a/2)+")");let I=A.rectangle(L,C,R,k,D),M=f.insert(()=>I,":first-child").attr("style",s.join("")),{themeVariables:P}=Qt(),{rowEven:B,rowOdd:F,nodeBorder:G}=P;m.push(0);for(let[U,K]of g.entries()){let j=(U+1)%2===0&&K.yOffset!==0,le=A.rectangle(L,d.height+C+K?.yOffset,R,K?.rowHeight,{...D,fill:j?B:F,stroke:G});f.insert(()=>le,"g.label").attr("style",s.join("")).attr("class",`row-rect-${j?"even":"odd"}`)}let $=A.line(L,d.height+C,R+L,d.height+C,D);f.insert(()=>$).attr("class","divider"),$=A.line(y+L,d.height+C,y+L,k+C,D),f.insert(()=>$).attr("class","divider"),T&&($=A.line(y+x+L,d.height+C,y+x+L,k+C,D),f.insert(()=>$).attr("class","divider")),S&&($=A.line(y+x+v+L,d.height+C,y+x+v+L,k+C,D),f.insert(()=>$).attr("class","divider"));for(let U of m)$=A.line(L,d.height+C+U,R+L,d.height+C+U,D),f.insert(()=>$).attr("class","divider");if(Xe(e,M),u&&e.look!=="handDrawn"){let K=u.split(";")?.filter(ne=>ne.includes("stroke"))?.map(ne=>`${ne}`).join("; ");f.selectAll("path").attr("style",K??""),f.selectAll(".row-rect-even path").attr("style",u)}return e.intersect=function(U){return He.rect(e,U)},f}async function R2(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!==tc(e)&&(e=tc(e),e=e.replaceAll("<","<").replaceAll(">",">"));let u=l.node().appendChild(await pi(l,e,{width:Ji(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(mr(r.htmlLabels)){let f=u.children[0];f.style.textAlign="start";let d=ze(u);h=f.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}var JJ=N(()=>{"use strict";Nt();Vt();Ft();Ut();L2();Wn();$o();dr();pr();tr();o(F9,"erBox");o(R2,"addText")});async function eee(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",rt(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 x=0;for(let b of e.methods){let T=await ow(f,b,x,[b.parseClassifier()]);x+=T+a}let v=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})`),v=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+i*2})`),v=s.node().getBBox(),f.attr("transform",`translate(0, ${d+p+(m?m+i*4:i*2)})`),v=s.node().getBBox(),{shapeSvg:s,bbox:v}}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:mr(a.htmlLabels)??!0,l="";"text"in e?l=e.text:l=e.label,!s&&l.startsWith("\\")&&(l=l.substring(1)),xn(l)&&(s=!0);let u=await pi(i,rv(ea(l)),{width:Ji(l,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),h,f=1;if(s){let d=u.children[0],p=ze(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(x=>{function v(){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%";x(y)}o(v,"setupImage"),setTimeout(()=>{y.complete&&v()}),y.addEventListener("error",v),y.addEventListener("load",v)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{n.includes("font-weight: bolder")&&ze(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 tee=N(()=>{"use strict";pr();Wn();Nt();tr();Xt();$o();dr();o(eee,"textHelper");o(ow,"addText")});async function ree(t,e){let r=ge(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??mr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:l,bbox:u}=await eee(t,e,r,a,i),{labelStyles:h,nodeStyles:f}=We(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=je.svg(l),g=Ke(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=u.width,x=u.height;s.members.length===0&&s.methods.length===0?x+=i:s.members.length>0&&s.methods.length===0&&(x+=i*2);let v=-y/2,b=-x/2,T=m.rectangle(v-n,b-n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0),y+2*n,x+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((D,O,R)=>{let k=ze(R[O]),L=k.attr("transform"),C=0;if(L){let B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(L);B&&(C=parseFloat(B[2]))}let I=C+b+n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(I-=4);let M=v;(k.attr("class").includes("label-group")||k.attr("class").includes("annotation-group"))&&(M=-k.node()?.getBBox().width/2||0,l.selectAll("text").each(function(P,B,F){window.getComputedStyle(F[B]).textAnchor==="middle"&&(M=0)})),k.attr("transform",`translate(${M}, ${I})`)});let E=l.select(".annotation-group").node().getBBox().height-(p?n/2:0)||0,_=l.select(".label-group").node().getBBox().height-(p?n/2:0)||0,A=l.select(".members-group").node().getBBox().height-(p?n/2:0)||0;if(s.members.length>0||s.methods.length>0||p){let D=m.line(w.x,E+_+b+n,w.x+w.width,E+_+b+n,g);l.insert(()=>D).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){let D=m.line(w.x,E+_+A+b+i*2+n,w.x+w.width,E+_+A+b+n+i*2,g);l.insert(()=>D).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 D=RegExp(/color\s*:\s*([^;]*)/),O=D.exec(d);if(O){let R=O[0].replace("color","fill");l.selectAll("tspan").attr("style",R)}else if(h){let R=D.exec(h);if(R){let k=R[0].replace("color","fill");l.selectAll("tspan").attr("style",k)}}}return Xe(e,S),e.intersect=function(D){return He.rect(e,D)},l}var nee=N(()=>{"use strict";Nt();Xt();pr();Ut();Ft();Vt();tee();dr();o(ree,"classBox")});async function iee(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let i=e,a=e,s=20,l=20,u="verifyMethod"in e,h=rt(e),f=t.insert("g").attr("class",h).attr("id",e.domId??e.id),d;u?d=await Mu(f,`<<${i.type}>>`,0,e.labelStyle):d=await Mu(f,"<<Element>>",0,e.labelStyle);let p=d,m=await Mu(f,i.name,p,e.labelStyle+"; font-weight: bold;");if(p+=m+l,u){let E=await Mu(f,`${i.requirementId?`ID: ${i.requirementId}`:""}`,p,e.labelStyle);p+=E;let _=await Mu(f,`${i.text?`Text: ${i.text}`:""}`,p,e.labelStyle);p+=_;let A=await Mu(f,`${i.risk?`Risk: ${i.risk}`:""}`,p,e.labelStyle);p+=A,await Mu(f,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,p,e.labelStyle)}else{let E=await Mu(f,`${a.type?`Type: ${a.type}`:""}`,p,e.labelStyle);p+=E,await Mu(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,x=-g/2,v=-y/2,b=je.svg(f),T=Ke(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let S=b.rectangle(x,v,g,y,T),w=f.insert(()=>S,":first-child");if(w.attr("class","basic label-container").attr("style",n),f.selectAll(".label").each((E,_,A)=>{let D=ze(A[_]),O=D.attr("transform"),R=0,k=0;if(O){let M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);M&&(R=parseFloat(M[1]),k=parseFloat(M[2]))}let L=k-y/2,C=x+s/2;(_===0||_===1)&&(C=R),D.attr("transform",`translate(${C}, ${L+s})`)}),p>d+m+l){let E=b.line(x,v+d+m+l,x+g,v+d+m+l,T);f.insert(()=>E).attr("style",n)}return Xe(e,w),e.intersect=function(E){return He.rect(e,E)},f}async function Mu(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 pi(i,rv(ea(e)),{width:Ji(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),u;if(s){let h=l.children[0],f=ze(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 aee=N(()=>{"use strict";Nt();Vt();Ft();Ut();tr();Xt();$o();pr();o(iee,"requirementBox");o(Mu,"addText")});async function see(t,e,{config:r}){let{labelStyles:n,nodeStyles:i}=We(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:l,bbox:u,label:h}=await lt(t,e,rt(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:x,bbox:v}=await YT(l,"assigned"in e&&e.assigned||"",m);e.width=s;let b=10,T=e?.width||0,S=Math.max(y.height,v.height)/2,w=Math.max(u.height+b*2,e?.height||0)+S,E=-T/2,_=-w/2;h.attr("transform","translate("+(f-T/2)+", "+(-S-u.height/2)+")"),g.attr("transform","translate("+(f-T/2)+", "+(-S+u.height/2)+")"),x.attr("transform","translate("+(f+T/2-v.width-2*a)+", "+(-S+u.height/2)+")");let A,{rx:D,ry:O}=e,{cssStyles:R}=e;if(e.look==="handDrawn"){let k=je.svg(l),L=Ke(e,{}),C=D||O?k.path(Bs(E,_,T,w,D||0),L):k.rectangle(E,_,T,w,L);A=l.insert(()=>C,":first-child"),A.attr("class","basic label-container").attr("style",R||null)}else{A=l.insert("rect",":first-child"),A.attr("class","basic label-container __APA__").attr("style",i).attr("rx",D??5).attr("ry",O??5).attr("x",E).attr("y",_).attr("width",T).attr("height",w);let k="priority"in e&&e.priority;if(k){let L=l.append("line"),C=E+2,I=_+Math.floor((D??0)/2),M=_+w-Math.floor((D??0)/2);L.attr("x1",C).attr("y1",I).attr("x2",C).attr("y2",M).attr("stroke-width","4").attr("stroke",QDe(k))}}return Xe(e,A),e.height=w,e.intersect=function(k){return He.rect(e,k)},l}var QDe,oee=N(()=>{"use strict";Nt();Vt();Xd();Ft();Ut();QDe=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(see,"kanbanItem")});async function lee(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await lt(t,e,rt(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 x,v=`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=je.svg(i),T=Ke(e,{}),S=b.path(v,T);x=i.insert(()=>S,":first-child"),x.attr("class","basic label-container").attr("style",wn(d))}else x=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",v);return x.attr("transform",`translate(${-g/2}, ${-y/2})`),Xe(e,x),e.calcIntersect=function(b,T){return He.rect(b,T)},e.intersect=function(b){return X.info("Bang intersect",e,b),He.rect(e,b)},i}var cee=N(()=>{"use strict";pt();Nt();Vt();Ft();Ut();tr();o(lee,"bang")});async function uee(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await lt(t,e,rt(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,x=`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 v=je.svg(i),b=Ke(e,{}),T=v.path(x,b);y=i.insert(()=>T,":first-child"),y.attr("class","basic label-container").attr("style",wn(g))}else y=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",x);return l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-u/2}, ${-h/2})`),Xe(e,y),e.calcIntersect=function(v,b){return He.rect(v,b)},e.intersect=function(v){return X.info("Cloud intersect",e,v),He.rect(e,v)},i}var hee=N(()=>{"use strict";Ut();pt();tr();Vt();Ft();Nt();o(uee,"cloud")});async function fee(t,e){let{labelStyles:r,nodeStyles:n}=We(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await lt(t,e,rt(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()),Xe(e,p),e.calcIntersect=function(m,g){return He.rect(m,g)},e.intersect=function(m){return He.rect(e,m)},i}var dee=N(()=>{"use strict";Vt();Ft();Nt();o(fee,"defaultMindmapNode")});async function pee(t,e){let r={padding:e.padding??0};return iw(t,e,r)}var mee=N(()=>{"use strict";B9();o(pee,"mindmapCircle")});function gee(t){return t in $9}var ZDe,JDe,$9,G9=N(()=>{"use strict";QQ();eZ();rZ();iZ();B9();sZ();lZ();uZ();fZ();pZ();gZ();vZ();bZ();wZ();EZ();CZ();_Z();LZ();NZ();IZ();PZ();FZ();GZ();VZ();HZ();qZ();XZ();KZ();ZZ();eJ();rJ();iJ();sJ();lJ();uJ();fJ();pJ();gJ();vJ();bJ();wJ();EJ();CJ();_J();LJ();NJ();IJ();PJ();FJ();GJ();VJ();HJ();qJ();XJ();KJ();ZJ();JJ();nee();aee();oee();cee();hee();dee();mee();ZDe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:TJ},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:mJ},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:kJ},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:RJ},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:mZ},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:iw},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:lee},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:uee},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:cJ},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:DZ},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:jZ},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:YZ},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:zJ},{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:UZ},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:xZ},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:BJ},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:tZ},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:yJ},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:DJ},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:AJ},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:SZ},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:RZ},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:oZ},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:cZ},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:hZ},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:QZ},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:YJ},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:AZ},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:$J},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:JZ},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:dZ},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:yZ},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:WJ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:QJ},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:TZ},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:UJ},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:kZ},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:xJ},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:aJ},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:nJ},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:JQ},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:aZ},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:OJ},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:MJ},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:jJ},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:hJ},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tJ}],JDe=o(()=>{let e=[...Object.entries({state:SJ,choice:nZ,note:oJ,rectWithTitle:dJ,labelRect:WZ,iconSquare:$Z,iconCircle:OZ,icon:MZ,iconRounded:BZ,imageSquare:zZ,anchor:KQ,kanbanItem:see,mindmapCircle:pee,defaultMindmapNode:fee,classBox:ree,erBox:F9,requirementBox:iee}),...ZDe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),$9=JDe();o(gee,"isValidShape")});var eLe,lw,yee=N(()=>{"use strict";pr();b2();Xt();pt();G9();tr();dr();ui();eLe="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=Cr;this.setAccDescription=Dr;this.setDiagramTitle=Or;this.getAccTitle=_r;this.getAccDescription=Lr;this.getDiagramTitle=Rr;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 Je.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=Xh(m,{schema:Yh})}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:eLe+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(!gee(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=Hh(l.start,l.end,{counter:0,prefix:"L"}):l.id=Hh(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",()=>{Ht.runFunc(r,...a)},!1)}))}setLink(e,r,n){e.split(",").forEach(i=>{let a=this.vertices.get(i);a!==void 0&&(a.link=Ht.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=ze(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=ze("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),ze(e).select("svg").selectAll("g.node").on("mouseover",a=>{let s=ze(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),ze(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(),wr()}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(v){let b=typeof v;return v.stmt&&v.stmt==="dir"?(y=v.value,!1):v.trim()===""?!1:b in m?m[b].hasOwnProperty(v)?!1:m[b][v]=!0:g.includes(v)?!1:g.push(v)}),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:Hh(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 zo,Kd=N(()=>{"use strict";pr();zo=o((t,e)=>{let r;return e==="sandbox"&&(r=ze("#i"+t)),(e==="sandbox"?ze(r.nodes()[0].contentDocument.body):ze("body")).select(`[id="${t}"]`)},"getDiagramElement")});var Iu,N2=N(()=>{"use strict";Iu=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 vee,tLe,rLe,nLe,iLe,aLe,sLe,xee,Tm,bee,cw=N(()=>{"use strict";Xt();dr();pt();N2();pr();Ut();$o();x9();aw();Xd();Ft();vee=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}=We(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=mr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await pi(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0}),y=g.getBBox();if(mr(r.flowchart.htmlLabels)){let _=g.children[0],A=ze(g);y=_.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height)}let x=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,b=e.x-x/2,T=e.y-v/2;X.trace("Data ",e,JSON.stringify(e));let S;if(e.look==="handDrawn"){let _=je.svg(d),A=Ke(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),D=_.path(Bs(b,T,x,v,0),A);S=d.insert(()=>(X.debug("Rough node insert CXC",D),D),":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",x).attr("height",v);let{subGraphTitleTopMargin:w}=Iu(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),l){let _=m.select("span");_&&_.attr("style",l)}let E=S.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=y.height-e.padding/2,e.intersect=function(_){return jh(e,_)},{cluster:d,labelBBox:y}},"rect"),tLe=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 jh(e,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),rLe=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 Tc(e.label,e.labelStyle,void 0,!0)),g=m.getBBox();if(mr(r.flowchart.htmlLabels)){let D=m.children[0],O=ze(m);g=D.getBoundingClientRect(),O.attr("width",g.width),O.attr("height",g.height)}let y=0*e.padding,x=y/2,v=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+y;e.width<=g.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+y,T=e.height+y-g.height-6,S=e.x-v/2,w=e.y-b/2;e.width=v;let E=e.y-e.height/2-x+g.height+2,_;if(e.look==="handDrawn"){let D=e.cssClasses.includes("statediagram-cluster-alt"),O=je.svg(h),R=e.rx||e.ry?O.path(Bs(S,w,v,b,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):O.rectangle(S,w,v,b,{seed:i});_=h.insert(()=>R,":first-child");let k=O.rectangle(S,E,v,T,{fill:D?a:s,fillStyle:D?"hachure":"solid",stroke:u,seed:i});_=h.insert(()=>R,":first-child"),p=h.insert(()=>k)}else _=f.insert("rect",":first-child"),_.attr("class","outer").attr("x",S).attr("y",w).attr("width",v).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",S).attr("y",E).attr("width",v).attr("height",T);d.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(mr(r.flowchart.htmlLabels)?0:3)})`);let A=_.node().getBBox();return e.height=A.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(D){return jh(e,D)},{cluster:h,labelBBox:g}},"roundedWithTitle"),nLe=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}=We(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=mr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await pi(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}),y=g.getBBox();if(mr(r.flowchart.htmlLabels)){let _=g.children[0],A=ze(g);y=_.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height)}let x=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,b=e.x-x/2,T=e.y-v/2;X.trace("Data ",e,JSON.stringify(e));let S;if(e.look==="handDrawn"){let _=je.svg(d),A=Ke(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),D=_.path(Bs(b,T,x,v,e.rx),A);S=d.insert(()=>(X.debug("Rough node insert CXC",D),D),":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",x).attr("height",v);let{subGraphTitleTopMargin:w}=Iu(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),l){let _=m.select("span");_&&_.attr("style",l)}let E=S.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=y.height-e.padding/2,e.intersect=function(_){return jh(e,_)},{cluster:d,labelBBox:y}},"kanbanSection"),iLe=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 x=je.svg(s).rectangle(d,p,h,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});m=s.insert(()=>x,":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 jh(e,y)},{cluster:s,labelBBox:{}}},"divider"),aLe=vee,sLe={rect:vee,squareRect:aLe,roundedWithTitle:rLe,noteGroup:tLe,divider:iLe,kanbanSection:nLe},xee=new Map,Tm=o(async(t,e)=>{let r=e.shape||"rect",n=await sLe[r](t,e);return xee.set(e.id,n),n},"insertCluster"),bee=o(()=>{xee=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 Vo,Xn,hw,z9=N(()=>{"use strict";Vo={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};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(Vo,t.arrowTypeEnd)){let{angle:m,deltaX:g}=uw(n[n.length-1],n[n.length-2]);i=Vo[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=Vo[t.arrowTypeStart],d=Vo[t.arrowTypeEnd],p=1;if(s0&&l0&&h=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Vo,t.arrowTypeEnd)){let{angle:m,deltaY:g}=uw(n[n.length-1],n[n.length-2]);i=Vo[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=Vo[t.arrowTypeStart],d=Vo[t.arrowTypeEnd],p=1;if(s0&&l0&&h{"use strict";pt();wee=o((t,e,r,n,i,a)=>{e.arrowTypeStart&&Tee(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&Tee(t,"end",e.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),oLe={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}},Tee=o((t,e,r,n,i,a,s)=>{let l=oLe[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(x=>{x.setAttribute("stroke",s),l.fill&&x.setAttribute("fill",s)}),m.parentNode?.appendChild(g)}}t.attr(`marker-${e}`,`url(${n}#${p})`)}else t.attr(`marker-${e}`,`url(${n}#${f})`)},"addEdgeMarker")});function fw(t,e){ge().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function uLe(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}}var dw,fa,Cee,M2,pw,mw,lLe,cLe,Eee,See,hLe,gw,V9=N(()=>{"use strict";Xt();dr();pt();$o();tr();z9();N2();pr();Ut();aw();kee();Ft();dw=new Map,fa=new Map,Cee=o(()=>{dw.clear(),fa.clear()},"clear"),M2=o(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),pw=o(async(t,e)=>{let r=mr(ge().flowchart.htmlLabels),n=await pi(t,e.label,{style:M2(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});X.info("abc82",e,e.labelType);let i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);let s=n.getBBox();if(r){let u=n.children[0],h=ze(n);s=u.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),dw.set(e.id,i),e.width=s.width,e.height=s.height;let l;if(e.startLabelLeft){let u=await Tc(e.startLabelLeft,M2(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),fa.get(e.id)||fa.set(e.id,{}),fa.get(e.id).startLeft=h,fw(l,e.startLabelLeft)}if(e.startLabelRight){let u=await Tc(e.startLabelRight,M2(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),fa.get(e.id)||fa.set(e.id,{}),fa.get(e.id).startRight=h,fw(l,e.startLabelRight)}if(e.endLabelLeft){let u=await Tc(e.endLabelLeft,M2(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),fa.get(e.id)||fa.set(e.id,{}),fa.get(e.id).endLeft=h,fw(l,e.endLabelLeft)}if(e.endLabelRight){let u=await Tc(e.endLabelRight,M2(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),fa.get(e.id)||fa.set(e.id,{}),fa.get(e.id).endRight=h,fw(l,e.endLabelRight)}return n},"insertEdgeLabel");o(fw,"setTerminalWidth");mw=o((t,e)=>{X.debug("Moving label abc88 ",t.id,t.label,dw.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=ge(),{subGraphTitleTotalMargin:i}=Iu(n);if(t.label){let a=dw.get(t.id),s=t.x,l=t.y;if(r){let u=Ht.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=fa.get(t.id).startLeft,s=t.x,l=t.y;if(r){let u=Ht.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=fa.get(t.id).startRight,s=t.x,l=t.y;if(r){let u=Ht.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=fa.get(t.id).endLeft,s=t.x,l=t.y;if(r){let u=Ht.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=fa.get(t.id).endRight,s=t.x,l=t.y;if(r){let u=Ht.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),lLe=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"),cLe=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),!lLe(e,a)&&!i){let s=cLe(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(uLe,"extractCornerPoints");See=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"),hLe=o(function(t){let{cornerPointPositions:e}=uLe(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"),gw=o(function(t,e,r,n,i,a,s){let{handDrawnSeed:l}=ge(),u=e.points,h=!1,f=i;var d=a;let p=[];for(let R in e.cssCompiledStyles)S2(R)||p.push(e.cssCompiledStyles[R]);d.intersect&&f.intersect&&(u=u.slice(1,e.points.length-1),u.unshift(f.intersect(u[0])),X.debug("Last point APA12",e.start,"-->",e.end,u[u.length-1],d,d.intersect(u[u.length-1])),u.push(d.intersect(u[u.length-1]))),e.toCluster&&(X.info("to cluster abc88",r.get(e.toCluster)),u=Eee(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(X.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(u,null,2)),u=Eee(u.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let m=u.filter(R=>!Number.isNaN(R.y));m=hLe(m);let g=Ro;switch(g=Eu,e.curve){case"linear":g=Eu;break;case"basis":g=Ro;break;case"cardinal":g=Wv;break;case"bumpX":g=Gv;break;case"bumpY":g=zv;break;case"catmullRom":g=Xv;break;case"monotoneX":g=jv;break;case"monotoneY":g=Kv;break;case"natural":g=j0;break;case"step":g=K0;break;case"stepAfter":g=Zv;break;case"stepBefore":g=Qv;break;default:g=Ro}let{x:y,y:x}=hw(e),v=Cl().x(y).y(x).curve(g),b;switch(e.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(e.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let T,S=v(m),w=Array.isArray(e.style)?e.style:e.style?[e.style]:[],E=w.find(R=>R?.startsWith("stroke:"));if(e.look==="handDrawn"){let R=je.svg(t);Object.assign([],m);let k=R.path(S,{roughness:.3,seed:l});b+=" transition",T=ze(k).select("path").attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",w?w.reduce((C,I)=>C+";"+I,""):"");let L=T.attr("d");T.attr("d",L),t.node().appendChild(T.node())}else{let R=p.join(";"),k=w?w.reduce((I,M)=>I+M+";",""):"",L="";e.animate&&(L=" edge-animation-fast"),e.animation&&(L=" edge-animation-"+e.animation);let C=R?R+";"+k+";":k;T=t.append("path").attr("d",S).attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")+(L??"")).attr("style",C),E=C.match(/stroke:([^;]+)/)?.[1]}let _="";(ge().flowchart.arrowMarkerAbsolute||ge().state.arrowMarkerAbsolute)&&(_=du(!0)),X.info("arrowTypeStart",e.arrowTypeStart),X.info("arrowTypeEnd",e.arrowTypeEnd),wee(T,e,_,s,n,E);let A=Math.floor(u.length/2),D=u[A];Ht.isLabelCoordinateInPath(D,T.attr("d"))||(h=!0);let O={};return h&&(O.updatedPath=u),O.originalPath=e.points,O},"insertEdge")});var fLe,dLe,pLe,mLe,gLe,yLe,vLe,xLe,bLe,TLe,wLe,kLe,ELe,SLe,CLe,ALe,_Le,yw,U9=N(()=>{"use strict";pt();fLe=o((t,e,r,n)=>{e.forEach(i=>{_Le[i](t,r,n)})},"insertMarkers"),dLe=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"),pLe=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"),mLe=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"),gLe=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"),yLe=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"),vLe=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"),xLe=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"),bLe=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"),TLe=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"),wLe=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"),kLe=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"),ELe=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"),SLe=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"),CLe=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"),ALe=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"),_Le={extension:dLe,composition:pLe,aggregation:mLe,dependency:gLe,lollipop:yLe,point:vLe,circle:xLe,cross:bLe,barb:TLe,only_one:wLe,zero_or_one:kLe,one_or_more:ELe,zero_or_more:SLe,requirement_arrow:CLe,requirement_contains:ALe},yw=fLe});async function wm(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?$9[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),vw.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var vw,Aee,_ee,I2,xw=N(()=>{"use strict";pt();G9();vw=new Map;o(wm,"insertNode");Aee=o((t,e)=>{vw.set(e.id,t)},"setNodeElem"),_ee=o(()=>{vw.clear()},"clear"),I2=o(t=>{let e=vw.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 Dee,Lee=N(()=>{"use strict";Wn();dr();pt();cw();V9();U9();xw();Nt();tr();Dee={common:Je,getConfig:Qt,insertCluster:Tm,insertEdge:gw,insertEdgeLabel:pw,insertMarkers:yw,insertNode:wm,interpolateToCurve:NL,labelHelper:lt,log:X,positionEdgeLabel:mw}});function LLe(t){return typeof t=="symbol"||ai(t)&&ha(t)==DLe}var DLe,oo,Qd=N(()=>{"use strict";Cu();Io();DLe="[object Symbol]";o(LLe,"isSymbol");oo=LLe});function RLe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{"use strict";o(RLe,"arrayMap");Fs=RLe});function Mee(t){if(typeof t=="string")return t;if(Pt(t))return Fs(t,Mee)+"";if(oo(t))return Nee?Nee.call(t):"";var e=t+"";return e=="0"&&1/t==-NLe?"-0":e}var NLe,Ree,Nee,Iee,Oee=N(()=>{"use strict";Od();Zd();Yn();Qd();NLe=1/0,Ree=Qi?Qi.prototype:void 0,Nee=Ree?Ree.toString:void 0;o(Mee,"baseToString");Iee=Mee});function ILe(t){for(var e=t.length;e--&&MLe.test(t.charAt(e)););return e}var MLe,Pee,Bee=N(()=>{"use strict";MLe=/\s/;o(ILe,"trimmedEndIndex");Pee=ILe});function PLe(t){return t&&t.slice(0,Pee(t)+1).replace(OLe,"")}var OLe,Fee,$ee=N(()=>{"use strict";Bee();OLe=/^\s+/;o(PLe,"baseTrim");Fee=PLe});function zLe(t){if(typeof t=="number")return t;if(oo(t))return Gee;if(Tn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Tn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Fee(t);var r=FLe.test(t);return r||$Le.test(t)?GLe(t.slice(2),r?2:8):BLe.test(t)?Gee:+t}var Gee,BLe,FLe,$Le,GLe,zee,Vee=N(()=>{"use strict";$ee();io();Qd();Gee=NaN,BLe=/^[-+]0x[0-9a-f]+$/i,FLe=/^0b[01]+$/i,$Le=/^0o[0-7]+$/i,GLe=parseInt;o(zLe,"toNumber");zee=zLe});function ULe(t){if(!t)return t===0?t:0;if(t=zee(t),t===Uee||t===-Uee){var e=t<0?-1:1;return e*VLe}return t===t?t:0}var Uee,VLe,km,H9=N(()=>{"use strict";Vee();Uee=1/0,VLe=17976931348623157e292;o(ULe,"toFinite");km=ULe});function HLe(t){var e=km(t),r=e%1;return e===e?r?e-r:e:0}var wc,Em=N(()=>{"use strict";H9();o(HLe,"toInteger");wc=HLe});var WLe,bw,Hee=N(()=>{"use strict";Oh();No();WLe=Ds(fi,"WeakMap"),bw=WLe});function qLe(){}var si,W9=N(()=>{"use strict";o(qLe,"noop");si=qLe});function YLe(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";o(YLe,"arrayEach");Tw=YLe});function XLe(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{"use strict";o(XLe,"baseFindIndex");ww=XLe});function jLe(t){return t!==t}var Wee,qee=N(()=>{"use strict";o(jLe,"baseIsNaN");Wee=jLe});function KLe(t,e,r){for(var n=r-1,i=t.length;++n{"use strict";o(KLe,"strictIndexOf");Yee=KLe});function QLe(t,e,r){return e===e?Yee(t,e,r):ww(t,Wee,r)}var Sm,kw=N(()=>{"use strict";Y9();qee();Xee();o(QLe,"baseIndexOf");Sm=QLe});function ZLe(t,e){var r=t==null?0:t.length;return!!r&&Sm(t,e,0)>-1}var Ew,X9=N(()=>{"use strict";kw();o(ZLe,"arrayIncludes");Ew=ZLe});var JLe,jee,Kee=N(()=>{"use strict";xL();JLe=vT(Object.keys,Object),jee=JLe});function r9e(t){if(!pc(t))return jee(t);var e=[];for(var r in Object(t))t9e.call(t,r)&&r!="constructor"&&e.push(r);return e}var e9e,t9e,Cm,Sw=N(()=>{"use strict";cm();Kee();e9e=Object.prototype,t9e=e9e.hasOwnProperty;o(r9e,"baseKeys");Cm=r9e});function n9e(t){return di(t)?kT(t):Cm(t)}var Gr,kc=N(()=>{"use strict";EL();Sw();Oo();o(n9e,"keys");Gr=n9e});var i9e,a9e,s9e,da,Qee=N(()=>{"use strict";dm();Gd();_L();Oo();cm();kc();i9e=Object.prototype,a9e=i9e.hasOwnProperty,s9e=CT(function(t,e){if(pc(e)||di(e)){Fo(e,Gr(e),t);return}for(var r in e)a9e.call(e,r)&&mc(t,r,e[r])}),da=s9e});function c9e(t,e){if(Pt(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||oo(t)?!0:l9e.test(t)||!o9e.test(t)||e!=null&&t in Object(e)}var o9e,l9e,Am,Cw=N(()=>{"use strict";Yn();Qd();o9e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l9e=/^\w*$/;o(c9e,"isKey");Am=c9e});function h9e(t){var e=tm(t,function(n){return r.size===u9e&&r.clear(),n}),r=e.cache;return e}var u9e,Zee,Jee=N(()=>{"use strict";fL();u9e=500;o(h9e,"memoizeCapped");Zee=h9e});var f9e,d9e,p9e,ete,tte=N(()=>{"use strict";Jee();f9e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d9e=/\\(\\)?/g,p9e=Zee(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(f9e,function(r,n,i,a){e.push(i?a.replace(d9e,"$1"):n||r)}),e}),ete=p9e});function m9e(t){return t==null?"":Iee(t)}var Aw,j9=N(()=>{"use strict";Oee();o(m9e,"toString");Aw=m9e});function g9e(t,e){return Pt(t)?t:Am(t,e)?[t]:ete(Aw(t))}var ef,O2=N(()=>{"use strict";Yn();Cw();tte();j9();o(g9e,"castPath");ef=g9e});function v9e(t){if(typeof t=="string"||oo(t))return t;var e=t+"";return e=="0"&&1/t==-y9e?"-0":e}var y9e,Ec,_m=N(()=>{"use strict";Qd();y9e=1/0;o(v9e,"toKey");Ec=v9e});function x9e(t,e){e=ef(e,t);for(var r=0,n=e.length;t!=null&&r{"use strict";O2();_m();o(x9e,"baseGet");tf=x9e});function b9e(t,e,r){var n=t==null?void 0:tf(t,e);return n===void 0?r:n}var rte,nte=N(()=>{"use strict";P2();o(b9e,"get");rte=b9e});function T9e(t,e){for(var r=-1,n=e.length,i=t.length;++r{"use strict";o(T9e,"arrayPush");Dm=T9e});function w9e(t){return Pt(t)||_l(t)||!!(ite&&t&&t[ite])}var ite,ate,ste=N(()=>{"use strict";Od();um();Yn();ite=Qi?Qi.isConcatSpreadable:void 0;o(w9e,"isFlattenable");ate=w9e});function ote(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=ate),i||(i=[]);++a0&&r(l)?e>1?ote(l,e-1,r,n,i):Dm(i,l):n||(i[i.length]=l)}return i}var Sc,Lm=N(()=>{"use strict";_w();ste();o(ote,"baseFlatten");Sc=ote});function k9e(t){var e=t==null?0:t.length;return e?Sc(t,1):[]}var qr,Dw=N(()=>{"use strict";Lm();o(k9e,"flatten");qr=k9e});function E9e(t){return ST(ET(t,void 0,qr),t+"")}var lte,cte=N(()=>{"use strict";Dw();SL();AL();o(E9e,"flatRest");lte=E9e});function S9e(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(S9e,"baseSlice");Lw=S9e});function I9e(t){return M9e.test(t)}var C9e,A9e,_9e,D9e,L9e,R9e,N9e,M9e,ute,hte=N(()=>{"use strict";C9e="\\ud800-\\udfff",A9e="\\u0300-\\u036f",_9e="\\ufe20-\\ufe2f",D9e="\\u20d0-\\u20ff",L9e=A9e+_9e+D9e,R9e="\\ufe0e\\ufe0f",N9e="\\u200d",M9e=RegExp("["+N9e+C9e+L9e+R9e+"]");o(I9e,"hasUnicode");ute=I9e});function O9e(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i{"use strict";o(O9e,"arrayReduce");fte=O9e});function P9e(t,e){return t&&Fo(e,Gr(e),t)}var pte,mte=N(()=>{"use strict";Gd();kc();o(P9e,"baseAssign");pte=P9e});function B9e(t,e){return t&&Fo(e,Ls(e),t)}var gte,yte=N(()=>{"use strict";Gd();Vh();o(B9e,"baseAssignIn");gte=B9e});function F9e(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r{"use strict";o(F9e,"arrayFilter");Rm=F9e});function $9e(){return[]}var Nw,Q9=N(()=>{"use strict";o($9e,"stubArray");Nw=$9e});var G9e,z9e,vte,V9e,Nm,Mw=N(()=>{"use strict";Rw();Q9();G9e=Object.prototype,z9e=G9e.propertyIsEnumerable,vte=Object.getOwnPropertySymbols,V9e=vte?function(t){return t==null?[]:(t=Object(t),Rm(vte(t),function(e){return z9e.call(t,e)}))}:Nw,Nm=V9e});function U9e(t,e){return Fo(t,Nm(t),e)}var xte,bte=N(()=>{"use strict";Gd();Mw();o(U9e,"copySymbols");xte=U9e});var H9e,W9e,Iw,Z9=N(()=>{"use strict";_w();xT();Mw();Q9();H9e=Object.getOwnPropertySymbols,W9e=H9e?function(t){for(var e=[];t;)Dm(e,Nm(t)),t=lm(t);return e}:Nw,Iw=W9e});function q9e(t,e){return Fo(t,Iw(t),e)}var Tte,wte=N(()=>{"use strict";Gd();Z9();o(q9e,"copySymbolsIn");Tte=q9e});function Y9e(t,e,r){var n=e(t);return Pt(t)?n:Dm(n,r(t))}var Ow,J9=N(()=>{"use strict";_w();Yn();o(Y9e,"baseGetAllKeys");Ow=Y9e});function X9e(t){return Ow(t,Gr,Nm)}var B2,eR=N(()=>{"use strict";J9();Mw();kc();o(X9e,"getAllKeys");B2=X9e});function j9e(t){return Ow(t,Ls,Iw)}var Pw,tR=N(()=>{"use strict";J9();Z9();Vh();o(j9e,"getAllKeysIn");Pw=j9e});var K9e,Bw,kte=N(()=>{"use strict";Oh();No();K9e=Ds(fi,"DataView"),Bw=K9e});var Q9e,Fw,Ete=N(()=>{"use strict";Oh();No();Q9e=Ds(fi,"Promise"),Fw=Q9e});var Z9e,rf,rR=N(()=>{"use strict";Oh();No();Z9e=Ds(fi,"Set"),rf=Z9e});var Ste,J9e,Cte,Ate,_te,Dte,eRe,tRe,rRe,nRe,iRe,Jd,lo,ep=N(()=>{"use strict";kte();hT();Ete();rR();Hee();Cu();cL();Ste="[object Map]",J9e="[object Object]",Cte="[object Promise]",Ate="[object Set]",_te="[object WeakMap]",Dte="[object DataView]",eRe=Au(Bw),tRe=Au(Fh),rRe=Au(Fw),nRe=Au(rf),iRe=Au(bw),Jd=ha;(Bw&&Jd(new Bw(new ArrayBuffer(1)))!=Dte||Fh&&Jd(new Fh)!=Ste||Fw&&Jd(Fw.resolve())!=Cte||rf&&Jd(new rf)!=Ate||bw&&Jd(new bw)!=_te)&&(Jd=o(function(t){var e=ha(t),r=e==J9e?t.constructor:void 0,n=r?Au(r):"";if(n)switch(n){case eRe:return Dte;case tRe:return Ste;case rRe:return Cte;case nRe:return Ate;case iRe:return _te}return e},"getTag"));lo=Jd});function oRe(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&sRe.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var aRe,sRe,Lte,Rte=N(()=>{"use strict";aRe=Object.prototype,sRe=aRe.hasOwnProperty;o(oRe,"initCloneArray");Lte=oRe});function lRe(t,e){var r=e?om(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Nte,Mte=N(()=>{"use strict";mT();o(lRe,"cloneDataView");Nte=lRe});function uRe(t){var e=new t.constructor(t.source,cRe.exec(t));return e.lastIndex=t.lastIndex,e}var cRe,Ite,Ote=N(()=>{"use strict";cRe=/\w*$/;o(uRe,"cloneRegExp");Ite=uRe});function hRe(t){return Bte?Object(Bte.call(t)):{}}var Pte,Bte,Fte,$te=N(()=>{"use strict";Od();Pte=Qi?Qi.prototype:void 0,Bte=Pte?Pte.valueOf:void 0;o(hRe,"cloneSymbol");Fte=hRe});function RRe(t,e,r){var n=t.constructor;switch(e){case bRe:return om(t);case fRe:case dRe:return new n(+t);case TRe:return Nte(t,r);case wRe:case kRe:case ERe:case SRe:case CRe:case ARe:case _Re:case DRe:case LRe:return gT(t,r);case pRe:return new n;case mRe:case vRe:return new n(t);case gRe:return Ite(t);case yRe:return new n;case xRe:return Fte(t)}}var fRe,dRe,pRe,mRe,gRe,yRe,vRe,xRe,bRe,TRe,wRe,kRe,ERe,SRe,CRe,ARe,_Re,DRe,LRe,Gte,zte=N(()=>{"use strict";mT();Mte();Ote();$te();yL();fRe="[object Boolean]",dRe="[object Date]",pRe="[object Map]",mRe="[object Number]",gRe="[object RegExp]",yRe="[object Set]",vRe="[object String]",xRe="[object Symbol]",bRe="[object ArrayBuffer]",TRe="[object DataView]",wRe="[object Float32Array]",kRe="[object Float64Array]",ERe="[object Int8Array]",SRe="[object Int16Array]",CRe="[object Int32Array]",ARe="[object Uint8Array]",_Re="[object Uint8ClampedArray]",DRe="[object Uint16Array]",LRe="[object Uint32Array]";o(RRe,"initCloneByTag");Gte=RRe});function MRe(t){return ai(t)&&lo(t)==NRe}var NRe,Vte,Ute=N(()=>{"use strict";ep();Io();NRe="[object Map]";o(MRe,"baseIsMap");Vte=MRe});var Hte,IRe,Wte,qte=N(()=>{"use strict";Ute();$d();u2();Hte=Bo&&Bo.isMap,IRe=Hte?Po(Hte):Vte,Wte=IRe});function PRe(t){return ai(t)&&lo(t)==ORe}var ORe,Yte,Xte=N(()=>{"use strict";ep();Io();ORe="[object Set]";o(PRe,"baseIsSet");Yte=PRe});var jte,BRe,Kte,Qte=N(()=>{"use strict";Xte();$d();u2();jte=Bo&&Bo.isSet,BRe=jte?Po(jte):Yte,Kte=BRe});function $w(t,e,r,n,i,a){var s,l=e&FRe,u=e&$Re,h=e&GRe;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!Tn(t))return t;var f=Pt(t);if(f){if(s=Lte(t),!l)return yT(t,s)}else{var d=lo(t),p=d==Jte||d==WRe;if(Dl(t))return pT(t,l);if(d==ere||d==Zte||p&&!i){if(s=u||p?{}:bT(t),!l)return u?Tte(t,gte(s,t)):xte(t,pte(s,t))}else{if(!Rn[d])return i?t:{};s=Gte(t,d,l)}}a||(a=new fc);var m=a.get(t);if(m)return m;a.set(t,s),Kte(t)?t.forEach(function(x){s.add($w(x,e,r,x,t,a))}):Wte(t)&&t.forEach(function(x,v){s.set(v,$w(x,e,r,v,t,a))});var g=h?u?Pw:B2:u?Ls:Gr,y=f?void 0:g(t);return Tw(y||t,function(x,v){y&&(v=x,x=t[v]),mc(s,v,$w(x,e,r,v,t,a))}),s}var FRe,$Re,GRe,Zte,zRe,VRe,URe,HRe,Jte,WRe,qRe,YRe,ere,XRe,jRe,KRe,QRe,ZRe,JRe,eNe,tNe,rNe,nNe,iNe,aNe,sNe,oNe,lNe,cNe,Rn,Gw,nR=N(()=>{"use strict";o2();q9();dm();mte();yte();mL();vL();bte();wte();eR();tR();ep();Rte();zte();bL();Yn();fm();qte();io();Qte();kc();Vh();FRe=1,$Re=2,GRe=4,Zte="[object Arguments]",zRe="[object Array]",VRe="[object Boolean]",URe="[object Date]",HRe="[object Error]",Jte="[object Function]",WRe="[object GeneratorFunction]",qRe="[object Map]",YRe="[object Number]",ere="[object Object]",XRe="[object RegExp]",jRe="[object Set]",KRe="[object String]",QRe="[object Symbol]",ZRe="[object WeakMap]",JRe="[object ArrayBuffer]",eNe="[object DataView]",tNe="[object Float32Array]",rNe="[object Float64Array]",nNe="[object Int8Array]",iNe="[object Int16Array]",aNe="[object Int32Array]",sNe="[object Uint8Array]",oNe="[object Uint8ClampedArray]",lNe="[object Uint16Array]",cNe="[object Uint32Array]",Rn={};Rn[Zte]=Rn[zRe]=Rn[JRe]=Rn[eNe]=Rn[VRe]=Rn[URe]=Rn[tNe]=Rn[rNe]=Rn[nNe]=Rn[iNe]=Rn[aNe]=Rn[qRe]=Rn[YRe]=Rn[ere]=Rn[XRe]=Rn[jRe]=Rn[KRe]=Rn[QRe]=Rn[sNe]=Rn[oNe]=Rn[lNe]=Rn[cNe]=!0;Rn[HRe]=Rn[Jte]=Rn[ZRe]=!1;o($w,"baseClone");Gw=$w});function hNe(t){return Gw(t,uNe)}var uNe,an,iR=N(()=>{"use strict";nR();uNe=4;o(hNe,"clone");an=hNe});function pNe(t){return Gw(t,fNe|dNe)}var fNe,dNe,aR,tre=N(()=>{"use strict";nR();fNe=1,dNe=4;o(pNe,"cloneDeep");aR=pNe});function mNe(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e{"use strict";o(mNe,"compact");Cc=mNe});function yNe(t){return this.__data__.set(t,gNe),this}var gNe,nre,ire=N(()=>{"use strict";gNe="__lodash_hash_undefined__";o(yNe,"setCacheAdd");nre=yNe});function vNe(t){return this.__data__.has(t)}var are,sre=N(()=>{"use strict";o(vNe,"setCacheHas");are=vNe});function zw(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Bd;++e{"use strict";fT();ire();sre();o(zw,"SetCache");zw.prototype.add=zw.prototype.push=nre;zw.prototype.has=are;Mm=zw});function xNe(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";o(xNe,"arraySome");Uw=xNe});function bNe(t,e){return t.has(e)}var Im,Hw=N(()=>{"use strict";o(bNe,"cacheHas");Im=bNe});function kNe(t,e,r,n,i,a){var s=r&TNe,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&wNe?new Mm:void 0;for(a.set(t,e),a.set(e,t);++d{"use strict";Vw();sR();Hw();TNe=1,wNe=2;o(kNe,"equalArrays");Ww=kNe});function ENe(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var ore,lre=N(()=>{"use strict";o(ENe,"mapToArray");ore=ENe});function SNe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Om,qw=N(()=>{"use strict";o(SNe,"setToArray");Om=SNe});function $Ne(t,e,r,n,i,a,s){switch(r){case FNe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case BNe:return!(t.byteLength!=e.byteLength||!a(new sm(t),new sm(e)));case _Ne:case DNe:case NNe:return Mo(+t,+e);case LNe:return t.name==e.name&&t.message==e.message;case MNe:case ONe:return t==e+"";case RNe:var l=ore;case INe:var u=n&CNe;if(l||(l=Om),t.size!=e.size&&!u)return!1;var h=s.get(t);if(h)return h==e;n|=ANe,s.set(t,e);var f=Ww(l(t),l(e),n,i,a,s);return s.delete(t),f;case PNe:if(lR)return lR.call(t)==lR.call(e)}return!1}var CNe,ANe,_Ne,DNe,LNe,RNe,NNe,MNe,INe,ONe,PNe,BNe,FNe,cre,lR,ure,hre=N(()=>{"use strict";Od();gL();Pd();oR();lre();qw();CNe=1,ANe=2,_Ne="[object Boolean]",DNe="[object Date]",LNe="[object Error]",RNe="[object Map]",NNe="[object Number]",MNe="[object RegExp]",INe="[object Set]",ONe="[object String]",PNe="[object Symbol]",BNe="[object ArrayBuffer]",FNe="[object DataView]",cre=Qi?Qi.prototype:void 0,lR=cre?cre.valueOf:void 0;o($Ne,"equalByTag");ure=$Ne});function UNe(t,e,r,n,i,a){var s=r&GNe,l=B2(t),u=l.length,h=B2(e),f=h.length;if(u!=f&&!s)return!1;for(var d=u;d--;){var p=l[d];if(!(s?p in e:VNe.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 x=s;++d{"use strict";eR();GNe=1,zNe=Object.prototype,VNe=zNe.hasOwnProperty;o(UNe,"equalObjects");fre=UNe});function qNe(t,e,r,n,i,a){var s=Pt(t),l=Pt(e),u=s?mre:lo(t),h=l?mre:lo(e);u=u==pre?Yw:u,h=h==pre?Yw:h;var f=u==Yw,d=h==Yw,p=u==h;if(p&&Dl(t)){if(!Dl(e))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new fc),s||Gh(t)?Ww(t,e,r,n,i,a):ure(t,e,u,r,n,i,a);if(!(r&HNe)){var m=f&&gre.call(t,"__wrapped__"),g=d&&gre.call(e,"__wrapped__");if(m||g){var y=m?t.value():t,x=g?e.value():e;return a||(a=new fc),i(y,x,r,n,a)}}return p?(a||(a=new fc),fre(t,e,r,n,i,a)):!1}var HNe,pre,mre,Yw,WNe,gre,yre,vre=N(()=>{"use strict";o2();oR();hre();dre();ep();Yn();fm();h2();HNe=1,pre="[object Arguments]",mre="[object Array]",Yw="[object Object]",WNe=Object.prototype,gre=WNe.hasOwnProperty;o(qNe,"baseIsEqualDeep");yre=qNe});function xre(t,e,r,n,i){return t===e?!0:t==null||e==null||!ai(t)&&!ai(e)?t!==t&&e!==e:yre(t,e,r,n,xre,i)}var Xw,cR=N(()=>{"use strict";vre();Io();o(xre,"baseIsEqual");Xw=xre});function jNe(t,e,r,n){var i=r.length,a=i,s=!n;if(t==null)return!a;for(t=Object(t);i--;){var l=r[i];if(s&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++i