/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;let s=lv(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=m7e(r[2],"()");if(s>-1){let u=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,u).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),KX(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(/\s+/g," "),a=r[i.toLowerCase()];if(!a){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return KX(n,a,n[0],this.lexer)}}emStrong(e,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let s=[...i[0]].length-1,l,u,h=s,f=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,r=r.slice(-1*e.length+s);(i=d.exec(r))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(u=[...l].length,i[3]||i[4]){h+=u;continue}else if((i[5]||i[6])&&s%3&&!((s+u)%3)){f+=u;continue}if(h-=u,h>0)continue;u=Math.min(u,u+h+f);let p=[...i[0]][0].length,m=e.slice(0,s+i.index+p+u);if(Math.min(s,u)%2){let y=m.slice(1,-1);return{type:"em",raw:m,text:y,tokens:this.lexer.inlineTokens(y)}}let g=m.slice(2,-2);return{type:"strong",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(/\n/g," "),i=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return i&&a&&(n=n.substring(1,n.length-1)),n=eo(n,!0),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=eo(r[1]),i="mailto:"+n):(n=eo(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let n,i;if(r[2]==="@")n=eo(r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=eo(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=eo(r[0]),{type:"text",raw:r[0],text:n}}}},y7e=/^(?: *(?:\n|$))+/,v7e=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,x7e=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,fv=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,b7e=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tj=/(?:[*+-]|\d{1,9}[.)])/,rj=fn(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,tj).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),h9=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,w7e=/^[^\n]+/,f9=/(?!\s*\])(?:\\.|[^\[\]\\])+/,T7e=fn(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",f9).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),k7e=fn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tj).getRegex(),w5="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",d9=/|$))/,E7e=fn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",d9).replace("tag",w5).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nj=fn(h9).replace("hr",fv).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w5).getRegex(),S7e=fn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nj).getRegex(),p9={blockquote:S7e,code:v7e,def:T7e,fences:x7e,heading:b7e,hr:fv,html:E7e,lheading:rj,list:k7e,newline:y7e,paragraph:nj,table:uv,text:w7e},QX=fn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",fv).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w5).getRegex(),C7e={...p9,table:QX,paragraph:fn(h9).replace("hr",fv).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",QX).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w5).getRegex()},A7e={...p9,html:fn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",d9).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:uv,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fn(h9).replace("hr",fv).replace("heading",` *#{1,6} *[^
+]`).replace("lheading",rj).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ij=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,_7e=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,aj=/^( {2,}|\\)\n(?!\s*$)/,L7e=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,R7e=fn(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,dv).getRegex(),M7e=fn("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,dv).getRegex(),I7e=fn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,dv).getRegex(),O7e=fn(/\\([punct])/,"gu").replace(/punct/g,dv).getRegex(),P7e=fn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),B7e=fn(d9).replace("(?:-->|$)","-->").getRegex(),F7e=fn("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",B7e).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),b5=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z7e=fn(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",b5).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),sj=fn(/^!?\[(label)\]\[(ref)\]/).replace("label",b5).replace("ref",f9).getRegex(),oj=fn(/^!?\[(ref)\](?:\[\])?/).replace("ref",f9).getRegex(),G7e=fn("reflink|nolink(?!\\()","g").replace("reflink",sj).replace("nolink",oj).getRegex(),m9={_backpedal:uv,anyPunctuation:O7e,autolink:P7e,blockSkip:N7e,br:aj,code:_7e,del:uv,emStrongLDelim:R7e,emStrongRDelimAst:M7e,emStrongRDelimUnd:I7e,escape:ij,link:z7e,nolink:oj,punctuation:D7e,reflink:sj,reflinkSearch:G7e,tag:F7e,text:L7e,url:uv},$7e={...m9,link:fn(/^!?\[(label)\]\((.*?)\)/).replace("label",b5).getRegex(),reflink:fn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",b5).getRegex()},l9={...m9,escape:fn(ij).replace("])","~|])").getRegex(),url:fn(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\u+" ".repeat(h.length));let i,a,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(i=l.call({lexer:this},e,r))?(e=e.substring(i.raw.length),r.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&r.length>0?r[r.length-1].raw+=`
+`:r.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`
+`+i.raw,a.text+=`
+`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`
+`+i.raw,a.text+=`
+`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startBlock){let l=1/0,u=e.slice(1),h;this.options.extensions.startBlock.forEach(f=>{h=f.call({lexer:this},u),typeof h=="number"&&h>=0&&(l=Math.min(l,h))}),l<1/0&&l>=0&&(s=e.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){a=r[r.length-1],n&&a?.type==="paragraph"?(a.raw+=`
+`+i.raw,a.text+=`
+`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i),n=s.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&a.type==="text"?(a.raw+=`
+`+i.raw,a.text+=`
+`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(e){let l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let n,i,a,s=e,l,u,h;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)f.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,l.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(u||(h=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(f=>(n=f.call({lexer:this},e,r))?(e=e.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(e,s,h)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),r.push(n);continue}if(a=e,this.options.extensions&&this.options.extensions.startInline){let f=1/0,d=e.slice(1),p;this.options.extensions.startInline.forEach(m=>{p=m.call({lexer:this},d),typeof p=="number"&&p>=0&&(f=Math.min(f,p))}),f<1/0&&f>=0&&(a=e.substring(0,f+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(h=n.raw.slice(-1)),u=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(e){let f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},im=class{static{o(this,"_Renderer")}options;parser;constructor(e){this.options=e||Ed}space(e){return""}code({text:e,lang:r,escaped:n}){let i=(r||"").match(/^\S*/)?.[0],a=e.replace(/\n$/,"")+`
+`;return i?''+(n?a:eo(a,!0))+`
+`:""+(n?a:eo(a,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}heading({tokens:e,depth:r}){return`${this.parser.parseInline(e)}
+`}hr(e){return`
+`}list(e){let r=e.ordered,n=e.start,i="";for(let l=0;l
+`+i+""+a+`>
+`}listitem(e){let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`${r}
+`}checkbox({checked:e}){return" '}paragraph({tokens:e}){return`${this.parser.parseInline(e)}
+`}table(e){let r="",n="";for(let a=0;a${i}`),`
+`}tablerow({text:e}){return`
+${e}
+`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`${n}>
+`}strong({tokens:e}){return`${this.parser.parseInline(e)} `}em({tokens:e}){return`${this.parser.parseInline(e)} `}codespan({text:e}){return`${e}
`}br(e){return" "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),a=XX(e);if(a===null)return i;e=a;let s='"+i+" ",s}image({href:e,title:r,text:n}){let i=XX(e);if(i===null)return n;e=i;let a=` ",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}},hv=class{static{o(this,"_TextRenderer")}strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Eu=class t{static{o(this,"_Parser")}options;renderer;textRenderer;constructor(e){this.options=e||Ed,this.options.renderer=this.options.renderer||new im,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new hv}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(e,r=!0){let n="";for(let i=0;i{let l=a[s].flat(1/0);n=n.concat(this.walkTokens(l,r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...l){let u=a.renderer.apply(this,l);return u===!1&&(u=s.apply(this,l)),u}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new im(this.defaults);for(let s in n.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let l=s,u=n.renderer[l];n.useNewRenderer||(u=this.#t(u,l,a));let h=a[l];a[l]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=h.apply(a,f)),d||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new nm(this.defaults);for(let s in n.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let l=s,u=n.tokenizer[l],h=a[l];a[l]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=h.apply(a,f)),d}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new rm;for(let s in n.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;let l=s,u=n.hooks[l],h=a[l];rm.passThroughHooks.has(s)?a[l]=f=>{if(this.defaults.async)return Promise.resolve(u.call(a,f)).then(p=>h.call(a,p));let d=u.call(a,f);return h.call(a,d)}:a[l]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=h.apply(a,f)),d}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(l){let u=[];return u.push(s.call(this,l)),a&&(u=u.concat(a.call(this,l))),u}}this.defaults={...this.defaults,...i}}),this}#t(e,r,n){switch(r){case"heading":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,n.parser.parseInline(i.tokens),i.depth,d7e(n.parser.parseInline(i.tokens,n.parser.textRenderer)))};case"code":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text,i.lang,!!i.escaped)};case"table":return function(i){if(!i.type||i.type!==r)return e.apply(this,arguments);let a="",s="";for(let u=0;u0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=g+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=g+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:g+" "}):m+=g+" "}m+=this.parser.parse(f.tokens,l),u+=this.listitem({type:"list_item",raw:m,text:m,task:p,checked:!!d,loose:l,tokens:f.tokens})}return e.call(this,u,a,s)};case"html":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text,i.block)};case"paragraph":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"escape":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)};case"link":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.href,i.title,this.parser.parseInline(i.tokens))};case"image":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.href,i.title,i.text)};case"strong":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"em":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"codespan":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)};case"del":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"text":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)}}return e}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return ku.lex(e,r??this.defaults)}parser(e,r){return Eu.parse(e,r??this.defaults)}#e(e,r){return(n,i)=>{let a={...i},s={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);let l=this.#r(!!s.silent,!!s.async);if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(u=>e(u,s)).then(u=>s.hooks?s.hooks.processAllTokens(u):u).then(u=>s.walkTokens?Promise.all(this.walkTokens(u,s.walkTokens)).then(()=>u):u).then(u=>r(u,s)).then(u=>s.hooks?s.hooks.postprocess(u):u).catch(l);try{s.hooks&&(n=s.hooks.preprocess(n));let u=e(n,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);let h=r(u,s);return s.hooks&&(h=s.hooks.postprocess(h)),h}catch(u){return l(u)}}}#r(e,r){return n=>{if(n.message+=`
+Please report this to https://github.com/markedjs/marked.`,e){let i="An error occurred:
"+eo(n.message+"",!0)+" ";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},kd=new c9;o(en,"marked");en.options=en.setOptions=function(t){return kd.setOptions(t),en.defaults=kd.defaults,ZX(en.defaults),en};en.getDefaults=u9;en.defaults=Ed;en.use=function(...t){return kd.use(...t),en.defaults=kd.defaults,ZX(en.defaults),en};en.walkTokens=function(t,e){return kd.walkTokens(t,e)};en.parseInline=kd.parseInline;en.Parser=Eu;en.parser=Eu.parse;en.Renderer=im;en.TextRenderer=hv;en.Lexer=ku;en.lexer=ku.lex;en.Tokenizer=nm;en.Hooks=rm;en.parse=en;u6t=en.options,h6t=en.setOptions,f6t=en.use,d6t=en.walkTokens,p6t=en.parseInline,m6t=Eu.parse,g6t=ku.lex});function U7e(t,{markdownAutoWrap:e}){let n=t.replace(/ /g,`
+`).replace(/\n{2,}/g,`
+`),i=Ib(n);return e===!1?i.replace(/ /g," "):i}function cj(t,e={}){let r=U7e(t,e),n=en.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}function uj(t,{markdownAutoWrap:e}={}){let r=en.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:`Unsupported markdown: ${i.type}`}return o(n,"output"),r.map(n).join("")}var hj=M(()=>{"use strict";lj();MS();o(U7e,"preprocessMarkdown");o(cj,"markdownToLines");o(uj,"markdownToHTML")});function H7e(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function W7e(t,e){let r=H7e(e.content);return fj(t,[],r,e.type)}function fj(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}])?fj(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function dj(t,e){if(t.some(({content:r})=>r.includes(`
+`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return g9(t,e)}function g9(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 g9(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[l,u]=W7e(e,a);r.push([l]),u.content&&t.unshift(u)}return g9(t,e,r)}var pj=M(()=>{"use strict";o(H7e,"splitTextToChars");o(W7e,"splitWordToFitWidth");o(fj,"splitWordToFitWidthRecursion");o(dj,"splitLineToFitWidth");o(g9,"splitLineToFitWidthRecursion")});function mj(t,e){e&&t.attr("style",e)}async function Y7e(t,e,r,n,i=!1){let a=t.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);let s=a.append("xhtml:div"),l=e.label;e.label&&pi(e.label)&&(l=await hh(e.label.replace(je.lineBreakRegex,`
+`),de()));let u=e.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),mj(h,e.labelStyle),h.attr("class",`${u} ${n}`),mj(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg");let f=s.node().getBoundingClientRect();return f.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),f=s.node().getBoundingClientRect()),a.node()}function y9(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 q7e(t,e,r){let n=t.append("text"),i=y9(n,1,e);v9(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function gj(t,e,r){let n=t.append("text"),i=y9(n,1,e);v9(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function X7e(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=>q7e(a,1.1,p)<=t,"checkWidth"),d=f(h)?[h]:dj(h,f);for(let p of d){let m=y9(l,u,1.1);v9(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 v9(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)})}function x9(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,e=>` `)}var Si,Dl=M(()=>{"use strict";Vt();fr();mr();ht();hj();hr();pj();o(mj,"applyStyle");o(Y7e,"addHtmlSpan");o(y9,"createTspan");o(q7e,"computeWidthOfText");o(gj,"computeDimensionOfText");o(X7e,"createFormattedText");o(v9,"updateTextContentAndStyles");o(x9,"replaceIconSubstring");Si=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(Y.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",u),a){let f=uj(e,h),d=x9(Ca(f)),p=e.replace(/\\\\/g,"\\"),m={isNode:s,label:pi(e)?p:d,labelStyle:r.replace("fill:","color:")};return await Y7e(t,m,l,i,u)}else{let f=e.replace(/ /g," "),d=cj(f.replace(" "," "),h),p=X7e(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 Wt(t){let e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}function zo(t,e,r,n,i,a){let s=[],u=r-t,h=n-e,f=u/a,d=2*Math.PI/f,p=e+h/2;for(let m=0;m<=50;m++){let g=m/50,y=t+g*u,v=p+i*Math.sin(d*(y-t));s.push({x:y,y:v})}return s}function k5(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";Dl();Vt();mr();hs();fr();hr();ot=o(async(t,e,r)=>{let n,i=e.useHtmlLabels||xr(de()?.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",Fn(e.labelStyle)),l;e.label===void 0?l="":l=typeof e.label=="string"?e.label:e.label[0];let u=await Si(s,Tr(Ca(l),de()),{useHtmlLabels:i,width:e.width||de().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(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=de().fontSize?de().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[_=ur.fontSize]=Fo(b),T=_*w+"px";y.style.minWidth=T,y.style.maxWidth=T}else y.style.width="100%";v(y)}o(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}return i?s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):s.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:h,halfPadding:f,label:s}},"labelHelper"),T5=o(async(t,e,r)=>{let n=r.useHtmlLabels||xr(de()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Si(i,Tr(Ca(e),de()),{useHtmlLabels:n,width:r.width||de()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),l=r.padding/2;if(xr(de()?.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"),Qe=o((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),lt=o((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");o(Wt,"createPathFromPoints");o(zo,"generateFullSineWavePoints");o(k5,"generateCirclePoints")});function j7e(t,e){return t.intersect(e)}var yj,vj=M(()=>{"use strict";o(j7e,"intersectNode");yj=j7e});function K7e(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(K7e,"intersectEllipse");E5=K7e});function Q7e(t,e,r){return E5(t,e,e,r)}var xj,bj=M(()=>{"use strict";b9();o(Q7e,"intersectCircle");xj=Q7e});function Z7e(t,e,r,n){var i,a,s,l,u,h,f,d,p,m,g,y,v,x,b;if(i=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,p=i*r.x+s*r.y+u,m=i*n.x+s*n.y+u,!(p!==0&&m!==0&&wj(p,m))&&(a=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=a*t.x+l*t.y+h,d=a*e.x+l*e.y+h,!(f!==0&&d!==0&&wj(f,d))&&(g=i*l-a*s,g!==0)))return y=Math.abs(g/2),v=s*h-l*u,x=v<0?(v-y)/g:(v+y)/g,v=a*u-i*h,b=v<0?(v-y)/g:(v+y)/g,{x,y:b}}function wj(t,e){return t*e>0}var Tj,kj=M(()=>{"use strict";o(Z7e,"intersectLine");o(wj,"sameSign");Tj=Z7e});function J7e(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(f){s=Math.min(s,f.x),l=Math.min(l,f.y)}):(s=Math.min(s,e.x),l=Math.min(l,e.y));let u=n-t.width/2-s,h=i-t.height/2-l;for(let f=0;f1&&a.sort(function(f,d){let p=f.x-r.x,m=f.y-r.y,g=Math.sqrt(p*p+m*m),y=d.x-r.x,v=d.y-r.y,x=Math.sqrt(y*y+v*v);return g{"use strict";kj();o(J7e,"intersectPolygon");Ej=J7e});var eAe,Oh,w9=M(()=>{"use strict";eAe=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"),Oh=eAe});var qe,qt=M(()=>{"use strict";vj();bj();b9();Sj();w9();qe={node:yj,circle:xj,ellipse:E5,polygon:Ej,rect:Oh}});var Cj,mc,tAe,et,Ze,Xt=M(()=>{"use strict";Vt();Cj=o(t=>{let{handDrawnSeed:e}=de();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),mc=o(t=>{let e=tAe([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),tAe=o(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),et=o(t=>{let{stylesArray:e}=mc(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let l=s[0];l==="color"||l==="font-size"||l==="font-family"||l==="font-weight"||l==="font-style"||l==="text-decoration"||l==="text-align"||l==="text-transform"||l==="line-height"||l==="letter-spacing"||l==="word-spacing"||l==="text-shadow"||l==="text-overflow"||l==="white-space"||l==="word-wrap"||l==="word-break"||l==="overflow-wrap"||l==="hyphens"?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"),Ze=o((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=de(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=mc(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]},e)},"userNodeOverrides")});function T9(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 rAe(t,e){return t[0]===e[0]&&t[1]===e[1]}function nAe(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)T9(h,l,i);let u=function(h,f,d){let p=[];for(let b of h){let w=[...b];rAe(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&p.push(w)}let m=[];f=Math.max(f,.1);let g=[];for(let b of p)for(let w=0;wb.yminw.ymin?1:b.xw.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!g.length)return m;let y=[],v=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let w=0;wv);w++)b=w;g.splice(0,b+1).forEach(w=>{y.push({s:v,edge:w})})}if(y=y.filter(b=>!(b.edge.ymax<=v)),y.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(d!==1||x%f==0)&&y.length>1)for(let b=0;b=y.length)break;let _=y[b].edge,T=y[w].edge;m.push([[Math.round(_.x),v],[Math.round(T.x),v]])}v+=d,y.forEach(b=>{b.edge.x=b.edge.x+d*b.edge.islope}),x++}return m}(s,a,n);if(i){for(let h of s)T9(h,l,-i);(function(h,f,d){let p=[];h.forEach(m=>p.push(...m)),T9(p,f,d)})(u,l,-i)}return u}function yv(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),nAe(t,i,n,a||1)}function M5(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 E9(t,e){return t.type===e}function F9(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:iAe,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:k9,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return l[l.length]={type:Aj,text:""},l}(t),n="BOD",i=0,a=r[i];for(;!E9(a,Aj);){let s=0,l=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return F9("M0,0"+t);i++,s=S5[a.text],n=a.text}else E9(a,k9)?s=S5[n]:(i++,s=S5[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 Pj(t){let e=[],r="",n=0,i=0,a=0,s=0,l=0,u=0;for(let{key:h,data:f}of t){switch(h){case"M":e.push({key:"M",data:[...f]}),[n,i]=f,[a,s]=f;break;case"C":e.push({key:"C",data:[...f]}),n=f[4],i=f[5],l=f[2],u=f[3];break;case"L":e.push({key:"L",data:[...f]}),[n,i]=f;break;case"H":n=f[0],e.push({key:"L",data:[n,i]});break;case"V":i=f[0],e.push({key:"L",data:[n,i]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=n+(n-l),p=i+(i-u)):(d=n,p=i),e.push({key:"C",data:[d,p,...f]}),l=f[0],u=f[1],n=f[2],i=f[3];break}case"T":{let[d,p]=f,m=0,g=0;r==="Q"||r==="T"?(m=n+(n-l),g=i+(i-u)):(m=n,g=i);let y=n+2*(m-n)/3,v=i+2*(g-i)/3,x=d+2*(m-d)/3,b=p+2*(g-p)/3;e.push({key:"C",data:[y,v,x,b,d,p]}),l=m,u=g,n=d,i=p;break}case"Q":{let[d,p,m,g]=f,y=n+2*(d-n)/3,v=i+2*(p-i)/3,x=m+2*(d-m)/3,b=g+2*(p-g)/3;e.push({key:"C",data:[y,v,x,b,m,g]}),l=d,u=p,n=m,i=g;break}case"A":{let d=Math.abs(f[0]),p=Math.abs(f[1]),m=f[2],g=f[3],y=f[4],v=f[5],x=f[6];d===0||p===0?(e.push({key:"C",data:[n,i,v,x,v,x]}),n=v,i=x):(n!==v||i!==x)&&(Bj(n,i,v,x,d,p,m,g,y).forEach(function(b){e.push({key:"C",data:b})}),n=v,i=x);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=h}return e}function pv(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Bj(t,e,r,n,i,a,s,l,u,h){let f=(d=s,Math.PI*d/180);var d;let p=[],m=0,g=0,y=0,v=0;if(h)[m,g,y,v]=h;else{[t,e]=pv(t,e,-f),[r,n]=pv(r,n,-f);let R=(t-r)/2,S=(e-n)/2,O=R*R/(i*i)+S*S/(a*a);O>1&&(O=Math.sqrt(O),i*=O,a*=O);let N=i*i,P=a*a,F=N*P-N*S*S-P*R*R,B=N*S*S+P*R*R,$=(l===u?-1:1)*Math.sqrt(Math.abs(F/B));y=$*i*S/a+(t+r)/2,v=$*-a*R/i+(e+n)/2,m=Math.asin(parseFloat(((e-v)/a).toFixed(9))),g=Math.asin(parseFloat(((n-v)/a).toFixed(9))),tg&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let x=g-m;if(Math.abs(x)>120*Math.PI/180){let R=g,S=r,O=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=Bj(r=y+i*Math.cos(g),n=v+a*Math.sin(g),S,O,i,a,s,0,u,[g,R,y,v])}x=g-m;let b=Math.cos(m),w=Math.sin(m),_=Math.cos(g),T=Math.sin(g),E=Math.tan(x/4),L=4/3*i*E,C=4/3*a*E,A=[t,e],I=[t+L*w,e-C*b],D=[r+L*T,n-C*_],k=[r,n];if(I[0]=2*A[0]-I[0],I[1]=2*A[1]-I[1],h)return[I,D,k].concat(p);{p=[I,D,k].concat(p);let R=[];for(let S=0;S2){let i=[];for(let a=0;a2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,v=Math.min(y/2,(g-m)/2),x=Mj(v,h,f,d,p,m,g,1,u);if(!u.disableMultiStroke){let b=Mj(v,h,f,d,p,m,g,1.5,u);x.push(...b)}return s&&(l?x.push(...Ph(h,f,h+d*Math.cos(m),f+p*Math.sin(m),u),...Ph(h,f,h+d*Math.cos(g),f+p*Math.sin(g),u)):x.push({op:"lineTo",data:[h,f]},{op:"lineTo",data:[h+d*Math.cos(m),f+p*Math.sin(m)]})),{type:"path",ops:x}}function Dj(t,e){let r=Pj(Oj(F9(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(...Ph(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(...oAe(u,h,f,d,p,m,a,e)),a=[p,m];break}case"Z":n.push(...Ph(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function S9(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]+nr(i,e),n[0][1]+nr(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*Gj(i),m=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;m=nr(m,i,h),g=nr(g,i,h);let y=[],v=o(()=>nr(d,i,h),"M"),x=o(()=>nr(f,i,h),"k"),b=i.preserveVertices;return a&&(s?y.push({op:"move",data:[t+(b?0:v()),e+(b?0:v())]}):y.push({op:"move",data:[t+(b?0:nr(f,i,h)),e+(b?0:nr(f,i,h))]})),s?y.push({op:"bcurveTo",data:[m+t+(r-t)*p+v(),g+e+(n-e)*p+v(),m+t+2*(r-t)*p+v(),g+e+2*(n-e)*p+v(),r+(b?0:v()),n+(b?0:v())]}):y.push({op:"bcurveTo",data:[m+t+(r-t)*p+x(),g+e+(n-e)*p+x(),m+t+2*(r-t)*p+x(),g+e+2*(n-e)*p+x(),r+(b?0:x()),n+(b?0:x())]}),y}function C5(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+nr(e,r),t[0][1]+nr(e,r)]),n.push([t[0][0]+nr(e,r),t[0][1]+nr(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=Sd(u,h,.5),m=Sd(h,f,.5),g=Sd(f,d,.5),y=Sd(p,m,.5),v=Sd(m,g,.5),x=Sd(y,v,.5);O9([u,p,y,x],0,r,i),O9([x,v,g,d],0,r,i)}var a,s;return i}function cAe(t,e){return R5(t,0,t.length,e)}function R5(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?(R5(t,e,h+1,n,a),R5(t,h,r,n,a)):(a.length||a.push(s),a.push(l)),a}function C9(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a0?R5(n,0,n.length,r):n}var gv,A9,_9,L9,D9,N9,ks,R9,iAe,k9,Aj,S5,aAe,to,sm,P9,A5,B9,Ke,jt=M(()=>{"use strict";o(T9,"t");o(rAe,"e");o(nAe,"s");o(yv,"n");gv=class{static{o(this,"o")}constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=yv(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(M5,"a");A9=class extends gv{static{o(this,"h")}fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=yv(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)M5([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)}}},_9=class extends gv{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}},L9=class{static{o(this,"i")}constructor(e){this.helper=e}fillPolygons(e,r){let n=yv(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=M5(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=M5(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=M5(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&&(L=0,C=2*Math.PI);let A=(C-L)/b.curveStepCount,I=[];for(let D=L;D<=C;D+=A)I.push([w+T*Math.cos(D),_+E*Math.sin(D)]);return I.push([w+T*Math.cos(C),_+E*Math.sin(C)]),I.push([w,_]),am([I],b)}(e,r,n,i,a,s,h));return h.stroke!==to&&f.push(d),this._d("arc",f,h)}curve(e,r){let n=this._o(r),i=[],a=_j(e,n);if(n.fill&&n.fill!==to)if(n.fillStyle==="solid"){let s=_j(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(...C9(Ij([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):s.push(...C9(Ij(h),10,(1+n.roughness)/2))}s.length&&i.push(am([s],n))}return n.stroke!==to&&i.push(a),this._d("curve",i,n)}polygon(e,r){let n=this._o(r),i=[],a=_5(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(S9([e],n)):i.push(am([e],n))),n.stroke!==to&&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!==to,s=n.stroke!==to,l=!!(n.simplification&&n.simplification<1),u=function(f,d,p){let m=Pj(Oj(F9(f))),g=[],y=[],v=[0,0],x=[],b=o(()=>{x.length>=4&&y.push(...C9(x,d)),x=[]},"i"),w=o(()=>{b(),y.length&&(g.push(y),y=[])},"c");for(let{key:T,data:E}of m)switch(T){case"M":w(),v=[E[0],E[1]],y.push(v);break;case"L":b(),y.push([E[0],E[1]]);break;case"C":if(!x.length){let L=y.length?y[y.length-1]:v;x.push([L[0],L[1]])}x.push([E[0],E[1]]),x.push([E[2],E[3]]),x.push([E[4],E[5]]);break;case"Z":b(),y.push([v[0],v[1]])}if(w(),!p)return g;let _=[];for(let T of g){let E=cAe(T,p);E.length&&_.push(E)}return _}(e,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=Dj(e,n);if(a)if(n.fillStyle==="solid")if(u.length===1){let f=Dj(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(S9(u,n));else i.push(am(u,n));return s&&(l?u.forEach(f=>{i.push(_5(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:to};break;case"fillPath":s={d:this.opsToPath(a),stroke:to,strokeWidth:0,fill:n.fill||to};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||to,strokeWidth:n,fill:to}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}},P9=class{static{o(this,"st")}constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new sm(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}},A5="http://www.w3.org/2000/svg",B9=class{static{o(this,"ot")}constructor(e,r){this.svg=e,this.gen=new sm(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(A5,"g"),s=e.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(A5,"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(A5,"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(A5,"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)}},Ke={canvas:o((t,e)=>new P9(t,e),"canvas"),svg:o((t,e)=>new B9(t,e),"svg"),generator:o(t=>new sm(t),"generator"),newSeed:o(()=>sm.newSeed(),"newSeed")}});function $j(t,e){let{labelStyles:r}=et(e);e.labelStyle=r;let n=lt(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=Ke.svg(a),h=Ze(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",Fn(l)),Qe(e,d),e.intersect=function(p){return Y.info("Circle intersect",e,s,p),qe.circle(e,s,p)},a}var Vj=M(()=>{"use strict";ht();Ft();qt();Xt();jt();hr();o($j,"anchor")});function Uj(t,e,r,n,i,a,s){let u=(t+r)/2,h=(e+n)/2,f=Math.atan2(n-e,r-t),d=(r-t)/2,p=(n-e)/2,m=d/i,g=p/a,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-y**2),x=u+v*a*Math.sin(f)*(s?-1:1),b=h-v*i*Math.cos(f)*(s?-1:1),w=Math.atan2((e-b)/a,(t-x)/i),T=Math.atan2((n-b)/a,(r-x)/i)-w;s&&T<0&&(T+=2*Math.PI),!s&&T>0&&(T-=2*Math.PI);let E=[];for(let L=0;L<20;L++){let C=L/19,A=w+C*T,I=x+i*Math.cos(A),D=b+a*Math.sin(A);E.push({x:I,y:D})}return E}async function Hj(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(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},...Uj(-s/2,-l/2,-s/2,l/2,h,u,!1),{x:s/2,y:l/2},...Uj(s/2,l/2,s/2,-l/2,h,u,!0)],p=Ke.svg(i),m=Ze(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=Wt(d),y=p.path(g,m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${h/2}, 0)`),Qe(e,v),e.intersect=function(x){return qe.polygon(e,d,x)},i}var Wj=M(()=>{"use strict";Ft();qt();Xt();jt();o(Uj,"generateArcPoints");o(Hj,"bowTieRect")});function Aa(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 Su=M(()=>{"use strict";o(Aa,"insertPolygonShape")});async function Yj(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(e)),s=a.height+e.padding,l=12,u=a.width+e.padding+l,h=0,f=u,d=-s,p=0,m=[{x:h+l,y:d},{x:f,y:d},{x:f,y:p},{x:h,y:p},{x:h,y:d+l},{x:h+l,y:d}],g,{cssStyles:y}=e;if(e.look==="handDrawn"){let v=Ke.svg(i),x=Ze(e,{}),b=Wt(m),w=v.path(b,x);g=i.insert(()=>w,":first-child").attr("transform",`translate(${-u/2}, ${s/2})`),y&&g.attr("style",y)}else g=Aa(i,u,s,m);return n&&g.attr("style",n),Qe(e,g),e.intersect=function(v){return qe.polygon(e,m,v)},i}var qj=M(()=>{"use strict";Ft();qt();Xt();jt();Su();Ft();o(Yj,"card")});function Xj(t,e){let{nodeStyles:r}=et(e);e.label="";let n=t.insert("g").attr("class",lt(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=Ke.svg(n),u=Ze(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=Wt(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 qe.polygon(e,s,p)},n}var jj=M(()=>{"use strict";qt();jt();Xt();Ft();o(Xj,"choice")});async function Kj(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await ot(t,e,lt(e)),l=a.width/2+s,u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Ke.svg(i),d=Ze(e,{}),p=f.circle(0,0,l*2,d);u=i.insert(()=>p,":first-child"),u.attr("class","basic label-container").attr("style",Fn(h))}else u=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0);return Qe(e,u),e.intersect=function(f){return Y.info("Circle intersect",e,l,f),qe.circle(e,l,f)},i}var Qj=M(()=>{"use strict";ht();Ft();qt();Xt();jt();hr();o(Kj,"circle")});function uAe(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 Zj(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",lt(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,l=Ke.svg(i),u=Ze(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,a*2,u),f=uAe(a),d=l.path(f,u),p=i.insert(()=>h,":first-child");return p.insert(()=>d),s&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",n),Qe(e,p),e.intersect=function(m){return Y.info("crossedCircle intersect",e,{radius:a,point:m}),qe.circle(e,a,m)},i}var Jj=M(()=>{"use strict";ht();Ft();Xt();jt();qt();o(uAe,"createLine");o(Zj,"crossedCircle")});function Bh(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;dw,":first-child").attr("stroke-opacity",0),_.insert(()=>x,":first-child"),_.attr("class","text"),f&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${h}, 0)`),s.attr("transform",`translate(${-l/2+h-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Qe(e,_),e.intersect=function(T){return qe.polygon(e,p,T)},i}var tK=M(()=>{"use strict";Ft();qt();Xt();jt();o(Bh,"generateCirclePoints");o(eK,"curlyBraceLeft")});function Fh(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;dw,":first-child").attr("stroke-opacity",0),_.insert(()=>x,":first-child"),_.attr("class","text"),f&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${-h}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Qe(e,_),e.intersect=function(T){return qe.polygon(e,p,T)},i}var nK=M(()=>{"use strict";Ft();qt();Xt();jt();o(Fh,"generateCirclePoints");o(rK,"curlyBraceRight")});function _a(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;dL,":first-child").attr("stroke-opacity",0),C.insert(()=>b,":first-child"),C.insert(()=>T,":first-child"),C.attr("class","text"),f&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${h-h/4}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Qe(e,C),e.intersect=function(A){return qe.polygon(e,m,A)},i}var aK=M(()=>{"use strict";Ft();qt();Xt();jt();o(_a,"generateCirclePoints");o(iK,"curlyBraces")});async function sK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(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=Ke.svg(i),m=Ze(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=u,y=h,v=g-f,x=y/4,b=[{x:v,y:0},{x,y:0},{x:0,y:y/2},{x,y},{x:v,y},...k5(-v,-y/2,f,50,270,90)],w=Wt(b),_=p.path(w,m),T=i.insert(()=>_,":first-child");return T.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),T.attr("transform",`translate(${-u/2}, ${-h/2})`),Qe(e,T),e.intersect=function(E){return qe.polygon(e,b,E)},i}var oK=M(()=>{"use strict";Ft();qt();Xt();jt();o(sK,"curvedTrapezoid")});async function lK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),g=fAe(0,0,l,f,u,h),y=dAe(0,h,l,f,u,h),v=m.path(g,Ze(e,{})),x=m.path(y,Ze(e,{fill:"none"}));d=i.insert(()=>x,":first-child"),d=i.insert(()=>v,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let m=hAe(0,0,l,f,u,h);d=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Fn(p)).attr("style",n)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Qe(e,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(m){let g=qe.rect(e,m),y=g.x-(e.x??0);if(u!=0&&(Math.abs(y)<(e.width??0)/2||Math.abs(y)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-h)){let v=h*h*(1-y*y/(u*u));v>0&&(v=Math.sqrt(v)),v=h-v,m.y-(e.y??0)>0&&(v=-v),g.y+=v}return g},i}var hAe,fAe,dAe,cK=M(()=>{"use strict";Ft();qt();Xt();jt();hr();hAe=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"),fAe=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"),dAe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");o(lK,"cylinder")});async function uK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),g=Ze(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:f,y:d+h},{x:-f,y:d+h},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+h}],v=m.polygon(y.map(b=>[b.x,b.y]),g),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),s.attr("transform",`translate(${f+(e.padding??0)/2-(a.x-(a.left??0))}, ${d+h+(e.padding??0)/2-(a.y-(a.top??0))})`),Qe(e,x),e.intersect=function(b){return qe.rect(e,b)},i}var hK=M(()=>{"use strict";Ft();qt();Xt();jt();o(uK,"dividedRectangle")});async function fK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await ot(t,e,lt(e)),u=a.width/2+s+5,h=a.width/2+s,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Ke.svg(i),m=Ze(e,{roughness:.2,strokeWidth:2.5}),g=Ze(e,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,m),v=p.circle(0,0,h*2,g);f=i.insert("g",":first-child"),f.attr("class",Fn(e.cssClasses)).attr("style",Fn(d)),f.node()?.appendChild(y),f.node()?.appendChild(v)}else{f=i.insert("g",":first-child");let p=f.insert("circle",":first-child"),m=f.insert("circle");f.attr("class","basic label-container").attr("style",n),p.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0)}return Qe(e,f),e.intersect=function(p){return Y.info("DoubleCircle intersect",e,u,p),qe.circle(e,u,p)},i}var dK=M(()=>{"use strict";ht();Ft();qt();Xt();jt();hr();o(fK,"doublecircle")});function pK(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=et(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",lt(e)).attr("id",e.domId??e.id),s=7,{cssStyles:l}=e,u=Ke.svg(a),{nodeBorder:h}=r,f=Ze(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(f.roughness=0);let d=u.circle(0,0,s*2,f),p=a.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",l),i&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Qe(e,p),e.intersect=function(m){return Y.info("filledCircle intersect",e,{radius:s,point:m}),qe.circle(e,s,m)},a}var mK=M(()=>{"use strict";jt();ht();qt();Xt();Ft();o(pK,"filledCircle")});async function gK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),m=Ze(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=Wt(f),y=p.path(g,m),v=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),e.width=l,e.height=u,Qe(e,v),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-u/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(x){return Y.info("Triangle intersect",e,f,x),qe.polygon(e,f,x)},i}var yK=M(()=>{"use strict";ht();Ft();qt();Xt();jt();Ft();o(gK,"flippedTriangle")});function vK(t,e,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:a}=et(e);e.label="";let s=t.insert("g").attr("class",lt(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=Ke.svg(s),m=Ze(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(f,d,u,h,m),y=s.insert(()=>g,":first-child");l&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",l),a&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Qe(e,y);let v=n?.padding??0;return e.width&&e.height&&(e.width+=v/2||0,e.height+=v/2||0),e.intersect=function(x){return qe.rect(e,x)},s}var xK=M(()=>{"use strict";jt();qt();Xt();Ft();o(vK,"forkJoin")});async function bK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let i=80,a=50,{shapeSvg:s,bbox:l}=await ot(t,e,lt(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=Ke.svg(s),m=Ze(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},...k5(-u/2+f,0,f,50,90,270),{x:u/2-f,y:h/2},{x:-u/2,y:h/2}],y=Wt(g),v=p.path(y,m),x=s.insert(()=>v,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),Qe(e,x),e.intersect=function(b){return Y.info("Pill intersect",e,{radius:f,point:b}),qe.polygon(e,g,b)},s}var wK=M(()=>{"use strict";ht();Ft();qt();Xt();jt();o(bK,"halfRoundedRectangle")});async function TK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(e)),s=4,l=a.height+e.padding,u=l/s,h=a.width+2*u+e.padding,f=[{x:u,y:0},{x:h-u,y:0},{x:h,y:-l/2},{x:h-u,y:-l},{x:u,y:-l},{x:0,y:-l/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=Ke.svg(i),g=Ze(e,{}),y=pAe(0,0,h,l,u),v=m.path(y,g);d=i.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${l/2})`),p&&d.attr("style",p)}else d=Aa(i,h,l,f);return n&&d.attr("style",n),e.width=h,e.height=l,Qe(e,d),e.intersect=function(m){return qe.polygon(e,f,m)},i}var pAe,kK=M(()=>{"use strict";Ft();qt();Xt();jt();Su();pAe=o((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");o(TK,"hexagon")});async function EK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.label="",e.labelStyle=r;let{shapeSvg:i}=await ot(t,e,lt(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:l}=e,u=Ke.svg(i),h=Ze(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=Wt(f),p=u.path(d,h),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container"),l&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),n&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-a/2}, ${-s/2})`),Qe(e,m),e.intersect=function(g){return Y.info("Pill intersect",e,{points:f}),qe.polygon(e,f,g)},i}var SK=M(()=>{"use strict";ht();Ft();qt();Xt();jt();o(EK,"hourglass")});async function CK(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=et(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 ot(t,e,"icon-shape default"),p=e.pos==="t",m=l,g=l,{nodeBorder:y}=r,{stylesMap:v}=mc(e),x=-g/2,b=-m/2,w=e.label?8:0,_=Ke.svg(h),T=Ze(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let E=_.rectangle(x,b,g,m,T),L=Math.max(g,f.width),C=m+f.height+w,A=_.rectangle(-L/2,-C/2,L,C,{...T,fill:"transparent",stroke:"none"}),I=h.insert(()=>E,":first-child"),D=h.insert(()=>A);if(e.icon){let k=h.append("g");k.html(`${await wo(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let R=k.node().getBBox(),S=R.width,O=R.height,N=R.x,P=R.y;k.attr("transform",`translate(${-S/2-N},${p?f.height/2+w/2-O/2-P:-f.height/2-w/2-O/2-P})`),k.attr("style",`color: ${v.get("stroke")??y};`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-C/2:C/2-f.height})`),I.attr("transform",`translate(0,${p?f.height/2+w/2:-f.height/2-w/2})`),Qe(e,D),e.intersect=function(k){if(Y.info("iconSquare intersect",e,k),!e.label)return qe.rect(e,k);let R=e.x??0,S=e.y??0,O=e.height??0,N=[];return p?N=[{x:R-f.width/2,y:S-O/2},{x:R+f.width/2,y:S-O/2},{x:R+f.width/2,y:S-O/2+f.height+w},{x:R+g/2,y:S-O/2+f.height+w},{x:R+g/2,y:S+O/2},{x:R-g/2,y:S+O/2},{x:R-g/2,y:S-O/2+f.height+w},{x:R-f.width/2,y:S-O/2+f.height+w}]:N=[{x:R-g/2,y:S-O/2},{x:R+g/2,y:S-O/2},{x:R+g/2,y:S-O/2+m},{x:R+f.width/2,y:S-O/2+m},{x:R+f.width/2/2,y:S+O/2},{x:R-f.width/2,y:S+O/2},{x:R-f.width/2,y:S-O/2+m},{x:R-g/2,y:S-O/2+m}],qe.polygon(e,N,k)},h}var AK=M(()=>{"use strict";jt();ht();Kc();qt();Xt();Ft();o(CK,"icon")});async function _K(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=et(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 ot(t,e,"icon-shape default"),p=20,m=e.label?8:0,g=e.pos==="t",{nodeBorder:y,mainBkg:v}=r,{stylesMap:x}=mc(e),b=Ke.svg(h),w=Ze(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let _=x.get("fill");w.stroke=_??v;let T=h.append("g");e.icon&&T.html(`${await wo(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let E=T.node().getBBox(),L=E.width,C=E.height,A=E.x,I=E.y,D=Math.max(L,C)*Math.SQRT2+p*2,k=b.circle(0,0,D,w),R=Math.max(D,f.width),S=D+f.height+m,O=b.rectangle(-R/2,-S/2,R,S,{...w,fill:"transparent",stroke:"none"}),N=h.insert(()=>k,":first-child"),P=h.insert(()=>O);return T.attr("transform",`translate(${-L/2-A},${g?f.height/2+m/2-C/2-I:-f.height/2-m/2-C/2-I})`),T.attr("style",`color: ${x.get("stroke")??y};`),d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-S/2:S/2-f.height})`),N.attr("transform",`translate(0,${g?f.height/2+m/2:-f.height/2-m/2})`),Qe(e,P),e.intersect=function(F){return Y.info("iconSquare intersect",e,F),qe.rect(e,F)},h}var LK=M(()=>{"use strict";jt();ht();Kc();qt();Xt();Ft();o(_K,"iconCircle")});var La,zh=M(()=>{"use strict";La=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 DK(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=et(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 ot(t,e,"icon-shape default"),m=e.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:b}=mc(e),w=-y/2,_=-g/2,T=e.label?8:0,E=Ke.svg(h),L=Ze(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");let C=b.get("fill");L.stroke=C??x;let A=E.path(La(w,_,y,g,5),L),I=Math.max(y,f.width),D=g+f.height+T,k=E.rectangle(-I/2,-D/2,I,D,{...L,fill:"transparent",stroke:"none"}),R=h.insert(()=>A,":first-child").attr("class","icon-shape2"),S=h.insert(()=>k);if(e.icon){let O=h.append("g");O.html(`${await wo(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let N=O.node().getBBox(),P=N.width,F=N.height,B=N.x,$=N.y;O.attr("transform",`translate(${-P/2-B},${m?f.height/2+T/2-F/2-$:-f.height/2-T/2-F/2-$})`),O.attr("style",`color: ${b.get("stroke")??v};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-D/2:D/2-f.height})`),R.attr("transform",`translate(0,${m?f.height/2+T/2:-f.height/2-T/2})`),Qe(e,S),e.intersect=function(O){if(Y.info("iconSquare intersect",e,O),!e.label)return qe.rect(e,O);let N=e.x??0,P=e.y??0,F=e.height??0,B=[];return m?B=[{x:N-f.width/2,y:P-F/2},{x:N+f.width/2,y:P-F/2},{x:N+f.width/2,y:P-F/2+f.height+T},{x:N+y/2,y:P-F/2+f.height+T},{x:N+y/2,y:P+F/2},{x:N-y/2,y:P+F/2},{x:N-y/2,y:P-F/2+f.height+T},{x:N-f.width/2,y:P-F/2+f.height+T}]:B=[{x:N-y/2,y:P-F/2},{x:N+y/2,y:P-F/2},{x:N+y/2,y:P-F/2+g},{x:N+f.width/2,y:P-F/2+g},{x:N+f.width/2/2,y:P+F/2},{x:N-f.width/2,y:P+F/2},{x:N-f.width/2,y:P-F/2+g},{x:N-y/2,y:P-F/2+g}],qe.polygon(e,B,O)},h}var NK=M(()=>{"use strict";jt();ht();Kc();qt();Xt();zh();Ft();o(DK,"iconRounded")});async function RK(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=et(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 ot(t,e,"icon-shape default"),m=e.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:b}=mc(e),w=-y/2,_=-g/2,T=e.label?8:0,E=Ke.svg(h),L=Ze(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");let C=b.get("fill");L.stroke=C??x;let A=E.path(La(w,_,y,g,.1),L),I=Math.max(y,f.width),D=g+f.height+T,k=E.rectangle(-I/2,-D/2,I,D,{...L,fill:"transparent",stroke:"none"}),R=h.insert(()=>A,":first-child"),S=h.insert(()=>k);if(e.icon){let O=h.append("g");O.html(`${await wo(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let N=O.node().getBBox(),P=N.width,F=N.height,B=N.x,$=N.y;O.attr("transform",`translate(${-P/2-B},${m?f.height/2+T/2-F/2-$:-f.height/2-T/2-F/2-$})`),O.attr("style",`color: ${b.get("stroke")??v};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-D/2:D/2-f.height})`),R.attr("transform",`translate(0,${m?f.height/2+T/2:-f.height/2-T/2})`),Qe(e,S),e.intersect=function(O){if(Y.info("iconSquare intersect",e,O),!e.label)return qe.rect(e,O);let N=e.x??0,P=e.y??0,F=e.height??0,B=[];return m?B=[{x:N-f.width/2,y:P-F/2},{x:N+f.width/2,y:P-F/2},{x:N+f.width/2,y:P-F/2+f.height+T},{x:N+y/2,y:P-F/2+f.height+T},{x:N+y/2,y:P+F/2},{x:N-y/2,y:P+F/2},{x:N-y/2,y:P-F/2+f.height+T},{x:N-f.width/2,y:P-F/2+f.height+T}]:B=[{x:N-y/2,y:P-F/2},{x:N+y/2,y:P-F/2},{x:N+y/2,y:P-F/2+g},{x:N+f.width/2,y:P-F/2+g},{x:N+f.width/2/2,y:P+F/2},{x:N-f.width/2,y:P+F/2},{x:N-f.width/2,y:P-F/2+g},{x:N-y/2,y:P-F/2+g}],qe.polygon(e,B,O)},h}var MK=M(()=>{"use strict";jt();ht();Kc();qt();zh();Xt();Ft();o(RK,"iconSquare")});async function IK(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}=et(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 ot(t,e,"image-shape default"),g=e.pos==="t",y=-h/2,v=-f/2,x=e.label?8:0,b=Ke.svg(d),w=Ze(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let _=b.rectangle(y,v,h,f,w),T=Math.max(h,p.width),E=f+p.height+x,L=b.rectangle(-T/2,-E/2,T,E,{...w,fill:"none",stroke:"none"}),C=d.insert(()=>_,":first-child"),A=d.insert(()=>L);if(e.img){let I=d.append("image");I.attr("href",e.img),I.attr("width",h),I.attr("height",f),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-h/2},${g?E/2-f:-E/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-f/2-p.height/2-x/2:f/2-p.height/2+x/2})`),C.attr("transform",`translate(0,${g?p.height/2+x/2:-p.height/2-x/2})`),Qe(e,A),e.intersect=function(I){if(Y.info("iconSquare intersect",e,I),!e.label)return qe.rect(e,I);let D=e.x??0,k=e.y??0,R=e.height??0,S=[];return g?S=[{x:D-p.width/2,y:k-R/2},{x:D+p.width/2,y:k-R/2},{x:D+p.width/2,y:k-R/2+p.height+x},{x:D+h/2,y:k-R/2+p.height+x},{x:D+h/2,y:k+R/2},{x:D-h/2,y:k+R/2},{x:D-h/2,y:k-R/2+p.height+x},{x:D-p.width/2,y:k-R/2+p.height+x}]:S=[{x:D-h/2,y:k-R/2},{x:D+h/2,y:k-R/2},{x:D+h/2,y:k-R/2+f},{x:D+p.width/2,y:k-R/2+f},{x:D+p.width/2/2,y:k+R/2},{x:D-p.width/2,y:k+R/2},{x:D-p.width/2,y:k-R/2+f},{x:D-h/2,y:k-R/2+f}],qe.polygon(e,S,I)},d}var OK=M(()=>{"use strict";jt();ht();qt();Xt();Ft();o(IK,"imageSquare")});async function PK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(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=Ke.svg(i),p=Ze(e,{}),m=Wt(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=Aa(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Qe(e,h),e.intersect=function(d){return qe.polygon(e,u,d)},i}var BK=M(()=>{"use strict";Ft();qt();Xt();jt();Su();o(PK,"inv_trapezoid")});async function Cd(t,e,r){let{labelStyles:n,nodeStyles:i}=et(e);e.labelStyle=n;let{shapeSvg:a,bbox:s}=await ot(t,e,lt(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=Ke.svg(a),v=Ze(e,{}),x=p||m?y.path(La(h,f,l,u,p||0),v):y.rectangle(h,f,l,u,v);d=a.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",Fn(g))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",i).attr("rx",Fn(p)).attr("ry",Fn(m)).attr("x",h).attr("y",f).attr("width",l).attr("height",u);return Qe(e,d),e.intersect=function(y){return qe.rect(e,y)},a}var vv=M(()=>{"use strict";Ft();qt();zh();Xt();jt();hr();o(Cd,"drawRect")});async function FK(t,e){let{shapeSvg:r,bbox:n,label:i}=await ot(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Qe(e,a),e.intersect=function(u){return qe.rect(e,u)},r}var zK=M(()=>{"use strict";vv();Ft();qt();o(FK,"labelRect")});async function GK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(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=Ke.svg(i),p=Ze(e,{}),m=Wt(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=Aa(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Qe(e,h),e.intersect=function(d){return qe.polygon(e,u,d)},i}var $K=M(()=>{"use strict";Ft();qt();Xt();jt();Su();o(GK,"lean_left")});async function VK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(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=Ke.svg(i),p=Ze(e,{}),m=Wt(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=Aa(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Qe(e,h),e.intersect=function(d){return qe.polygon(e,u,d)},i}var UK=M(()=>{"use strict";Ft();qt();Xt();jt();Su();o(VK,"lean_right")});function HK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",lt(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=Ke.svg(i),d=Ze(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=Wt(h),m=f.path(p,d),g=i.insert(()=>m,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${s/2},${-l})`),Qe(e,g),e.intersect=function(y){return Y.info("lightningBolt intersect",e,y),qe.polygon(e,h,y)},i}var WK=M(()=>{"use strict";ht();Ft();Xt();jt();qt();Ft();o(HK,"lightningBolt")});async function YK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),y=gAe(0,0,l,f,u,h,d),v=yAe(0,h,l,f,u,h),x=Ze(e,{}),b=g.path(y,x),w=g.path(v,x);i.insert(()=>w,":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=mAe(0,0,l,f,u,h,d);p=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Fn(m)).attr("style",n)}return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Qe(e,p),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+h-(a.y-(a.top??0))})`),e.intersect=function(g){let y=qe.rect(e,g),v=y.x-(e.x??0);if(u!=0&&(Math.abs(v)<(e.width??0)/2||Math.abs(v)==(e.width??0)/2&&Math.abs(y.y-(e.y??0))>(e.height??0)/2-h)){let x=h*h*(1-v*v/(u*u));x>0&&(x=Math.sqrt(x)),x=h-x,g.y-(e.y??0)>0&&(x=-x),y.y+=x}return y},i}var mAe,gAe,yAe,qK=M(()=>{"use strict";Ft();qt();Xt();jt();hr();mAe=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"),gAe=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"),yAe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");o(YK,"linedCylinder")});async function XK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),m=Ze(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},...zo(-l/2-l/2*.1,f/2,l/2+l/2*.1,f/2,h,.8),{x:l/2+l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:-f/2},{x:-l/2,y:-f/2},{x:-l/2,y:f/2*1.1},{x:-l/2,y:-f/2}],y=p.polygon(g.map(x=>[x.x,x.y]),m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)-h/2-(a.y-(a.top??0))})`),Qe(e,v),e.intersect=function(x){return qe.polygon(e,g,x)},i}var jK=M(()=>{"use strict";Ft();qt();jt();Xt();o(XK,"linedWaveEdgedRect")});async function KK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),g=Ze(e,{}),y=[{x:f-h,y:d+h},{x:f-h,y:d+u+h},{x:f+l-h,y:d+u+h},{x:f+l-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d+u-h},{x:f+l+h,y:d+u-h},{x:f+l+h,y:d-h},{x:f+h,y:d-h},{x:f+h,y:d},{x:f,y:d},{x:f,y:d+h}],v=[{x:f,y:d+h},{x:f+l-h,y:d+h},{x:f+l-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d},{x:f,y:d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=Wt(y),b=m.path(x,g),w=Wt(v),_=m.path(w,{...g,fill:"none"}),T=i.insert(()=>_,":first-child");return T.insert(()=>b,":first-child"),T.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-h-(a.x-(a.left??0))}, ${-(a.height/2)+h-(a.y-(a.top??0))})`),Qe(e,T),e.intersect=function(E){return qe.polygon(e,y,E)},i}var QK=M(()=>{"use strict";Ft();Xt();jt();qt();o(KK,"multiRect")});async function ZK(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=zo(d-m,p+f+m,d+l-m,p+f+m,h,.8),v=y?.[y.length-1],x=[{x:d-m,y:p+m},{x:d-m,y:p+f+m},...y,{x:d+l-m,y:v.y-m},{x:d+l,y:v.y-m},{x:d+l,y:v.y-2*m},{x:d+l+m,y:v.y-2*m},{x:d+l+m,y:p-m},{x:d+m,y:p-m},{x:d+m,y:p},{x:d,y:p},{x:d,y:p+m}],b=[{x:d,y:p+m},{x:d+l-m,y:p+m},{x:d+l-m,y:v.y-m},{x:d+l,y:v.y-m},{x:d+l,y:p},{x:d,y:p}],w=Ke.svg(i),_=Ze(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let T=Wt(x),E=w.path(T,_),L=Wt(b),C=w.path(L,_),A=i.insert(()=>E,":first-child");return A.insert(()=>C),A.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-(a.width/2)-m-(a.x-(a.left??0))}, ${-(a.height/2)+m-h/2-(a.y-(a.top??0))})`),Qe(e,A),e.intersect=function(I){return qe.polygon(e,x,I)},i}var JK=M(()=>{"use strict";Ft();qt();jt();Xt();o(ZK,"multiWaveEdgedRectangle")});async function eQ(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=et(e);e.labelStyle=n,e.useHtmlLabels||Sr().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:l}=await ot(t,e,lt(e)),u=Math.max(l.width+(e.padding??0)*2,e?.width??0),h=Math.max(l.height+(e.padding??0)*2,e?.height??0),f=-u/2,d=-h/2,{cssStyles:p}=e,m=Ke.svg(s),g=Ze(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=m.rectangle(f,d,u,h,g),v=s.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",i),Qe(e,v),e.intersect=function(x){return qe.rect(e,x)},s}var tQ=M(()=>{"use strict";jt();qt();Xt();Ft();Ua();o(eQ,"note")});async function rQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(e)),s=a.width+e.padding,l=a.height+e.padding,u=s+l,h=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Ke.svg(i),m=Ze(e,{}),g=vAe(0,0,u),y=p.path(g,m);f=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`),d&&f.attr("style",d)}else f=Aa(i,u,u,h);return n&&f.attr("style",n),Qe(e,f),e.intersect=function(p){return Y.debug(`APA12 Intersect called SPLIT
+point:`,p,`
+node:
+`,e,`
+res:`,qe.polygon(e,h,p)),qe.polygon(e,h,p)},i}var vAe,nQ=M(()=>{"use strict";ht();Ft();qt();Xt();jt();Su();vAe=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(rQ,"question")});async function iQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),y=Ze(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=Wt(p),x=g.path(v,y),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-d/2},0)`),s.attr("transform",`translate(${-d/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Qe(e,b),e.intersect=function(w){return qe.polygon(e,p,w)},i}var aQ=M(()=>{"use strict";Ft();qt();Xt();jt();o(iQ,"rect_left_inv_arrow")});function xAe(t,e){e&&t.attr("style",e)}async function bAe(t){let e=ze(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;t.label&&pi(t.label)&&(n=await hh(t.label.replace(je.lineBreakRegex,`
+`),de()));let i=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+" "),xAe(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 wAe,gc,I5=M(()=>{"use strict";mr();ht();Vt();fr();hr();o(xAe,"applyStyle");o(bAe,"addHtmlLabel");wAe=o(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),xr(de().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g," "),Y.info("vertexText"+i);let a={isNode:n,label:Ca(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>` `),labelStyle:e&&e.replace("fill:","color:")};return await bAe(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"),gc=wAe});async function sQ(t,e){let{labelStyles:r,nodeStyles:n}=et(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 gc(h,e.labelStyle,!0,!0)),d={width:0,height:0};if(xr(de()?.flowchart?.htmlLabels)){let C=f.children[0],A=ze(f);d=C.getBoundingClientRect(),A.attr("width",d.width),A.attr("height",d.height)}Y.info("Text 2",u);let p=u||[],m=f.getBBox(),g=l.node().appendChild(await gc(p.join?p.join(" "):p,e.labelStyle,!0,!0)),y=g.children[0],v=ze(g);d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height);let x=(e.padding||0)/2;ze(g).attr("transform","translate( "+(d.width>m.width?0:(m.width-d.width)/2)+", "+(m.height+x+5)+")"),ze(f).attr("transform","translate( "+(d.width(Y.debug("Rough node insert CXC",I),D),":first-child"),E=a.insert(()=>(Y.debug("Rough node insert CXC",I),I),":first-child")}else E=s.insert("rect",":first-child"),L=s.insert("line"),E.attr("class","outer title-state").attr("style",n).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),L.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+m.height+x).attr("y2",-d.height/2-x+m.height+x);return Qe(e,E),e.intersect=function(C){return qe.rect(e,C)},a}var oQ=M(()=>{"use strict";mr();fr();Ft();I5();qt();Xt();jt();Vt();zh();ht();o(sQ,"rectWithTitle")});async function lQ(t,e){let r={rx:5,ry:5,classes:"",labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return Cd(t,e,r)}var cQ=M(()=>{"use strict";vv();o(lQ,"roundedRect")});async function uQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),g=Ze(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:f,y:d},{x:f+u+8,y:d},{x:f+u+8,y:d+h},{x:f-8,y:d+h},{x:f-8,y:d},{x:f,y:d},{x:f,y:d+h}],v=m.polygon(y.map(b=>[b.x,b.y]),g),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container").attr("style",Fn(p)),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),s.attr("transform",`translate(${-u/2+4+(e.padding??0)-(a.x-(a.left??0))},${-h/2+(e.padding??0)-(a.y-(a.top??0))})`),Qe(e,x),e.intersect=function(b){return qe.rect(e,b)},i}var hQ=M(()=>{"use strict";Ft();qt();Xt();jt();hr();o(uQ,"shadedProcess")});async function fQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),m=Ze(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=Wt(g),v=p.path(y,m),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),x.attr("transform",`translate(0, ${u/4})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))}, ${-u/4+(e.padding??0)-(a.y-(a.top??0))})`),Qe(e,x),e.intersect=function(b){return qe.polygon(e,g,b)},i}var dQ=M(()=>{"use strict";Ft();qt();Xt();jt();o(fQ,"slopedRect")});async function pQ(t,e){let r={rx:0,ry:0,classes:"",labelPaddingX:(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return Cd(t,e,r)}var mQ=M(()=>{"use strict";vv();o(pQ,"squareRect")});async function gQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(e)),s=a.height+e.padding,l=a.width+s/4+e.padding,u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Ke.svg(i),d=Ze(e,{}),p=La(-l/2,-s/2,l,s,s/2),m=f.path(p,d);u=i.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",Fn(h))}else u=i.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-l/2).attr("y",-s/2).attr("width",l).attr("height",s);return Qe(e,u),e.intersect=function(f){return qe.rect(e,f)},i}var yQ=M(()=>{"use strict";Ft();qt();Xt();jt();zh();hr();o(gQ,"stadium")});async function vQ(t,e){return Cd(t,e,{rx:5,ry:5,classes:"flowchart-node"})}var xQ=M(()=>{"use strict";vv();o(vQ,"state")});function bQ(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=et(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=Ke.svg(h),d=Ze(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=f.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),m=l??u,g=f.circle(0,0,5,{...d,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),y=h.insert(()=>p,":first-child");return y.insert(()=>g),a&&y.selectAll("path").attr("style",a),i&&y.selectAll("path").attr("style",i),Qe(e,y),e.intersect=function(v){return qe.circle(e,7,v)},h}var wQ=M(()=>{"use strict";jt();qt();Xt();Ft();o(bQ,"stateEnd")});function TQ(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=Ke.svg(i).circle(0,0,14,Cj(n));a=i.insert(()=>l),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Qe(e,a),e.intersect=function(s){return qe.circle(e,7,s)},i}var kQ=M(()=>{"use strict";jt();qt();Xt();Ft();o(TQ,"stateStart")});async function EQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(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=Ke.svg(i),m=Ze(e,{}),g=p.rectangle(h-8,f,l+16,u,m),y=p.line(h,f,h,f+u,m),v=p.line(h+l,f,h+l,f+u,m);i.insert(()=>y,":first-child"),i.insert(()=>v,":first-child");let x=i.insert(()=>g,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",Fn(b)),Qe(e,x)}else{let p=Aa(i,l,u,d);n&&p.attr("style",n),Qe(e,p)}return e.intersect=function(p){return qe.polygon(e,d,p)},i}var SQ=M(()=>{"use strict";Ft();qt();Xt();jt();Su();hr();o(EQ,"subroutine")});async function CQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(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=Ke.svg(i),g=Ze(e,{}),y=[{x:u-f/2,y:h},{x:u+s+f/2,y:h},{x:u+s+f/2,y:h+l},{x:u-f/2,y:h+l}],v=[{x:u+s-f/2,y:h+l},{x:u+s+f/2,y:h+l},{x:u+s+f/2,y:h+l-d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=Wt(y),b=m.path(x,g),w=Wt(v),_=m.path(w,{...g,fillStyle:"solid"}),T=i.insert(()=>_,":first-child");return T.insert(()=>b,":first-child"),T.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),Qe(e,T),e.intersect=function(E){return qe.polygon(e,y,E)},i}var AQ=M(()=>{"use strict";Ft();Xt();jt();qt();o(CQ,"taggedRect")});async function _Q(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),y=Ze(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=[{x:-l/2-l/2*.1,y:p/2},...zo(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,h,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],x=-l/2+l/2*.1,b=-p/2-d*.4,w=[{x:x+l-f,y:(b+u)*1.4},{x:x+l,y:b+u-d},{x:x+l,y:(b+u)*.9},...zo(x+l,(b+u)*1.3,x+l-f,(b+u)*1.5,-u*.03,.5)],_=Wt(v),T=g.path(_,y),E=Wt(w),L=g.path(E,{...y,fillStyle:"solid"}),C=i.insert(()=>L,":first-child");return C.insert(()=>T,":first-child"),C.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-h/2-(a.y-(a.top??0))})`),Qe(e,C),e.intersect=function(A){return qe.polygon(e,v,A)},i}var LQ=M(()=>{"use strict";Ft();qt();jt();Xt();o(_Q,"taggedWaveEdgedRectangle")});async function DQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(e)),s=Math.max(a.width+e.padding,e?.width||0),l=Math.max(a.height+e.padding,e?.height||0),u=-s/2,h=-l/2,f=i.insert("rect",":first-child");return f.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",s).attr("height",l),Qe(e,f),e.intersect=function(d){return qe.rect(e,d)},i}var NQ=M(()=>{"use strict";Ft();qt();Xt();o(DQ,"text")});async function RQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s,halfPadding:l}=await ot(t,e,lt(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=Ke.svg(i),v=kAe(0,0,p,h,d,f),x=EAe(0,0,p,h,d,f),b=y.path(v,Ze(e,{})),w=y.path(x,Ze(e,{fill:"none"}));g=i.insert(()=>w,":first-child"),g=i.insert(()=>b,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{let y=TAe(0,0,p,h,d,f);g=i.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",Fn(m)).attr("style",n),g.attr("class","basic label-container"),m&&g.selectAll("path").attr("style",m),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-p/2}, ${h/2} )`),s.attr("transform",`translate(${-(a.width/2)-d-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Qe(e,g),e.intersect=function(y){let v=qe.rect(e,y),x=v.y-(e.y??0);if(f!=0&&(Math.abs(x)<(e.height??0)/2||Math.abs(x)==(e.height??0)/2&&Math.abs(v.x-(e.x??0))>(e.width??0)/2-d)){let b=d*d*(1-x*x/(f*f));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,y.x-(e.x??0)>0&&(b=-b),v.x+=b}return v},i}var TAe,kAe,EAe,MQ=M(()=>{"use strict";Ft();Xt();jt();qt();hr();TAe=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"),kAe=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"),EAe=o((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");o(RQ,"tiltedCylinder")});async function IQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(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=Ke.svg(i),p=Ze(e,{}),m=Wt(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=Aa(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Qe(e,h),e.intersect=function(d){return qe.polygon(e,u,d)},i}var OQ=M(()=>{"use strict";Ft();qt();Xt();jt();Su();o(IQ,"trapezoid")});async function PQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(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=Ke.svg(i),p=Ze(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=Wt(m),y=d.path(g,p),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),Qe(e,v),e.intersect=function(x){return qe.polygon(e,m,x)},i}var BQ=M(()=>{"use strict";Ft();qt();Xt();jt();o(PQ,"trapezoidalPentagon")});async function FQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(e)),l=xr(de().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=Ke.svg(i),g=Ze(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=Wt(d),v=m.path(y,g),x=i.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return p&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",p),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),e.width=u,e.height=h,Qe(e,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${h/2-(a.height+(e.padding??0)/(l?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(b){return Y.info("Triangle intersect",e,d,b),qe.polygon(e,d,b)},i}var zQ=M(()=>{"use strict";ht();Ft();qt();Xt();jt();Ft();fr();Vt();o(FQ,"triangle")});async function GQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),v=Ze(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let x=[{x:-l/2-g,y:f/2},...zo(-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=Wt(x),w=y.path(b,v),_=i.insert(()=>w,":first-child");return _.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-h-(a.y-(a.top??0))})`),Qe(e,_),e.intersect=function(T){return qe.polygon(e,x,T)},i}var $Q=M(()=>{"use strict";Ft();qt();jt();Xt();o(GQ,"waveEdgedRectangle")});async function VQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ot(t,e,lt(e)),s=100,l=50,u=Math.max(a.width+(e.padding??0)*2,e?.width??0),h=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=u/h,d=u,p=h;d>p*f?p=d/f:d=p*f,d=Math.max(d,s),p=Math.max(p,l);let m=Math.min(p*.2,p/4),g=p+m*2,{cssStyles:y}=e,v=Ke.svg(i),x=Ze(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-d/2,y:g/2},...zo(-d/2,g/2,d/2,g/2,m,1),{x:d/2,y:-g/2},...zo(d/2,-g/2,-d/2,-g/2,m,-1)],w=Wt(b),_=v.path(w,x),T=i.insert(()=>_,":first-child");return T.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),Qe(e,T),e.intersect=function(E){return qe.polygon(e,b,E)},i}var UQ=M(()=>{"use strict";Ft();qt();Xt();jt();o(VQ,"waveRectangle")});async function HQ(t,e){let{labelStyles:r,nodeStyles:n}=et(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ot(t,e,lt(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=Ke.svg(i),g=Ze(e,{}),y=[{x:f-h,y:d-h},{x:f-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d-h}],v=`M${f-h},${d-h} L${f+l},${d-h} L${f+l},${d+u} L${f-h},${d+u} L${f-h},${d-h}
+ M${f-h},${d} L${f+l},${d}
+ M${f},${d-h} L${f},${d+u}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=m.path(v,g),b=i.insert(()=>x,":first-child");return b.attr("transform",`translate(${h/2}, ${h/2})`),b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+h/2-(a.x-(a.left??0))}, ${-(a.height/2)+h/2-(a.y-(a.top??0))})`),Qe(e,b),e.intersect=function(w){return qe.polygon(e,y,w)},i}var WQ=M(()=>{"use strict";Ft();Xt();jt();qt();o(HQ,"windowPane")});async function YQ(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",lt(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 O5(l,{text:`\xAB${b}\xBB`},0),d=l.node().getBBox().height}u=s.insert("g").attr("class","label-group text"),await O5(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 w=await O5(h,b,y,[b.parseClassifier()]);y+=w+a}m=h.node().getBBox().height,m<=0&&(m=i/2),f=s.insert("g").attr("class","methods-group text");let v=0;for(let b of e.methods){let w=await O5(f,b,v,[b.parseClassifier()]);v+=w+a}let x=s.node().getBBox();if(l!==null){let b=l.node().getBBox();l.attr("transform",`translate(${-b.width/2})`)}return u.attr("transform",`translate(${-g.width/2}, ${d})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+i*2})`),x=s.node().getBBox(),f.attr("transform",`translate(0, ${d+p+(m?m+i*4:i*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}async function O5(t,e,r,n=[]){let i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=Sr(),s="useHtmlLabels"in e?e.useHtmlLabels:xr(a.htmlLabels)??!0,l="";"text"in e?l=e.text:l=e.label,!s&&l.startsWith("\\")&&(l=l.substring(1)),pi(l)&&(s=!0);let u=await Si(i,i7(Ca(l)),{width:Js(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(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,_=parseInt(b,10)*5+"px";y.style.minWidth=_,y.style.maxWidth=_}else y.style.width="100%";v(y)}o(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{n.includes("font-weight: bolder")&&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 qQ=M(()=>{"use strict";mr();Ua();Ft();hr();Vt();Dl();fr();o(YQ,"textHelper");o(O5,"addText")});async function XQ(t,e){let r=de(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??xr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:l,bbox:u}=await YQ(t,e,r,a,i),{labelStyles:h,nodeStyles:f}=et(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=Ke.svg(l),g=Ze(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=u.width,v=u.height;s.members.length===0&&s.methods.length===0?v+=i:s.members.length>0&&s.methods.length===0&&(v+=i*2);let x=-y/2,b=-v/2,w=m.rectangle(x-n,b-n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0),y+2*n,v+2*n+(p?n*2:s.members.length===0&&s.methods.length===0?-n:0),g),_=l.insert(()=>w,":first-child");_.attr("class","basic label-container");let T=_.node().getBBox();l.selectAll(".text").each((A,I,D)=>{let k=ze(D[I]),R=k.attr("transform"),S=0;if(R){let F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);F&&(S=parseFloat(F[2]))}let O=S+b+n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(O-=4);let N=x;(k.attr("class").includes("label-group")||k.attr("class").includes("annotation-group"))&&(N=-k.node()?.getBBox().width/2||0,l.selectAll("text").each(function(P,F,B){window.getComputedStyle(B[F]).textAnchor==="middle"&&(N=0)})),k.attr("transform",`translate(${N}, ${O})`)});let E=l.select(".annotation-group").node().getBBox().height-(p?n/2:0)||0,L=l.select(".label-group").node().getBBox().height-(p?n/2:0)||0,C=l.select(".members-group").node().getBBox().height-(p?n/2:0)||0;if(s.members.length>0||s.methods.length>0||p){let A=m.line(T.x,E+L+b+n,T.x+T.width,E+L+b+n,g);l.insert(()=>A).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){let A=m.line(T.x,E+L+C+b+i*2+n,T.x+T.width,E+L+C+b+n+i*2,g);l.insert(()=>A).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&l.selectAll("path").attr("style",d),_.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 A=RegExp(/color\s*:\s*([^;]*)/),I=A.exec(d);if(I){let D=I[0].replace("color","fill");l.selectAll("tspan").attr("style",D)}else if(h){let D=A.exec(h);if(D){let k=D[0].replace("color","fill");l.selectAll("tspan").attr("style",k)}}}return Qe(e,_),e.intersect=function(A){return qe.rect(e,A)},l}var jQ=M(()=>{"use strict";Ft();Vt();mr();jt();Xt();qt();qQ();fr();o(XQ,"classBox")});async function KQ(t,e,{config:r}){let{labelStyles:n,nodeStyles:i}=et(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:l,bbox:u,label:h}=await ot(t,e,lt(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 T5(p,"ticket"in e&&e.ticket||"",m):{label:g,bbox:y}=await T5(l,"ticket"in e&&e.ticket||"",m);let{label:v,bbox:x}=await T5(l,"assigned"in e&&e.assigned||"",m);e.width=s;let b=10,w=e?.width||0,_=Math.max(y.height,x.height)/2,T=Math.max(u.height+b*2,e?.height||0)+_,E=-w/2,L=-T/2;h.attr("transform","translate("+(f-w/2)+", "+(-_-u.height/2)+")"),g.attr("transform","translate("+(f-w/2)+", "+(-_+u.height/2)+")"),v.attr("transform","translate("+(f+w/2-x.width-2*a)+", "+(-_+u.height/2)+")");let C,{rx:A,ry:I}=e,{cssStyles:D}=e;if(e.look==="handDrawn"){let k=Ke.svg(l),R=Ze(e,{}),S=A||I?k.path(La(E,L,w,T,A||0),R):k.rectangle(E,L,w,T,R);C=l.insert(()=>S,":first-child"),C.attr("class","basic label-container").attr("style",D||null)}else{C=l.insert("rect",":first-child"),C.attr("class","basic label-container __APA__").attr("style",i).attr("rx",A??5).attr("ry",I??5).attr("x",E).attr("y",L).attr("width",w).attr("height",T);let k="priority"in e&&e.priority;if(k){let R=l.append("line"),S=E+2,O=L+Math.floor((A??0)/2),N=L+T-Math.floor((A??0)/2);R.attr("x1",S).attr("y1",O).attr("x2",S).attr("y2",N).attr("stroke-width","4").attr("stroke",SAe(k))}}return Qe(e,C),e.height=T,e.intersect=function(k){return qe.rect(e,k)},l}var SAe,QQ=M(()=>{"use strict";Ft();qt();zh();Xt();jt();SAe=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(KQ,"kanbanItem")});function ZQ(t){return t in z9}var CAe,AAe,z9,G9=M(()=>{"use strict";Vj();Wj();qj();jj();Qj();Jj();tK();nK();aK();oK();cK();hK();dK();mK();yK();xK();wK();kK();SK();AK();LK();NK();MK();OK();BK();zK();$K();UK();WK();qK();jK();QK();JK();tQ();nQ();aQ();oQ();cQ();hQ();dQ();mQ();yQ();xQ();wQ();kQ();SQ();AQ();LQ();NQ();MQ();OQ();BQ();zQ();$Q();UQ();WQ();jQ();QQ();CAe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:pQ},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:lQ},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:gQ},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:EQ},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:lK},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Kj},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:rQ},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:TK},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:VK},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:GK},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:IQ},{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:PK},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:fK},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:DQ},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Yj},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:uQ},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:TQ},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:bQ},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:vK},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:EK},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:eK},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:rK},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:iK},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:HK},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:GQ},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:bK},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:RQ},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:YK},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:sK},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:uK},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:FQ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:HQ},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:pK},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:PQ},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:gK},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:fQ},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:ZK},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:KK},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Hj},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Zj},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:_Q},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:CQ},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:VQ},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:iQ},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:XK}],AAe=o(()=>{let e=[...Object.entries({state:vQ,choice:Xj,note:eQ,rectWithTitle:sQ,labelRect:FK,iconSquare:RK,iconCircle:_K,icon:CK,iconRounded:DK,imageSquare:IK,anchor:$j,kanbanItem:KQ,classBox:XQ}),...CAe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),z9=AAe();o(ZQ,"isValidShape")});function pZ(t){return typeof t>"u"||t===null}function _Ae(t){return typeof t=="object"&&t!==null}function LAe(t){return Array.isArray(t)?t:pZ(t)?[]:[t]}function DAe(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;rl&&(a=" ... ",e=n-l+a.length),r-n>l&&(s=" ...",r=n+l-s.length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+s,pos:n-e+a.length}}function V9(t,e){return Pi.repeat(" ",e-t.length)+t}function zAe(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],a,s=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var l="",u,h,f=Math.min(t.line+e.linesAfter,i.length).toString().length,d=e.maxLength-(e.indent+f+3);for(u=1;u<=e.linesBefore&&!(s-u<0);u++)h=$9(t.buffer,n[s-u],i[s-u],t.position-(n[s]-n[s-u]),d),l=Pi.repeat(" ",e.indent)+V9((t.line-u+1).toString(),f)+" | "+h.str+`
+`+l;for(h=$9(t.buffer,n[s],i[s],t.position,d),l+=Pi.repeat(" ",e.indent)+V9((t.line+1).toString(),f)+" | "+h.str+`
+`,l+=Pi.repeat("-",e.indent+f+3+h.pos)+`^
+`,u=1;u<=e.linesAfter&&!(s+u>=i.length);u++)h=$9(t.buffer,n[s+u],i[s+u],t.position-(n[s]-n[s+u]),d),l+=Pi.repeat(" ",e.indent)+V9((t.line+u+1).toString(),f)+" | "+h.str+`
+`;return l.replace(/\n$/,"")}function UAe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function HAe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if($Ae.indexOf(r)===-1)throw new Es('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=UAe(e.styleAliases||null),VAe.indexOf(this.kind)===-1)throw new Es('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function JQ(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=s)}),r[i]=n}),r}function WAe(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(o(n,"collectType"),e=0,r=arguments.length;e=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}function g8e(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Pi.isNegativeZero(t))return"-0.0";return r=t.toString(10),m8e.test(r)?r.replace("e",".e"):r}function y8e(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Pi.isNegativeZero(t))}function b8e(t){return t===null?!1:yZ.exec(t)!==null||vZ.exec(t)!==null}function w8e(t){var e,r,n,i,a,s,l,u=0,h=null,f,d,p;if(e=yZ.exec(t),e===null&&(e=vZ.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],l=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(f=+e[10],d=+(e[11]||0),h=(f*60+d)*6e4,e[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,n,i,a,s,l,u)),h&&p.setTime(p.getTime()-h),p}function T8e(t){return t.toISOString()}function E8e(t){return t==="<<"||t===null}function C8e(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=j9;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}function A8e(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=j9,s=0,l=[];for(e=0;e>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):r===18?(l.push(s>>10&255),l.push(s>>2&255)):r===12&&l.push(s>>4&255),new Uint8Array(l)}function _8e(t){var e="",r=0,n,i,a=t.length,s=j9;for(n=0;n>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):i===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):i===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}function L8e(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function M8e(t){if(t===null)return!0;var e=[],r,n,i,a,s,l=t;for(r=0,n=l.length;r>10)+55296,(t-65536&1023)+56320)}function Z8e(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||xZ,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function CZ(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=GAe(r),new Es(e,r)}function Qt(t,e){throw CZ(t,e)}function F5(t,e){t.onWarning&&t.onWarning.call(null,CZ(t,e))}function Gh(t,e,r,n){var i,a,s,l;if(e1&&(t.result+=Pi.repeat(`
+`,e-1))}function J8e(t,e,r){var n,i,a,s,l,u,h,f,d=t.kind,p=t.result,m;if(m=t.input.charCodeAt(t.position),Ss(m)||lm(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=t.input.charCodeAt(t.position+1),Ss(i)||r&&lm(i)))return!1;for(t.kind="scalar",t.result="",a=s=t.position,l=!1;m!==0;){if(m===58){if(i=t.input.charCodeAt(t.position+1),Ss(i)||r&&lm(i))break}else if(m===35){if(n=t.input.charCodeAt(t.position-1),Ss(n))break}else{if(t.position===t.lineStart&&$5(t)||r&&lm(m))break;if(yc(m))if(u=t.line,h=t.lineStart,f=t.lineIndent,Ci(t,!1,-1),t.lineIndent>=e){l=!0,m=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=u,t.lineStart=h,t.lineIndent=f;break}}l&&(Gh(t,a,s,!1),Q9(t,t.line-u),a=s=t.position,l=!1),_d(m)||(s=t.position+1),m=t.input.charCodeAt(++t.position)}return Gh(t,a,s,!1),t.result?!0:(t.kind=d,t.result=p,!1)}function e_e(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Gh(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else yc(r)?(Gh(t,n,i,!0),Q9(t,Ci(t,!1,e)),n=i=t.position):t.position===t.lineStart&&$5(t)?Qt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Qt(t,"unexpected end of the stream within a single quoted scalar")}function t_e(t,e){var r,n,i,a,s,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return Gh(t,r,t.position,!0),t.position++,!0;if(l===92){if(Gh(t,r,t.position,!0),l=t.input.charCodeAt(++t.position),yc(l))Ci(t,!1,e);else if(l<256&&EZ[l])t.result+=SZ[l],t.position++;else if((s=j8e(l))>0){for(i=s,a=0;i>0;i--)l=t.input.charCodeAt(++t.position),(s=X8e(l))>=0?a=(a<<4)+s:Qt(t,"expected hexadecimal character");t.result+=Q8e(a),t.position++}else Qt(t,"unknown escape sequence");r=n=t.position}else yc(l)?(Gh(t,r,n,!0),Q9(t,Ci(t,!1,e)),r=n=t.position):t.position===t.lineStart&&$5(t)?Qt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Qt(t,"unexpected end of the stream within a double quoted scalar")}function r_e(t,e){var r=!0,n,i,a,s=t.tag,l,u=t.anchor,h,f,d,p,m,g=Object.create(null),y,v,x,b;if(b=t.input.charCodeAt(t.position),b===91)f=93,m=!1,l=[];else if(b===123)f=125,m=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),b=t.input.charCodeAt(++t.position);b!==0;){if(Ci(t,!0,e),b=t.input.charCodeAt(t.position),b===f)return t.position++,t.tag=s,t.anchor=u,t.kind=m?"mapping":"sequence",t.result=l,!0;r?b===44&&Qt(t,"expected the node content, but found ','"):Qt(t,"missed comma between flow collection entries"),v=y=x=null,d=p=!1,b===63&&(h=t.input.charCodeAt(t.position+1),Ss(h)&&(d=p=!0,t.position++,Ci(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,um(t,e,P5,!1,!0),v=t.tag,y=t.result,Ci(t,!0,e),b=t.input.charCodeAt(t.position),(p||t.line===n)&&b===58&&(d=!0,b=t.input.charCodeAt(++t.position),Ci(t,!0,e),um(t,e,P5,!1,!0),x=t.result),m?cm(t,l,g,v,y,x,n,i,a):d?l.push(cm(t,null,g,v,y,x,n,i,a)):l.push(y),Ci(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}Qt(t,"unexpected end of the stream within a flow collection")}function n_e(t,e){var r,n,i=U9,a=!1,s=!1,l=e,u=0,h=!1,f,d;if(d=t.input.charCodeAt(t.position),d===124)n=!1;else if(d===62)n=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)U9===i?i=d===43?eZ:H8e:Qt(t,"repeat of a chomping mode identifier");else if((f=K8e(d))>=0)f===0?Qt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Qt(t,"repeat of an indentation width identifier"):(l=e+f-1,s=!0);else break;if(_d(d)){do d=t.input.charCodeAt(++t.position);while(_d(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!yc(d)&&d!==0)}for(;d!==0;){for(K9(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!s||t.lineIndentl&&(l=t.lineIndent),yc(d)){u++;continue}if(t.lineIndente)&&u!==0)Qt(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(v&&(s=t.line,l=t.lineStart,u=t.position),um(t,e,B5,!0,i)&&(v?g=t.result:y=t.result),v||(cm(t,d,p,m,g,y,s,l,u),m=g=y=null),Ci(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)Qt(t,"bad indentation of a mapping entry");else if(t.lineIndente?u=1:t.lineIndent===e?u=0:t.lineIndente?u=1:t.lineIndent===e?u=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),d=0,p=t.implicitTypes.length;d"),t.result!==null&&g.kind!==t.kind&&Qt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Qt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||f}function l_e(t){var e=t.position,r,n,i,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Ci(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!Ss(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Qt(t,"directive name must not be less than one character in length");s!==0;){for(;_d(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!yc(s));break}if(yc(s))break;for(r=t.position;s!==0&&!Ss(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}s!==0&&K9(t),$h.call(nZ,n)?nZ[n](t,n,i):F5(t,'unknown document directive "'+n+'"')}if(Ci(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Ci(t,!0,-1)):a&&Qt(t,"directives end mark is expected"),um(t,t.lineIndent-1,B5,!1,!0),Ci(t,!0,-1),t.checkLineBreaks&&Y8e.test(t.input.slice(e,t.position))&&F5(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&$5(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Ci(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=AZ(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;i=55296&&r<=56319&&e+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function PZ(t){var e=/^\n* /;return e.test(t)}function F_e(t,e,r,n,i,a,s,l){var u,h=0,f=null,d=!1,p=!1,m=n!==-1,g=-1,y=P_e(xv(t,0))&&B_e(xv(t,t.length-1));if(e||s)for(u=0;u=65536?u+=2:u++){if(h=xv(t,u),!kv(h))return om;y=y&&lZ(h,f,l),f=h}else{for(u=0;u=65536?u+=2:u++){if(h=xv(t,u),h===wv)d=!0,m&&(p=p||u-g-1>n&&t[g+1]!==" ",g=u);else if(!kv(h))return om;y=y&&lZ(h,f,l),f=h}p=p||m&&u-g-1>n&&t[g+1]!==" "}return!d&&!p?y&&!s&&!i(t)?BZ:a===Tv?om:q9:r>9&&PZ(t)?om:s?a===Tv?om:q9:p?zZ:FZ}function z_e(t,e,r,n,i){t.dump=function(){if(e.length===0)return t.quotingType===Tv?'""':"''";if(!t.noCompatMode&&(L_e.indexOf(e)!==-1||D_e.test(e)))return t.quotingType===Tv?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=n||t.flowLevel>-1&&r>=t.flowLevel;function u(h){return O_e(t,h)}switch(o(u,"testAmbiguity"),F_e(e,l,t.indent,s,u,t.quotingType,t.forceQuotes&&!n,i)){case BZ:return e;case q9:return"'"+e.replace(/'/g,"''")+"'";case FZ:return"|"+cZ(e,t.indent)+uZ(sZ(e,a));case zZ:return">"+cZ(e,t.indent)+uZ(sZ(G_e(e,s),a));case om:return'"'+$_e(e)+'"';default:throw new Es("impossible error: invalid scalar style")}}()}function cZ(t,e){var r=PZ(t)?String(e):"",n=t[t.length-1]===`
+`,i=n&&(t[t.length-2]===`
+`||t===`
+`),a=i?"+":n?"":"-";return r+a+`
+`}function uZ(t){return t[t.length-1]===`
+`?t.slice(0,-1):t}function G_e(t,e){for(var r=/(\n+)([^\n]*)/g,n=function(){var h=t.indexOf(`
+`);return h=h!==-1?h:t.length,r.lastIndex=h,hZ(t.slice(0,h),e)}(),i=t[0]===`
+`||t[0]===" ",a,s;s=r.exec(t);){var l=s[1],u=s[2];a=u[0]===" ",n+=l+(!i&&!a&&u!==""?`
+`:"")+hZ(u,e),i=a}return n}function hZ(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,a,s=0,l=0,u="";n=r.exec(t);)l=n.index,l-i>e&&(a=s>i?s:l,u+=`
+`+t.slice(i,a),i=a+1),s=l;return u+=`
+`,t.length-i>e&&s>i?u+=t.slice(i,s)+`
+`+t.slice(s+1):u+=t.slice(i),u.slice(1)}function $_e(t){for(var e="",r=0,n,i=0;i=65536?i+=2:i++)r=xv(t,i),n=Na[r],!n&&kv(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||R_e(r);return e}function V_e(t,e,r){var n="",i=t.tag,a,s,l;for(a=0,s=r.length;a"u"&&Cu(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function fZ(t,e,r,n){var i="",a=t.tag,s,l,u;for(s=0,l=r.length;s"u"&&Cu(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=Y9(t,e)),t.dump&&wv===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=a,t.dump=i||"[]"}function U_e(t,e,r){var n="",i=t.tag,a=Object.keys(r),s,l,u,h,f;for(s=0,l=a.length;s1024&&(f+="? "),f+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Cu(t,e,h,!1,!1)&&(f+=t.dump,n+=f));t.tag=i,t.dump="{"+n+"}"}function H_e(t,e,r,n){var i="",a=t.tag,s=Object.keys(r),l,u,h,f,d,p;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Es("sortKeys must be a boolean or a function");for(l=0,u=s.length;l1024,d&&(t.dump&&wv===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,d&&(p+=Y9(t,e)),Cu(t,e+1,f,!0,d)&&(t.dump&&wv===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,i+=p));t.tag=a,t.dump=i||"{}"}function dZ(t,e,r){var n,i,a,s,l,u;for(i=r?t.explicitTypes:t.implicitTypes,a=0,s=i.length;a tag resolver accepts not "'+u+'" style');t.dump=n}return!0}return!1}function Cu(t,e,r,n,i,a,s){t.tag=null,t.dump=r,dZ(t,r,!1)||dZ(t,r,!0);var l=LZ.call(t.dump),u=n,h;n&&(n=t.flowLevel<0||t.flowLevel>e);var f=l==="[object Object]"||l==="[object Array]",d,p;if(f&&(d=t.duplicates.indexOf(r),p=d!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(i=!1),p&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(f&&p&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),l==="[object Object]")n&&Object.keys(t.dump).length!==0?(H_e(t,e,t.dump,i),p&&(t.dump="&ref_"+d+t.dump)):(U_e(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(l==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?fZ(t,e-1,t.dump,i):fZ(t,e,t.dump,i),p&&(t.dump="&ref_"+d+t.dump)):(V_e(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(l==="[object String]")t.tag!=="?"&&z_e(t,t.dump,e,a,u);else{if(l==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Es("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump)}return!0}function W_e(t,e){var r=[],n=[],i,a;for(X9(t,r,n),i=0,a=n.length;i{"use strict";o(pZ,"isNothing");o(_Ae,"isObject");o(LAe,"toArray");o(DAe,"extend");o(NAe,"repeat");o(RAe,"isNegativeZero");MAe=pZ,IAe=_Ae,OAe=LAe,PAe=NAe,BAe=RAe,FAe=DAe,Pi={isNothing:MAe,isObject:IAe,toArray:OAe,repeat:PAe,isNegativeZero:BAe,extend:FAe};o(mZ,"formatError");o(bv,"YAMLException$1");bv.prototype=Object.create(Error.prototype);bv.prototype.constructor=bv;bv.prototype.toString=o(function(e){return this.name+": "+mZ(this,e)},"toString");Es=bv;o($9,"getLine");o(V9,"padStart");o(zAe,"makeSnippet");GAe=zAe,$Ae=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],VAe=["scalar","sequence","mapping"];o(UAe,"compileStyleAliases");o(HAe,"Type$1");Da=HAe;o(JQ,"compileList");o(WAe,"compileMap");o(H9,"Schema$1");H9.prototype.extend=o(function(e){var r=[],n=[];if(e instanceof Da)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Es("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Da))throw new Es("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Es("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Es("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof Da))throw new Es("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(H9.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=JQ(i,"implicit"),i.compiledExplicit=JQ(i,"explicit"),i.compiledTypeMap=WAe(i.compiledImplicit,i.compiledExplicit),i},"extend");YAe=H9,qAe=new Da("tag:yaml.org,2002:str",{kind:"scalar",construct:o(function(t){return t!==null?t:""},"construct")}),XAe=new Da("tag:yaml.org,2002:seq",{kind:"sequence",construct:o(function(t){return t!==null?t:[]},"construct")}),jAe=new Da("tag:yaml.org,2002:map",{kind:"mapping",construct:o(function(t){return t!==null?t:{}},"construct")}),KAe=new YAe({explicit:[qAe,XAe,jAe]});o(QAe,"resolveYamlNull");o(ZAe,"constructYamlNull");o(JAe,"isNull");e8e=new Da("tag:yaml.org,2002:null",{kind:"scalar",resolve:QAe,construct:ZAe,predicate:JAe,represent:{canonical:o(function(){return"~"},"canonical"),lowercase:o(function(){return"null"},"lowercase"),uppercase:o(function(){return"NULL"},"uppercase"),camelcase:o(function(){return"Null"},"camelcase"),empty:o(function(){return""},"empty")},defaultStyle:"lowercase"});o(t8e,"resolveYamlBoolean");o(r8e,"constructYamlBoolean");o(n8e,"isBoolean");i8e=new Da("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t8e,construct:r8e,predicate:n8e,represent:{lowercase:o(function(t){return t?"true":"false"},"lowercase"),uppercase:o(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:o(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});o(a8e,"isHexCode");o(s8e,"isOctCode");o(o8e,"isDecCode");o(l8e,"resolveYamlInteger");o(c8e,"constructYamlInteger");o(u8e,"isInteger");h8e=new Da("tag:yaml.org,2002:int",{kind:"scalar",resolve:l8e,construct:c8e,predicate:u8e,represent:{binary:o(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:o(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:o(function(t){return t.toString(10)},"decimal"),hexadecimal:o(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),f8e=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");o(d8e,"resolveYamlFloat");o(p8e,"constructYamlFloat");m8e=/^[-+]?[0-9]+e/;o(g8e,"representYamlFloat");o(y8e,"isFloat");v8e=new Da("tag:yaml.org,2002:float",{kind:"scalar",resolve:d8e,construct:p8e,predicate:y8e,represent:g8e,defaultStyle:"lowercase"}),gZ=KAe.extend({implicit:[e8e,i8e,h8e,v8e]}),x8e=gZ,yZ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),vZ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");o(b8e,"resolveYamlTimestamp");o(w8e,"constructYamlTimestamp");o(T8e,"representYamlTimestamp");k8e=new Da("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:b8e,construct:w8e,instanceOf:Date,represent:T8e});o(E8e,"resolveYamlMerge");S8e=new Da("tag:yaml.org,2002:merge",{kind:"scalar",resolve:E8e}),j9=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
+\r`;o(C8e,"resolveYamlBinary");o(A8e,"constructYamlBinary");o(_8e,"representYamlBinary");o(L8e,"isBinary");D8e=new Da("tag:yaml.org,2002:binary",{kind:"scalar",resolve:C8e,construct:A8e,predicate:L8e,represent:_8e}),N8e=Object.prototype.hasOwnProperty,R8e=Object.prototype.toString;o(M8e,"resolveYamlOmap");o(I8e,"constructYamlOmap");O8e=new Da("tag:yaml.org,2002:omap",{kind:"sequence",resolve:M8e,construct:I8e}),P8e=Object.prototype.toString;o(B8e,"resolveYamlPairs");o(F8e,"constructYamlPairs");z8e=new Da("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:B8e,construct:F8e}),G8e=Object.prototype.hasOwnProperty;o($8e,"resolveYamlSet");o(V8e,"constructYamlSet");U8e=new Da("tag:yaml.org,2002:set",{kind:"mapping",resolve:$8e,construct:V8e}),xZ=x8e.extend({implicit:[k8e,S8e],explicit:[D8e,O8e,z8e,U8e]}),$h=Object.prototype.hasOwnProperty,P5=1,bZ=2,wZ=3,B5=4,U9=1,H8e=2,eZ=3,W8e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Y8e=/[\x85\u2028\u2029]/,q8e=/[,\[\]\{\}]/,TZ=/^(?:!|!!|![a-z\-]+!)$/i,kZ=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;o(tZ,"_class");o(yc,"is_EOL");o(_d,"is_WHITE_SPACE");o(Ss,"is_WS_OR_EOL");o(lm,"is_FLOW_INDICATOR");o(X8e,"fromHexCode");o(j8e,"escapedHexLen");o(K8e,"fromDecimalCode");o(rZ,"simpleEscapeSequence");o(Q8e,"charFromCodepoint");EZ=new Array(256),SZ=new Array(256);for(Ad=0;Ad<256;Ad++)EZ[Ad]=rZ(Ad)?1:0,SZ[Ad]=rZ(Ad);o(Z8e,"State$1");o(CZ,"generateError");o(Qt,"throwError");o(F5,"throwWarning");nZ={YAML:o(function(e,r,n){var i,a,s;e.version!==null&&Qt(e,"duplication of %YAML directive"),n.length!==1&&Qt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Qt(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&Qt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&F5(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:o(function(e,r,n){var i,a;n.length!==2&&Qt(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],TZ.test(i)||Qt(e,"ill-formed tag handle (first argument) of the TAG directive"),$h.call(e.tagMap,i)&&Qt(e,'there is a previously declared suffix for "'+i+'" tag handle'),kZ.test(a)||Qt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Qt(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};o(Gh,"captureSegment");o(iZ,"mergeMappings");o(cm,"storeMappingPair");o(K9,"readLineBreak");o(Ci,"skipSeparationSpace");o($5,"testDocumentSeparator");o(Q9,"writeFoldedLines");o(J8e,"readPlainScalar");o(e_e,"readSingleQuotedScalar");o(t_e,"readDoubleQuotedScalar");o(r_e,"readFlowCollection");o(n_e,"readBlockScalar");o(aZ,"readBlockSequence");o(i_e,"readBlockMapping");o(a_e,"readTagProperty");o(s_e,"readAnchorProperty");o(o_e,"readAlias");o(um,"composeNode");o(l_e,"readDocument");o(AZ,"loadDocuments");o(c_e,"loadAll$1");o(u_e,"load$1");h_e=c_e,f_e=u_e,_Z={loadAll:h_e,load:f_e},LZ=Object.prototype.toString,DZ=Object.prototype.hasOwnProperty,Z9=65279,d_e=9,wv=10,p_e=13,m_e=32,g_e=33,y_e=34,W9=35,v_e=37,x_e=38,b_e=39,w_e=42,NZ=44,T_e=45,z5=58,k_e=61,E_e=62,S_e=63,C_e=64,RZ=91,MZ=93,A_e=96,IZ=123,__e=124,OZ=125,Na={};Na[0]="\\0";Na[7]="\\a";Na[8]="\\b";Na[9]="\\t";Na[10]="\\n";Na[11]="\\v";Na[12]="\\f";Na[13]="\\r";Na[27]="\\e";Na[34]='\\"';Na[92]="\\\\";Na[133]="\\N";Na[160]="\\_";Na[8232]="\\L";Na[8233]="\\P";L_e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D_e=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;o(N_e,"compileStyleMap");o(R_e,"encodeHex");M_e=1,Tv=2;o(I_e,"State");o(sZ,"indentString");o(Y9,"generateNextLine");o(O_e,"testImplicitResolving");o(G5,"isWhitespace");o(kv,"isPrintable");o(oZ,"isNsCharOrWhitespace");o(lZ,"isPlainSafe");o(P_e,"isPlainSafeFirst");o(B_e,"isPlainSafeLast");o(xv,"codePointAt");o(PZ,"needIndentIndicator");BZ=1,q9=2,FZ=3,zZ=4,om=5;o(F_e,"chooseScalarStyle");o(z_e,"writeScalar");o(cZ,"blockHeader");o(uZ,"dropEndingNewline");o(G_e,"foldString");o(hZ,"foldLine");o($_e,"escapeString");o(V_e,"writeFlowSequence");o(fZ,"writeBlockSequence");o(U_e,"writeFlowMapping");o(H_e,"writeBlockMapping");o(dZ,"detectType");o(Cu,"writeNode");o(W_e,"getDuplicateReferences");o(X9,"inspectNode");o(Y_e,"dump$1");q_e=Y_e,X_e={dump:q_e};o(J9,"renamed");hm=gZ,fm=_Z.load,uNt=_Z.loadAll,hNt=X_e.dump,fNt=J9("safeLoad","load"),dNt=J9("safeLoadAll","loadAll"),pNt=J9("safeDump","dump")});function rL(t){let e=[];for(let r of t){let n=Sv.get(r);n?.styles&&(e=[...e,...n.styles??[]].map(i=>i.trim())),n?.textStyles&&(e=[...e,...n.textStyles??[]].map(i=>i.trim()))}return e}var j_e,GZ,dm,Vh,Cs,Sv,Au,nL,iL,U5,tL,Go,H5,W5,Y5,q5,K_e,Q_e,Z_e,J_e,e9e,t9e,r9e,aL,n9e,i9e,a9e,$Z,s9e,o9e,sL,VZ,UZ,l9e,HZ,c9e,u9e,h9e,f9e,d9e,Ev,WZ,YZ,p9e,m9e,qZ,g9e,y9e,v9e,x9e,b9e,XZ,jZ,w9e,T9e,k9e,E9e,S9e,C9e,X5,oL=M(()=>{"use strict";mr();hr();Vt();fr();G9();ht();V5();ki();j_e="flowchart-",GZ=0,dm=de(),Vh=new Map,Cs=[],Sv=new Map,Au=[],nL=new Map,iL=new Map,U5=0,tL=!0,W5=[],Y5=o(t=>je.sanitizeText(t,dm),"sanitizeText"),q5=o(function(t){for(let e of Vh.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),K_e=o(function(t,e,r,n,i,a,s={},l){if(!t||t.trim().length===0)return;let u,h=Vh.get(t);if(h===void 0&&(h={id:t,labelType:"text",domId:j_e+t+"-"+GZ,styles:[],classes:[]},Vh.set(t,h)),GZ++,e!==void 0?(dm=de(),u=Y5(e.text.trim()),h.labelType=e.type,u.startsWith('"')&&u.endsWith('"')&&(u=u.substring(1,u.length-1)),h.text=u):h.text===void 0&&(h.text=t),r!==void 0&&(h.type=r),n?.forEach(function(f){h.styles.push(f)}),i?.forEach(function(f){h.classes.push(f)}),a!==void 0&&(h.dir=a),h.props===void 0?h.props=s:s!==void 0&&Object.assign(h.props,s),l!==void 0){let f;l.includes(`
+`)?f=l+`
+`:f=`{
+`+l+`
+}`;let d=fm(f,{schema:hm});if(d.shape){if(d.shape!==d.shape.toLowerCase()||d.shape.includes("_"))throw new Error(`No such shape: ${d.shape}. Shape names should be lowercase.`);if(!ZQ(d.shape))throw new Error(`No such shape: ${d.shape}.`);h.type=d?.shape}d?.label&&(h.text=d?.label),d?.icon&&(h.icon=d?.icon,!d.label?.trim()&&h.text===t&&(h.text="")),d?.form&&(h.form=d?.form),d?.pos&&(h.pos=d?.pos),d?.img&&(h.img=d?.img,!d.label?.trim()&&h.text===t&&(h.text="")),d?.constraint&&(h.constraint=d.constraint),d.w&&(h.assetWidth=Number(d.w)),d.h&&(h.assetHeight=Number(d.h))}},"addVertex"),Q_e=o(function(t,e,r){let a={start:t,end:e,type:void 0,text:"",labelType:"text"};Y.info("abc78 Got edge...",a);let s=r.text;if(s!==void 0&&(a.text=Y5(s.text.trim()),a.text.startsWith('"')&&a.text.endsWith('"')&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=s.type),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),Cs.length<(dm.maxEdges??500))Y.info("Pushing edge..."),Cs.push(a);else throw new Error(`Edge limit exceeded. ${Cs.length} edges found, but the limit is ${dm.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.`)},"addSingleLink"),Z_e=o(function(t,e,r){Y.info("addLink",t,e,r);for(let n of t)for(let i of e)Q_e(n,i,r)},"addLink"),J_e=o(function(t,e){t.forEach(function(r){r==="default"?Cs.defaultInterpolate=e:Cs[r].interpolate=e})},"updateLinkInterpolate"),e9e=o(function(t,e){t.forEach(function(r){if(typeof r=="number"&&r>=Cs.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${Cs.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);r==="default"?Cs.defaultStyle=e:(Cs[r].style=e,(Cs[r]?.style?.length??0)>0&&!Cs[r]?.style?.some(n=>n?.startsWith("fill"))&&Cs[r]?.style?.push("fill:none"))})},"updateLink"),t9e=o(function(t,e){t.split(",").forEach(function(r){let n=Sv.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},Sv.set(r,n)),e?.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)})})},"addClass"),r9e=o(function(t){Go=t,/.*/.exec(Go)&&(Go="LR"),/.*v/.exec(Go)&&(Go="TB"),Go==="TD"&&(Go="TB")},"setDirection"),aL=o(function(t,e){for(let r of t.split(",")){let n=Vh.get(r);n&&n.classes.push(e);let i=nL.get(r);i&&i.classes.push(e)}},"setClass"),n9e=o(function(t,e){if(e!==void 0){e=Y5(e);for(let r of t.split(","))iL.set(H5==="gen-1"?q5(r):r,e)}},"setTooltip"),i9e=o(function(t,e,r){let n=q5(t);if(de().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),ze(this).classed("hover",!1)})},"setupToolTips");W5.push(HZ);c9e=o(function(t="gen-1"){Vh=new Map,Sv=new Map,Cs=[],W5=[HZ],Au=[],nL=new Map,U5=0,iL=new Map,tL=!0,H5=t,dm=de(),_r()},"clear"),u9e=o(t=>{H5=t||"gen-2"},"setGen"),h9e=o(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),f9e=o(function(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\s/.exec(r.text)&&(n=void 0);function a(h){let f={boolean:{},number:{},string:{}},d=[],p;return{nodeList:h.filter(function(g){let y=typeof g;return g.stmt&&g.stmt==="dir"?(p=g.value,!1):g.trim()===""?!1:y in f?f[y].hasOwnProperty(g)?!1:f[y][g]=!0:d.includes(g)?!1:d.push(g)}),dir:p}}o(a,"uniq");let{nodeList:s,dir:l}=a(e.flat());if(H5==="gen-1")for(let h=0;h2e3)return{result:!1,count:0};if(WZ[Ev]=e,Au[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n=0){let s=YZ(t,a);if(s.result)return{result:!0,count:i+s.count};i=i+s.count}n=n+1}return{result:!1,count:i}},"indexNodes2"),p9e=o(function(t){return WZ[t]},"getDepthFirstPos"),m9e=o(function(){Ev=-1,Au.length>0&&YZ("none",Au.length-1)},"indexNodes"),qZ=o(function(){return Au},"getSubGraphs"),g9e=o(()=>tL?(tL=!1,!0):!1,"firstGraph"),y9e=o(t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}},"destructStartLink"),v9e=o((t,e)=>{let r=e.length,n=0;for(let i=0;i{let e=t.trim(),r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1));break}let i="normal",a=r.length-1;r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible");let s=v9e(".",r);return s&&(i="dotted",a=s),{type:n,stroke:i,length:a}},"destructEndLink"),b9e=o((t,e)=>{let r=x9e(t),n;if(e){if(n=y9e(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=r.length,n}return r},"destructLink"),XZ=o((t,e)=>{for(let r of t)if(r.nodes.includes(e))return!0;return!1},"exists"),jZ=o((t,e)=>{let r=[];return t.nodes.forEach((n,i)=>{XZ(e,n)||r.push(t.nodes[i])}),{nodes:r}},"makeUniq"),w9e={firstGraph:g9e},T9e=o(t=>{if(t.img)return"imageSquare";if(t.icon)return t.form==="circle"?"iconCircle":t.form==="square"?"iconSquare":t.form==="rounded"?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}},"getTypeFromVertex"),k9e=o((t,e)=>t.find(r=>r.id===e),"findNode"),E9e=o(t=>{let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e;break}return{arrowTypeStart:e,arrowTypeEnd:r}},"destructEdgeType"),S9e=o((t,e,r,n,i,a)=>{let s=r.get(t.id),l=n.get(t.id)??!1,u=k9e(e,t.id);if(u)u.cssStyles=t.styles,u.cssCompiledStyles=rL(t.classes),u.cssClasses=t.classes.join(" ");else{let h={id:t.id,label:t.text,labelStyle:"",parentId:s,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:rL(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:$Z(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};l?e.push({...h,isGroup:!0,shape:"rect"}):e.push({...h,isGroup:!1,shape:T9e(t)})}},"addNodeFromVertex");o(rL,"getCompiledStyles");C9e=o(()=>{let t=de(),e=[],r=[],n=qZ(),i=new Map,a=new Map;for(let u=n.length-1;u>=0;u--){let h=n[u];h.nodes.length>0&&a.set(h.id,!0);for(let f of h.nodes)i.set(f,h.id)}for(let u=n.length-1;u>=0;u--){let h=n[u];e.push({id:h.id,label:h.title,labelStyle:"",parentId:i.get(h.id),padding:8,cssCompiledStyles:rL(h.classes),cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir,isGroup:!0,look:t.look})}VZ().forEach(u=>{S9e(u,e,i,a,t,t.look||"classic")});let l=UZ();return l.forEach((u,h)=>{let{arrowTypeStart:f,arrowTypeEnd:d}=E9e(u.type),p=[...l.defaultStyle??[]];u.style&&p.push(...u.style);let m={id:p5(u.start,u.end,{counter:h,prefix:"L"}),start:u.start,end:u.end,type:u.type??"normal",label:u.text,labelpos:"c",thickness:u.stroke,minlen:u.length,classes:u?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:u?.stroke==="invisible"?"none":f,arrowTypeEnd:u?.stroke==="invisible"?"none":d,arrowheadStyle:"fill: #333",labelStyle:p,style:p,pattern:u.stroke,look:t.look};r.push(m)}),{nodes:e,edges:r,other:{},config:t}},"getData"),X5={defaultConfig:o(()=>S4.flowchart,"defaultConfig"),setAccTitle:Rr,getAccTitle:Pr,getAccDescription:Fr,getData:C9e,setAccDescription:Br,addVertex:K_e,lookUpDomId:q5,addLink:Z_e,updateLinkInterpolate:J_e,updateLink:e9e,addClass:t9e,setDirection:r9e,setClass:aL,setTooltip:n9e,getTooltip:$Z,setClickEvent:s9e,setLink:a9e,bindFunctions:o9e,getDirection:sL,getVertices:VZ,getEdges:UZ,getClasses:l9e,clear:c9e,setGen:u9e,defaultStyle:h9e,addSubGraph:f9e,getDepthFirstPos:p9e,indexNodes:m9e,getSubGraphs:qZ,destructLink:b9e,lex:w9e,exists:XZ,makeUniq:jZ,setDiagramTitle:ln,getDiagramTitle:Jr}});var pm,j5=M(()=>{"use strict";mr();pm=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 _u,Cv=M(()=>{"use strict";_u=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 KZ,A9e,_9e,L9e,D9e,N9e,R9e,QZ,mm,ZZ,K5=M(()=>{"use strict";Vt();fr();ht();Cv();mr();jt();Dl();w9();I5();zh();Xt();KZ=o(async(t,e)=>{Y.info("Creating subgraph rect for ",e.id,e);let r=de(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=et(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=xr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await Si(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0}),y=g.getBBox();if(xr(r.flowchart.htmlLabels)){let L=g.children[0],C=ze(g);y=L.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height)}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,w=e.y-x/2;Y.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let L=Ke.svg(d),C=Ze(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),A=L.path(La(b,w,v,x,0),C);_=d.insert(()=>(Y.debug("Rough node insert CXC",A),A),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",f.join(";").replace("fill","stroke"))}else _=d.insert("rect",":first-child"),_.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:T}=_u(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+T})`),l){let L=m.select("span");L&&L.attr("style",l)}let E=_.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=y.height-e.padding/2,e.intersect=function(L){return Oh(e,L)},{cluster:d,labelBBox:y}},"rect"),A9e=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 Oh(e,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),_9e=o(async(t,e)=>{let r=de(),{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 gc(e.label,e.labelStyle,void 0,!0)),g=m.getBBox();if(xr(r.flowchart.htmlLabels)){let A=m.children[0],I=ze(m);g=A.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}let y=0*e.padding,v=y/2,x=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+y;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+y,w=e.height+y-g.height-6,_=e.x-x/2,T=e.y-b/2;e.width=x;let E=e.y-e.height/2-v+g.height+2,L;if(e.look==="handDrawn"){let A=e.cssClasses.includes("statediagram-cluster-alt"),I=Ke.svg(h),D=e.rx||e.ry?I.path(La(_,T,x,b,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):I.rectangle(_,T,x,b,{seed:i});L=h.insert(()=>D,":first-child");let k=I.rectangle(_,E,x,w,{fill:A?a:s,fillStyle:A?"hachure":"solid",stroke:u,seed:i});L=h.insert(()=>D,":first-child"),p=h.insert(()=>k)}else L=f.insert("rect",":first-child"),L.attr("class","outer").attr("x",_).attr("y",T).attr("width",x).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",_).attr("y",E).attr("width",x).attr("height",w);d.attr("transform",`translate(${e.x-g.width/2}, ${T+1-(xr(r.flowchart.htmlLabels)?0:3)})`);let C=L.node().getBBox();return e.height=C.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(A){return Oh(e,A)},{cluster:h,labelBBox:g}},"roundedWithTitle"),L9e=o(async(t,e)=>{Y.info("Creating subgraph rect for ",e.id,e);let r=de(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=et(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=xr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await Si(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}),y=g.getBBox();if(xr(r.flowchart.htmlLabels)){let L=g.children[0],C=ze(g);y=L.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height)}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,w=e.y-x/2;Y.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let L=Ke.svg(d),C=Ze(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),A=L.path(La(b,w,v,x,e.rx),C);_=d.insert(()=>(Y.debug("Rough node insert CXC",A),A),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",f.join(";").replace("fill","stroke"))}else _=d.insert("rect",":first-child"),_.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:T}=_u(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+T})`),l){let L=m.select("span");L&&L.attr("style",l)}let E=_.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=y.height-e.padding/2,e.intersect=function(L){return Oh(e,L)},{cluster:d,labelBBox:y}},"kanbanSection"),D9e=o((t,e)=>{let r=de(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=s.insert("g",":first-child"),u=0*e.padding,h=e.width+u;e.diff=-e.padding;let f=e.height+u,d=e.x-h/2,p=e.y-f/2;e.width=h;let m;if(e.look==="handDrawn"){let v=Ke.svg(s).rectangle(d,p,h,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});m=s.insert(()=>v,":first-child")}else m=l.insert("rect",":first-child"),m.attr("class","divider").attr("x",d).attr("y",p).attr("width",h).attr("height",f).attr("data-look",e.look);let g=m.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(y){return Oh(e,y)},{cluster:s,labelBBox:{}}},"divider"),N9e=KZ,R9e={rect:KZ,squareRect:N9e,roundedWithTitle:_9e,noteGroup:A9e,divider:D9e,kanbanSection:L9e},QZ=new Map,mm=o(async(t,e)=>{let r=e.shape||"rect",n=await R9e[r](t,e);return QZ.set(e.id,n),n},"insertCluster"),ZZ=o(()=>{QZ=new Map},"clear")});function Q5(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=Un(t),e=Un(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 $o,Un,Z5,lL=M(()=>{"use strict";$o={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};o(Q5,"calculateDeltaAndAngle");Un=o(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),Z5=o(t=>({x:o(function(e,r,n){let i=0,a=Un(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn($o,t.arrowTypeEnd)){let{angle:m,deltaX:g}=Q5(n[n.length-1],n[n.length-2]);i=$o[t.arrowTypeEnd]*Math.cos(m)*(g>=0?1:-1)}let s=Math.abs(Un(e).x-Un(n[n.length-1]).x),l=Math.abs(Un(e).y-Un(n[n.length-1]).y),u=Math.abs(Un(e).x-Un(n[0]).x),h=Math.abs(Un(e).y-Un(n[0]).y),f=$o[t.arrowTypeStart],d=$o[t.arrowTypeEnd],p=1;if(s0&&l0&&h=0?1:-1)}else if(r===n.length-1&&Object.hasOwn($o,t.arrowTypeEnd)){let{angle:m,deltaY:g}=Q5(n[n.length-1],n[n.length-2]);i=$o[t.arrowTypeEnd]*Math.abs(Math.sin(m))*(g>=0?1:-1)}let s=Math.abs(Un(e).y-Un(n[n.length-1]).y),l=Math.abs(Un(e).x-Un(n[n.length-1]).x),u=Math.abs(Un(e).y-Un(n[0]).y),h=Math.abs(Un(e).x-Un(n[0]).x),f=$o[t.arrowTypeStart],d=$o[t.arrowTypeEnd],p=1;if(s0&&l0&&h{"use strict";ht();eJ=o((t,e,r,n,i)=>{e.arrowTypeStart&&JZ(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&JZ(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),M9e={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},JZ=o((t,e,r,n,i,a)=>{let s=M9e[r];if(!s){Y.warn(`Unknown arrow type: ${r}`);return}let l=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${l})`)},"addEdgeMarker")});function J5(t,e){de().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function P9e(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 ew,ua,iJ,Av,tw,rw,I9e,O9e,rJ,nJ,B9e,nw,cL=M(()=>{"use strict";Vt();fr();ht();Dl();hr();lL();Cv();mr();jt();I5();tJ();ew=new Map,ua=new Map,iJ=o(()=>{ew.clear(),ua.clear()},"clear"),Av=o(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),tw=o(async(t,e)=>{let r=xr(de().flowchart.htmlLabels),n=await Si(t,e.label,{style:Av(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});Y.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+")"),ew.set(e.id,i),e.width=s.width,e.height=s.height;let l;if(e.startLabelLeft){let u=await gc(e.startLabelLeft,Av(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+")"),ua.get(e.id)||ua.set(e.id,{}),ua.get(e.id).startLeft=h,J5(l,e.startLabelLeft)}if(e.startLabelRight){let u=await gc(e.startLabelRight,Av(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+")"),ua.get(e.id)||ua.set(e.id,{}),ua.get(e.id).startRight=h,J5(l,e.startLabelRight)}if(e.endLabelLeft){let u=await gc(e.endLabelLeft,Av(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),ua.get(e.id)||ua.set(e.id,{}),ua.get(e.id).endLeft=h,J5(l,e.endLabelLeft)}if(e.endLabelRight){let u=await gc(e.endLabelRight,Av(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),ua.get(e.id)||ua.set(e.id,{}),ua.get(e.id).endRight=h,J5(l,e.endLabelRight)}return n},"insertEdgeLabel");o(J5,"setTerminalWidth");rw=o((t,e)=>{Y.debug("Moving label abc88 ",t.id,t.label,ew.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=de(),{subGraphTitleTotalMargin:i}=_u(n);if(t.label){let a=ew.get(t.id),s=t.x,l=t.y;if(r){let u=Ut.calcLabelPosition(r);Y.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=ua.get(t.id).startLeft,s=t.x,l=t.y;if(r){let u=Ut.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=ua.get(t.id).startRight,s=t.x,l=t.y;if(r){let u=Ut.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=ua.get(t.id).endLeft,s=t.x,l=t.y;if(r){let u=Ut.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=ua.get(t.id).endRight,s=t.x,l=t.y;if(r){let u=Ut.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),I9e=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"),O9e=o((t,e,r)=>{Y.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{Y.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(Y.info("abc88 checking point",a,e),!I9e(e,a)&&!i){let s=O9e(e,n,a);Y.debug("abc88 inside",a,n,s),Y.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)?Y.warn("abc88 no intersect",s,r):r.push(s),i=!0}else Y.warn("abc88 outside",a,n),n=a,i||r.push(a)}),Y.debug("returning points",r),r},"cutPathAtIntersect");o(P9e,"extractCornerPoints");nJ=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"),B9e=o(function(t){let{cornerPointPositions:e}=P9e(t),r=[];for(let n=0;n10&&Math.abs(a.y-i.y)>=10){Y.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 Y.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"),nw=o(function(t,e,r,n,i,a,s){let{handDrawnSeed:l}=de(),u=e.points,h=!1,f=i;var d=a;d.intersect&&f.intersect&&(u=u.slice(1,e.points.length-1),u.unshift(f.intersect(u[0])),Y.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&&(Y.info("to cluster abc88",r.get(e.toCluster)),u=rJ(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(Y.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(u,null,2)),u=rJ(u.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let p=u.filter(L=>!Number.isNaN(L.y));p=B9e(p);let m=Do;e.curve&&(m=e.curve);let{x:g,y}=Z5(e),v=Ka().x(g).y(y).curve(m),x;switch(e.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible";break;default:x="edge-thickness-normal"}switch(e.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break;default:x+=" edge-pattern-solid"}let b,w=v(p),_=Array.isArray(e.style)?e.style:[e.style];if(e.look==="handDrawn"){let L=Ke.svg(t);Object.assign([],p);let C=L.path(w,{roughness:.3,seed:l});x+=" transition",b=ze(C).select("path").attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",_?_.reduce((I,D)=>I+";"+D,""):"");let A=b.attr("d");b.attr("d",A),t.node().appendChild(b.node())}else b=t.append("path").attr("d",w).attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",_?_.reduce((L,C)=>L+";"+C,""):"");let T="";(de().flowchart.arrowMarkerAbsolute||de().state.arrowMarkerAbsolute)&&(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,T=T.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Y.info("arrowTypeStart",e.arrowTypeStart),Y.info("arrowTypeEnd",e.arrowTypeEnd),eJ(b,e,T,s,n);let E={};return h&&(E.updatedPath=u),E.originalPath=e.points,E},"insertEdge")});var F9e,z9e,G9e,$9e,V9e,U9e,H9e,W9e,Y9e,q9e,X9e,iw,uL=M(()=>{"use strict";ht();F9e=o((t,e,r,n)=>{e.forEach(i=>{X9e[i](t,r,n)})},"insertMarkers"),z9e=o((t,e,r)=>{Y.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"),G9e=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"),$9e=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"),V9e=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"),U9e=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"),H9e=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"),W9e=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"),Y9e=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"),q9e=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"),X9e={extension:z9e,composition:G9e,aggregation:$9e,dependency:V9e,lollipop:U9e,point:H9e,circle:W9e,cross:Y9e,barb:q9e},iw=F9e});async function gm(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?z9[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),aw.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var aw,aJ,sJ,_v,sw=M(()=>{"use strict";ht();G9();aw=new Map;o(gm,"insertNode");aJ=o((t,e)=>{aw.set(e.id,t)},"setNodeElem"),sJ=o(()=>{aw.clear()},"clear"),_v=o(t=>{let e=aw.get(t.id);Y.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 oJ,lJ=M(()=>{"use strict";Ua();fr();ht();K5();cL();uL();sw();Ft();hr();oJ={common:je,getConfig:Sr,insertCluster:mm,insertEdge:nw,insertEdgeLabel:tw,insertMarkers:iw,insertNode:gm,interpolateToCurve:Q_,labelHelper:ot,log:Y,positionEdgeLabel:rw}});function K9e(t){return typeof t=="symbol"||Zn(t)&&ca(t)==j9e}var j9e,ro,Ld=M(()=>{"use strict";xu();Mo();j9e="[object Symbol]";o(K9e,"isSymbol");ro=K9e});function Q9e(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{"use strict";o(Q9e,"arrayMap");As=Q9e});function hJ(t){if(typeof t=="string")return t;if(Mt(t))return As(t,hJ)+"";if(ro(t))return uJ?uJ.call(t):"";var e=t+"";return e=="0"&&1/t==-Z9e?"-0":e}var Z9e,cJ,uJ,fJ,dJ=M(()=>{"use strict";gd();Dd();Vn();Ld();Z9e=1/0,cJ=ea?ea.prototype:void 0,uJ=cJ?cJ.toString:void 0;o(hJ,"baseToString");fJ=hJ});function eLe(t){for(var e=t.length;e--&&J9e.test(t.charAt(e)););return e}var J9e,pJ,mJ=M(()=>{"use strict";J9e=/\s/;o(eLe,"trimmedEndIndex");pJ=eLe});function rLe(t){return t&&t.slice(0,pJ(t)+1).replace(tLe,"")}var tLe,gJ,yJ=M(()=>{"use strict";mJ();tLe=/^\s+/;o(rLe,"baseTrim");gJ=rLe});function oLe(t){if(typeof t=="number")return t;if(ro(t))return vJ;if(yn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=yn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=gJ(t);var r=iLe.test(t);return r||aLe.test(t)?sLe(t.slice(2),r?2:8):nLe.test(t)?vJ:+t}var vJ,nLe,iLe,aLe,sLe,xJ,bJ=M(()=>{"use strict";yJ();Qs();Ld();vJ=NaN,nLe=/^[-+]0x[0-9a-f]+$/i,iLe=/^0b[01]+$/i,aLe=/^0o[0-7]+$/i,sLe=parseInt;o(oLe,"toNumber");xJ=oLe});function cLe(t){if(!t)return t===0?t:0;if(t=xJ(t),t===wJ||t===-wJ){var e=t<0?-1:1;return e*lLe}return t===t?t:0}var wJ,lLe,ym,hL=M(()=>{"use strict";bJ();wJ=1/0,lLe=17976931348623157e292;o(cLe,"toFinite");ym=cLe});function uLe(t){var e=ym(t),r=e%1;return e===e?r?e-r:e:0}var vc,vm=M(()=>{"use strict";hL();o(uLe,"toInteger");vc=uLe});var hLe,ow,TJ=M(()=>{"use strict";Ch();No();hLe=vs(ai,"WeakMap"),ow=hLe});function fLe(){}var Jn,fL=M(()=>{"use strict";o(fLe,"noop");Jn=fLe});function dLe(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";o(dLe,"arrayEach");lw=dLe});function pLe(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{"use strict";o(pLe,"baseFindIndex");cw=pLe});function mLe(t){return t!==t}var kJ,EJ=M(()=>{"use strict";o(mLe,"baseIsNaN");kJ=mLe});function gLe(t,e,r){for(var n=r-1,i=t.length;++n{"use strict";o(gLe,"strictIndexOf");SJ=gLe});function yLe(t,e,r){return e===e?SJ(t,e,r):cw(t,kJ,r)}var xm,uw=M(()=>{"use strict";pL();EJ();CJ();o(yLe,"baseIndexOf");xm=yLe});function vLe(t,e){var r=t==null?0:t.length;return!!r&&xm(t,e,0)>-1}var hw,mL=M(()=>{"use strict";uw();o(vLe,"arrayIncludes");hw=vLe});var xLe,AJ,_J=M(()=>{"use strict";F_();xLe=n5(Object.keys,Object),AJ=xLe});function TLe(t){if(!fc(t))return AJ(t);var e=[];for(var r in Object(t))wLe.call(t,r)&&r!="constructor"&&e.push(r);return e}var bLe,wLe,bm,fw=M(()=>{"use strict";Kp();_J();bLe=Object.prototype,wLe=bLe.hasOwnProperty;o(TLe,"baseKeys");bm=TLe});function kLe(t){return si(t)?l5(t):bm(t)}var zr,xc=M(()=>{"use strict";U_();fw();Io();o(kLe,"keys");zr=kLe});var ELe,SLe,CLe,ha,LJ=M(()=>{"use strict";em();wd();q_();Io();Kp();xc();ELe=Object.prototype,SLe=ELe.hasOwnProperty,CLe=h5(function(t,e){if(fc(e)||si(e)){Bo(e,zr(e),t);return}for(var r in e)SLe.call(e,r)&&dc(t,r,e[r])}),ha=CLe});function LLe(t,e){if(Mt(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||ro(t)?!0:_Le.test(t)||!ALe.test(t)||e!=null&&t in Object(e)}var ALe,_Le,wm,dw=M(()=>{"use strict";Vn();Ld();ALe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_Le=/^\w*$/;o(LLe,"isKey");wm=LLe});function NLe(t){var e=Vp(t,function(n){return r.size===DLe&&r.clear(),n}),r=e.cache;return e}var DLe,DJ,NJ=M(()=>{"use strict";N_();DLe=500;o(NLe,"memoizeCapped");DJ=NLe});var RLe,MLe,ILe,RJ,MJ=M(()=>{"use strict";NJ();RLe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,MLe=/\\(\\)?/g,ILe=DJ(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(RLe,function(r,n,i,a){e.push(i?a.replace(MLe,"$1"):n||r)}),e}),RJ=ILe});function OLe(t){return t==null?"":fJ(t)}var pw,gL=M(()=>{"use strict";dJ();o(OLe,"toString");pw=OLe});function PLe(t,e){return Mt(t)?t:wm(t,e)?[t]:RJ(pw(t))}var Uh,Lv=M(()=>{"use strict";Vn();dw();MJ();gL();o(PLe,"castPath");Uh=PLe});function FLe(t){if(typeof t=="string"||ro(t))return t;var e=t+"";return e=="0"&&1/t==-BLe?"-0":e}var BLe,bc,Tm=M(()=>{"use strict";Ld();BLe=1/0;o(FLe,"toKey");bc=FLe});function zLe(t,e){e=Uh(e,t);for(var r=0,n=e.length;t!=null&&r{"use strict";Lv();Tm();o(zLe,"baseGet");Hh=zLe});function GLe(t,e,r){var n=t==null?void 0:Hh(t,e);return n===void 0?r:n}var IJ,OJ=M(()=>{"use strict";Dv();o(GLe,"get");IJ=GLe});function $Le(t,e){for(var r=-1,n=e.length,i=t.length;++r{"use strict";o($Le,"arrayPush");km=$Le});function VLe(t){return Mt(t)||Al(t)||!!(PJ&&t&&t[PJ])}var PJ,BJ,FJ=M(()=>{"use strict";gd();Qp();Vn();PJ=ea?ea.isConcatSpreadable:void 0;o(VLe,"isFlattenable");BJ=VLe});function zJ(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=BJ),i||(i=[]);++a0&&r(l)?e>1?zJ(l,e-1,r,n,i):km(i,l):n||(i[i.length]=l)}return i}var wc,Em=M(()=>{"use strict";mw();FJ();o(zJ,"baseFlatten");wc=zJ});function ULe(t){var e=t==null?0:t.length;return e?wc(t,1):[]}var Wr,gw=M(()=>{"use strict";Em();o(ULe,"flatten");Wr=ULe});function HLe(t){return u5(c5(t,void 0,Wr),t+"")}var GJ,$J=M(()=>{"use strict";gw();H_();Y_();o(HLe,"flatRest");GJ=HLe});function WLe(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(WLe,"baseSlice");yw=WLe});function eDe(t){return JLe.test(t)}var YLe,qLe,XLe,jLe,KLe,QLe,ZLe,JLe,VJ,UJ=M(()=>{"use strict";YLe="\\ud800-\\udfff",qLe="\\u0300-\\u036f",XLe="\\ufe20-\\ufe2f",jLe="\\u20d0-\\u20ff",KLe=qLe+XLe+jLe,QLe="\\ufe0e\\ufe0f",ZLe="\\u200d",JLe=RegExp("["+ZLe+YLe+KLe+QLe+"]");o(eDe,"hasUnicode");VJ=eDe});function tDe(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i{"use strict";o(tDe,"arrayReduce");HJ=tDe});function rDe(t,e){return t&&Bo(e,zr(e),t)}var YJ,qJ=M(()=>{"use strict";wd();xc();o(rDe,"baseAssign");YJ=rDe});function nDe(t,e){return t&&Bo(e,xs(e),t)}var XJ,jJ=M(()=>{"use strict";wd();Mh();o(nDe,"baseAssignIn");XJ=nDe});function iDe(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r{"use strict";o(iDe,"arrayFilter");Sm=iDe});function aDe(){return[]}var xw,vL=M(()=>{"use strict";o(aDe,"stubArray");xw=aDe});var sDe,oDe,KJ,lDe,Cm,bw=M(()=>{"use strict";vw();vL();sDe=Object.prototype,oDe=sDe.propertyIsEnumerable,KJ=Object.getOwnPropertySymbols,lDe=KJ?function(t){return t==null?[]:(t=Object(t),Sm(KJ(t),function(e){return oDe.call(t,e)}))}:xw,Cm=lDe});function cDe(t,e){return Bo(t,Cm(t),e)}var QJ,ZJ=M(()=>{"use strict";wd();bw();o(cDe,"copySymbols");QJ=cDe});var uDe,hDe,ww,xL=M(()=>{"use strict";mw();i5();bw();vL();uDe=Object.getOwnPropertySymbols,hDe=uDe?function(t){for(var e=[];t;)km(e,Cm(t)),t=jp(t);return e}:xw,ww=hDe});function fDe(t,e){return Bo(t,ww(t),e)}var JJ,eee=M(()=>{"use strict";wd();xL();o(fDe,"copySymbolsIn");JJ=fDe});function dDe(t,e,r){var n=e(t);return Mt(t)?n:km(n,r(t))}var Tw,bL=M(()=>{"use strict";mw();Vn();o(dDe,"baseGetAllKeys");Tw=dDe});function pDe(t){return Tw(t,zr,Cm)}var Nv,wL=M(()=>{"use strict";bL();bw();xc();o(pDe,"getAllKeys");Nv=pDe});function mDe(t){return Tw(t,xs,ww)}var kw,TL=M(()=>{"use strict";bL();xL();Mh();o(mDe,"getAllKeysIn");kw=mDe});var gDe,Ew,tee=M(()=>{"use strict";Ch();No();gDe=vs(ai,"DataView"),Ew=gDe});var yDe,Sw,ree=M(()=>{"use strict";Ch();No();yDe=vs(ai,"Promise"),Sw=yDe});var vDe,Wh,kL=M(()=>{"use strict";Ch();No();vDe=vs(ai,"Set"),Wh=vDe});var nee,xDe,iee,aee,see,oee,bDe,wDe,TDe,kDe,EDe,Nd,no,Rd=M(()=>{"use strict";tee();K3();ree();kL();TJ();xu();__();nee="[object Map]",xDe="[object Object]",iee="[object Promise]",aee="[object Set]",see="[object WeakMap]",oee="[object DataView]",bDe=bu(Ew),wDe=bu(Lh),TDe=bu(Sw),kDe=bu(Wh),EDe=bu(ow),Nd=ca;(Ew&&Nd(new Ew(new ArrayBuffer(1)))!=oee||Lh&&Nd(new Lh)!=nee||Sw&&Nd(Sw.resolve())!=iee||Wh&&Nd(new Wh)!=aee||ow&&Nd(new ow)!=see)&&(Nd=o(function(t){var e=ca(t),r=e==xDe?t.constructor:void 0,n=r?bu(r):"";if(n)switch(n){case bDe:return oee;case wDe:return nee;case TDe:return iee;case kDe:return aee;case EDe:return see}return e},"getTag"));no=Nd});function ADe(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&CDe.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var SDe,CDe,lee,cee=M(()=>{"use strict";SDe=Object.prototype,CDe=SDe.hasOwnProperty;o(ADe,"initCloneArray");lee=ADe});function _De(t,e){var r=e?Xp(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var uee,hee=M(()=>{"use strict";e5();o(_De,"cloneDataView");uee=_De});function DDe(t){var e=new t.constructor(t.source,LDe.exec(t));return e.lastIndex=t.lastIndex,e}var LDe,fee,dee=M(()=>{"use strict";LDe=/\w*$/;o(DDe,"cloneRegExp");fee=DDe});function NDe(t){return mee?Object(mee.call(t)):{}}var pee,mee,gee,yee=M(()=>{"use strict";gd();pee=ea?ea.prototype:void 0,mee=pee?pee.valueOf:void 0;o(NDe,"cloneSymbol");gee=NDe});function QDe(t,e,r){var n=t.constructor;switch(e){case GDe:return Xp(t);case RDe:case MDe:return new n(+t);case $De:return uee(t,r);case VDe:case UDe:case HDe:case WDe:case YDe:case qDe:case XDe:case jDe:case KDe:return t5(t,r);case IDe:return new n;case ODe:case FDe:return new n(t);case PDe:return fee(t);case BDe:return new n;case zDe:return gee(t)}}var RDe,MDe,IDe,ODe,PDe,BDe,FDe,zDe,GDe,$De,VDe,UDe,HDe,WDe,YDe,qDe,XDe,jDe,KDe,vee,xee=M(()=>{"use strict";e5();hee();dee();yee();P_();RDe="[object Boolean]",MDe="[object Date]",IDe="[object Map]",ODe="[object Number]",PDe="[object RegExp]",BDe="[object Set]",FDe="[object String]",zDe="[object Symbol]",GDe="[object ArrayBuffer]",$De="[object DataView]",VDe="[object Float32Array]",UDe="[object Float64Array]",HDe="[object Int8Array]",WDe="[object Int16Array]",YDe="[object Int32Array]",qDe="[object Uint8Array]",XDe="[object Uint8ClampedArray]",jDe="[object Uint16Array]",KDe="[object Uint32Array]";o(QDe,"initCloneByTag");vee=QDe});function JDe(t){return Zn(t)&&no(t)==ZDe}var ZDe,bee,wee=M(()=>{"use strict";Rd();Mo();ZDe="[object Map]";o(JDe,"baseIsMap");bee=JDe});var Tee,eNe,kee,Eee=M(()=>{"use strict";wee();bd();nv();Tee=Po&&Po.isMap,eNe=Tee?Oo(Tee):bee,kee=eNe});function rNe(t){return Zn(t)&&no(t)==tNe}var tNe,See,Cee=M(()=>{"use strict";Rd();Mo();tNe="[object Set]";o(rNe,"baseIsSet");See=rNe});var Aee,nNe,_ee,Lee=M(()=>{"use strict";Cee();bd();nv();Aee=Po&&Po.isSet,nNe=Aee?Oo(Aee):See,_ee=nNe});function Cw(t,e,r,n,i,a){var s,l=e&iNe,u=e&aNe,h=e&sNe;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!yn(t))return t;var f=Mt(t);if(f){if(s=lee(t),!l)return r5(t,s)}else{var d=no(t),p=d==Nee||d==hNe;if(_l(t))return J3(t,l);if(d==Ree||d==Dee||p&&!i){if(s=u||p?{}:a5(t),!l)return u?JJ(t,XJ(s,t)):QJ(t,YJ(s,t))}else{if(!Sn[d])return i?t:{};s=vee(t,d,l)}}a||(a=new uc);var m=a.get(t);if(m)return m;a.set(t,s),_ee(t)?t.forEach(function(v){s.add(Cw(v,e,r,v,t,a))}):kee(t)&&t.forEach(function(v,x){s.set(x,Cw(v,e,r,x,t,a))});var g=h?u?kw:Nv:u?xs:zr,y=f?void 0:g(t);return lw(y||t,function(v,x){y&&(x=v,v=t[x]),dc(s,x,Cw(v,e,r,x,t,a))}),s}var iNe,aNe,sNe,Dee,oNe,lNe,cNe,uNe,Nee,hNe,fNe,dNe,Ree,pNe,mNe,gNe,yNe,vNe,xNe,bNe,wNe,TNe,kNe,ENe,SNe,CNe,ANe,_Ne,LNe,Sn,Aw,EL=M(()=>{"use strict";ev();dL();em();qJ();jJ();I_();B_();ZJ();eee();wL();TL();Rd();cee();xee();z_();Vn();Jp();Eee();Qs();Lee();xc();Mh();iNe=1,aNe=2,sNe=4,Dee="[object Arguments]",oNe="[object Array]",lNe="[object Boolean]",cNe="[object Date]",uNe="[object Error]",Nee="[object Function]",hNe="[object GeneratorFunction]",fNe="[object Map]",dNe="[object Number]",Ree="[object Object]",pNe="[object RegExp]",mNe="[object Set]",gNe="[object String]",yNe="[object Symbol]",vNe="[object WeakMap]",xNe="[object ArrayBuffer]",bNe="[object DataView]",wNe="[object Float32Array]",TNe="[object Float64Array]",kNe="[object Int8Array]",ENe="[object Int16Array]",SNe="[object Int32Array]",CNe="[object Uint8Array]",ANe="[object Uint8ClampedArray]",_Ne="[object Uint16Array]",LNe="[object Uint32Array]",Sn={};Sn[Dee]=Sn[oNe]=Sn[xNe]=Sn[bNe]=Sn[lNe]=Sn[cNe]=Sn[wNe]=Sn[TNe]=Sn[kNe]=Sn[ENe]=Sn[SNe]=Sn[fNe]=Sn[dNe]=Sn[Ree]=Sn[pNe]=Sn[mNe]=Sn[gNe]=Sn[yNe]=Sn[CNe]=Sn[ANe]=Sn[_Ne]=Sn[LNe]=!0;Sn[uNe]=Sn[Nee]=Sn[vNe]=!1;o(Cw,"baseClone");Aw=Cw});function NNe(t){return Aw(t,DNe)}var DNe,rn,SL=M(()=>{"use strict";EL();DNe=4;o(NNe,"clone");rn=NNe});function INe(t){return Aw(t,RNe|MNe)}var RNe,MNe,CL,Mee=M(()=>{"use strict";EL();RNe=1,MNe=4;o(INe,"cloneDeep");CL=INe});function ONe(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e{"use strict";o(ONe,"compact");Tc=ONe});function BNe(t){return this.__data__.set(t,PNe),this}var PNe,Oee,Pee=M(()=>{"use strict";PNe="__lodash_hash_undefined__";o(BNe,"setCacheAdd");Oee=BNe});function FNe(t){return this.__data__.has(t)}var Bee,Fee=M(()=>{"use strict";o(FNe,"setCacheHas");Bee=FNe});function _w(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new vd;++e{"use strict";Q3();Pee();Fee();o(_w,"SetCache");_w.prototype.add=_w.prototype.push=Oee;_w.prototype.has=Bee;Am=_w});function zNe(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";o(zNe,"arraySome");Dw=zNe});function GNe(t,e){return t.has(e)}var _m,Nw=M(()=>{"use strict";o(GNe,"cacheHas");_m=GNe});function UNe(t,e,r,n,i,a){var s=r&$Ne,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&VNe?new Am:void 0;for(a.set(t,e),a.set(e,t);++d{"use strict";Lw();AL();Nw();$Ne=1,VNe=2;o(UNe,"equalArrays");Rw=UNe});function HNe(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var zee,Gee=M(()=>{"use strict";o(HNe,"mapToArray");zee=HNe});function WNe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Lm,Mw=M(()=>{"use strict";o(WNe,"setToArray");Lm=WNe});function aRe(t,e,r,n,i,a,s){switch(r){case iRe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case nRe:return!(t.byteLength!=e.byteLength||!a(new qp(t),new qp(e)));case XNe:case jNe:case ZNe:return Ro(+t,+e);case KNe:return t.name==e.name&&t.message==e.message;case JNe:case tRe:return t==e+"";case QNe:var l=zee;case eRe:var u=n&YNe;if(l||(l=Lm),t.size!=e.size&&!u)return!1;var h=s.get(t);if(h)return h==e;n|=qNe,s.set(t,e);var f=Rw(l(t),l(e),n,i,a,s);return s.delete(t),f;case rRe:if(LL)return LL.call(t)==LL.call(e)}return!1}var YNe,qNe,XNe,jNe,KNe,QNe,ZNe,JNe,eRe,tRe,rRe,nRe,iRe,$ee,LL,Vee,Uee=M(()=>{"use strict";gd();O_();yd();_L();Gee();Mw();YNe=1,qNe=2,XNe="[object Boolean]",jNe="[object Date]",KNe="[object Error]",QNe="[object Map]",ZNe="[object Number]",JNe="[object RegExp]",eRe="[object Set]",tRe="[object String]",rRe="[object Symbol]",nRe="[object ArrayBuffer]",iRe="[object DataView]",$ee=ea?ea.prototype:void 0,LL=$ee?$ee.valueOf:void 0;o(aRe,"equalByTag");Vee=aRe});function cRe(t,e,r,n,i,a){var s=r&sRe,l=Nv(t),u=l.length,h=Nv(e),f=h.length;if(u!=f&&!s)return!1;for(var d=u;d--;){var p=l[d];if(!(s?p in e:lRe.call(e,p)))return!1}var m=a.get(t),g=a.get(e);if(m&&g)return m==e&&g==t;var y=!0;a.set(t,e),a.set(e,t);for(var v=s;++d{"use strict";wL();sRe=1,oRe=Object.prototype,lRe=oRe.hasOwnProperty;o(cRe,"equalObjects");Hee=cRe});function fRe(t,e,r,n,i,a){var s=Mt(t),l=Mt(e),u=s?qee:no(t),h=l?qee:no(e);u=u==Yee?Iw:u,h=h==Yee?Iw:h;var f=u==Iw,d=h==Iw,p=u==h;if(p&&_l(t)){if(!_l(e))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new uc),s||Nh(t)?Rw(t,e,r,n,i,a):Vee(t,e,u,r,n,i,a);if(!(r&uRe)){var m=f&&Xee.call(t,"__wrapped__"),g=d&&Xee.call(e,"__wrapped__");if(m||g){var y=m?t.value():t,v=g?e.value():e;return a||(a=new uc),i(y,v,r,n,a)}}return p?(a||(a=new uc),Hee(t,e,r,n,i,a)):!1}var uRe,Yee,qee,Iw,hRe,Xee,jee,Kee=M(()=>{"use strict";ev();_L();Uee();Wee();Rd();Vn();Jp();iv();uRe=1,Yee="[object Arguments]",qee="[object Array]",Iw="[object Object]",hRe=Object.prototype,Xee=hRe.hasOwnProperty;o(fRe,"baseIsEqualDeep");jee=fRe});function Qee(t,e,r,n,i){return t===e?!0:t==null||e==null||!Zn(t)&&!Zn(e)?t!==t&&e!==e:jee(t,e,r,n,Qee,i)}var Ow,DL=M(()=>{"use strict";Kee();Mo();o(Qee,"baseIsEqual");Ow=Qee});function mRe(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{"use strict";ev();DL();dRe=1,pRe=2;o(mRe,"baseIsMatch");Zee=mRe});function gRe(t){return t===t&&!yn(t)}var Pw,NL=M(()=>{"use strict";Qs();o(gRe,"isStrictComparable");Pw=gRe});function yRe(t){for(var e=zr(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Pw(i)]}return e}var ete,tte=M(()=>{"use strict";NL();xc();o(yRe,"getMatchData");ete=yRe});function vRe(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var Bw,RL=M(()=>{"use strict";o(vRe,"matchesStrictComparable");Bw=vRe});function xRe(t){var e=ete(t);return e.length==1&&e[0][2]?Bw(e[0][0],e[0][1]):function(r){return r===t||Zee(r,t,e)}}var rte,nte=M(()=>{"use strict";Jee();tte();RL();o(xRe,"baseMatches");rte=xRe});function bRe(t,e){return t!=null&&e in Object(t)}var ite,ate=M(()=>{"use strict";o(bRe,"baseHasIn");ite=bRe});function wRe(t,e,r){e=Uh(e,t);for(var n=-1,i=e.length,a=!1;++n{"use strict";Lv();Qp();Vn();sv();s5();Tm();o(wRe,"hasPath");Fw=wRe});function TRe(t,e){return t!=null&&Fw(t,e,ite)}var zw,IL=M(()=>{"use strict";ate();ML();o(TRe,"hasIn");zw=TRe});function SRe(t,e){return wm(t)&&Pw(e)?Bw(bc(t),e):function(r){var n=IJ(r,t);return n===void 0&&n===e?zw(r,t):Ow(e,n,kRe|ERe)}}var kRe,ERe,ste,ote=M(()=>{"use strict";DL();OJ();IL();dw();NL();RL();Tm();kRe=1,ERe=2;o(SRe,"baseMatchesProperty");ste=SRe});function CRe(t){return function(e){return e?.[t]}}var Gw,OL=M(()=>{"use strict";o(CRe,"baseProperty");Gw=CRe});function ARe(t){return function(e){return Hh(e,t)}}var lte,cte=M(()=>{"use strict";Dv();o(ARe,"basePropertyDeep");lte=ARe});function _Re(t){return wm(t)?Gw(bc(t)):lte(t)}var ute,hte=M(()=>{"use strict";OL();cte();dw();Tm();o(_Re,"property");ute=_Re});function LRe(t){return typeof t=="function"?t:t==null?ta:typeof t=="object"?Mt(t)?ste(t[0],t[1]):rte(t):ute(t)}var dn,Qa=M(()=>{"use strict";nte();ote();Tu();Vn();hte();o(LRe,"baseIteratee");dn=LRe});function DRe(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i{"use strict";o(DRe,"arrayAggregator");fte=DRe});function NRe(t,e){return t&&Yp(t,e,zr)}var Dm,$w=M(()=>{"use strict";Z3();xc();o(NRe,"baseForOwn");Dm=NRe});function RRe(t,e){return function(r,n){if(r==null)return r;if(!si(r))return t(r,n);for(var i=r.length,a=e?i:-1,s=Object(r);(e?a--:++a