Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/404.html b/404.html new file mode 100644 index 000000000..373712824 --- /dev/null +++ b/404.html @@ -0,0 +1,17 @@ + + +
+ + +We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
["'])(?.*?)\1/,y=/\{(? [\d,-]+)\}/,m={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}};function b(t,e){const n=t.map((t=>{const{start:n,end:i}=m[t];return`(?:${n}\\s*(${e.flatMap((t=>[t.line,t.block?.start,t.block?.end].filter(Boolean))).join("|")})\\s*${i})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function _(t,e){let n=t.replace(/\n$/,"");const{language:i,magicComments:r,metastring:a}=e;if(a&&y.test(a)){const t=a.match(y).groups.range;if(0===r.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${a}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const e=r[0].className,i=f()(t).filter((t=>t>0)).map((t=>[t-1,[e]]));return{lineClassNames:Object.fromEntries(i),code:n}}if(void 0===i)return{lineClassNames:{},code:n};const s=function(t,e){switch(t){case"js":case"javascript":case"ts":case"typescript":return b(["js","jsBlock"],e);case"jsx":case"tsx":return b(["js","jsBlock","jsx"],e);case"html":return b(["js","jsBlock","html"],e);case"python":case"py":case"bash":return b(["bash"],e);case"markdown":case"md":return b(["html","jsx","bash"],e);default:return b(Object.keys(m),e)}}(i,r),o=n.split("\n"),c=Object.fromEntries(r.map((t=>[t.className,{start:0,range:""}]))),l=Object.fromEntries(r.filter((t=>t.line)).map((t=>{let{className:e,line:n}=t;return[n,e]}))),h=Object.fromEntries(r.filter((t=>t.block)).map((t=>{let{className:e,block:n}=t;return[n.start,e]}))),u=Object.fromEntries(r.filter((t=>t.block)).map((t=>{let{className:e,block:n}=t;return[n.end,e]})));for(let p=0;p void 0!==t));l[e]?c[l[e]].range+=`${p},`:h[e]?c[h[e]].start=p:u[e]&&(c[u[e]].range+=`${c[u[e]].start}-${p-1},`),o.splice(p,1)}n=o.join("\n");const d={};return Object.entries(c).forEach((t=>{let[e,{range:n}]=t;f()(n).forEach((t=>{d[t]??=[],d[t].push(e)}))})),{lineClassNames:d,code:n}}const x={codeBlockContainer:"codeBlockContainer_Ckt0"};function v(t){let{as:e,...n}=t;const r=function(t){const e={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(t.plain).forEach((t=>{let[i,r]=t;const a=e[i];a&&"string"==typeof r&&(n[a]=r)})),n}(u());return i.createElement(e,(0,a.Z)({},n,{style:r,className:(0,c.Z)(n.className,x.codeBlockContainer,d.k.common.codeBlock)}))}const k={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function w(t){let{children:e,className:n}=t;return i.createElement(v,{as:"pre",tabIndex:0,className:(0,c.Z)(k.codeBlockStandalone,"thin-scrollbar",n)},i.createElement("code",{className:k.codeBlockLines},e))}var C=n(902);const T={attributes:!0,characterData:!0,childList:!0,subtree:!0};function E(t,e){const[n,r]=(0,i.useState)(),a=(0,i.useCallback)((()=>{r(t.current?.closest("[role=tabpanel][hidden]"))}),[t,r]);(0,i.useEffect)((()=>{a()}),[a]),function(t,e,n){void 0===n&&(n=T);const r=(0,C.zX)(e),a=(0,C.Ql)(n);(0,i.useEffect)((()=>{const e=new MutationObserver(r);return t&&e.observe(t,a),()=>e.disconnect()}),[t,r,a])}(n,(t=>{t.forEach((t=>{"attributes"===t.type&&"hidden"===t.attributeName&&(e(),a())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}const S={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var A={Prism:n(7410).Z,theme:S};function L(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(){return B=Object.assign||function(t){for(var e=1;e 0&&t[n-1]===e?t:t.concat(e)};function M(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===e.indexOf(i)&&(n[i]=t[i]);return n}var I=function(t){function e(){for(var e=this,n=[],i=arguments.length;i--;)n[i]=arguments[i];t.apply(this,n),L(this,"getThemeDict",(function(t){if(void 0!==e.themeDict&&t.theme===e.prevTheme&&t.language===e.prevLanguage)return e.themeDict;e.prevTheme=t.theme,e.prevLanguage=t.language;var n=t.theme?function(t,e){var n=t.plain,i=Object.create(null),r=t.styles.reduce((function(t,n){var i=n.languages,r=n.style;return i&&!i.includes(e)||n.types.forEach((function(e){var n=B({},t[e],r);t[e]=n})),t}),i);return r.root=n,r.plain=B({},n,{backgroundColor:null}),r}(t.theme,t.language):void 0;return e.themeDict=n})),L(this,"getLineProps",(function(t){var n=t.key,i=t.className,r=t.style,a=B({},M(t,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),s=e.getThemeDict(e.props);return void 0!==s&&(a.style=s.plain),void 0!==r&&(a.style=void 0!==a.style?B({},a.style,r):r),void 0!==n&&(a.key=n),i&&(a.className+=" "+i),a})),L(this,"getStyleForToken",(function(t){var n=t.types,i=t.empty,r=n.length,a=e.getThemeDict(e.props);if(void 0!==a){if(1===r&&"plain"===n[0])return i?{display:"inline-block"}:void 0;if(1===r&&!i)return a[n[0]];var s=i?{display:"inline-block"}:{},o=n.map((function(t){return a[t]}));return Object.assign.apply(Object,[s].concat(o))}})),L(this,"getTokenProps",(function(t){var n=t.key,i=t.className,r=t.style,a=t.token,s=B({},M(t,["key","className","style","token"]),{className:"token "+a.types.join(" "),children:a.content,style:e.getStyleForToken(a),key:void 0});return void 0!==r&&(s.style=void 0!==s.style?B({},s.style,r):r),void 0!==n&&(s.key=n),i&&(s.className+=" "+i),s})),L(this,"tokenize",(function(t,e,n,i){var r={code:e,grammar:n,language:i,tokens:[]};t.hooks.run("before-tokenize",r);var a=r.tokens=t.tokenize(r.code,r.grammar,r.language);return t.hooks.run("after-tokenize",r),a}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.props,e=t.Prism,n=t.language,i=t.code,r=t.children,a=this.getThemeDict(this.props),s=e.languages[n];return r({tokens:function(t){for(var e=[[]],n=[t],i=[0],r=[t.length],a=0,s=0,o=[],c=[o];s>-1;){for(;(a=i[s]++) 0?h:["plain"],l=u):(h=O(h,u.type),u.alias&&(h=O(h,u.alias)),l=u.content),"string"==typeof l){var d=l.split(N),p=d.length;o.push({types:h,content:d[0]});for(var f=1;f i.createElement("span",(0,a.Z)({key:e},o({token:t,key:e})))));return i.createElement("span",l,r?i.createElement(i.Fragment,null,i.createElement("span",{className:$.codeLineNumber}),i.createElement("span",{className:$.codeLineContent},h)):h,i.createElement("br",null))}var Z=n(5999);function P(t){return i.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},t),i.createElement("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}))}function j(t){return i.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},t),i.createElement("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}const Y={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function z(t){let{code:e,className:n}=t;const[r,a]=(0,i.useState)(!1),s=(0,i.useRef)(void 0),o=(0,i.useCallback)((()=>{!function(t,e){let{target:n=document.body}=void 0===e?{}:e;if("string"!=typeof t)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof t}\`.`);const i=document.createElement("textarea"),r=document.activeElement;i.value=t,i.setAttribute("readonly",""),i.style.contain="strict",i.style.position="absolute",i.style.left="-9999px",i.style.fontSize="12pt";const a=document.getSelection(),s=a.rangeCount>0&&a.getRangeAt(0);n.append(i),i.select(),i.selectionStart=0,i.selectionEnd=t.length;let o=!1;try{o=document.execCommand("copy")}catch{}i.remove(),s&&(a.removeAllRanges(),a.addRange(s)),r&&r.focus()}(e),a(!0),s.current=window.setTimeout((()=>{a(!1)}),1e3)}),[e]);return(0,i.useEffect)((()=>()=>window.clearTimeout(s.current)),[]),i.createElement("button",{type:"button","aria-label":r?(0,Z.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,Z.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,Z.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,c.Z)("clean-btn",n,Y.copyButton,r&&Y.copyButtonCopied),onClick:o},i.createElement("span",{className:Y.copyButtonIcons,"aria-hidden":"true"},i.createElement(P,{className:Y.copyButtonIcon}),i.createElement(j,{className:Y.copyButtonSuccessIcon})))}function U(t){return i.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},t),i.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}const W={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function q(t){let{className:e,onClick:n,isEnabled:r}=t;const a=(0,Z.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return i.createElement("button",{type:"button",onClick:n,className:(0,c.Z)("clean-btn",e,r&&W.wordWrapButtonEnabled),"aria-label":a,title:a},i.createElement(U,{className:W.wordWrapButtonIcon,"aria-hidden":"true"}))}function H(t){let{children:e,className:n="",metastring:r,title:s,showLineNumbers:o,language:l}=t;const{prism:{defaultLanguage:d,magicComments:p}}=(0,h.L)(),f=l??function(t){const e=t.split(" ").find((t=>t.startsWith("language-")));return e?.replace(/language-/,"")}(n)??d,y=u(),m=function(){const[t,e]=(0,i.useState)(!1),[n,r]=(0,i.useState)(!1),a=(0,i.useRef)(null),s=(0,i.useCallback)((()=>{const n=a.current.querySelector("code");t?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),e((t=>!t))}),[a,t]),o=(0,i.useCallback)((()=>{const{scrollWidth:t,clientWidth:e}=a.current,n=t>e||a.current.querySelector("code").hasAttribute("style");r(n)}),[a]);return E(a,o),(0,i.useEffect)((()=>{o()}),[t,o]),(0,i.useEffect)((()=>(window.addEventListener("resize",o,{passive:!0}),()=>{window.removeEventListener("resize",o)})),[o]),{codeBlockRef:a,isEnabled:t,isCodeScrollable:n,toggle:s}}(),b=function(t){return t?.match(g)?.groups.title??""}(r)||s,{lineClassNames:x,code:w}=_(e,{metastring:r,language:f,magicComments:p}),C=o??function(t){return Boolean(t?.includes("showLineNumbers"))}(r);return i.createElement(v,{as:"div",className:(0,c.Z)(n,f&&!n.includes(`language-${f}`)&&`language-${f}`)},b&&i.createElement("div",{className:k.codeBlockTitle},b),i.createElement("div",{className:k.codeBlockContent},i.createElement(F,(0,a.Z)({},A,{theme:y,code:w,language:f??"text"}),(t=>{let{className:e,tokens:n,getLineProps:r,getTokenProps:a}=t;return i.createElement("pre",{tabIndex:0,ref:m.codeBlockRef,className:(0,c.Z)(e,k.codeBlock,"thin-scrollbar")},i.createElement("code",{className:(0,c.Z)(k.codeBlockLines,C&&k.codeBlockLinesWithNumbering)},n.map(((t,e)=>i.createElement(R,{key:e,line:t,getLineProps:r,getTokenProps:a,classNames:x[e],showLineNumbers:C})))))})),i.createElement("div",{className:k.buttonGroup},(m.isEnabled||m.isCodeScrollable)&&i.createElement(q,{className:k.codeButton,onClick:()=>m.toggle(),isEnabled:m.isEnabled}),i.createElement(z,{className:k.codeButton,code:w}))))}function V(t){let{children:e,...n}=t;const r=(0,o.Z)(),s=function(t){return i.Children.toArray(t).some((t=>(0,i.isValidElement)(t)))?t:Array.isArray(t)?t.join(""):t}(e),c="string"==typeof s?H:w;return i.createElement(c,(0,a.Z)({key:String(r)},n),s)}var G=n(9960);var X=n(6043);const K={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function Q(t){return!!t&&("SUMMARY"===t.tagName||Q(t.parentElement))}function J(t,e){return!!t&&(t===e||J(t.parentElement,e))}function tt(t){let{summary:e,children:n,...r}=t;const s=(0,o.Z)(),l=(0,i.useRef)(null),{collapsed:h,setCollapsed:u}=(0,X.u)({initialState:!r.open}),[d,p]=(0,i.useState)(r.open),f=i.isValidElement(e)?e:i.createElement("summary",null,e??"Details");return i.createElement("details",(0,a.Z)({},r,{ref:l,open:d,"data-collapsed":h,className:(0,c.Z)(K.details,s&&K.isBrowser,r.className),onMouseDown:t=>{Q(t.target)&&t.detail>1&&t.preventDefault()},onClick:t=>{t.stopPropagation();const e=t.target;Q(e)&&J(e,l.current)&&(t.preventDefault(),h?(u(!1),p(!0)):u(!0))}}),f,i.createElement(X.z,{lazy:!1,collapsed:h,disableSSRStyle:!0,onCollapseTransitionEnd:t=>{u(t),p(!t)}},i.createElement("div",{className:K.collapsibleContent},n)))}const et={details:"details_b_Ee"},nt="alert alert--info";function it(t){let{...e}=t;return i.createElement(tt,(0,a.Z)({},e,{className:(0,c.Z)(nt,et.details,e.className)}))}var rt=n(2503);function at(t){return i.createElement(rt.Z,t)}const st={containsTaskList:"containsTaskList_mC6p"};const ot={img:"img_ev3q"};const ct="admonition_LlT9",lt="admonitionHeading_tbUL",ht="admonitionIcon_kALy",ut="admonitionContent_S0QG";const dt={note:{infimaClassName:"secondary",iconComponent:function(){return i.createElement("svg",{viewBox:"0 0 14 16"},i.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:i.createElement(Z.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return i.createElement("svg",{viewBox:"0 0 12 16"},i.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:i.createElement(Z.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return i.createElement("svg",{viewBox:"0 0 12 16"},i.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:i.createElement(Z.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return i.createElement("svg",{viewBox:"0 0 14 16"},i.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:i.createElement(Z.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return i.createElement("svg",{viewBox:"0 0 16 16"},i.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:i.createElement(Z.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},pt={secondary:"note",important:"info",success:"tip",warning:"danger"};function ft(t){const{mdxAdmonitionTitle:e,rest:n}=function(t){const e=i.Children.toArray(t),n=e.find((t=>i.isValidElement(t)&&"mdxAdmonitionTitle"===t.props?.mdxType)),r=i.createElement(i.Fragment,null,e.filter((t=>t!==n)));return{mdxAdmonitionTitle:n,rest:r}}(t.children);return{...t,title:t.title??e,children:n}}function gt(t){let{children:e,fallback:n}=t;return(0,o.Z)()?i.createElement(i.Fragment,null,e?.()):n??null}var yt=n(3744);const mt="docusaurus-mermaid-container";function bt(){const{colorMode:t}=(0,l.I)(),e=(0,h.L)().mermaid,n=e.theme[t],{options:r}=e;return(0,i.useMemo)((()=>({startOnLoad:!1,...r,theme:n})),[n,r])}const _t={container:"container_lyt7"};function xt(t){let{value:e}=t;const n=function(t,e){const n=bt(),r=e??n;return(0,i.useMemo)((()=>{yt.o.mermaidAPI.initialize(r);const e=`mermaid-svg-${Math.round(1e7*Math.random())}`;return yt.o.render(e,t)}),[t,r])}(e);return i.createElement("div",{className:`${mt} ${_t.container}`,dangerouslySetInnerHTML:{__html:n}})}const vt={head:function(t){const e=i.Children.map(t.children,(t=>i.isValidElement(t)?function(t){if(t.props?.mdxType&&t.props.originalType){const{mdxType:e,originalType:n,...r}=t.props;return i.createElement(t.props.originalType,r)}return t}(t):t));return i.createElement(s.Z,t,e)},code:function(t){const e=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return i.Children.toArray(t.children).every((t=>"string"==typeof t&&!t.includes("\n")||(0,i.isValidElement)(t)&&e.includes(t.props?.mdxType)))?i.createElement("code",t):i.createElement(V,t)},a:function(t){return i.createElement(G.Z,t)},pre:function(t){return i.createElement(V,(0,i.isValidElement)(t.children)&&"code"===t.children.props?.originalType?t.children.props:{...t})},details:function(t){const e=i.Children.toArray(t.children),n=e.find((t=>i.isValidElement(t)&&"summary"===t.props?.mdxType)),r=i.createElement(i.Fragment,null,e.filter((t=>t!==n)));return i.createElement(it,(0,a.Z)({},t,{summary:n}),r)},ul:function(t){return i.createElement("ul",(0,a.Z)({},t,{className:(e=t.className,(0,c.Z)(e,e?.includes("contains-task-list")&&st.containsTaskList))}));var e},img:function(t){return i.createElement("img",(0,a.Z)({loading:"lazy"},t,{className:(e=t.className,(0,c.Z)(e,ot.img))}));var e},h1:t=>i.createElement(at,(0,a.Z)({as:"h1"},t)),h2:t=>i.createElement(at,(0,a.Z)({as:"h2"},t)),h3:t=>i.createElement(at,(0,a.Z)({as:"h3"},t)),h4:t=>i.createElement(at,(0,a.Z)({as:"h4"},t)),h5:t=>i.createElement(at,(0,a.Z)({as:"h5"},t)),h6:t=>i.createElement(at,(0,a.Z)({as:"h6"},t)),admonition:function(t){const{children:e,type:n,title:r,icon:a}=ft(t),s=function(t){const e=pt[t]??t,n=dt[e];return n||(console.warn(`No admonition config found for admonition type "${e}". Using Info as fallback.`),dt.info)}(n),o=r??s.label,{iconComponent:l}=s,h=a??i.createElement(l,null);return i.createElement("div",{className:(0,c.Z)(d.k.common.admonition,d.k.common.admonitionType(t.type),"alert",`alert--${s.infimaClassName}`,ct)},i.createElement("div",{className:lt},i.createElement("span",{className:ht},h),o),i.createElement("div",{className:ut},e))},mermaid:function(t){return i.createElement(gt,null,(()=>i.createElement(xt,t)))}};function kt(t){let{children:e}=t;return i.createElement(r.Zo,{components:vt},e)}},7484:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,n=36e5,i="millisecond",r="second",a="minute",s="hour",o="day",c="week",l="month",h="quarter",u="year",d="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},b={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(r,2,"0")},m:function t(e,n){if(e.date()
1)return t(s[0])}else{var o=e.name;x[o]=e,r=o}return!i&&r&&(_=r),r||!i&&_},w=function(t,e){if(v(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new T(n)},C=b;C.l=k,C.i=v,C.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var T=function(){function y(t){this.$L=k(t.locale,null,!0),this.parse(t)}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(C.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(f);if(i){var r=i[2]-1||0,a=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return C},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t) 68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],l=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,i=a.meridiem;if(i){for(var r=1;r<=24;r+=1)if(t.indexOf(i(r,0,e))>-1){n=r>12;break}}else n=t===(e?"pm":"PM");return n},u={A:[r,function(t){this.afternoon=h(t,!1)}],a:[r,function(t){this.afternoon=h(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,o("seconds")],ss:[i,o("seconds")],m:[i,o("minutes")],mm:[i,o("minutes")],H:[i,o("hours")],h:[i,o("hours")],HH:[i,o("hours")],hh:[i,o("hours")],D:[i,o("day")],DD:[n,o("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],M:[i,o("month")],MM:[n,o("month")],MMM:[r,function(t){var e=l("months"),n=(l("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=l("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[n,function(t){this.year=s(t)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function d(n){var i,r;i=n,r=a&&a.formats;for(var s=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var a=i&&i.toUpperCase();return n||r[i]||t[i]||r[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=s.length,c=0;c -1)return new Date(("X"===e?1e3:1)*t);var i=d(e)(t),r=i.year,a=i.month,s=i.day,o=i.hours,c=i.minutes,l=i.seconds,h=i.milliseconds,u=i.zone,p=new Date,f=s||(r||a?1:p.getDate()),g=r||p.getFullYear(),y=0;r&&!a||(y=a>0?a-1:p.getMonth());var m=o||0,b=c||0,_=l||0,x=h||0;return u?new Date(Date.UTC(g,y,f,m,b,_,x+60*u.offset*1e3)):n?new Date(Date.UTC(g,y,f,m,b,_,x)):new Date(g,y,f,m,b,_,x)}catch(t){return new Date("")}}(e,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),h&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var p=o.length,f=1;f<=p;f+=1){s[1]=o[f-1];var g=n.apply(this,s);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}f===p&&(this.$d=new Date(""))}else r.call(this,t)}}}()},9542:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var r=function(e){return e.add(4-e.isoWeekday(),t)},a=n.prototype;a.isoWeekYear=function(){return r(this).year()},a.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,a,s,o=r(this),c=(n=this.isoWeekYear(),s=4-(a=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),a.isoWeekday()>4&&(s+=7),a.add(s,t));return o.diff(c,"week")+1},a.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var s=a.startOf;a.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(t,e)}}}()},7856:function(t){t.exports=function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,n){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function i(t,r,a){return i=n()?Reflect.construct:function(t,n,i){var r=[null];r.push.apply(r,n);var a=new(Function.bind.apply(t,r));return i&&e(a,i.prototype),a},i.apply(null,arguments)}function r(t){return a(t)||s(t)||o(t)||l()}function a(t){if(Array.isArray(t))return c(t)}function s(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n 1?n-1:0),r=1;r /gm),X=y(/\${[\w\W]*}/gm),K=y(/^data-[\-\w.\u00B7-\uFFFF]/),Q=y(/^aria-[\-\w]+$/),J=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tt=y(/^(?:\w+script|data):/i),et=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nt=y(/^html$/i),it=function(){return"undefined"==typeof window?null:window},rt=function(e,n){if("object"!==t(e)||"function"!=typeof e.createPolicy)return null;var i=null,r="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(r)&&(i=n.currentScript.getAttribute(r));var a="dompurify"+(i?"#"+i:"");try{return e.createPolicy(a,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(s){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function at(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:it(),n=function(t){return at(t)};if(n.version="2.4.3",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var i=e.document,a=e.document,s=e.DocumentFragment,o=e.HTMLTemplateElement,c=e.Node,l=e.Element,h=e.NodeFilter,u=e.NamedNodeMap,d=void 0===u?e.NamedNodeMap||e.MozNamedAttrMap:u,p=e.HTMLFormElement,f=e.DOMParser,y=e.trustedTypes,m=l.prototype,b=F(m,"cloneNode"),_=F(m,"nextSibling"),x=F(m,"childNodes"),D=F(m,"parentNode");if("function"==typeof o){var O=a.createElement("template");O.content&&O.content.ownerDocument&&(a=O.content.ownerDocument)}var st=rt(y,i),ot=st?st.createHTML(""):"",ct=a,lt=ct.implementation,ht=ct.createNodeIterator,ut=ct.createDocumentFragment,dt=ct.getElementsByTagName,pt=i.importNode,ft={};try{ft=I(a).documentMode?a.documentMode:{}}catch(De){}var gt={};n.isSupported="function"==typeof D&<&&void 0!==lt.createHTMLDocument&&9!==ft;var yt,mt,bt=V,_t=G,xt=X,vt=K,kt=Q,wt=tt,Ct=et,Tt=J,Et=null,St=M({},[].concat(r($),r(R),r(Z),r(j),r(z))),At=null,Lt=M({},[].concat(r(U),r(W),r(q),r(H))),Bt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Nt=null,Dt=null,Ot=!0,Mt=!0,It=!1,Ft=!1,$t=!1,Rt=!1,Zt=!1,Pt=!1,jt=!1,Yt=!1,zt=!0,Ut=!1,Wt="user-content-",qt=!0,Ht=!1,Vt={},Gt=null,Xt=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Kt=null,Qt=M({},["audio","video","img","source","image","track"]),Jt=null,te=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",ne="http://www.w3.org/2000/svg",ie="http://www.w3.org/1999/xhtml",re=ie,ae=!1,se=null,oe=M({},[ee,ne,ie],T),ce=["application/xhtml+xml","text/html"],le="text/html",he=null,ue=a.createElement("form"),de=function(t){return t instanceof RegExp||t instanceof Function},pe=function(e){he&&he===e||(e&&"object"===t(e)||(e={}),e=I(e),yt=yt=-1===ce.indexOf(e.PARSER_MEDIA_TYPE)?le:e.PARSER_MEDIA_TYPE,mt="application/xhtml+xml"===yt?T:C,Et="ALLOWED_TAGS"in e?M({},e.ALLOWED_TAGS,mt):St,At="ALLOWED_ATTR"in e?M({},e.ALLOWED_ATTR,mt):Lt,se="ALLOWED_NAMESPACES"in e?M({},e.ALLOWED_NAMESPACES,T):oe,Jt="ADD_URI_SAFE_ATTR"in e?M(I(te),e.ADD_URI_SAFE_ATTR,mt):te,Kt="ADD_DATA_URI_TAGS"in e?M(I(Qt),e.ADD_DATA_URI_TAGS,mt):Qt,Gt="FORBID_CONTENTS"in e?M({},e.FORBID_CONTENTS,mt):Xt,Nt="FORBID_TAGS"in e?M({},e.FORBID_TAGS,mt):{},Dt="FORBID_ATTR"in e?M({},e.FORBID_ATTR,mt):{},Vt="USE_PROFILES"in e&&e.USE_PROFILES,Ot=!1!==e.ALLOW_ARIA_ATTR,Mt=!1!==e.ALLOW_DATA_ATTR,It=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=e.SAFE_FOR_TEMPLATES||!1,$t=e.WHOLE_DOCUMENT||!1,Pt=e.RETURN_DOM||!1,jt=e.RETURN_DOM_FRAGMENT||!1,Yt=e.RETURN_TRUSTED_TYPE||!1,Zt=e.FORCE_BODY||!1,zt=!1!==e.SANITIZE_DOM,Ut=e.SANITIZE_NAMED_PROPS||!1,qt=!1!==e.KEEP_CONTENT,Ht=e.IN_PLACE||!1,Tt=e.ALLOWED_URI_REGEXP||Tt,re=e.NAMESPACE||ie,e.CUSTOM_ELEMENT_HANDLING&&de(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Bt.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&de(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Bt.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Bt.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(Mt=!1),jt&&(Pt=!0),Vt&&(Et=M({},r(z)),At=[],!0===Vt.html&&(M(Et,$),M(At,U)),!0===Vt.svg&&(M(Et,R),M(At,W),M(At,H)),!0===Vt.svgFilters&&(M(Et,Z),M(At,W),M(At,H)),!0===Vt.mathMl&&(M(Et,j),M(At,q),M(At,H))),e.ADD_TAGS&&(Et===St&&(Et=I(Et)),M(Et,e.ADD_TAGS,mt)),e.ADD_ATTR&&(At===Lt&&(At=I(At)),M(At,e.ADD_ATTR,mt)),e.ADD_URI_SAFE_ATTR&&M(Jt,e.ADD_URI_SAFE_ATTR,mt),e.FORBID_CONTENTS&&(Gt===Xt&&(Gt=I(Gt)),M(Gt,e.FORBID_CONTENTS,mt)),qt&&(Et["#text"]=!0),$t&&M(Et,["html","head","body"]),Et.table&&(M(Et,["tbody"]),delete Nt.tbody),g&&g(e),he=e)},fe=M({},["mi","mo","mn","ms","mtext"]),ge=M({},["foreignobject","desc","title","annotation-xml"]),ye=M({},["title","style","font","a","script"]),me=M({},R);M(me,Z),M(me,P);var be=M({},j);M(be,Y);var _e=function(t){var e=D(t);e&&e.tagName||(e={namespaceURI:re,tagName:"template"});var n=C(t.tagName),i=C(e.tagName);return!!se[t.namespaceURI]&&(t.namespaceURI===ne?e.namespaceURI===ie?"svg"===n:e.namespaceURI===ee?"svg"===n&&("annotation-xml"===i||fe[i]):Boolean(me[n]):t.namespaceURI===ee?e.namespaceURI===ie?"math"===n:e.namespaceURI===ne?"math"===n&&ge[i]:Boolean(be[n]):t.namespaceURI===ie?!(e.namespaceURI===ne&&!ge[i])&&!(e.namespaceURI===ee&&!fe[i])&&!be[n]&&(ye[n]||!me[n]):!("application/xhtml+xml"!==yt||!se[t.namespaceURI]))},xe=function(t){w(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(De){try{t.outerHTML=ot}catch(De){t.remove()}}},ve=function(t,e){try{w(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(De){w(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!At[t])if(Pt||jt)try{xe(e)}catch(De){}else try{e.setAttribute(t,"")}catch(De){}},ke=function(t){var e,n;if(Zt)t=" "+t;else{var i=E(t,/^[\r\n\t ]+/);n=i&&i[0]}"application/xhtml+xml"===yt&&re===ie&&(t=''+t+"");var r=st?st.createHTML(t):t;if(re===ie)try{e=(new f).parseFromString(r,yt)}catch(De){}if(!e||!e.documentElement){e=lt.createDocument(re,"template",null);try{e.documentElement.innerHTML=ae?ot:r}catch(De){}}var s=e.body||e.documentElement;return t&&n&&s.insertBefore(a.createTextNode(n),s.childNodes[0]||null),re===ie?dt.call(e,$t?"html":"body")[0]:$t?e.documentElement:s},we=function(t){return ht.call(t.ownerDocument||t,t,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},Ce=function(t){return t instanceof p&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Te=function(e){return"object"===t(c)?e instanceof c:e&&"object"===t(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ee=function(t,e,i){gt[t]&&v(gt[t],(function(t){t.call(n,e,i,he)}))},Se=function(t){var e;if(Ee("beforeSanitizeElements",t,null),Ce(t))return xe(t),!0;if(B(/[\u0080-\uFFFF]/,t.nodeName))return xe(t),!0;var i=mt(t.nodeName);if(Ee("uponSanitizeElement",t,{tagName:i,allowedTags:Et}),t.hasChildNodes()&&!Te(t.firstElementChild)&&(!Te(t.content)||!Te(t.content.firstElementChild))&&B(/<[/\w]/g,t.innerHTML)&&B(/<[/\w]/g,t.textContent))return xe(t),!0;if("select"===i&&B(/=0;--s)r.insertBefore(b(a[s],!0),_(t))}return xe(t),!0}return t instanceof l&&!_e(t)?(xe(t),!0):"noscript"!==i&&"noembed"!==i||!B(/<\/no(script|embed)/i,t.innerHTML)?(Ft&&3===t.nodeType&&(e=t.textContent,e=S(e,bt," "),e=S(e,_t," "),e=S(e,xt," "),t.textContent!==e&&(w(n.removed,{element:t.cloneNode()}),t.textContent=e)),Ee("afterSanitizeElements",t,null),!1):(xe(t),!0)},Ae=function(t,e,n){if(zt&&("id"===e||"name"===e)&&(n in a||n in ue))return!1;if(Mt&&!Dt[e]&&B(vt,e));else if(Ot&&B(kt,e));else if(!At[e]||Dt[e]){if(!(Le(t)&&(Bt.tagNameCheck instanceof RegExp&&B(Bt.tagNameCheck,t)||Bt.tagNameCheck instanceof Function&&Bt.tagNameCheck(t))&&(Bt.attributeNameCheck instanceof RegExp&&B(Bt.attributeNameCheck,e)||Bt.attributeNameCheck instanceof Function&&Bt.attributeNameCheck(e))||"is"===e&&Bt.allowCustomizedBuiltInElements&&(Bt.tagNameCheck instanceof RegExp&&B(Bt.tagNameCheck,n)||Bt.tagNameCheck instanceof Function&&Bt.tagNameCheck(n))))return!1}else if(Jt[e]);else if(B(Tt,S(n,Ct,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==A(n,"data:")||!Kt[t])if(It&&!B(wt,S(n,Ct,"")));else if(n)return!1;return!0},Le=function(t){return t.indexOf("-")>0},Be=function(e){var i,r,a,s;Ee("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){var c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:At};for(s=o.length;s--;){var l=i=o[s],h=l.name,u=l.namespaceURI;if(r="value"===h?i.value:L(i.value),a=mt(h),c.attrName=a,c.attrValue=r,c.keepAttr=!0,c.forceKeepAttr=void 0,Ee("uponSanitizeAttribute",e,c),r=c.attrValue,!c.forceKeepAttr&&(ve(h,e),c.keepAttr))if(B(/\/>/i,r))ve(h,e);else{Ft&&(r=S(r,bt," "),r=S(r,_t," "),r=S(r,xt," "));var d=mt(e.nodeName);if(Ae(d,a,r)){if(!Ut||"id"!==a&&"name"!==a||(ve(h,e),r=Wt+r),st&&"object"===t(y)&&"function"==typeof y.getAttributeType)if(u);else switch(y.getAttributeType(d,a)){case"TrustedHTML":r=st.createHTML(r);break;case"TrustedScriptURL":r=st.createScriptURL(r)}try{u?e.setAttributeNS(u,h,r):e.setAttribute(h,r),k(n.removed)}catch(De){}}}}Ee("afterSanitizeAttributes",e,null)}},Ne=function t(e){var n,i=we(e);for(Ee("beforeSanitizeShadowDOM",e,null);n=i.nextNode();)Ee("uponSanitizeShadowNode",n,null),Se(n)||(n.content instanceof s&&t(n.content),Be(n));Ee("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(r){var a,o,l,h,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ae=!r)&&(r="\x3c!--\x3e"),"string"!=typeof r&&!Te(r)){if("function"!=typeof r.toString)throw N("toString is not a function");if("string"!=typeof(r=r.toString()))throw N("dirty is not a string, aborting")}if(!n.isSupported){if("object"===t(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(Te(r))return e.toStaticHTML(r.outerHTML)}return r}if(Rt||pe(d),n.removed=[],"string"==typeof r&&(Ht=!1),Ht){if(r.nodeName){var p=mt(r.nodeName);if(!Et[p]||Nt[p])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(r instanceof c)1===(o=(a=ke("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?a=o:a.appendChild(o);else{if(!Pt&&!Ft&&!$t&&-1===r.indexOf("<"))return st&&Yt?st.createHTML(r):r;if(!(a=ke(r)))return Pt?null:Yt?ot:""}a&&Zt&&xe(a.firstChild);for(var f=we(Ht?r:a);l=f.nextNode();)3===l.nodeType&&l===h||Se(l)||(l.content instanceof s&&Ne(l.content),Be(l),h=l);if(h=null,Ht)return r;if(Pt){if(jt)for(u=ut.call(a.ownerDocument);a.firstChild;)u.appendChild(a.firstChild);else u=a;return At.shadowroot&&(u=pt.call(i,u,!0)),u}var g=$t?a.outerHTML:a.innerHTML;return $t&&Et["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&B(nt,a.ownerDocument.doctype.name)&&(g="\n"+g),Ft&&(g=S(g,bt," "),g=S(g,_t," "),g=S(g,xt," ")),st&&Yt?st.createHTML(g):g},n.setConfig=function(t){pe(t),Rt=!0},n.clearConfig=function(){he=null,Rt=!1},n.isValidAttribute=function(t,e,n){he||pe({});var i=mt(t),r=mt(e);return Ae(i,r,n)},n.addHook=function(t,e){"function"==typeof e&&(gt[t]=gt[t]||[],w(gt[t],e))},n.removeHook=function(t){if(gt[t])return k(gt[t])},n.removeHooks=function(t){gt[t]&&(gt[t]=[])},n.removeAllHooks=function(){gt={}},n}return at()}()},3744:(t,e,n)=>{"use strict";n.d(e,{a:()=>Pn,b:()=>Ys,c:()=>jt,d:()=>Rn,e:()=>Zt,f:()=>Vs,g:()=>ui,h:()=>wc,i:()=>ys,j:()=>qi,k:()=>Vi,l:()=>Bt,m:()=>Ri,n:()=>It,o:()=>Sp,p:()=>Co,s:()=>_i});const i=function(t){for(var e=[],n=1;n {const n=u.Z.parse(t);for(const i in e)n[i]=d.Z.channel.clamp[i](e[i]);return u.Z.stringify(n)},f=(t,e)=>{const n=u.Z.parse(t),i={};for(const r in e)e[r]&&(i[r]=n[r]+e[r]);return p(t,i)};var g=n(1883);const y=(t,e,n=0,i=1)=>{if("number"!=typeof t)return p(t,{a:e});const r=g.Z.set({r:d.Z.channel.clamp.r(t),g:d.Z.channel.clamp.g(e),b:d.Z.channel.clamp.b(n),a:d.Z.channel.clamp.a(i)});return u.Z.stringify(r)},m=(t,e,n=50)=>{const{r:i,g:r,b:a,a:s}=u.Z.parse(t),{r:o,g:c,b:l,a:h}=u.Z.parse(e),d=n/100,p=2*d-1,f=s-h,g=((p*f==-1?p:(p+f)/(1+p*f))+1)/2,m=1-g;return y(i*g+o*m,r*g+c*m,a*g+l*m,s*d+h*(1-d))},b=(t,e=100)=>{const n=u.Z.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,m(n,t,e)};var _=n(7201),x=n(5920),v=n(2454),k="comm",w="rule",C="decl",T=Math.abs,E=String.fromCharCode;Object.assign;function S(t){return t.trim()}function A(t,e,n){return t.replace(e,n)}function L(t,e){return t.indexOf(e)}function B(t,e){return 0|t.charCodeAt(e)}function N(t,e,n){return t.slice(e,n)}function D(t){return t.length}function O(t,e){return e.push(t),t}function M(t,e){for(var n="",i=0;i 0?B(j,--Z):0,$--,10===P&&($=1,F--),P}function U(){return P=Z 2||V(P)>3?"":" "}function J(t,e){for(;--e&&U()&&!(P<48||P>102||P>57&&P<65||P>70&&P<97););return H(t,q()+(e<6&&32==W()&&32==U()))}function tt(t){for(;U();)switch(P){case t:return Z;case 34:case 39:34!==t&&39!==t&&tt(P);break;case 40:41===t&&tt(t);break;case 92:U()}return Z}function et(t,e){for(;U()&&t+P!==57&&(t+P!==84||47!==W()););return"/*"+H(e,Z-1)+"*"+E(47===t?t:U())}function nt(t){for(;!V(W());)U();return H(t,Z)}function it(t){return X(rt("",null,null,null,[""],t=G(t),0,[0],t))}function rt(t,e,n,i,r,a,s,o,c){for(var l=0,h=0,u=s,d=0,p=0,f=0,g=1,y=1,m=1,b=0,_="",x=r,v=a,k=i,w=_;y;)switch(f=b,b=U()){case 40:if(108!=f&&58==B(w,u-1)){-1!=L(w+=A(K(b),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:w+=K(b);break;case 9:case 10:case 13:case 32:w+=Q(f);break;case 92:w+=J(q()-1,7);continue;case 47:switch(W()){case 42:case 47:O(st(et(U(),q()),e,n,c),c);break;default:w+="/"}break;case 123*g:o[l++]=D(w)*m;case 125*g:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:-1==m&&(w=A(w,/\f/g,"")),p>0&&D(w)-u&&O(p>32?ot(w+";",i,n,u-1,c):ot(A(w," ","")+";",i,n,u-2,c),c);break;case 59:w+=";";default:if(O(k=at(w,e,n,l,h,r,o,_,x=[],v=[],u,a),a),123===b)if(0===h)rt(w,e,k,k,x,a,u,o,v);else switch(99===d&&110===B(w,3)?100:d){case 100:case 108:case 109:case 115:rt(t,k,k,i&&O(at(t,k,k,0,0,r,o,_,r,x=[],u,v),v),r,v,u,o,i?x:v);break;default:rt(w,k,k,k,[""],v,0,o,v)}}l=h=p=0,g=m=1,_=w="",u=s;break;case 58:u=1+D(w),p=f;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==z())continue;switch(w+=E(b),b*g){case 38:m=h>0?1:(w+="\f",-1);break;case 44:o[l++]=(D(w)-1)*m,m=1;break;case 64:45===W()&&(w+=K(U())),d=W(),h=u=D(_=w+=nt(q())),b++;break;case 45:45===f&&2==D(w)&&(g=0)}}return a}function at(t,e,n,i,r,a,s,o,c,l,h,u){for(var d=r-1,p=0===r?a:[""],f=function(t){return t.length}(p),g=0,y=0,m=0;g0?p[b]+" "+_:A(_,/&\f/g,p[b])))&&(c[m++]=x);return Y(t,e,n,0===r?w:o,c,l,h,u)}function st(t,e,n,i){return Y(t,e,n,k,E(P),N(t,2,-2),0,i)}function ot(t,e,n,i,r){return Y(t,e,n,C,N(t,0,i),N(t,i+1,-1),i,r)}var ct=n(277),lt=n(5625),ht=n(9354);const ut=[];for(let c=0;c<256;++c)ut.push((c+256).toString(16).slice(1));function dt(t,e=0){return(ut[t[e+0]]+ut[t[e+1]]+ut[t[e+2]]+ut[t[e+3]]+"-"+ut[t[e+4]]+ut[t[e+5]]+"-"+ut[t[e+6]]+ut[t[e+7]]+"-"+ut[t[e+8]]+ut[t[e+9]]+"-"+ut[t[e+10]]+ut[t[e+11]]+ut[t[e+12]]+ut[t[e+13]]+ut[t[e+14]]+ut[t[e+15]]).toLowerCase()}const pt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const ft=function(t){return"string"==typeof t&&pt.test(t)};const gt=function(t){if(!ft(t))throw TypeError("Invalid UUID");let e;const n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n};function yt(t,e,n,i){switch(t){case 0:return e&n^~e&i;case 1:case 3:return e^n^i;case 2:return e&n^e&i^n&i}}function mt(t,e){return t< >>32-e}const bt=function(t){const e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let n=0;n >>0;l=c,c=o,o=mt(r,30)>>>0,r=i,i=s}n[0]=n[0]+i>>>0,n[1]=n[1]+r>>>0,n[2]=n[2]+o>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+l>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]},_t=function(t,e,n){function i(t,i,r,a){var s;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let n=0;n {},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},Nt=function(t="fatal"){let e=Lt.fatal;"string"==typeof t?(t=t.toLowerCase())in Lt&&(e=Lt[t]):"number"==typeof t&&(e=t),Bt.trace=()=>{},Bt.debug=()=>{},Bt.info=()=>{},Bt.warn=()=>{},Bt.error=()=>{},Bt.fatal=()=>{},e<=Lt.fatal&&(Bt.fatal=console.error?console.error.bind(console,Dt("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",Dt("FATAL"))),e<=Lt.error&&(Bt.error=console.error?console.error.bind(console,Dt("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",Dt("ERROR"))),e<=Lt.warn&&(Bt.warn=console.warn?console.warn.bind(console,Dt("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",Dt("WARN"))),e<=Lt.info&&(Bt.info=console.info?console.info.bind(console,Dt("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",Dt("INFO"))),e<=Lt.debug&&(Bt.debug=console.debug?console.debug.bind(console,Dt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",Dt("DEBUG"))),e<=Lt.trace&&(Bt.trace=console.debug?console.debug.bind(console,Dt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",Dt("TRACE")))},Dt=t=>`%c${a()().format("ss.SSS")} : ${t} : `,Ot=t=>h().sanitize(t),Mt=(t,e)=>{var n;if(!1!==(null==(n=e.flowchart)?void 0:n.htmlLabels)){const n=e.securityLevel;"antiscript"===n||"strict"===n?t=Ot(t):"loose"!==n&&(t=(t=(t=Rt(t)).replace(//g,">")).replace(/=/g,"="),t=$t(t))}return t},It=(t,e)=>t?t=e.dompurifyConfig?h().sanitize(Mt(t,e),e.dompurifyConfig).toString():h().sanitize(Mt(t,e),{FORBID_TAGS:["style"]}).toString():t,Ft=/
/gi,$t=t=>t.replace(/#br#/g,"
"),Rt=t=>t.replace(Ft,"#br#"),Zt=t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),Pt=function(t){let e=t;if(t.split("~").length-1>=2){let t=e;do{e=t,t=e.replace(/~([^\s,:;]+)~/,"<$1>")}while(t!=e);return Pt(t)}return e},jt={getRows:t=>{if(!t)return[""];return Rt(t).replace(/\\n/g,"#br#").split("#br#")},sanitizeText:It,sanitizeTextOrArray:(t,e)=>"string"==typeof t?It(t,e):t.flat().map((t=>It(t,e))),hasBreaks:t=>Ft.test(t),splitBreaks:t=>t.split(Ft),lineBreakRegex:Ft,removeScript:Ot,getUrl:t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},evaluate:Zt},Yt=(t,e)=>f(t,e?{s:-40,l:10}:{s:-40,l:-10}),zt="#ffffff",Ut="#f2f2f2";class Wt{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,x.Z)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=f(this.primaryColor,{h:-160}),this.primaryBorderColor=Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.tertiaryColor),this.lineColor=b(this.background),this.textColor=b(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,x.Z)(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}const qt={base:{getThemeVariables:t=>{const e=new class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||f(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||f(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||b(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||b(this.tertiaryColor),this.lineColor=this.lineColor||b(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,_.Z)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,_.Z)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||b(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,x.Z)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||f(this.primaryColor,{h:30}),this.cScale4=this.cScale4||f(this.primaryColor,{h:60}),this.cScale5=this.cScale5||f(this.primaryColor,{h:90}),this.cScale6=this.cScale6||f(this.primaryColor,{h:120}),this.cScale7=this.cScale7||f(this.primaryColor,{h:150}),this.cScale8=this.cScale8||f(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||f(this.primaryColor,{h:270}),this.cScale10=this.cScale10||f(this.primaryColor,{h:300}),this.cScale11=this.cScale11||f(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e {this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};return e.calculate(t),e}},dark:{getThemeVariables:t=>{const e=new class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,x.Z)(this.primaryColor,16),this.tertiaryColor=f(this.primaryColor,{h:-160}),this.primaryBorderColor=b(this.background),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.tertiaryColor),this.lineColor=b(this.background),this.textColor=b(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,x.Z)(b("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=y(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,_.Z)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=y(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=y(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,x.Z)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,x.Z)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,x.Z)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=f(this.primaryColor,{h:64}),this.fillType3=f(this.secondaryColor,{h:64}),this.fillType4=f(this.primaryColor,{h:-64}),this.fillType5=f(this.secondaryColor,{h:-64}),this.fillType6=f(this.primaryColor,{h:128}),this.fillType7=f(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||f(this.primaryColor,{h:30}),this.cScale4=this.cScale4||f(this.primaryColor,{h:60}),this.cScale5=this.cScale5||f(this.primaryColor,{h:90}),this.cScale6=this.cScale6||f(this.primaryColor,{h:120}),this.cScale7=this.cScale7||f(this.primaryColor,{h:150}),this.cScale8=this.cScale8||f(this.primaryColor,{h:210}),this.cScale9=this.cScale9||f(this.primaryColor,{h:270}),this.cScale10=this.cScale10||f(this.primaryColor,{h:300}),this.cScale11=this.cScale11||f(this.primaryColor,{h:330});for(let t=0;t {this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};return e.calculate(t),e}},default:{getThemeVariables:t=>{const e=new class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=f(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=f(this.primaryColor,{h:-160}),this.primaryBorderColor=Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.tertiaryColor),this.lineColor=b(this.background),this.textColor=b(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=y(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||f(this.primaryColor,{h:30}),this.cScale4=this.cScale4||f(this.primaryColor,{h:60}),this.cScale5=this.cScale5||f(this.primaryColor,{h:90}),this.cScale6=this.cScale6||f(this.primaryColor,{h:120}),this.cScale7=this.cScale7||f(this.primaryColor,{h:150}),this.cScale8=this.cScale8||f(this.primaryColor,{h:210}),this.cScale9=this.cScale9||f(this.primaryColor,{h:270}),this.cScale10=this.cScale10||f(this.primaryColor,{h:300}),this.cScale11=this.cScale11||f(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,_.Z)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,_.Z)(this.tertiaryColor,40);for(let t=0;t {this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};return e.calculate(t),e}},forest:{getThemeVariables:t=>{const e=new class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,x.Z)("#cde498",10),this.primaryBorderColor=Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.primaryColor),this.lineColor=b(this.background),this.textColor=b(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||f(this.primaryColor,{h:30}),this.cScale4=this.cScale4||f(this.primaryColor,{h:60}),this.cScale5=this.cScale5||f(this.primaryColor,{h:90}),this.cScale6=this.cScale6||f(this.primaryColor,{h:120}),this.cScale7=this.cScale7||f(this.primaryColor,{h:150}),this.cScale8=this.cScale8||f(this.primaryColor,{h:210}),this.cScale9=this.cScale9||f(this.primaryColor,{h:270}),this.cScale10=this.cScale10||f(this.primaryColor,{h:300}),this.cScale11=this.cScale11||f(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,_.Z)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,_.Z)(this.tertiaryColor,40);for(let t=0;t {this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};return e.calculate(t),e}},neutral:{getThemeVariables:t=>{const e=new Wt;return e.calculate(t),e}}},Ht={theme:"default",themeVariables:qt.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},timeline:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};Ht.class&&(Ht.class.arrowMarkerAbsolute=Ht.arrowMarkerAbsolute),Ht.gitGraph&&(Ht.gitGraph.arrowMarkerAbsolute=Ht.arrowMarkerAbsolute);const Vt=(t,e="")=>Object.keys(t).reduce(((n,i)=>Array.isArray(t[i])?n:"object"==typeof t[i]&&null!==t[i]?[...n,e+i,...Vt(t[i],"")]:[...n,e+i]),[]),Gt=Vt(Ht,""),Xt=Ht;function Kt(t){return null==t}var Qt={isNothing:Kt,isObject:function(t){return"object"==typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:Kt(t)?[]:[t]},repeat:function(t,e){var n,i="";for(n=0;n o&&(e=i-o+(a=" ... ").length),n-i>o&&(n=i+o-(s=" ...").length),{str:a+t.slice(e,n).replace(/\t/g,"\u2192")+s,pos:i-e+a.length}}function ie(t,e){return Qt.repeat(" ",e-t.length)+t}var re=function(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var n,i=/\r?\n|\r|\0/g,r=[0],a=[],s=-1;n=i.exec(t.buffer);)a.push(n.index),r.push(n.index+n[0].length),t.position<=n.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);var o,c,l="",h=Math.min(t.line+e.linesAfter,a.length).toString().length,u=e.maxLength-(e.indent+h+3);for(o=1;o<=e.linesBefore&&!(s-o<0);o++)c=ne(t.buffer,r[s-o],a[s-o],t.position-(r[s]-r[s-o]),u),l=Qt.repeat(" ",e.indent)+ie((t.line-o+1).toString(),h)+" | "+c.str+"\n"+l;for(c=ne(t.buffer,r[s],a[s],t.position,u),l+=Qt.repeat(" ",e.indent)+ie((t.line+1).toString(),h)+" | "+c.str+"\n",l+=Qt.repeat("-",e.indent+h+3+c.pos)+"^\n",o=1;o<=e.linesAfter&&!(s+o>=a.length);o++)c=ne(t.buffer,r[s+o],a[s+o],t.position-(r[s]-r[s+o]),u),l+=Qt.repeat(" ",e.indent)+ie((t.line+o+1).toString(),h)+" | "+c.str+"\n";return l.replace(/\n$/,"")},ae=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],se=["scalar","sequence","mapping"];var oe=function(t,e){var n,i;if(e=e||{},Object.keys(e).forEach((function(e){if(-1===ae.indexOf(e))throw new ee('Unknown option "'+e+'" 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(t){return t},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=(n=e.styleAliases||null,i={},null!==n&&Object.keys(n).forEach((function(t){n[t].forEach((function(e){i[String(e)]=t}))})),i),-1===se.indexOf(this.kind))throw new ee('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function ce(t,e){var n=[];return t[e].forEach((function(t){var e=n.length;n.forEach((function(n,i){n.tag===t.tag&&n.kind===t.kind&&n.multi===t.multi&&(e=i)})),n[e]=t})),n}function le(t){return this.extend(t)}le.prototype.extend=function(t){var e=[],n=[];if(t instanceof oe)n.push(t);else if(Array.isArray(t))n=n.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new ee("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof oe))throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new ee("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new ee("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(t){if(!(t instanceof oe))throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(le.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=ce(i,"implicit"),i.compiledExplicit=ce(i,"explicit"),i.compiledTypeMap=function(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(n.multi[t.kind].push(t),n.multi.fallback.push(t)):n[t.kind][t.tag]=n.fallback[t.tag]=t}for(t=0,e=arguments.length;t =0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ye=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var me=/^[-+]?[0-9]+e/;var be=new oe("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!ye.test(t)||"_"===t[t.length-1])},construct:function(t){var e,n;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:n*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||Qt.isNegativeZero(t))},represent:function(t,e){var n;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(Qt.isNegativeZero(t))return"-0.0";return n=t.toString(10),me.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),_e=he.extend({implicit:[ue,de,ge,be]}),xe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ve=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]))?))?$");var ke=new oe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==xe.exec(t)||null!==ve.exec(t))},construct:function(t){var e,n,i,r,a,s,o,c,l=0,h=null;if(null===(e=xe.exec(t))&&(e=ve.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),c=new Date(Date.UTC(n,i,r,a,s,o,l)),h&&c.setTime(c.getTime()-h),c},instanceOf:Date,represent:function(t){return t.toISOString()}});var we=new oe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Te=new oe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,i=0,r=t.length,a=Ce;for(n=0;n 64)){if(e<0)return!1;i+=6}return i%8==0},construct:function(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,a=Ce,s=0,o=[];for(e=0;e >16&255),o.push(s>>8&255),o.push(255&s)),s=s<<6|a.indexOf(i.charAt(e));return 0===(n=r%4*6)?(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)):18===n?(o.push(s>>10&255),o.push(s>>2&255)):12===n&&o.push(s>>4&255),new Uint8Array(o)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,n,i="",r=0,a=t.length,s=Ce;for(e=0;e>18&63],i+=s[r>>12&63],i+=s[r>>6&63],i+=s[63&r]),r=(r<<8)+t[e];return 0===(n=a%3)?(i+=s[r>>18&63],i+=s[r>>12&63],i+=s[r>>6&63],i+=s[63&r]):2===n?(i+=s[r>>10&63],i+=s[r>>4&63],i+=s[r<<2&63],i+=s[64]):1===n&&(i+=s[r>>2&63],i+=s[r<<4&63],i+=s[64],i+=s[64]),i}}),Ee=Object.prototype.hasOwnProperty,Se=Object.prototype.toString;var Ae=new oe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,n,i,r,a,s=[],o=t;for(e=0,n=o.length;e >10),56320+(t-65536&1023))}for(var en=new Array(256),nn=new Array(256),rn=0;rn<256;rn++)en[rn]=Je(rn)?1:0,nn[rn]=Je(rn);function an(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Oe,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 sn(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=re(n),new ee(e,n)}function on(t,e){throw sn(t,e)}function cn(t,e){t.onWarning&&t.onWarning.call(null,sn(t,e))}var ln={YAML:function(t,e,n){var i,r,a;null!==t.version&&on(t,"duplication of %YAML directive"),1!==n.length&&on(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&on(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),a=parseInt(i[2],10),1!==r&&on(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&cn(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&on(t,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],We.test(i)||on(t,"ill-formed tag handle (first argument) of the TAG directive"),Me.call(t.tagMap,i)&&on(t,'there is a previously declared suffix for "'+i+'" tag handle'),qe.test(r)||on(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(a){on(t,"tag prefix is malformed: "+r)}t.tagMap[i]=r}};function hn(t,e,n,i){var r,a,s,o;if(e 1&&(t.result+=Qt.repeat("\n",e-1))}function mn(t,e){var n,i,r=t.tag,a=t.anchor,s=[],o=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,on(t,"tab characters must not be used in indentation")),45===i)&&Xe(t.input.charCodeAt(t.position+1));)if(o=!0,t.position++,fn(t,!0,-1)&&t.lineIndent<=e)s.push(null),i=t.input.charCodeAt(t.position);else if(n=t.line,xn(t,e,$e,!1,!0),s.push(t.result),fn(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==i)on(t,"bad indentation of a sequence entry");else if(t.lineIndent e?f=1:t.lineIndent===e?f=0:t.lineIndent e?f=1:t.lineIndent===e?f=0:t.lineIndent e)&&(m&&(s=t.line,o=t.lineStart,c=t.position),xn(t,e,Re,!0,r)&&(m?g=t.result:y=t.result),m||(dn(t,d,p,f,g,y,s,o,c),f=g=y=null),fn(t,!0,-1),l=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==l)on(t,"bad indentation of a mapping entry");else if(t.lineIndent =0))break;0===r?on(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?on(t,"repeat of an indentation width identifier"):(h=e+r-1,l=!0)}if(Ge(a)){do{a=t.input.charCodeAt(++t.position)}while(Ge(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Ve(a)&&0!==a)}for(;0!==a;){for(pn(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent h&&(h=t.lineIndent),Ve(a))u++;else{if(t.lineIndent 0){for(r=s,a=0;r>0;r--)(s=Qe(o=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:on(t,"expected hexadecimal character");t.result+=tn(a),t.position++}else on(t,"unknown escape sequence");n=i=t.position}else Ve(o)?(hn(t,n,i,!0),yn(t,fn(t,!1,e)),n=i=t.position):t.position===t.lineStart&&gn(t)?on(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}on(t,"unexpected end of the stream within a double quoted scalar")}(t,d)?y=!0:!function(t){var e,n,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Xe(i)&&!Ke(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&on(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),Me.call(t.anchorMap,n)||on(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],fn(t,!0,-1),!0}(t)?function(t,e,n){var i,r,a,s,o,c,l,h,u=t.kind,d=t.result;if(Xe(h=t.input.charCodeAt(t.position))||Ke(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(Xe(i=t.input.charCodeAt(t.position+1))||n&&Ke(i)))return!1;for(t.kind="scalar",t.result="",r=a=t.position,s=!1;0!==h;){if(58===h){if(Xe(i=t.input.charCodeAt(t.position+1))||n&&Ke(i))break}else if(35===h){if(Xe(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&gn(t)||n&&Ke(h))break;if(Ve(h)){if(o=t.line,c=t.lineStart,l=t.lineIndent,fn(t,!1,-1),t.lineIndent>=e){s=!0,h=t.input.charCodeAt(t.position);continue}t.position=a,t.line=o,t.lineStart=c,t.lineIndent=l;break}}s&&(hn(t,r,a,!1),yn(t,t.line-o),r=a=t.position,s=!1),Ge(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return hn(t,r,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}(t,d,Ie===n)&&(y=!0,null===t.tag&&(t.tag="?")):(y=!0,null===t.tag&&null===t.anchor||on(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===f&&(y=o&&mn(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&on(t,'unacceptable node kind for !> tag; it should be "scalar", not "'+t.kind+'"'),c=0,l=t.implicitTypes.length;c "),null!==t.result&&u.kind!==t.kind&&on(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):on(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function vn(t){var e,n,i,r,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(r=t.input.charCodeAt(t.position))&&(fn(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){for(s=!0,r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Xe(r);)r=t.input.charCodeAt(++t.position);for(i=[],(n=t.input.slice(e,t.position)).length<1&&on(t,"directive name must not be less than one character in length");0!==r;){for(;Ge(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!Ve(r));break}if(Ve(r))break;for(e=t.position;0!==r&&!Xe(r);)r=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==r&&pn(t),Me.call(ln,n)?ln[n](t,n,i):cn(t,'unknown document directive "'+n+'"')}fn(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,fn(t,!0,-1)):s&&on(t,"directives end mark is expected"),xn(t,t.lineIndent-1,Re,!1,!0),fn(t,!0,-1),t.checkLineBreaks&&ze.test(t.input.slice(a,t.position))&&cn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&gn(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,fn(t,!0,-1)):t.position {for(const{id:e,detector:n,loader:i}of t)Nn(e,n,i)},Nn=(t,e,n)=>{An[t]?Bt.error(`Detector with key ${t} already exists`):An[t]={detector:e,loader:n},Bt.debug(`Detector with key ${t} added${n?" with loader":""}`)},Dn=function(t,e,n){const{depth:i,clobber:r}=Object.assign({depth:2,clobber:!1},n);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Dn(t,e,n))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||i<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((n=>{"object"!=typeof e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(r||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=Dn(t[n],e[n],{depth:i-1,clobber:r}))})),t)},On=Dn,Mn={curveBasis:o.$0Z,curveBasisClosed:o.Dts,curveBasisOpen:o.WQY,curveBumpX:o.qpX,curveBumpY:o.u93,curveBundle:o.tFB,curveCardinalClosed:o.OvA,curveCardinalOpen:o.dCK,curveCardinal:o.YY7,curveCatmullRomClosed:o.fGX,curveCatmullRomOpen:o.$m7,curveCatmullRom:o.zgE,curveLinear:o.c_6,curveLinearClosed:o.fxm,curveMonotoneX:o.FdL,curveMonotoneY:o.ak_,curveNatural:o.SxZ,curveStep:o.eA_,curveStepAfter:o.jsv,curveStepBefore:o.iJ},In=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Fn=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,$n=function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${Fn.source})(?=[}][%]{2}).*\n`,"ig");let i;t=t.trim().replace(n,"").replace(/'/gm,'"'),Bt.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const r=[];for(;null!==(i=In.exec(t));)if(i.index===In.lastIndex&&In.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){const t=i[1]?i[1]:i[2],e=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;r.push({type:t,args:e})}return 0===r.length&&r.push({type:t,args:null}),1===r.length?r[0]:r}catch(n){return Bt.error(`ERROR: ${n.message} - Unable to parse directive\n ${null!==e?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}};function Rn(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Mn[n]||e}function Zn(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function Pn(t){let e="",n="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?n=n+i+";":e=e+i+";");return{style:e,labelStyle:n}}let jn=0;const Yn=()=>(jn++,"id-"+Math.random().toString(36).substr(2,12)+"-"+jn);const zn=t=>function(t){let e="";const n="0123456789abcdef";for(let i=0;i {if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},n),jt.lineBreakRegex.test(t))return t;const i=t.split(" "),r=[];let a="";return i.forEach(((t,s)=>{const o=Vn(`${t} `,n),c=Vn(a,n);if(o>e){const{hyphenatedStrings:i,remainingWord:s}=qn(t,e,"-",n);r.push(a,...i),a=s}else c+o>=e?(r.push(a),a=t):a=[a,t].filter(Boolean).join(" ");s+1===i.length&&r.push(a)})),r.filter((t=>""!==t)).join(n.joinWith)}),((t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`)),qn=(0,v.Z)(((t,e,n="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const r=[...t],a=[];let s="";return r.forEach(((t,o)=>{const c=`${s}${t}`;if(Vn(c,i)>=e){const t=o+1,e=r.length===t,i=`${c}${n}`;a.push(e?c:i),s=""}else s=c})),{hyphenatedStrings:a,remainingWord:s}}),((t,e,n="-",i)=>`${t}${e}${n}${i.fontSize}${i.fontWeight}${i.fontFamily}`));function Hn(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),Gn(t,e).height}function Vn(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),Gn(t,e).width}const Gn=(0,v.Z)(((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:n,fontFamily:i,fontWeight:r}=e;if(!t)return{width:0,height:0};const[,a]=ti(n),s=["sans-serif",i],c=t.split(jt.lineBreakRegex),l=[],h=(0,o.Ys)("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const o of s){let t=0;const e={width:0,height:0,lineHeight:0};for(const n of c){const i={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};i.text=n;const s=Un(u,i).style("font-size",a).style("font-weight",r).style("font-family",o),c=(s._groups||s)[0][0].getBBox();e.width=Math.round(Math.max(e.width,c.width)),t=Math.round(c.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}l.push(e)}u.remove();return l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`));let Xn;const Kn=t=>{if(Bt.debug("directiveSanitizer called with",t),"object"==typeof t&&(t.length?t.forEach((t=>Kn(t))):Object.keys(t).forEach((e=>{Bt.debug("Checking key",e),e.startsWith("__")&&(Bt.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(Bt.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(Bt.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(Bt.debug("sanitizing themeCss option"),t[e]=Qn(t[e])),e.includes("fontFamily")&&(Bt.debug("sanitizing fontFamily option"),t[e]=Qn(t[e])),e.includes("altFontFamily")&&(Bt.debug("sanitizing altFontFamily option"),t[e]=Qn(t[e])),Gt.includes(e)?"object"==typeof t[e]&&(Bt.debug("sanitize deleting object",e),Kn(t[e])):(Bt.debug("sanitize deleting option",e),delete t[e])}))),t.themeVariables){const e=Object.keys(t.themeVariables);for(const n of e){const e=t.themeVariables[n];e&&e.match&&!e.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[n]="")}}Bt.debug("After sanitization",t)},Qn=t=>{let e=0,n=0;for(const i of t){if(e{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t,10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},ei={assignWithDepth:On,wrapLabel:Wn,calculateTextHeight:Hn,calculateTextWidth:Vn,calculateTextDimensions:Gn,detectInit:function(t,e){const n=$n(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(n)){const t=n.map((t=>t.args));Kn(t),i=On(i,[...t])}else i=n.args;if(i){let n=Ln(t,e);["config"].forEach((t=>{void 0!==i[t]&&("flowchart-v2"===n&&(n="flowchart"),i[n]=i[t],delete i[t])}))}return i},detectDirective:$n,isSubstringInArray:function(t,e){for(const[n,i]of e.entries())if(i.match(t))return n;return-1},interpolateToCurve:Rn,calcLabelPosition:function(t){return 1===t.length?t[0]:function(t){let e,n=0;t.forEach((t=>{n+=Zn(t,e),e=t}));let i,r=n/2;return e=void 0,t.forEach((t=>{if(e&&!i){const n=Zn(t,e);if(n =1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:(t,e,n)=>{let i;Bt.info(`our points ${JSON.stringify(e)}`),e[0]!==n&&(e=e.reverse());let r,a=25;i=void 0,e.forEach((t=>{if(i&&!r){const e=Zn(t,i);if(e=1&&(r={x:t.x,y:t.y}),n>0&&n<1&&(r={x:(1-n)*i.x+n*t.x,y:(1-n)*i.y+n*t.y})}}i=t}));const s=t?10:5,o=Math.atan2(e[0].y-r.y,e[0].x-r.x),c={x:0,y:0};return c.x=Math.sin(o)*s+(e[0].x+r.x)/2,c.y=-Math.cos(o)*s+(e[0].y+r.y)/2,c},calcTerminalLabelPosition:function(t,e,n){let i,r=JSON.parse(JSON.stringify(n));Bt.info("our points",r),"start_left"!==e&&"start_right"!==e&&(r=r.reverse()),r.forEach((t=>{i=t}));let a,s=25+t;i=void 0,r.forEach((t=>{if(i&&!a){const e=Zn(t,i);if(e =1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*i.x+n*t.x,y:(1-n)*i.y+n*t.y})}}i=t}));const o=10+.5*t,c=Math.atan2(r[0].y-a.y,r[0].x-a.x),l={x:0,y:0};return l.x=Math.sin(c)*o+(r[0].x+a.x)/2,l.y=-Math.cos(c)*o+(r[0].y+a.y)/2,"start_left"===e&&(l.x=Math.sin(c+Math.PI)*o+(r[0].x+a.x)/2,l.y=-Math.cos(c+Math.PI)*o+(r[0].y+a.y)/2),"end_right"===e&&(l.x=Math.sin(c-Math.PI)*o+(r[0].x+a.x)/2-5,l.y=-Math.cos(c-Math.PI)*o+(r[0].y+a.y)/2-5),"end_left"===e&&(l.x=Math.sin(c)*o+(r[0].x+a.x)/2-5,l.y=-Math.cos(c)*o+(r[0].y+a.y)/2-5),l},formatUrl:function(t,e){const n=t.trim();if(n)return"loose"!==e.securityLevel?(0,s.Nm)(n):n},getStylesFromArray:Pn,generateId:Yn,random:zn,runFunc:(t,...e)=>{const n=t.split("."),i=n.length-1,r=n[i];let a=window;for(let s=0;s{if(!i)return;const r=t.node().getBBox();t.append("text").text(i).attr("x",r.x+r.width/2).attr("y",-n).attr("class",e)},parseFontSize:ti},ni="9.4.3",ii=Object.freeze(Xt);let ri,ai=On({},ii),si=[],oi=On({},ii);const ci=(t,e)=>{let n=On({},t),i={};for(const r of e)di(r),i=On(i,r);if(n=On(n,i),i.theme&&i.theme in qt){const t=On({},ri),e=On(t.themeVariables||{},i.themeVariables);n.theme&&n.theme in qt&&(n.themeVariables=qt[n.theme].getThemeVariables(e))}return oi=n,mi(oi),oi},li=()=>On({},ai),hi=t=>(mi(t),On(oi,t),ui()),ui=()=>On({},oi),di=t=>{["secure",...ai.secure??[]].forEach((e=>{void 0!==t[e]&&(Bt.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{0===e.indexOf("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&di(t[e])}))},pi=t=>{t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),si.push(t),ci(ai,si)},fi=(t=ai)=>{si=[],ci(t,si)};var gi=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(gi||{});const yi={},mi=t=>{var e;t&&((t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&(yi[e="LAZY_LOAD_DEPRECATED"]||(Bt.warn(gi[e]),yi[e]=!0)))},bi=function(t,e,n,i){const r=function(t,e,n){let i=new Map;return n?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i}(e,n,i);!function(t,e){for(let n of e)t.attr(n[0],n[1])}(t,r)},_i=function(t,e,n,i){const r=e.node().getBBox(),a=r.width,s=r.height;Bt.info(`SVG bounds: ${a}x${s}`,r);let o=0,c=0;Bt.info(`Graph bounds: ${o}x${c}`,t),o=a+2*n,c=s+2*n,Bt.info(`Calculated bounds: ${o}x${c}`),bi(e,c,o,i);const l=`${r.x-n} ${r.y-n} ${r.width+2*n} ${r.height+2*n}`;e.attr("viewBox",l)},xi=t=>`g.classGroup text {\n fill: ${t.nodeBorder};\n fill: ${t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`,vi=t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n`,ki=()=>"",wi=t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`,Ci=t=>`\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ${t.ganttFontSize};\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ${t.ganttFontSize};\n // }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n // font-size: ${t.ganttFontSize};\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n // font-size: ${t.ganttFontSize};\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor} ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n`,Ti=()=>"",Ei=t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`,Si=t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 100%;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n\n`,Ai=t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`,Li=t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`,Bi=t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`,Ni=t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,Di={flowchart:wi,"flowchart-v2":wi,sequence:Ai,gantt:Ci,classDiagram:xi,"classDiagram-v2":xi,class:xi,stateDiagram:Li,state:Li,info:Ti,pie:Ei,er:vi,error:ki,journey:Bi,requirement:Si,c4:Ni},Oi=(t,e,n)=>{let i="";return t in Di&&Di[t]?i=Di[t](n):Bt.warn(`No theme found for ${t}`),` & {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n fill: ${n.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${n.errorBkgColor};\n }\n & .error-text {\n fill: ${n.errorTextColor};\n stroke: ${n.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 2px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${n.lineColor};\n stroke: ${n.lineColor};\n }\n & .marker.cross {\n stroke: ${n.lineColor};\n }\n\n & svg {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n }\n\n ${i}\n\n ${e}\n`};let Mi="",Ii="",Fi="";const $i=t=>It(t,ui()),Ri=function(){Mi="",Fi="",Ii=""},Zi=function(t){Mi=$i(t).replace(/^\s+/g,"")},Pi=function(){return Mi||Ii},ji=function(t){Fi=$i(t).replace(/\n\s+/g,"\n")},Yi=function(){return Fi},zi=function(t){Ii=$i(t)},Ui=function(){return Ii},Wi={setAccTitle:Zi,getAccTitle:Pi,setDiagramTitle:zi,getDiagramTitle:Ui,getAccDescription:Yi,setAccDescription:ji,clear:Ri},qi=Object.freeze(Object.defineProperty({__proto__:null,clear:Ri,default:Wi,getAccDescription:Yi,getAccTitle:Pi,getDiagramTitle:Ui,setAccDescription:ji,setAccTitle:Zi,setDiagramTitle:zi},Symbol.toStringTag,{value:"Module"}));let Hi={};const Vi=function(t,e,n,i){Bt.debug("parseDirective is being called",e,n,i);try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":Hi={};break;case"type_directive":if(!Hi)throw new Error("currentDirective is undefined");Hi.type=e.toLowerCase();break;case"arg_directive":if(!Hi)throw new Error("currentDirective is undefined");Hi.args=JSON.parse(e);break;case"close_directive":Gi(t,Hi,i),Hi=void 0}}catch(r){Bt.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${n}`),Bt.error(r.message)}},Gi=function(t,e,n){switch(Bt.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":["config"].forEach((t=>{void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),Bt.info("sanitize in handleDirective",e.args),Kn(e.args),Bt.info("sanitize in handleDirective (done)",e.args),pi(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;case"themeCss":Bt.warn("themeCss encountered");break;default:Bt.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e)}},Xi=Bt,Ki=Nt,Qi=ui,Ji=t=>It(t,Qi()),tr=_i,er=(t,e,n,i)=>Vi(t,e,n,i),nr={},ir=(t,e,n)=>{if(nr[t])throw new Error(`Diagram ${t} already registered.`);var i,r;nr[t]=e,n&&Nn(t,n),i=t,r=e.styles,Di[i]=r,e.injectUtils&&e.injectUtils(Xi,Ki,Qi,Ji,tr,qi,er)},rr=t=>{if(t in nr)return nr[t];throw new Error(`Diagram ${t} not found.`)};var ar=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,4],i=[1,7],r=[1,5],a=[1,9],s=[1,6],o=[2,6],c=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],h=[8,14,20,22,24,25,27,29,32,37,40],u=[8,13,14,20,22,24,25,27,29,32,37,40],d=[1,26],p=[6,8,14,50,55],f=[8,14,55],g=[1,53],y=[1,52],m=[8,14,30,33,35,38,55],b=[1,67],_=[1,68],x=[1,69],v=[8,14,33,35,42,55],k={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 3:return a[o];case 4:return a[o-1];case 5:return i.setDirection(a[o-3]),a[o-1];case 7:i.setOptions(a[o-1]),this.$=a[o];break;case 8:a[o-1]+=a[o],this.$=a[o-1];break;case 10:this.$=[];break;case 11:a[o-1].push(a[o]),this.$=a[o-1];break;case 12:this.$=a[o-1];break;case 17:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 18:case 19:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 20:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 22:i.checkout(a[o]);break;case 23:i.branch(a[o]);break;case 24:i.branch(a[o-2],a[o]);break;case 25:i.cherryPick(a[o],"",void 0);break;case 26:i.cherryPick(a[o-2],"",a[o]);break;case 27:case 29:i.cherryPick(a[o-2],"","");break;case 28:i.cherryPick(a[o],"",a[o-2]);break;case 30:i.merge(a[o],"","","");break;case 31:i.merge(a[o-2],a[o],"","");break;case 32:i.merge(a[o-2],"",a[o],"");break;case 33:i.merge(a[o-2],"","",a[o]);break;case 34:i.merge(a[o-4],a[o],"",a[o-2]);break;case 35:i.merge(a[o-4],"",a[o],a[o-2]);break;case 36:i.merge(a[o-4],"",a[o-2],a[o]);break;case 37:i.merge(a[o-4],a[o-2],a[o],"");break;case 38:i.merge(a[o-4],a[o-2],"",a[o]);break;case 39:i.merge(a[o-4],a[o],a[o-2],"");break;case 40:i.merge(a[o-6],a[o-4],a[o-2],a[o]);break;case 41:i.merge(a[o-6],a[o],a[o-4],a[o-2]);break;case 42:i.merge(a[o-6],a[o-4],a[o],a[o-2]);break;case 43:i.merge(a[o-6],a[o-2],a[o-4],a[o]);break;case 44:i.merge(a[o-6],a[o],a[o-2],a[o-4]);break;case 45:i.merge(a[o-6],a[o-2],a[o],a[o-4]);break;case 46:i.commit(a[o]);break;case 47:i.commit("","",i.commitType.NORMAL,a[o]);break;case 48:i.commit("","",a[o],"");break;case 49:i.commit("","",a[o],a[o-2]);break;case 50:i.commit("","",a[o-2],a[o]);break;case 51:i.commit("",a[o],i.commitType.NORMAL,"");break;case 52:i.commit("",a[o-2],i.commitType.NORMAL,a[o]);break;case 53:i.commit("",a[o],i.commitType.NORMAL,a[o-2]);break;case 54:i.commit("",a[o-2],a[o],"");break;case 55:i.commit("",a[o],a[o-2],"");break;case 56:i.commit("",a[o-4],a[o-2],a[o]);break;case 57:i.commit("",a[o-4],a[o],a[o-2]);break;case 58:i.commit("",a[o-2],a[o-4],a[o]);break;case 59:i.commit("",a[o],a[o-4],a[o-2]);break;case 60:i.commit("",a[o],a[o-2],a[o-4]);break;case 61:i.commit("",a[o-2],a[o],a[o-4]);break;case 62:i.commit(a[o],"",i.commitType.NORMAL,"");break;case 63:i.commit(a[o],"",i.commitType.NORMAL,a[o-2]);break;case 64:i.commit(a[o-2],"",i.commitType.NORMAL,a[o]);break;case 65:i.commit(a[o-2],"",a[o],"");break;case 66:i.commit(a[o],"",a[o-2],"");break;case 67:i.commit(a[o],a[o-2],i.commitType.NORMAL,"");break;case 68:i.commit(a[o-2],a[o],i.commitType.NORMAL,"");break;case 69:i.commit(a[o-4],"",a[o-2],a[o]);break;case 70:i.commit(a[o-4],"",a[o],a[o-2]);break;case 71:i.commit(a[o-2],"",a[o-4],a[o]);break;case 72:i.commit(a[o],"",a[o-4],a[o-2]);break;case 73:i.commit(a[o],"",a[o-2],a[o-4]);break;case 74:i.commit(a[o-2],"",a[o],a[o-4]);break;case 75:i.commit(a[o-4],a[o],a[o-2],"");break;case 76:i.commit(a[o-4],a[o-2],a[o],"");break;case 77:i.commit(a[o-2],a[o],a[o-4],"");break;case 78:i.commit(a[o],a[o-2],a[o-4],"");break;case 79:i.commit(a[o],a[o-4],a[o-2],"");break;case 80:i.commit(a[o-2],a[o-4],a[o],"");break;case 81:i.commit(a[o-4],a[o],i.commitType.NORMAL,a[o-2]);break;case 82:i.commit(a[o-4],a[o-2],i.commitType.NORMAL,a[o]);break;case 83:i.commit(a[o-2],a[o],i.commitType.NORMAL,a[o-4]);break;case 84:i.commit(a[o],a[o-2],i.commitType.NORMAL,a[o-4]);break;case 85:i.commit(a[o],a[o-4],i.commitType.NORMAL,a[o-2]);break;case 86:i.commit(a[o-2],a[o-4],i.commitType.NORMAL,a[o]);break;case 87:i.commit(a[o-6],a[o-4],a[o-2],a[o]);break;case 88:i.commit(a[o-6],a[o-4],a[o],a[o-2]);break;case 89:i.commit(a[o-6],a[o-2],a[o-4],a[o]);break;case 90:i.commit(a[o-6],a[o],a[o-4],a[o-2]);break;case 91:i.commit(a[o-6],a[o-2],a[o],a[o-4]);break;case 92:i.commit(a[o-6],a[o],a[o-2],a[o-4]);break;case 93:i.commit(a[o-4],a[o-6],a[o-2],a[o]);break;case 94:i.commit(a[o-4],a[o-6],a[o],a[o-2]);break;case 95:i.commit(a[o-2],a[o-6],a[o-4],a[o]);break;case 96:i.commit(a[o],a[o-6],a[o-4],a[o-2]);break;case 97:i.commit(a[o-2],a[o-6],a[o],a[o-4]);break;case 98:i.commit(a[o],a[o-6],a[o-2],a[o-4]);break;case 99:i.commit(a[o],a[o-4],a[o-2],a[o-6]);break;case 100:i.commit(a[o-2],a[o-4],a[o],a[o-6]);break;case 101:i.commit(a[o],a[o-2],a[o-4],a[o-6]);break;case 102:i.commit(a[o-2],a[o],a[o-4],a[o-6]);break;case 103:i.commit(a[o-4],a[o-2],a[o],a[o-6]);break;case 104:i.commit(a[o-4],a[o],a[o-2],a[o-6]);break;case 105:i.commit(a[o-2],a[o-4],a[o-6],a[o]);break;case 106:i.commit(a[o],a[o-4],a[o-6],a[o-2]);break;case 107:i.commit(a[o-2],a[o],a[o-6],a[o-4]);break;case 108:i.commit(a[o],a[o-2],a[o-6],a[o-4]);break;case 109:i.commit(a[o-4],a[o-2],a[o-6],a[o]);break;case 110:i.commit(a[o-4],a[o],a[o-6],a[o-2]);break;case 111:this.$="";break;case 112:this.$=a[o];break;case 113:this.$=i.commitType.NORMAL;break;case 114:this.$=i.commitType.REVERSE;break;case 115:this.$=i.commitType.HIGHLIGHT;break;case 118:i.parseDirective("%%{","open_directive");break;case 119:i.parseDirective(a[o],"type_directive");break;case 120:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 121:i.parseDirective("}%%","close_directive","gitGraph")}},table:[{3:1,4:2,5:3,6:n,8:i,14:r,46:8,50:a,55:s},{1:[3]},{3:10,4:2,5:3,6:n,8:i,14:r,46:8,50:a,55:s},{3:11,4:2,5:3,6:n,8:i,14:r,46:8,50:a,55:s},{7:12,8:o,9:[1,13],10:[1,14],11:15,14:c},e(l,[2,124]),e(l,[2,125]),e(l,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:o,11:15,14:c},{9:[1,21]},e(h,[2,10],{12:22,13:[1,23]}),e(u,[2,9]),{9:[1,25],48:24,53:d},e([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:o,11:15,14:c},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},e(u,[2,8]),e(p,[2,116]),{49:45,52:[1,46]},e(p,[2,121]),{1:[2,4]},{8:[1,47]},e(h,[2,11]),{4:48,8:i,14:r,55:s},e(h,[2,13]),e(f,[2,14]),e(f,[2,15]),e(f,[2,16]),{21:[1,49]},{23:[1,50]},e(f,[2,19]),e(f,[2,20]),e(f,[2,21]),{28:51,34:g,54:y},e(f,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:g,54:y},{33:[1,61],35:[1,62]},{28:63,34:g,54:y},{48:64,53:d},{53:[2,120]},{1:[2,5]},e(h,[2,12]),e(f,[2,17]),e(f,[2,18]),e(f,[2,22]),e(m,[2,122]),e(m,[2,123]),e(f,[2,46]),{34:[1,65]},{39:66,43:b,44:_,45:x},{34:[1,70]},{34:[1,71]},e(f,[2,112]),e(f,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},e(f,[2,23],{30:[1,78]}),e(p,[2,117]),e(f,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),e(f,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),e(v,[2,113]),e(v,[2,114]),e(v,[2,115]),e(f,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),e(f,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:b,44:_,45:x},{34:[1,93]},e(f,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:b,44:_,45:x},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:b,44:_,45:x},{34:[1,106]},{34:[1,107]},{39:108,43:b,44:_,45:x},{34:[1,109]},e(f,[2,31],{35:[1,111],38:[1,110]}),e(f,[2,32],{33:[1,113],35:[1,112]}),e(f,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},e(f,[2,24]),e(f,[2,49],{33:[1,120],42:[1,121]}),e(f,[2,53],{38:[1,122],42:[1,123]}),e(f,[2,63],{33:[1,125],38:[1,124]}),e(f,[2,50],{33:[1,126],42:[1,127]}),e(f,[2,55],{35:[1,128],42:[1,129]}),e(f,[2,66],{33:[1,131],35:[1,130]}),e(f,[2,52],{38:[1,132],42:[1,133]}),e(f,[2,54],{35:[1,134],42:[1,135]}),e(f,[2,67],{35:[1,137],38:[1,136]}),e(f,[2,64],{33:[1,139],38:[1,138]}),e(f,[2,65],{33:[1,141],35:[1,140]}),e(f,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:b,44:_,45:x},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:b,44:_,45:x},e(f,[2,26]),e(f,[2,27]),e(f,[2,28]),e(f,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:b,44:_,45:x},{34:[1,153]},{39:154,43:b,44:_,45:x},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:b,44:_,45:x},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:b,44:_,45:x},{34:[1,167]},{39:168,43:b,44:_,45:x},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:b,44:_,45:x},{34:[1,173]},e(f,[2,37],{35:[1,174]}),e(f,[2,38],{38:[1,175]}),e(f,[2,36],{33:[1,176]}),e(f,[2,39],{35:[1,177]}),e(f,[2,34],{38:[1,178]}),e(f,[2,35],{33:[1,179]}),e(f,[2,60],{42:[1,180]}),e(f,[2,73],{33:[1,181]}),e(f,[2,61],{42:[1,182]}),e(f,[2,84],{38:[1,183]}),e(f,[2,74],{33:[1,184]}),e(f,[2,83],{38:[1,185]}),e(f,[2,59],{42:[1,186]}),e(f,[2,72],{33:[1,187]}),e(f,[2,58],{42:[1,188]}),e(f,[2,78],{35:[1,189]}),e(f,[2,71],{33:[1,190]}),e(f,[2,77],{35:[1,191]}),e(f,[2,57],{42:[1,192]}),e(f,[2,85],{38:[1,193]}),e(f,[2,56],{42:[1,194]}),e(f,[2,79],{35:[1,195]}),e(f,[2,80],{35:[1,196]}),e(f,[2,86],{38:[1,197]}),e(f,[2,70],{33:[1,198]}),e(f,[2,81],{38:[1,199]}),e(f,[2,69],{33:[1,200]}),e(f,[2,75],{35:[1,201]}),e(f,[2,76],{35:[1,202]}),e(f,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:b,44:_,45:x},{34:[1,206]},{34:[1,207]},{39:208,43:b,44:_,45:x},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:b,44:_,45:x},{34:[1,214]},{39:215,43:b,44:_,45:x},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:b,44:_,45:x},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:b,44:_,45:x},{34:[1,228]},{39:229,43:b,44:_,45:x},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:b,44:_,45:x},e(f,[2,40]),e(f,[2,42]),e(f,[2,41]),e(f,[2,43]),e(f,[2,45]),e(f,[2,44]),e(f,[2,101]),e(f,[2,102]),e(f,[2,99]),e(f,[2,100]),e(f,[2,104]),e(f,[2,103]),e(f,[2,108]),e(f,[2,107]),e(f,[2,106]),e(f,[2,105]),e(f,[2,110]),e(f,[2,109]),e(f,[2,98]),e(f,[2,97]),e(f,[2,96]),e(f,[2,95]),e(f,[2,93]),e(f,[2,94]),e(f,[2,92]),e(f,[2,91]),e(f,[2,90]),e(f,[2,89]),e(f,[2,87]),e(f,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],a=[],s=this.table,o="",c=0,l=0,h=a.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;a.push(f);var g=u.options&&u.options.ranges;function y(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,_,x,v,k,w,C,T={};;){if(b=n[n.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null==m&&(m=y()),_=s[b]&&s[b][m]),void 0===_||!_.length||!_[0]){var E="";for(v in C=[],s[b])this.terminals_[v]&&v>2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},w=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;ae[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 34:case 38:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}},t);function C(){this.yy={}}return k.lexer=w,C.prototype=k,k.Parser=C,new C}();ar.parser=ar;const sr=ar,or=t=>null!==t.match(/^\s*gitGraph/);let cr=ui().gitGraph.mainBranchName,lr=ui().gitGraph.mainBranchOrder,hr={},ur=null,dr={};dr[cr]={name:cr,order:lr};let pr={};pr[cr]=ur;let fr=cr,gr="LR",yr=0;function mr(){return zn({length:7})}let br={};const _r=function(t){if(t=jt.sanitizeText(t,ui()),void 0===pr[t]){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}{fr=t;const e=pr[fr];ur=hr[e]}};function xr(t,e,n){const i=t.indexOf(e);-1===i?t.push(n):t.splice(i,1,n)}function vr(t){const e=t.reduce(((t,e)=>t.seq>e.seq?t:e),t[0]);let n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));const i=[n,e.id,e.seq];for(let r in pr)pr[r]===e.id&&i.push(r);if(Bt.debug(i.join(" ")),e.parents&&2==e.parents.length){const n=hr[e.parents[0]];xr(t,e,n),t.push(hr[e.parents[1]])}else{if(0==e.parents.length)return;{const n=hr[e.parents];xr(t,e,n)}}vr(t=function(t,e){const n=Object.create(null);return t.reduce(((t,i)=>{const r=e(i);return n[r]||(n[r]=!0,t.push(i)),t}),[])}(t,(t=>t.id)))}const kr=function(){const t=Object.keys(hr).map((function(t){return hr[t]}));return t.forEach((function(t){Bt.debug(t.id)})),t.sort(((t,e)=>t.seq-e.seq)),t},wr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Cr={parseDirective:function(t,e,n){xp.parseDirective(this,t,e,n)},getConfig:()=>ui().gitGraph,setDirection:function(t){gr=t},setOptions:function(t){Bt.debug("options str",t),t=(t=t&&t.trim())||"{}";try{br=JSON.parse(t)}catch(e){Bt.error("error while parsing gitGraph options",e.message)}},getOptions:function(){return br},commit:function(t,e,n,i){Bt.debug("Entering commit:",t,e,n,i),e=jt.sanitizeText(e,ui()),t=jt.sanitizeText(t,ui()),i=jt.sanitizeText(i,ui());const r={id:e||yr+"-"+mr(),message:t,seq:yr++,type:n||wr.NORMAL,tag:i||"",parents:null==ur?[]:[ur.id],branch:fr};ur=r,hr[r.id]=r,pr[fr]=r.id,Bt.debug("in pushCommit "+r.id)},branch:function(t,e){if(t=jt.sanitizeText(t,ui()),void 0!==pr[t]){let e=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw e.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},e}pr[t]=null!=ur?ur.id:null,dr[t]={name:t,order:e?parseInt(e,10):null},_r(t),Bt.debug("in createBranch")},merge:function(t,e,n,i){t=jt.sanitizeText(t,ui()),e=jt.sanitizeText(e,ui());const r=hr[pr[fr]],a=hr[pr[t]];if(fr===t){let e=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(void 0===r||!r){let e=new Error('Incorrect usage of "merge". Current branch ('+fr+")has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},e}if(void 0===pr[t]){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},e}if(void 0===a||!a){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},e}if(r===a){let e=new Error('Incorrect usage of "merge". Both branches have same head');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(e&&void 0!==hr[e]){let r=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw r.hash={text:"merge "+t+e+n+i,token:"merge "+t+e+n+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+n+" "+i]},r}const s={id:e||yr+"-"+mr(),message:"merged branch "+t+" into "+fr,seq:yr++,parents:[null==ur?null:ur.id,pr[t]],branch:fr,type:wr.MERGE,customType:n,customId:!!e,tag:i||""};ur=s,hr[s.id]=s,pr[fr]=s.id,Bt.debug(pr),Bt.debug("in mergeBranch")},cherryPick:function(t,e,n){if(Bt.debug("Entering cherryPick:",t,e,n),t=jt.sanitizeText(t,ui()),e=jt.sanitizeText(e,ui()),n=jt.sanitizeText(n,ui()),!t||void 0===hr[t]){let n=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}let i=hr[t],r=i.branch;if(i.type===wr.MERGE){let n=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}if(!e||void 0===hr[e]){if(r===fr){let n=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}const a=hr[pr[fr]];if(void 0===a||!a){let n=new Error('Incorrect usage of "cherry-pick". Current branch ('+fr+")has no commits");throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}const s={id:yr+"-"+mr(),message:"cherry-picked "+i+" into "+fr,seq:yr++,parents:[null==ur?null:ur.id,i.id],branch:fr,type:wr.CHERRY_PICK,tag:n??"cherry-pick:"+i.id};ur=s,hr[s.id]=s,pr[fr]=s.id,Bt.debug(pr),Bt.debug("in cherryPick")}},checkout:_r,prettyPrint:function(){Bt.debug(hr);vr([kr()[0]])},clear:function(){hr={},ur=null;let t=ui().gitGraph.mainBranchName,e=ui().gitGraph.mainBranchOrder;pr={},pr[t]=null,dr={},dr[t]={name:t,order:e},fr=t,yr=0,Ri()},getBranchesAsObjArray:function(){const t=Object.values(dr).map(((t,e)=>null!==t.order?t:{...t,order:parseFloat(`0.${e}`,10)})).sort(((t,e)=>t.order-e.order)).map((({name:t})=>({name:t})));return t},getBranches:function(){return pr},getCommits:function(){return hr},getCommitsArray:kr,getCurrentBranch:function(){return fr},getDirection:function(){return gr},getHead:function(){return ur},setAccTitle:Zi,getAccTitle:Pi,getAccDescription:Yi,setAccDescription:ji,setDiagramTitle:zi,getDiagramTitle:Ui,commitType:wr};let Tr={};const Er=0,Sr=1,Ar=2,Lr=3,Br=4;let Nr={},Dr={},Or=[],Mr=0;const Ir=(t,e,n)=>{const i=Qi().gitGraph,r=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let s=0;Object.keys(e).sort(((t,n)=>e[t].seq-e[n].seq)).forEach((t=>{const o=e[t],c=Nr[o.branch].pos,l=s+10;if(n){let t,e=void 0!==o.customType&&""!==o.customType?o.customType:o.type;switch(e){case Er:t="commit-normal";break;case Sr:t="commit-reverse";break;case Ar:t="commit-highlight";break;case Lr:t="commit-merge";break;case Br:t="commit-cherry-pick";break;default:t="commit-normal"}if(e===Ar){const e=r.append("rect");e.attr("x",l-10),e.attr("y",c-10),e.attr("height",20),e.attr("width",20),e.attr("class",`commit ${o.id} commit-highlight${Nr[o.branch].index%8} ${t}-outer`),r.append("rect").attr("x",l-6).attr("y",c-6).attr("height",12).attr("width",12).attr("class",`commit ${o.id} commit${Nr[o.branch].index%8} ${t}-inner`)}else if(e===Br)r.append("circle").attr("cx",l).attr("cy",c).attr("r",10).attr("class",`commit ${o.id} ${t}`),r.append("circle").attr("cx",l-3).attr("cy",c+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${o.id} ${t}`),r.append("circle").attr("cx",l+3).attr("cy",c+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${o.id} ${t}`),r.append("line").attr("x1",l+3).attr("y1",c+1).attr("x2",l).attr("y2",c-5).attr("stroke","#fff").attr("class",`commit ${o.id} ${t}`),r.append("line").attr("x1",l-3).attr("y1",c+1).attr("x2",l).attr("y2",c-5).attr("stroke","#fff").attr("class",`commit ${o.id} ${t}`);else{const n=r.append("circle");if(n.attr("cx",l),n.attr("cy",c),n.attr("r",o.type===Lr?9:10),n.attr("class",`commit ${o.id} commit${Nr[o.branch].index%8}`),e===Lr){const e=r.append("circle");e.attr("cx",l),e.attr("cy",c),e.attr("r",6),e.attr("class",`commit ${t} ${o.id} commit${Nr[o.branch].index%8}`)}if(e===Sr){r.append("path").attr("d",`M ${l-5},${c-5}L${l+5},${c+5}M${l-5},${c+5}L${l+5},${c-5}`).attr("class",`commit ${t} ${o.id} commit${Nr[o.branch].index%8}`)}}}if(Dr[o.id]={x:s+10,y:c},n){const t=4,e=2;if(o.type!==Br&&(o.customId&&o.type===Lr||o.type!==Lr)&&i.showCommitLabel){const t=a.append("g"),n=t.insert("rect").attr("class","commit-label-bkg"),r=t.append("text").attr("x",s).attr("y",c+25).attr("class","commit-label").text(o.id);let l=r.node().getBBox();if(n.attr("x",s+10-l.width/2-e).attr("y",c+13.5).attr("width",l.width+2*e).attr("height",l.height+2*e),r.attr("x",s+10-l.width/2),i.rotateCommitLabel){let e=-7.5-(l.width+10)/25*9.5,n=10+l.width/25*8.5;t.attr("transform","translate("+e+", "+n+") rotate("+"-45, "+s+", "+c+")")}}if(o.tag){const n=a.insert("polygon"),i=a.append("circle"),r=a.append("text").attr("y",c-16).attr("class","tag-label").text(o.tag);let l=r.node().getBBox();r.attr("x",s+10-l.width/2);const h=l.height/2,u=c-19.2;n.attr("class","tag-label-bkg").attr("points",`\n ${s-l.width/2-t/2},${u+e}\n ${s-l.width/2-t/2},${u-e}\n ${s+10-l.width/2-t},${u-h-e}\n ${s+10+l.width/2+t},${u-h-e}\n ${s+10+l.width/2+t},${u+h+e}\n ${s+10-l.width/2-t},${u+h+e}`),i.attr("cx",s-l.width/2+t/2).attr("cy",u).attr("r",1.5).attr("class","tag-hole")}}s+=50,s>Mr&&(Mr=s)}))},Fr=(t,e,n=0)=>{const i=t+Math.abs(t-e)/2;if(n>5)return i;if(Or.every((t=>Math.abs(t-i)>=10)))return Or.push(i),i;const r=Math.abs(t-e);return Fr(t,e-r/5,n+1)},$r=(t,e,n,i)=>{const r=Dr[e.id],a=Dr[n.id],s=((t,e,n)=>Object.keys(n).filter((i=>n[i].branch===e.branch&&n[i].seq>t.seq&&n[i].seq 0)(e,n,i);let o,c="",l="",h=0,u=0,d=Nr[n.branch].index;if(s){c="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,u=10,d=Nr[n.branch].index;const t=r.y a.y&&(c="A 20 20, 0, 0, 0,",h=20,u=20,d=Nr[e.branch].index,o=`M ${r.x} ${r.y} L ${a.x-h} ${r.y} ${c} ${a.x} ${r.y-u} L ${a.x} ${a.y}`),r.y===a.y&&(d=Nr[e.branch].index,o=`M ${r.x} ${r.y} L ${r.x} ${a.y-h} ${c} ${r.x+u} ${a.y} L ${a.x} ${a.y}`);t.append("path").attr("d",o).attr("class","arrow arrow"+d%8)},Rr=(t,e)=>{const n=Qi().gitGraph,i=t.append("g");e.forEach(((t,e)=>{const r=e%8,a=Nr[t.name].pos,s=i.append("line");s.attr("x1",0),s.attr("y1",a),s.attr("x2",Mr),s.attr("y2",a),s.attr("class","branch branch"+r),Or.push(a);const o=(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let n=[];n="string"==typeof t?t.split(/\\n|\n|
/gi):Array.isArray(t)?t:[];for(const i of n){const t=document.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","0"),t.setAttribute("class","row"),t.textContent=i.trim(),e.appendChild(t)}return e})(t.name),c=i.insert("rect"),l=i.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+r);l.node().appendChild(o);let h=o.getBBox();c.attr("class","branchLabelBkg label"+r).attr("rx",4).attr("ry",4).attr("x",-h.width-4-(!0===n.rotateCommitLabel?30:0)).attr("y",-h.height/2+8).attr("width",h.width+18).attr("height",h.height+4),l.attr("transform","translate("+(-h.width-14-(!0===n.rotateCommitLabel?30:0))+", "+(a-h.height/2-1)+")"),c.attr("transform","translate(-19, "+(a-h.height/2)+")")}))},Zr={draw:function(t,e,n,i){Nr={},Dr={},Tr={},Mr=0,Or=[];const r=Qi(),a=r.gitGraph;Bt.debug("in gitgraph renderer",t+"\n","id:",e,n),Tr=i.db.getCommits();const s=i.db.getBranchesAsObjArray();let c=0;s.forEach(((t,e)=>{Nr[t.name]={pos:c,index:e},c+=50+(a.rotateCommitLabel?40:0)}));const l=(0,o.Ys)(`[id="${e}"]`);Ir(l,Tr,!1),a.showBranches&&Rr(l,s),((t,e)=>{const n=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach((t=>{const i=e[t];i.parents&&i.parents.length>0&&i.parents.forEach((t=>{$r(n,e[t],i,e)}))}))})(l,Tr),Ir(l,Tr,!0),ei.insertTitle(l,"gitTitleText",a.titleTopMargin,i.db.getDiagramTitle()),tr(void 0,l,a.diagramPadding,a.useMaxWidth??r.useMaxWidth)}},Pr=t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((e=>`\n .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${e} { fill: ${t["git"+e]}; }\n .arrow${e} { stroke: ${t["git"+e]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n }\n`;var jr=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,6],i=[1,7],r=[1,8],a=[1,9],s=[1,16],o=[1,11],l=[1,12],h=[1,13],u=[1,14],d=[1,15],p=[1,27],f=[1,33],g=[1,34],y=[1,35],m=[1,36],b=[1,37],_=[1,72],x=[1,73],v=[1,74],k=[1,75],w=[1,76],C=[1,77],T=[1,78],E=[1,38],S=[1,39],A=[1,40],L=[1,41],B=[1,42],N=[1,43],D=[1,44],O=[1,45],M=[1,46],I=[1,47],F=[1,48],$=[1,49],R=[1,50],Z=[1,51],P=[1,52],j=[1,53],Y=[1,54],z=[1,55],U=[1,56],W=[1,57],q=[1,59],H=[1,60],V=[1,61],G=[1,62],X=[1,63],K=[1,64],Q=[1,65],J=[1,66],tt=[1,67],et=[1,68],nt=[1,69],it=[24,52],rt=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],at=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],st=[1,94],ot=[1,95],ct=[1,96],lt=[1,97],ht=[15,24,52],ut=[7,8,9,10,18,22,25,26,27,28],dt=[15,24,43,52],pt=[15,24,43,52,86,87,89,90],ft=[15,43],gt=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],yt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 4:i.setDirection("TB");break;case 5:i.setDirection("BT");break;case 6:i.setDirection("RL");break;case 7:i.setDirection("LR");break;case 11:i.parseDirective("%%{","open_directive");break;case 12:break;case 13:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 14:i.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:i.setC4Type(a[o-3]);break;case 26:i.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 27:i.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 28:this.$=a[o].trim(),i.setTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 35:case 36:a[o].splice(2,0,"ENTERPRISE"),i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 37:i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 38:a[o].splice(2,0,"CONTAINER"),i.addContainerBoundary(...a[o]),this.$=a[o];break;case 39:i.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 40:i.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 41:i.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 42:i.popBoundaryParseStack();break;case 46:i.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 47:i.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 48:i.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 49:i.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 50:i.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 51:i.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 52:i.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 53:i.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 54:i.addContainer("container",...a[o]),this.$=a[o];break;case 55:i.addContainer("container_db",...a[o]),this.$=a[o];break;case 56:i.addContainer("container_queue",...a[o]),this.$=a[o];break;case 57:i.addContainer("external_container",...a[o]),this.$=a[o];break;case 58:i.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 59:i.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 60:i.addComponent("component",...a[o]),this.$=a[o];break;case 61:i.addComponent("component_db",...a[o]),this.$=a[o];break;case 62:i.addComponent("component_queue",...a[o]),this.$=a[o];break;case 63:i.addComponent("external_component",...a[o]),this.$=a[o];break;case 64:i.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 65:i.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 67:i.addRel("rel",...a[o]),this.$=a[o];break;case 68:i.addRel("birel",...a[o]),this.$=a[o];break;case 69:i.addRel("rel_u",...a[o]),this.$=a[o];break;case 70:i.addRel("rel_d",...a[o]),this.$=a[o];break;case 71:i.addRel("rel_l",...a[o]),this.$=a[o];break;case 72:i.addRel("rel_r",...a[o]),this.$=a[o];break;case 73:i.addRel("rel_b",...a[o]),this.$=a[o];break;case 74:a[o].splice(0,1),i.addRel("rel",...a[o]),this.$=a[o];break;case 75:i.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 76:i.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 77:i.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 78:this.$=[a[o]];break;case 79:a[o].unshift(a[o-1]),this.$=a[o];break;case 80:case 82:this.$=a[o].trim();break;case 81:let t={};t[a[o-1].trim()]=a[o].trim(),this.$=t;break;case 83:this.$=""}},table:[{3:1,4:2,5:3,6:4,7:n,8:i,9:r,10:a,11:5,12:10,18:s,22:o,25:l,26:h,27:u,28:d},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:n,8:i,9:r,10:a,11:5,12:10,18:s,22:o,25:l,26:h,27:u,28:d},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:p},e([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:f,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:O,62:M,63:I,64:F,65:$,66:R,67:Z,68:P,69:j,70:Y,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:K,80:Q,81:J,82:tt,83:et,84:nt},{23:79,29:29,30:30,31:31,32:f,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:O,62:M,63:I,64:F,65:$,66:R,67:Z,68:P,69:j,70:Y,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:K,80:Q,81:J,82:tt,83:et,84:nt},{23:80,29:29,30:30,31:31,32:f,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:O,62:M,63:I,64:F,65:$,66:R,67:Z,68:P,69:j,70:Y,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:K,80:Q,81:J,82:tt,83:et,84:nt},{23:81,29:29,30:30,31:31,32:f,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:O,62:M,63:I,64:F,65:$,66:R,67:Z,68:P,69:j,70:Y,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:K,80:Q,81:J,82:tt,83:et,84:nt},{23:82,29:29,30:30,31:31,32:f,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:O,62:M,63:I,64:F,65:$,66:R,67:Z,68:P,69:j,70:Y,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:K,80:Q,81:J,82:tt,83:et,84:nt},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},e(it,[2,20],{53:32,39:58,40:70,42:71,30:87,44:_,46:x,47:v,48:k,49:w,50:C,51:T,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:O,62:M,63:I,64:F,65:$,66:R,67:Z,68:P,69:j,70:Y,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:K,80:Q,81:J,82:tt,83:et,84:nt}),e(it,[2,21]),e(rt,[2,23],{15:[1,88]}),e(it,[2,43],{15:[1,89]}),e(at,[2,26]),e(at,[2,27]),{35:[1,90]},{37:[1,91]},e(at,[2,30]),{45:92,85:93,86:st,87:ot,89:ct,90:lt},{45:98,85:93,86:st,87:ot,89:ct,90:lt},{45:99,85:93,86:st,87:ot,89:ct,90:lt},{45:100,85:93,86:st,87:ot,89:ct,90:lt},{45:101,85:93,86:st,87:ot,89:ct,90:lt},{45:102,85:93,86:st,87:ot,89:ct,90:lt},{45:103,85:93,86:st,87:ot,89:ct,90:lt},{45:104,85:93,86:st,87:ot,89:ct,90:lt},{45:105,85:93,86:st,87:ot,89:ct,90:lt},{45:106,85:93,86:st,87:ot,89:ct,90:lt},{45:107,85:93,86:st,87:ot,89:ct,90:lt},{45:108,85:93,86:st,87:ot,89:ct,90:lt},{45:109,85:93,86:st,87:ot,89:ct,90:lt},{45:110,85:93,86:st,87:ot,89:ct,90:lt},{45:111,85:93,86:st,87:ot,89:ct,90:lt},{45:112,85:93,86:st,87:ot,89:ct,90:lt},{45:113,85:93,86:st,87:ot,89:ct,90:lt},{45:114,85:93,86:st,87:ot,89:ct,90:lt},{45:115,85:93,86:st,87:ot,89:ct,90:lt},{45:116,85:93,86:st,87:ot,89:ct,90:lt},e(ht,[2,66]),{45:117,85:93,86:st,87:ot,89:ct,90:lt},{45:118,85:93,86:st,87:ot,89:ct,90:lt},{45:119,85:93,86:st,87:ot,89:ct,90:lt},{45:120,85:93,86:st,87:ot,89:ct,90:lt},{45:121,85:93,86:st,87:ot,89:ct,90:lt},{45:122,85:93,86:st,87:ot,89:ct,90:lt},{45:123,85:93,86:st,87:ot,89:ct,90:lt},{45:124,85:93,86:st,87:ot,89:ct,90:lt},{45:125,85:93,86:st,87:ot,89:ct,90:lt},{45:126,85:93,86:st,87:ot,89:ct,90:lt},{45:127,85:93,86:st,87:ot,89:ct,90:lt},{30:128,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:O,62:M,63:I,64:F,65:$,66:R,67:Z,68:P,69:j,70:Y,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:K,80:Q,81:J,82:tt,83:et,84:nt},{15:[1,130],43:[1,129]},{45:131,85:93,86:st,87:ot,89:ct,90:lt},{45:132,85:93,86:st,87:ot,89:ct,90:lt},{45:133,85:93,86:st,87:ot,89:ct,90:lt},{45:134,85:93,86:st,87:ot,89:ct,90:lt},{45:135,85:93,86:st,87:ot,89:ct,90:lt},{45:136,85:93,86:st,87:ot,89:ct,90:lt},{45:137,85:93,86:st,87:ot,89:ct,90:lt},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},e(ut,[2,9]),{14:142,21:p},{21:[2,13]},{1:[2,15]},e(it,[2,22]),e(rt,[2,24],{31:31,29:143,32:f,33:g,34:y,36:m,38:b}),e(it,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:f,33:g,34:y,36:m,38:b,44:_,46:x,47:v,48:k,49:w,50:C,51:T,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:O,62:M,63:I,64:F,65:$,66:R,67:Z,68:P,69:j,70:Y,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:K,80:Q,81:J,82:tt,83:et,84:nt}),e(at,[2,28]),e(at,[2,29]),e(ht,[2,46]),e(dt,[2,78],{85:93,45:145,86:st,87:ot,89:ct,90:lt}),e(pt,[2,80]),{88:[1,146]},e(pt,[2,82]),e(pt,[2,83]),e(ht,[2,47]),e(ht,[2,48]),e(ht,[2,49]),e(ht,[2,50]),e(ht,[2,51]),e(ht,[2,52]),e(ht,[2,53]),e(ht,[2,54]),e(ht,[2,55]),e(ht,[2,56]),e(ht,[2,57]),e(ht,[2,58]),e(ht,[2,59]),e(ht,[2,60]),e(ht,[2,61]),e(ht,[2,62]),e(ht,[2,63]),e(ht,[2,64]),e(ht,[2,65]),e(ht,[2,67]),e(ht,[2,68]),e(ht,[2,69]),e(ht,[2,70]),e(ht,[2,71]),e(ht,[2,72]),e(ht,[2,73]),e(ht,[2,74]),e(ht,[2,75]),e(ht,[2,76]),e(ht,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},e(ft,[2,35]),e(ft,[2,36]),e(ft,[2,37]),e(ft,[2,38]),e(ft,[2,39]),e(ft,[2,40]),e(ft,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},e(rt,[2,25]),e(it,[2,45]),e(dt,[2,79]),e(pt,[2,81]),e(ht,[2,31]),e(ht,[2,42]),e(gt,[2,32]),e(gt,[2,33],{15:[1,152]}),e(ut,[2,10]),e(gt,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],a=[],s=this.table,o="",c=0,l=0,h=a.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;a.push(f);var g=u.options&&u.options.ranges;function y(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,_,x,v,k,w,C,T={};;){if(b=n[n.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null==m&&(m=y()),_=s[b]&&s[b][m]),void 0===_||!_.length||!_[0]){var E="";for(v in C=[],s[b])this.terminals_[v]&&v>2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},mt=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;ae[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 78:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:case 21:case 75:break;case 19:c;break;case 20:return 15;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:case 58:return this.begin("rel_u"),76;case 59:case 60:return this.begin("rel_d"),77;case 61:case 62:return this.begin("rel_l"),78;case 63:case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:case 84:this.popState(),this.popState();break;case 74:case 76:return 90;case 77:this.begin("string");break;case 79:case 85:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}},t);function bt(){this.yy={}}return yt.lexer=mt,bt.prototype=yt,yt.Parser=bt,new bt}();jr.parser=jr;const Yr=jr,zr=t=>null!==t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/);let Ur=[],Wr=[""],qr="global",Hr="",Vr=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Gr=[],Xr="",Kr=!1,Qr=4,Jr=2;var ta;const ea=function(t){return null==t?Ur:Ur.filter((e=>e.parentBoundary===t))},na=function(){return Kr},ia={addPersonOrSystem:function(t,e,n,i,r,a,s){if(null===e||null===n)return;let o={};const c=Ur.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,Ur.push(o)),o.label=null==n?{text:""}:{text:n},null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]=e}else o.tags=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=qr,o.wrap=na()},addPersonOrSystemBoundary:function(t,e,n,i,r){if(null===t||null===e)return;let a={};const s=Vr.find((e=>e.alias===t));if(s&&t===s.alias?a=s:(a.alias=t,Vr.push(a)),a.label=null==e?{text:""}:{text:e},null==n)a.type={text:"system"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]={text:e}}else a.type={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.tags=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]=e}else a.link=r;a.parentBoundary=qr,a.wrap=na(),Hr=qr,qr=t,Wr.push(Hr)},addContainer:function(t,e,n,i,r,a,s,o){if(null===e||null===n)return;let c={};const l=Ur.find((t=>t.alias===e));if(l&&e===l.alias?c=l:(c.alias=e,Ur.push(c)),c.label=null==n?{text:""}:{text:n},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]=e}else c.sprite=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=na(),c.typeC4Shape={text:t},c.parentBoundary=qr},addContainerBoundary:function(t,e,n,i,r){if(null===t||null===e)return;let a={};const s=Vr.find((e=>e.alias===t));if(s&&t===s.alias?a=s:(a.alias=t,Vr.push(a)),a.label=null==e?{text:""}:{text:e},null==n)a.type={text:"container"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]={text:e}}else a.type={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.tags=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]=e}else a.link=r;a.parentBoundary=qr,a.wrap=na(),Hr=qr,qr=t,Wr.push(Hr)},addComponent:function(t,e,n,i,r,a,s,o){if(null===e||null===n)return;let c={};const l=Ur.find((t=>t.alias===e));if(l&&e===l.alias?c=l:(c.alias=e,Ur.push(c)),c.label=null==n?{text:""}:{text:n},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]=e}else c.sprite=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=na(),c.typeC4Shape={text:t},c.parentBoundary=qr},addDeploymentNode:function(t,e,n,i,r,a,s,o){if(null===e||null===n)return;let c={};const l=Vr.find((t=>t.alias===e));if(l&&e===l.alias?c=l:(c.alias=e,Vr.push(c)),c.label=null==n?{text:""}:{text:n},null==i)c.type={text:"node"};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.type={text:i};if(null==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.nodeType=t,c.parentBoundary=qr,c.wrap=na(),Hr=qr,qr=e,Wr.push(Hr)},popBoundaryParseStack:function(){qr=Hr,Wr.pop(),Hr=Wr.pop(),Wr.push(Hr)},addRel:function(t,e,n,i,r,a,s,o,c){if(null==t||null==e||null==n||null==i)return;let l={};const h=Gr.find((t=>t.from===e&&t.to===n));if(h?l=h:Gr.push(l),l.type=t,l.from=e,l.to=n,l.label={text:i},null==r)l.techn={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.techn={text:r};if(null==a)l.descr={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]={text:e}}else l.descr={text:a};if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.sprite=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.tags=o;if("object"==typeof c){let[t,e]=Object.entries(c)[0];l[t]=e}else l.link=c;l.wrap=na()},updateElStyle:function(t,e,n,i,r,a,s,o,c,l,h){let u=Ur.find((t=>t.alias===e));if(void 0!==u||(u=Vr.find((t=>t.alias===e)),void 0!==u)){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];u[t]=e}else u.bgColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];u[t]=e}else u.fontColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];u[t]=e}else u.borderColor=r;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];u[t]=e}else u.shadowing=a;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];u[t]=e}else u.shape=s;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];u[t]=e}else u.sprite=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];u[t]=e}else u.techn=c;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];u[t]=e}else u.legendText=l;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];u[t]=e}else u.legendSprite=h}},updateRelStyle:function(t,e,n,i,r,a,s){const o=Gr.find((t=>t.from===e&&t.to===n));if(void 0!==o){if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]=e}else o.textColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.lineColor=r;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]=parseInt(e)}else o.offsetX=parseInt(a);if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=parseInt(e)}else o.offsetY=parseInt(s)}},updateLayoutConfig:function(t,e,n){let i=Qr,r=Jr;if("object"==typeof e){const t=Object.values(e)[0];i=parseInt(t)}else i=parseInt(e);if("object"==typeof n){const t=Object.values(n)[0];r=parseInt(t)}else r=parseInt(n);i>=1&&(Qr=i),r>=1&&(Jr=r)},autoWrap:na,setWrap:function(t){Kr=t},getC4ShapeArray:ea,getC4Shape:function(t){return Ur.find((e=>e.alias===t))},getC4ShapeKeys:function(t){return Object.keys(ea(t))},getBoundarys:function(t){return null==t?Vr:Vr.filter((e=>e.parentBoundary===t))},getCurrentBoundaryParse:function(){return qr},getParentBoundaryParse:function(){return Hr},getRels:function(){return Gr},getTitle:function(){return Xr},getC4Type:function(){return ta},getC4ShapeInRow:function(){return Qr},getC4BoundaryInRow:function(){return Jr},setAccTitle:Zi,getAccTitle:Pi,getAccDescription:Yi,setAccDescription:ji,parseDirective:function(t,e,n){xp.parseDirective(this,t,e,n)},getConfig:()=>ui().c4,clear:function(){Ur=[],Vr=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Hr="",qr="global",Wr=[""],Gr=[],Wr=[""],Xr="",Kr=!1,Qr=4,Jr=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(t){let e=It(t,ui());Xr=e},setC4Type:function(t){let e=It(t,ui());ta=e}},ra=function(t,e){const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),"undefined"!==e.attrs&&null!==e.attrs)for(let i in e.attrs)n.attr(i,e.attrs[i]);return"undefined"!==e.class&&n.attr("class",e.class),n},aa=function(t,e,n,i,r,a){const o=t.append("image");o.attr("width",e),o.attr("height",n),o.attr("x",i),o.attr("y",r);let c=a.startsWith("data:image/png;base64")?a:(0,s.Nm)(a);o.attr("xlink:href",c)},sa=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},oa=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),ca=function(){function t(t,e,n,r,a,s,o){i(e.append("text").attr("x",n+a/2).attr("y",r+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,a,s,o,c){const{fontSize:l,fontFamily:h,fontWeight:u}=c,d=t.split(jt.lineBreakRegex);for(let p=0;p >"),e.typeC4Shape.text){case"person":case"external_person":aa(c,48,48,e.x+e.width/2-24,e.y+e.image.Y,o)}let u=n[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,ca(n)(e.label.text,c,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},u),u=n[e.typeC4Shape.text+"Font"](),u.fontColor=s,e.techn&&""!==(null==(i=e.techn)?void 0:i.text)?ca(n)(e.techn.text,c,e.x,e.y+e.techn.Y,e.width,e.height,{fill:s,"font-style":"italic"},u):e.type&&""!==e.type.text&&ca(n)(e.type.text,c,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&(u=n.personFont(),u.fontColor=s,ca(n)(e.descr.text,c,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},u)),e.height},ua=(t,e,n)=>{const i=t.append("g");let r=0;for(let a of e){let t=a.textColor?a.textColor:"#444444",e=a.lineColor?a.lineColor:"#444444",s=a.offsetX?parseInt(a.offsetX):0,o=a.offsetY?parseInt(a.offsetY):0,c="";if(0===r){let t=i.append("line");t.attr("x1",a.startPoint.x),t.attr("y1",a.startPoint.y),t.attr("x2",a.endPoint.x),t.attr("y2",a.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==a.type&&t.attr("marker-end","url("+c+"#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||t.attr("marker-start","url("+c+"#arrowend)"),r=-1}else{let t=i.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),"rel_b"!==a.type&&t.attr("marker-end","url("+c+"#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||t.attr("marker-start","url("+c+"#arrowend)")}let l=n.messageFont();ca(n)(a.label.text,i,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+s,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+o,a.label.width,a.label.height,{fill:t},l),a.techn&&""!==a.techn.text&&(l=n.messageFont(),ca(n)("["+a.techn.text+"]",i,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+s,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+n.messageFontSize+5+o,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:t,"font-style":"italic"},l))}},da=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},pa=function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},fa=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},ga=function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},ya=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},ma=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},ba=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")};s.Nm;let _a=0,xa=0,va=4,ka=2;jr.yy=ia;let wa={};class Ca{constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Ta(t.db.getConfig())}setData(t,e,n,i){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,n=e+t.width,i=this.nextData.starty+2*t.margin,r=i+t.height;(e>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>va)&&(e=this.nextData.startx+t.margin+wa.nextLinePaddingX,i=this.nextData.stopy+2*t.margin,this.nextData.stopx=n=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=r=i+t.height,this.nextData.cnt=1),t.x=e,t.y=i,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",r,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",r,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Ta(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}}const Ta=function(t){On(wa,t),t.fontFamily&&(wa.personFontFamily=wa.systemFontFamily=wa.messageFontFamily=t.fontFamily),t.fontSize&&(wa.personFontSize=wa.systemFontSize=wa.messageFontSize=t.fontSize),t.fontWeight&&(wa.personFontWeight=wa.systemFontWeight=wa.messageFontWeight=t.fontWeight)},Ea=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),Sa=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight});function Aa(t,e,n,i,r){if(!e[t].width)if(n)e[t].text=Wn(e[t].text,r,i),e[t].textLines=e[t].text.split(jt.lineBreakRegex).length,e[t].width=r,e[t].height=Hn(e[t].text,i);else{let n=e[t].text.split(jt.lineBreakRegex);e[t].textLines=n.length;let r=0;e[t].height=0,e[t].width=0;for(const a of n)e[t].width=Math.max(Vn(a,i),e[t].width),r=Hn(a,i),e[t].height=e[t].height+r}}const La=function(t,e,n){e.x=n.data.startx,e.y=n.data.starty,e.width=n.data.stopx-n.data.startx,e.height=n.data.stopy-n.data.starty,e.label.y=wa.c4ShapeMargin-35;let i=e.wrap&&wa.wrap,r=Sa(wa);r.fontSize=r.fontSize+2,r.fontWeight="bold",Aa("label",e,i,r,Vn(e.label.text,r)),la(t,e,wa)},Ba=function(t,e,n,i){let r=0;for(const a of i){r=0;const i=n[a];let s=Ea(wa,i.typeC4Shape.text);switch(s.fontSize=s.fontSize-2,i.typeC4Shape.width=Vn("<<"+i.typeC4Shape.text+">>",s),i.typeC4Shape.height=s.fontSize+2,i.typeC4Shape.Y=wa.c4ShapePadding,r=i.typeC4Shape.Y+i.typeC4Shape.height-4,i.image={width:0,height:0,Y:0},i.typeC4Shape.text){case"person":case"external_person":i.image.width=48,i.image.height=48,i.image.Y=r,r=i.image.Y+i.image.height}i.sprite&&(i.image.width=48,i.image.height=48,i.image.Y=r,r=i.image.Y+i.image.height);let o=i.wrap&&wa.wrap,c=wa.width-2*wa.c4ShapePadding,l=Ea(wa,i.typeC4Shape.text);if(l.fontSize=l.fontSize+2,l.fontWeight="bold",Aa("label",i,o,l,c),i.label.Y=r+8,r=i.label.Y+i.label.height,i.type&&""!==i.type.text){i.type.text="["+i.type.text+"]",Aa("type",i,o,Ea(wa,i.typeC4Shape.text),c),i.type.Y=r+5,r=i.type.Y+i.type.height}else if(i.techn&&""!==i.techn.text){i.techn.text="["+i.techn.text+"]",Aa("techn",i,o,Ea(wa,i.techn.text),c),i.techn.Y=r+5,r=i.techn.Y+i.techn.height}let h=r,u=i.label.width;if(i.descr&&""!==i.descr.text){Aa("descr",i,o,Ea(wa,i.typeC4Shape.text),c),i.descr.Y=r+20,r=i.descr.Y+i.descr.height,u=Math.max(i.label.width,i.descr.width),h=r-5*i.descr.textLines}u+=wa.c4ShapePadding,i.width=Math.max(i.width||wa.width,u,wa.width),i.height=Math.max(i.height||wa.height,h,wa.height),i.margin=i.margin||wa.c4ShapeMargin,t.insert(i),ha(e,i,wa)}t.bumpLastMargin(wa.c4ShapeMargin)};class Na{constructor(t,e){this.x=t,this.y=e}}let Da=function(t,e){let n=t.x,i=t.y,r=e.x,a=e.y,s=n+t.width/2,o=i+t.height/2,c=Math.abs(n-r),l=Math.abs(i-a),h=l/c,u=t.height/t.width,d=null;return i==a&&n r?d=new Na(n,o):n==r&&ia&&(d=new Na(s,i)),n>r&&i=h?new Na(n,o+h*t.width/2):new Na(s-c/l*t.height/2,i+t.height):n =h?new Na(n+t.width,o+h*t.width/2):new Na(s+c/l*t.height/2,i+t.height):n a?d=u>=h?new Na(n+t.width,o-h*t.width/2):new Na(s+t.height/2*c/l,i):n>r&&i>a&&(d=u>=h?new Na(n,o-t.width/2*h):new Na(s-t.height/2*c/l,i)),d},Oa=function(t,e){let n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;let i=Da(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:i,endPoint:Da(e,n)}};function Ma(t,e,n,i,r){let a=new Ca(r);a.data.widthLimit=n.data.widthLimit/Math.min(ka,i.length);for(let[s,o]of i.entries()){let i=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height);let c=o.wrap&&wa.wrap,l=Sa(wa);if(l.fontSize=l.fontSize+2,l.fontWeight="bold",Aa("label",o,c,l,a.data.widthLimit),o.label.Y=i+8,i=o.label.Y+o.label.height,o.type&&""!==o.type.text){o.type.text="["+o.type.text+"]",Aa("type",o,c,Sa(wa),a.data.widthLimit),o.type.Y=i+5,i=o.type.Y+o.type.height}if(o.descr&&""!==o.descr.text){let t=Sa(wa);t.fontSize=t.fontSize-2,Aa("descr",o,c,t,a.data.widthLimit),o.descr.Y=i+20,i=o.descr.Y+o.descr.height}if(0==s||s%ka==0){let t=n.data.startx+wa.diagramMarginX,e=n.data.stopy+wa.diagramMarginY+i;a.setData(t,t,e,e)}else{let t=a.data.stopx!==a.data.startx?a.data.stopx+wa.diagramMarginX:a.data.startx,e=a.data.starty;a.setData(t,t,e,e)}a.name=o.alias;let h=r.db.getC4ShapeArray(o.alias),u=r.db.getC4ShapeKeys(o.alias);u.length>0&&Ba(a,t,h,u),e=o.alias;let d=r.db.getBoundarys(e);d.length>0&&Ma(t,e,a,d,r),"global"!==o.alias&&La(t,o,a),n.data.stopy=Math.max(a.data.stopy+wa.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(a.data.stopx+wa.c4ShapeMargin,n.data.stopx),_a=Math.max(_a,n.data.stopx),xa=Math.max(xa,n.data.stopy)}}const Ia={drawPersonOrSystemArray:Ba,drawBoundary:La,setConf:Ta,draw:function(t,e,n,i){wa=ui().c4;const r=ui().securityLevel;let a;"sandbox"===r&&(a=(0,o.Ys)("#i"+e));const s="sandbox"===r?(0,o.Ys)(a.nodes()[0].contentDocument.body):(0,o.Ys)("body");let c=i.db;i.db.setWrap(wa.wrap),va=c.getC4ShapeInRow(),ka=c.getC4BoundaryInRow(),Bt.debug(`C:${JSON.stringify(wa,null,2)}`);const l="sandbox"===r?s.select(`[id="${e}"]`):(0,o.Ys)(`[id="${e}"]`);ma(l),ya(l),ba(l);let h=new Ca(i);h.setData(wa.diagramMarginX,wa.diagramMarginX,wa.diagramMarginY,wa.diagramMarginY),h.data.widthLimit=screen.availWidth,_a=wa.diagramMarginX,xa=wa.diagramMarginY;const u=i.db.getTitle();Ma(l,"",h,i.db.getBoundarys(""),i),da(l),pa(l),ga(l),fa(l),function(t,e,n,i){let r=0;for(let s of e){r+=1;let t=s.wrap&&wa.wrap,e={fontFamily:(a=wa).messageFontFamily,fontSize:a.messageFontSize,fontWeight:a.messageFontWeight};"C4Dynamic"===i.db.getC4Type()&&(s.label.text=r+": "+s.label.text);let o=Vn(s.label.text,e);Aa("label",s,t,e,o),s.techn&&""!==s.techn.text&&(o=Vn(s.techn.text,e),Aa("techn",s,t,e,o)),s.descr&&""!==s.descr.text&&(o=Vn(s.descr.text,e),Aa("descr",s,t,e,o));let c=n(s.from),l=n(s.to),h=Oa(c,l);s.startPoint=h.startPoint,s.endPoint=h.endPoint}var a;ua(t,e,wa)}(l,i.db.getRels(),i.db.getC4Shape,i),h.data.stopx=_a,h.data.stopy=xa;const d=h.data;let p=d.stopy-d.starty+2*wa.diagramMarginY;const f=d.stopx-d.startx+2*wa.diagramMarginX;u&&l.append("text").text(u).attr("x",(d.stopx-d.startx)/2-4*wa.diagramMarginX).attr("y",d.starty+wa.diagramMarginY),bi(l,p,f,wa.useMaxWidth);const g=u?60:0;l.attr("viewBox",d.startx-wa.diagramMarginX+" -"+(wa.diagramMarginY+g)+" "+f+" "+(p+g)),Bt.debug("models:",d)}};var Fa=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,3],i=[1,7],r=[1,8],a=[1,9],s=[1,10],o=[1,13],c=[1,12],l=[1,16,25],h=[1,20],u=[1,32],d=[1,33],p=[1,34],f=[1,36],g=[1,39],y=[1,37],m=[1,38],b=[1,44],_=[1,45],x=[1,40],v=[1,41],k=[1,42],w=[1,43],C=[1,48],T=[1,49],E=[1,50],S=[1,51],A=[16,25],L=[1,65],B=[1,66],N=[1,67],D=[1,68],O=[1,69],M=[1,70],I=[1,71],F=[1,80],$=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],R=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],Z=[5,8,9,10,11,16,19,23,25],P=[54,88,89,90,91],j=[54,65,66,88,89,90,91],Y=[54,60,61,62,63,64,88,89,90,91],z=[16,25,32],U=[1,107],W={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 5:i.setDirection("TB");break;case 6:i.setDirection("BT");break;case 7:i.setDirection("RL");break;case 8:i.setDirection("LR");break;case 12:i.parseDirective("%%{","open_directive");break;case 13:i.parseDirective(a[o],"type_directive");break;case 14:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 15:i.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=a[o];break;case 22:this.$=a[o-1]+a[o];break;case 23:case 24:this.$=a[o-1]+"~"+a[o];break;case 25:i.addRelation(a[o]);break;case 26:a[o-1].title=i.cleanupLabel(a[o]),i.addRelation(a[o-1]);break;case 35:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 36:case 37:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 38:i.addClass(a[o]);break;case 39:i.addClass(a[o-2]),i.setCssClass(a[o-2],a[o]);break;case 40:i.addClass(a[o-3]),i.addMembers(a[o-3],a[o-1]);break;case 41:i.addClass(a[o-5]),i.setCssClass(a[o-5],a[o-3]),i.addMembers(a[o-5],a[o-1]);break;case 42:i.addAnnotation(a[o],a[o-2]);break;case 43:this.$=[a[o]];break;case 44:a[o].push(a[o-1]),this.$=a[o];break;case 45:case 47:case 48:break;case 46:i.addMember(a[o-1],i.cleanupLabel(a[o]));break;case 49:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 51:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 52:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 53:i.addNote(a[o],a[o-1]);break;case 54:i.addNote(a[o]);break;case 55:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 56:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 57:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 58:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 59:this.$=i.relationType.AGGREGATION;break;case 60:this.$=i.relationType.EXTENSION;break;case 61:this.$=i.relationType.COMPOSITION;break;case 62:this.$=i.relationType.DEPENDENCY;break;case 63:this.$=i.relationType.LOLLIPOP;break;case 64:this.$=i.lineType.LINE;break;case 65:this.$=i.lineType.DOTTED_LINE;break;case 66:case 72:this.$=a[o-2],i.setClickEvent(a[o-1],a[o]);break;case 67:case 73:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 68:case 76:this.$=a[o-2],i.setLink(a[o-1],a[o]);break;case 69:case 77:this.$=a[o-3],i.setLink(a[o-2],a[o-1],a[o]);break;case 70:case 78:this.$=a[o-3],i.setLink(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 71:case 79:this.$=a[o-4],i.setLink(a[o-3],a[o-2],a[o]),i.setTooltip(a[o-3],a[o-1]);break;case 74:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 75:this.$=a[o-4],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 80:i.setCssClass(a[o-1],a[o])}},table:[{3:1,4:2,5:n,6:4,7:5,8:i,9:r,10:a,11:s,12:6,13:11,19:o,23:c},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:n,6:4,7:5,8:i,9:r,10:a,11:s,12:6,13:11,19:o,23:c},{1:[2,9]},e(l,[2,5]),e(l,[2,6]),e(l,[2,7]),e(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:h},e([17,22],[2,13]),{6:31,7:30,8:i,9:r,10:a,11:s,13:11,19:o,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:d,43:p,44:f,49:g,51:y,52:m,55:b,57:_,67:x,68:v,70:k,74:w,88:C,89:T,90:E,91:S},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},e(A,[2,25],{32:[1,57]}),e(A,[2,27]),e(A,[2,28]),e(A,[2,29]),e(A,[2,30]),e(A,[2,31]),e(A,[2,32]),e(A,[2,33]),e(A,[2,34]),{40:[1,58]},{42:[1,59]},e(A,[2,37]),e(A,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:L,61:B,62:N,63:D,64:O,65:M,66:I}),{27:72,28:46,29:47,88:C,89:T,90:E,91:S},e(A,[2,47]),e(A,[2,48]),{28:73,88:C,89:T,90:E},{27:74,28:46,29:47,88:C,89:T,90:E,91:S},{27:75,28:46,29:47,88:C,89:T,90:E,91:S},{27:76,28:46,29:47,88:C,89:T,90:E,91:S},{54:[1,77]},{27:78,28:46,29:47,88:C,89:T,90:E,91:S},{54:F,56:79},e($,[2,20],{28:46,29:47,27:81,30:[1,82],88:C,89:T,90:E,91:S}),e($,[2,21],{30:[1,83]}),e(R,[2,94]),e(R,[2,95]),e(R,[2,96]),e([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),e(Z,[2,10]),{15:84,22:h},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:i,9:r,10:a,11:s,13:11,19:o,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:d,43:p,44:f,49:g,51:y,52:m,55:b,57:_,67:x,68:v,70:k,74:w,88:C,89:T,90:E,91:S},e(A,[2,26]),e(A,[2,35]),e(A,[2,36]),{27:86,28:46,29:47,54:[1,87],88:C,89:T,90:E,91:S},{53:88,58:63,59:64,60:L,61:B,62:N,63:D,64:O,65:M,66:I},e(A,[2,46]),{59:89,65:M,66:I},e(P,[2,58],{58:90,60:L,61:B,62:N,63:D,64:O}),e(j,[2,59]),e(j,[2,60]),e(j,[2,61]),e(j,[2,62]),e(j,[2,63]),e(Y,[2,64]),e(Y,[2,65]),e(A,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:C,89:T,90:E},{54:F,56:99},e(A,[2,54]),e(A,[2,98]),e($,[2,22]),e($,[2,23]),e($,[2,24]),{16:[1,100]},{25:[2,19]},e(z,[2,49]),{27:101,28:46,29:47,88:C,89:T,90:E,91:S},{27:102,28:46,29:47,54:[1,103],88:C,89:T,90:E,91:S},e(P,[2,57],{58:104,60:L,61:B,62:N,63:D,64:O}),e(P,[2,56]),{28:105,88:C,89:T,90:E},{47:106,51:U},{27:108,28:46,29:47,88:C,89:T,90:E,91:S},e(A,[2,66],{54:[1,109]}),e(A,[2,68],{54:[1,111],69:[1,110]}),e(A,[2,72],{54:[1,112],72:[1,113]}),e(A,[2,76],{54:[1,115],69:[1,114]}),e(A,[2,80]),e(A,[2,53]),e(Z,[2,11]),e(z,[2,51]),e(z,[2,50]),{27:116,28:46,29:47,88:C,89:T,90:E,91:S},e(P,[2,55]),e(A,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:U},e(A,[2,42]),e(A,[2,67]),e(A,[2,69]),e(A,[2,70],{69:[1,120]}),e(A,[2,73]),e(A,[2,74],{54:[1,121]}),e(A,[2,77]),e(A,[2,78],{69:[1,122]}),e(z,[2,52]),{47:123,51:U},e(A,[2,40]),{48:[2,44]},e(A,[2,71]),e(A,[2,75]),e(A,[2,79]),{48:[1,124]},e(A,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],a=[],s=this.table,o="",c=0,l=0,h=a.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;a.push(f);var g=u.options&&u.options.ranges;function y(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,_,x,v,k,w,C,T={};;){if(b=n[n.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null==m&&(m=y()),_=s[b]&&s[b][m]),void 0===_||!_.length||!_[0]){var E="";for(v in C=[],s[b])this.terminals_[v]&&v>2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},q=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:case 10:case 19:case 27:break;case 11:return this.begin("acc_title"),39;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),41;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 39:case 42:case 45:case 48:case 51:case 54:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 20:case 21:return 23;case 22:return this.begin("struct"),46;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),48;case 28:return"MEMBER";case 29:return 44;case 30:return 74;case 31:return 67;case 32:return 68;case 33:return 70;case 34:return 55;case 35:return 57;case 36:return 49;case 37:return 50;case 38:this.begin("generic");break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 43:return"STR";case 44:this.begin("bqstring");break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 49:return 73;case 50:this.begin("callback_name");break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 55:return 72;case 56:case 57:case 58:case 59:return 69;case 60:case 61:return 61;case 62:case 63:return 63;case 64:return 62;case 65:return 60;case 66:return 64;case 67:return 65;case 68:return 66;case 69:return 32;case 70:return 45;case 71:return 86;case 72:return"DOT";case 73:return"PLUS";case 74:return 83;case 75:case 76:return"EQUALS";case 77:return 90;case 78:return"PUNCTUATION";case 79:return 89;case 80:return 88;case 81:return 85;case 82:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[54,55],inclusive:!1},callback_name:{rules:[51,52,53],inclusive:!1},href:{rules:[48,49],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[39,40],inclusive:!1},bqstring:{rules:[45,46],inclusive:!1},string:{rules:[42,43],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,37,38,41,44,47,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],inclusive:!0}}},t);function H(){this.yy={}}return W.lexer=q,H.prototype=W,W.Parser=H,new H}();Fa.parser=Fa;const $a=Fa,Ra=(t,e)=>{var n;return"dagre-wrapper"!==(null==(n=null==e?void 0:e.class)?void 0:n.defaultRenderer)&&null!==t.match(/^\s*classDiagram/)},Za=(t,e)=>{var n;return null!==t.match(/^\s*classDiagram/)&&"dagre-wrapper"===(null==(n=null==e?void 0:e.class)?void 0:n.defaultRenderer)||null!==t.match(/^\s*classDiagram-v2/)},Pa="classid-";let ja=[],Ya={},za=[],Ua=0,Wa=[];const qa=t=>jt.sanitizeText(t,ui()),Ha=function(t){let e="",n=t;if(t.indexOf("~")>0){let i=t.split("~");n=i[0],e=jt.sanitizeText(i[1],ui())}return{className:n,type:e}},Va=function(t){let e=Ha(t);void 0===Ya[e.className]&&(Ya[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:Pa+e.className+"-"+Ua},Ua++)},Ga=function(t){const e=Object.keys(Ya);for(const n of e)if(Ya[n].id===t)return Ya[n].domId},Xa=function(t,e){const n=Ha(t).className,i=Ya[n];if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(qa(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(qa(t)):t&&i.members.push(qa(t))}},Ka=function(t,e){t.split(",").forEach((function(t){let n=t;t[0].match(/\d/)&&(n=Pa+n),void 0!==Ya[n]&&Ya[n].cssClasses.push(e)}))},Qa=function(t,e,n){const i=ui();let r=t,a=Ga(r);if("loose"===i.securityLevel&&void 0!==e&&void 0!==Ya[r]){let t=[];if("string"==typeof n){t=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e ")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,o.Ys)(this).classed("hover",!1)}))};Wa.push(Ja);let ts="TB";const es={parseDirective:function(t,e,n){xp.parseDirective(this,t,e,n)},setAccTitle:Zi,getAccTitle:Pi,getAccDescription:Yi,setAccDescription:ji,getConfig:()=>ui().class,addClass:Va,bindFunctions:function(t){Wa.forEach((function(e){e(t)}))},clear:function(){ja=[],Ya={},za=[],Wa=[],Wa.push(Ja),Ri()},getClass:function(t){return Ya[t]},getClasses:function(){return Ya},getNotes:function(){return za},addAnnotation:function(t,e){const n=Ha(t).className;Ya[n].annotations.push(e)},addNote:function(t,e){const n={id:`note${za.length}`,class:e,text:t};za.push(n)},getRelations:function(){return ja},addRelation:function(t){Bt.debug("Adding relation: "+JSON.stringify(t)),Va(t.id1),Va(t.id2),t.id1=Ha(t.id1).className,t.id2=Ha(t.id2).className,t.relationTitle1=jt.sanitizeText(t.relationTitle1.trim(),ui()),t.relationTitle2=jt.sanitizeText(t.relationTitle2.trim(),ui()),ja.push(t)},getDirection:()=>ts,setDirection:t=>{ts=t},addMember:Xa,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>Xa(t,e))))},cleanupLabel:function(t){return":"===t.substring(0,1)?jt.sanitizeText(t.substr(1).trim(),ui()):qa(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){Qa(t,e,n),Ya[t].haveCallback=!0})),Ka(t,"clickable")},setCssClass:Ka,setLink:function(t,e,n){const i=ui();t.split(",").forEach((function(t){let r=t;t[0].match(/\d/)&&(r=Pa+r),void 0!==Ya[r]&&(Ya[r].link=ei.formatUrl(e,i),"sandbox"===i.securityLevel?Ya[r].linkTarget="_top":Ya[r].linkTarget="string"==typeof n?qa(n):"_blank")})),Ka(t,"clickable")},getTooltip:function(t){return Ya[t].tooltip},setTooltip:function(t,e){const n=ui();t.split(",").forEach((function(t){void 0!==e&&(Ya[t].tooltip=jt.sanitizeText(e,n))}))},lookUpDomId:Ga,setDiagramTitle:zi,getDiagramTitle:Ui};let ns=0;const is=function(t){let e=t.match(/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/),n=t.match(/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/);return e&&!n?rs(e):n?as(n):ss(t)},rs=function(t){let e="",n="";try{let i=t[1]?t[1].trim():"",r=t[2]?t[2].trim():"",a=t[3]?Pt(t[3].trim()):"",s=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";n=i+r+a+" "+s,e=cs(o)}catch(i){n=t}return{displayText:n,cssStyle:e}},as=function(t){let e="",n="";try{let i=t[1]?t[1].trim():"",r=t[2]?t[2].trim():"",a=t[3]?Pt(t[3].trim()):"",s=t[4]?t[4].trim():"";n=i+r+"("+a+")"+(t[5]?" : "+Pt(t[5]).trim():""),e=cs(s)}catch(i){n=t}return{displayText:n,cssStyle:e}},ss=function(t){let e="",n="",i="",r=t.indexOf("("),a=t.indexOf(")");if(r>1&&a>r&&a<=t.length){let s="",o="",c=t.substring(0,1);c.match(/\w/)?o=t.substring(0,r).trim():(c.match(/[#+~-]/)&&(s=c),o=t.substring(1,r).trim());const l=t.substring(r+1,a);t.substring(a+1,1),n=cs(t.substring(a+1,a+2)),e=s+o+"("+Pt(l.trim())+")",a ");const h=o.append("tspan").text(l).attr("class","title");c||h.attr("dy",n.textHeight);const u=o.node().getBBox().height,d=s.append("line").attr("x1",0).attr("y1",n.padding+u+n.dividerMargin/2).attr("y2",n.padding+u+n.dividerMargin/2),p=s.append("text").attr("x",n.padding).attr("y",u+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.members.forEach((function(t){os(p,t,c,n),c=!1}));const f=p.node().getBBox(),g=s.append("line").attr("x1",0).attr("y1",n.padding+u+n.dividerMargin+f.height).attr("y2",n.padding+u+n.dividerMargin+f.height),y=s.append("text").attr("x",n.padding).attr("y",u+2*n.dividerMargin+f.height+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.methods.forEach((function(t){os(y,t,c,n),c=!1}));const m=s.node().getBBox();var b=" ";e.cssClasses.length>0&&(b+=e.cssClasses.join(" "));const _=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*n.padding).attr("height",m.height+n.padding+.5*n.dividerMargin).attr("class",b).node().getBBox().width;return o.node().childNodes.forEach((function(t){t.setAttribute("x",(_-t.getBBox().width)/2)})),e.tooltip&&o.insert("title").text(e.tooltip),d.attr("x2",_),g.attr("x2",_),a.width=_,a.height=m.height+n.padding+.5*n.dividerMargin,a},hs=function(t,e,n,i,r){const a=function(t){switch(t){case r.db.relationType.AGGREGATION:return"aggregation";case r.db.relationType.EXTENSION:return"extension";case r.db.relationType.COMPOSITION:return"composition";case r.db.relationType.DEPENDENCY:return"dependency";case r.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter((t=>!Number.isNaN(t.y)));const s=e.points,c=(0,o.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(o.$0Z),l=t.append("path").attr("d",c(s)).attr("id","edge"+ns).attr("class","relation");let h,u,d="";i.arrowMarkerAbsolute&&(d=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,d=d.replace(/\(/g,"\\("),d=d.replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),10==n.relation.lineType&&l.attr("class","relation dotted-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+d+"#"+a(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+d+"#"+a(n.relation.type2)+"End)");const p=e.points.length;let f,g,y,m,b=ei.calcLabelPosition(e.points);if(h=b.x,u=b.y,p%2!=0&&p>1){let t=ei.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),i=ei.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[p-1]);Bt.debug("cardinality_1_point "+JSON.stringify(t)),Bt.debug("cardinality_2_point "+JSON.stringify(i)),f=t.x,g=t.y,y=i.x,m=i.y}if(void 0!==n.title){const e=t.append("g").attr("class","classLabel"),r=e.append("text").attr("class","label").attr("x",h).attr("y",u).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=r;const a=r.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",a.x-i.padding/2).attr("y",a.y-i.padding/2).attr("width",a.width+i.padding).attr("height",a.height+i.padding)}if(Bt.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1){t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",f).attr("y",g).attr("fill","black").attr("font-size","6").text(n.relationTitle1)}if(void 0!==n.relationTitle2&&"none"!==n.relationTitle2){t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",y).attr("y",m).attr("fill","black").attr("font-size","6").text(n.relationTitle2)}ns++},us=function(t,e,n,i){Bt.debug("Rendering note ",e,n);const r=e.id,a={id:r,text:e.text,width:0,height:0},s=t.append("g").attr("id",r).attr("class","classGroup");let o=s.append("text").attr("y",n.textHeight+n.padding).attr("x",0);const c=JSON.parse(`"${e.text}"`).split("\n");c.forEach((function(t){Bt.debug(`Adding line: ${t}`),o.append("tspan").text(t).attr("class","title").attr("dy",n.textHeight)}));const l=s.node().getBBox(),h=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",l.width+2*n.padding).attr("height",l.height+c.length*n.textHeight+n.padding+.5*n.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach((function(t){t.setAttribute("x",(h-t.getBBox().width)/2)})),a.width=h,a.height=l.height+c.length*n.textHeight+n.padding+.5*n.dividerMargin,a};let ds={};const ps=function(t){const e=Object.entries(ds).find((e=>e[1].label===t));if(e)return e[0]},fs={draw:function(t,e,n,i){const r=ui().class;ds={},Bt.info("Rendering diagram "+t);const a=ui().securityLevel;let s;"sandbox"===a&&(s=(0,o.Ys)("#i"+e));const c="sandbox"===a?(0,o.Ys)(s.nodes()[0].contentDocument.body):(0,o.Ys)("body"),l=c.select(`[id='${e}']`);var h;(h=l).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),h.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),h.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).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"),h.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).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"),h.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).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"),h.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).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"),h.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).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"),h.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).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");const u=new lt.k({multigraph:!0});u.setGraph({isMultiGraph:!0}),u.setDefaultEdgeLabel((function(){return{}}));const d=i.db.getClasses(),p=Object.keys(d);for(const o of p){const t=d[o],e=ls(l,t,r,i);ds[e.id]=e,u.setNode(e.id,e),Bt.info("Org height: "+e.height)}i.db.getRelations().forEach((function(t){Bt.info("tjoho"+ps(t.id1)+ps(t.id2)+JSON.stringify(t)),u.setEdge(ps(t.id1),ps(t.id2),{relation:t},t.title||"DEFAULT")}));i.db.getNotes().forEach((function(t){Bt.debug(`Adding note: ${JSON.stringify(t)}`);const e=us(l,t,r,i);ds[e.id]=e,u.setNode(e.id,e),t.class&&t.class in d&&u.setEdge(t.id,ps(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")})),(0,ct.bK)(u),u.nodes().forEach((function(t){void 0!==t&&void 0!==u.node(t)&&(Bt.debug("Node "+t+": "+JSON.stringify(u.node(t))),c.select("#"+(i.db.lookUpDomId(t)||t)).attr("transform","translate("+(u.node(t).x-u.node(t).width/2)+","+(u.node(t).y-u.node(t).height/2)+" )"))})),u.edges().forEach((function(t){void 0!==t&&void 0!==u.edge(t)&&(Bt.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(u.edge(t))),hs(l,u.edge(t),u.edge(t).relation,r,i))}));const f=l.node().getBBox(),g=f.width+40,y=f.height+40;bi(l,y,g,r.useMaxWidth);const m=`${f.x-20} ${f.y-20} ${g} ${y}`;Bt.debug(`viewBox ${m}`),l.attr("viewBox",m)}},gs={extension:(t,e,n)=>{Bt.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).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",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).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",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).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:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).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",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).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")},dependency:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).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",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).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")},lollipop:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},point:(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 12 20").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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")},circle:(t,e)=>{t.append("marker").attr("id",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",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")},cross:(t,e)=>{t.append("marker").attr("id",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",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")},barb:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},ys=(t,e,n,i)=>{e.forEach((e=>{gs[e](t,n,i)}))};const ms=(t,e,n,i)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),Zt(ui().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"
"),Bt.info("vertexText"+r);let t=function(t){const e=(0,o.Ys)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=e.append("xhtml:div"),i=t.label,r=t.isNode?"nodeLabel":"edgeLabel";var a,s;return n.html('"+i+""),a=n,(s=t.labelStyle)&&a.attr("style",s),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}({isNode:i,label:up(r).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``)),labelStyle:e.replace("fill:","color:")});return t}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof r?r.split(/\\n|\n|
/gi):Array.isArray(r)?r:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),n?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}},bs=(t,e,n,i)=>{let r;r=n||"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",e.labelStyle);let c;c=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const l=s.node().appendChild(ms(It(up(c),ui()),e.labelStyle,!1,i));let h=l.getBBox();if(Zt(ui().flowchart.htmlLabels)){const t=l.children[0],e=(0,o.Ys)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}const u=e.padding/2;return s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),{shapeSvg:a,bbox:h,halfPadding:u,label:s}},_s=(t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height};function xs(t,e,n,i){return t.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}let vs={},ks={},ws={};const Cs=(t,e)=>(Bt.trace("In isDecendant",e," ",t," = ",ks[e].includes(t)),!!ks[e].includes(t)),Ts=(t,e,n,i)=>{Bt.warn("Copying children of ",t,"root",i,"data",e.node(t),i);const r=e.children(t)||[];t!==i&&r.push(t),Bt.warn("Copying (nodes) clusterId",t,"nodes",r),r.forEach((r=>{if(e.children(r).length>0)Ts(r,e,n,i);else{const a=e.node(r);Bt.info("cp ",r," to ",i," with parent ",t),n.setNode(r,a),i!==e.parent(r)&&(Bt.warn("Setting parent",r,e.parent(r)),n.setParent(r,e.parent(r))),t!==i&&r!==t?(Bt.debug("Setting parent",r,t),n.setParent(r,t)):(Bt.info("In copy ",t,"root",i,"data",e.node(t),i),Bt.debug("Not Setting parent for node=",r,"cluster!==rootId",t!==i,"node!==clusterId",r!==t));const s=e.edges(r);Bt.debug("Copying Edges",s),s.forEach((r=>{Bt.info("Edge",r);const a=e.edge(r.v,r.w,r.name);Bt.info("Edge data",a,i);try{((t,e)=>(Bt.info("Decendants of ",e," is ",ks[e]),Bt.info("Edge is ",t),t.v!==e&&t.w!==e&&(ks[e]?ks[e].includes(t.v)||Cs(t.v,e)||Cs(t.w,e)||ks[e].includes(t.w):(Bt.debug("Tilt, ",e,",not in decendants"),!1))))(r,i)?(Bt.info("Copying as ",r.v,r.w,a,r.name),n.setEdge(r.v,r.w,a,r.name),Bt.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):Bt.info("Skipping copy of edge ",r.v,"--\x3e",r.w," rootId: ",i," clusterId:",t)}catch(s){Bt.error(s)}}))}Bt.debug("Removing node",r),e.removeNode(r)}))},Es=(t,e)=>{const n=e.children(t);let i=[...n];for(const r of n)ws[r]=t,i=[...i,...Es(r,e)];return i},Ss=(t,e)=>{Bt.trace("Searching",t);const n=e.children(t);if(Bt.trace("Searching children of id ",t,n),n.length<1)return Bt.trace("This is a valid node",t),t;for(const i of n){const n=Ss(i,e);if(n)return Bt.trace("Found replacement for",t," => ",n),n}},As=t=>vs[t]&&vs[t].externalConnections&&vs[t]?vs[t].id:t,Ls=(t,e)=>{if(Bt.warn("extractor - ",e,ht.c(t),t.children("D")),e>10)return void Bt.error("Bailing out");let n=t.nodes(),i=!1;for(const r of n){const e=t.children(r);i=i||e.length>0}if(i){Bt.debug("Nodes = ",n,e);for(const i of n)if(Bt.debug("Extracting node",i,vs,vs[i]&&!vs[i].externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),vs[i])if(!vs[i].externalConnections&&t.children(i)&&t.children(i).length>0){Bt.warn("Cluster without external connections, without a parent and with children",i,e);let n="TB"===t.graph().rankdir?"LR":"TB";vs[i]&&vs[i].clusterData&&vs[i].clusterData.dir&&(n=vs[i].clusterData.dir,Bt.warn("Fixing dir",vs[i].clusterData.dir,n));const r=new lt.k({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));Bt.warn("Old graph before copy",ht.c(t)),Ts(i,t,r,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:vs[i].clusterData,labelText:vs[i].labelText,graph:r}),Bt.warn("New graph after copy node: (",i,")",ht.c(r)),Bt.debug("Old graph after copy",ht.c(t))}else Bt.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!vs[i].externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),Bt.debug(vs);else Bt.debug("Not a cluster",i,e);n=t.nodes(),Bt.warn("New list of nodes",n);for(const i of n){const n=t.node(i);Bt.warn(" Now next level",i,n),n.clusterNode&&Ls(n.graph,e+1)}}else Bt.debug("Done, no node has children",t.nodes())},Bs=(t,e)=>{if(0===e.length)return[];let n=Object.assign(e);return e.forEach((e=>{const i=t.children(e),r=Bs(t,i);n=[...n,...r]})),n};function Ns(t,e,n,i){var r=t.x,a=t.y,s=r-i.x,o=a-i.y,c=Math.sqrt(e*e*o*o+n*n*s*s),l=Math.abs(e*n*s/c);i.x0}const Ms=(t,e)=>{var n,i,r=t.x,a=t.y,s=e.x-r,o=e.y-a,c=t.width/2,l=t.height/2;return Math.abs(o)*c>Math.abs(s)*l?(o<0&&(l=-l),n=0===o?0:l*s/o,i=l):(s<0&&(c=-c),n=c,i=0===s?0:c*o/s),{x:r+n,y:a+i}},Is={node:function(t,e){return t.intersect(e)},circle:function(t,e,n){return Ns(t,e,e,n)},ellipse:Ns,polygon:function(t,e,n){var i=t.x,r=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)})):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var c=i-t.width/2-s,l=r-t.height/2-o,h=0;h 1&&a.sort((function(t,e){var i=t.x-n.x,r=t.y-n.y,a=Math.sqrt(i*i+r*r),s=e.x-n.x,o=e.y-n.y,c=Math.sqrt(s*s+o*o);return a {const{shapeSvg:n,bbox:i,halfPadding:r}=bs(t,e,"node "+e.classes,!0);Bt.info("Classes = ",e.classes);const a=n.insert("rect",":first-child");return a.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-r).attr("y",-i.height/2-r).attr("width",i.width+e.padding).attr("height",i.height+e.padding),_s(e,a),e.intersect=function(t){return Is.rect(e,t)},n},$s=(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.width+e.padding+(i.height+e.padding),a=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];Bt.info("Question main (Circle)");const s=xs(n,r,r,a);return s.attr("style",e.style),_s(e,s),e.intersect=function(t){return Bt.warn("Intersect called"),Is.polygon(e,a,t)},n};function Rs(t,e,n,i){const r=[],a=t=>{r.push(t,0)},s=t=>{r.push(0,t)};e.includes("t")?(Bt.debug("add top border"),a(n)):s(n),e.includes("r")?(Bt.debug("add right border"),a(i)):s(i),e.includes("b")?(Bt.debug("add bottom border"),a(n)):s(n),e.includes("l")?(Bt.debug("add left border"),a(i)):s(i),t.attr("stroke-dasharray",r.join(" "))}const Zs=(t,e,n)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let r=70,a=10;"LR"===n&&(r=10,a=70);const s=i.append("rect").attr("x",-1*r/2).attr("y",-1*a/2).attr("width",r).attr("height",a).attr("class","fork-join");return _s(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Is.rect(e,t)},i},Ps={rhombus:$s,question:$s,rect:(t,e)=>{const{shapeSvg:n,bbox:i,halfPadding:r}=bs(t,e,"node "+e.classes,!0);Bt.trace("Classes = ",e.classes);const a=n.insert("rect",":first-child"),s=i.width+e.padding,o=i.height+e.padding;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-r).attr("y",-i.height/2-r).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Rs(a,e.props.borders,s,o),t.delete("borders")),t.forEach((t=>{Bt.warn(`Unknown node property ${t}`)}))}return _s(e,a),e.intersect=function(t){return Is.rect(e,t)},n},labelRect:(t,e)=>{const{shapeSvg:n}=bs(t,e,"label",!0);Bt.trace("Classes = ",e.classes);const i=n.insert("rect",":first-child");if(i.attr("width",0).attr("height",0),n.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Rs(i,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{Bt.warn(`Unknown node property ${t}`)}))}return _s(e,i),e.intersect=function(t){return Is.rect(e,t)},n},rectWithTitle:(t,e)=>{let n;n=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),r=i.insert("rect",":first-child"),a=i.insert("line"),s=i.insert("g").attr("class","label"),c=e.labelText.flat?e.labelText.flat():e.labelText;let l="";l="object"==typeof c?c[0]:c,Bt.info("Label text abc79",l,c,"object"==typeof c);const h=s.node().appendChild(ms(l,e.labelStyle,!0,!0));let u={width:0,height:0};if(Zt(ui().flowchart.htmlLabels)){const t=h.children[0],e=(0,o.Ys)(h);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}Bt.info("Text 2",c);const d=c.slice(1,c.length);let p=h.getBBox();const f=s.node().appendChild(ms(d.join?d.join("
"):d,e.labelStyle,!0,!0));if(Zt(ui().flowchart.htmlLabels)){const t=f.children[0],e=(0,o.Ys)(f);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}const g=e.padding/2;return(0,o.Ys)(f).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+g+5)+")"),(0,o.Ys)(h).attr("transform","translate( "+(u.width{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return n.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Is.circle(e,14,t)},n},circle:(t,e)=>{const{shapeSvg:n,bbox:i,halfPadding:r}=bs(t,e,void 0,!0),a=n.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+r).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Bt.info("Circle main"),_s(e,a),e.intersect=function(t){return Bt.info("Circle intersect",e,i.width/2+r,t),Is.circle(e,i.width/2+r,t)},n},doublecircle:(t,e)=>{const{shapeSvg:n,bbox:i,halfPadding:r}=bs(t,e,void 0,!0),a=n.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+r+5).attr("width",i.width+e.padding+10).attr("height",i.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+r).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Bt.info("DoubleCircle main"),_s(e,s),e.intersect=function(t){return Bt.info("DoubleCircle intersect",e,i.width/2+r+5,t),Is.circle(e,i.width/2+r+5,t)},n},stadium:(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.height+e.padding,a=i.width+r/4+e.padding,s=n.insert("rect",":first-child").attr("style",e.style).attr("rx",r/2).attr("ry",r/2).attr("x",-a/2).attr("y",-r/2).attr("width",a).attr("height",r);return _s(e,s),e.intersect=function(t){return Is.rect(e,t)},n},hexagon:(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.height+e.padding,a=r/4,s=i.width+2*a+e.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-r/2},{x:s-a,y:-r},{x:a,y:-r},{x:0,y:-r/2}],c=xs(n,s,r,o);return c.attr("style",e.style),_s(e,c),e.intersect=function(t){return Is.polygon(e,o,t)},n},rect_left_inv_arrow:(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.width+e.padding,a=i.height+e.padding,s=[{x:-a/2,y:0},{x:r,y:0},{x:r,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return xs(n,r,a,s).attr("style",e.style),e.width=r+a,e.height=a,e.intersect=function(t){return Is.polygon(e,s,t)},n},lean_right:(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.width+e.padding,a=i.height+e.padding,s=[{x:-2*a/6,y:0},{x:r-a/6,y:0},{x:r+2*a/6,y:-a},{x:a/6,y:-a}],o=xs(n,r,a,s);return o.attr("style",e.style),_s(e,o),e.intersect=function(t){return Is.polygon(e,s,t)},n},lean_left:(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.width+e.padding,a=i.height+e.padding,s=[{x:2*a/6,y:0},{x:r+a/6,y:0},{x:r-2*a/6,y:-a},{x:-a/6,y:-a}],o=xs(n,r,a,s);return o.attr("style",e.style),_s(e,o),e.intersect=function(t){return Is.polygon(e,s,t)},n},trapezoid:(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.width+e.padding,a=i.height+e.padding,s=[{x:-2*a/6,y:0},{x:r+2*a/6,y:0},{x:r-a/6,y:-a},{x:a/6,y:-a}],o=xs(n,r,a,s);return o.attr("style",e.style),_s(e,o),e.intersect=function(t){return Is.polygon(e,s,t)},n},inv_trapezoid:(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.width+e.padding,a=i.height+e.padding,s=[{x:a/6,y:0},{x:r-a/6,y:0},{x:r+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=xs(n,r,a,s);return o.attr("style",e.style),_s(e,o),e.intersect=function(t){return Is.polygon(e,s,t)},n},rect_right_inv_arrow:(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.width+e.padding,a=i.height+e.padding,s=[{x:0,y:0},{x:r+a/2,y:0},{x:r,y:-a/2},{x:r+a/2,y:-a},{x:0,y:-a}],o=xs(n,r,a,s);return o.attr("style",e.style),_s(e,o),e.intersect=function(t){return Is.polygon(e,s,t)},n},cylinder:(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.width+e.padding,a=r/2,s=a/(2.5+r/50),o=i.height+s+e.padding,c="M 0,"+s+" a "+a+","+s+" 0,0,0 "+r+" 0 a "+a+","+s+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+r+" 0 l 0,"+-o,l=n.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",c).attr("transform","translate("+-r/2+","+-(o/2+s)+")");return _s(e,l),e.intersect=function(t){const n=Is.rect(e,t),i=n.x-e.x;if(0!=a&&(Math.abs(i) e.height/2-s)){let r=s*s*(1-i*i/(a*a));0!=r&&(r=Math.sqrt(r)),r=s-r,t.y-e.y>0&&(r=-r),n.y+=r}return n},n},start:(t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),_s(e,i),e.intersect=function(t){return Is.circle(e,7,t)},n},end:(t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=n.insert("circle",":first-child"),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),_s(e,r),e.intersect=function(t){return Is.circle(e,7,t)},n},note:Fs,subroutine:(t,e)=>{const{shapeSvg:n,bbox:i}=bs(t,e,void 0,!0),r=i.width+e.padding,a=i.height+e.padding,s=[{x:0,y:0},{x:r,y:0},{x:r,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=xs(n,r,a,s);return o.attr("style",e.style),_s(e,o),e.intersect=function(t){return Is.polygon(e,s,t)},n},fork:Zs,join:Zs,class_box:(t,e)=>{const n=e.padding/2;let i;i=e.classes?"node "+e.classes:"node default";const r=t.insert("g").attr("class",i).attr("id",e.domId||e.id),a=r.insert("rect",":first-child"),s=r.insert("line"),c=r.insert("line");let l=0,h=4;const u=r.insert("g").attr("class","label");let d=0;const p=e.classData.annotations&&e.classData.annotations[0],f=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",g=u.node().appendChild(ms(f,e.labelStyle,!0,!0));let y=g.getBBox();if(Zt(ui().flowchart.htmlLabels)){const t=g.children[0],e=(0,o.Ys)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}e.classData.annotations[0]&&(h+=y.height+4,l+=y.width);let m=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(ui().flowchart.htmlLabels?m+="<"+e.classData.type+">":m+="<"+e.classData.type+">");const b=u.node().appendChild(ms(m,e.labelStyle,!0,!0));(0,o.Ys)(b).attr("class","classTitle");let _=b.getBBox();if(Zt(ui().flowchart.htmlLabels)){const t=b.children[0],e=(0,o.Ys)(b);_=t.getBoundingClientRect(),e.attr("width",_.width),e.attr("height",_.height)}h+=_.height+4,_.width>l&&(l=_.width);const x=[];e.classData.members.forEach((t=>{const n=is(t);let i=n.displayText;ui().flowchart.htmlLabels&&(i=i.replace(//g,">"));const r=u.node().appendChild(ms(i,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0));let a=r.getBBox();if(Zt(ui().flowchart.htmlLabels)){const t=r.children[0],e=(0,o.Ys)(r);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>l&&(l=a.width),h+=a.height+4,x.push(r)})),h+=8;const v=[];if(e.classData.methods.forEach((t=>{const n=is(t);let i=n.displayText;ui().flowchart.htmlLabels&&(i=i.replace(//g,">"));const r=u.node().appendChild(ms(i,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0));let a=r.getBBox();if(Zt(ui().flowchart.htmlLabels)){const t=r.children[0],e=(0,o.Ys)(r);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>l&&(l=a.width),h+=a.height+4,v.push(r)})),h+=8,p){let t=(l-y.width)/2;(0,o.Ys)(g).attr("transform","translate( "+(-1*l/2+t)+", "+-1*h/2+")"),d=y.height+4}let k=(l-_.width)/2;return(0,o.Ys)(b).attr("transform","translate( "+(-1*l/2+k)+", "+(-1*h/2+d)+")"),d+=_.height+4,s.attr("class","divider").attr("x1",-l/2-n).attr("x2",l/2+n).attr("y1",-h/2-n+8+d).attr("y2",-h/2-n+8+d),d+=8,x.forEach((t=>{(0,o.Ys)(t).attr("transform","translate( "+-l/2+", "+(-1*h/2+d+4)+")"),d+=_.height+4})),d+=8,c.attr("class","divider").attr("x1",-l/2-n).attr("x2",l/2+n).attr("y1",-h/2-n+8+d).attr("y2",-h/2-n+8+d),d+=8,v.forEach((t=>{(0,o.Ys)(t).attr("transform","translate( "+-l/2+", "+(-1*h/2+d)+")"),d+=_.height+4})),a.attr("class","outer title-state").attr("x",-l/2-n).attr("y",-h/2-n).attr("width",l+e.padding).attr("height",h+e.padding),_s(e,a),e.intersect=function(t){return Is.rect(e,t)},r}};let js={};const Ys=(t,e,n)=>{let i,r;if(e.link){let a;"sandbox"===ui().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),r=Ps[e.shape](i,e,n)}else r=Ps[e.shape](t,e,n),i=r;return e.tooltip&&r.attr("title",e.tooltip),e.class&&r.attr("class","node default "+e.class),js[e.id]=i,e.haveCallback&&js[e.id].attr("class",js[e.id].attr("class")+" clickable"),i},zs=t=>{const e=js[t.id];Bt.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},Us={rect:(t,e)=>{Bt.trace("Creating subgraph rect for ",e.id,e);const n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=n.insert("rect",":first-child"),r=n.insert("g").attr("class","cluster-label"),a=r.node().appendChild(ms(e.labelText,e.labelStyle,void 0,!0));let s=a.getBBox();if(Zt(ui().flowchart.htmlLabels)){const t=a.children[0],e=(0,o.Ys)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}const c=0*e.padding,l=c/2,h=e.width<=s.width+c?s.width+c:e.width;e.width<=s.width+c?e.diff=(s.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,Bt.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-h/2).attr("y",e.y-e.height/2-l).attr("width",h).attr("height",e.height+c),r.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2)+")");const u=i.node().getBBox();return e.width=u.width,e.height=u.height,e.intersect=function(t){return Ms(e,t)},n},roundedWithTitle:(t,e)=>{const n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),r=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),s=r.node().appendChild(ms(e.labelText,e.labelStyle,void 0,!0));let c=s.getBBox();if(Zt(ui().flowchart.htmlLabels)){const t=s.children[0],e=(0,o.Ys)(s);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}c=s.getBBox();const l=0*e.padding,h=l/2,u=e.width<=c.width+e.padding?c.width+e.padding:e.width;e.width<=c.width+e.padding?e.diff=(c.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h).attr("width",u+l).attr("height",e.height+l),a.attr("class","inner").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h+c.height-1).attr("width",u+l).attr("height",e.height+l-c.height-3),r.attr("transform","translate("+(e.x-c.width/2)+", "+(e.y-e.height/2-e.padding/3+(Zt(ui().flowchart.htmlLabels)?5:3))+")");const d=i.node().getBBox();return e.height=d.height,e.intersect=function(t){return Ms(e,t)},n},noteGroup:(t,e)=>{const n=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=n.insert("rect",":first-child"),r=0*e.padding,a=r/2;i.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+r).attr("height",e.height+r).attr("fill","none");const s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return Ms(e,t)},n},divider:(t,e)=>{const n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),r=0*e.padding,a=r/2;i.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+r).attr("height",e.height+r);const s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.diff=-e.padding/2,e.intersect=function(t){return Ms(e,t)},n}};let Ws={};let qs={},Hs={};const Vs=(t,e)=>{const n=ms(e.label,e.labelStyle),i=t.insert("g").attr("class","edgeLabel"),r=i.insert("g").attr("class","label");r.node().appendChild(n);let a,s=n.getBBox();if(Zt(ui().flowchart.htmlLabels)){const t=n.children[0],e=(0,o.Ys)(n);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}if(r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),qs[e.id]=i,e.width=s.width,e.height=s.height,e.startLabelLeft){const n=ms(e.startLabelLeft,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),r=i.insert("g").attr("class","inner");a=r.node().appendChild(n);const s=n.getBBox();r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Hs[e.id]||(Hs[e.id]={}),Hs[e.id].startLeft=i,Gs(a,e.startLabelLeft)}if(e.startLabelRight){const n=ms(e.startLabelRight,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),r=i.insert("g").attr("class","inner");a=i.node().appendChild(n),r.node().appendChild(n);const s=n.getBBox();r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Hs[e.id]||(Hs[e.id]={}),Hs[e.id].startRight=i,Gs(a,e.startLabelRight)}if(e.endLabelLeft){const n=ms(e.endLabelLeft,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),r=i.insert("g").attr("class","inner");a=r.node().appendChild(n);const s=n.getBBox();r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.node().appendChild(n),Hs[e.id]||(Hs[e.id]={}),Hs[e.id].endLeft=i,Gs(a,e.endLabelLeft)}if(e.endLabelRight){const n=ms(e.endLabelRight,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),r=i.insert("g").attr("class","inner");a=r.node().appendChild(n);const s=n.getBBox();r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.node().appendChild(n),Hs[e.id]||(Hs[e.id]={}),Hs[e.id].endRight=i,Gs(a,e.endLabelRight)}return n};function Gs(t,e){ui().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}const Xs=(t,e)=>{Bt.warn("abc88 cutPathAtIntersect",t,e);let n=[],i=t[0],r=!1;return t.forEach((t=>{if(Bt.info("abc88 checking point",t,e),((t,e)=>{const n=t.x,i=t.y,r=Math.abs(e.x-n),a=Math.abs(e.y-i),s=t.width/2,o=t.height/2;return r>=s||a>=o})(e,t)||r)Bt.warn("abc88 outside",t,i),i=t,r||n.push(t);else{const a=((t,e,n)=>{Bt.warn(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(n)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,r=t.y,a=Math.abs(i-n.x),s=t.width/2;let o=n.x Math.abs(i-e.x)*c){let t=n.y {s=s||t.x===a.x&&t.y===a.y})),n.some((t=>t.x===a.x&&t.y===a.y))?Bt.warn("abc88 no intersect",a,n):n.push(a),r=!0}})),Bt.warn("abc88 returning points",n),n},Ks=(t,e,n,i)=>{Bt.info("Graph in recursive render: XXX",ht.c(e),i);const r=e.graph().rankdir;Bt.trace("Dir in recursive render - dir:",r);const a=t.insert("g").attr("class","root");e.nodes()?Bt.info("Recursive render XXX",e.nodes()):Bt.info("No nodes found for",e),e.edges().length>0&&Bt.trace("Recursive edges",e.edge(e.edges()[0]));const s=a.insert("g").attr("class","clusters"),c=a.insert("g").attr("class","edgePaths"),l=a.insert("g").attr("class","edgeLabels"),h=a.insert("g").attr("class","nodes");e.nodes().forEach((function(t){const a=e.node(t);if(void 0!==i){const n=JSON.parse(JSON.stringify(i.clusterData));Bt.info("Setting data for cluster XXX (",t,") ",n,i),e.setNode(i.id,n),e.parent(t)||(Bt.trace("Setting parent",t,i.id),e.setParent(t,i.id,n))}if(Bt.info("(Insert) Node XXX"+t+": "+JSON.stringify(e.node(t))),a&&a.clusterNode){Bt.info("Cluster identified",t,a.width,e.node(t));const i=Ks(h,a.graph,n,e.node(t)),r=i.elem;_s(a,r),a.diff=i.diff||0,Bt.info("Node bounds (abc123)",t,a,a.width,a.x,a.y),((t,e)=>{js[e.id]=t})(r,a),Bt.warn("Recursive render complete ",r,a)}else e.children(t).length>0?(Bt.info("Cluster - the non recursive path XXX",t,a.id,a,e),Bt.info(Ss(a.id,e)),vs[a.id]={id:Ss(a.id,e),node:a}):(Bt.info("Node - the non recursive path",t,a.id,a),Ys(h,e.node(t),r))})),e.edges().forEach((function(t){const n=e.edge(t.v,t.w,t.name);Bt.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),Bt.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(e.edge(t))),Bt.info("Fix",vs,"ids:",t.v,t.w,"Translateing: ",vs[t.v],vs[t.w]),Vs(l,n)})),e.edges().forEach((function(t){Bt.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),Bt.info("#############################################"),Bt.info("### Layout ###"),Bt.info("#############################################"),Bt.info(e),(0,ct.bK)(e),Bt.info("Graph after layout:",ht.c(e));let u=0;return(t=>Bs(t,t.children()))(e).forEach((function(t){const n=e.node(t);Bt.info("Position "+t+": "+JSON.stringify(e.node(t))),Bt.info("Position "+t+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n&&n.clusterNode?zs(n):e.children(t).length>0?(((t,e)=>{Bt.trace("Inserting cluster");const n=e.shape||"rect";Ws[e.id]=Us[n](t,e)})(s,n),vs[n.id].node=n):zs(n)})),e.edges().forEach((function(t){const i=e.edge(t);Bt.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i),i);const r=function(t,e,n,i,r,a){let s=n.points,c=!1;const l=a.node(e.v);var h=a.node(e.w);Bt.info("abc88 InsertEdge: ",n),h.intersect&&l.intersect&&(s=s.slice(1,n.points.length-1),s.unshift(l.intersect(s[0])),Bt.info("Last point",s[s.length-1],h,h.intersect(s[s.length-1])),s.push(h.intersect(s[s.length-1]))),n.toCluster&&(Bt.info("to cluster abc88",i[n.toCluster]),s=Xs(n.points,i[n.toCluster].node),c=!0),n.fromCluster&&(Bt.info("from cluster abc88",i[n.fromCluster]),s=Xs(s.reverse(),i[n.fromCluster].node).reverse(),c=!0);const u=s.filter((t=>!Number.isNaN(t.y)));let d;d=("graph"===r||"flowchart"===r)&&n.curve||o.$0Z;const p=(0,o.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(d);let f;switch(n.thickness){case"normal":f="edge-thickness-normal";break;case"thick":f="edge-thickness-thick";break;default:f=""}switch(n.pattern){case"solid":f+=" edge-pattern-solid";break;case"dotted":f+=" edge-pattern-dotted";break;case"dashed":f+=" edge-pattern-dashed"}const g=t.append("path").attr("d",p(u)).attr("id",n.id).attr("class"," "+f+(n.classes?" "+n.classes:"")).attr("style",n.style);let y="";switch((ui().flowchart.arrowMarkerAbsolute||ui().state.arrowMarkerAbsolute)&&(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,y=y.replace(/\(/g,"\\("),y=y.replace(/\)/g,"\\)")),Bt.info("arrowTypeStart",n.arrowTypeStart),Bt.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":g.attr("marker-start","url("+y+"#"+r+"-crossStart)");break;case"arrow_point":g.attr("marker-start","url("+y+"#"+r+"-pointStart)");break;case"arrow_barb":g.attr("marker-start","url("+y+"#"+r+"-barbStart)");break;case"arrow_circle":g.attr("marker-start","url("+y+"#"+r+"-circleStart)");break;case"aggregation":g.attr("marker-start","url("+y+"#"+r+"-aggregationStart)");break;case"extension":g.attr("marker-start","url("+y+"#"+r+"-extensionStart)");break;case"composition":g.attr("marker-start","url("+y+"#"+r+"-compositionStart)");break;case"dependency":g.attr("marker-start","url("+y+"#"+r+"-dependencyStart)");break;case"lollipop":g.attr("marker-start","url("+y+"#"+r+"-lollipopStart)")}switch(n.arrowTypeEnd){case"arrow_cross":g.attr("marker-end","url("+y+"#"+r+"-crossEnd)");break;case"arrow_point":g.attr("marker-end","url("+y+"#"+r+"-pointEnd)");break;case"arrow_barb":g.attr("marker-end","url("+y+"#"+r+"-barbEnd)");break;case"arrow_circle":g.attr("marker-end","url("+y+"#"+r+"-circleEnd)");break;case"aggregation":g.attr("marker-end","url("+y+"#"+r+"-aggregationEnd)");break;case"extension":g.attr("marker-end","url("+y+"#"+r+"-extensionEnd)");break;case"composition":g.attr("marker-end","url("+y+"#"+r+"-compositionEnd)");break;case"dependency":g.attr("marker-end","url("+y+"#"+r+"-dependencyEnd)");break;case"lollipop":g.attr("marker-end","url("+y+"#"+r+"-lollipopEnd)")}let m={};return c&&(m.updatedPath=s),m.originalPath=n.points,m}(c,t,i,vs,n,e);((t,e)=>{Bt.info("Moving label abc78 ",t.id,t.label,qs[t.id]);let n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const i=qs[t.id];let r=t.x,a=t.y;if(n){const i=ei.calcLabelPosition(n);Bt.info("Moving label "+t.label+" from (",r,",",a,") to (",i.x,",",i.y,") abc78"),e.updatedPath&&(r=i.x,a=i.y)}i.attr("transform","translate("+r+", "+a+")")}if(t.startLabelLeft){const e=Hs[t.id].startLeft;let i=t.x,r=t.y;if(n){const e=ei.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);i=e.x,r=e.y}e.attr("transform","translate("+i+", "+r+")")}if(t.startLabelRight){const e=Hs[t.id].startRight;let i=t.x,r=t.y;if(n){const e=ei.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);i=e.x,r=e.y}e.attr("transform","translate("+i+", "+r+")")}if(t.endLabelLeft){const e=Hs[t.id].endLeft;let i=t.x,r=t.y;if(n){const e=ei.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);i=e.x,r=e.y}e.attr("transform","translate("+i+", "+r+")")}if(t.endLabelRight){const e=Hs[t.id].endRight;let i=t.x,r=t.y;if(n){const e=ei.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);i=e.x,r=e.y}e.attr("transform","translate("+i+", "+r+")")}})(i,r)})),e.nodes().forEach((function(t){const n=e.node(t);Bt.info(t,n.type,n.diff),"group"===n.type&&(u=n.diff)})),{elem:a,diff:u}},Qs=(t,e,n,i,r)=>{ys(t,n,i,r),js={},qs={},Hs={},Ws={},ks={},ws={},vs={},Bt.warn("Graph at first:",ht.c(e)),((t,e)=>{!t||e>10?Bt.debug("Opting out, no graph "):(Bt.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(Bt.warn("Cluster identified",e," Replacement id in edges: ",Ss(e,t)),ks[e]=Es(e,t),vs[e]={id:Ss(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){const n=t.children(e),i=t.edges();n.length>0?(Bt.debug("Cluster identified",e,ks),i.forEach((t=>{t.v!==e&&t.w!==e&&Cs(t.v,e)^Cs(t.w,e)&&(Bt.warn("Edge: ",t," leaves cluster ",e),Bt.warn("Decendants of XXX ",e,": ",ks[e]),vs[e].externalConnections=!0)}))):Bt.debug("Not a cluster ",e,ks)})),t.edges().forEach((function(e){const n=t.edge(e);Bt.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),Bt.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let i=e.v,r=e.w;if(Bt.warn("Fix XXX",vs,"ids:",e.v,e.w,"Translating: ",vs[e.v]," --- ",vs[e.w]),vs[e.v]&&vs[e.w]&&vs[e.v]===vs[e.w]){Bt.warn("Fixing and trixing link to self - removing XXX",e.v,e.w,e.name),Bt.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),i=As(e.v),r=As(e.w),t.removeEdge(e.v,e.w,e.name);const a=e.w+"---"+e.v;t.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const s=JSON.parse(JSON.stringify(n)),o=JSON.parse(JSON.stringify(n));s.label="",s.arrowTypeEnd="none",o.label="",s.fromCluster=e.v,o.toCluster=e.v,t.setEdge(i,a,s,e.name+"-cyclic-special"),t.setEdge(a,r,o,e.name+"-cyclic-special")}else(vs[e.v]||vs[e.w])&&(Bt.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),i=As(e.v),r=As(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v&&(n.fromCluster=e.v),r!==e.w&&(n.toCluster=e.w),Bt.warn("Fix Replacing with XXX",i,r,e.name),t.setEdge(i,r,n,e.name))})),Bt.warn("Adjusted Graph",ht.c(t)),Ls(t,0),Bt.trace(vs))})(e),Bt.warn("Graph after:",ht.c(e)),Ks(t,e,i)},Js=t=>jt.sanitizeText(t,ui());let to={dividerMargin:10,padding:5,textHeight:10};function eo(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const no={setConf:function(t){Object.keys(t).forEach((function(e){to[e]=t[e]}))},draw:function(t,e,n,i){Bt.info("Drawing class - ",e);const r=ui().flowchart,a=ui().securityLevel;Bt.info("config:",r);const s=r.nodeSpacing||50,c=r.rankSpacing||50,l=new lt.k({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:s,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),h=i.db.getClasses(),u=i.db.getRelations(),d=i.db.getNotes();let p;Bt.info(u),function(t,e,n,i){const r=Object.keys(t);Bt.info("keys:",r),Bt.info(t),r.forEach((function(n){const r=t[n];let a="";r.cssClasses.length>0&&(a=a+" "+r.cssClasses.join(" "));const s={labelStyle:""};let o=void 0!==r.text?r.text:r.id,c="";r.type,c="class_box",e.setNode(r.id,{labelStyle:s.labelStyle,shape:c,labelText:Js(o),classData:r,rx:0,ry:0,class:a,style:s.style,id:r.id,domId:r.domId,tooltip:i.db.getTooltip(r.id)||"",haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:ui().flowchart.padding}),Bt.info("setNode",{labelStyle:s.labelStyle,shape:c,labelText:o,rx:0,ry:0,class:a,style:s.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:ui().flowchart.padding})}))}(h,l,0,i),function(t,e){const n=ui().flowchart;let i=0;t.forEach((function(r){i++;const a={classes:"relation"};a.pattern=1==r.relation.lineType?"dashed":"solid",a.id="id"+i,"arrow_open"===r.type?a.arrowhead="none":a.arrowhead="normal",Bt.info(a,r),a.startLabelRight="none"===r.relationTitle1?"":r.relationTitle1,a.endLabelLeft="none"===r.relationTitle2?"":r.relationTitle2,a.arrowTypeStart=eo(r.relation.type1),a.arrowTypeEnd=eo(r.relation.type2);let s="",c="";if(void 0!==r.style){const t=Pn(r.style);s=t.style,c=t.labelStyle}else s="fill:none";a.style=s,a.labelStyle=c,void 0!==r.interpolate?a.curve=Rn(r.interpolate,o.c_6):void 0!==t.defaultInterpolate?a.curve=Rn(t.defaultInterpolate,o.c_6):a.curve=Rn(n.curve,o.c_6),r.text=r.title,void 0===r.text?void 0!==r.style&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",ui().flowchart.htmlLabels?(a.labelType="html",a.label=''+r.text+""):(a.labelType="text",a.label=r.text.replace(jt.lineBreakRegex,"\n"),void 0===r.style&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:"))),e.setEdge(r.id1,r.id2,a,i)}))}(u,l),function(t,e,n,i){Bt.info(t),t.forEach((function(t,r){const a=t,s="",c="";let l=a.text,h="note";if(e.setNode(a.id,{labelStyle:s,shape:h,labelText:Js(l),noteData:a,rx:0,ry:0,class:"",style:c,id:a.id,domId:a.id,tooltip:"",type:"note",padding:ui().flowchart.padding}),Bt.info("setNode",{labelStyle:s,shape:h,labelText:l,rx:0,ry:0,style:c,id:a.id,type:"note",padding:ui().flowchart.padding}),!a.class||!(a.class in i))return;const u=n+r,d={classes:"relation",pattern:"dotted"};d.id=`edgeNote${u}`,d.arrowhead="none",Bt.info(`Note edge: ${JSON.stringify(d)}, ${JSON.stringify(a)}`),d.startLabelRight="",d.endLabelLeft="",d.arrowTypeStart="none",d.arrowTypeEnd="none",d.style="fill:none",d.labelStyle="",d.curve=Rn(to.curve,o.c_6),e.setEdge(a.id,a.class,d,u)}))}(d,l,u.length+1,h),"sandbox"===a&&(p=(0,o.Ys)("#i"+e));const f="sandbox"===a?(0,o.Ys)(p.nodes()[0].contentDocument.body):(0,o.Ys)("body"),g=f.select(`[id="${e}"]`),y=f.select("#"+e+" g");if(Qs(y,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),ei.insertTitle(g,"classTitleText",r.titleTopMargin,i.db.getDiagramTitle()),_i(l,g,r.diagramPadding,r.useMaxWidth),!r.htmlLabels){const t="sandbox"===a?p.nodes()[0].contentDocument:document,n=t.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const e of n){const n=e.getBBox(),i=t.createElementNS("http://www.w3.org/2000/svg","rect");i.setAttribute("rx",0),i.setAttribute("ry",0),i.setAttribute("width",n.width),i.setAttribute("height",n.height),e.insertBefore(i,e.firstChild)}}}};var io=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,2],i=[1,5],r=[6,9,11,23,25,27,29,30,31,51],a=[1,17],s=[1,18],o=[1,19],c=[1,20],l=[1,21],h=[1,22],u=[1,25],d=[1,30],p=[1,31],f=[1,32],g=[1,33],y=[6,9,11,15,20,23,25,27,29,30,31,44,45,46,47,51],m=[1,45],b=[30,31,48,49],_=[4,6,9,11,23,25,27,29,30,31,51],x=[44,45,46,47],v=[22,37],k=[1,65],w=[1,64],C=[22,37,39,41],T={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyTypeList:35,attributeComment:36,ATTRIBUTE_WORD:37,attributeKeyType:38,COMMA:39,ATTRIBUTE_KEY:40,COMMENT:41,cardinality:42,relType:43,ZERO_OR_ONE:44,ZERO_OR_MORE:45,ONE_OR_MORE:46,ONLY_ONE:47,NON_IDENTIFYING:48,IDENTIFYING:49,WORD:50,open_directive:51,type_directive:52,arg_directive:53,close_directive:54,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",39:"COMMA",40:"ATTRIBUTE_KEY",41:"COMMENT",44:"ZERO_OR_ONE",45:"ZERO_OR_MORE",46:"ONE_OR_MORE",47:"ONLY_ONE",48:"NON_IDENTIFYING",49:"IDENTIFYING",50:"WORD",51:"open_directive",52:"type_directive",53:"arg_directive",54:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[35,3],[38,1],[36,1],[18,3],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:a[o-1].push(a[o]),this.$=a[o-1];break;case 5:case 6:case 20:case 43:case 28:case 29:case 32:this.$=a[o];break;case 12:i.addEntity(a[o-4]),i.addEntity(a[o-2]),i.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 13:i.addEntity(a[o-3]),i.addAttributes(a[o-3],a[o-1]);break;case 14:i.addEntity(a[o-2]);break;case 15:i.addEntity(a[o]);break;case 16:case 17:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 18:case 19:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 21:case 41:case 42:case 33:this.$=a[o].replace(/"/g,"");break;case 22:case 30:this.$=[a[o]];break;case 23:a[o].push(a[o-1]),this.$=a[o];break;case 24:this.$={attributeType:a[o-1],attributeName:a[o]};break;case 25:this.$={attributeType:a[o-2],attributeName:a[o-1],attributeKeyTypeList:a[o]};break;case 26:this.$={attributeType:a[o-2],attributeName:a[o-1],attributeComment:a[o]};break;case 27:this.$={attributeType:a[o-3],attributeName:a[o-2],attributeKeyTypeList:a[o-1],attributeComment:a[o]};break;case 31:a[o-2].push(a[o]),this.$=a[o-2];break;case 34:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 35:this.$=i.Cardinality.ZERO_OR_ONE;break;case 36:this.$=i.Cardinality.ZERO_OR_MORE;break;case 37:this.$=i.Cardinality.ONE_OR_MORE;break;case 38:this.$=i.Cardinality.ONLY_ONE;break;case 39:this.$=i.Identification.NON_IDENTIFYING;break;case 40:this.$=i.Identification.IDENTIFYING;break;case 44:i.parseDirective("%%{","open_directive");break;case 45:i.parseDirective(a[o],"type_directive");break;case 46:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 47:i.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:n,7:3,12:4,51:i},{1:[3]},e(r,[2,3],{5:6}),{3:7,4:n,7:3,12:4,51:i},{13:8,52:[1,9]},{52:[2,44]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:a,25:s,27:o,29:c,30:l,31:h,51:i},{1:[2,2]},{14:23,15:[1,24],54:u},e([15,54],[2,45]),e(r,[2,8],{1:[2,1]}),e(r,[2,4]),{7:15,10:26,12:4,17:16,23:a,25:s,27:o,29:c,30:l,31:h,51:i},e(r,[2,6]),e(r,[2,7]),e(r,[2,11]),e(r,[2,15],{18:27,42:29,20:[1,28],44:d,45:p,46:f,47:g}),{24:[1,34]},{26:[1,35]},{28:[1,36]},e(r,[2,19]),e(y,[2,20]),e(y,[2,21]),{11:[1,37]},{16:38,53:[1,39]},{11:[2,47]},e(r,[2,5]),{17:40,30:l,31:h},{21:41,22:[1,42],32:43,33:44,37:m},{43:46,48:[1,47],49:[1,48]},e(b,[2,35]),e(b,[2,36]),e(b,[2,37]),e(b,[2,38]),e(r,[2,16]),e(r,[2,17]),e(r,[2,18]),e(_,[2,9]),{14:49,54:u},{54:[2,46]},{15:[1,50]},{22:[1,51]},e(r,[2,14]),{21:52,22:[2,22],32:43,33:44,37:m},{34:53,37:[1,54]},{37:[2,28]},{42:55,44:d,45:p,46:f,47:g},e(x,[2,39]),e(x,[2,40]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],50:[1,58]},e(r,[2,13]),{22:[2,23]},e(v,[2,24],{35:61,36:62,38:63,40:k,41:w}),e([22,37,40,41],[2,29]),e([30,31],[2,34]),e(_,[2,10]),e(r,[2,12]),e(r,[2,41]),e(r,[2,42]),e(r,[2,43]),e(v,[2,25],{36:66,39:[1,67],41:w}),e(v,[2,26]),e(C,[2,30]),e(v,[2,33]),e(C,[2,32]),e(v,[2,27]),{38:68,40:k},e(C,[2,31])],defaultActions:{5:[2,44],7:[2,2],25:[2,47],39:[2,46],45:[2,28],52:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],a=[],s=this.table,o="",c=0,l=0,h=a.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;a.push(f);var g=u.options&&u.options.ranges;function y(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,_,x,v,k,w,C,T={};;){if(b=n[n.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null==m&&(m=y()),_=s[b]&&s[b][m]),void 0===_||!_.length||!_[0]){var E="";for(v in C=[],s[b])this.terminals_[v]&&v>2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},E=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),51;case 8:return this.begin("type_directive"),52;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),54;case 11:return 53;case 12:case 13:case 15:case 22:case 27:break;case 14:return 11;case 16:return 9;case 17:return 31;case 18:return 50;case 19:return 4;case 20:return this.begin("block"),20;case 21:return 39;case 23:return 40;case 24:case 25:return 37;case 26:return 41;case 28:return this.popState(),22;case 29:case 58:return e.yytext[0];case 30:case 34:case 35:case 48:return 44;case 31:case 32:case 33:case 41:case 43:case 50:return 46;case 36:case 37:case 38:case 39:case 40:case 42:case 49:return 45;case 44:case 45:case 46:case 47:return 47;case 51:case 54:case 55:case 56:return 48;case 52:case 53:return 49;case 57:return 30;case 59:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28,29],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],inclusive:!0}}},t);function S(){this.yy={}}return T.lexer=E,S.prototype=T,T.Parser=S,new S}();io.parser=io;const ro=io,ao=t=>null!==t.match(/^\s*erDiagram/);let so={},oo=[];const co=function(t){return void 0===so[t]&&(so[t]={attributes:[]},Bt.info("Added new entity :",t)),so[t]},lo={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(t,e,n){xp.parseDirective(this,t,e,n)},getConfig:()=>ui().er,addEntity:co,addAttributes:function(t,e){let n,i=co(t);for(n=e.length-1;n>=0;n--)i.attributes.push(e[n]),Bt.debug("Added attribute ",e[n].attributeName)},getEntities:()=>so,addRelationship:function(t,e,n,i){let r={entityA:t,roleA:e,entityB:n,relSpec:i};oo.push(r),Bt.debug("Added new relationship :",r)},getRelationships:()=>oo,clear:function(){so={},oo=[],Ri()},setAccTitle:Zi,getAccTitle:Pi,setAccDescription:ji,getAccDescription:Yi,setDiagramTitle:zi,getDiagramTitle:Ui},ho={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},uo=ho,po=function(t,e){let n;t.append("defs").append("marker").attr("id",ho.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",ho.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),n=t.append("defs").append("marker").attr("id",ho.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),n=t.append("defs").append("marker").attr("id",ho.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",ho.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",ho.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),n=t.append("defs").append("marker").attr("id",ho.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),n=t.append("defs").append("marker").attr("id",ho.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},fo=/[^\dA-Za-z](\W)*/g;let go={},yo=new Map;const mo=function(t,e,n){let i;return Object.keys(e).forEach((function(r){const a=function(t="",e=""){const n=t.replace(fo,"");return`${vo(e)}${vo(n)}${xt(t,xo)}`}(r,"entity");yo.set(r,a);const s=t.append("g").attr("id",a);i=void 0===i?a:i;const o="text-"+a,c=s.append("text").classed("er entityLabel",!0).attr("id",o).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",ui().fontFamily).style("font-size",go.fontSize+"px").text(r),{width:l,height:h}=((t,e,n)=>{const i=go.entityPadding/3,r=go.entityPadding/3,a=.85*go.fontSize,s=e.node().getBBox(),o=[];let c=!1,l=!1,h=0,u=0,d=0,p=0,f=s.height+2*i,g=1;n.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(c=!0),void 0!==t.attributeComment&&(l=!0)})),n.forEach((n=>{const r=`${e.node().id}-attr-${g}`;let s=0;const y=Pt(n.attributeType),m=t.append("text").classed("er entityLabel",!0).attr("id",`${r}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",ui().fontFamily).style("font-size",a+"px").text(y),b=t.append("text").classed("er entityLabel",!0).attr("id",`${r}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",ui().fontFamily).style("font-size",a+"px").text(n.attributeName),_={};_.tn=m,_.nn=b;const x=m.node().getBBox(),v=b.node().getBBox();if(h=Math.max(h,x.width),u=Math.max(u,v.width),s=Math.max(x.height,v.height),c){const e=void 0!==n.attributeKeyTypeList?n.attributeKeyTypeList.join(","):"",i=t.append("text").classed("er entityLabel",!0).attr("id",`${r}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",ui().fontFamily).style("font-size",a+"px").text(e);_.kn=i;const o=i.node().getBBox();d=Math.max(d,o.width),s=Math.max(s,o.height)}if(l){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${r}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",ui().fontFamily).style("font-size",a+"px").text(n.attributeComment||"");_.cn=e;const i=e.node().getBBox();p=Math.max(p,i.width),s=Math.max(s,i.height)}_.height=s,o.push(_),f+=s+2*i,g+=1}));let y=4;c&&(y+=2),l&&(y+=2);const m=h+u+d+p,b={width:Math.max(go.minEntityWidth,Math.max(s.width+2*go.entityPadding,m+r*y)),height:n.length>0?f:Math.max(go.minEntityHeight,s.height+2*go.entityPadding)};if(n.length>0){const n=Math.max(0,(b.width-m-r*y)/(y/2));e.attr("transform","translate("+b.width/2+","+(i+s.height/2)+")");let a=s.height+2*i,f="attributeBoxOdd";o.forEach((e=>{const s=a+i+e.height/2;e.tn.attr("transform","translate("+r+","+s+")");const o=t.insert("rect","#"+e.tn.node().id).classed(`er ${f}`,!0).attr("x",0).attr("y",a).attr("width",h+2*r+n).attr("height",e.height+2*i),g=parseFloat(o.attr("x"))+parseFloat(o.attr("width"));e.nn.attr("transform","translate("+(g+r)+","+s+")");const y=t.insert("rect","#"+e.nn.node().id).classed(`er ${f}`,!0).attr("x",g).attr("y",a).attr("width",u+2*r+n).attr("height",e.height+2*i);let m=parseFloat(y.attr("x"))+parseFloat(y.attr("width"));if(c){e.kn.attr("transform","translate("+(m+r)+","+s+")");const o=t.insert("rect","#"+e.kn.node().id).classed(`er ${f}`,!0).attr("x",m).attr("y",a).attr("width",d+2*r+n).attr("height",e.height+2*i);m=parseFloat(o.attr("x"))+parseFloat(o.attr("width"))}l&&(e.cn.attr("transform","translate("+(m+r)+","+s+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${f}`,"true").attr("x",m).attr("y",a).attr("width",p+2*r+n).attr("height",e.height+2*i)),a+=e.height+2*i,f="attributeBoxOdd"===f?"attributeBoxEven":"attributeBoxOdd"}))}else b.height=Math.max(go.minEntityHeight,f),e.attr("transform","translate("+b.width/2+","+b.height/2+")");return b})(s,c,e[r].attributes),u=s.insert("rect","#"+o).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",l).attr("height",h).node().getBBox();n.setNode(a,{width:u.width,height:u.height,shape:"rect",id:a})})),i},bo=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")};let _o=0;const xo="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function vo(t=""){return t.length>0?`${t}-`:""}const ko={setConf:function(t){const e=Object.keys(t);for(const n of e)go[n]=t[n]},draw:function(t,e,n,i){go=ui().er,Bt.info("Drawing ER diagram");const r=ui().securityLevel;let a;"sandbox"===r&&(a=(0,o.Ys)("#i"+e));const s=("sandbox"===r?(0,o.Ys)(a.nodes()[0].contentDocument.body):(0,o.Ys)("body")).select(`[id='${e}']`);let c;po(s,go),c=new lt.k({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:go.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const l=mo(s,i.db.getEntities(),c),h=function(t,e){return t.forEach((function(t){e.setEdge(yo.get(t.entityA),yo.get(t.entityB),{relationship:t},bo(t))})),t}(i.db.getRelationships(),c);var u,d;(0,ct.bK)(c),u=s,(d=c).nodes().forEach((function(t){void 0!==t&&void 0!==d.node(t)&&u.select("#"+t).attr("transform","translate("+(d.node(t).x-d.node(t).width/2)+","+(d.node(t).y-d.node(t).height/2)+" )")})),h.forEach((function(t){!function(t,e,n,i,r){_o++;const a=n.edge(yo.get(e.entityA),yo.get(e.entityB),bo(e)),s=(0,o.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(o.$0Z),c=t.insert("path","#"+i).classed("er relationshipLine",!0).attr("d",s(a.points)).style("stroke",go.stroke).style("fill","none");e.relSpec.relType===r.db.Identification.NON_IDENTIFYING&&c.attr("stroke-dasharray","8,8");let l="";switch(go.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case r.db.Cardinality.ZERO_OR_ONE:c.attr("marker-end","url("+l+"#"+uo.ZERO_OR_ONE_END+")");break;case r.db.Cardinality.ZERO_OR_MORE:c.attr("marker-end","url("+l+"#"+uo.ZERO_OR_MORE_END+")");break;case r.db.Cardinality.ONE_OR_MORE:c.attr("marker-end","url("+l+"#"+uo.ONE_OR_MORE_END+")");break;case r.db.Cardinality.ONLY_ONE:c.attr("marker-end","url("+l+"#"+uo.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case r.db.Cardinality.ZERO_OR_ONE:c.attr("marker-start","url("+l+"#"+uo.ZERO_OR_ONE_START+")");break;case r.db.Cardinality.ZERO_OR_MORE:c.attr("marker-start","url("+l+"#"+uo.ZERO_OR_MORE_START+")");break;case r.db.Cardinality.ONE_OR_MORE:c.attr("marker-start","url("+l+"#"+uo.ONE_OR_MORE_START+")");break;case r.db.Cardinality.ONLY_ONE:c.attr("marker-start","url("+l+"#"+uo.ONLY_ONE_START+")")}const h=c.node().getTotalLength(),u=c.node().getPointAtLength(.5*h),d="rel"+_o,p=t.append("text").classed("er relationshipLabel",!0).attr("id",d).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",ui().fontFamily).style("font-size",go.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+d).classed("er relationshipLabelBox",!0).attr("x",u.x-p.width/2).attr("y",u.y-p.height/2).attr("width",p.width).attr("height",p.height)}(s,t,c,l,i)}));const p=go.diagramPadding;ei.insertTitle(s,"entityTitleText",go.titleTopMargin,i.db.getDiagramTitle());const f=s.node().getBBox(),g=f.width+2*p,y=f.height+2*p;bi(s,y,g,go.useMaxWidth),s.attr("viewBox",`${f.x-p} ${f.y-p} ${g} ${y}`)}};var wo=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,9],i=[1,7],r=[1,6],a=[1,8],s=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],o=[2,10],c=[1,20],l=[1,21],h=[1,22],u=[1,23],d=[1,30],p=[1,32],f=[1,33],g=[1,34],y=[1,62],m=[1,48],b=[1,52],_=[1,36],x=[1,37],v=[1,38],k=[1,39],w=[1,40],C=[1,56],T=[1,63],E=[1,51],S=[1,53],A=[1,55],L=[1,59],B=[1,60],N=[1,41],D=[1,42],O=[1,43],M=[1,44],I=[1,61],F=[1,50],$=[1,54],R=[1,57],Z=[1,58],P=[1,49],j=[1,66],Y=[1,71],z=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],U=[1,75],W=[1,74],q=[1,76],H=[20,21,23,81,82],V=[1,99],G=[1,104],X=[1,107],K=[1,108],Q=[1,101],J=[1,106],tt=[1,109],et=[1,102],nt=[1,114],it=[1,113],rt=[1,103],at=[1,105],st=[1,110],ot=[1,111],ct=[1,112],lt=[1,115],ht=[20,21,22,23,81,82],ut=[20,21,22,23,53,81,82],dt=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],pt=[20,21,23],ft=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],gt=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],yt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],mt=[1,149],bt=[1,157],_t=[1,158],xt=[1,159],vt=[1,160],kt=[1,144],wt=[1,145],Ct=[1,141],Tt=[1,152],Et=[1,153],St=[1,154],At=[1,155],Lt=[1,156],Bt=[1,161],Nt=[1,162],Dt=[1,147],Ot=[1,150],Mt=[1,146],It=[1,143],Ft=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],$t=[1,165],Rt=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],Zt=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Pt=[12,21,22,24],jt=[22,106],Yt=[1,250],zt=[1,245],Ut=[1,246],Wt=[1,254],qt=[1,251],Ht=[1,248],Vt=[1,247],Gt=[1,249],Xt=[1,252],Kt=[1,253],Qt=[1,255],Jt=[1,273],te=[20,21,23,106],ee=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],ne={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 5:i.parseDirective("%%{","open_directive");break;case 6:i.parseDirective(a[o],"type_directive");break;case 7:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 8:i.parseDirective("}%%","close_directive","flowchart");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:(!Array.isArray(a[o])||a[o].length>0)&&a[o-1].push(a[o]),this.$=a[o-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:case 78:case 150:this.$=a[o];break;case 19:i.setDirection("TB"),this.$="TB";break;case 20:i.setDirection(a[o-1]),this.$=a[o-1];break;case 35:this.$=a[o-1].nodes;break;case 41:this.$=i.addSubGraph(a[o-6],a[o-1],a[o-4]);break;case 42:this.$=i.addSubGraph(a[o-3],a[o-1],a[o-3]);break;case 43:this.$=i.addSubGraph(void 0,a[o-1],void 0);break;case 45:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 46:case 47:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 51:i.addLink(a[o-2].stmt,a[o],a[o-1]),this.$={stmt:a[o],nodes:a[o].concat(a[o-2].nodes)};break;case 52:i.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 53:this.$={stmt:a[o-1],nodes:a[o-1]};break;case 54:this.$={stmt:a[o],nodes:a[o]};break;case 55:case 123:case 125:this.$=[a[o]];break;case 56:this.$=a[o-4].concat(a[o]);break;case 57:this.$=[a[o-2]],i.setClass(a[o-2],a[o]);break;case 58:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"square");break;case 59:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"doublecircle");break;case 60:this.$=a[o-5],i.addVertex(a[o-5],a[o-2],"circle");break;case 61:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"ellipse");break;case 62:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"stadium");break;case 63:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"subroutine");break;case 64:this.$=a[o-7],i.addVertex(a[o-7],a[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[o-5],a[o-3]]]));break;case 65:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"cylinder");break;case 66:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"round");break;case 67:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"diamond");break;case 68:this.$=a[o-5],i.addVertex(a[o-5],a[o-2],"hexagon");break;case 69:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"odd");break;case 70:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"trapezoid");break;case 71:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"inv_trapezoid");break;case 72:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"lean_right");break;case 73:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"lean_left");break;case 74:this.$=a[o],i.addVertex(a[o]);break;case 75:a[o-1].text=a[o],this.$=a[o-1];break;case 76:case 77:a[o-2].text=a[o-1],this.$=a[o-2];break;case 79:var c=i.destructLink(a[o],a[o-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[o-1]};break;case 80:c=i.destructLink(a[o]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 81:this.$=a[o-1];break;case 83:case 97:case 153:case 151:this.$=a[o-1]+""+a[o];break;case 98:case 99:this.$=a[o-4],i.addClass(a[o-2],a[o]);break;case 100:this.$=a[o-4],i.setClass(a[o-2],a[o]);break;case 101:case 109:this.$=a[o-1],i.setClickEvent(a[o-1],a[o]);break;case 102:case 110:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-2]),i.setTooltip(a[o-3],a[o]);break;case 103:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 104:this.$=a[o-4],i.setClickEvent(a[o-4],a[o-3],a[o-2]),i.setTooltip(a[o-4],a[o]);break;case 105:case 111:this.$=a[o-1],i.setLink(a[o-1],a[o]);break;case 106:case 112:this.$=a[o-3],i.setLink(a[o-3],a[o-2]),i.setTooltip(a[o-3],a[o]);break;case 107:case 113:this.$=a[o-3],i.setLink(a[o-3],a[o-2],a[o]);break;case 108:case 114:this.$=a[o-5],i.setLink(a[o-5],a[o-4],a[o]),i.setTooltip(a[o-5],a[o-2]);break;case 115:this.$=a[o-4],i.addVertex(a[o-2],void 0,void 0,a[o]);break;case 116:case 118:this.$=a[o-4],i.updateLink(a[o-2],a[o]);break;case 117:this.$=a[o-4],i.updateLink([a[o-2]],a[o]);break;case 119:this.$=a[o-8],i.updateLinkInterpolate([a[o-6]],a[o-2]),i.updateLink([a[o-6]],a[o]);break;case 120:this.$=a[o-8],i.updateLinkInterpolate(a[o-6],a[o-2]),i.updateLink(a[o-6],a[o]);break;case 121:this.$=a[o-6],i.updateLinkInterpolate([a[o-4]],a[o]);break;case 122:this.$=a[o-6],i.updateLinkInterpolate(a[o-4],a[o]);break;case 124:case 126:a[o-2].push(a[o]),this.$=a[o-2];break;case 128:this.$=a[o-1]+a[o];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:n,16:4,21:i,22:r,24:a},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:n,16:4,21:i,22:r,24:a},e(s,o,{17:11}),{7:12,13:[1,13]},{16:14,21:i,22:r,24:a},{16:15,21:i,22:r,24:a},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:c,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,43:31,44:p,46:f,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:x,88:v,89:k,90:w,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,118:N,119:D,120:O,121:M,122:I,123:F,124:$,125:R,126:Z,127:P},{8:64,10:[1,65],15:j},e([10,15],[2,6]),e(s,[2,17]),e(s,[2,18]),e(s,[2,19]),{20:[1,68],21:[1,69],22:Y,27:67,30:70},e(z,[2,11]),e(z,[2,12]),e(z,[2,13]),e(z,[2,14]),e(z,[2,15]),e(z,[2,16]),{9:72,20:U,21:W,23:q,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:U,21:W,23:q},{9:81,20:U,21:W,23:q},{9:82,20:U,21:W,23:q},{9:83,20:U,21:W,23:q},{9:84,20:U,21:W,23:q},{9:86,20:U,21:W,22:[1,85],23:q},e(z,[2,44]),{45:[1,87]},{47:[1,88]},e(z,[2,47]),e(H,[2,54],{30:89,22:Y}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:V,52:G,66:X,67:K,84:[1,97],91:Q,97:96,98:[1,94],100:[1,95],105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(z,[2,158]),e(z,[2,159]),e(z,[2,160]),e(z,[2,161]),e(ht,[2,55],{53:[1,116]}),e(ut,[2,74],{116:129,40:[1,117],52:y,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:m,67:b,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:C,95:T,105:E,106:S,109:A,111:L,112:B,122:I,123:F,124:$,125:R,126:Z,127:P}),e(dt,[2,150]),e(dt,[2,175]),e(dt,[2,176]),e(dt,[2,177]),e(dt,[2,178]),e(dt,[2,179]),e(dt,[2,180]),e(dt,[2,181]),e(dt,[2,182]),e(dt,[2,183]),e(dt,[2,184]),e(dt,[2,185]),e(dt,[2,186]),e(dt,[2,187]),e(dt,[2,188]),e(dt,[2,189]),e(dt,[2,190]),{9:130,20:U,21:W,23:q},{11:131,14:[1,132]},e(pt,[2,8]),e(s,[2,20]),e(s,[2,26]),e(s,[2,27]),{21:[1,133]},e(ft,[2,34],{30:134,22:Y}),e(z,[2,35]),{50:135,51:45,52:y,54:46,66:m,67:b,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,122:I,123:F,124:$,125:R,126:Z,127:P},e(gt,[2,48]),e(gt,[2,49]),e(gt,[2,50]),e(yt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:mt,24:bt,26:_t,38:xt,39:139,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),e(z,[2,36]),e(z,[2,37]),e(z,[2,38]),e(z,[2,39]),e(z,[2,40]),{22:mt,24:bt,26:_t,38:xt,39:163,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(Ft,o,{17:164}),e(z,[2,45]),e(z,[2,46]),e(H,[2,53],{52:$t}),{26:V,52:G,66:X,67:K,91:Q,97:166,102:[1,167],105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{95:[1,168],103:169,105:[1,170]},{26:V,52:G,66:X,67:K,91:Q,95:[1,171],97:172,105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{26:V,52:G,66:X,67:K,91:Q,97:173,105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(pt,[2,101],{22:[1,174],99:[1,175]}),e(pt,[2,105],{22:[1,176]}),e(pt,[2,109],{115:100,117:178,22:[1,177],26:V,52:G,66:X,67:K,91:Q,105:J,106:tt,109:et,111:nt,112:it,122:rt,123:at,124:st,125:ot,126:ct,127:lt}),e(pt,[2,111],{22:[1,179]}),e(Rt,[2,152]),e(Rt,[2,154]),e(Rt,[2,155]),e(Rt,[2,156]),e(Rt,[2,157]),e(Zt,[2,162]),e(Zt,[2,163]),e(Zt,[2,164]),e(Zt,[2,165]),e(Zt,[2,166]),e(Zt,[2,167]),e(Zt,[2,168]),e(Zt,[2,169]),e(Zt,[2,170]),e(Zt,[2,171]),e(Zt,[2,172]),e(Zt,[2,173]),e(Zt,[2,174]),{52:y,54:180,66:m,67:b,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,122:I,123:F,124:$,125:R,126:Z,127:P},{22:mt,24:bt,26:_t,38:xt,39:181,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:182,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:184,42:vt,52:G,57:[1,183],66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:185,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:186,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:187,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{66:[1,188]},{22:mt,24:bt,26:_t,38:xt,39:189,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:190,42:vt,52:G,66:X,67:K,71:[1,191],73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:192,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:193,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:194,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(dt,[2,151]),e(Pt,[2,3]),{8:195,15:j},{15:[2,7]},e(s,[2,28]),e(ft,[2,33]),e(H,[2,51],{30:196,22:Y}),e(yt,[2,75],{22:[1,197]}),{22:[1,198]},{22:mt,24:bt,26:_t,38:xt,39:199,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:K,73:kt,81:wt,82:[1,200],83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(Zt,[2,82]),e(Zt,[2,84]),e(Zt,[2,140]),e(Zt,[2,141]),e(Zt,[2,142]),e(Zt,[2,143]),e(Zt,[2,144]),e(Zt,[2,145]),e(Zt,[2,146]),e(Zt,[2,147]),e(Zt,[2,148]),e(Zt,[2,149]),e(Zt,[2,85]),e(Zt,[2,86]),e(Zt,[2,87]),e(Zt,[2,88]),e(Zt,[2,89]),e(Zt,[2,90]),e(Zt,[2,91]),e(Zt,[2,92]),e(Zt,[2,93]),e(Zt,[2,94]),e(Zt,[2,95]),{9:203,20:U,21:W,22:mt,23:q,24:bt,26:_t,38:xt,40:[1,202],42:vt,52:G,66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,204],43:31,44:p,46:f,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:x,88:v,89:k,90:w,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,118:N,119:D,120:O,121:M,122:I,123:F,124:$,125:R,126:Z,127:P},{22:Y,30:205},{22:[1,206],26:V,52:G,66:X,67:K,91:Q,105:J,106:tt,109:et,111:nt,112:it,115:100,117:178,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},e(jt,[2,123]),{22:[1,211]},{22:[1,212],26:V,52:G,66:X,67:K,91:Q,105:J,106:tt,109:et,111:nt,112:it,115:100,117:178,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:[1,213],26:V,52:G,66:X,67:K,91:Q,105:J,106:tt,109:et,111:nt,112:it,115:100,117:178,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{84:[1,214]},e(pt,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},e(Rt,[2,153]),{84:[1,219],101:[1,220]},e(ht,[2,57],{116:129,52:y,66:m,67:b,91:C,95:T,105:E,106:S,109:A,111:L,112:B,122:I,123:F,124:$,125:R,126:Z,127:P}),{22:mt,24:bt,26:_t,38:xt,41:[1,221],42:vt,52:G,66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,56:[1,222],66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:223,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,58:[1,224],66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,60:[1,225],66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,62:[1,226],66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,64:[1,227],66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{67:[1,228]},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:K,70:[1,229],73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:K,72:[1,230],73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:231,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,41:[1,232],42:vt,52:G,66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:K,73:kt,75:[1,233],77:[1,234],81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:K,73:kt,75:[1,236],77:[1,235],81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{9:237,20:U,21:W,23:q},e(H,[2,52],{52:$t}),e(yt,[2,77]),e(yt,[2,76]),{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:K,68:[1,238],73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(yt,[2,79]),e(Zt,[2,83]),{22:mt,24:bt,26:_t,38:xt,39:239,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(Ft,o,{17:240}),e(z,[2,43]),{51:241,52:y,54:46,66:m,67:b,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,122:I,123:F,124:$,125:R,126:Z,127:P},{22:Yt,66:zt,67:Ut,86:Wt,96:242,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt},{22:Yt,66:zt,67:Ut,86:Wt,96:256,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt},{22:Yt,66:zt,67:Ut,86:Wt,96:257,102:qt,104:[1,258],105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt},{22:Yt,66:zt,67:Ut,86:Wt,96:259,102:qt,104:[1,260],105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt},{105:[1,261]},{22:Yt,66:zt,67:Ut,86:Wt,96:262,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt},{22:Yt,66:zt,67:Ut,86:Wt,96:263,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt},{26:V,52:G,66:X,67:K,91:Q,97:264,105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(pt,[2,102]),{84:[1,265]},e(pt,[2,106],{22:[1,266]}),e(pt,[2,107]),e(pt,[2,110]),e(pt,[2,112],{22:[1,267]}),e(pt,[2,113]),e(ut,[2,58]),e(ut,[2,59]),{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,58:[1,268],66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(ut,[2,66]),e(ut,[2,61]),e(ut,[2,62]),e(ut,[2,63]),{66:[1,269]},e(ut,[2,65]),e(ut,[2,67]),{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:K,72:[1,270],73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(ut,[2,69]),e(ut,[2,70]),e(ut,[2,72]),e(ut,[2,71]),e(ut,[2,73]),e(Pt,[2,4]),e([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:mt,24:bt,26:_t,38:xt,41:[1,271],42:vt,52:G,66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,272],43:31,44:p,46:f,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:x,88:v,89:k,90:w,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,118:N,119:D,120:O,121:M,122:I,123:F,124:$,125:R,126:Z,127:P},e(ht,[2,56]),e(pt,[2,115],{106:Jt}),e(te,[2,125],{108:274,22:Yt,66:zt,67:Ut,86:Wt,102:qt,105:Ht,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt}),e(ee,[2,127]),e(ee,[2,129]),e(ee,[2,130]),e(ee,[2,131]),e(ee,[2,132]),e(ee,[2,133]),e(ee,[2,134]),e(ee,[2,135]),e(ee,[2,136]),e(ee,[2,137]),e(ee,[2,138]),e(ee,[2,139]),e(pt,[2,116],{106:Jt}),e(pt,[2,117],{106:Jt}),{22:[1,275]},e(pt,[2,118],{106:Jt}),{22:[1,276]},e(jt,[2,124]),e(pt,[2,98],{106:Jt}),e(pt,[2,99],{106:Jt}),e(pt,[2,100],{115:100,117:178,26:V,52:G,66:X,67:K,91:Q,105:J,106:tt,109:et,111:nt,112:it,122:rt,123:at,124:st,125:ot,126:ct,127:lt}),e(pt,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:U,21:W,23:q},e(z,[2,42]),{22:Yt,66:zt,67:Ut,86:Wt,102:qt,105:Ht,107:283,108:244,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt},e(ee,[2,128]),{26:V,52:G,66:X,67:K,91:Q,97:284,105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{26:V,52:G,66:X,67:K,91:Q,97:285,105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(pt,[2,108]),e(pt,[2,114]),e(ut,[2,60]),{22:mt,24:bt,26:_t,38:xt,39:286,42:vt,52:G,66:X,67:K,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},e(ut,[2,68]),e(Ft,o,{17:287}),e(te,[2,126],{108:274,22:Yt,66:zt,67:Ut,86:Wt,102:qt,105:Ht,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt}),e(pt,[2,121],{115:100,117:178,22:[1,288],26:V,52:G,66:X,67:K,91:Q,105:J,106:tt,109:et,111:nt,112:it,122:rt,123:at,124:st,125:ot,126:ct,127:lt}),e(pt,[2,122],{115:100,117:178,22:[1,289],26:V,52:G,66:X,67:K,91:Q,105:J,106:tt,109:et,111:nt,112:it,122:rt,123:at,124:st,125:ot,126:ct,127:lt}),{22:mt,24:bt,26:_t,38:xt,41:[1,290],42:vt,52:G,66:X,67:K,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Ot,111:nt,112:it,113:Mt,114:It,115:148,122:rt,123:at,124:st,125:ot,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,291],43:31,44:p,46:f,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:x,88:v,89:k,90:w,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,118:N,119:D,120:O,121:M,122:I,123:F,124:$,125:R,126:Z,127:P},{22:Yt,66:zt,67:Ut,86:Wt,96:292,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt},{22:Yt,66:zt,67:Ut,86:Wt,96:293,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Kt,113:Qt},e(ut,[2,64]),e(z,[2,41]),e(pt,[2,119],{106:Jt}),e(pt,[2,120],{106:Jt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],a=[],s=this.table,o="",c=0,l=0,h=a.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;a.push(f);var g=u.options&&u.options.ranges;function y(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,_,x,v,k,w,C,T={};;){if(b=n[n.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null==m&&(m=y()),_=s[b]&&s[b][m]),void 0===_||!_.length||!_[0]){var E="";for(v in C=[],s[b])this.terminals_[v]&&v>2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},ie=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:case 24:case 27:case 30:case 33:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 25:return 100;case 26:this.begin("callbackname");break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 31:return 99;case 32:this.begin("click");break;case 34:return 90;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),24;case 38:return 38;case 39:return 42;case 40:case 41:case 42:case 43:return 101;case 44:return this.popState(),25;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),26;case 55:return 118;case 56:return 119;case 57:return 120;case 58:return 121;case 59:return 105;case 60:return 111;case 61:return 53;case 62:return 67;case 63:return 52;case 64:return 20;case 65:return 106;case 66:return 126;case 67:case 68:case 69:return 82;case 70:case 71:case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[44,45,46,47,48,49,50,51,52,53,54],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],inclusive:!0}}},t);function re(){this.yy={}}return ne.lexer=ie,re.prototype=ne,ne.Parser=re,new re}();wo.parser=wo;const Co=wo,To=(t,e)=>{var n,i;return"dagre-wrapper"!==(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer)&&("elk"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&null!==t.match(/^\s*graph/))},Eo=(t,e)=>{var n,i;return"dagre-d3"!==(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer)&&("elk"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&(null!==t.match(/^\s*graph/)||null!==t.match(/^\s*flowchart/)))};let So,Ao,Lo=0,Bo=ui(),No={},Do=[],Oo={},Mo=[],Io={},Fo={},$o=0,Ro=!0,Zo=[];const Po=t=>jt.sanitizeText(t,Bo),jo=function(t,e,n){xp.parseDirective(this,t,e,n)},Yo=function(t){const e=Object.keys(No);for(const n of e)if(No[n].id===t)return No[n].domId;return t},zo=function(t,e,n,i,r,a,s={}){let o,c=t;void 0!==c&&0!==c.trim().length&&(void 0===No[c]&&(No[c]={id:c,domId:"flowchart-"+c+"-"+Lo,styles:[],classes:[]}),Lo++,void 0!==e?(Bo=ui(),o=Po(e.trim()),'"'===o[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),No[c].text=o):void 0===No[c].text&&(No[c].text=t),void 0!==n&&(No[c].type=n),null!=i&&i.forEach((function(t){No[c].styles.push(t)})),null!=r&&r.forEach((function(t){No[c].classes.push(t)})),void 0!==a&&(No[c].dir=a),void 0===No[c].props?No[c].props=s:void 0!==s&&Object.assign(No[c].props,s))},Uo=function(t,e,n,i){const r={start:t,end:e,type:void 0,text:""};void 0!==(i=n.text)&&(r.text=Po(i.trim()),'"'===r.text[0]&&'"'===r.text[r.text.length-1]&&(r.text=r.text.substring(1,r.text.length-1))),void 0!==n&&(r.type=n.type,r.stroke=n.stroke,r.length=n.length),Do.push(r)},Wo=function(t,e,n,i){let r,a;for(r=0;r /)&&(So="LR"),So.match(/.*v/)&&(So="TB"),"TD"===So&&(So="TB")},Xo=function(t,e){t.split(",").forEach((function(t){let n=t;void 0!==No[n]&&No[n].classes.push(e),void 0!==Io[n]&&Io[n].classes.push(e)}))},Ko=function(t,e,n){t.split(",").forEach((function(t){void 0!==No[t]&&(No[t].link=ei.formatUrl(e,Bo),No[t].linkTarget=n)})),Xo(t,"clickable")},Qo=function(t){return Fo[t]},Jo=function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){let i=Yo(t);if("loose"!==ui().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t ")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,o.Ys)(this).classed("hover",!1)}))};Zo.push(ac);const sc=function(t="gen-1"){No={},Oo={},Do=[],Zo=[ac],Mo=[],Io={},$o=0,Fo=[],Ro=!0,Ao=t,Ri()},oc=t=>{Ao=t||"gen-2"},cc=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},lc=function(t,e,n){let i=t.trim(),r=n;t===n&&n.match(/\s/)&&(i=void 0);let a=[];const{nodeList:s,dir:o}=function(t){const e={boolean:{},number:{},string:{}},n=[];let i;return{nodeList:t.filter((function(t){const r=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(r in e?!e[r].hasOwnProperty(t)&&(e[r][t]=!0):!n.includes(t)&&n.push(t))})),dir:i}}(a.concat.apply(a,e));if(a=s,"gen-1"===Ao)for(let l=0;l 2e3)return;if(dc[uc]=e,Mo[e].id===t)return{result:!0,count:0};let i=0,r=1;for(;i =0){const n=pc(t,e);if(n.result)return{result:!0,count:r+n.count};r+=n.count}i+=1}return{result:!1,count:r}},fc=function(t){return dc[t]},gc=function(){uc=-1,Mo.length>0&&pc("none",Mo.length-1)},yc=function(){return Mo},mc=()=>!!Ro&&(Ro=!1,!0),bc=(t,e)=>{const n=(t=>{const e=t.trim();let n=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross","x"===e[0]&&(i="double_"+i,n=n.slice(1));break;case">":i="arrow_point","<"===e[0]&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle","o"===e[0]&&(i="double_"+i,n=n.slice(1))}let r="normal",a=n.length-1;"="===n[0]&&(r="thick");let s=((t,e)=>{const n=e.length;let i=0;for(let r=0;r {let e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:n,stroke:i}})(e),i.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===i.type)i.type=n.type;else{if(i.type!==n.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return"double_arrow"===i.type&&(i.type="double_arrow_point"),i.length=n.length,i}return n},_c=(t,e)=>{let n=!1;return t.forEach((t=>{t.nodes.indexOf(e)>=0&&(n=!0)})),n},xc=(t,e)=>{const n=[];return t.nodes.forEach(((i,r)=>{_c(e,i)||n.push(t.nodes[r])})),{nodes:n}},vc={firstGraph:mc},kc={parseDirective:jo,defaultConfig:()=>ii.flowchart,setAccTitle:Zi,getAccTitle:Pi,getAccDescription:Yi,setAccDescription:ji,addVertex:zo,lookUpDomId:Yo,addLink:Wo,updateLinkInterpolate:qo,updateLink:Ho,addClass:Vo,setDirection:Go,setClass:Xo,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(Fo["gen-1"===Ao?Yo(t):t]=Po(e))}))},getTooltip:Qo,setClickEvent:Jo,setLink:Ko,bindFunctions:tc,getDirection:ec,getVertices:nc,getEdges:ic,getClasses:rc,clear:sc,setGen:oc,defaultStyle:cc,addSubGraph:lc,getDepthFirstPos:fc,indexNodes:gc,getSubGraphs:yc,destructLink:bc,lex:vc,exists:_c,makeUniq:xc,setDiagramTitle:zi,getDiagramTitle:Ui},wc=Object.freeze(Object.defineProperty({__proto__:null,addClass:Vo,addLink:Wo,addSingleLink:Uo,addSubGraph:lc,addVertex:zo,bindFunctions:tc,clear:sc,default:kc,defaultStyle:cc,destructLink:bc,firstGraph:mc,getClasses:rc,getDepthFirstPos:fc,getDirection:ec,getEdges:ic,getSubGraphs:yc,getTooltip:Qo,getVertices:nc,indexNodes:gc,lex:vc,lookUpDomId:Yo,parseDirective:jo,setClass:Xo,setClickEvent:Jo,setDirection:Go,setGen:oc,setLink:Ko,updateLink:Ho,updateLinkInterpolate:qo},Symbol.toStringTag,{value:"Module"}));const Cc={},Tc=function(t){const e=Object.keys(t);for(const n of e)Cc[n]=t[n]},Ec={},Sc=function(t,e,n,i,r,a){const s=i.select(`[id="${n}"]`);Object.keys(t).forEach((function(n){const i=t[n];let o="default";i.classes.length>0&&(o=i.classes.join(" "));const c=Pn(i.styles);let l,h=void 0!==i.text?i.text:i.id;if(Zt(ui().flowchart.htmlLabels)){const t={label:h.replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``))};l=(0,vt.a)(s,t).node(),l.parentNode.removeChild(l)}else{const t=r.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",c.labelStyle.replace("color:","fill:"));const e=h.split(jt.lineBreakRegex);for(const n of e){const e=r.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","1"),e.textContent=n,t.appendChild(e)}l=t}let u=0,d="";switch(i.type){case"round":u=5,d="rect";break;case"square":case"group":default:d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"odd":case"odd_right":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"doublecircle":d="doublecircle"}e.setNode(i.id,{labelStyle:c.labelStyle,shape:d,labelText:h,rx:u,ry:u,class:o,style:c.style,id:i.id,link:i.link,linkTarget:i.linkTarget,tooltip:a.db.getTooltip(i.id)||"",domId:a.db.lookUpDomId(i.id),haveCallback:i.haveCallback,width:"group"===i.type?500:void 0,dir:i.dir,type:i.type,props:i.props,padding:ui().flowchart.padding}),Bt.info("setNode",{labelStyle:c.labelStyle,shape:d,labelText:h,rx:u,ry:u,class:o,style:c.style,id:i.id,domId:a.db.lookUpDomId(i.id),width:"group"===i.type?500:void 0,type:i.type,dir:i.dir,props:i.props,padding:ui().flowchart.padding})}))},Ac=function(t,e,n){Bt.info("abc78 edges = ",t);let i,r,a=0,s={};if(void 0!==t.defaultStyle){const e=Pn(t.defaultStyle);i=e.style,r=e.labelStyle}t.forEach((function(n){a++;var c="L-"+n.start+"-"+n.end;void 0===s[c]?(s[c]=0,Bt.info("abc78 new entry",c,s[c])):(s[c]++,Bt.info("abc78 new entry",c,s[c]));let l=c+"-"+s[c];Bt.info("abc78 new link id to be used is",c,l,s[c]);var h="LS-"+n.start,u="LE-"+n.end;const d={style:"",labelStyle:""};switch(d.minlen=n.length||1,"arrow_open"===n.type?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle"}let p="",f="";switch(n.stroke){case"normal":p="fill:none;",void 0!==i&&(p=i),void 0!==r&&(f=r),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted",d.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d.thickness="thick",d.pattern="solid",d.style="stroke-width: 3.5px;fill:none;"}if(void 0!==n.style){const t=Pn(n.style);p=t.style,f=t.labelStyle}d.style=d.style+=p,d.labelStyle=d.labelStyle+=f,void 0!==n.interpolate?d.curve=Rn(n.interpolate,o.c_6):void 0!==t.defaultInterpolate?d.curve=Rn(t.defaultInterpolate,o.c_6):d.curve=Rn(Ec.curve,o.c_6),void 0===n.text?void 0!==n.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c"),d.labelType="text",d.label=n.text.replace(jt.lineBreakRegex,"\n"),void 0===n.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),d.labelStyle=d.labelStyle.replace("color:","fill:"),d.id=l,d.classes="flowchart-link "+h+" "+u,e.setEdge(n.start,n.end,d,a)}))},Lc={setConf:function(t){const e=Object.keys(t);for(const n of e)Ec[n]=t[n]},addVertices:Sc,addEdges:Ac,getClasses:function(t,e){Bt.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(n){return}},draw:function(t,e,n,i){Bt.info("Drawing flowchart"),i.db.clear(),kc.setGen("gen-2"),i.parser.parse(t);let r=i.db.getDirection();void 0===r&&(r="TD");const{securityLevel:a,flowchart:s}=ui(),c=s.nodeSpacing||50,l=s.rankSpacing||50;let h;"sandbox"===a&&(h=(0,o.Ys)("#i"+e));const u="sandbox"===a?(0,o.Ys)(h.nodes()[0].contentDocument.body):(0,o.Ys)("body"),d="sandbox"===a?h.nodes()[0].contentDocument:document,p=new lt.k({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:c,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let f;const g=i.db.getSubGraphs();Bt.info("Subgraphs - ",g);for(let o=g.length-1;o>=0;o--)f=g[o],Bt.info("Subgraph - ",f),i.db.addVertex(f.id,f.title,"group",void 0,f.classes,f.dir);const y=i.db.getVertices(),m=i.db.getEdges();Bt.info("Edges",m);let b=0;for(b=g.length-1;b>=0;b--){f=g[b],(0,o.td_)("cluster").append("text");for(let t=0;t 2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},w=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 20:case 23:case 26:case 29:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:case 13:case 14:case 16:case 17:case 18:break;case 15:return 11;case 19:this.begin("href");break;case 21:return 38;case 22:this.begin("callbackname");break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 27:return 37;case 28:this.begin("click");break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}},t);function C(){this.yy={}}return k.lexer=w,C.prototype=k,k.Parser=C,new C}();Bc.parser=Bc;const Nc=Bc,Dc=t=>null!==t.match(/^\s*gantt/);a().extend(wt()),a().extend(Tt()),a().extend(St());let Oc,Mc="",Ic="",Fc="",$c=[],Rc=[],Zc={},Pc=[],jc=[],Yc="";const zc=["active","done","crit","milestone"];let Uc=[],Wc=!1,qc=!1,Hc=0;const Vc=function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!!(t.isoWeekday()>=6&&n.includes("weekends"))||(!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim()))))},Gc=function(t,e,n,i){if(!n.length||t.manualEndTime)return;let r,s;r=t.startTime instanceof Date?a()(t.startTime):a()(t.startTime,e,!0),r=r.add(1,"d"),s=t.endTime instanceof Date?a()(t.endTime):a()(t.endTime,e,!0);const[o,c]=Xc(r,s,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c},Xc=function(t,e,n,i,r){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),a=Vc(t,n,i,r),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},Kc=function(t,e,n){n=n.trim();const i=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==i){let t=null;if(i[1].split(" ").forEach((function(e){let n=sl(e);void 0!==n&&(t?n.endTime>t.endTime&&(t=n):t=n)})),t)return t.endTime;{const t=new Date;return t.setHours(0,0,0,0),t}}let r=a()(n,e.trim(),!0);if(r.isValid())return r.toDate();{Bt.debug("Invalid date:"+n),Bt.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime()))throw new Error("Invalid date:"+n);return t}},Qc=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},Jc=function(t,e,n,i=!1){n=n.trim();let r=a()(n,e.trim(),!0);if(r.isValid())return i&&(r=r.add(1,"d")),r.toDate();let s=a()(t);const[o,c]=Qc(n);if(!Number.isNaN(o)){const t=s.add(o,c);t.isValid()&&(s=t)}return s.toDate()};let tl=0;const el=function(t){return void 0===t?(tl+=1,"task"+tl):t};let nl,il,rl=[];const al={},sl=function(t){const e=al[t];return rl[e]},ol=function(){const t=function(t){const e=rl[t];let n="";switch(rl[t].raw.startTime.type){case"prevTaskEnd":{const t=sl(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=Kc(0,Mc,rl[t].raw.startTime.startData),n&&(rl[t].startTime=n)}return rl[t].startTime&&(rl[t].endTime=Jc(rl[t].startTime,Mc,rl[t].raw.endTime.data,Wc),rl[t].endTime&&(rl[t].processed=!0,rl[t].manualEndTime=a()(rl[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Gc(rl[t],Mc,Rc,$c))),rl[t].processed};let e=!0;for(const[n,i]of rl.entries())t(n),e=e&&i.processed;return e},cl=function(t,e){t.split(",").forEach((function(t){let n=sl(t);void 0!==n&&n.classes.push(e)}))},ll=function(t,e){Uc.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))},hl={parseDirective:function(t,e,n){xp.parseDirective(this,t,e,n)},getConfig:()=>ui().gantt,clear:function(){Pc=[],jc=[],Yc="",Uc=[],tl=0,nl=void 0,il=void 0,rl=[],Mc="",Ic="",Oc=void 0,Fc="",$c=[],Rc=[],Wc=!1,qc=!1,Hc=0,Zc={},Ri()},setDateFormat:function(t){Mc=t},getDateFormat:function(){return Mc},enableInclusiveEndDates:function(){Wc=!0},endDatesAreInclusive:function(){return Wc},enableTopAxis:function(){qc=!0},topAxisEnabled:function(){return qc},setAxisFormat:function(t){Ic=t},getAxisFormat:function(){return Ic},setTickInterval:function(t){Oc=t},getTickInterval:function(){return Oc},setTodayMarker:function(t){Fc=t},getTodayMarker:function(){return Fc},setAccTitle:Zi,getAccTitle:Pi,setDiagramTitle:zi,getDiagramTitle:Ui,setAccDescription:ji,getAccDescription:Yi,addSection:function(t){Yc=t,Pc.push(t)},getSections:function(){return Pc},getTasks:function(){let t=ol();let e=0;for(;!t&&e<10;)t=ol(),e++;return jc=rl,jc},addTask:function(t,e){const n={section:Yc,type:Yc,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),r={};ul(i,r,zc);for(let a=0;a {ei.runFunc(e,...i)}))}(t,e,n)})),cl(t,"clickable")},setLink:function(t,e){let n=e;"loose"!==ui().securityLevel&&(n=(0,s.Nm)(e)),t.split(",").forEach((function(t){void 0!==sl(t)&&(ll(t,(()=>{window.open(n,"_self")})),Zc[t]=n)})),cl(t,"clickable")},getLinks:function(){return Zc},bindFunctions:function(t){Uc.forEach((function(e){e(t)}))},parseDuration:Qc,isInvalidDate:Vc};function ul(t,e,n){let i=!0;for(;i;)i=!1,n.forEach((function(n){const r=new RegExp("^\\s*"+n+"\\s*$");t[0].match(r)&&(e[n]=!0,t.shift(1),i=!0)}))}let dl;const pl={setConf:function(){Bt.debug("Something is calling, setConf, remove the call")},draw:function(t,e,n,i){const r=ui().gantt,s=ui().securityLevel;let c;"sandbox"===s&&(c=(0,o.Ys)("#i"+e));const l="sandbox"===s?(0,o.Ys)(c.nodes()[0].contentDocument.body):(0,o.Ys)("body"),h="sandbox"===s?c.nodes()[0].contentDocument:document,u=h.getElementById(e);dl=u.parentElement.offsetWidth,void 0===dl&&(dl=1200),void 0!==r.useWidth&&(dl=r.useWidth);const d=i.db.getTasks(),p=d.length*(r.barHeight+r.barGap)+2*r.topPadding;u.setAttribute("viewBox","0 0 "+dl+" "+p);const f=l.select(`[id="${e}"]`),g=(0,o.Xf)().domain([(0,o.VV$)(d,(function(t){return t.startTime})),(0,o.Fp7)(d,(function(t){return t.endTime}))]).rangeRound([0,dl-r.leftPadding-r.rightPadding]);let y=[];for(const a of d)y.push(a.type);const m=y;function b(t,e){return function(t){let e=t.length;const n={};for(;e;)n[t[--e]]=(n[t[e]]||0)+1;return n}(e)[t]||0}y=function(t){const e={},n=[];for(let i=0,r=t.length;i i?r=1:nt?Math.min(t,e):e),0),d=c.reduce(((t,{endTime:e})=>t?Math.max(t,e):e),0),p=i.db.getDateFormat();if(!u||!d)return;const y=[];let m=null,b=a()(u);for(;b.valueOf()<=d;)i.db.isInvalidDate(b,p,l,h)?m?m.end=b:m={start:b,end:b}:m&&(y.push(m),m=null),b=b.add(1,"d");f.append("g").selectAll("rect").data(y).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return g(t.start)+n})).attr("y",r.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return g(e)-g(t.start)})).attr("height",o-e-r.gridLineStartPadding).attr("transform-origin",(function(e,i){return(g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+"px "+(i*t+.5*o).toString()+"px"})).attr("class","exclude-range")})(l,u,d,0,s,t,i.db.getExcludes(),i.db.getIncludes()),function(t,e,n,a){let s=(0,o.LLu)(g).tickSize(-a+e+r.gridLineStartPadding).tickFormat((0,o.i$Z)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));const c=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||r.tickInterval);if(null!==c){const t=c[1];switch(c[2]){case"minute":s.ticks(o.Z_i.every(t));break;case"hour":s.ticks(o.WQD.every(t));break;case"day":s.ticks(o.rr1.every(t));break;case"week":s.ticks(o.NGh.every(t));break;case"month":s.ticks(o.F0B.every(t))}}if(f.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(s).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||r.topAxis){let n=(0,o.F5q)(g).tickSize(-a+e+r.gridLineStartPadding).tickFormat((0,o.i$Z)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));if(null!==c){const t=c[1];switch(c[2]){case"minute":n.ticks(o.Z_i.every(t));break;case"hour":n.ticks(o.WQD.every(t));break;case"day":n.ticks(o.rr1.every(t));break;case"week":n.ticks(o.NGh.every(t));break;case"month":n.ticks(o.F0B.every(t))}}f.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(d,u,0,s),function(t,n,a,s,c,l,h){f.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+a-2})).attr("width",(function(){return h-r.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%r.numberSectionStyles;return"section section0"}));const u=f.append("g").selectAll("rect").data(t).enter(),d=i.db.getLinks();u.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?g(t.startTime)+s+.5*(g(t.endTime)-g(t.startTime))-.5*c:g(t.startTime)+s})).attr("y",(function(t,e){return t.order*n+a})).attr("width",(function(t){return t.milestone?c:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr("height",c).attr("transform-origin",(function(t,e){return e=t.order,(g(t.startTime)+s+.5*(g(t.endTime)-g(t.startTime))).toString()+"px "+(e*n+a+.5*c).toString()+"px"})).attr("class",(function(t){const e="task";let n="";t.classes.length>0&&(n=t.classes.join(" "));let i=0;for(const[s,o]of y.entries())t.type===o&&(i=s%r.numberSectionStyles);let a="";return t.active?t.crit?a+=" activeCrit":a=" active":t.done?a=t.crit?" doneCrit":" done":t.crit&&(a+=" crit"),0===a.length&&(a=" task"),t.milestone&&(a=" milestone "+a),a+=i,a+=" "+n,e+a})),u.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",r.fontSize).attr("x",(function(t){let e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*c),t.milestone&&(n=e+c);const i=this.getBBox().width;return i>n-e?n+i+1.5*r.leftPadding>h?e+s-5:n+s+5:(n-e)/2+e+s})).attr("y",(function(t,e){return t.order*n+r.barHeight/2+(r.fontSize/2-2)+a})).attr("text-height",c).attr("class",(function(t){const e=g(t.startTime);let n=g(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let a="";t.classes.length>0&&(a=t.classes.join(" "));let s=0;for(const[c,l]of y.entries())t.type===l&&(s=c%r.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+s:"activeText"+s),t.done?o=t.crit?o+" doneCritText"+s:o+" doneText"+s:t.crit&&(o=o+" critText"+s),t.milestone&&(o+=" milestoneText"),i>n-e?n+i+1.5*r.leftPadding>h?a+" taskTextOutsideLeft taskTextOutside"+s+" "+o:a+" taskTextOutsideRight taskTextOutside"+s+" "+o+" width-"+i:a+" taskText taskText"+s+" "+o+" width-"+i}));if("sandbox"===ui().securityLevel){let t;t=(0,o.Ys)("#i"+e);const n=t.nodes()[0].contentDocument;u.filter((function(t){return void 0!==d[t.id]})).each((function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const r=e.parentNode;var a=n.createElement("a");a.setAttribute("xlink:href",d[t.id]),a.setAttribute("target","_top"),r.appendChild(a),a.appendChild(e),a.appendChild(i)}))}}(t,l,u,d,c,0,n),function(t,e){const n=[];let i=0;for(const[r,a]of y.entries())n[r]=[a,b(a,m)];f.append("g").selectAll("text").data(n).enter().append((function(t){const e=t[0].split(jt.lineBreakRegex),n=-(e.length-1)/2,i=h.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[r,a]of e.entries()){const t=h.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),r>0&&t.setAttribute("dy","1em"),t.textContent=a,i.appendChild(t)}return i})).attr("x",10).attr("y",(function(r,a){if(!(a>0))return r[1]*t/2+e;for(let s=0;s2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},r=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}},t);function a(){this.yy={}}return i.lexer=r,a.prototype=i,i.Parser=a,new a}();fl.parser=fl;const gl=fl;var yl="",ml=!1;const bl={setMessage:t=>{Bt.debug("Setting message to: "+t),yl=t},getMessage:()=>yl,setInfo:t=>{ml=t},getInfo:()=>ml,clear:Ri},_l={draw:(t,e,n)=>{try{Bt.debug("Rendering info diagram\n"+t);const i=ui().securityLevel;let r;"sandbox"===i&&(r=(0,o.Ys)("#i"+e));const a=("sandbox"===i?(0,o.Ys)(r.nodes()[0].contentDocument.body):(0,o.Ys)("body")).select("#"+e);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),a.attr("height",100),a.attr("width",400)}catch(i){Bt.error("Error while rendering info diagram"),Bt.error(i.message)}}},xl=t=>null!==t.match(/^\s*info/);var vl=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,4],i=[1,5],r=[1,6],a=[1,7],s=[1,9],o=[1,11,13,15,17,19,20,26,27,28,29],c=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],h=[26,27,28],u=[2,8],d=[1,18],p=[1,19],f=[1,20],g=[1,21],y=[1,22],m=[1,23],b=[1,28],_=[6,26,27,28,29],x={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 4:i.setShowData(!0);break;case 7:this.$=a[o-1];break;case 9:i.addSection(a[o-1],i.cleanupValue(a[o]));break;case 10:this.$=a[o].trim(),i.setDiagramTitle(this.$);break;case 11:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 12:case 13:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 14:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 21:i.parseDirective("%%{","open_directive");break;case 22:i.parseDirective(a[o],"type_directive");break;case 23:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 24:i.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:n,21:8,26:i,27:r,28:a,29:s},{1:[3]},{3:10,4:2,5:3,6:n,21:8,26:i,27:r,28:a,29:s},{3:11,4:2,5:3,6:n,21:8,26:i,27:r,28:a,29:s},e(o,c,{7:12,8:[1,13]}),e(l,[2,18]),e(l,[2,19]),e(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},e(h,u,{21:8,9:16,10:17,5:24,1:[2,3],11:d,13:p,15:f,17:g,19:y,20:m,29:s}),e(o,c,{7:25}),{23:26,24:[1,27],32:b},e([24,32],[2,22]),e(o,[2,6]),{4:29,26:i,27:r,28:a},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},e(h,[2,13]),e(h,[2,14]),e(h,[2,15]),e(h,u,{21:8,9:16,10:17,5:24,1:[2,4],11:d,13:p,15:f,17:g,19:y,20:m,29:s}),e(_,[2,16]),{25:34,31:[1,35]},e(_,[2,24]),e(o,[2,7]),e(h,[2,9]),e(h,[2,10]),e(h,[2,11]),e(h,[2,12]),{23:36,32:b},{32:[2,23]},e(_,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],a=[],s=this.table,o="",c=0,l=0,h=a.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;a.push(f);var g=u.options&&u.options.ranges;function y(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,_,x,v,k,w,C,T={};;){if(b=n[n.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null==m&&(m=y()),_=s[b]&&s[b][m]),void 0===_||!_.length||!_[0]){var E="";for(v in C=[],s[b])this.terminals_[v]&&v>2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},v=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:case 6:case 8:case 9:break;case 7:return 26;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:case 20:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}},t);function k(){this.yy={}}return x.lexer=v,k.prototype=x,x.Parser=k,new k}();vl.parser=vl;const kl=vl,wl=t=>null!==t.match(/^\s*pie/)||null!==t.match(/^\s*bar/);let Cl={},Tl=!1;const El={parseDirective:function(t,e,n){xp.parseDirective(this,t,e,n)},getConfig:()=>ui().pie,addSection:function(t,e){t=jt.sanitizeText(t,ui()),void 0===Cl[t]&&(Cl[t]=e,Bt.debug("Added new section :",t))},getSections:()=>Cl,cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Cl={},Tl=!1,Ri()},setAccTitle:Zi,getAccTitle:Pi,setDiagramTitle:zi,getDiagramTitle:Ui,setShowData:function(t){Tl=t},getShowData:function(){return Tl},getAccDescription:Yi,setAccDescription:ji};let Sl,Al=ui();const Ll=450,Bl={draw:(t,e,n,i)=>{try{Al=ui(),Bt.debug("Rendering info diagram\n"+t);const n=ui().securityLevel;let y;"sandbox"===n&&(y=(0,o.Ys)("#i"+e));const m="sandbox"===n?(0,o.Ys)(y.nodes()[0].contentDocument.body):(0,o.Ys)("body"),b="sandbox"===n?y.nodes()[0].contentDocument:document;i.db.clear(),i.parser.parse(t),Bt.debug("Parsed info diagram");const _=b.getElementById(e);Sl=_.parentElement.offsetWidth,void 0===Sl&&(Sl=1200),void 0!==Al.useWidth&&(Sl=Al.useWidth),void 0!==Al.pie.useWidth&&(Sl=Al.pie.useWidth);const x=m.select("#"+e);bi(x,Ll,Sl,Al.pie.useMaxWidth),_.setAttribute("viewBox","0 0 "+Sl+" "+Ll);var r=18,a=Math.min(Sl,Ll)/2-40,s=x.append("g").attr("transform","translate("+Sl/2+",225)"),c=i.db.getSections(),l=0;Object.keys(c).forEach((function(t){l+=c[t]}));const v=Al.themeVariables;var h=[v.pie1,v.pie2,v.pie3,v.pie4,v.pie5,v.pie6,v.pie7,v.pie8,v.pie9,v.pie10,v.pie11,v.pie12],u=(0,o.PKp)().range(h),d=Object.entries(c).map((function(t,e){return{order:e,name:t[0],value:t[1]}})),p=(0,o.ve8)().value((function(t){return t.value})).sort((function(t,e){return t.order-e.order}))(d),f=(0,o.Nb1)().innerRadius(0).outerRadius(a);s.selectAll("mySlices").data(p).enter().append("path").attr("d",f).attr("fill",(function(t){return u(t.data.name)})).attr("class","pieCircle"),s.selectAll("mySlices").data(p).enter().append("text").text((function(t){return(t.data.value/l*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+f.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),s.append("text").text(i.db.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var g=s.selectAll(".legend").data(u.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*u.domain().length/2)+")"}));g.append("rect").attr("width",r).attr("height",r).style("fill",u).style("stroke",u),g.data(p).append("text").attr("x",22).attr("y",14).text((function(t){return i.db.getShowData()||Al.showData||Al.pie.showData?t.data.name+" ["+t.data.value+"]":t.data.name}))}catch(y){Bt.error("Error while rendering info diagram"),Bt.error(y)}}};var Nl=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,3],i=[1,5],r=[1,6],a=[1,7],s=[1,8],o=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],c=[1,22],l=[2,13],h=[1,26],u=[1,27],d=[1,28],p=[1,29],f=[1,30],g=[1,31],y=[1,24],m=[1,32],b=[1,33],_=[1,36],x=[71,72],v=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],k=[1,56],w=[1,57],C=[1,58],T=[1,59],E=[1,60],S=[1,61],A=[1,62],L=[62,63],B=[1,74],N=[1,70],D=[1,71],O=[1,72],M=[1,73],I=[1,75],F=[1,79],$=[1,80],R=[1,77],Z=[1,78],P=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],j={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 6:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 7:case 8:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 9:i.parseDirective("%%{","open_directive");break;case 10:i.parseDirective(a[o],"type_directive");break;case 11:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 12:i.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:i.addRequirement(a[o-3],a[o-4]);break;case 20:i.setNewReqId(a[o-2]);break;case 21:i.setNewReqText(a[o-2]);break;case 22:i.setNewReqRisk(a[o-2]);break;case 23:i.setNewReqVerifyMethod(a[o-2]);break;case 26:this.$=i.RequirementType.REQUIREMENT;break;case 27:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=i.RiskLevel.LOW_RISK;break;case 33:this.$=i.RiskLevel.MED_RISK;break;case 34:this.$=i.RiskLevel.HIGH_RISK;break;case 35:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=i.VerifyType.VERIFY_TEST;break;case 39:i.addElement(a[o-3]);break;case 40:i.setNewElementType(a[o-2]);break;case 41:i.setNewElementDocRef(a[o-2]);break;case 44:i.addRelationship(a[o-2],a[o],a[o-4]);break;case 45:i.addRelationship(a[o-2],a[o-4],a[o]);break;case 46:this.$=i.Relationships.CONTAINS;break;case 47:this.$=i.Relationships.COPIES;break;case 48:this.$=i.Relationships.DERIVES;break;case 49:this.$=i.Relationships.SATISFIES;break;case 50:this.$=i.Relationships.VERIFIES;break;case 51:this.$=i.Relationships.REFINES;break;case 52:this.$=i.Relationships.TRACES}},table:[{3:1,4:2,6:n,9:4,14:i,16:r,18:a,19:s},{1:[3]},{3:10,4:2,5:[1,9],6:n,9:4,14:i,16:r,18:a,19:s},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},e(o,[2,8]),{20:[2,9]},{3:16,4:2,6:n,9:4,14:i,16:r,18:a,19:s},{1:[2,2]},{4:21,5:c,7:17,8:l,9:4,14:i,16:r,18:a,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{11:34,12:[1,35],22:_},e([12,22],[2,10]),e(o,[2,6]),e(o,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:c,7:38,8:l,9:4,14:i,16:r,18:a,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{4:21,5:c,7:39,8:l,9:4,14:i,16:r,18:a,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{4:21,5:c,7:40,8:l,9:4,14:i,16:r,18:a,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{4:21,5:c,7:41,8:l,9:4,14:i,16:r,18:a,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{4:21,5:c,7:42,8:l,9:4,14:i,16:r,18:a,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},e(x,[2,26]),e(x,[2,27]),e(x,[2,28]),e(x,[2,29]),e(x,[2,30]),e(x,[2,31]),e(v,[2,55]),e(v,[2,56]),e(o,[2,4]),{13:51,21:[1,52]},e(o,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:k,65:w,66:C,67:T,68:E,69:S,70:A},{61:63,64:k,65:w,66:C,67:T,68:E,69:S,70:A},{11:64,22:_},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},e(L,[2,46]),e(L,[2,47]),e(L,[2,48]),e(L,[2,49]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),{63:[1,68]},e(o,[2,5]),{5:B,29:69,30:N,33:D,35:O,37:M,39:I},{5:F,39:$,55:76,56:R,58:Z},{32:81,71:m,72:b},{32:82,71:m,72:b},e(P,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:B,29:87,30:N,33:D,35:O,37:M,39:I},e(P,[2,25]),e(P,[2,39]),{31:[1,88]},{31:[1,89]},{5:F,39:$,55:90,56:R,58:Z},e(P,[2,43]),e(P,[2,44]),e(P,[2,45]),{32:91,71:m,72:b},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},e(P,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},e(P,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:B,29:116,30:N,33:D,35:O,37:M,39:I},{5:B,29:117,30:N,33:D,35:O,37:M,39:I},{5:B,29:118,30:N,33:D,35:O,37:M,39:I},{5:B,29:119,30:N,33:D,35:O,37:M,39:I},{5:F,39:$,55:120,56:R,58:Z},{5:F,39:$,55:121,56:R,58:Z},e(P,[2,20]),e(P,[2,21]),e(P,[2,22]),e(P,[2,23]),e(P,[2,40]),e(P,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],a=[],s=this.table,o="",c=0,l=0,h=a.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;a.push(f);var g=u.options&&u.options.ranges;function y(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,_,x,v,k,w,C,T={};;){if(b=n[n.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null==m&&(m=y()),_=s[b]&&s[b][m]),void 0===_||!_.length||!_[0]){var E="";for(v in C=[],s[b])this.terminals_[v]&&v>2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},Y=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 53:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:case 15:case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 54:return"qString";case 55:return e.yytext=e.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}},t);function z(){this.yy={}}return j.lexer=Y,z.prototype=j,j.Parser=z,new z}();Nl.parser=Nl;const Dl=Nl,Ol=t=>null!==t.match(/^\s*requirement(Diagram)?/);let Ml=[],Il={},Fl={},$l={},Rl={};const Zl={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,n){xp.parseDirective(this,t,e,n)},getConfig:()=>ui().req,addRequirement:(t,e)=>(void 0===Fl[t]&&(Fl[t]={name:t,type:e,id:Il.id,text:Il.text,risk:Il.risk,verifyMethod:Il.verifyMethod}),Il={},Fl[t]),getRequirements:()=>Fl,setNewReqId:t=>{void 0!==Il&&(Il.id=t)},setNewReqText:t=>{void 0!==Il&&(Il.text=t)},setNewReqRisk:t=>{void 0!==Il&&(Il.risk=t)},setNewReqVerifyMethod:t=>{void 0!==Il&&(Il.verifyMethod=t)},setAccTitle:Zi,getAccTitle:Pi,setAccDescription:ji,getAccDescription:Yi,addElement:t=>(void 0===Rl[t]&&(Rl[t]={name:t,type:$l.type,docRef:$l.docRef},Bt.info("Added new requirement: ",t)),$l={},Rl[t]),getElements:()=>Rl,setNewElementType:t=>{void 0!==$l&&($l.type=t)},setNewElementDocRef:t=>{void 0!==$l&&($l.docRef=t)},addRelationship:(t,e,n)=>{Ml.push({type:t,src:e,dst:n})},getRelationships:()=>Ml,clear:()=>{Ml=[],Il={},Fl={},$l={},Rl={},Ri()}},Pl={CONTAINS:"contains",ARROW:"arrow"},jl=Pl,Yl=(t,e)=>{let n=t.append("defs").append("marker").attr("id",Pl.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Pl.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${e.line_height},${e.line_height/2}\n M${e.line_height},${e.line_height/2}\n L0,${e.line_height}`).attr("stroke-width",1)};let zl={},Ul=0;const Wl=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",zl.rect_min_width+"px").attr("height",zl.rect_min_height+"px"),ql=(t,e,n)=>{let i=zl.rect_min_width/2,r=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",i).attr("y",zl.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((t=>{0==a?r.append("tspan").attr("text-anchor","middle").attr("x",zl.rect_min_width/2).attr("dy",0).text(t):r.append("tspan").attr("text-anchor","middle").attr("x",zl.rect_min_width/2).attr("dy",.75*zl.line_height).text(t),a++}));let s=1.5*zl.rect_padding+a*zl.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",zl.rect_min_width).attr("y1",s).attr("y2",s),{titleNode:r,y:s}},Hl=(t,e,n,i)=>{let r=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",zl.rect_padding).attr("y",i).attr("dominant-baseline","hanging"),a=0;let s=[];return n.forEach((t=>{let e=t.length;for(;e>30&&a<3;){let n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,s[s.length]=n,a++}if(3==a){let t=s[s.length-1];s[s.length-1]=t.substring(0,t.length-4)+"..."}else s[s.length]=t;a=0})),s.forEach((t=>{r.append("tspan").attr("x",zl.rect_padding).attr("dy",zl.line_height).text(t)})),r},Vl=function(t,e,n,i,r){const a=n.edge(Gl(e.src),Gl(e.dst)),s=(0,o.jvg)().x((function(t){return t.x})).y((function(t){return t.y})),c=t.insert("path","#"+i).attr("class","er relationshipLine").attr("d",s(a.points)).attr("fill","none");e.type==r.db.Relationships.CONTAINS?c.attr("marker-start","url("+jt.getUrl(zl.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(c.attr("stroke-dasharray","10,7"),c.attr("marker-end","url("+jt.getUrl(zl.arrowMarkerAbsolute)+"#"+jl.ARROW+"_line_ending)")),((t,e,n,i)=>{const r=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*r),s="rel"+Ul;Ul++;const o=t.append("text").attr("class","req relationshipLabel").attr("id",s).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(i).node().getBBox();t.insert("rect","#"+s).attr("class","req reqLabelBox").attr("x",a.x-o.width/2).attr("y",a.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")})(t,c,0,`<<${e.type}>>`)},Gl=t=>t.replace(/\s/g,"").replace(/\./g,"_"),Xl={draw:(t,e,n,i)=>{zl=ui().requirement,i.db.clear(),i.parser.parse(t);const r=zl.securityLevel;let a;"sandbox"===r&&(a=(0,o.Ys)("#i"+e));const s=("sandbox"===r?(0,o.Ys)(a.nodes()[0].contentDocument.body):(0,o.Ys)("body")).select(`[id='${e}']`);Yl(s,zl);const c=new lt.k({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:zl.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let l=i.db.getRequirements(),h=i.db.getElements(),u=i.db.getRelationships();var d,p,f;d=l,p=c,f=s,Object.keys(d).forEach((t=>{let e=d[t];t=Gl(t),Bt.info("Added new requirement: ",t);const n=f.append("g").attr("id",t),i=Wl(n,"req-"+t);let r=ql(n,t+"_title",[`<<${e.type}>>`,`${e.name}`]);Hl(n,t+"_body",[`Id: ${e.id}`,`Text: ${e.text}`,`Risk: ${e.risk}`,`Verification: ${e.verifyMethod}`],r.y);const a=i.node().getBBox();p.setNode(t,{width:a.width,height:a.height,shape:"rect",id:t})})),((t,e,n)=>{Object.keys(t).forEach((i=>{let r=t[i];const a=Gl(i),s=n.append("g").attr("id",a),o="element-"+a,c=Wl(s,o);let l=ql(s,o+"_title",["< >",`${i}`]);Hl(s,o+"_body",[`Type: ${r.type||"Not Specified"}`,`Doc Ref: ${r.docRef||"None"}`],l.y);const h=c.node().getBBox();e.setNode(a,{width:h.width,height:h.height,shape:"rect",id:a})}))})(h,c,s),((t,e)=>{t.forEach((function(t){let n=Gl(t.src),i=Gl(t.dst);e.setEdge(n,i,{relationship:t})}))})(u,c),(0,ct.bK)(c),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select("#"+n),t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )"))}))}(s,c),u.forEach((function(t){Vl(s,t,c,e,i)}));const g=zl.rect_padding,y=s.node().getBBox(),m=y.width+2*g,b=y.height+2*g;bi(s,b,m,zl.useMaxWidth),s.attr("viewBox",`${y.x-g} ${y.y-g} ${m} ${b}`)}};var Kl=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,2],i=[1,3],r=[1,5],a=[1,7],s=[2,5],o=[1,15],c=[1,17],l=[1,19],h=[1,21],u=[1,22],d=[1,23],p=[1,29],f=[1,30],g=[1,31],y=[1,32],m=[1,33],b=[1,34],_=[1,35],x=[1,36],v=[1,37],k=[1,38],w=[1,39],C=[1,40],T=[1,42],E=[1,43],S=[1,45],A=[1,46],L=[1,47],B=[1,48],N=[1,49],D=[1,50],O=[1,53],M=[1,4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],I=[4,5,21,54,56],F=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],$=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,53,54,56,57,62,63,64,65,73,83],R=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,52,54,56,57,62,63,64,65,73,83],Z=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,54,56,57,62,63,64,65,73,83],P=[71,72,73],j=[1,125],Y=[1,4,5,7,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],z={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,box:19,restOfLine:20,end:21,signal:22,autonumber:23,NUM:24,off:25,activate:26,actor:27,deactivate:28,note_statement:29,links_statement:30,link_statement:31,properties_statement:32,details_statement:33,title:34,legacy_title:35,acc_title:36,acc_title_value:37,acc_descr:38,acc_descr_value:39,acc_descr_multiline_value:40,loop:41,rect:42,opt:43,alt:44,else_sections:45,par:46,par_sections:47,critical:48,option_sections:49,break:50,option:51,and:52,else:53,participant:54,AS:55,participant_actor:56,note:57,placement:58,text2:59,over:60,actor_pair:61,links:62,link:63,properties:64,details:65,spaceList:66,",":67,left_of:68,right_of:69,signaltype:70,"+":71,"-":72,ACTOR:73,SOLID_OPEN_ARROW:74,DOTTED_OPEN_ARROW:75,SOLID_ARROW:76,DOTTED_ARROW:77,SOLID_CROSS:78,DOTTED_CROSS:79,SOLID_POINT:80,DOTTED_POINT:81,TXT:82,open_directive:83,type_directive:84,arg_directive:85,close_directive:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"box",20:"restOfLine",21:"end",23:"autonumber",24:"NUM",25:"off",26:"activate",28:"deactivate",34:"title",35:"legacy_title",36:"acc_title",37:"acc_title_value",38:"acc_descr",39:"acc_descr_value",40:"acc_descr_multiline_value",41:"loop",42:"rect",43:"opt",44:"alt",46:"par",48:"critical",50:"break",51:"option",52:"and",53:"else",54:"participant",55:"AS",56:"participant_actor",57:"note",60:"over",62:"links",63:"link",64:"properties",65:"details",67:",",68:"left_of",69:"right_of",71:"+",72:"-",73:"ACTOR",74:"SOLID_OPEN_ARROW",75:"DOTTED_OPEN_ARROW",76:"SOLID_ARROW",77:"DOTTED_ARROW",78:"SOLID_CROSS",79:"DOTTED_CROSS",80:"SOLID_POINT",81:"DOTTED_POINT",82:"TXT",83:"open_directive",84:"type_directive",85:"arg_directive",86:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[49,1],[49,4],[47,1],[47,4],[45,1],[45,4],[13,5],[13,3],[13,5],[13,3],[29,4],[29,4],[30,3],[31,3],[32,3],[33,3],[66,2],[66,1],[61,3],[61,1],[58,1],[58,1],[22,5],[22,5],[22,4],[27,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[59,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 4:return i.apply(a[o]),a[o];case 5:case 10:case 9:case 14:this.$=[];break;case 6:case 11:a[o-1].push(a[o]),this.$=a[o-1];break;case 7:case 8:case 12:case 13:case 63:this.$=a[o];break;case 18:a[o-1].unshift({type:"boxStart",boxData:i.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:i.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:a[o-1]};break;case 25:this.$={type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-1]};break;case 31:i.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 32:i.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 33:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 34:case 35:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 36:a[o-1].unshift({type:"loopStart",loopText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:i.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"rectStart",color:i.parseMessage(a[o-2]),signalType:i.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:i.parseMessage(a[o-2]),signalType:i.LINETYPE.RECT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"optStart",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.OPT_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"altStart",altText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:i.LINETYPE.ALT_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"parStart",parText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"criticalStart",criticalText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:i.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 42:a[o-1].unshift({type:"breakStart",breakText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 45:this.$=a[o-3].concat([{type:"option",optionText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"and",parText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.PAR_AND},a[o]]);break;case 49:this.$=a[o-3].concat([{type:"else",altText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.ALT_ELSE},a[o]]);break;case 50:a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 51:a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-3].type="addActor",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 53:a[o-1].type="addActor",this.$=a[o-1];break;case 54:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 55:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:i.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 59:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 62:this.$=[a[o-2],a[o]];break;case 64:this.$=i.PLACEMENT.LEFTOF;break;case 65:this.$=i.PLACEMENT.RIGHTOF;break;case 66:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:a[o-1]}];break;case 67:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-4]}];break;case 68:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 69:this.$={type:"addParticipant",actor:a[o]};break;case 70:this.$=i.LINETYPE.SOLID_OPEN;break;case 71:this.$=i.LINETYPE.DOTTED_OPEN;break;case 72:this.$=i.LINETYPE.SOLID;break;case 73:this.$=i.LINETYPE.DOTTED;break;case 74:this.$=i.LINETYPE.SOLID_CROSS;break;case 75:this.$=i.LINETYPE.DOTTED_CROSS;break;case 76:this.$=i.LINETYPE.SOLID_POINT;break;case 77:this.$=i.LINETYPE.DOTTED_POINT;break;case 78:this.$=i.parseMessage(a[o].trim().substring(1));break;case 79:i.parseDirective("%%{","open_directive");break;case 80:i.parseDirective(a[o],"type_directive");break;case 81:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 82:i.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:n,5:i,6:4,7:r,14:6,83:a},{1:[3]},{3:8,4:n,5:i,6:4,7:r,14:6,83:a},{3:9,4:n,5:i,6:4,7:r,14:6,83:a},{3:10,4:n,5:i,6:4,7:r,14:6,83:a},e([1,4,5,19,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],s,{8:11}),{15:12,84:[1,13]},{84:[2,79]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:a},{16:51,17:[1,52],86:O},e([17,86],[2,80]),e(M,[2,6]),{6:41,10:54,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:a},e(M,[2,8]),e(M,[2,9]),e(M,[2,17]),{20:[1,55]},{5:[1,56]},{5:[1,59],24:[1,57],25:[1,58]},{27:60,73:D},{27:61,73:D},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},{5:[1,66]},e(M,[2,31]),e(M,[2,32]),{37:[1,67]},{39:[1,68]},e(M,[2,35]),{20:[1,69]},{20:[1,70]},{20:[1,71]},{20:[1,72]},{20:[1,73]},{20:[1,74]},{20:[1,75]},e(M,[2,43]),{27:76,73:D},{27:77,73:D},{70:78,74:[1,79],75:[1,80],76:[1,81],77:[1,82],78:[1,83],79:[1,84],80:[1,85],81:[1,86]},{58:87,60:[1,88],68:[1,89],69:[1,90]},{27:91,73:D},{27:92,73:D},{27:93,73:D},{27:94,73:D},e([5,55,67,74,75,76,77,78,79,80,81,82],[2,69]),{5:[1,95]},{18:96,85:[1,97]},{5:[2,82]},e(M,[2,7]),e(I,[2,10],{11:98}),e(M,[2,19]),{5:[1,100],24:[1,99]},{5:[1,101]},e(M,[2,23]),{5:[1,102]},{5:[1,103]},e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,30]),e(M,[2,33]),e(M,[2,34]),e(F,s,{8:104}),e(F,s,{8:105}),e(F,s,{8:106}),e($,s,{45:107,8:108}),e(R,s,{47:109,8:110}),e(Z,s,{49:111,8:112}),e(F,s,{8:113}),{5:[1,115],55:[1,114]},{5:[1,117],55:[1,116]},{27:120,71:[1,118],72:[1,119],73:D},e(P,[2,70]),e(P,[2,71]),e(P,[2,72]),e(P,[2,73]),e(P,[2,74]),e(P,[2,75]),e(P,[2,76]),e(P,[2,77]),{27:121,73:D},{27:123,61:122,73:D},{73:[2,64]},{73:[2,65]},{59:124,82:j},{59:126,82:j},{59:127,82:j},{59:128,82:j},e(Y,[2,15]),{16:129,86:O},{86:[2,81]},{4:[1,132],5:[1,134],12:131,13:133,21:[1,130],54:T,56:E},{5:[1,135]},e(M,[2,21]),e(M,[2,22]),e(M,[2,24]),e(M,[2,25]),{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,136],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:a},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,137],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:a},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,138],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:a},{21:[1,139]},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,48],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,53:[1,140],54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:a},{21:[1,141]},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,46],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,52:[1,142],54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:a},{21:[1,143]},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,44],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,51:[1,144],54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:a},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,145],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:a},{20:[1,146]},e(M,[2,51]),{20:[1,147]},e(M,[2,53]),{27:148,73:D},{27:149,73:D},{59:150,82:j},{59:151,82:j},{59:152,82:j},{67:[1,153],82:[2,63]},{5:[2,56]},{5:[2,78]},{5:[2,57]},{5:[2,58]},{5:[2,59]},{5:[1,154]},e(M,[2,18]),e(I,[2,11]),{13:155,54:T,56:E},e(I,[2,13]),e(I,[2,14]),e(M,[2,20]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),e(M,[2,39]),{20:[1,156]},e(M,[2,40]),{20:[1,157]},e(M,[2,41]),{20:[1,158]},e(M,[2,42]),{5:[1,159]},{5:[1,160]},{59:161,82:j},{59:162,82:j},{5:[2,68]},{5:[2,54]},{5:[2,55]},{27:163,73:D},e(Y,[2,16]),e(I,[2,12]),e($,s,{8:108,45:164}),e(R,s,{8:110,47:165}),e(Z,s,{8:112,49:166}),e(M,[2,50]),e(M,[2,52]),{5:[2,66]},{5:[2,67]},{82:[2,62]},{21:[2,49]},{21:[2,47]},{21:[2,45]}],defaultActions:{7:[2,79],8:[2,1],9:[2,2],10:[2,3],53:[2,82],89:[2,64],90:[2,65],97:[2,81],124:[2,56],125:[2,78],126:[2,57],127:[2,58],128:[2,59],150:[2,68],151:[2,54],152:[2,55],161:[2,66],162:[2,67],163:[2,62],164:[2,49],165:[2,47],166:[2,45]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],a=[],s=this.table,o="",c=0,l=0,h=a.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;a.push(f);var g=u.options&&u.options.ranges;function y(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,_,x,v,k,w,C,T={};;){if(b=n[n.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null==m&&(m=y()),_=s[b]&&s[b][m]),void 0===_||!_.length||!_[0]){var E="";for(v in C=[],s[b])this.terminals_[v]&&v>2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},U=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),83;case 1:return this.begin("type_directive"),84;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),86;case 4:return 85;case 5:case 53:case 66:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 24;case 12:return this.begin("LINE"),19;case 13:return this.begin("ID"),54;case 14:return this.begin("ID"),56;case 15:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 16:return this.popState(),this.popState(),this.begin("LINE"),55;case 17:return this.popState(),this.popState(),5;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),44;case 22:return this.begin("LINE"),53;case 23:return this.begin("LINE"),46;case 24:return this.begin("LINE"),52;case 25:return this.begin("LINE"),48;case 26:return this.begin("LINE"),51;case 27:return this.begin("LINE"),50;case 28:return this.popState(),20;case 29:return 21;case 30:return 68;case 31:return 69;case 32:return 62;case 33:return 63;case 34:return 64;case 35:return 65;case 36:return 60;case 37:return 57;case 38:return this.begin("ID"),26;case 39:return this.begin("ID"),28;case 40:return 34;case 41:return 35;case 42:return this.begin("acc_title"),36;case 43:return this.popState(),"acc_title_value";case 44:return this.begin("acc_descr"),38;case 45:return this.popState(),"acc_descr_value";case 46:this.begin("acc_descr_multiline");break;case 47:this.popState();break;case 48:return"acc_descr_multiline_value";case 49:return 7;case 50:return 23;case 51:return 25;case 52:return 67;case 54:return e.yytext=e.yytext.trim(),73;case 55:return 76;case 56:return 77;case 57:return 74;case 58:return 75;case 59:return 78;case 60:return 79;case 61:return 80;case 62:return 81;case 63:return 82;case 64:return 71;case 65:return 72;case 67:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[47,48],inclusive:!1},acc_descr:{rules:[45],inclusive:!1},acc_title:{rules:[43],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,15],inclusive:!1},ALIAS:{rules:[7,8,16,17],inclusive:!1},LINE:{rules:[7,8,28],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,44,46,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}},t);function W(){this.yy={}}return z.lexer=U,W.prototype=z,z.Parser=W,new W}();Kl.parser=Kl;const Ql=Kl,Jl=t=>null!==t.match(/^\s*sequenceDiagram/);let th,eh,nh,ih={},rh=[],ah=[],sh=!1;const oh=function(t,e,n,i){let r=nh;const a=ih[t];if(a){if(nh&&a.box&&nh!==a.box)throw new Error("A same participant should only be defined in one Box: "+a.name+" can't be in '"+a.box.name+"' and in '"+nh.name+"' at the same time.");if(r=a.box?a.box:nh,a.box=r,a&&e===a.name&&null==n)return}null!=n&&null!=n.text||(n={text:e,wrap:null,type:i}),null!=i&&null!=n.text||(n={text:e,wrap:null,type:i}),ih[t]={box:r,name:e,description:n.text,wrap:void 0===n.wrap&&hh()||!!n.wrap,prevActor:th,links:{},properties:{},actorCnt:null,rectData:null,type:i||"participant"},th&&ih[th]&&(ih[th].nextActor=t),nh&&nh.actorKeys.push(t),th=t},ch=function(t,e,n={text:void 0,wrap:void 0},i){if(i===uh.ACTIVE_END){const e=(t=>{let e,n=0;for(e=0;e >-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return ah.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&hh()||!!n.wrap,type:i}),!0},lh=function(t){return ih[t]},hh=()=>void 0!==eh?eh:ui().sequence.wrap,uh={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},dh=function(t,e,n){n.text,void 0===n.wrap&&hh()||n.wrap;const i=[].concat(t,t);ah.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&hh()||!!n.wrap,type:uh.NOTE,placement:e})},ph=function(t,e){const n=lh(t);try{let t=It(e.text,ui());t=t.replace(/&/g,"&"),t=t.replace(/=/g,"=");fh(n,JSON.parse(t))}catch(i){Bt.error("error while parsing actor link text",i)}};function fh(t,e){if(null==t.links)t.links=e;else for(let n in e)t.links[n]=e[n]}const gh=function(t,e){const n=lh(t);try{let t=It(e.text,ui());yh(n,JSON.parse(t))}catch(i){Bt.error("error while parsing actor properties text",i)}};function yh(t,e){if(null==t.properties)t.properties=e;else for(let n in e)t.properties[n]=e[n]}const mh=function(t,e){const n=lh(t),i=document.getElementById(e.text);try{const t=i.innerHTML,e=JSON.parse(t);e.properties&&yh(n,e.properties),e.links&&fh(n,e.links)}catch(r){Bt.error("error while parsing actor details text",r)}},bh=function(t){if(Array.isArray(t))t.forEach((function(t){bh(t)}));else switch(t.type){case"sequenceIndex":ah.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":oh(t.actor,t.actor,t.description,"participant");break;case"addActor":oh(t.actor,t.actor,t.description,"actor");break;case"activeStart":case"activeEnd":ch(t.actor,void 0,void 0,t.signalType);break;case"addNote":dh(t.actor,t.placement,t.text);break;case"addLinks":ph(t.actor,t.text);break;case"addALink":!function(t,e){const n=lh(t);try{const t={};let s=It(e.text,ui());var i=s.indexOf("@");s=s.replace(/&/g,"&"),s=s.replace(/=/g,"=");var r=s.slice(0,i-1).trim(),a=s.slice(i+1).trim();t[r]=a,fh(n,t)}catch(s){Bt.error("error while parsing actor link text",s)}}(t.actor,t.text);break;case"addProperties":gh(t.actor,t.text);break;case"addDetails":mh(t.actor,t.text);break;case"addMessage":ch(t.from,t.to,t.msg,t.signalType);break;case"boxStart":e=t.boxData,rh.push({name:e.text,wrap:void 0===e.wrap&&hh()||!!e.wrap,fill:e.color,actorKeys:[]}),nh=rh.slice(-1)[0];break;case"boxEnd":nh=void 0;break;case"loopStart":ch(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":ch(void 0,void 0,void 0,t.signalType);break;case"rectStart":ch(void 0,void 0,t.color,t.signalType);break;case"optStart":ch(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":ch(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":Zi(t.text);break;case"parStart":case"and":ch(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":ch(void 0,void 0,t.criticalText,t.signalType);break;case"option":ch(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":ch(void 0,void 0,t.breakText,t.signalType)}var e},_h={addActor:oh,addMessage:function(t,e,n,i){ah.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&hh()||!!n.wrap,answer:i})},addSignal:ch,addLinks:ph,addDetails:mh,addProperties:gh,autoWrap:hh,setWrap:function(t){eh=t},enableSequenceNumbers:function(){sh=!0},disableSequenceNumbers:function(){sh=!1},showSequenceNumbers:()=>sh,getMessages:function(){return ah},getActors:function(){return ih},getActor:lh,getActorKeys:function(){return Object.keys(ih)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:Pi,getBoxes:function(){return rh},getDiagramTitle:Ui,setDiagramTitle:zi,parseDirective:function(t,e,n){xp.parseDirective(this,t,e,n)},getConfig:()=>ui().sequence,clear:function(){ih={},rh=[],ah=[],sh=!1,Ri()},parseMessage:function(t){const e=t.trim(),n={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^:?wrap:/)||null===e.match(/^:?nowrap:/)&&void 0};return Bt.debug("parseMessage:",n),n},parseBoxData:function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let n=null!=e&&e[1]?e[1].trim():"transparent",i=null!=e&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",n)||(n="transparent",i=t.trim());else{const e=(new Option).style;e.color=n,e.color!==n&&(n="transparent",i=t.trim())}return{color:n,text:void 0!==i?It(i.replace(/^:?(?:no)?wrap:/,""),ui()):void 0,wrap:void 0!==i?null!==i.match(/^:?wrap:/)||null===i.match(/^:?nowrap:/)&&void 0:void 0}},LINETYPE:uh,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:dh,setAccTitle:Zi,apply:bh,setAccDescription:ji,getAccDescription:Yi,hasAtLeastOneBox:function(){return rh.length>0},hasAtLeastOneBoxWithTitle:function(){return rh.some((t=>t.name))}};let xh=[];const vh=()=>{xh.forEach((t=>{t()})),xh=[]},kh=function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},wh=(t,e)=>{var n;n=()=>{const n=document.querySelectorAll(t);0!==n.length&&(n[0].addEventListener("mouseover",(function(){Eh("actor"+e+"_popup")})),n[0].addEventListener("mouseout",(function(){Sh("actor"+e+"_popup")})))},xh.push(n)},Ch=function(t,e,n,i){const r=t.append("image");r.attr("x",e),r.attr("y",n);var a=(0,s.Nm)(i);r.attr("xlink:href",a)},Th=function(t,e,n,i){const r=t.append("use");r.attr("x",e),r.attr("y",n);var a=(0,s.Nm)(i);r.attr("xlink:href","#"+a)},Eh=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},Sh=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},Ah=function(t,e){let n=0,i=0;const r=e.text.split(jt.lineBreakRegex),[a,s]=ti(e.fontSize);let o=[],c=0,l=()=>e.y;if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":l=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":l=()=>Math.round(e.y+(n+i+e.textMargin)/2);break;case"bottom":case"end":l=()=>Math.round(e.y+(n+i+2*e.textMargin)-e.textMargin)}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[h,u]of r.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(c=h*a);const r=t.append("text");if(r.attr("x",e.x),r.attr("y",l()),void 0!==e.anchor&&r.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&r.style("font-family",e.fontFamily),void 0!==s&&r.style("font-size",s),void 0!==e.fontWeight&&r.style("font-weight",e.fontWeight),void 0!==e.fill&&r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class),void 0!==e.dy?r.attr("dy",e.dy):0!==c&&r.attr("dy",c),e.tspan){const t=r.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(u)}else r.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(i+=(r._groups||r)[0][0].getBBox().height,n=i),o.push(r)}return o},Lh=function(t,e){const n=t.append("polygon");var i,r,a,s,o;return n.attr("points",(i=e.x,r=e.y,a=e.width,s=e.height,i+","+r+" "+(i+a)+","+r+" "+(i+a)+","+(r+s-(o=7))+" "+(i+a-1.2*o)+","+(r+s)+" "+i+","+(r+s))),n.attr("class","labelBox"),e.y=e.y+e.height/2,Ah(t,e),n};let Bh=-1;const Nh=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},Dh=function(t,e){kh(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},Oh=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},Mh=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Ih=function(){function t(t,e,n,r,a,s,o){i(e.append("text").attr("x",n+a/2).attr("y",r+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,a,s,o,c){const{actorFontSize:l,actorFontFamily:h,actorFontWeight:u}=c,[d,p]=ti(l),f=t.split(jt.lineBreakRegex);for(let g=0;g n?c.width:n;const p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+u),p.attr("x",c.x),p.attr("y",c.height),p.attr("fill",c.fill),p.attr("stroke",c.stroke),p.attr("width",d),p.attr("height",c.height),p.attr("rx",c.rx),p.attr("ry",c.ry),null!=a){var f=20;for(let t in a){var g=h.append("a"),y=(0,s.Nm)(a[t]);g.attr("xlink:href",y),g.attr("target","_blank"),Fh(i)(t,g,c.x+10,c.height+f,d,20,{class:"actor"},i),f+=30}}return p.attr("height",f),{height:c.height+f,width:d}},drawImage:Ch,drawEmbeddedImage:Th,anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,n,i,r){const a=Mh(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+r%3,a.width=e.stopx-e.startx,a.height=n-e.starty,kh(s,a)},drawLoop:function(t,e,n,i){const{boxMargin:r,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:c,messageFontSize:l,messageFontWeight:h}=i,u=t.append("g"),d=function(t,e,n,i){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",i).attr("class","loopLine")};d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){d(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let p=Oh();p.text=n,p.x=e.startx,p.y=e.starty,p.fontFamily=c,p.fontSize=l,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",Lh(u,p),p=Oh(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+r+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=c,p.fontSize=l,p.fontWeight=h,p.wrap=!0;let f=Ah(u,p);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){p.text=t.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[n].y+r+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=c,p.fontSize=l,p.fontWeight=h,p.wrap=e.wrap,f=Ah(u,p);let i=Math.round(f.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[n].height+=i-(r+a)}})),e.height=Math.round(e.stopy-e.starty),u},drawBackgroundRect:Dh,insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},insertArrowFilledHead:function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},insertDatabaseIcon:function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},insertComputerIcon:function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},insertClockIcon:function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},getTextObj:Oh,getNoteRect:Mh,popupMenu:function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},popdownMenu:function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},fixLifeLineHeights:Nh,sanitizeUrl:s.Nm};let Rh={};const Zh={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Wh(ui())},updateVal:function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},updateBounds:function(t,e,n,i){const r=this;let a=0;function s(s){return function(o){a++;const c=r.sequenceItems.length-a+1;r.updateVal(o,"starty",e-c*Rh.boxMargin,Math.min),r.updateVal(o,"stopy",i+c*Rh.boxMargin,Math.max),r.updateVal(Zh.data,"startx",t-c*Rh.boxMargin,Math.min),r.updateVal(Zh.data,"stopx",n+c*Rh.boxMargin,Math.max),"activation"!==s&&(r.updateVal(o,"startx",t-c*Rh.boxMargin,Math.min),r.updateVal(o,"stopx",n+c*Rh.boxMargin,Math.max),r.updateVal(Zh.data,"starty",e-c*Rh.boxMargin,Math.min),r.updateVal(Zh.data,"stopy",i+c*Rh.boxMargin,Math.max))}}this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},insert:function(t,e,n,i){const r=Math.min(t,n),a=Math.max(t,n),s=Math.min(e,i),o=Math.max(e,i);this.updateVal(Zh.data,"startx",r,Math.min),this.updateVal(Zh.data,"starty",s,Math.min),this.updateVal(Zh.data,"stopx",a,Math.max),this.updateVal(Zh.data,"stopy",o,Math.max),this.updateBounds(r,s,a,o)},newActivation:function(t,e,n){const i=n[t.from.actor],r=qh(t.from.actor).length||0,a=i.x+i.width/2+(r-1)*Rh.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Rh.activationWidth,stopy:void 0,actor:t.from.actor,anchored:$h.anchorElement(e)})},endActivation:function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Zh.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},Ph=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),jh=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),Yh=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});const zh=function(t,e,n,i,r,a,s){if(!0===r.hideUnusedParticipants){const t=new Set;a.forEach((e=>{t.add(e.from),t.add(e.to)})),n=n.filter((e=>t.has(e)))}let o,c=0,l=0,h=0;for(const u of n){const n=e[u],r=n.box;o&&o!=r&&(s||Zh.models.addBox(o),l+=Rh.boxMargin+o.margin),r&&r!=o&&(s||(r.x=c+l,r.y=i),l+=r.margin),n.width=n.width||Rh.width,n.height=Math.max(n.height||Rh.height,Rh.height),n.margin=n.margin||Rh.actorMargin,n.x=c+l,n.y=Zh.getVerticalPos();const a=$h.drawActor(t,n,Rh,s);h=Math.max(h,a),Zh.insert(n.x,i,n.x+n.width,n.height),c+=n.width+l,n.box&&(n.box.width=c+r.margin-n.box.x),l=n.margin,o=n.box,Zh.models.addActor(n)}o&&!s&&Zh.models.addBox(o),Zh.bumpVerticalPos(h)},Uh=function(t,e,n,i){let r=0,a=0;for(const s of n){const n=e[s],o=Gh(n),c=$h.drawPopup(t,n,o,Rh,Rh.forceMenus,i);c.height>r&&(r=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:r,maxWidth:a}},Wh=function(t){On(Rh,t),t.fontFamily&&(Rh.actorFontFamily=Rh.noteFontFamily=Rh.messageFontFamily=t.fontFamily),t.fontSize&&(Rh.actorFontSize=Rh.noteFontSize=Rh.messageFontSize=t.fontSize),t.fontWeight&&(Rh.actorFontWeight=Rh.noteFontWeight=Rh.messageFontWeight=t.fontWeight)},qh=function(t){return Zh.activations.filter((function(e){return e.actor===t}))},Hh=function(t,e){const n=e[t],i=qh(t);return[i.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),i.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function Vh(t,e,n,i,r){Zh.bumpVerticalPos(n);let a=i;if(e.id&&e.message&&t[e.id]){const n=t[e.id].width,r=Ph(Rh);e.message=ei.wrapLabel(`[${e.message}]`,n-2*Rh.wrapPadding,r),e.width=n,e.wrap=!0;const s=ei.calculateTextDimensions(e.message,r),o=Math.max(s.height,Rh.labelBoxHeight);a=i+o,Bt.debug(`${o} - ${e.message}`)}r(e),Zh.bumpVerticalPos(a)}const Gh=function(t){let e=0;const n=Yh(Rh);for(const i in t.links){const t=ei.calculateTextDimensions(i,n).width+2*Rh.wrapPadding+2*Rh.boxMargin;e t.actor)).lastIndexOf(t.from.actor);delete Zh.activations.splice(e,1)[0]}}void 0!==t.placement?(o=function(t,e,n){const i=e[t.from].x,r=e[t.to].x,a=t.wrap&&t.message;let s=ei.calculateTextDimensions(a?ei.wrapLabel(t.message,Rh.width,jh(Rh)):t.message,jh(Rh));const o={width:a?Rh.width:Math.max(Rh.width,s.width+2*Rh.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===n.db.PLACEMENT.RIGHTOF?(o.width=a?Math.max(Rh.width,s.width):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*Rh.noteMargin),o.startx=i+(e[t.from].width+Rh.actorMargin)/2):t.placement===n.db.PLACEMENT.LEFTOF?(o.width=a?Math.max(Rh.width,s.width+2*Rh.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*Rh.noteMargin),o.startx=i-o.width+(e[t.from].width-Rh.actorMargin)/2):t.to===t.from?(s=ei.calculateTextDimensions(a?ei.wrapLabel(t.message,Math.max(Rh.width,e[t.from].width),jh(Rh)):t.message,jh(Rh)),o.width=a?Math.max(Rh.width,e[t.from].width):Math.max(e[t.from].width,Rh.width,s.width+2*Rh.noteMargin),o.startx=i+(e[t.from].width-o.width)/2):(o.width=Math.abs(i+e[t.from].width/2-(r+e[t.to].width/2))+Rh.actorMargin,o.startx=i {s=t,s.from=Math.min(s.from,o.startx),s.to=Math.max(s.to,o.startx+o.width),s.width=Math.max(s.width,Math.abs(s.from-s.to))-Rh.labelBoxWidth}))):(c=function(t,e,n){let i=!1;if([n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(i=!0),!i)return{};const r=Hh(t.from,e),a=Hh(t.to,e),s=r[0]<=a[0]?1:0,o=r[0]0&&a.forEach((n=>{if(s=n,c.startx===c.stopx){const n=e[t.from],i=e[t.to];s.from=Math.min(n.x-c.width/2,n.x-n.width/2,s.from),s.to=Math.max(i.x+c.width/2,i.x+n.width/2,s.to),s.width=Math.max(s.width,Math.abs(s.to-s.from))-Rh.labelBoxWidth}else s.from=Math.min(c.startx,s.from),s.to=Math.max(c.stopx,s.to),s.width=Math.max(s.width,c.width)-Rh.labelBoxWidth})))})),Zh.activations=[],Bt.debug("Loop type widths:",r),r},Kh={bounds:Zh,drawActors:zh,drawActorsPopup:Uh,setConf:Wh,draw:function(t,e,n,i){const{securityLevel:r,sequence:a}=ui();let s;Rh=a,i.db.clear(),i.parser.parse(t),"sandbox"===r&&(s=(0,o.Ys)("#i"+e));const c="sandbox"===r?(0,o.Ys)(s.nodes()[0].contentDocument.body):(0,o.Ys)("body"),l="sandbox"===r?s.nodes()[0].contentDocument:document;Zh.init(),Bt.debug(i.db);const h="sandbox"===r?c.select(`[id="${e}"]`):(0,o.Ys)(`[id="${e}"]`),u=i.db.getActors(),d=i.db.getBoxes(),p=i.db.getActorKeys(),f=i.db.getMessages(),g=i.db.getDiagramTitle(),y=i.db.hasAtLeastOneBox(),m=i.db.hasAtLeastOneBoxWithTitle(),b=function(t,e,n){const i={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){const r=t[e.to];if(e.placement===n.db.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===n.db.PLACEMENT.RIGHTOF&&!r.nextActor)return;const a=void 0!==e.placement,s=!a,o=a?jh(Rh):Ph(Rh),c=e.wrap?ei.wrapLabel(e.message,Rh.width-2*Rh.wrapPadding,o):e.message,l=ei.calculateTextDimensions(c,o).width+2*Rh.wrapPadding;s&&e.from===r.nextActor?i[e.to]=Math.max(i[e.to]||0,l):s&&e.from===r.prevActor?i[e.from]=Math.max(i[e.from]||0,l):s&&e.from===e.to?(i[e.from]=Math.max(i[e.from]||0,l/2),i[e.to]=Math.max(i[e.to]||0,l/2)):e.placement===n.db.PLACEMENT.RIGHTOF?i[e.from]=Math.max(i[e.from]||0,l):e.placement===n.db.PLACEMENT.LEFTOF?i[r.prevActor]=Math.max(i[r.prevActor]||0,l):e.placement===n.db.PLACEMENT.OVER&&(r.prevActor&&(i[r.prevActor]=Math.max(i[r.prevActor]||0,l/2)),r.nextActor&&(i[e.from]=Math.max(i[e.from]||0,l/2)))}})),Bt.debug("maxMessageWidthPerActor:",i),i}(u,f,i);Rh.height=function(t,e,n){let i=0;Object.keys(t).forEach((e=>{const n=t[e];n.wrap&&(n.description=ei.wrapLabel(n.description,Rh.width-2*Rh.wrapPadding,Yh(Rh)));const r=ei.calculateTextDimensions(n.description,Yh(Rh));n.width=n.wrap?Rh.width:Math.max(Rh.width,r.width+2*Rh.wrapPadding),n.height=n.wrap?Math.max(r.height,Rh.height):Rh.height,i=Math.max(i,n.height)}));for(const a in e){const n=t[a];if(!n)continue;const i=t[n.nextActor];if(!i){const t=e[a]+Rh.actorMargin-n.width/2;n.margin=Math.max(t,Rh.actorMargin);continue}const r=e[a]+Rh.actorMargin-n.width/2-i.width/2;n.margin=Math.max(r,Rh.actorMargin)}let r=0;return n.forEach((e=>{const n=Ph(Rh);let i=e.actorKeys.reduce(((e,n)=>e+(t[n].width+(t[n].margin||0))),0);i-=2*Rh.boxTextMargin,e.wrap&&(e.name=ei.wrapLabel(e.name,i-2*Rh.wrapPadding,n));const a=ei.calculateTextDimensions(e.name,n);r=Math.max(a.height,r);const s=Math.max(i,a.width+2*Rh.wrapPadding);if(e.margin=Rh.boxTextMargin,i t.textMaxHeight=r)),Math.max(i,Rh.height)}(u,b,d),$h.insertComputerIcon(h),$h.insertDatabaseIcon(h),$h.insertClockIcon(h),y&&(Zh.bumpVerticalPos(Rh.boxMargin),m&&Zh.bumpVerticalPos(d[0].textMaxHeight)),zh(h,u,p,0,Rh,f,!1);const _=Xh(f,u,b,i);$h.insertArrowHead(h),$h.insertArrowCrossHead(h),$h.insertArrowFilledHead(h),$h.insertSequenceNumber(h);let x=1,v=1;const k=[];f.forEach((function(t){let e,n,r;switch(t.type){case i.db.LINETYPE.NOTE:n=t.noteModel,function(t,e){Zh.bumpVerticalPos(Rh.boxMargin),e.height=Rh.boxMargin,e.starty=Zh.getVerticalPos();const n=$h.getNoteRect();n.x=e.startx,n.y=e.starty,n.width=e.width||Rh.width,n.class="note";const i=t.append("g"),r=$h.drawRect(i,n),a=$h.getTextObj();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=Rh.noteFontFamily,a.fontSize=Rh.noteFontSize,a.fontWeight=Rh.noteFontWeight,a.anchor=Rh.noteAlign,a.textMargin=Rh.noteMargin,a.valign="center";const s=Ah(i,a),o=Math.round(s.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));r.attr("height",o+2*Rh.noteMargin),e.height+=o+2*Rh.noteMargin,Zh.bumpVerticalPos(o+2*Rh.noteMargin),e.stopy=e.starty+o+2*Rh.noteMargin,e.stopx=e.startx+n.width,Zh.insert(e.startx,e.starty,e.stopx,e.stopy),Zh.models.addNote(e)}(h,n);break;case i.db.LINETYPE.ACTIVE_START:Zh.newActivation(t,h,u);break;case i.db.LINETYPE.ACTIVE_END:!function(t,e){const n=Zh.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),$h.drawActivation(h,n,e,Rh,qh(t.from.actor).length),Zh.insert(n.startx,e-10,n.stopx,e)}(t,Zh.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:Vh(_,t,Rh.boxMargin,Rh.boxMargin+Rh.boxTextMargin,(t=>Zh.newLoop(t)));break;case i.db.LINETYPE.LOOP_END:e=Zh.endLoop(),$h.drawLoop(h,e,"loop",Rh),Zh.bumpVerticalPos(e.stopy-Zh.getVerticalPos()),Zh.models.addLoop(e);break;case i.db.LINETYPE.RECT_START:Vh(_,t,Rh.boxMargin,Rh.boxMargin,(t=>Zh.newLoop(void 0,t.message)));break;case i.db.LINETYPE.RECT_END:e=Zh.endLoop(),$h.drawBackgroundRect(h,e),Zh.models.addLoop(e),Zh.bumpVerticalPos(e.stopy-Zh.getVerticalPos());break;case i.db.LINETYPE.OPT_START:Vh(_,t,Rh.boxMargin,Rh.boxMargin+Rh.boxTextMargin,(t=>Zh.newLoop(t)));break;case i.db.LINETYPE.OPT_END:e=Zh.endLoop(),$h.drawLoop(h,e,"opt",Rh),Zh.bumpVerticalPos(e.stopy-Zh.getVerticalPos()),Zh.models.addLoop(e);break;case i.db.LINETYPE.ALT_START:Vh(_,t,Rh.boxMargin,Rh.boxMargin+Rh.boxTextMargin,(t=>Zh.newLoop(t)));break;case i.db.LINETYPE.ALT_ELSE:Vh(_,t,Rh.boxMargin+Rh.boxTextMargin,Rh.boxMargin,(t=>Zh.addSectionToLoop(t)));break;case i.db.LINETYPE.ALT_END:e=Zh.endLoop(),$h.drawLoop(h,e,"alt",Rh),Zh.bumpVerticalPos(e.stopy-Zh.getVerticalPos()),Zh.models.addLoop(e);break;case i.db.LINETYPE.PAR_START:Vh(_,t,Rh.boxMargin,Rh.boxMargin+Rh.boxTextMargin,(t=>Zh.newLoop(t)));break;case i.db.LINETYPE.PAR_AND:Vh(_,t,Rh.boxMargin+Rh.boxTextMargin,Rh.boxMargin,(t=>Zh.addSectionToLoop(t)));break;case i.db.LINETYPE.PAR_END:e=Zh.endLoop(),$h.drawLoop(h,e,"par",Rh),Zh.bumpVerticalPos(e.stopy-Zh.getVerticalPos()),Zh.models.addLoop(e);break;case i.db.LINETYPE.AUTONUMBER:x=t.message.start||x,v=t.message.step||v,t.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:Vh(_,t,Rh.boxMargin,Rh.boxMargin+Rh.boxTextMargin,(t=>Zh.newLoop(t)));break;case i.db.LINETYPE.CRITICAL_OPTION:Vh(_,t,Rh.boxMargin+Rh.boxTextMargin,Rh.boxMargin,(t=>Zh.addSectionToLoop(t)));break;case i.db.LINETYPE.CRITICAL_END:e=Zh.endLoop(),$h.drawLoop(h,e,"critical",Rh),Zh.bumpVerticalPos(e.stopy-Zh.getVerticalPos()),Zh.models.addLoop(e);break;case i.db.LINETYPE.BREAK_START:Vh(_,t,Rh.boxMargin,Rh.boxMargin+Rh.boxTextMargin,(t=>Zh.newLoop(t)));break;case i.db.LINETYPE.BREAK_END:e=Zh.endLoop(),$h.drawLoop(h,e,"break",Rh),Zh.bumpVerticalPos(e.stopy-Zh.getVerticalPos()),Zh.models.addLoop(e);break;default:try{r=t.msgModel,r.starty=Zh.getVerticalPos(),r.sequenceIndex=x,r.sequenceVisible=i.db.showSequenceNumbers();const e=function(t,e){Zh.bumpVerticalPos(10);const{startx:n,stopx:i,message:r}=e,a=jt.splitBreaks(r).length,s=ei.calculateTextDimensions(r,Ph(Rh)),o=s.height/a;let c;e.height+=o,Zh.bumpVerticalPos(o);let l=s.height-10;const h=s.width;if(n===i){c=Zh.getVerticalPos()+l,Rh.rightAngles||(l+=Rh.boxMargin,c=Zh.getVerticalPos()+l),l+=30;const t=Math.max(h/2,Rh.width/2);Zh.insert(n-t,Zh.getVerticalPos()-10+l,i+t,Zh.getVerticalPos()+30+l)}else l+=Rh.boxMargin,c=Zh.getVerticalPos()+l,Zh.insert(n,c-10,i,c);return Zh.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,Zh.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),c}(0,r);k.push({messageModel:r,lineStartY:e}),Zh.models.addMessage(r)}catch(a){Bt.error("error while drawing message",a)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(x+=v)})),k.forEach((t=>function(t,e,n,i){const{startx:r,stopx:a,starty:s,message:o,type:c,sequenceIndex:l,sequenceVisible:h}=e,u=ei.calculateTextDimensions(o,Ph(Rh)),d=$h.getTextObj();d.x=r,d.y=s+10,d.width=a-r,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=Rh.messageFontFamily,d.fontSize=Rh.messageFontSize,d.fontWeight=Rh.messageFontWeight,d.anchor=Rh.messageAlign,d.valign="center",d.textMargin=Rh.wrapPadding,d.tspan=!1,Ah(t,d);const p=u.width;let f;r===a?f=Rh.rightAngles?t.append("path").attr("d",`M ${r},${n} H ${r+Math.max(Rh.width/2,p/2)} V ${n+25} H ${r}`):t.append("path").attr("d","M "+r+","+n+" C "+(r+60)+","+(n-10)+" "+(r+60)+","+(n+30)+" "+r+","+(n+20)):(f=t.append("line"),f.attr("x1",r),f.attr("y1",n),f.attr("x2",a),f.attr("y2",n)),c===i.db.LINETYPE.DOTTED||c===i.db.LINETYPE.DOTTED_CROSS||c===i.db.LINETYPE.DOTTED_POINT||c===i.db.LINETYPE.DOTTED_OPEN?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0");let g="";Rh.arrowMarkerAbsolute&&(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,g=g.replace(/\(/g,"\\("),g=g.replace(/\)/g,"\\)")),f.attr("stroke-width",2),f.attr("stroke","none"),f.style("fill","none"),c!==i.db.LINETYPE.SOLID&&c!==i.db.LINETYPE.DOTTED||f.attr("marker-end","url("+g+"#arrowhead)"),c!==i.db.LINETYPE.SOLID_POINT&&c!==i.db.LINETYPE.DOTTED_POINT||f.attr("marker-end","url("+g+"#filled-head)"),c!==i.db.LINETYPE.SOLID_CROSS&&c!==i.db.LINETYPE.DOTTED_CROSS||f.attr("marker-end","url("+g+"#crosshead)"),(h||Rh.showSequenceNumbers)&&(f.attr("marker-start","url("+g+"#sequencenumber)"),t.append("text").attr("x",r).attr("y",n+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))}(h,t.messageModel,t.lineStartY,i))),Rh.mirrorActors&&(Zh.bumpVerticalPos(2*Rh.boxMargin),zh(h,u,p,Zh.getVerticalPos(),Rh,f,!0),Zh.bumpVerticalPos(Rh.boxMargin),Nh(h,Zh.getVerticalPos())),Zh.models.boxes.forEach((function(t){t.height=Zh.getVerticalPos()-t.y,Zh.insert(t.x,t.y,t.x+t.width,t.height),t.startx=t.x,t.starty=t.y,t.stopx=t.startx+t.width,t.stopy=t.starty+t.height,t.stroke="rgb(0,0,0, 0.5)",$h.drawBox(h,t,Rh)})),y&&Zh.bumpVerticalPos(Rh.boxMargin);const w=Uh(h,u,p,l),{bounds:C}=Zh.getBounds();Bt.debug("For line height fix Querying: #"+e+" .actor-line");(0,o.td_)("#"+e+" .actor-line").attr("y2",C.stopy);let T=C.stopy-C.starty;T2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},I=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return 41;case 1:case 44:return 50;case 2:case 45:return 51;case 3:case 46:return 52;case 4:case 47:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:case 11:case 13:case 14:case 15:case 16:case 56:case 58:case 64:break;case 12:case 79:return 5;case 17:case 34:return this.pushState("SCALE"),17;case 18:case 35:return 18;case 19:case 25:case 36:case 51:case 54:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 37:this.pushState("STATE");break;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 40:case 43:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 48:this.pushState("STATE_STRING");break;case 49:return this.pushState("STATE_ID"),"AS";case 50:case 66:return this.popState(),"ID";case 52:return"STATE_DESCR";case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 57:return this.popState(),21;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:return"NOTE_TEXT";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 69:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 70:case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return e.yytext=e.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*< >)/i,/^(?:.*< >)/i,/^(?:.*< >)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}},t);function F(){this.yy={}}return M.lexer=I,F.prototype=M,M.Parser=F,new F}();Qh.parser=Qh;const Jh=Qh,tu=(t,e)=>{var n;return"dagre-wrapper"!==(null==(n=null==e?void 0:e.state)?void 0:n.defaultRenderer)&&null!==t.match(/^\s*stateDiagram/)},eu=(t,e)=>{var n;return null!==t.match(/^\s*stateDiagram-v2/)||!(!t.match(/^\s*stateDiagram/)||"dagre-wrapper"!==(null==(n=null==e?void 0:e.state)?void 0:n.defaultRenderer))},nu="state",iu="relation",ru="default",au="divider",su="[*]",ou="start",cu=su,lu="color",hu="fill";let uu="LR",du=[],pu={};let fu={root:{relations:[],states:{},documents:{}}},gu=fu.root,yu=0,mu=0;const bu=t=>JSON.parse(JSON.stringify(t)),_u=(t,e,n)=>{if(e.stmt===iu)_u(t,e.state1,!0),_u(t,e.state2,!1);else if(e.stmt===nu&&("[*]"===e.id?(e.id=n?t.id+"_start":t.id+"_end",e.start=n):e.id=e.id.trim()),e.doc){const t=[];let n,i=[];for(n=0;n 0&&i.length>0){const n={stmt:nu,id:Yn(),type:"divider",doc:bu(i)};t.push(bu(n)),e.doc=t}e.doc.forEach((t=>_u(e,t,!0)))}},xu=function(t,e=ru,n=null,i=null,r=null,a=null,s=null,o=null){const c=null==t?void 0:t.trim();if(void 0===gu.states[c]?(Bt.info("Adding state ",c,i),gu.states[c]={id:c,descriptions:[],type:e,doc:n,note:r,classes:[],styles:[],textStyles:[]}):(gu.states[c].doc||(gu.states[c].doc=n),gu.states[c].type||(gu.states[c].type=e)),i&&(Bt.info("Setting state description",c,i),"string"==typeof i&&Eu(c,i.trim()),"object"==typeof i&&i.forEach((t=>Eu(c,t.trim())))),r&&(gu.states[c].note=r,gu.states[c].note.text=jt.sanitizeText(gu.states[c].note.text,ui())),a){Bt.info("Setting state classes",c,a);("string"==typeof a?[a]:a).forEach((t=>Au(c,t.trim())))}if(s){Bt.info("Setting state styles",c,s);("string"==typeof s?[s]:s).forEach((t=>Lu(c,t.trim())))}if(o){Bt.info("Setting state styles",c,s);("string"==typeof o?[o]:o).forEach((t=>Bu(c,t.trim())))}},vu=function(t){fu={root:{relations:[],states:{},documents:{}}},gu=fu.root,yu=0,pu={},t||Ri()},ku=function(t){return gu.states[t]};function wu(t=""){let e=t;return t===su&&(yu++,e=`${ou}${yu}`),e}function Cu(t="",e=ru){return t===su?ou:e}const Tu=function(t,e,n){if("object"==typeof t)!function(t,e,n){let i=wu(t.id.trim()),r=Cu(t.id.trim(),t.type),a=wu(e.id.trim()),s=Cu(e.id.trim(),e.type);xu(i,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),xu(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),gu.relations.push({id1:i,id2:a,relationTitle:jt.sanitizeText(n,ui())})}(t,e,n);else{const i=wu(t.trim()),r=Cu(t),a=function(t=""){let e=t;return t===cu&&(yu++,e=`end${yu}`),e}(e.trim()),s=function(t="",e=ru){return t===cu?"end":e}(e);xu(i,r),xu(a,s),gu.relations.push({id1:i,id2:a,title:jt.sanitizeText(n,ui())})}},Eu=function(t,e){const n=gu.states[t],i=e.startsWith(":")?e.replace(":","").trim():e;n.descriptions.push(jt.sanitizeText(i,ui()))},Su=function(t,e=""){void 0===pu[t]&&(pu[t]={id:t,styles:[],textStyles:[]});const n=pu[t];null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(t.match(lu)){const t=e.replace(hu,"bgFill").replace(lu,hu);n.textStyles.push(t)}n.styles.push(e)}))},Au=function(t,e){t.split(",").forEach((function(t){let n=ku(t);if(void 0===n){const e=t.trim();xu(e),n=ku(e)}n.classes.push(e)}))},Lu=function(t,e){const n=ku(t);void 0!==n&&n.textStyles.push(e)},Bu=function(t,e){const n=ku(t);void 0!==n&&n.textStyles.push(e)},Nu={parseDirective:function(t,e,n){xp.parseDirective(this,t,e,n)},getConfig:()=>ui().state,addState:xu,clear:vu,getState:ku,getStates:function(){return gu.states},getRelations:function(){return gu.relations},getClasses:function(){return pu},getDirection:()=>uu,addRelation:Tu,getDividerId:()=>(mu++,"divider-id-"+mu),setDirection:t=>{uu=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){Bt.info("Documents = ",fu)},getRootDoc:()=>du,setRootDoc:t=>{Bt.info("Setting root doc",t),du=t},getRootDocV2:()=>(_u({id:"root"},{id:"root",doc:du},!0),{id:"root",doc:du}),extract:t=>{let e;e=t.doc?t.doc:t,Bt.info(e),vu(!0),Bt.info("Extract",e),e.forEach((t=>{switch(t.stmt){case nu:xu(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case iu:Tu(t.state1,t.state2,t.description);break;case"classDef":Su(t.id.trim(),t.classes);break;case"applyClass":Au(t.id.trim(),t.styleClass)}}))},trimColon:t=>t&&":"===t[0]?t.substr(1).trim():t.trim(),getAccTitle:Pi,setAccTitle:Zi,getAccDescription:Yi,setAccDescription:ji,addStyleClass:Su,setCssClass:Au,addDescription:Eu,setDiagramTitle:zi,getDiagramTitle:Ui},Du={},Ou=(t,e)=>{Du[t]=e},Mu=(t,e)=>{const n=t.append("text").attr("x",2*ui().state.padding).attr("y",ui().state.textHeight+1.3*ui().state.padding).attr("font-size",ui().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,r=t.append("text").attr("x",ui().state.padding).attr("y",i+.4*ui().state.padding+ui().state.dividerMargin+ui().state.textHeight).attr("class","state-description");let a=!0,s=!0;e.descriptions.forEach((function(t){a||(!function(t,e,n){const i=t.append("tspan").attr("x",2*ui().state.padding).text(e);n||i.attr("dy",ui().state.textHeight)}(r,t,s),s=!1),a=!1}));const o=t.append("line").attr("x1",ui().state.padding).attr("y1",ui().state.padding+i+ui().state.dividerMargin/2).attr("y2",ui().state.padding+i+ui().state.dividerMargin/2).attr("class","descr-divider"),c=r.node().getBBox(),l=Math.max(c.width,n.width);return o.attr("x2",l+3*ui().state.padding),t.insert("rect",":first-child").attr("x",ui().state.padding).attr("y",ui().state.padding).attr("width",l+2*ui().state.padding).attr("height",c.height+i+2*ui().state.padding).attr("rx",ui().state.radius),t},Iu=(t,e,n)=>{const i=ui().state.padding,r=2*ui().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,c=t.append("text").attr("x",0).attr("y",ui().state.titleShift).attr("font-size",ui().state.fontSize).attr("class","state-title").text(e.id),l=c.node().getBBox().width+r;let h,u=Math.max(l,s);u===s&&(u+=r);const d=t.node().getBBox();e.doc,h=o-i,l>s&&(h=(s-u)/2+i),Math.abs(o-d.x)s&&(h=o-(l-s)/2);const p=1-ui().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",p).attr("class",n?"alt-composit":"composit").attr("width",u).attr("height",d.height+ui().state.textHeight+ui().state.titleShift+1).attr("rx","0"),c.attr("x",h+i),l<=s&&c.attr("x",o+(u-r)/2-l/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",ui().state.titleShift-ui().state.textHeight-ui().state.padding).attr("width",u).attr("height",3*ui().state.textHeight).attr("rx",ui().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",ui().state.titleShift-ui().state.textHeight-ui().state.padding).attr("width",u).attr("height",d.height+3+2*ui().state.textHeight).attr("rx",ui().state.radius),t},Fu=(t,e)=>{e.attr("class","state-note");const n=e.append("rect").attr("x",0).attr("y",ui().state.padding),i=e.append("g"),{textWidth:r,textHeight:a}=((t,e,n,i)=>{let r=0;const a=i.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=t.replace(/\r\n/g,"
");s=s.replace(/\n/g,"
");const o=s.split(jt.lineBreakRegex);let c=1.25*ui().state.noteMargin;for(const l of o){const t=l.trim();if(t.length>0){const i=a.append("tspan");i.text(t),0===c&&(c+=i.node().getBBox().height),r+=c,i.attr("x",e+ui().state.noteMargin),i.attr("y",n+r+1.25*ui().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:r}})(t,0,0,i);return n.attr("height",a+2*ui().state.noteMargin),n.attr("width",r+2*ui().state.noteMargin),n},$u=function(t,e){const n=e.id,i={id:n,label:e.id,width:0,height:0},r=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&(t=>{t.append("circle").attr("class","start-state").attr("r",ui().state.sizeUnit).attr("cx",ui().state.padding+ui().state.sizeUnit).attr("cy",ui().state.padding+ui().state.sizeUnit)})(r),"end"===e.type&&(t=>{t.append("circle").attr("class","end-state-outer").attr("r",ui().state.sizeUnit+ui().state.miniPadding).attr("cx",ui().state.padding+ui().state.sizeUnit+ui().state.miniPadding).attr("cy",ui().state.padding+ui().state.sizeUnit+ui().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",ui().state.sizeUnit).attr("cx",ui().state.padding+ui().state.sizeUnit+2).attr("cy",ui().state.padding+ui().state.sizeUnit+2)})(r),"fork"!==e.type&&"join"!==e.type||((t,e)=>{let n=ui().state.forkWidth,i=ui().state.forkHeight;if(e.parentId){let t=n;n=i,i=t}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",i).attr("x",ui().state.padding).attr("y",ui().state.padding)})(r,e),"note"===e.type&&Fu(e.note.text,r),"divider"===e.type&&(t=>{t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",ui().state.textHeight).attr("class","divider").attr("x2",2*ui().state.textHeight).attr("y1",0).attr("y2",0)})(r),"default"===e.type&&0===e.descriptions.length&&((t,e)=>{const n=t.append("text").attr("x",2*ui().state.padding).attr("y",ui().state.textHeight+2*ui().state.padding).attr("font-size",ui().state.fontSize).attr("class","state-title").text(e.id),i=n.node().getBBox();t.insert("rect",":first-child").attr("x",ui().state.padding).attr("y",ui().state.padding).attr("width",i.width+2*ui().state.padding).attr("height",i.height+2*ui().state.padding).attr("rx",ui().state.radius)})(r,e),"default"===e.type&&e.descriptions.length>0&&Mu(r,e);const a=r.node().getBBox();return i.width=a.width+2*ui().state.padding,i.height=a.height+2*ui().state.padding,Ou(n,i),i};let Ru=0;let Zu;const Pu={},ju=(t,e,n,i,r,a,s)=>{const c=new lt.k({compound:!0,multigraph:!0});let l,h=!0;for(l=0;l{const e=t.parentElement;let n=0,i=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",n-i-8)}))}else Bt.debug("No Node "+t+": "+JSON.stringify(c.node(t)))}));let y=g.getBBox();c.edges().forEach((function(t){void 0!==t&&void 0!==c.edge(t)&&(Bt.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),function(t,e,n){e.points=e.points.filter((t=>!Number.isNaN(t.y)));const i=e.points,r=(0,o.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(o.$0Z),a=t.append("path").attr("d",r(i)).attr("id","edge"+Ru).attr("class","transition");let s="";if(ui().state.arrowMarkerAbsolute&&(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,s=s.replace(/\(/g,"\\("),s=s.replace(/\)/g,"\\)")),a.attr("marker-end","url("+s+"#"+function(t){switch(t){case Nu.relationType.AGGREGATION:return"aggregation";case Nu.relationType.EXTENSION:return"extension";case Nu.relationType.COMPOSITION:return"composition";case Nu.relationType.DEPENDENCY:return"dependency"}}(Nu.relationType.DEPENDENCY)+"End)"),void 0!==n.title){const i=t.append("g").attr("class","stateLabel"),{x:r,y:a}=ei.calcLabelPosition(e.points),s=jt.getRows(n.title);let o=0;const c=[];let l=0,h=0;for(let t=0;t<=s.length;t++){const e=i.append("text").attr("text-anchor","middle").text(s[t]).attr("x",r).attr("y",a+o),n=e.node().getBBox();if(l=Math.max(l,n.width),h=Math.min(h,n.x),Bt.info(n.x,r,a+o),0===o){const t=e.node().getBBox();o=t.height,Bt.info("Title height",o,a)}c.push(e)}let u=o*s.length;if(s.length>1){const t=(s.length-1)*o*.5;c.forEach(((e,n)=>e.attr("y",a+n*o-t))),u=o*s.length}const d=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",r-l/2-ui().state.padding/2).attr("y",a-u/2-ui().state.padding/2-3.5).attr("width",l+ui().state.padding).attr("height",u+ui().state.padding),Bt.info(d)}Ru++}(e,c.edge(t),c.edge(t).relation))})),y=g.getBBox();const m={id:n||"root",label:n||"root",width:0,height:0};return m.width=y.width+2*Zu.padding,m.height=y.height+2*Zu.padding,Bt.debug("Doc rendered",m,c),m},Yu={setConf:function(){},draw:function(t,e,n,i){Zu=ui().state;const r=ui().securityLevel;let a;"sandbox"===r&&(a=(0,o.Ys)("#i"+e));const s="sandbox"===r?(0,o.Ys)(a.nodes()[0].contentDocument.body):(0,o.Ys)("body"),c="sandbox"===r?a.nodes()[0].contentDocument:document;Bt.debug("Rendering diagram "+t);const l=s.select(`[id='${e}']`);l.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z");new lt.k({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));const h=i.db.getRootDoc();ju(h,l,void 0,!1,s,c,i);const u=Zu.padding,d=l.node().getBBox(),p=d.width+2*u,f=d.height+2*u;bi(l,f,1.75*p,Zu.useMaxWidth),l.attr("viewBox",`${d.x-Zu.padding} ${d.y-Zu.padding} `+p+" "+f)}},zu="rect",Uu="rectWithTitle",Wu="statediagram",qu=`${Wu}-state`,Hu="transition",Vu=`${Hu} note-edge`,Gu=`${Wu}-note`,Xu=`${Wu}-cluster`,Ku=`${Wu}-cluster-alt`,Qu="parent",Ju="note",td="----",ed=`${td}${Ju}`,nd=`${td}${Qu}`,id="fill:none",rd="fill: #333",ad="text",sd="normal";let od={},cd=0;function ld(t="",e=0,n="",i=td){return`state-${t}${null!==n&&n.length>0?`${i}${n}`:""}-${e}`}const hd=(t,e,n,i,r,a)=>{const s=n.id,o=null==(c=i[s])?"":c.classes?c.classes.join(" "):"";var c;if("root"!==s){let e=zu;!0===n.start&&(e="start"),!1===n.start&&(e="end"),n.type!==ru&&(e=n.type),od[s]||(od[s]={id:s,shape:e,description:jt.sanitizeText(s,ui()),classes:`${o} ${qu}`});const i=od[s];n.description&&(Array.isArray(i.description)?(i.shape=Uu,i.description.push(n.description)):i.description.length>0?(i.shape=Uu,i.description===s?i.description=[n.description]:i.description=[i.description,n.description]):(i.shape=zu,i.description=n.description),i.description=jt.sanitizeTextOrArray(i.description,ui())),1===i.description.length&&i.shape===Uu&&(i.shape=zu),!i.type&&n.doc&&(Bt.info("Setting cluster for ",s,dd(n)),i.type="group",i.dir=dd(n),i.shape=n.type===au?"divider":"roundedWithTitle",i.classes=i.classes+" "+Xu+" "+(a?Ku:""));const r={labelStyle:"",shape:i.shape,labelText:i.description,classes:i.classes,style:"",id:s,dir:i.dir,domId:ld(s,cd),type:i.type,padding:15};if(n.note){const e={labelStyle:"",shape:"note",labelText:n.note.text,classes:Gu,style:"",id:s+ed+"-"+cd,domId:ld(s,cd,Ju),type:i.type,padding:15},a={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:i.classes,style:"",id:s+nd,domId:ld(s,cd,Qu),type:"group",padding:0};cd++;const o=s+nd;t.setNode(o,a),t.setNode(e.id,e),t.setNode(s,r),t.setParent(s,o),t.setParent(e.id,o);let c=s,l=e.id;"left of"===n.note.position&&(c=e.id,l=s),t.setEdge(c,l,{arrowhead:"none",arrowType:"",style:id,labelStyle:"",classes:Vu,arrowheadStyle:rd,labelpos:"c",labelType:ad,thickness:sd})}else t.setNode(s,r)}e&&"root"!==e.id&&(Bt.trace("Setting node ",s," to be child of its parent ",e.id),t.setParent(s,e.id)),n.doc&&(Bt.trace("Adding nodes children "),ud(t,n,n.doc,i,r,!a))},ud=(t,e,n,i,r,a)=>{Bt.trace("items",n),n.forEach((n=>{switch(n.stmt){case nu:case ru:hd(t,e,n,i,r,a);break;case iu:{hd(t,e,n.state1,i,r,a),hd(t,e,n.state2,i,r,a);const s={id:"edge"+cd,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:id,labelStyle:"",label:jt.sanitizeText(n.description,ui()),arrowheadStyle:rd,labelpos:"c",labelType:ad,thickness:sd,classes:Hu};t.setEdge(n.state1.id,n.state2.id,s,cd),cd++}}}))},dd=(t,e="TB")=>{let n=e;if(t.doc)for(let i=0;i 2&&C.push("'"+this.terminals_[v]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:n.push(m),r.push(u.yytext),a.push(u.yylloc),n.push(_[1]),m=null,l=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(k=this.productions_[_[1]][1],T.$=r[r.length-k],T._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(T,[o,l,c,d.yy,_[1],r,a].concat(h))))return x;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),r.push(T.$),a.push(T._$),w=s[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},f=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}},t);function g(){this.yy={}}return p.lexer=f,g.prototype=p,p.Parser=g,new g}();fd.parser=fd;const gd=fd,yd=t=>null!==t.match(/^\s*journey/);let md="";const bd=[],_d=[],xd=[],vd=function(){let t=!0;for(const[e,n]of xd.entries())xd[e].processed,t=t&&n.processed;return t},kd={parseDirective:function(t,e,n){xp.parseDirective(this,t,e,n)},getConfig:()=>ui().journey,clear:function(){bd.length=0,_d.length=0,md="",xd.length=0,Ri()},setDiagramTitle:zi,getDiagramTitle:Ui,setAccTitle:Zi,getAccTitle:Pi,setAccDescription:ji,getAccDescription:Yi,addSection:function(t){md=t,bd.push(t)},getSections:function(){return bd},getTasks:function(){let t=vd();let e=0;for(;!t&&e<100;)t=vd(),e++;return _d.push(...xd),_d},addTask:function(t,e){const n=e.substr(1).split(":");let i=0,r=[];1===n.length?(i=Number(n[0]),r=[]):(i=Number(n[0]),r=n[1].split(","));const a=r.map((t=>t.trim())),s={section:md,type:md,people:a,task:t,score:i};xd.push(s)},addTaskOrg:function(t){const e={section:md,type:md,description:t,task:t,classes:[]};_d.push(e)},getActors:function(){return function(){const t=[];return _d.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}()}},wd=function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},Cd=function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},Td=function(t,e){const n=e.text.replace(/
/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),i};let Ed=-1;const Sd=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},Ad=function(){function t(t,e,n,r,a,s,o,c){i(e.append("text").attr("x",n+a/2).attr("y",r+s/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,a,s,o,c,l){const{taskFontSize:h,taskFontFamily:u}=c,d=t.split(/
/gi);for(let p=0;p3?function(t){const i=(0,o.Nb1)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}(r):e.score<3?function(t){const i=(0,o.Nb1)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(r):r.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(r,{cx:i,cy:300+30*(5-e.score),score:e.score});const a=Sd();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,wd(r,a);let s=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:s,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};Cd(r,i),s+=10})),Ad(n)(e.task,r,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)},Od=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},Md={};const Id=ui().journey,Fd=Id.leftMargin,$d={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},updateBounds:function(t,e,n,i){const r=ui().journey,a=this;let s=0;var o;this.sequenceItems.forEach((function(c){s++;const l=a.sequenceItems.length-s+1;a.updateVal(c,"starty",e-l*r.boxMargin,Math.min),a.updateVal(c,"stopy",i+l*r.boxMargin,Math.max),a.updateVal($d.data,"startx",t-l*r.boxMargin,Math.min),a.updateVal($d.data,"stopx",n+l*r.boxMargin,Math.max),"activation"!==o&&(a.updateVal(c,"startx",t-l*r.boxMargin,Math.min),a.updateVal(c,"stopx",n+l*r.boxMargin,Math.max),a.updateVal($d.data,"starty",e-l*r.boxMargin,Math.min),a.updateVal($d.data,"stopy",i+l*r.boxMargin,Math.max))}))},insert:function(t,e,n,i){const r=Math.min(t,n),a=Math.max(t,n),s=Math.min(e,i),o=Math.max(e,i);this.updateVal($d.data,"startx",r,Math.min),this.updateVal($d.data,"starty",s,Math.min),this.updateVal($d.data,"stopx",a,Math.max),this.updateVal($d.data,"stopy",o,Math.max),this.updateBounds(r,s,a,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Rd=Id.sectionFills,Zd=Id.sectionColours,Pd=function(t,e,n){const i=ui().journey;let r="";const a=n+(2*i.height+i.diagramMarginY);let s=0,o="#CCC",c="black",l=0;for(const[h,u]of e.entries()){if(r!==u.section){o=Rd[s%Rd.length],l=s%Rd.length,c=Zd[s%Zd.length];const e={x:h*i.taskMargin+h*i.width+Fd,y:50,text:u.section,fill:o,num:l,colour:c};Bd(t,e,i),r=u.section,s++}const e=u.people.reduce(((t,e)=>(Md[e]&&(t[e]=Md[e]),t)),{});u.x=h*i.taskMargin+h*i.width+Fd,u.y=a,u.width=i.diagramMarginX,u.height=i.diagramMarginY,u.colour=c,u.fill=o,u.num=l,u.actors=e,Dd(t,u,i),$d.insert(u.x,u.y,u.x+u.width+i.taskMargin,450)}},jd={setConf:function(t){Object.keys(t).forEach((function(e){Id[e]=t[e]}))},draw:function(t,e,n,i){const r=ui().journey;i.db.clear(),i.parser.parse(t+"\n");const a=ui().securityLevel;let s;"sandbox"===a&&(s=(0,o.Ys)("#i"+e));const c="sandbox"===a?(0,o.Ys)(s.nodes()[0].contentDocument.body):(0,o.Ys)("body");$d.init();const l=c.select("#"+e);Od(l);const h=i.db.getTasks(),u=i.db.getDiagramTitle(),d=i.db.getActors();for(const o in Md)delete Md[o];let p=0;d.forEach((t=>{Md[t]={color:r.actorColours[p%r.actorColours.length],position:p},p++})),function(t){const e=ui().journey;let n=60;Object.keys(Md).forEach((i=>{const r=Md[i].color,a={cx:20,cy:n,r:7,fill:r,stroke:"#000",pos:Md[i].position};Ld(t,a);const s={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};Nd(t,s),n+=20}))}(l),$d.insert(0,0,Fd,50*Object.keys(Md).length),Pd(l,h,0);const f=$d.getBounds();u&&l.append("text").text(u).attr("x",Fd).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const g=f.stopy-f.starty+2*r.diagramMarginY,y=Fd+f.stopx+2*r.diagramMarginX;bi(l,g,y,r.useMaxWidth),l.append("line").attr("x1",Fd).attr("y1",4*r.height).attr("x2",y-Fd-4).attr("y2",4*r.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const m=u?70:0;l.attr("viewBox",`${f.startx} -25 ${y} ${g+m}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",g+m+25)}};let Yd={};const zd={setConf:function(t){Yd={...Yd,...t}},draw:(t,e,n)=>{try{Bt.debug("Renering svg for syntax error\n");const t=(0,o.Ys)("#"+e),i=t.append("g");i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+n),t.attr("height",100),t.attr("width",500),t.attr("viewBox","768 0 912 512")}catch(r){Bt.error("Error while rendering info diagram"),Bt.error((i=r)instanceof Error?i.message:String(i))}var i}},Ud="flowchart-elk",Wd={id:Ud,detector:(t,e)=>{var n;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&"elk"===(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer))},loader:async()=>{const{diagram:t}=await n.e(9487).then(n.bind(n,9487));return{id:Ud,diagram:t}}},qd="timeline",Hd={id:qd,detector:t=>null!==t.match(/^\s*timeline/),loader:async()=>{const{diagram:t}=await n.e(6316).then(n.bind(n,6316));return{id:qd,diagram:t}}},Vd="mindmap",Gd={id:Vd,detector:t=>null!==t.match(/^\s*mindmap/),loader:async()=>{const{diagram:t}=await n.e(7724).then(n.bind(n,7724));return{id:Vd,diagram:t}}};let Xd=!1;const Kd=()=>{Xd||(Xd=!0,Bn(Wd,Hd,Gd),ir("error",{db:{clear:()=>{}},styles:ki,renderer:zd,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},(t=>"error"===t.toLowerCase().trim())),ir("---",{db:{clear:()=>{}},styles:ki,renderer:zd,parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with unindented `---` blocks")}},init:()=>null},(t=>t.toLowerCase().trimStart().startsWith("---"))),ir("c4",{parser:Yr,db:ia,renderer:Ia,styles:Ni,init:t=>{Ia.setConf(t.c4)}},zr),ir("class",{parser:$a,db:es,renderer:fs,styles:xi,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,es.clear()}},Ra),ir("classDiagram",{parser:$a,db:es,renderer:no,styles:xi,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,es.clear()}},Za),ir("er",{parser:ro,db:lo,renderer:ko,styles:vi},ao),ir("gantt",{parser:Nc,db:hl,renderer:pl,styles:Ci},Dc),ir("info",{parser:gl,db:bl,renderer:_l,styles:Ti},xl),ir("pie",{parser:kl,db:El,renderer:Bl,styles:Ei},wl),ir("requirement",{parser:Dl,db:Zl,renderer:Xl,styles:Si},Ol),ir("sequence",{parser:Ql,db:_h,renderer:Kh,styles:Ai,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");_h.setWrap(t.wrap),Kh.setConf(t.sequence)}},Jl),ir("state",{parser:Jh,db:Nu,renderer:Yu,styles:Li,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Nu.clear()}},tu),ir("stateDiagram",{parser:Jh,db:Nu,renderer:pd,styles:Li,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Nu.clear()}},eu),ir("journey",{parser:gd,db:kd,renderer:jd,styles:Bi,init:t=>{jd.setConf(t.journey),kd.clear()}},yd),ir("flowchart",{parser:Co,db:kc,renderer:Lc,styles:wi,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Tc(t.flowchart),kc.clear(),kc.setGen("gen-1")}},To),ir("flowchart-v2",{parser:Co,db:kc,renderer:Lc,styles:wi,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,hi({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Lc.setConf(t.flowchart),kc.clear(),kc.setGen("gen-2")}},Eo),ir("gitGraph",{parser:sr,db:Cr,renderer:Zr,styles:Pr},or))};class Qd{constructor(t,e){var n,i;this.txt=t,this.type="graph",this.detectTypeFailed=!1;const r=ui();this.txt=t;try{this.type=Ln(t,r)}catch(o){this.handleError(o,e),this.type="error",this.detectTypeFailed=!0}const a=rr(this.type);Bt.debug("Type "+this.type),this.db=a.db,null==(i=(n=this.db).clear)||i.call(n),this.renderer=a.renderer,this.parser=a.parser;const s=this.parser.parse.bind(this.parser);this.parser.parse=t=>s(function(t,e){var n;const i=t.match(Tn);if(i){const r=Cn(i[1],{schema:wn});return(null==r?void 0:r.title)&&(null==(n=e.setDiagramTitle)||n.call(e,r.title)),t.slice(i[0].length)}return t}(t,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(r),Bt.info("Initialized diagram "+this.type,r)),this.txt+="\n",this.parse(this.txt,e)}parse(t,e){var n,i;if(this.detectTypeFailed)return!1;try{return t+="\n",null==(i=(n=this.db).clear)||i.call(n),this.parser.parse(t),!0}catch(r){this.handleError(r,e)}return!1}handleError(t,e){if(void 0===e)throw t;Jn(t)?e(t.str,t.hash):e(t)}getParser(){return this.parser}getType(){return this.type}}const Jd=(t,e)=>{const n=Ln(t,ui());try{rr(n)}catch(i){const r=An[n].loader;if(!r)throw new Error(`Diagram ${n} not found.`);return r().then((({diagram:i})=>(ir(n,i,void 0),new Qd(t,e))))}return new Qd(t,e)},tp=Qd,ep="graphics-document document";const np=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],ip="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",rp="sandbox",ap="loose",sp="http://www.w3.org/1999/xlink",op="http://www.w3.org/1999/xhtml",cp=["foreignobject"],lp=["dominant-baseline"];const hp=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"})),e},up=function(t){let e=t;return e=e.replace(/\ufb02\xb0\xb0/g,""),e=e.replace(/\ufb02\xb0/g,"&"),e=e.replace(/\xb6\xdf/g,";"),e},dp=(t,e,n=[])=>`\n.${t} ${e} { ${n.join(" !important; ")} !important; }`,pp=(t,e,n,i)=>{const r=((t,e,n={})=>{var i;let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!(0,At.Z)(n)&&np.includes(e)){const e=t.htmlLabels||(null==(i=t.flowchart)?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const t in n){const i=n[t];(0,At.Z)(i.styles)||e.forEach((t=>{r+=dp(i.id,t,i.styles)})),(0,At.Z)(i.textStyles)||(r+=dp(i.id,"tspan",i.textStyles))}}return r})(t,e,n);return M(it(`${i}{${Oi(e,r,t.themeVariables)}}`),I)},fp=(t="",e,n)=>{let i=t;return n||e||(i=i.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),i=up(i),i=i.replace(/
/g,"
"),i},gp=(t="",e)=>`