blog/assets/js/8954.296edd99.js
2023-09-07 17:53:23 +00:00

2 lines
No EOL
865 KiB
JavaScript

/*! For license information please see 8954.296edd99.js.LICENSE.txt */
(self.webpackChunkfi=self.webpackChunkfi||[]).push([[8954],{7967:(t,e)=>{"use strict";e.Nm=e.Rq=void 0;var n=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,r=/&(newline|tab);/gi,a=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|&colon;)/gim,o=[".","/"];e.Rq="about:blank",e.Nm=function(t){if(!t)return e.Rq;var c,l=(c=t,c.replace(a,"").replace(i,(function(t,e){return String.fromCharCode(e)}))).replace(r,"").replace(a,"").trim();if(!l)return e.Rq;if(function(t){return o.indexOf(t[0])>-1}(l))return l;var h=l.match(s);if(!h)return l;var u=h[0];return n.test(u)?e.Rq:l}},3905:(t,e,n)=>{"use strict";n.d(e,{Zo:()=>h,kt:()=>f});var i=n(7294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var c=i.createContext({}),l=function(t){var e=i.useContext(c),n=e;return t&&(n="function"==typeof t?t(e):s(s({},e),t)),n},h=function(t){var e=l(t.components);return i.createElement(c.Provider,{value:e},t.children)},u="mdxType",d={inlineCode:"code",wrapper:function(t){var e=t.children;return i.createElement(i.Fragment,{},e)}},p=i.forwardRef((function(t,e){var n=t.components,r=t.mdxType,a=t.originalType,c=t.parentName,h=o(t,["components","mdxType","originalType","parentName"]),u=l(n),p=r,f=u["".concat(c,".").concat(p)]||u[p]||d[p]||a;return n?i.createElement(f,s(s({ref:e},h),{},{components:n})):i.createElement(f,s({ref:e},h))}));function f(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var a=n.length,s=new Array(a);s[0]=p;var o={};for(var c in e)hasOwnProperty.call(e,c)&&(o[c]=e[c]);o.originalType=t,o[u]="string"==typeof t?t:r,s[1]=o;for(var l=2;l<a;l++)s[l]=n[l];return i.createElement.apply(null,s)}return i.createElement.apply(null,n)}p.displayName="MDXCreateElement"},4881:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(7294),r=n(5999),a=n(5281),s=n(7462),o=n(6010);const c={iconEdit:"iconEdit_Z9Sw"};function l(t){let{className:e,...n}=t;return i.createElement("svg",(0,s.Z)({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,o.Z)(c.iconEdit,e),"aria-hidden":"true"},n),i.createElement("g",null,i.createElement("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})))}function h(t){let{editUrl:e}=t;return i.createElement("a",{href:e,target:"_blank",rel:"noreferrer noopener",className:a.k.common.editThisPage},i.createElement(l,null),i.createElement(r.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page"},"Edit this page"))}},7955:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(7462),r=n(7294),a=n(6010),s=n(5999),o=n(6668),c=n(9960);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};function h(t){let{as:e,id:n,...h}=t;const{navbar:{hideOnScroll:u}}=(0,o.L)();if("h1"===e||!n)return r.createElement(e,(0,i.Z)({},h,{id:void 0}));const d=(0,s.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof h.children?h.children:n});return r.createElement(e,(0,i.Z)({},h,{className:(0,a.Z)("anchor",u?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,h.className),id:n}),h.children,r.createElement(c.Z,{className:"hash-link",to:`#${n}`,"aria-label":d,title:d},"\u200b"))}},1098:(t,e,n)=>{"use strict";n.d(e,{Z:()=>kt});var i=n(7294),r=n(3905),a=n(7462),s=n(5742);var o=n(2389),c=n(6010),l=n(2949),h=n(6668);function u(){const{prism:t}=(0,h.L)(),{colorMode:e}=(0,l.I)(),n=t.theme,i=t.darkTheme||n;return"dark"===e?i:n}var d=n(5281),p=n(7594),f=n.n(p);const g=/title=(?<quote>["'])(?<title>.*?)\1/,y=/\{(?<range>[\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<o.length;){const t=o[p].match(s);if(!t){p+=1;continue}const e=t.slice(1).find((t=>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<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},B.apply(this,arguments)}var N=/\r\n|\r|\n/,D=function(t){0===t.length?t.push({types:["plain"],content:"\n",empty:!0}):1===t.length&&""===t[0].content&&(t[0].content="\n",t[0].empty=!0)},O=function(t,e){var n=t.length;return n>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]++)<r[s];){var l=void 0,h=e[s],u=n[s][a];if("string"==typeof u?(h=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<p;f++)D(o),c.push(o=[]),o.push({types:h,content:d[f]})}else s++,e.push(h),n.push(l),i.push(0),r.push(l.length)}s--,e.pop(),n.pop(),i.pop(),r.pop()}return D(o),c}(void 0!==s?this.tokenize(e,i,s,n):[i]),className:"prism-code language-"+n,style:void 0!==a?a.root:{},getLineProps:this.getLineProps,getTokenProps:this.getTokenProps})},e}(i.Component);const F=I,$={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function R(t){let{line:e,classNames:n,showLineNumbers:r,getLineProps:s,getTokenProps:o}=t;1===e.length&&"\n"===e[0].content&&(e[0].content="");const l=s({line:e,className:(0,c.Z)(n,r&&$.codeLine)}),h=e.map(((t,e)=>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 Q={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function K(t){return!!t&&("SUMMARY"===t.tagName||K(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)(Q.details,s&&Q.isBrowser,r.className),onMouseDown:t=>{K(t.target)&&t.detail>1&&t.preventDefault()},onClick:t=>{t.stopPropagation();const e=t.target;K(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:Q.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(7955);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(6432);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)}},2244:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(7294),r=n(6010),a=n(9960);function s(t){const{permalink:e,title:n,subLabel:s,isNext:o}=t;return i.createElement(a.Z,{className:(0,r.Z)("pagination-nav__link",o?"pagination-nav__link--next":"pagination-nav__link--prev"),to:e},s&&i.createElement("div",{className:"pagination-nav__sublabel"},s),i.createElement("div",{className:"pagination-nav__label"},n))}},3008:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(7294),r=n(6010),a=n(9960);const s={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function o(t){let{permalink:e,label:n,count:o}=t;return i.createElement(a.Z,{href:e,className:(0,r.Z)(s.tag,o?s.tagWithCount:s.tagRegular)},n,o&&i.createElement("span",null,o))}},1526:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(7294),r=n(6010),a=n(5999),s=n(3008);const o={tags:"tags_jXut",tag:"tag_QGVx"};function c(t){let{tags:e}=t;return i.createElement(i.Fragment,null,i.createElement("b",null,i.createElement(a.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),i.createElement("ul",{className:(0,r.Z)(o.tags,"padding--none","margin-left--sm")},e.map((t=>{let{label:e,permalink:n}=t;return i.createElement("li",{key:n,className:o.tag},i.createElement(s.Z,{label:e,permalink:n}))}))))}},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()<n.date())return-t(n,e);var i=12*(n.year()-e.year())+(n.month()-e.month()),r=e.clone().add(i,l),a=n-r<0,s=e.clone().add(i+(a?-1:1),l);return+(-(i+(n-r)/(a?r-s:s-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:u,w:c,d:o,D:d,h:s,m:a,s:r,ms:i,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},_="en",x={};x[_]=y;var v=function(t){return t instanceof T},k=function t(e,n,i){var r;if(!e)return _;if("string"==typeof e){var a=e.toLowerCase();x[a]&&(r=a),n&&(x[a]=n,r=a);var s=e.split("-");if(!r&&s.length>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)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return C.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,i=!!C.u(e)||e,h=C.p(t),p=function(t,e){var r=C.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return i?r:r.endOf(o)},f=function(t,e){return C.w(n.toDate()[t].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},g=this.$W,y=this.$M,m=this.$D,b="set"+(this.$u?"UTC":"");switch(h){case u:return i?p(1,0):p(31,11);case l:return i?p(1,y):p(0,y+1);case c:var _=this.$locale().weekStart||0,x=(g<_?g+7:g)-_;return p(i?m-x:m+(6-x),y);case o:case d:return f(b+"Hours",0);case s:return f(b+"Minutes",1);case a:return f(b+"Seconds",2);case r:return f(b+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,c=C.p(t),h="set"+(this.$u?"UTC":""),p=(n={},n[o]=h+"Date",n[d]=h+"Date",n[l]=h+"Month",n[u]=h+"FullYear",n[s]=h+"Hours",n[a]=h+"Minutes",n[r]=h+"Seconds",n[i]=h+"Milliseconds",n)[c],f=c===o?this.$D+(e-this.$W):e;if(c===l||c===u){var g=this.clone().set(d,1);g.$d[p](f),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[C.p(t)]()},m.add=function(i,h){var d,p=this;i=Number(i);var f=C.p(h),g=function(t){var e=w(p);return C.w(e.date(e.date()+Math.round(t*i)),p)};if(f===l)return this.set(l,this.$M+i);if(f===u)return this.set(u,this.$y+i);if(f===o)return g(1);if(f===c)return g(7);var y=(d={},d[a]=e,d[s]=n,d[r]=t,d)[f]||1,m=this.$d.getTime()+i*y;return C.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",r=C.z(this),a=this.$H,s=this.$m,o=this.$M,c=n.weekdays,l=n.months,h=n.meridiem,u=function(t,n,r,a){return t&&(t[n]||t(e,i))||r[n].slice(0,a)},d=function(t){return C.s(a%12||12,t,"0")},f=h||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(g,(function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return C.s(e.$y,4,"0");case"M":return o+1;case"MM":return C.s(o+1,2,"0");case"MMM":return u(n.monthsShort,o,l,3);case"MMMM":return u(l,o);case"D":return e.$D;case"DD":return C.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(n.weekdaysMin,e.$W,c,2);case"ddd":return u(n.weekdaysShort,e.$W,c,3);case"dddd":return c[e.$W];case"H":return String(a);case"HH":return C.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return f(a,s,!0);case"A":return f(a,s,!1);case"m":return String(s);case"mm":return C.s(s,2,"0");case"s":return String(e.$s);case"ss":return C.s(e.$s,2,"0");case"SSS":return C.s(e.$ms,3,"0");case"Z":return r}return null}(t)||r.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,d,p){var f,g=this,y=C.p(d),m=w(i),b=(m.utcOffset()-this.utcOffset())*e,_=this-m,x=function(){return C.m(g,m)};switch(y){case u:f=x()/12;break;case l:f=x();break;case h:f=x()/3;break;case c:f=(_-b)/6048e5;break;case o:f=(_-b)/864e5;break;case s:f=_/n;break;case a:f=_/e;break;case r:f=_/t;break;default:f=_}return p?f:C.a(f)},m.daysInMonth=function(){return this.endOf(l).$D},m.$locale=function(){return x[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=k(t,e,!0);return i&&(n.$L=i),n},m.clone=function(){return C.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),E=T.prototype;return w.prototype=E,[["$ms",i],["$s",r],["$m",a],["$H",s],["$W",o],["$M",l],["$y",u],["$D",d]].forEach((function(t){E[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,T,w),t.$i=!0),w},w.locale=k,w.isDayjs=v,w.unix=function(t){return w(1e3*t)},w.en=x[_],w.Ls=x,w.p={},w}()},8734:function(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var r=this.$utils(),a=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return r.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return r.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return r.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return i.bind(this)(a)}}}()},285:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,i=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},s=function(t){return(t=+t)+(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<o;c+=1){var l=s[c],h=u[l],d=h&&h[0],p=h&&h[1];s[c]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,i=0;n<o;n+=1){var r=s[n];if("string"==typeof r)i+=r.length;else{var a=r.regex,c=r.parser,l=t.slice(i),h=a.exec(l)[0];c.call(e,h),t=t.replace(h,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var i=e.prototype,r=i.parse;i.parse=function(t){var e=t.date,i=t.utc,s=t.args;this.$u=i;var o=s[1];if("string"==typeof o){var c=!0===s[2],l=!0===s[3],h=c||l,u=s[2];l&&(u=s[2]),a=this.$locale(),!c&&u&&(a=n.Ls[u]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-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<e;n++)i[n]=t[n];return i}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var h=Object.hasOwnProperty,u=Object.setPrototypeOf,d=Object.isFrozen,p=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,g=Object.freeze,y=Object.seal,m=Object.create,b="undefined"!=typeof Reflect&&Reflect,_=b.apply,x=b.construct;_||(_=function(t,e,n){return t.apply(e,n)}),g||(g=function(t){return t}),y||(y=function(t){return t}),x||(x=function(t,e){return i(t,r(e))});var v=D(Array.prototype.forEach),k=D(Array.prototype.pop),w=D(Array.prototype.push),C=D(String.prototype.toLowerCase),T=D(String.prototype.toString),E=D(String.prototype.match),S=D(String.prototype.replace),A=D(String.prototype.indexOf),L=D(String.prototype.trim),B=D(RegExp.prototype.test),N=O(TypeError);function D(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return _(t,e,i)}}function O(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return x(t,n)}}function M(t,e,n){n=n||C,u&&u(t,null);for(var i=e.length;i--;){var r=e[i];if("string"==typeof r){var a=n(r);a!==r&&(d(e)||(e[i]=a),r=a)}t[r]=!0}return t}function I(t){var e,n=m(null);for(e in t)!0===_(h,t,[e])&&(n[e]=t[e]);return n}function F(t,e){for(;null!==t;){var n=f(t,e);if(n){if(n.get)return D(n.get);if("function"==typeof n.value)return D(n.value)}t=p(t)}function i(t){return console.warn("fallback value for",t),null}return i}var $=g(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=g(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Z=g(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=g(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),j=g(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Y=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),z=g(["#text"]),U=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),W=g(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),q=g(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=y(/<%[\w\W]*|[\w\W]*%>/gm),X=y(/\${[\w\W]*}/gm),Q=y(/^data-[\-\w.\u00B7-\uFFFF]/),K=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&&lt&&void 0!==lt.createHTMLDocument&&9!==ft;var yt,mt,bt=V,_t=G,xt=X,vt=Q,kt=K,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"]),Qt=null,Kt=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,Qt="ADD_DATA_URI_TAGS"in e?M(I(Kt),e.ADD_DATA_URI_TAGS,mt):Kt,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="<remove></remove>"+t;else{var i=E(t,/^[\r\n\t ]+/);n=i&&i[0]}"application/xhtml+xml"===yt&&re===ie&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");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(/<template/i,t.innerHTML))return xe(t),!0;if(!Et[i]||Nt[i]){if(!Nt[i]&&Le(i)){if(Bt.tagNameCheck instanceof RegExp&&B(Bt.tagNameCheck,i))return!1;if(Bt.tagNameCheck instanceof Function&&Bt.tagNameCheck(i))return!1}if(qt&&!Gt[i]){var r=D(t)||t.parentNode,a=x(t)||t.childNodes;if(a&&r)for(var s=a.length-1;s>=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:")||!Qt[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="<!DOCTYPE "+a.ownerDocument.doctype.name+">\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()}()},6432:(t,e,n)=>{"use strict";n.d(e,{a:()=>Un,b:()=>qs,c:()=>jt,d:()=>Yn,e:()=>Zt,f:()=>Ks,g:()=>gi,h:()=>Sc,i:()=>xs,j:()=>Xi,k:()=>Ki,l:()=>Bt,m:()=>Yi,n:()=>It,o:()=>Np,p:()=>Ao,s:()=>wi});const i=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var r=i.reduce((function(t,e){var n=e.match(/\n([\t ]+|(?!\s).)/g);return n?t.concat(n.map((function(t){var e,n;return null!==(n=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==n?n:0}))):t}),[]);if(r.length){var a=new RegExp("\n[\t ]{"+Math.min.apply(Math,r)+"}","g");i=i.map((function(t){return t.replace(a,"\n")}))}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return e.forEach((function(t,e){var n=s.match(/(?:^|\n)( *)$/),r=n?n[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map((function(t,e){return 0===e?t:""+r+t})).join("\n")),s+=a+i[e+1]})),s};var r=n(7484),a=n.n(r),s=n(7967),o=n(9373),l=n(7856),h=n.n(l),u=n(1610),d=n(1691);const p=(t,e)=>{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<t.length;i++)n+=e(t[i],i,t,e)||"";return n}function I(t,e,n,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case C:return t.return=t.return||t.value;case k:return"";case"@keyframes":return t.return=t.value+"{"+M(t.children,i)+"}";case w:if(!D(t.value=t.props.join(",")))return""}return D(n=M(t.children,i))?t.return=t.value+"{"+n+"}":""}var F=1,$=1,R=0,Z=0,P=0,j="";function Y(t,e,n,i,r,a,s,o){return{value:t,root:e,parent:n,type:i,props:r,children:a,line:F,column:$,length:s,return:"",siblings:o}}function z(){return P=Z>0?B(j,--Z):0,$--,10===P&&($=1,F--),P}function U(){return P=Z<R?B(j,Z++):0,$++,10===P&&($=1,F++),P}function W(){return B(j,Z)}function q(){return Z}function H(t,e){return N(j,t,e)}function V(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function G(t){return F=$=1,R=D(j=t),Z=0,[]}function X(t){return j="",t}function Q(t){return S(H(Z-1,tt(91===t?t+2:40===t?t+1:t)))}function K(t){for(;(P=W())&&P<33;)U();return V(t)>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(Q(b),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:w+=Q(b);break;case 9:case 10:case 13:case 32:w+=K(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+=Q(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;g<i;++g)for(var b=0,_=N(t,d+1,d=T(y=s[g])),x=t;b<f;++b)(x=S(y>0?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<<e|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<e.length;++n)t.push(e.charCodeAt(n))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const i=t.length/4+2,r=Math.ceil(i/16),a=new Array(r);for(let s=0;s<r;++s){const e=new Uint32Array(16);for(let n=0;n<16;++n)e[n]=t[64*s+4*n]<<24|t[64*s+4*n+1]<<16|t[64*s+4*n+2]<<8|t[64*s+4*n+3];a[s]=e}a[r-1][14]=8*(t.length-1)/Math.pow(2,32),a[r-1][14]=Math.floor(a[r-1][14]),a[r-1][15]=8*(t.length-1)&4294967295;for(let s=0;s<r;++s){const t=new Uint32Array(80);for(let e=0;e<16;++e)t[e]=a[s][e];for(let e=16;e<80;++e)t[e]=mt(t[e-3]^t[e-8]^t[e-14]^t[e-16],1);let i=n[0],r=n[1],o=n[2],c=n[3],l=n[4];for(let n=0;n<80;++n){const a=Math.floor(n/20),s=mt(i,5)+yt(a,r,o,c)+l+e[a]+t[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<t.length;++n)e.push(t.charCodeAt(n));return e}(t)),"string"==typeof i&&(i=gt(i)),16!==(null===(s=i)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let o=new Uint8Array(16+t.length);if(o.set(i),o.set(t,i.length),o=n(o),o[6]=15&o[6]|e,o[8]=63&o[8]|128,r){a=a||0;for(let t=0;t<16;++t)r[a+t]=o[t];return r}return dt(o)}try{i.name=t}catch(r){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i}("v5",80,bt),xt=_t;n(1518),n(6225);var vt=n(3349),kt=(n(3352),n(2930),n(9542)),wt=n.n(kt),Ct=n(285),Tt=n.n(Ct),Et=n(8734),St=n.n(Et),At=n(9697);const Lt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Bt={trace:(...t)=>{},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,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),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=/<br\s*\/?>/gi,$t=t=>t.replace(/#br#/g,"<br/>"),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";let Wt=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.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,_.Z)(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,_.Z)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||b(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,x.Z)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,_.Z)(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||f(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||f(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||f(this.primaryColor,{h:64}),this.fillType3=this.fillType3||f(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||f(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||f(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||f(this.primaryColor,{h:128}),this.fillType7=this.fillType7||f(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||f(this.primaryColor,{l:-10}),this.pie5=this.pie5||f(this.secondaryColor,{l:-10}),this.pie6=this.pie6||f(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||f(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||f(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||f(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||f(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||f(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||f(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,_.Z)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||f(this.primaryColor,{h:-30}),this.git4=this.git4||f(this.primaryColor,{h:-60}),this.git5=this.git5||f(this.primaryColor,{h:-90}),this.git6=this.git6||f(this.primaryColor,{h:60}),this.git7=this.git7||f(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,x.Z)(this.git0,25),this.git1=(0,x.Z)(this.git1,25),this.git2=(0,x.Z)(this.git2,25),this.git3=(0,x.Z)(this.git3,25),this.git4=(0,x.Z)(this.git4,25),this.git5=(0,x.Z)(this.git5,25),this.git6=(0,x.Z)(this.git6,25),this.git7=(0,x.Z)(this.git7,25)):(this.git0=(0,_.Z)(this.git0,25),this.git1=(0,_.Z)(this.git1,25),this.git2=(0,_.Z)(this.git2,25),this.git3=(0,_.Z)(this.git3,25),this.git4=(0,_.Z)(this.git4,25),this.git5=(0,_.Z)(this.git5,25),this.git6=(0,_.Z)(this.git6,25),this.git7=(0,_.Z)(this.git7,25)),this.gitInv0=this.gitInv0||b(this.git0),this.gitInv1=this.gitInv1||b(this.git1),this.gitInv2=this.gitInv2||b(this.git2),this.gitInv3=this.gitInv3||b(this.git3),this.gitInv4=this.gitInv4||b(this.git4),this.gitInv5=this.gitInv5||b(this.git5),this.gitInv6=this.gitInv6||b(this.git6),this.gitInv7=this.gitInv7||b(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ut}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};let qt=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.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,x.Z)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||f(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||f(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,_.Z)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,x.Z)(this.secondaryColor,20),this.git1=(0,x.Z)(this.pie2||this.secondaryColor,20),this.git2=(0,x.Z)(this.pie3||this.tertiaryColor,20),this.git3=(0,x.Z)(this.pie4||f(this.primaryColor,{h:-30}),20),this.git4=(0,x.Z)(this.pie5||f(this.primaryColor,{h:-60}),20),this.git5=(0,x.Z)(this.pie6||f(this.primaryColor,{h:-90}),10),this.git6=(0,x.Z)(this.pie7||f(this.primaryColor,{h:60}),10),this.git7=(0,x.Z)(this.pie8||f(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||b(this.git0),this.gitInv1=this.gitInv1||b(this.git1),this.gitInv2=this.gitInv2||b(this.git2),this.gitInv3=this.gitInv3||b(this.git3),this.gitInv4=this.gitInv4||b(this.git4),this.gitInv5=this.gitInv5||b(this.git5),this.gitInv6=this.gitInv6||b(this.git6),this.gitInv7=this.gitInv7||b(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,x.Z)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,x.Z)(this.background,2)}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};let Ht=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.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,_.Z)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,_.Z)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||f(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||f(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||f(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||b(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||b(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=(0,x.Z)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,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||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,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.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||f(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||f(this.primaryColor,{l:-10}),this.pie5=this.pie5||f(this.secondaryColor,{l:-30}),this.pie6=this.pie6||f(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||f(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||f(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||f(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||f(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||f(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||f(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||f(this.primaryColor,{h:-30}),this.git4=this.git4||f(this.primaryColor,{h:-60}),this.git5=this.git5||f(this.primaryColor,{h:-90}),this.git6=this.git6||f(this.primaryColor,{h:60}),this.git7=this.git7||f(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,x.Z)(this.git0,25),this.git1=(0,x.Z)(this.git1,25),this.git2=(0,x.Z)(this.git2,25),this.git3=(0,x.Z)(this.git3,25),this.git4=(0,x.Z)(this.git4,25),this.git5=(0,x.Z)(this.git5,25),this.git6=(0,x.Z)(this.git6,25),this.git7=(0,x.Z)(this.git7,25)):(this.git0=(0,_.Z)(this.git0,25),this.git1=(0,_.Z)(this.git1,25),this.git2=(0,_.Z)(this.git2,25),this.git3=(0,_.Z)(this.git3,25),this.git4=(0,_.Z)(this.git4,25),this.git5=(0,_.Z)(this.git5,25),this.git6=(0,_.Z)(this.git6,25),this.git7=(0,_.Z)(this.git7,25)),this.gitInv0=this.gitInv0||(0,_.Z)(b(this.git0),25),this.gitInv1=this.gitInv1||b(this.git1),this.gitInv2=this.gitInv2||b(this.git2),this.gitInv3=this.gitInv3||b(this.git3),this.gitInv4=this.gitInv4||b(this.git4),this.gitInv5=this.gitInv5||b(this.git5),this.gitInv6=this.gitInv6||b(this.git6),this.gitInv7=this.gitInv7||b(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||b(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||b(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ut}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};let Vt=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.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,_.Z)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,_.Z)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||f(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||f(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||f(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=(0,_.Z)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=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||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,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.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||f(this.primaryColor,{l:-30}),this.pie5=this.pie5||f(this.secondaryColor,{l:-30}),this.pie6=this.pie6||f(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||f(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||f(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||f(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||f(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||f(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||f(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||f(this.primaryColor,{h:-30}),this.git4=this.git4||f(this.primaryColor,{h:-60}),this.git5=this.git5||f(this.primaryColor,{h:-90}),this.git6=this.git6||f(this.primaryColor,{h:60}),this.git7=this.git7||f(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,x.Z)(this.git0,25),this.git1=(0,x.Z)(this.git1,25),this.git2=(0,x.Z)(this.git2,25),this.git3=(0,x.Z)(this.git3,25),this.git4=(0,x.Z)(this.git4,25),this.git5=(0,x.Z)(this.git5,25),this.git6=(0,x.Z)(this.git6,25),this.git7=(0,x.Z)(this.git7,25)):(this.git0=(0,_.Z)(this.git0,25),this.git1=(0,_.Z)(this.git1,25),this.git2=(0,_.Z)(this.git2,25),this.git3=(0,_.Z)(this.git3,25),this.git4=(0,_.Z)(this.git4,25),this.git5=(0,_.Z)(this.git5,25),this.git6=(0,_.Z)(this.git6,25),this.git7=(0,_.Z)(this.git7,25)),this.gitInv0=this.gitInv0||b(this.git0),this.gitInv1=this.gitInv1||b(this.git1),this.gitInv2=this.gitInv2||b(this.git2),this.gitInv3=this.gitInv3||b(this.git3),this.gitInv4=this.gitInv4||b(this.git4),this.gitInv5=this.gitInv5||b(this.git5),this.gitInv6=this.gitInv6||b(this.git6),this.gitInv7=this.gitInv7||b(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ut}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};class Gt{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.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,x.Z)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,_.Z)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||f(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||f(this.mainBkg,{l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=(0,x.Z)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=(0,x.Z)(this.contrast,30),this.sectionBkgColor2=(0,x.Z)(this.contrast,30),this.taskBorderColor=(0,_.Z)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,x.Z)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,_.Z)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",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||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,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});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,_.Z)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||f(this.primaryColor,{h:-30}),this.git4=this.pie5||f(this.primaryColor,{h:-60}),this.git5=this.pie6||f(this.primaryColor,{h:-90}),this.git6=this.pie7||f(this.primaryColor,{h:60}),this.git7=this.pie8||f(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||b(this.git0),this.gitInv1=this.gitInv1||b(this.git1),this.gitInv2=this.gitInv2||b(this.git2),this.gitInv3=this.gitInv3||b(this.git3),this.gitInv4=this.gitInv4||b(this.git4),this.gitInv5=this.gitInv5||b(this.git5),this.gitInv6=this.gitInv6||b(this.git6),this.gitInv7=this.gitInv7||b(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ut}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}const Xt={base:{getThemeVariables:t=>{const e=new Wt;return e.calculate(t),e}},dark:{getThemeVariables:t=>{const e=new qt;return e.calculate(t),e}},default:{getThemeVariables:t=>{const e=new Ht;return e.calculate(t),e}},forest:{getThemeVariables:t=>{const e=new Vt;return e.calculate(t),e}},neutral:{getThemeVariables:t=>{const e=new Gt;return e.calculate(t),e}}},Qt={theme:"default",themeVariables:Xt.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};Qt.class&&(Qt.class.arrowMarkerAbsolute=Qt.arrowMarkerAbsolute),Qt.gitGraph&&(Qt.gitGraph.arrowMarkerAbsolute=Qt.arrowMarkerAbsolute);const Kt=(t,e="")=>Object.keys(t).reduce(((n,i)=>Array.isArray(t[i])?n:"object"==typeof t[i]&&null!==t[i]?[...n,e+i,...Kt(t[i],"")]:[...n,e+i]),[]),Jt=Kt(Qt,""),te=Qt;function ee(t){return null==t}var ne={isNothing:ee,isObject:function(t){return"object"==typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:ee(t)?[]:[t]},repeat:function(t,e){var n,i="";for(n=0;n<e;n+=1)i+=t;return i},isNegativeZero:function(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},extend:function(t,e){var n,i,r,a;if(e)for(n=0,i=(a=Object.keys(e)).length;n<i;n+=1)t[r=a[n]]=e[r];return t}};function ie(t,e){var n="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(n+="\n\n"+t.mark.snippet),i+" "+n):i}function re(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=ie(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}re.prototype=Object.create(Error.prototype),re.prototype.constructor=re,re.prototype.toString=function(t){return this.name+": "+ie(this,t)};var ae=re;function se(t,e,n,i,r){var a="",s="",o=Math.floor(r/2)-1;return i-e>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 oe(t,e){return ne.repeat(" ",e-t.length)+t}var ce=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=se(t.buffer,r[s-o],a[s-o],t.position-(r[s]-r[s-o]),u),l=ne.repeat(" ",e.indent)+oe((t.line-o+1).toString(),h)+" | "+c.str+"\n"+l;for(c=se(t.buffer,r[s],a[s],t.position,u),l+=ne.repeat(" ",e.indent)+oe((t.line+1).toString(),h)+" | "+c.str+"\n",l+=ne.repeat("-",e.indent+h+3+c.pos)+"^\n",o=1;o<=e.linesAfter&&!(s+o>=a.length);o++)c=se(t.buffer,r[s+o],a[s+o],t.position-(r[s]-r[s+o]),u),l+=ne.repeat(" ",e.indent)+oe((t.line+o+1).toString(),h)+" | "+c.str+"\n";return l.replace(/\n$/,"")},le=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],he=["scalar","sequence","mapping"];var ue=function(t,e){var n,i;if(e=e||{},Object.keys(e).forEach((function(e){if(-1===le.indexOf(e))throw new ae('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===he.indexOf(this.kind))throw new ae('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function de(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 pe(t){return this.extend(t)}pe.prototype.extend=function(t){var e=[],n=[];if(t instanceof ue)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 ae("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 ue))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new ae("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 ae("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 ue))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(pe.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=de(i,"implicit"),i.compiledExplicit=de(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<e;t+=1)arguments[t].forEach(i);return n}(i.compiledImplicit,i.compiledExplicit),i};var fe=new pe({explicit:[new ue("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}}),new ue("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}}),new ue("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})]});var ge=new ue("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var ye=new ue("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)},construct:function(t){return"true"===t||"True"===t||"TRUE"===t},predicate:function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function me(t){return 48<=t&&t<=55}function be(t){return 48<=t&&t<=57}var _e=new ue("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,i=t.length,r=0,a=!1;if(!i)return!1;if("-"!==(e=t[r])&&"+"!==e||(e=t[++r]),"0"===e){if(r+1===i)return!0;if("b"===(e=t[++r])){for(r++;r<i;r++)if("_"!==(e=t[r])){if("0"!==e&&"1"!==e)return!1;a=!0}return a&&"_"!==e}if("x"===e){for(r++;r<i;r++)if("_"!==(e=t[r])){if(!(48<=(n=t.charCodeAt(r))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;a=!0}return a&&"_"!==e}if("o"===e){for(r++;r<i;r++)if("_"!==(e=t[r])){if(!me(t.charCodeAt(r)))return!1;a=!0}return a&&"_"!==e}}if("_"===e)return!1;for(;r<i;r++)if("_"!==(e=t[r])){if(!be(t.charCodeAt(r)))return!1;a=!0}return!(!a||"_"===e)},construct:function(t){var e,n=t,i=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(e=n[0])&&"+"!==e||("-"===e&&(i=-1),e=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===e){if("b"===n[1])return i*parseInt(n.slice(2),2);if("x"===n[1])return i*parseInt(n.slice(2),16);if("o"===n[1])return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!ne.isNegativeZero(t)},represent:{binary:function(t){return 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"]}}),xe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var ve=/^[-+]?[0-9]+e/;var ke=new ue("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!xe.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||ne.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(ne.isNegativeZero(t))return"-0.0";return n=t.toString(10),ve.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),we=fe.extend({implicit:[ge,ye,_e,ke]}),Ce=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Te=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 Ee=new ue("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==Ce.exec(t)||null!==Te.exec(t))},construct:function(t){var e,n,i,r,a,s,o,c,l=0,h=null;if(null===(e=Ce.exec(t))&&(e=Te.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 Se=new ue("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Le=new ue("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,i=0,r=t.length,a=Ae;for(n=0;n<r;n++)if(!((e=a.indexOf(t.charAt(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=Ae,s=0,o=[];for(e=0;e<r;e++)e%4==0&&e&&(o.push(s>>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=Ae;for(e=0;e<a;e++)e%3==0&&e&&(i+=s[r>>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}}),Be=Object.prototype.hasOwnProperty,Ne=Object.prototype.toString;var De=new ue("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<n;e+=1){if(i=o[e],a=!1,"[object Object]"!==Ne.call(i))return!1;for(r in i)if(Be.call(i,r)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==s.indexOf(r))return!1;s.push(r)}return!0},construct:function(t){return null!==t?t:[]}}),Oe=Object.prototype.toString;var Me=new ue("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,n,i,r,a,s=t;for(a=new Array(s.length),e=0,n=s.length;e<n;e+=1){if(i=s[e],"[object Object]"!==Oe.call(i))return!1;if(1!==(r=Object.keys(i)).length)return!1;a[e]=[r[0],i[r[0]]]}return!0},construct:function(t){if(null===t)return[];var e,n,i,r,a,s=t;for(a=new Array(s.length),e=0,n=s.length;e<n;e+=1)i=s[e],r=Object.keys(i),a[e]=[r[0],i[r[0]]];return a}}),Ie=Object.prototype.hasOwnProperty;var Fe=new ue("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(null===t)return!0;var e,n=t;for(e in n)if(Ie.call(n,e)&&null!==n[e])return!1;return!0},construct:function(t){return null!==t?t:{}}}),$e=we.extend({implicit:[Ee,Se],explicit:[Le,De,Me,Fe]}),Re=Object.prototype.hasOwnProperty,Ze=1,Pe=2,je=3,Ye=4,ze=1,Ue=2,We=3,qe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,He=/[\x85\u2028\u2029]/,Ve=/[,\[\]\{\}]/,Ge=/^(?:!|!!|![a-z\-]+!)$/i,Xe=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Qe(t){return Object.prototype.toString.call(t)}function Ke(t){return 10===t||13===t}function Je(t){return 9===t||32===t}function tn(t){return 9===t||32===t||10===t||13===t}function en(t){return 44===t||91===t||93===t||123===t||125===t}function nn(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function rn(t){return 48===t?"\0":97===t?"\x07":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"\x1b":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"\x85":95===t?"\xa0":76===t?"\u2028":80===t?"\u2029":""}function an(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}for(var sn=new Array(256),on=new Array(256),cn=0;cn<256;cn++)sn[cn]=rn(cn)?1:0,on[cn]=rn(cn);function ln(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||$e,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 hn(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=ce(n),new ae(e,n)}function un(t,e){throw hn(t,e)}function dn(t,e){t.onWarning&&t.onWarning.call(null,hn(t,e))}var pn={YAML:function(t,e,n){var i,r,a;null!==t.version&&un(t,"duplication of %YAML directive"),1!==n.length&&un(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&un(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),a=parseInt(i[2],10),1!==r&&un(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&dn(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&un(t,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],Ge.test(i)||un(t,"ill-formed tag handle (first argument) of the TAG directive"),Re.call(t.tagMap,i)&&un(t,'there is a previously declared suffix for "'+i+'" tag handle'),Xe.test(r)||un(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(a){un(t,"tag prefix is malformed: "+r)}t.tagMap[i]=r}};function fn(t,e,n,i){var r,a,s,o;if(e<n){if(o=t.input.slice(e,n),i)for(r=0,a=o.length;r<a;r+=1)9===(s=o.charCodeAt(r))||32<=s&&s<=1114111||un(t,"expected valid JSON character");else qe.test(o)&&un(t,"the stream contains non-printable characters");t.result+=o}}function gn(t,e,n,i){var r,a,s,o;for(ne.isObject(n)||un(t,"cannot merge mappings; the provided source object is unacceptable"),s=0,o=(r=Object.keys(n)).length;s<o;s+=1)a=r[s],Re.call(e,a)||(e[a]=n[a],i[a]=!0)}function yn(t,e,n,i,r,a,s,o,c){var l,h;if(Array.isArray(r))for(l=0,h=(r=Array.prototype.slice.call(r)).length;l<h;l+=1)Array.isArray(r[l])&&un(t,"nested arrays are not supported inside keys"),"object"==typeof r&&"[object Object]"===Qe(r[l])&&(r[l]="[object Object]");if("object"==typeof r&&"[object Object]"===Qe(r)&&(r="[object Object]"),r=String(r),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(l=0,h=a.length;l<h;l+=1)gn(t,e,a[l],n);else gn(t,e,a,n);else t.json||Re.call(n,r)||!Re.call(e,r)||(t.line=s||t.line,t.lineStart=o||t.lineStart,t.position=c||t.position,un(t,"duplicated mapping key")),"__proto__"===r?Object.defineProperty(e,r,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[r]=a,delete n[r];return e}function mn(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):un(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function bn(t,e,n){for(var i=0,r=t.input.charCodeAt(t.position);0!==r;){for(;Je(r);)9===r&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),r=t.input.charCodeAt(++t.position);if(e&&35===r)do{r=t.input.charCodeAt(++t.position)}while(10!==r&&13!==r&&0!==r);if(!Ke(r))break;for(mn(t),r=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===r;)t.lineIndent++,r=t.input.charCodeAt(++t.position)}return-1!==n&&0!==i&&t.lineIndent<n&&dn(t,"deficient indentation"),i}function _n(t){var e,n=t.position;return!(45!==(e=t.input.charCodeAt(n))&&46!==e||e!==t.input.charCodeAt(n+1)||e!==t.input.charCodeAt(n+2)||(n+=3,0!==(e=t.input.charCodeAt(n))&&!tn(e)))}function xn(t,e){1===e?t.result+=" ":e>1&&(t.result+=ne.repeat("\n",e-1))}function vn(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,un(t,"tab characters must not be used in indentation")),45===i)&&tn(t.input.charCodeAt(t.position+1));)if(o=!0,t.position++,bn(t,!0,-1)&&t.lineIndent<=e)s.push(null),i=t.input.charCodeAt(t.position);else if(n=t.line,Cn(t,e,je,!1,!0),s.push(t.result),bn(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==i)un(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!o&&(t.tag=r,t.anchor=a,t.kind="sequence",t.result=s,!0)}function kn(t){var e,n,i,r,a=!1,s=!1;if(33!==(r=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&un(t,"duplication of a tag property"),60===(r=t.input.charCodeAt(++t.position))?(a=!0,r=t.input.charCodeAt(++t.position)):33===r?(s=!0,n="!!",r=t.input.charCodeAt(++t.position)):n="!",e=t.position,a){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&62!==r);t.position<t.length?(i=t.input.slice(e,t.position),r=t.input.charCodeAt(++t.position)):un(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!tn(r);)33===r&&(s?un(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),Ge.test(n)||un(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),r=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),Ve.test(i)&&un(t,"tag suffix cannot contain flow indicator characters")}i&&!Xe.test(i)&&un(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(o){un(t,"tag name is malformed: "+i)}return a?t.tag=i:Re.call(t.tagMap,n)?t.tag=t.tagMap[n]+i:"!"===n?t.tag="!"+i:"!!"===n?t.tag="tag:yaml.org,2002:"+i:un(t,'undeclared tag handle "'+n+'"'),!0}function wn(t){var e,n;if(38!==(n=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&un(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!tn(n)&&!en(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&un(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Cn(t,e,n,i,r){var a,s,o,c,l,h,u,d,p,f=1,g=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=o=Ye===n||je===n,i&&bn(t,!0,-1)&&(g=!0,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)),1===f)for(;kn(t)||wn(t);)bn(t,!0,-1)?(g=!0,o=a,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)):o=!1;if(o&&(o=g||r),1!==f&&Ye!==n||(d=Ze===n||Pe===n?e:e+1,p=t.position-t.lineStart,1===f?o&&(vn(t,p)||function(t,e,n){var i,r,a,s,o,c,l,h=t.tag,u=t.anchor,d={},p=Object.create(null),f=null,g=null,y=null,m=!1,b=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=d),l=t.input.charCodeAt(t.position);0!==l;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,un(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,63!==l&&58!==l||!tn(i)){if(s=t.line,o=t.lineStart,c=t.position,!Cn(t,n,Pe,!1,!0))break;if(t.line===a){for(l=t.input.charCodeAt(t.position);Je(l);)l=t.input.charCodeAt(++t.position);if(58===l)tn(l=t.input.charCodeAt(++t.position))||un(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(yn(t,d,p,f,g,null,s,o,c),f=g=y=null),b=!0,m=!1,r=!1,f=t.tag,g=t.result;else{if(!b)return t.tag=h,t.anchor=u,!0;un(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return t.tag=h,t.anchor=u,!0;un(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===l?(m&&(yn(t,d,p,f,g,null,s,o,c),f=g=y=null),b=!0,m=!0,r=!0):m?(m=!1,r=!0):un(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,l=i;if((t.line===a||t.lineIndent>e)&&(m&&(s=t.line,o=t.lineStart,c=t.position),Cn(t,e,Ye,!0,r)&&(m?g=t.result:y=t.result),m||(yn(t,d,p,f,g,y,s,o,c),f=g=y=null),bn(t,!0,-1),l=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==l)un(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&yn(t,d,p,f,g,null,s,o,c),b&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),b}(t,p,d))||function(t,e){var n,i,r,a,s,o,c,l,h,u,d,p,f=!0,g=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))s=93,l=!1,a=[];else{if(123!==p)return!1;s=125,l=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(bn(t,!0,e),(p=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=g,t.anchor=y,t.kind=l?"mapping":"sequence",t.result=a,!0;f?44===p&&un(t,"expected the node content, but found ','"):un(t,"missed comma between flow collection entries"),d=null,o=c=!1,63===p&&tn(t.input.charCodeAt(t.position+1))&&(o=c=!0,t.position++,bn(t,!0,e)),n=t.line,i=t.lineStart,r=t.position,Cn(t,e,Ze,!1,!0),u=t.tag,h=t.result,bn(t,!0,e),p=t.input.charCodeAt(t.position),!c&&t.line!==n||58!==p||(o=!0,p=t.input.charCodeAt(++t.position),bn(t,!0,e),Cn(t,e,Ze,!1,!0),d=t.result),l?yn(t,a,m,u,h,d,n,i,r):o?a.push(yn(t,null,m,u,h,d,n,i,r)):a.push(h),bn(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}un(t,"unexpected end of the stream within a flow collection")}(t,d)?y=!0:(s&&function(t,e){var n,i,r,a,s,o=ze,c=!1,l=!1,h=e,u=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))i=!1;else{if(62!==a)return!1;i=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)ze===o?o=43===a?We:Ue:un(t,"repeat of a chomping mode identifier");else{if(!((r=48<=(s=a)&&s<=57?s-48:-1)>=0))break;0===r?un(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?un(t,"repeat of an indentation width identifier"):(h=e+r-1,l=!0)}if(Je(a)){do{a=t.input.charCodeAt(++t.position)}while(Je(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Ke(a)&&0!==a)}for(;0!==a;){for(mn(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),Ke(a))u++;else{if(t.lineIndent<h){o===We?t.result+=ne.repeat("\n",c?1+u:u):o===ze&&c&&(t.result+="\n");break}for(i?Je(a)?(d=!0,t.result+=ne.repeat("\n",c?1+u:u)):d?(d=!1,t.result+=ne.repeat("\n",u+1)):0===u?c&&(t.result+=" "):t.result+=ne.repeat("\n",u):t.result+=ne.repeat("\n",c?1+u:u),c=!0,l=!0,u=0,n=t.position;!Ke(a)&&0!==a;)a=t.input.charCodeAt(++t.position);fn(t,n,t.position,!1)}}return!0}(t,d)||function(t,e){var n,i,r;if(39!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=r=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(fn(t,i,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,r=t.position}else Ke(n)?(fn(t,i,r,!0),xn(t,bn(t,!1,e)),i=r=t.position):t.position===t.lineStart&&_n(t)?un(t,"unexpected end of the document within a single quoted scalar"):(t.position++,r=t.position);un(t,"unexpected end of the stream within a single quoted scalar")}(t,d)||function(t,e){var n,i,r,a,s,o,c;if(34!==(o=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return fn(t,n,t.position,!0),t.position++,!0;if(92===o){if(fn(t,n,t.position,!0),Ke(o=t.input.charCodeAt(++t.position)))bn(t,!1,e);else if(o<256&&sn[o])t.result+=on[o],t.position++;else if((s=120===(c=o)?2:117===c?4:85===c?8:0)>0){for(r=s,a=0;r>0;r--)(s=nn(o=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:un(t,"expected hexadecimal character");t.result+=an(a),t.position++}else un(t,"unknown escape sequence");n=i=t.position}else Ke(o)?(fn(t,n,i,!0),xn(t,bn(t,!1,e)),n=i=t.position):t.position===t.lineStart&&_n(t)?un(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}un(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&&!tn(i)&&!en(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&un(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),Re.call(t.anchorMap,n)||un(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],bn(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(tn(h=t.input.charCodeAt(t.position))||en(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)&&(tn(i=t.input.charCodeAt(t.position+1))||n&&en(i)))return!1;for(t.kind="scalar",t.result="",r=a=t.position,s=!1;0!==h;){if(58===h){if(tn(i=t.input.charCodeAt(t.position+1))||n&&en(i))break}else if(35===h){if(tn(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&_n(t)||n&&en(h))break;if(Ke(h)){if(o=t.line,c=t.lineStart,l=t.lineIndent,bn(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&&(fn(t,r,a,!1),xn(t,t.line-o),r=a=t.position,s=!1),Je(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return fn(t,r,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}(t,d,Ze===n)&&(y=!0,null===t.tag&&(t.tag="?")):(y=!0,null===t.tag&&null===t.anchor||un(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===f&&(y=o&&vn(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&&un(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),c=0,l=t.implicitTypes.length;c<l;c+=1)if((u=t.implicitTypes[c]).resolve(t.result)){t.result=u.construct(t.result),t.tag=u.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(Re.call(t.typeMap[t.kind||"fallback"],t.tag))u=t.typeMap[t.kind||"fallback"][t.tag];else for(u=null,c=0,l=(h=t.typeMap.multi[t.kind||"fallback"]).length;c<l;c+=1)if(t.tag.slice(0,h[c].tag.length)===h[c].tag){u=h[c];break}u||un(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&un(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)):un(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 Tn(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))&&(bn(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&&!tn(r);)r=t.input.charCodeAt(++t.position);for(i=[],(n=t.input.slice(e,t.position)).length<1&&un(t,"directive name must not be less than one character in length");0!==r;){for(;Je(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!Ke(r));break}if(Ke(r))break;for(e=t.position;0!==r&&!tn(r);)r=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==r&&mn(t),Re.call(pn,n)?pn[n](t,n,i):dn(t,'unknown document directive "'+n+'"')}bn(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,bn(t,!0,-1)):s&&un(t,"directives end mark is expected"),Cn(t,t.lineIndent-1,Ye,!1,!0),bn(t,!0,-1),t.checkLineBreaks&&He.test(t.input.slice(a,t.position))&&dn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&_n(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,bn(t,!0,-1)):t.position<t.length-1&&un(t,"end of the stream or a document separator is expected")}function En(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var n=new ln(t,e),i=t.indexOf("\0");for(-1!==i&&(n.position=i,un(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Tn(n);return n.documents}var Sn=fe,An={loadAll:function(t,e,n){null!==e&&"object"==typeof e&&void 0===n&&(n=e,e=null);var i=En(t,n);if("function"!=typeof e)return i;for(var r=0,a=i.length;r<a;r+=1)e(i[r])},load:function(t,e){var n=En(t,e);if(0!==n.length){if(1===n.length)return n[0];throw new ae("expected a single document in the stream, but found more")}}}.load;const Ln=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;const Bn=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Nn=/\s*%%.*\n/gm,Dn={},On=function(t,e){t=t.replace(Ln,"").replace(Bn,"").replace(Nn,"\n");for(const[n,{detector:i}]of Object.entries(Dn)){if(i(t,e))return n}throw new Error(`No diagram type detected for text: ${t}`)},Mn=(...t)=>{for(const{id:e,detector:n,loader:i}of t)In(e,n,i)},In=(t,e,n)=>{Dn[t]?Bt.error(`Detector with key ${t} already exists`):Dn[t]={detector:e,loader:n},Bt.debug(`Detector with key ${t} added${n?" with loader":""}`)},Fn=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=>Fn(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]=Fn(t[n],e[n],{depth:i-1,clobber:r}))})),t)},$n=Fn,Rn={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},Zn=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Pn=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,jn=function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${Pn.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=Zn.exec(t));)if(i.index===Zn.lastIndex&&Zn.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 Yn(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Rn[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 Un(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 Wn=0;const qn=()=>(Wn++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Wn);const Hn=t=>function(t){let e="";const n="0123456789abcdef";for(let i=0;i<t;i++)e+=n.charAt(Math.floor(16*Math.random()));return e}(t.length),Vn=function(t,e){const n=e.text.replace(jt.lineBreakRegex," "),[,i]=ri(e.fontSize),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",i),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);const a=r.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(n),r},Gn=(0,v.Z)(((t,e,n)=>{if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),jt.lineBreakRegex.test(t))return t;const i=t.split(" "),r=[];let a="";return i.forEach(((t,s)=>{const o=Kn(`${t} `,n),c=Kn(a,n);if(o>e){const{hyphenatedStrings:i,remainingWord:s}=Xn(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}`)),Xn=(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(Kn(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 Qn(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),Jn(t,e).height}function Kn(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),Jn(t,e).width}const Jn=(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]=ri(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=Vn(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 ti;const ei=t=>{if(Bt.debug("directiveSanitizer called with",t),"object"==typeof t&&(t.length?t.forEach((t=>ei(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]=ni(t[e])),e.includes("fontFamily")&&(Bt.debug("sanitizing fontFamily option"),t[e]=ni(t[e])),e.includes("altFontFamily")&&(Bt.debug("sanitizing altFontFamily option"),t[e]=ni(t[e])),Jt.includes(e)?"object"==typeof t[e]&&(Bt.debug("sanitize deleting object",e),ei(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)},ni=t=>{let e=0,n=0;for(const i of t){if(e<n)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&n++}return e!==n?"{ /* ERROR: Unbalanced CSS */ }":t};function ii(t){return"str"in t}const ri=t=>{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]},ai={assignWithDepth:$n,wrapLabel:Gn,calculateTextHeight:Qn,calculateTextWidth:Kn,calculateTextDimensions:Jn,detectInit:function(t,e){const n=jn(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(n)){const t=n.map((t=>t.args));ei(t),i=$n(i,[...t])}else i=n.args;if(i){let n=On(t,e);["config"].forEach((t=>{void 0!==i[t]&&("flowchart-v2"===n&&(n="flowchart"),i[n]=i[t],delete i[t])}))}return i},detectDirective:jn,isSubstringInArray:function(t,e){for(const[n,i]of e.entries())if(i.match(t))return n;return-1},interpolateToCurve:Yn,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<r)r-=n;else{const a=r/n;a<=0&&(i=e),a>=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<a)a-=e;else{const n=a/e;n<=0&&(r=i),n>=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<s)s-=e;else{const n=s/e;n<=0&&(a=i),n>=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:Un,generateId:qn,random:Hn,runFunc:(t,...e)=>{const n=t.split("."),i=n.length-1,r=n[i];let a=window;for(let s=0;s<i;s++)if(a=a[n[s]],!a)return;a[r](...e)},entityDecode:function(t){return ti=ti||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ti.innerHTML=t,unescape(ti.textContent)},initIdGenerator:class{constructor(t,e){this.deterministic=t,this.seed=e,this.count=e?e.length:0}next(){return this.deterministic?this.count++:Date.now()}},directiveSanitizer:ei,sanitizeCss:ni,insertTitle:(t,e,n,i)=>{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:ri},si="9.4.3",oi=Object.freeze(te);let ci,li=$n({},oi),hi=[],ui=$n({},oi);const di=(t,e)=>{let n=$n({},t),i={};for(const r of e)yi(r),i=$n(i,r);if(n=$n(n,i),i.theme&&i.theme in Xt){const t=$n({},ci),e=$n(t.themeVariables||{},i.themeVariables);n.theme&&n.theme in Xt&&(n.themeVariables=Xt[n.theme].getThemeVariables(e))}return ui=n,vi(ui),ui},pi=()=>$n({},li),fi=t=>(vi(t),$n(ui,t),gi()),gi=()=>$n({},ui),yi=t=>{["secure",...li.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]&&yi(t[e])}))},mi=t=>{t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),hi.push(t),di(li,hi)},bi=(t=li)=>{hi=[],di(t,hi)};var _i=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(_i||{});const xi={},vi=t=>{var e;t&&((t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&(xi[e="LAZY_LOAD_DEPRECATED"]||(Bt.warn(_i[e]),xi[e]=!0)))},ki=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)},wi=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}`),ki(e,c,o,i);const l=`${r.x-n} ${r.y-n} ${r.width+2*n} ${r.height+2*n}`;e.attr("viewBox",l)},Ci=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`,Ti=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`,Ei=()=>"",Si=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`,Ai=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`,Li=()=>"",Bi=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`,Ni=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`,Di=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`,Oi=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`,Mi=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`,Ii=t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,Fi={flowchart:Si,"flowchart-v2":Si,sequence:Di,gantt:Ai,classDiagram:Ci,"classDiagram-v2":Ci,class:Ci,stateDiagram:Oi,state:Oi,info:Li,pie:Bi,er:Ti,error:Ei,journey:Mi,requirement:Ni,c4:Ii},$i=(t,e,n)=>{let i="";return t in Fi&&Fi[t]?i=Fi[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 Ri="",Zi="",Pi="";const ji=t=>It(t,gi()),Yi=function(){Ri="",Pi="",Zi=""},zi=function(t){Ri=ji(t).replace(/^\s+/g,"")},Ui=function(){return Ri||Zi},Wi=function(t){Pi=ji(t).replace(/\n\s+/g,"\n")},qi=function(){return Pi},Hi=function(t){Zi=ji(t)},Vi=function(){return Zi},Gi={setAccTitle:zi,getAccTitle:Ui,setDiagramTitle:Hi,getDiagramTitle:Vi,getAccDescription:qi,setAccDescription:Wi,clear:Yi},Xi=Object.freeze(Object.defineProperty({__proto__:null,clear:Yi,default:Gi,getAccDescription:qi,getAccTitle:Ui,getDiagramTitle:Vi,setAccDescription:Wi,setAccTitle:zi,setDiagramTitle:Hi},Symbol.toStringTag,{value:"Module"}));let Qi={};const Ki=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":Qi={};break;case"type_directive":if(!Qi)throw new Error("currentDirective is undefined");Qi.type=e.toLowerCase();break;case"arg_directive":if(!Qi)throw new Error("currentDirective is undefined");Qi.args=JSON.parse(e);break;case"close_directive":Ji(t,Qi,i),Qi=void 0}}catch(r){Bt.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${n}`),Bt.error(r.message)}},Ji=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),ei(e.args),Bt.info("sanitize in handleDirective (done)",e.args),mi(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)}},tr=Bt,er=Nt,nr=gi,ir=t=>It(t,nr()),rr=wi,ar=(t,e,n,i)=>Ki(t,e,n,i),sr={},or=(t,e,n)=>{if(sr[t])throw new Error(`Diagram ${t} already registered.`);var i,r;sr[t]=e,n&&In(t,n),i=t,r=e.styles,Fi[i]=r,e.injectUtils&&e.injectUtils(tr,er,nr,ir,rr,Xi,ar)},cr=t=>{if(t in sr)return sr[t];throw new Error(`Diagram ${t} not found.`)};var lr=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;a<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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"),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}();lr.parser=lr;const hr=lr,ur=t=>null!==t.match(/^\s*gitGraph/);let dr=gi().gitGraph.mainBranchName,pr=gi().gitGraph.mainBranchOrder,fr={},gr=null,yr={};yr[dr]={name:dr,order:pr};let mr={};mr[dr]=gr;let br=dr,_r="LR",xr=0;function vr(){return Hn({length:7})}let kr={};const wr=function(t){if(t=jt.sanitizeText(t,gi()),void 0===mr[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}{br=t;const e=mr[br];gr=fr[e]}};function Cr(t,e,n){const i=t.indexOf(e);-1===i?t.push(n):t.splice(i,1,n)}function Tr(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 mr)mr[r]===e.id&&i.push(r);if(Bt.debug(i.join(" ")),e.parents&&2==e.parents.length){const n=fr[e.parents[0]];Cr(t,e,n),t.push(fr[e.parents[1]])}else{if(0==e.parents.length)return;{const n=fr[e.parents];Cr(t,e,n)}}Tr(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 Er=function(){const t=Object.keys(fr).map((function(t){return fr[t]}));return t.forEach((function(t){Bt.debug(t.id)})),t.sort(((t,e)=>t.seq-e.seq)),t},Sr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ar={parseDirective:function(t,e,n){Cp.parseDirective(this,t,e,n)},getConfig:()=>gi().gitGraph,setDirection:function(t){_r=t},setOptions:function(t){Bt.debug("options str",t),t=(t=t&&t.trim())||"{}";try{kr=JSON.parse(t)}catch(e){Bt.error("error while parsing gitGraph options",e.message)}},getOptions:function(){return kr},commit:function(t,e,n,i){Bt.debug("Entering commit:",t,e,n,i),e=jt.sanitizeText(e,gi()),t=jt.sanitizeText(t,gi()),i=jt.sanitizeText(i,gi());const r={id:e||xr+"-"+vr(),message:t,seq:xr++,type:n||Sr.NORMAL,tag:i||"",parents:null==gr?[]:[gr.id],branch:br};gr=r,fr[r.id]=r,mr[br]=r.id,Bt.debug("in pushCommit "+r.id)},branch:function(t,e){if(t=jt.sanitizeText(t,gi()),void 0!==mr[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}mr[t]=null!=gr?gr.id:null,yr[t]={name:t,order:e?parseInt(e,10):null},wr(t),Bt.debug("in createBranch")},merge:function(t,e,n,i){t=jt.sanitizeText(t,gi()),e=jt.sanitizeText(e,gi());const r=fr[mr[br]],a=fr[mr[t]];if(br===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 ('+br+")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===mr[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!==fr[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||xr+"-"+vr(),message:"merged branch "+t+" into "+br,seq:xr++,parents:[null==gr?null:gr.id,mr[t]],branch:br,type:Sr.MERGE,customType:n,customId:!!e,tag:i||""};gr=s,fr[s.id]=s,mr[br]=s.id,Bt.debug(mr),Bt.debug("in mergeBranch")},cherryPick:function(t,e,n){if(Bt.debug("Entering cherryPick:",t,e,n),t=jt.sanitizeText(t,gi()),e=jt.sanitizeText(e,gi()),n=jt.sanitizeText(n,gi()),!t||void 0===fr[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=fr[t],r=i.branch;if(i.type===Sr.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===fr[e]){if(r===br){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=fr[mr[br]];if(void 0===a||!a){let n=new Error('Incorrect usage of "cherry-pick". Current branch ('+br+")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:xr+"-"+vr(),message:"cherry-picked "+i+" into "+br,seq:xr++,parents:[null==gr?null:gr.id,i.id],branch:br,type:Sr.CHERRY_PICK,tag:n??"cherry-pick:"+i.id};gr=s,fr[s.id]=s,mr[br]=s.id,Bt.debug(mr),Bt.debug("in cherryPick")}},checkout:wr,prettyPrint:function(){Bt.debug(fr);Tr([Er()[0]])},clear:function(){fr={},gr=null;let t=gi().gitGraph.mainBranchName,e=gi().gitGraph.mainBranchOrder;mr={},mr[t]=null,yr={},yr[t]={name:t,order:e},br=t,xr=0,Yi()},getBranchesAsObjArray:function(){const t=Object.values(yr).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 mr},getCommits:function(){return fr},getCommitsArray:Er,getCurrentBranch:function(){return br},getDirection:function(){return _r},getHead:function(){return gr},setAccTitle:zi,getAccTitle:Ui,getAccDescription:qi,setAccDescription:Wi,setDiagramTitle:Hi,getDiagramTitle:Vi,commitType:Sr};let Lr={};const Br=0,Nr=1,Dr=2,Or=3,Mr=4;let Ir={},Fr={},$r=[],Rr=0;const Zr=(t,e,n)=>{const i=nr().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=Ir[o.branch].pos,l=s+10;if(n){let t,e=void 0!==o.customType&&""!==o.customType?o.customType:o.type;switch(e){case Br:t="commit-normal";break;case Nr:t="commit-reverse";break;case Dr:t="commit-highlight";break;case Or:t="commit-merge";break;case Mr:t="commit-cherry-pick";break;default:t="commit-normal"}if(e===Dr){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${Ir[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${Ir[o.branch].index%8} ${t}-inner`)}else if(e===Mr)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===Or?9:10),n.attr("class",`commit ${o.id} commit${Ir[o.branch].index%8}`),e===Or){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${Ir[o.branch].index%8}`)}if(e===Nr){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${Ir[o.branch].index%8}`)}}}if(Fr[o.id]={x:s+10,y:c},n){const t=4,e=2;if(o.type!==Mr&&(o.customId&&o.type===Or||o.type!==Or)&&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>Rr&&(Rr=s)}))},Pr=(t,e,n=0)=>{const i=t+Math.abs(t-e)/2;if(n>5)return i;if($r.every((t=>Math.abs(t-i)>=10)))return $r.push(i),i;const r=Math.abs(t-e);return Pr(t,e-r/5,n+1)},jr=(t,e,n,i)=>{const r=Fr[e.id],a=Fr[n.id],s=((t,e,n)=>Object.keys(n).filter((i=>n[i].branch===e.branch&&n[i].seq>t.seq&&n[i].seq<e.seq)).length>0)(e,n,i);let o,c="",l="",h=0,u=0,d=Ir[n.branch].index;if(s){c="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,u=10,d=Ir[n.branch].index;const t=r.y<a.y?Pr(r.y,a.y):Pr(a.y,r.y);o=r.y<a.y?`M ${r.x} ${r.y} L ${r.x} ${t-h} ${c} ${r.x+u} ${t} L ${a.x-h} ${t} ${l} ${a.x} ${t+u} L ${a.x} ${a.y}`:`M ${r.x} ${r.y} L ${r.x} ${t+h} ${l} ${r.x+u} ${t} L ${a.x-h} ${t} ${c} ${a.x} ${t-u} L ${a.x} ${a.y}`}else r.y<a.y&&(c="A 20 20, 0, 0, 0,",h=20,u=20,d=Ir[n.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}`),r.y>a.y&&(c="A 20 20, 0, 0, 0,",h=20,u=20,d=Ir[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=Ir[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)},Yr=(t,e)=>{const n=nr().gitGraph,i=t.append("g");e.forEach(((t,e)=>{const r=e%8,a=Ir[t.name].pos,s=i.append("line");s.attr("x1",0),s.attr("y1",a),s.attr("x2",Rr),s.attr("y2",a),s.attr("class","branch branch"+r),$r.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|<br\s*\/?>/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){Ir={},Fr={},Lr={},Rr=0,$r=[];const r=nr(),a=r.gitGraph;Bt.debug("in gitgraph renderer",t+"\n","id:",e,n),Lr=i.db.getCommits();const s=i.db.getBranchesAsObjArray();let c=0;s.forEach(((t,e)=>{Ir[t.name]={pos:c,index:e},c+=50+(a.rotateCommitLabel?40:0)}));const l=(0,o.Ys)(`[id="${e}"]`);Zr(l,Lr,!1),a.showBranches&&Yr(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=>{jr(n,e[t],i,e)}))}))})(l,Lr),Zr(l,Lr,!0),ai.insertTitle(l,"gitTitleText",a.titleTopMargin,i.db.getDiagramTitle()),rr(void 0,l,a.diagramPadding,a.useMaxWidth??r.useMaxWidth)}},Ur=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 Wr=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],Q=[1,64],K=[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:Q,80:K,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:Q,80:K,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:Q,80:K,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:Q,80:K,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:Q,80:K,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:Q,80:K,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:Q,80:K,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:Q,80:K,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;a<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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"),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}();Wr.parser=Wr;const qr=Wr,Hr=t=>null!==t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/);let Vr=[],Gr=[""],Xr="global",Qr="",Kr=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Jr=[],ta="",ea=!1,na=4,ia=2;var ra;const aa=function(t){return null==t?Vr:Vr.filter((e=>e.parentBoundary===t))},sa=function(){return ea},oa={addPersonOrSystem:function(t,e,n,i,r,a,s){if(null===e||null===n)return;let o={};const c=Vr.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,Vr.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=Xr,o.wrap=sa()},addPersonOrSystemBoundary:function(t,e,n,i,r){if(null===t||null===e)return;let a={};const s=Kr.find((e=>e.alias===t));if(s&&t===s.alias?a=s:(a.alias=t,Kr.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=Xr,a.wrap=sa(),Qr=Xr,Xr=t,Gr.push(Qr)},addContainer: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.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=sa(),c.typeC4Shape={text:t},c.parentBoundary=Xr},addContainerBoundary:function(t,e,n,i,r){if(null===t||null===e)return;let a={};const s=Kr.find((e=>e.alias===t));if(s&&t===s.alias?a=s:(a.alias=t,Kr.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=Xr,a.wrap=sa(),Qr=Xr,Xr=t,Gr.push(Qr)},addComponent: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.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=sa(),c.typeC4Shape={text:t},c.parentBoundary=Xr},addDeploymentNode:function(t,e,n,i,r,a,s,o){if(null===e||null===n)return;let c={};const l=Kr.find((t=>t.alias===e));if(l&&e===l.alias?c=l:(c.alias=e,Kr.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=Xr,c.wrap=sa(),Qr=Xr,Xr=e,Gr.push(Qr)},popBoundaryParseStack:function(){Xr=Qr,Gr.pop(),Qr=Gr.pop(),Gr.push(Qr)},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=Jr.find((t=>t.from===e&&t.to===n));if(h?l=h:Jr.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=sa()},updateElStyle:function(t,e,n,i,r,a,s,o,c,l,h){let u=Vr.find((t=>t.alias===e));if(void 0!==u||(u=Kr.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=Jr.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=na,r=ia;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&&(na=i),r>=1&&(ia=r)},autoWrap:sa,setWrap:function(t){ea=t},getC4ShapeArray:aa,getC4Shape:function(t){return Vr.find((e=>e.alias===t))},getC4ShapeKeys:function(t){return Object.keys(aa(t))},getBoundarys:function(t){return null==t?Kr:Kr.filter((e=>e.parentBoundary===t))},getCurrentBoundaryParse:function(){return Xr},getParentBoundaryParse:function(){return Qr},getRels:function(){return Jr},getTitle:function(){return ta},getC4Type:function(){return ra},getC4ShapeInRow:function(){return na},getC4BoundaryInRow:function(){return ia},setAccTitle:zi,getAccTitle:Ui,getAccDescription:qi,setAccDescription:Wi,parseDirective:function(t,e,n){Cp.parseDirective(this,t,e,n)},getConfig:()=>gi().c4,clear:function(){Vr=[],Kr=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Qr="",Xr="global",Gr=[""],Jr=[],Gr=[""],ta="",ea=!1,na=4,ia=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,gi());ta=e},setC4Type:function(t){let e=It(t,gi());ra=e}},ca=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},la=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)},ha=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},ua=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),da=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<d.length;p++){const t=p*l-l*(d.length-1)/2,s=e.append("text").attr("x",n+a/2).attr("y",r).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",l).style("font-weight",u).style("font-family",h);s.append("tspan").attr("dy",t).text(d[p]).attr("alignment-baseline","mathematical"),i(s,o)}}function n(t,n,r,a,s,o,c,l){const h=n.append("switch"),u=h.append("foreignObject").attr("x",r).attr("y",a).attr("width",s).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,r,a,s,0,c,l),i(u,c)}function i(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),pa=function(t,e,n){const i=t.append("g");let r=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let c={x:e.x,y:e.y,fill:r,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};ca(i,c);let l=n.boundaryFont();l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,da(n)(e.label.text,i,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},l),e.type&&""!==e.type.text&&(l=n.boundaryFont(),l.fontColor=s,da(n)(e.type.text,i,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},l)),e.descr&&""!==e.descr.text&&(l=n.boundaryFont(),l.fontSize=l.fontSize-2,l.fontColor=s,da(n)(e.descr.text,i,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))},fa=function(t,e,n){var i;let r=e.bgColor?e.bgColor:n[e.typeC4Shape.text+"_bg_color"],a=e.borderColor?e.borderColor:n[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const c=t.append("g");c.attr("class","person-man");const l=ha();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=r,l.width=e.width,l.height=e.height,l.stroke=a,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},ca(c,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":c.append("path").attr("fill",r).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":c.append("path").attr("fill",r).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let h=ua(n,e.typeC4Shape.text);switch(c.append("text").attr("fill",s).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":la(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,da(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)?da(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&&da(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,da(n)(e.descr.text,c,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},u)),e.height},ga=(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();da(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(),da(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))}},ya=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")},ma=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")},ba=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")},_a=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")},xa=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")},va=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")},ka=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 wa=0,Ca=0,Ta=4,Ea=2;Wr.yy=oa;let Sa={};class Aa{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,La(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>Ta)&&(e=this.nextData.startx+t.margin+Sa.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},La(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}}const La=function(t){$n(Sa,t),t.fontFamily&&(Sa.personFontFamily=Sa.systemFontFamily=Sa.messageFontFamily=t.fontFamily),t.fontSize&&(Sa.personFontSize=Sa.systemFontSize=Sa.messageFontSize=t.fontSize),t.fontWeight&&(Sa.personFontWeight=Sa.systemFontWeight=Sa.messageFontWeight=t.fontWeight)},Ba=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),Na=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight});function Da(t,e,n,i,r){if(!e[t].width)if(n)e[t].text=Gn(e[t].text,r,i),e[t].textLines=e[t].text.split(jt.lineBreakRegex).length,e[t].width=r,e[t].height=Qn(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(Kn(a,i),e[t].width),r=Qn(a,i),e[t].height=e[t].height+r}}const Oa=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=Sa.c4ShapeMargin-35;let i=e.wrap&&Sa.wrap,r=Na(Sa);r.fontSize=r.fontSize+2,r.fontWeight="bold",Da("label",e,i,r,Kn(e.label.text,r)),pa(t,e,Sa)},Ma=function(t,e,n,i){let r=0;for(const a of i){r=0;const i=n[a];let s=Ba(Sa,i.typeC4Shape.text);switch(s.fontSize=s.fontSize-2,i.typeC4Shape.width=Kn("<<"+i.typeC4Shape.text+">>",s),i.typeC4Shape.height=s.fontSize+2,i.typeC4Shape.Y=Sa.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&&Sa.wrap,c=Sa.width-2*Sa.c4ShapePadding,l=Ba(Sa,i.typeC4Shape.text);if(l.fontSize=l.fontSize+2,l.fontWeight="bold",Da("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+"]",Da("type",i,o,Ba(Sa,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+"]",Da("techn",i,o,Ba(Sa,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){Da("descr",i,o,Ba(Sa,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+=Sa.c4ShapePadding,i.width=Math.max(i.width||Sa.width,u,Sa.width),i.height=Math.max(i.height||Sa.height,h,Sa.height),i.margin=i.margin||Sa.c4ShapeMargin,t.insert(i),fa(e,i,Sa)}t.bumpLastMargin(Sa.c4ShapeMargin)};class Ia{constructor(t,e){this.x=t,this.y=e}}let Fa=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 Ia(n+t.width,o):i==a&&n>r?d=new Ia(n,o):n==r&&i<a?d=new Ia(s,i+t.height):n==r&&i>a&&(d=new Ia(s,i)),n>r&&i<a?d=u>=h?new Ia(n,o+h*t.width/2):new Ia(s-c/l*t.height/2,i+t.height):n<r&&i<a?d=u>=h?new Ia(n+t.width,o+h*t.width/2):new Ia(s+c/l*t.height/2,i+t.height):n<r&&i>a?d=u>=h?new Ia(n+t.width,o-h*t.width/2):new Ia(s+t.height/2*c/l,i):n>r&&i>a&&(d=u>=h?new Ia(n,o-t.width/2*h):new Ia(s-t.height/2*c/l,i)),d},$a=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=Fa(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:i,endPoint:Fa(e,n)}};function Ra(t,e,n,i,r){let a=new Aa(r);a.data.widthLimit=n.data.widthLimit/Math.min(Ea,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&&Sa.wrap,l=Na(Sa);if(l.fontSize=l.fontSize+2,l.fontWeight="bold",Da("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+"]",Da("type",o,c,Na(Sa),a.data.widthLimit),o.type.Y=i+5,i=o.type.Y+o.type.height}if(o.descr&&""!==o.descr.text){let t=Na(Sa);t.fontSize=t.fontSize-2,Da("descr",o,c,t,a.data.widthLimit),o.descr.Y=i+20,i=o.descr.Y+o.descr.height}if(0==s||s%Ea==0){let t=n.data.startx+Sa.diagramMarginX,e=n.data.stopy+Sa.diagramMarginY+i;a.setData(t,t,e,e)}else{let t=a.data.stopx!==a.data.startx?a.data.stopx+Sa.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&&Ma(a,t,h,u),e=o.alias;let d=r.db.getBoundarys(e);d.length>0&&Ra(t,e,a,d,r),"global"!==o.alias&&Oa(t,o,a),n.data.stopy=Math.max(a.data.stopy+Sa.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(a.data.stopx+Sa.c4ShapeMargin,n.data.stopx),wa=Math.max(wa,n.data.stopx),Ca=Math.max(Ca,n.data.stopy)}}const Za={drawPersonOrSystemArray:Ma,drawBoundary:Oa,setConf:La,draw:function(t,e,n,i){Sa=gi().c4;const r=gi().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(Sa.wrap),Ta=c.getC4ShapeInRow(),Ea=c.getC4BoundaryInRow(),Bt.debug(`C:${JSON.stringify(Sa,null,2)}`);const l="sandbox"===r?s.select(`[id="${e}"]`):(0,o.Ys)(`[id="${e}"]`);va(l),xa(l),ka(l);let h=new Aa(i);h.setData(Sa.diagramMarginX,Sa.diagramMarginX,Sa.diagramMarginY,Sa.diagramMarginY),h.data.widthLimit=screen.availWidth,wa=Sa.diagramMarginX,Ca=Sa.diagramMarginY;const u=i.db.getTitle();Ra(l,"",h,i.db.getBoundarys(""),i),ya(l),ma(l),_a(l),ba(l),function(t,e,n,i){let r=0;for(let s of e){r+=1;let t=s.wrap&&Sa.wrap,e={fontFamily:(a=Sa).messageFontFamily,fontSize:a.messageFontSize,fontWeight:a.messageFontWeight};"C4Dynamic"===i.db.getC4Type()&&(s.label.text=r+": "+s.label.text);let o=Kn(s.label.text,e);Da("label",s,t,e,o),s.techn&&""!==s.techn.text&&(o=Kn(s.techn.text,e),Da("techn",s,t,e,o)),s.descr&&""!==s.descr.text&&(o=Kn(s.descr.text,e),Da("descr",s,t,e,o));let c=n(s.from),l=n(s.to),h=$a(c,l);s.startPoint=h.startPoint,s.endPoint=h.endPoint}var a;ga(t,e,Sa)}(l,i.db.getRels(),i.db.getC4Shape,i),h.data.stopx=wa,h.data.stopy=Ca;const d=h.data;let p=d.stopy-d.starty+2*Sa.diagramMarginY;const f=d.stopx-d.startx+2*Sa.diagramMarginX;u&&l.append("text").text(u).attr("x",(d.stopx-d.startx)/2-4*Sa.diagramMarginX).attr("y",d.starty+Sa.diagramMarginY),ki(l,p,f,Sa.useMaxWidth);const g=u?60:0;l.attr("viewBox",d.startx-Sa.diagramMarginX+" -"+(Sa.diagramMarginY+g)+" "+f+" "+(p+g)),Bt.debug("models:",d)}};var Pa=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<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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}();Pa.parser=Pa;const ja=Pa,Ya=(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/)},Ua="classid-";let Wa=[],qa={},Ha=[],Va=0,Ga=[];const Xa=t=>jt.sanitizeText(t,gi()),Qa=function(t){let e="",n=t;if(t.indexOf("~")>0){let i=t.split("~");n=i[0],e=jt.sanitizeText(i[1],gi())}return{className:n,type:e}},Ka=function(t){let e=Qa(t);void 0===qa[e.className]&&(qa[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:Ua+e.className+"-"+Va},Va++)},Ja=function(t){const e=Object.keys(qa);for(const n of e)if(qa[n].id===t)return qa[n].domId},ts=function(t,e){const n=Qa(t).className,i=qa[n];if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(Xa(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(Xa(t)):t&&i.members.push(Xa(t))}},es=function(t,e){t.split(",").forEach((function(t){let n=t;t[0].match(/\d/)&&(n=Ua+n),void 0!==qa[n]&&qa[n].cssClasses.push(e)}))},ns=function(t,e,n){const i=gi();let r=t,a=Ja(r);if("loose"===i.securityLevel&&void 0!==e&&void 0!==qa[r]){let t=[];if("string"==typeof n){t=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<t.length;e++){let n=t[e].trim();'"'===n.charAt(0)&&'"'===n.charAt(n.length-1)&&(n=n.substr(1,n.length-2)),t[e]=n}}0===t.length&&t.push(a),Ga.push((function(){const n=document.querySelector(`[id="${a}"]`);null!==n&&n.addEventListener("click",(function(){ai.runFunc(e,...t)}),!1)}))}},is=function(t){let e=(0,o.Ys)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,o.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0));(0,o.Ys)(t).select("svg").selectAll("g.node").on("mouseover",(function(){const t=(0,o.Ys)(this);if(null===t.attr("title"))return;const n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,o.Ys)(this).classed("hover",!1)}))};Ga.push(is);let rs="TB";const as={parseDirective:function(t,e,n){Cp.parseDirective(this,t,e,n)},setAccTitle:zi,getAccTitle:Ui,getAccDescription:qi,setAccDescription:Wi,getConfig:()=>gi().class,addClass:Ka,bindFunctions:function(t){Ga.forEach((function(e){e(t)}))},clear:function(){Wa=[],qa={},Ha=[],Ga=[],Ga.push(is),Yi()},getClass:function(t){return qa[t]},getClasses:function(){return qa},getNotes:function(){return Ha},addAnnotation:function(t,e){const n=Qa(t).className;qa[n].annotations.push(e)},addNote:function(t,e){const n={id:`note${Ha.length}`,class:e,text:t};Ha.push(n)},getRelations:function(){return Wa},addRelation:function(t){Bt.debug("Adding relation: "+JSON.stringify(t)),Ka(t.id1),Ka(t.id2),t.id1=Qa(t.id1).className,t.id2=Qa(t.id2).className,t.relationTitle1=jt.sanitizeText(t.relationTitle1.trim(),gi()),t.relationTitle2=jt.sanitizeText(t.relationTitle2.trim(),gi()),Wa.push(t)},getDirection:()=>rs,setDirection:t=>{rs=t},addMember:ts,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>ts(t,e))))},cleanupLabel:function(t){return":"===t.substring(0,1)?jt.sanitizeText(t.substr(1).trim(),gi()):Xa(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){ns(t,e,n),qa[t].haveCallback=!0})),es(t,"clickable")},setCssClass:es,setLink:function(t,e,n){const i=gi();t.split(",").forEach((function(t){let r=t;t[0].match(/\d/)&&(r=Ua+r),void 0!==qa[r]&&(qa[r].link=ai.formatUrl(e,i),"sandbox"===i.securityLevel?qa[r].linkTarget="_top":qa[r].linkTarget="string"==typeof n?Xa(n):"_blank")})),es(t,"clickable")},getTooltip:function(t){return qa[t].tooltip},setTooltip:function(t,e){const n=gi();t.split(",").forEach((function(t){void 0!==e&&(qa[t].tooltip=jt.sanitizeText(e,n))}))},lookUpDomId:Ja,setDiagramTitle:Hi,getDiagramTitle:Vi};let ss=0;const os=function(t){let e=t.match(/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/),n=t.match(/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/);return e&&!n?cs(e):n?ls(n):hs(t)},cs=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=ds(o)}catch(i){n=t}return{displayText:n,cssStyle:e}},ls=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=ds(s)}catch(i){n=t}return{displayText:n,cssStyle:e}},hs=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=ds(t.substring(a+1,a+2)),e=s+o+"("+Pt(l.trim())+")",a<t.length&&(i=t.substring(a+2).trim(),""!==i&&(i=" : "+Pt(i),e+=i))}else e=Pt(t);return{displayText:e,cssStyle:n}},us=function(t,e,n,i){let r=os(e);const a=t.append("tspan").attr("x",i.padding).text(r.displayText);""!==r.cssStyle&&a.attr("style",r.cssStyle),n||a.attr("dy",i.textHeight)},ds=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},ps=function(t,e,n,i){Bt.debug("Rendering class ",e,n);const r=e.id,a={id:r,label:e.id,width:0,height:0},s=t.append("g").attr("id",i.db.lookUpDomId(r)).attr("class","classGroup");let o;o=e.link?s.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",n.textHeight+n.padding).attr("x",0):s.append("text").attr("y",n.textHeight+n.padding).attr("x",0);let c=!0;e.annotations.forEach((function(t){const e=o.append("tspan").text("\xab"+t+"\xbb");c||e.attr("dy",n.textHeight),c=!1}));let l=e.id;void 0!==e.type&&""!==e.type&&(l+="<"+e.type+">");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){us(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){us(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},fs=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"+ss).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=ai.calcLabelPosition(e.points);if(h=b.x,u=b.y,p%2!=0&&p>1){let t=ai.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),i=ai.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)}ss++},gs=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 ys={};const ms=function(t){const e=Object.entries(ys).find((e=>e[1].label===t));if(e)return e[0]},bs={draw:function(t,e,n,i){const r=gi().class;ys={},Bt.info("Rendering diagram "+t);const a=gi().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=ps(l,t,r,i);ys[e.id]=e,u.setNode(e.id,e),Bt.info("Org height: "+e.height)}i.db.getRelations().forEach((function(t){Bt.info("tjoho"+ms(t.id1)+ms(t.id2)+JSON.stringify(t)),u.setEdge(ms(t.id1),ms(t.id2),{relation:t},t.title||"DEFAULT")}));i.db.getNotes().forEach((function(t){Bt.debug(`Adding note: ${JSON.stringify(t)}`);const e=gs(l,t,r,i);ys[e.id]=e,u.setNode(e.id,e),t.class&&t.class in d&&u.setEdge(t.id,ms(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))),fs(l,u.edge(t),u.edge(t).relation,r,i))}));const f=l.node().getBBox(),g=f.width+40,y=f.height+40;ki(l,y,g,r.useMaxWidth);const m=`${f.x-20} ${f.y-20} ${g} ${y}`;Bt.debug(`viewBox ${m}`),l.attr("viewBox",m)}},_s={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")}},xs=(t,e,n,i)=>{e.forEach((e=>{_s[e](t,n,i)}))};const vs=(t,e,n,i)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),Zt(gi().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"<br />"),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('<span class="'+r+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),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:gp(r).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`)),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|<br\s*\/?>/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}},ks=(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(vs(It(gp(c),gi()),e.labelStyle,!1,i));let h=l.getBBox();if(Zt(gi().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}},ws=(t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height};function Cs(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 Ts={},Es={},Ss={};const As=(t,e)=>(Bt.trace("In isDecendant",e," ",t," = ",Es[e].includes(t)),!!Es[e].includes(t)),Ls=(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)Ls(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 ",Es[e]),Bt.info("Edge is ",t),t.v!==e&&t.w!==e&&(Es[e]?Es[e].includes(t.v)||As(t.v,e)||As(t.w,e)||Es[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)}))},Bs=(t,e)=>{const n=e.children(t);let i=[...n];for(const r of n)Ss[r]=t,i=[...i,...Bs(r,e)];return i},Ns=(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=Ns(i,e);if(n)return Bt.trace("Found replacement for",t," => ",n),n}},Ds=t=>Ts[t]&&Ts[t].externalConnections&&Ts[t]?Ts[t].id:t,Os=(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,Ts,Ts[i]&&!Ts[i].externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),Ts[i])if(!Ts[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";Ts[i]&&Ts[i].clusterData&&Ts[i].clusterData.dir&&(n=Ts[i].clusterData.dir,Bt.warn("Fixing dir",Ts[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)),Ls(i,t,r,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Ts[i].clusterData,labelText:Ts[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:",!Ts[i].externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),Bt.debug(Ts);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&&Os(n.graph,e+1)}}else Bt.debug("Done, no node has children",t.nodes())},Ms=(t,e)=>{if(0===e.length)return[];let n=Object.assign(e);return e.forEach((e=>{const i=t.children(e),r=Ms(t,i);n=[...n,...r]})),n};function Is(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.x<r&&(l=-l);var h=Math.abs(e*n*o/c);return i.y<a&&(h=-h),{x:r+l,y:a+h}}function Fs(t,e,n,i){var r,a,s,o,c,l,h,u,d,p,f,g,y;if(r=e.y-t.y,s=t.x-e.x,c=e.x*t.y-t.x*e.y,d=r*n.x+s*n.y+c,p=r*i.x+s*i.y+c,!(0!==d&&0!==p&&$s(d,p)||(a=i.y-n.y,o=n.x-i.x,l=i.x*n.y-n.x*i.y,h=a*t.x+o*t.y+l,u=a*e.x+o*e.y+l,0!==h&&0!==u&&$s(h,u)||0==(f=r*o-a*s))))return g=Math.abs(f/2),{x:(y=s*l-o*c)<0?(y-g)/f:(y+g)/f,y:(y=a*c-r*l)<0?(y-g)/f:(y+g)/f}}function $s(t,e){return t*e>0}const Rs=(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}},Zs={node:function(t,e){return t.intersect(e)},circle:function(t,e,n){return Is(t,e,e,n)},ellipse:Is,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<e.length;h++){var u=e[h],d=e[h<e.length-1?h+1:0],p=Fs(t,n,{x:c+u.x,y:l+u.y},{x:c+d.x,y:l+d.y});p&&a.push(p)}return a.length?(a.length>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<c?-1:a===c?0:1})),a[0]):t},rect:Rs},Ps=(t,e)=>{const{shapeSvg:n,bbox:i,halfPadding:r}=ks(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),ws(e,a),e.intersect=function(t){return Zs.rect(e,t)},n},js=(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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=Cs(n,r,r,a);return s.attr("style",e.style),ws(e,s),e.intersect=function(t){return Bt.warn("Intersect called"),Zs.polygon(e,a,t)},n};function Ys(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 ws(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Zs.rect(e,t)},i},Us={rhombus:js,question:js,rect:(t,e)=>{const{shapeSvg:n,bbox:i,halfPadding:r}=ks(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&&(Ys(a,e.props.borders,s,o),t.delete("borders")),t.forEach((t=>{Bt.warn(`Unknown node property ${t}`)}))}return ws(e,a),e.intersect=function(t){return Zs.rect(e,t)},n},labelRect:(t,e)=>{const{shapeSvg:n}=ks(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&&(Ys(i,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{Bt.warn(`Unknown node property ${t}`)}))}return ws(e,i),e.intersect=function(t){return Zs.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(vs(l,e.labelStyle,!0,!0));let u={width:0,height:0};if(Zt(gi().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(vs(d.join?d.join("<br/>"):d,e.labelStyle,!0,!0));if(Zt(gi().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<p.width?0:-(p.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-g+3)+")"),r.attr("class","outer title-state").attr("x",-u.width/2-g).attr("y",-u.height/2-g).attr("width",u.width+e.padding).attr("height",u.height+e.padding),a.attr("class","divider").attr("x1",-u.width/2-g).attr("x2",u.width/2+g).attr("y1",-u.height/2-g+p.height+g).attr("y2",-u.height/2-g+p.height+g),ws(e,r),e.intersect=function(t){return Zs.rect(e,t)},i},choice:(t,e)=>{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 Zs.circle(e,14,t)},n},circle:(t,e)=>{const{shapeSvg:n,bbox:i,halfPadding:r}=ks(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"),ws(e,a),e.intersect=function(t){return Bt.info("Circle intersect",e,i.width/2+r,t),Zs.circle(e,i.width/2+r,t)},n},doublecircle:(t,e)=>{const{shapeSvg:n,bbox:i,halfPadding:r}=ks(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"),ws(e,s),e.intersect=function(t){return Bt.info("DoubleCircle intersect",e,i.width/2+r+5,t),Zs.circle(e,i.width/2+r+5,t)},n},stadium:(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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 ws(e,s),e.intersect=function(t){return Zs.rect(e,t)},n},hexagon:(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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=Cs(n,s,r,o);return c.attr("style",e.style),ws(e,c),e.intersect=function(t){return Zs.polygon(e,o,t)},n},rect_left_inv_arrow:(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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 Cs(n,r,a,s).attr("style",e.style),e.width=r+a,e.height=a,e.intersect=function(t){return Zs.polygon(e,s,t)},n},lean_right:(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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=Cs(n,r,a,s);return o.attr("style",e.style),ws(e,o),e.intersect=function(t){return Zs.polygon(e,s,t)},n},lean_left:(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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=Cs(n,r,a,s);return o.attr("style",e.style),ws(e,o),e.intersect=function(t){return Zs.polygon(e,s,t)},n},trapezoid:(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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=Cs(n,r,a,s);return o.attr("style",e.style),ws(e,o),e.intersect=function(t){return Zs.polygon(e,s,t)},n},inv_trapezoid:(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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=Cs(n,r,a,s);return o.attr("style",e.style),ws(e,o),e.intersect=function(t){return Zs.polygon(e,s,t)},n},rect_right_inv_arrow:(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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=Cs(n,r,a,s);return o.attr("style",e.style),ws(e,o),e.intersect=function(t){return Zs.polygon(e,s,t)},n},cylinder:(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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 ws(e,l),e.intersect=function(t){const n=Zs.rect(e,t),i=n.x-e.x;if(0!=a&&(Math.abs(i)<e.width/2||Math.abs(i)==e.width/2&&Math.abs(n.y-e.y)>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),ws(e,i),e.intersect=function(t){return Zs.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),ws(e,r),e.intersect=function(t){return Zs.circle(e,7,t)},n},note:Ps,subroutine:(t,e)=>{const{shapeSvg:n,bbox:i}=ks(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=Cs(n,r,a,s);return o.attr("style",e.style),ws(e,o),e.intersect=function(t){return Zs.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(vs(f,e.labelStyle,!0,!0));let y=g.getBBox();if(Zt(gi().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&&(gi().flowchart.htmlLabels?m+="&lt;"+e.classData.type+"&gt;":m+="<"+e.classData.type+">");const b=u.node().appendChild(vs(m,e.labelStyle,!0,!0));(0,o.Ys)(b).attr("class","classTitle");let _=b.getBBox();if(Zt(gi().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=os(t);let i=n.displayText;gi().flowchart.htmlLabels&&(i=i.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const r=u.node().appendChild(vs(i,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0));let a=r.getBBox();if(Zt(gi().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=os(t);let i=n.displayText;gi().flowchart.htmlLabels&&(i=i.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const r=u.node().appendChild(vs(i,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0));let a=r.getBBox();if(Zt(gi().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),ws(e,a),e.intersect=function(t){return Zs.rect(e,t)},r}};let Ws={};const qs=(t,e,n)=>{let i,r;if(e.link){let a;"sandbox"===gi().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),r=Us[e.shape](i,e,n)}else r=Us[e.shape](t,e,n),i=r;return e.tooltip&&r.attr("title",e.tooltip),e.class&&r.attr("class","node default "+e.class),Ws[e.id]=i,e.haveCallback&&Ws[e.id].attr("class",Ws[e.id].attr("class")+" clickable"),i},Hs=t=>{const e=Ws[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},Vs={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(vs(e.labelText,e.labelStyle,void 0,!0));let s=a.getBBox();if(Zt(gi().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 Rs(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(vs(e.labelText,e.labelStyle,void 0,!0));let c=s.getBBox();if(Zt(gi().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(gi().flowchart.htmlLabels)?5:3))+")");const d=i.node().getBBox();return e.height=d.height,e.intersect=function(t){return Rs(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 Rs(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 Rs(e,t)},n}};let Gs={};let Xs={},Qs={};const Ks=(t,e)=>{const n=vs(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(gi().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+")"),Xs[e.id]=i,e.width=s.width,e.height=s.height,e.startLabelLeft){const n=vs(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+")"),Qs[e.id]||(Qs[e.id]={}),Qs[e.id].startLeft=i,Js(a,e.startLabelLeft)}if(e.startLabelRight){const n=vs(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+")"),Qs[e.id]||(Qs[e.id]={}),Qs[e.id].startRight=i,Js(a,e.startLabelRight)}if(e.endLabelLeft){const n=vs(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),Qs[e.id]||(Qs[e.id]={}),Qs[e.id].endLeft=i,Js(a,e.endLabelLeft)}if(e.endLabelRight){const n=vs(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),Qs[e.id]||(Qs[e.id]={}),Qs[e.id].endRight=i,Js(a,e.endLabelRight)}return n};function Js(t,e){gi().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}const to=(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<e.x?s-a:s+a;const c=t.height/2,l=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);if(Math.abs(r-e.y)*s>Math.abs(i-e.x)*c){let t=n.y<e.y?e.y-c-r:r-c-e.y;o=h*t/l;const i={x:n.x<e.x?n.x+o:n.x-h+o,y:n.y<e.y?n.y+l-t:n.y-l+t};return 0===o&&(i.x=e.x,i.y=e.y),0===h&&(i.x=e.x),0===l&&(i.y=e.y),Bt.warn(`abc89 topp/bott calc, Q ${l}, q ${t}, R ${h}, r ${o}`,i),i}{o=n.x<e.x?e.x-s-i:i-s-e.x;let t=l*o/h,r=n.x<e.x?n.x+h-o:n.x-h+o,a=n.y<e.y?n.y+t:n.y-t;return Bt.warn(`sides calc abc89, Q ${l}, q ${t}, R ${h}, r ${o}`,{_x:r,_y:a}),0===o&&(r=e.x,a=e.y),0===h&&(r=e.x),0===l&&(a=e.y),{x:r,y:a}}})(e,i,t);Bt.warn("abc88 inside",t,i,a),Bt.warn("abc88 intersection",a);let s=!1;n.forEach((t=>{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},eo=(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=eo(h,a.graph,n,e.node(t)),r=i.elem;ws(a,r),a.diff=i.diff||0,Bt.info("Node bounds (abc123)",t,a,a.width,a.x,a.y),((t,e)=>{Ws[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(Ns(a.id,e)),Ts[a.id]={id:Ns(a.id,e),node:a}):(Bt.info("Node - the non recursive path",t,a.id,a),qs(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",Ts,"ids:",t.v,t.w,"Translateing: ",Ts[t.v],Ts[t.w]),Ks(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=>Ms(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?Hs(n):e.children(t).length>0?(((t,e)=>{Bt.trace("Inserting cluster");const n=e.shape||"rect";Gs[e.id]=Vs[n](t,e)})(s,n),Ts[n.id].node=n):Hs(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=to(n.points,i[n.toCluster].node),c=!0),n.fromCluster&&(Bt.info("from cluster abc88",i[n.fromCluster]),s=to(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((gi().flowchart.arrowMarkerAbsolute||gi().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,Ts,n,e);((t,e)=>{Bt.info("Moving label abc78 ",t.id,t.label,Xs[t.id]);let n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const i=Xs[t.id];let r=t.x,a=t.y;if(n){const i=ai.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=Qs[t.id].startLeft;let i=t.x,r=t.y;if(n){const e=ai.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=Qs[t.id].startRight;let i=t.x,r=t.y;if(n){const e=ai.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=Qs[t.id].endLeft;let i=t.x,r=t.y;if(n){const e=ai.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=Qs[t.id].endRight;let i=t.x,r=t.y;if(n){const e=ai.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}},no=(t,e,n,i,r)=>{xs(t,n,i,r),Ws={},Xs={},Qs={},Gs={},Es={},Ss={},Ts={},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: ",Ns(e,t)),Es[e]=Bs(e,t),Ts[e]={id:Ns(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,Es),i.forEach((t=>{t.v!==e&&t.w!==e&&As(t.v,e)^As(t.w,e)&&(Bt.warn("Edge: ",t," leaves cluster ",e),Bt.warn("Decendants of XXX ",e,": ",Es[e]),Ts[e].externalConnections=!0)}))):Bt.debug("Not a cluster ",e,Es)})),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",Ts,"ids:",e.v,e.w,"Translating: ",Ts[e.v]," --- ",Ts[e.w]),Ts[e.v]&&Ts[e.w]&&Ts[e.v]===Ts[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=Ds(e.v),r=Ds(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(Ts[e.v]||Ts[e.w])&&(Bt.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),i=Ds(e.v),r=Ds(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)),Os(t,0),Bt.trace(Ts))})(e),Bt.warn("Graph after:",ht.c(e)),eo(t,e,i)},io=t=>jt.sanitizeText(t,gi());let ro={dividerMargin:10,padding:5,textHeight:10};function ao(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 so={setConf:function(t){Object.keys(t).forEach((function(e){ro[e]=t[e]}))},draw:function(t,e,n,i){Bt.info("Drawing class - ",e);const r=gi().flowchart,a=gi().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:io(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:gi().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:gi().flowchart.padding})}))}(h,l,0,i),function(t,e){const n=gi().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=ao(r.relation.type1),a.arrowTypeEnd=ao(r.relation.type2);let s="",c="";if(void 0!==r.style){const t=Un(r.style);s=t.style,c=t.labelStyle}else s="fill:none";a.style=s,a.labelStyle=c,void 0!==r.interpolate?a.curve=Yn(r.interpolate,o.c_6):void 0!==t.defaultInterpolate?a.curve=Yn(t.defaultInterpolate,o.c_6):a.curve=Yn(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",gi().flowchart.htmlLabels?(a.labelType="html",a.label='<span class="edgeLabel">'+r.text+"</span>"):(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:io(l),noteData:a,rx:0,ry:0,class:"",style:c,id:a.id,domId:a.id,tooltip:"",type:"note",padding:gi().flowchart.padding}),Bt.info("setNode",{labelStyle:s,shape:h,labelText:l,rx:0,ry:0,style:c,id:a.id,type:"note",padding:gi().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=Yn(ro.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(no(y,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),ai.insertTitle(g,"classTitleText",r.titleTopMargin,i.db.getDiagramTitle()),wi(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 oo=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<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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}();oo.parser=oo;const co=oo,lo=t=>null!==t.match(/^\s*erDiagram/);let ho={},uo=[];const po=function(t){return void 0===ho[t]&&(ho[t]={attributes:[]},Bt.info("Added new entity :",t)),ho[t]},fo={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){Cp.parseDirective(this,t,e,n)},getConfig:()=>gi().er,addEntity:po,addAttributes:function(t,e){let n,i=po(t);for(n=e.length-1;n>=0;n--)i.attributes.push(e[n]),Bt.debug("Added attribute ",e[n].attributeName)},getEntities:()=>ho,addRelationship:function(t,e,n,i){let r={entityA:t,roleA:e,entityB:n,relSpec:i};uo.push(r),Bt.debug("Added new relationship :",r)},getRelationships:()=>uo,clear:function(){ho={},uo=[],Yi()},setAccTitle:zi,getAccTitle:Ui,setAccDescription:Wi,getAccDescription:qi,setDiagramTitle:Hi,getDiagramTitle:Vi},go={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"},yo=go,mo=function(t,e){let n;t.append("defs").append("marker").attr("id",go.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",go.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",go.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",go.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",go.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",go.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",go.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",go.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")},bo=/[^\dA-Za-z](\W)*/g;let _o={},xo=new Map;const vo=function(t,e,n){let i;return Object.keys(e).forEach((function(r){const a=function(t="",e=""){const n=t.replace(bo,"");return`${To(e)}${To(n)}${xt(t,Co)}`}(r,"entity");xo.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",gi().fontFamily).style("font-size",_o.fontSize+"px").text(r),{width:l,height:h}=((t,e,n)=>{const i=_o.entityPadding/3,r=_o.entityPadding/3,a=.85*_o.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",gi().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",gi().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",gi().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",gi().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(_o.minEntityWidth,Math.max(s.width+2*_o.entityPadding,m+r*y)),height:n.length>0?f:Math.max(_o.minEntityHeight,s.height+2*_o.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(_o.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},ko=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")};let wo=0;const Co="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function To(t=""){return t.length>0?`${t}-`:""}const Eo={setConf:function(t){const e=Object.keys(t);for(const n of e)_o[n]=t[n]},draw:function(t,e,n,i){_o=gi().er,Bt.info("Drawing ER diagram");const r=gi().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;mo(s,_o),c=new lt.k({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:_o.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const l=vo(s,i.db.getEntities(),c),h=function(t,e){return t.forEach((function(t){e.setEdge(xo.get(t.entityA),xo.get(t.entityB),{relationship:t},ko(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){wo++;const a=n.edge(xo.get(e.entityA),xo.get(e.entityB),ko(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",_o.stroke).style("fill","none");e.relSpec.relType===r.db.Identification.NON_IDENTIFYING&&c.attr("stroke-dasharray","8,8");let l="";switch(_o.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+"#"+yo.ZERO_OR_ONE_END+")");break;case r.db.Cardinality.ZERO_OR_MORE:c.attr("marker-end","url("+l+"#"+yo.ZERO_OR_MORE_END+")");break;case r.db.Cardinality.ONE_OR_MORE:c.attr("marker-end","url("+l+"#"+yo.ONE_OR_MORE_END+")");break;case r.db.Cardinality.ONLY_ONE:c.attr("marker-end","url("+l+"#"+yo.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case r.db.Cardinality.ZERO_OR_ONE:c.attr("marker-start","url("+l+"#"+yo.ZERO_OR_ONE_START+")");break;case r.db.Cardinality.ZERO_OR_MORE:c.attr("marker-start","url("+l+"#"+yo.ZERO_OR_MORE_START+")");break;case r.db.Cardinality.ONE_OR_MORE:c.attr("marker-start","url("+l+"#"+yo.ONE_OR_MORE_START+")");break;case r.db.Cardinality.ONLY_ONE:c.attr("marker-start","url("+l+"#"+yo.ONLY_ONE_START+")")}const h=c.node().getTotalLength(),u=c.node().getPointAtLength(.5*h),d="rel"+wo,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",gi().fontFamily).style("font-size",_o.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=_o.diagramPadding;ai.insertTitle(s,"entityTitleText",_o.titleTopMargin,i.db.getDiagramTitle());const f=s.node().getBBox(),g=f.width+2*p,y=f.height+2*p;ki(s,y,g,_o.useMaxWidth),s.attr("viewBox",`${f.x-p} ${f.y-p} ${g} ${y}`)}};var So=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],Q=[1,108],K=[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],Qt=[1,253],Kt=[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:Q,84:[1,97],91:K,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:Q,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:Q,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:Q,91:K,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:Q,91:K,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:Q,91:K,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:Q,91:K,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,91:K,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:Q,91:K,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:Q,91:K,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Q,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:Qt,113:Kt},{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:Qt,113:Kt},{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:Qt,113:Kt},{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:Qt,113:Kt},{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:Qt,113:Kt},{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:Qt,113:Kt},{26:V,52:G,66:X,67:Q,91:K,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:Q,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:Q,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:Q,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:Qt,113:Kt}),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:Q,91:K,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:Qt,113:Kt},e(ee,[2,128]),{26:V,52:G,66:X,67:Q,91:K,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:Q,91:K,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:Q,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:Qt,113:Kt}),e(pt,[2,121],{115:100,117:178,22:[1,288],26:V,52:G,66:X,67:Q,91:K,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:Q,91:K,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:Q,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:Qt,113:Kt},{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:Qt,113:Kt},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<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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}();So.parser=So;const Ao=So,Lo=(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/))},Bo=(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 No,Do,Oo=0,Mo=gi(),Io={},Fo=[],$o={},Ro=[],Zo={},Po={},jo=0,Yo=!0,zo=[];const Uo=t=>jt.sanitizeText(t,Mo),Wo=function(t,e,n){Cp.parseDirective(this,t,e,n)},qo=function(t){const e=Object.keys(Io);for(const n of e)if(Io[n].id===t)return Io[n].domId;return t},Ho=function(t,e,n,i,r,a,s={}){let o,c=t;void 0!==c&&0!==c.trim().length&&(void 0===Io[c]&&(Io[c]={id:c,domId:"flowchart-"+c+"-"+Oo,styles:[],classes:[]}),Oo++,void 0!==e?(Mo=gi(),o=Uo(e.trim()),'"'===o[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),Io[c].text=o):void 0===Io[c].text&&(Io[c].text=t),void 0!==n&&(Io[c].type=n),null!=i&&i.forEach((function(t){Io[c].styles.push(t)})),null!=r&&r.forEach((function(t){Io[c].classes.push(t)})),void 0!==a&&(Io[c].dir=a),void 0===Io[c].props?Io[c].props=s:void 0!==s&&Object.assign(Io[c].props,s))},Vo=function(t,e,n,i){const r={start:t,end:e,type:void 0,text:""};void 0!==(i=n.text)&&(r.text=Uo(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),Fo.push(r)},Go=function(t,e,n,i){let r,a;for(r=0;r<t.length;r++)for(a=0;a<e.length;a++)Vo(t[r],e[a],n,i)},Xo=function(t,e){t.forEach((function(t){"default"===t?Fo.defaultInterpolate=e:Fo[t].interpolate=e}))},Qo=function(t,e){t.forEach((function(t){"default"===t?Fo.defaultStyle=e:(-1===ai.isSubstringInArray("fill",e)&&e.push("fill:none"),Fo[t].style=e)}))},Ko=function(t,e){void 0===$o[t]&&($o[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){const n=e.replace("fill","bgFill").replace("color","fill");$o[t].textStyles.push(n)}$o[t].styles.push(e)}))},Jo=function(t){No=t,No.match(/.*</)&&(No="RL"),No.match(/.*\^/)&&(No="BT"),No.match(/.*>/)&&(No="LR"),No.match(/.*v/)&&(No="TB"),"TD"===No&&(No="TB")},tc=function(t,e){t.split(",").forEach((function(t){let n=t;void 0!==Io[n]&&Io[n].classes.push(e),void 0!==Zo[n]&&Zo[n].classes.push(e)}))},ec=function(t,e,n){t.split(",").forEach((function(t){void 0!==Io[t]&&(Io[t].link=ai.formatUrl(e,Mo),Io[t].linkTarget=n)})),tc(t,"clickable")},nc=function(t){return Po[t]},ic=function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){let i=qo(t);if("loose"!==gi().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<r.length;t++){let e=r[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(t),void 0!==Io[t]&&(Io[t].haveCallback=!0,zo.push((function(){const t=document.querySelector(`[id="${i}"]`);null!==t&&t.addEventListener("click",(function(){ai.runFunc(e,...r)}),!1)})))}(t,e,n)})),tc(t,"clickable")},rc=function(t){zo.forEach((function(e){e(t)}))},ac=function(){return No.trim()},sc=function(){return Io},oc=function(){return Fo},cc=function(){return $o},lc=function(t){let e=(0,o.Ys)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,o.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0));(0,o.Ys)(t).select("svg").selectAll("g.node").on("mouseover",(function(){const t=(0,o.Ys)(this);if(null===t.attr("title"))return;const n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,o.Ys)(this).classed("hover",!1)}))};zo.push(lc);const hc=function(t="gen-1"){Io={},$o={},Fo=[],zo=[lc],Ro=[],Zo={},jo=0,Po=[],Yo=!0,Do=t,Yi()},uc=t=>{Do=t||"gen-2"},dc=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},pc=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"===Do)for(let l=0;l<a.length;l++)a[l]=qo(a[l]);i=i||"subGraph"+jo,r=r||"",r=Uo(r),jo+=1;const c={id:i,nodes:a,title:r.trim(),classes:[],dir:o};return Bt.info("Adding",c.id,c.nodes,c.dir),c.nodes=Cc(c,Ro).nodes,Ro.push(c),Zo[i]=c,i},fc=function(t){for(const[e,n]of Ro.entries())if(n.id===t)return e;return-1};let gc=-1;const yc=[],mc=function(t,e){const n=Ro[e].nodes;if(gc+=1,gc>2e3)return;if(yc[gc]=e,Ro[e].id===t)return{result:!0,count:0};let i=0,r=1;for(;i<n.length;){const e=fc(n[i]);if(e>=0){const n=mc(t,e);if(n.result)return{result:!0,count:r+n.count};r+=n.count}i+=1}return{result:!1,count:r}},bc=function(t){return yc[t]},_c=function(){gc=-1,Ro.length>0&&mc("none",Ro.length-1)},xc=function(){return Ro},vc=()=>!!Yo&&(Yo=!1,!0),kc=(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<n;++r)e[r]===t&&++i;return i})(".",n);return s&&(r="dotted",a=s),{type:i,stroke:r,length:a}})(t);let i;if(e){if(i=(t=>{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},wc=(t,e)=>{let n=!1;return t.forEach((t=>{t.nodes.indexOf(e)>=0&&(n=!0)})),n},Cc=(t,e)=>{const n=[];return t.nodes.forEach(((i,r)=>{wc(e,i)||n.push(t.nodes[r])})),{nodes:n}},Tc={firstGraph:vc},Ec={parseDirective:Wo,defaultConfig:()=>oi.flowchart,setAccTitle:zi,getAccTitle:Ui,getAccDescription:qi,setAccDescription:Wi,addVertex:Ho,lookUpDomId:qo,addLink:Go,updateLinkInterpolate:Xo,updateLink:Qo,addClass:Ko,setDirection:Jo,setClass:tc,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(Po["gen-1"===Do?qo(t):t]=Uo(e))}))},getTooltip:nc,setClickEvent:ic,setLink:ec,bindFunctions:rc,getDirection:ac,getVertices:sc,getEdges:oc,getClasses:cc,clear:hc,setGen:uc,defaultStyle:dc,addSubGraph:pc,getDepthFirstPos:bc,indexNodes:_c,getSubGraphs:xc,destructLink:kc,lex:Tc,exists:wc,makeUniq:Cc,setDiagramTitle:Hi,getDiagramTitle:Vi},Sc=Object.freeze(Object.defineProperty({__proto__:null,addClass:Ko,addLink:Go,addSingleLink:Vo,addSubGraph:pc,addVertex:Ho,bindFunctions:rc,clear:hc,default:Ec,defaultStyle:dc,destructLink:kc,firstGraph:vc,getClasses:cc,getDepthFirstPos:bc,getDirection:ac,getEdges:oc,getSubGraphs:xc,getTooltip:nc,getVertices:sc,indexNodes:_c,lex:Tc,lookUpDomId:qo,parseDirective:Wo,setClass:tc,setClickEvent:ic,setDirection:Jo,setGen:uc,setLink:ec,updateLink:Qo,updateLinkInterpolate:Xo},Symbol.toStringTag,{value:"Module"}));const Ac={},Lc=function(t){const e=Object.keys(t);for(const n of e)Ac[n]=t[n]},Bc={},Nc=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=Un(i.styles);let l,h=void 0!==i.text?i.text:i.id;if(Zt(gi().flowchart.htmlLabels)){const t={label:h.replace(/fa[blrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`))};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:gi().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:gi().flowchart.padding})}))},Dc=function(t,e,n){Bt.info("abc78 edges = ",t);let i,r,a=0,s={};if(void 0!==t.defaultStyle){const e=Un(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=Un(n.style);p=t.style,f=t.labelStyle}d.style=d.style+=p,d.labelStyle=d.labelStyle+=f,void 0!==n.interpolate?d.curve=Yn(n.interpolate,o.c_6):void 0!==t.defaultInterpolate?d.curve=Yn(t.defaultInterpolate,o.c_6):d.curve=Yn(Bc.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)}))},Oc={setConf:function(t){const e=Object.keys(t);for(const n of e)Bc[n]=t[n]},addVertices:Nc,addEdges:Dc,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(),Ec.setGen("gen-2"),i.parser.parse(t);let r=i.db.getDirection();void 0===r&&(r="TD");const{securityLevel:a,flowchart:s}=gi(),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<f.nodes.length;t++)Bt.info("Setting up subgraphs",f.nodes[t],f.id),p.setParent(f.nodes[t],f.id)}Nc(y,p,e,u,d,i),Dc(m,p);const _=u.select(`[id="${e}"]`),x=u.select("#"+e+" g");if(no(x,p,["point","circle","cross"],"flowchart",e),ai.insertTitle(_,"flowchartTitleText",s.titleTopMargin,i.db.getDiagramTitle()),wi(p,_,s.diagramPadding,s.useMaxWidth),i.db.indexNodes("subGraph"+b),!s.htmlLabels){const t=d.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const e of t){const t=e.getBBox(),n=d.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("rx",0),n.setAttribute("ry",0),n.setAttribute("width",t.width),n.setAttribute("height",t.height),e.insertBefore(n,e.firstChild)}}Object.keys(y).forEach((function(t){const n=y[t];if(n.link){const i=(0,o.Ys)("#"+e+' [id="'+t+'"]');if(i){const t=d.createElementNS("http://www.w3.org/2000/svg","a");t.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),t.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===a?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);const e=i.insert((function(){return t}),":first-child"),r=i.select(".label-container");r&&e.append((function(){return r.node()}));const s=i.select(".label");s&&e.append((function(){return s.node()}))}}}))}};var Mc=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=[7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],a=[1,15],s=[1,16],o=[1,17],c=[1,18],l=[1,19],h=[1,20],u=[1,21],d=[1,22],p=[1,23],f=[1,24],g=[1,25],y=[1,26],m=[1,27],b=[1,29],_=[1,31],x=[1,34],v=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],k={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,tickInterval:16,excludes:17,includes:18,todayMarker:19,title:20,acc_title:21,acc_title_value:22,acc_descr:23,acc_descr_value:24,acc_descr_multiline_value:25,section:26,clickStatement:27,taskTxt:28,taskData:29,openDirective:30,typeDirective:31,closeDirective:32,":":33,argDirective:34,click:35,callbackname:36,callbackargs:37,href:38,clickStatementDebug:39,open_directive:40,type_directive:41,arg_directive:42,close_directive:43,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"tickInterval",17:"excludes",18:"includes",19:"todayMarker",20:"title",21:"acc_title",22:"acc_title_value",23:"acc_descr",24:"acc_descr_value",25:"acc_descr_multiline_value",26:"section",28:"taskTxt",29:"taskData",33:":",35:"click",36:"callbackname",37:"callbackargs",38:"href",40:"open_directive",41:"type_directive",42:"arg_directive",43:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[27,2],[27,3],[27,3],[27,4],[27,3],[27,4],[27,2],[39,2],[39,3],[39,3],[39,4],[39,3],[39,4],[39,2],[30,1],[31,1],[34,1],[32,1]],performAction:function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 2:return a[o-1];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:this.$=a[o];break;case 9:i.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 10:i.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 11:i.TopAxis(),this.$=a[o].substr(8);break;case 12:i.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 13:i.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 14:i.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 15:i.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 16:i.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 17:i.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 18:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 19:case 20:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 21:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 23:i.addTask(a[o-1],a[o]),this.$="task";break;case 27:this.$=a[o-1],i.setClickEvent(a[o-1],a[o],null);break;case 28:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 29:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],null),i.setLink(a[o-2],a[o]);break;case 30:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setLink(a[o-3],a[o]);break;case 31:this.$=a[o-2],i.setClickEvent(a[o-2],a[o],null),i.setLink(a[o-2],a[o-1]);break;case 32:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-1],a[o]),i.setLink(a[o-3],a[o-2]);break;case 33:this.$=a[o-1],i.setLink(a[o-1],a[o]);break;case 34:case 40:this.$=a[o-1]+" "+a[o];break;case 35:case 36:case 38:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 37:case 39:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o];break;case 41:i.parseDirective("%%{","open_directive");break;case 42:i.parseDirective(a[o],"type_directive");break;case 43:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 44:i.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:n,30:4,40:i},{1:[3]},{3:6,4:2,5:n,30:4,40:i},e(r,[2,3],{6:7}),{31:8,41:[1,9]},{41:[2,41]},{1:[2,1]},{4:30,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:a,13:s,14:o,15:c,16:l,17:h,18:u,19:d,20:p,21:f,23:g,25:y,26:m,27:28,28:b,30:4,35:_,40:i},{32:32,33:[1,33],43:x},e([33,43],[2,42]),e(r,[2,8],{1:[2,2]}),e(r,[2,4]),{4:30,10:35,12:a,13:s,14:o,15:c,16:l,17:h,18:u,19:d,20:p,21:f,23:g,25:y,26:m,27:28,28:b,30:4,35:_,40:i},e(r,[2,6]),e(r,[2,7]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),e(r,[2,17]),{22:[1,36]},{24:[1,37]},e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),{29:[1,38]},e(r,[2,24]),{36:[1,39],38:[1,40]},{11:[1,41]},{34:42,42:[1,43]},{11:[2,44]},e(r,[2,5]),e(r,[2,18]),e(r,[2,19]),e(r,[2,23]),e(r,[2,27],{37:[1,44],38:[1,45]}),e(r,[2,33],{36:[1,46]}),e(v,[2,25]),{32:47,43:x},{43:[2,43]},e(r,[2,28],{38:[1,48]}),e(r,[2,29]),e(r,[2,31],{37:[1,49]}),{11:[1,50]},e(r,[2,30]),e(r,[2,32]),e(v,[2,26])],defaultActions:{5:[2,41],6:[2,1],34:[2,44],43:[2,43]},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;a<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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}();Mc.parser=Mc;const Ic=Mc,Fc=t=>null!==t.match(/^\s*gantt/);a().extend(wt()),a().extend(Tt()),a().extend(St());let $c,Rc="",Zc="",Pc="",jc=[],Yc=[],zc={},Uc=[],Wc=[],qc="";const Hc=["active","done","crit","milestone"];let Vc=[],Gc=!1,Xc=!1,Qc=0;const Kc=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()))))},Jc=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]=tl(r,s,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c},tl=function(t,e,n,i,r){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),a=Kc(t,n,i,r),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},el=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=hl(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}},nl=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},il=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]=nl(n);if(!Number.isNaN(o)){const t=s.add(o,c);t.isValid()&&(s=t)}return s.toDate()};let rl=0;const al=function(t){return void 0===t?(rl+=1,"task"+rl):t};let sl,ol,cl=[];const ll={},hl=function(t){const e=ll[t];return cl[e]},ul=function(){const t=function(t){const e=cl[t];let n="";switch(cl[t].raw.startTime.type){case"prevTaskEnd":{const t=hl(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=el(0,Rc,cl[t].raw.startTime.startData),n&&(cl[t].startTime=n)}return cl[t].startTime&&(cl[t].endTime=il(cl[t].startTime,Rc,cl[t].raw.endTime.data,Gc),cl[t].endTime&&(cl[t].processed=!0,cl[t].manualEndTime=a()(cl[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Jc(cl[t],Rc,Yc,jc))),cl[t].processed};let e=!0;for(const[n,i]of cl.entries())t(n),e=e&&i.processed;return e},dl=function(t,e){t.split(",").forEach((function(t){let n=hl(t);void 0!==n&&n.classes.push(e)}))},pl=function(t,e){Vc.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()}))}))},fl={parseDirective:function(t,e,n){Cp.parseDirective(this,t,e,n)},getConfig:()=>gi().gantt,clear:function(){Uc=[],Wc=[],qc="",Vc=[],rl=0,sl=void 0,ol=void 0,cl=[],Rc="",Zc="",$c=void 0,Pc="",jc=[],Yc=[],Gc=!1,Xc=!1,Qc=0,zc={},Yi()},setDateFormat:function(t){Rc=t},getDateFormat:function(){return Rc},enableInclusiveEndDates:function(){Gc=!0},endDatesAreInclusive:function(){return Gc},enableTopAxis:function(){Xc=!0},topAxisEnabled:function(){return Xc},setAxisFormat:function(t){Zc=t},getAxisFormat:function(){return Zc},setTickInterval:function(t){$c=t},getTickInterval:function(){return $c},setTodayMarker:function(t){Pc=t},getTodayMarker:function(){return Pc},setAccTitle:zi,getAccTitle:Ui,setDiagramTitle:Hi,getDiagramTitle:Vi,setAccDescription:Wi,getAccDescription:qi,addSection:function(t){qc=t,Uc.push(t)},getSections:function(){return Uc},getTasks:function(){let t=ul();let e=0;for(;!t&&e<10;)t=ul(),e++;return Wc=cl,Wc},addTask:function(t,e){const n={section:qc,type:qc,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={};gl(i,r,Hc);for(let a=0;a<i.length;a++)i[a]=i[a].trim();switch(i.length){case 1:r.id=al(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:i[0]};break;case 2:r.id=al(),r.startTime={type:"getStartDate",startData:i[0]},r.endTime={data:i[1]};break;case 3:r.id=al(i[0]),r.startTime={type:"getStartDate",startData:i[1]},r.endTime={data:i[2]}}return r}(ol,e);n.raw.startTime=i.startTime,n.raw.endTime=i.endTime,n.id=i.id,n.prevTaskId=ol,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.order=Qc,Qc++;const r=cl.push(n);ol=n.id,ll[n.id]=r-1},findTaskById:hl,addTaskOrg:function(t,e){const n={section:qc,type:qc,description:t,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={};gl(i,r,Hc);for(let a=0;a<i.length;a++)i[a]=i[a].trim();let s="";switch(i.length){case 1:r.id=al(),r.startTime=t.endTime,s=i[0];break;case 2:r.id=al(),r.startTime=el(0,Rc,i[0]),s=i[1];break;case 3:r.id=al(i[0]),r.startTime=el(0,Rc,i[1]),s=i[2]}return s&&(r.endTime=il(r.startTime,Rc,s,Gc),r.manualEndTime=a()(s,"YYYY-MM-DD",!0).isValid(),Jc(r,Rc,Yc,jc)),r}(sl,e);n.startTime=i.startTime,n.endTime=i.endTime,n.id=i.id,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,sl=n,Wc.push(n)},setIncludes:function(t){jc=t.toLowerCase().split(/[\s,]+/)},getIncludes:function(){return jc},setExcludes:function(t){Yc=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return Yc},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"!==gi().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t),void 0!==hl(t)&&pl(t,(()=>{ai.runFunc(e,...i)}))}(t,e,n)})),dl(t,"clickable")},setLink:function(t,e){let n=e;"loose"!==gi().securityLevel&&(n=(0,s.Nm)(e)),t.split(",").forEach((function(t){void 0!==hl(t)&&(pl(t,(()=>{window.open(n,"_self")})),zc[t]=n)})),dl(t,"clickable")},getLinks:function(){return zc},bindFunctions:function(t){Vc.forEach((function(e){e(t)}))},parseDuration:nl,isInvalidDate:Kc};function gl(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 yl;const ml={setConf:function(){Bt.debug("Something is calling, setConf, remove the call")},draw:function(t,e,n,i){const r=gi().gantt,s=gi().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);yl=u.parentElement.offsetWidth,void 0===yl&&(yl=1200),void 0!==r.useWidth&&(yl=r.useWidth);const d=i.db.getTasks(),p=d.length*(r.barHeight+r.barGap)+2*r.topPadding;u.setAttribute("viewBox","0 0 "+yl+" "+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,yl-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<r;++i)Object.prototype.hasOwnProperty.call(e,t[i])||(e[t[i]]=!0,n.push(t[i]));return n}(y),d.sort((function(t,e){const n=t.startTime,i=e.startTime;let r=0;return n>i?r=1:n<i&&(r=-1),r})),function(t,n,s){const c=r.barHeight,l=c+r.barGap,u=r.topPadding,d=r.leftPadding;(0,o.BYU)().domain([0,y.length]).range(["#00B9FA","#F95002"]).interpolate(o.JHv);(function(t,e,n,s,o,c,l,h){const u=c.reduce(((t,{startTime:e})=>t?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"===gi().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;s<a;s++)return i+=n[a-1][1],r[1]*t/2+i*t+e})).attr("font-size",r.sectionFontSize).attr("font-size",r.sectionFontSize).attr("class",(function(t){for(const[e,n]of y.entries())if(t[0]===n)return"sectionTitle sectionTitle"+e%r.numberSectionStyles;return"sectionTitle"}))}(l,u),function(t,e,n,a){const s=i.db.getTodayMarker();if("off"===s)return;const o=f.append("g").attr("class","today"),c=new Date,l=o.append("line");l.attr("x1",g(c)+t).attr("x2",g(c)+t).attr("y1",r.titleTopMargin).attr("y2",a-r.titleTopMargin).attr("class","today"),""!==s&&l.attr("style",s.replace(/,/g,";"))}(d,0,0,s)}(d,yl,p),ki(f,p,yl,r.useMaxWidth),f.append("text").text(i.db.getDiagramTitle()).attr("x",yl/2).attr("y",r.titleTopMargin).attr("class","titleText")}};var bl=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[6,9,10],i={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,i,r,a,s){switch(a.length,r){case 1:return i;case 4:break;case 6:i.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6])],defaultActions:{4:[2,1]},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}},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<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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}();bl.parser=bl;const _l=bl;var xl="",vl=!1;const kl={setMessage:t=>{Bt.debug("Setting message to: "+t),xl=t},getMessage:()=>xl,setInfo:t=>{vl=t},getInfo:()=>vl,clear:Yi},wl={draw:(t,e,n)=>{try{Bt.debug("Rendering info diagram\n"+t);const i=gi().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)}}},Cl=t=>null!==t.match(/^\s*info/);var Tl=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<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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}();Tl.parser=Tl;const El=Tl,Sl=t=>null!==t.match(/^\s*pie/)||null!==t.match(/^\s*bar/);let Al={},Ll=!1;const Bl={parseDirective:function(t,e,n){Cp.parseDirective(this,t,e,n)},getConfig:()=>gi().pie,addSection:function(t,e){t=jt.sanitizeText(t,gi()),void 0===Al[t]&&(Al[t]=e,Bt.debug("Added new section :",t))},getSections:()=>Al,cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Al={},Ll=!1,Yi()},setAccTitle:zi,getAccTitle:Ui,setDiagramTitle:Hi,getDiagramTitle:Vi,setShowData:function(t){Ll=t},getShowData:function(){return Ll},getAccDescription:qi,setAccDescription:Wi};let Nl,Dl=gi();const Ol=450,Ml={draw:(t,e,n,i)=>{try{Dl=gi(),Bt.debug("Rendering info diagram\n"+t);const n=gi().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);Nl=_.parentElement.offsetWidth,void 0===Nl&&(Nl=1200),void 0!==Dl.useWidth&&(Nl=Dl.useWidth),void 0!==Dl.pie.useWidth&&(Nl=Dl.pie.useWidth);const x=m.select("#"+e);ki(x,Ol,Nl,Dl.pie.useMaxWidth),_.setAttribute("viewBox","0 0 "+Nl+" "+Ol);var r=18,a=Math.min(Nl,Ol)/2-40,s=x.append("g").attr("transform","translate("+Nl/2+",225)"),c=i.db.getSections(),l=0;Object.keys(c).forEach((function(t){l+=c[t]}));const v=Dl.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()||Dl.showData||Dl.pie.showData?t.data.name+" ["+t.data.value+"]":t.data.name}))}catch(y){Bt.error("Error while rendering info diagram"),Bt.error(y)}}};var Il=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<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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}();Il.parser=Il;const Fl=Il,$l=t=>null!==t.match(/^\s*requirement(Diagram)?/);let Rl=[],Zl={},Pl={},jl={},Yl={};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){Cp.parseDirective(this,t,e,n)},getConfig:()=>gi().req,addRequirement:(t,e)=>(void 0===Pl[t]&&(Pl[t]={name:t,type:e,id:Zl.id,text:Zl.text,risk:Zl.risk,verifyMethod:Zl.verifyMethod}),Zl={},Pl[t]),getRequirements:()=>Pl,setNewReqId:t=>{void 0!==Zl&&(Zl.id=t)},setNewReqText:t=>{void 0!==Zl&&(Zl.text=t)},setNewReqRisk:t=>{void 0!==Zl&&(Zl.risk=t)},setNewReqVerifyMethod:t=>{void 0!==Zl&&(Zl.verifyMethod=t)},setAccTitle:zi,getAccTitle:Ui,setAccDescription:Wi,getAccDescription:qi,addElement:t=>(void 0===Yl[t]&&(Yl[t]={name:t,type:jl.type,docRef:jl.docRef},Bt.info("Added new requirement: ",t)),jl={},Yl[t]),getElements:()=>Yl,setNewElementType:t=>{void 0!==jl&&(jl.type=t)},setNewElementDocRef:t=>{void 0!==jl&&(jl.docRef=t)},addRelationship:(t,e,n)=>{Rl.push({type:t,src:e,dst:n})},getRelationships:()=>Rl,clear:()=>{Rl=[],Zl={},Pl={},jl={},Yl={},Yi()}},Ul={CONTAINS:"contains",ARROW:"arrow"},Wl=Ul,ql=(t,e)=>{let n=t.append("defs").append("marker").attr("id",Ul.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",Ul.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 Hl={},Vl=0;const Gl=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Hl.rect_min_width+"px").attr("height",Hl.rect_min_height+"px"),Xl=(t,e,n)=>{let i=Hl.rect_min_width/2,r=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",i).attr("y",Hl.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((t=>{0==a?r.append("tspan").attr("text-anchor","middle").attr("x",Hl.rect_min_width/2).attr("dy",0).text(t):r.append("tspan").attr("text-anchor","middle").attr("x",Hl.rect_min_width/2).attr("dy",.75*Hl.line_height).text(t),a++}));let s=1.5*Hl.rect_padding+a*Hl.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Hl.rect_min_width).attr("y1",s).attr("y2",s),{titleNode:r,y:s}},Ql=(t,e,n,i)=>{let r=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Hl.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",Hl.rect_padding).attr("dy",Hl.line_height).text(t)})),r},Kl=function(t,e,n,i,r){const a=n.edge(Jl(e.src),Jl(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(Hl.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(c.attr("stroke-dasharray","10,7"),c.attr("marker-end","url("+jt.getUrl(Hl.arrowMarkerAbsolute)+"#"+Wl.ARROW+"_line_ending)")),((t,e,n,i)=>{const r=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*r),s="rel"+Vl;Vl++;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}>>`)},Jl=t=>t.replace(/\s/g,"").replace(/\./g,"_"),th={draw:(t,e,n,i)=>{Hl=gi().requirement,i.db.clear(),i.parser.parse(t);const r=Hl.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}']`);ql(s,Hl);const c=new lt.k({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Hl.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=Jl(t),Bt.info("Added new requirement: ",t);const n=f.append("g").attr("id",t),i=Gl(n,"req-"+t);let r=Xl(n,t+"_title",[`<<${e.type}>>`,`${e.name}`]);Ql(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=Jl(i),s=n.append("g").attr("id",a),o="element-"+a,c=Gl(s,o);let l=Xl(s,o+"_title",["<<Element>>",`${i}`]);Ql(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=Jl(t.src),i=Jl(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){Kl(s,t,c,e,i)}));const g=Hl.rect_padding,y=s.node().getBBox(),m=y.width+2*g,b=y.height+2*g;ki(s,b,m,Hl.useMaxWidth),s.attr("viewBox",`${y.x-g} ${y.y-g} ${m} ${b}`)}};var eh=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<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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}();eh.parser=eh;const nh=eh,ih=t=>null!==t.match(/^\s*sequenceDiagram/);let rh,ah,sh,oh={},ch=[],lh=[],hh=!1;const uh=function(t,e,n,i){let r=sh;const a=oh[t];if(a){if(sh&&a.box&&sh!==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 '"+sh.name+"' at the same time.");if(r=a.box?a.box:sh,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}),oh[t]={box:r,name:e,description:n.text,wrap:void 0===n.wrap&&fh()||!!n.wrap,prevActor:rh,links:{},properties:{},actorCnt:null,rectData:null,type:i||"participant"},rh&&oh[rh]&&(oh[rh].nextActor=t),sh&&sh.actorKeys.push(t),rh=t},dh=function(t,e,n={text:void 0,wrap:void 0},i){if(i===gh.ACTIVE_END){const e=(t=>{let e,n=0;for(e=0;e<lh.length;e++)lh[e].type===gh.ACTIVE_START&&lh[e].from.actor===t&&n++,lh[e].type===gh.ACTIVE_END&&lh[e].from.actor===t&&n--;return n})(t.actor);if(e<1){let e=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return lh.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&fh()||!!n.wrap,type:i}),!0},ph=function(t){return oh[t]},fh=()=>void 0!==ah?ah:gi().sequence.wrap,gh={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},yh=function(t,e,n){n.text,void 0===n.wrap&&fh()||n.wrap;const i=[].concat(t,t);lh.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&fh()||!!n.wrap,type:gh.NOTE,placement:e})},mh=function(t,e){const n=ph(t);try{let t=It(e.text,gi());t=t.replace(/&amp;/g,"&"),t=t.replace(/&equals;/g,"=");bh(n,JSON.parse(t))}catch(i){Bt.error("error while parsing actor link text",i)}};function bh(t,e){if(null==t.links)t.links=e;else for(let n in e)t.links[n]=e[n]}const _h=function(t,e){const n=ph(t);try{let t=It(e.text,gi());xh(n,JSON.parse(t))}catch(i){Bt.error("error while parsing actor properties text",i)}};function xh(t,e){if(null==t.properties)t.properties=e;else for(let n in e)t.properties[n]=e[n]}const vh=function(t,e){const n=ph(t),i=document.getElementById(e.text);try{const t=i.innerHTML,e=JSON.parse(t);e.properties&&xh(n,e.properties),e.links&&bh(n,e.links)}catch(r){Bt.error("error while parsing actor details text",r)}},kh=function(t){if(Array.isArray(t))t.forEach((function(t){kh(t)}));else switch(t.type){case"sequenceIndex":lh.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":uh(t.actor,t.actor,t.description,"participant");break;case"addActor":uh(t.actor,t.actor,t.description,"actor");break;case"activeStart":case"activeEnd":dh(t.actor,void 0,void 0,t.signalType);break;case"addNote":yh(t.actor,t.placement,t.text);break;case"addLinks":mh(t.actor,t.text);break;case"addALink":!function(t,e){const n=ph(t);try{const t={};let s=It(e.text,gi());var i=s.indexOf("@");s=s.replace(/&amp;/g,"&"),s=s.replace(/&equals;/g,"=");var r=s.slice(0,i-1).trim(),a=s.slice(i+1).trim();t[r]=a,bh(n,t)}catch(s){Bt.error("error while parsing actor link text",s)}}(t.actor,t.text);break;case"addProperties":_h(t.actor,t.text);break;case"addDetails":vh(t.actor,t.text);break;case"addMessage":dh(t.from,t.to,t.msg,t.signalType);break;case"boxStart":e=t.boxData,ch.push({name:e.text,wrap:void 0===e.wrap&&fh()||!!e.wrap,fill:e.color,actorKeys:[]}),sh=ch.slice(-1)[0];break;case"boxEnd":sh=void 0;break;case"loopStart":dh(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":dh(void 0,void 0,void 0,t.signalType);break;case"rectStart":dh(void 0,void 0,t.color,t.signalType);break;case"optStart":dh(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":dh(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":zi(t.text);break;case"parStart":case"and":dh(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":dh(void 0,void 0,t.criticalText,t.signalType);break;case"option":dh(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":dh(void 0,void 0,t.breakText,t.signalType)}var e},wh={addActor:uh,addMessage:function(t,e,n,i){lh.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&fh()||!!n.wrap,answer:i})},addSignal:dh,addLinks:mh,addDetails:vh,addProperties:_h,autoWrap:fh,setWrap:function(t){ah=t},enableSequenceNumbers:function(){hh=!0},disableSequenceNumbers:function(){hh=!1},showSequenceNumbers:()=>hh,getMessages:function(){return lh},getActors:function(){return oh},getActor:ph,getActorKeys:function(){return Object.keys(oh)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:Ui,getBoxes:function(){return ch},getDiagramTitle:Vi,setDiagramTitle:Hi,parseDirective:function(t,e,n){Cp.parseDirective(this,t,e,n)},getConfig:()=>gi().sequence,clear:function(){oh={},ch=[],lh=[],hh=!1,Yi()},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:/,""),gi()):void 0,wrap:void 0!==i?null!==i.match(/^:?wrap:/)||null===i.match(/^:?nowrap:/)&&void 0:void 0}},LINETYPE:gh,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:yh,setAccTitle:zi,apply:kh,setAccDescription:Wi,getAccDescription:qi,hasAtLeastOneBox:function(){return ch.length>0},hasAtLeastOneBoxWithTitle:function(){return ch.some((t=>t.name))}};let Ch=[];const Th=()=>{Ch.forEach((t=>{t()})),Ch=[]},Eh=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},Sh=(t,e)=>{var n;n=()=>{const n=document.querySelectorAll(t);0!==n.length&&(n[0].addEventListener("mouseover",(function(){Bh("actor"+e+"_popup")})),n[0].addEventListener("mouseout",(function(){Nh("actor"+e+"_popup")})))},Ch.push(n)},Ah=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)},Lh=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)},Bh=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},Nh=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},Dh=function(t,e){let n=0,i=0;const r=e.text.split(jt.lineBreakRegex),[a,s]=ri(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},Oh=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,Dh(t,e),n};let Mh=-1;const Ih=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},Fh=function(t,e){Eh(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()},$h=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}},Rh=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Zh=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]=ri(l),f=t.split(jt.lineBreakRegex);for(let g=0;g<f.length;g++){const t=g*d-d*(f.length-1)/2,c=e.append("text").attr("x",n+a/2).attr("y",r).style("text-anchor","middle").style("font-size",p).style("font-weight",u).style("font-family",h);c.append("tspan").attr("x",n+a/2).attr("dy",t).text(f[g]),c.attr("y",r+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(c,o)}}function n(t,n,r,a,s,o,c,l){const h=n.append("switch"),u=h.append("foreignObject").attr("x",r).attr("y",a).attr("width",s).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,r,a,s,o,c,l),i(u,c)}function i(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),Ph=function(){function t(t,e,n,r,a,s,o){i(e.append("text").attr("x",n).attr("y",r).style("text-anchor","start").text(t),o)}function e(t,e,n,r,a,s,o,c){const{actorFontSize:l,actorFontFamily:h,actorFontWeight:u}=c,d=t.split(jt.lineBreakRegex);for(let p=0;p<d.length;p++){const t=p*l-l*(d.length-1)/2,a=e.append("text").attr("x",n).attr("y",r).style("text-anchor","start").style("font-size",l).style("font-weight",u).style("font-family",h);a.append("tspan").attr("x",n).attr("dy",t).text(d[p]),a.attr("y",r+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(a,o)}}function n(t,n,r,a,s,o,c,l){const h=n.append("switch"),u=h.append("foreignObject").attr("x",r).attr("y",a).attr("width",s).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,r,a,0,o,c,l),i(u,c)}function i(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),jh={drawRect:Eh,drawText:Dh,drawLabel:Oh,drawActor:function(t,e,n,i){switch(e.type){case"actor":return function(t,e,n,i){const r=e.x+e.width/2,a=e.y+80;i||(Mh++,t.append("line").attr("id","actor"+Mh).attr("x1",r).attr("y1",a).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const s=t.append("g");s.attr("class","actor-man");const o=Rh();o.x=e.x,o.y=e.y,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,s.append("line").attr("id","actor-man-torso"+Mh).attr("x1",r).attr("y1",e.y+25).attr("x2",r).attr("y2",e.y+45),s.append("line").attr("id","actor-man-arms"+Mh).attr("x1",r-18).attr("y1",e.y+33).attr("x2",r+18).attr("y2",e.y+33),s.append("line").attr("x1",r-18).attr("y1",e.y+60).attr("x2",r).attr("y2",e.y+45),s.append("line").attr("x1",r).attr("y1",e.y+45).attr("x2",r+16).attr("y2",e.y+60);const c=s.append("circle");c.attr("cx",e.x+e.width/2),c.attr("cy",e.y+10),c.attr("r",15),c.attr("width",e.width),c.attr("height",e.height);const l=s.node().getBBox();return e.height=l.height,Zh(n)(e.description,s,o.x,o.y+35,o.width,o.height,{class:"actor"},n),e.height}(t,e,n,i);case"participant":return function(t,e,n,i){const r=e.x+e.width/2,a=e.y+5,s=t.append("g");var o=s;i||(Mh++,o.append("line").attr("id","actor"+Mh).attr("x1",r).attr("y1",a).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),o=s.append("g"),e.actorCnt=Mh,null!=e.links&&(o.attr("id","root-"+Mh),Sh("#root-"+Mh,Mh)));const c=Rh();var l="actor";null!=e.properties&&e.properties.class?l=e.properties.class:c.fill="#eaeaea",c.x=e.x,c.y=e.y,c.width=e.width,c.height=e.height,c.class=l,c.rx=3,c.ry=3;const h=Eh(o,c);if(e.rectData=c,null!=e.properties&&e.properties.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?Lh(o,c.x+c.width-20,c.y+10,t.substr(1)):Ah(o,c.x+c.width-20,c.y+10,t)}Zh(n)(e.description,o,c.x,c.y,c.width,c.height,{class:"actor"},n);let u=e.height;if(h.node){const t=h.node().getBBox();e.height=t.height,u=t.height}return u}(t,e,n,i)}},drawBox:function(t,e,n){const i=t.append("g");Fh(i,e),e.name&&Zh(n)(e.name,i,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},n),i.lower()},drawPopup:function(t,e,n,i,r){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const a=e.links,o=e.actorCnt,c=e.rectData;var l="none";r&&(l="block !important");const h=t.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",l),Sh("#actor"+o+"_popup",o);var u="";void 0!==c.class&&(u=" "+c.class);let d=c.width>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"),Ph(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:Ah,drawEmbeddedImage:Lh,anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,n,i,r){const a=Rh(),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,Eh(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=$h();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",Oh(u,p),p=$h(),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=Dh(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=Dh(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:Fh,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:$h,getNoteRect:Rh,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:Ih,sanitizeUrl:s.Nm};let Yh={};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,Gh(gi())},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*Yh.boxMargin,Math.min),r.updateVal(o,"stopy",i+c*Yh.boxMargin,Math.max),r.updateVal(zh.data,"startx",t-c*Yh.boxMargin,Math.min),r.updateVal(zh.data,"stopx",n+c*Yh.boxMargin,Math.max),"activation"!==s&&(r.updateVal(o,"startx",t-c*Yh.boxMargin,Math.min),r.updateVal(o,"stopx",n+c*Yh.boxMargin,Math.max),r.updateVal(zh.data,"starty",e-c*Yh.boxMargin,Math.min),r.updateVal(zh.data,"stopy",i+c*Yh.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=Xh(t.from.actor).length||0,a=i.x+i.width/2+(r-1)*Yh.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Yh.activationWidth,stopy:void 0,actor:t.from.actor,anchored:jh.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}}},Uh=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),Wh=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),qh=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});const Hh=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+=Yh.boxMargin+o.margin),r&&r!=o&&(s||(r.x=c+l,r.y=i),l+=r.margin),n.width=n.width||Yh.width,n.height=Math.max(n.height||Yh.height,Yh.height),n.margin=n.margin||Yh.actorMargin,n.x=c+l,n.y=zh.getVerticalPos();const a=jh.drawActor(t,n,Yh,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)},Vh=function(t,e,n,i){let r=0,a=0;for(const s of n){const n=e[s],o=Jh(n),c=jh.drawPopup(t,n,o,Yh,Yh.forceMenus,i);c.height>r&&(r=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:r,maxWidth:a}},Gh=function(t){$n(Yh,t),t.fontFamily&&(Yh.actorFontFamily=Yh.noteFontFamily=Yh.messageFontFamily=t.fontFamily),t.fontSize&&(Yh.actorFontSize=Yh.noteFontSize=Yh.messageFontSize=t.fontSize),t.fontWeight&&(Yh.actorFontWeight=Yh.noteFontWeight=Yh.messageFontWeight=t.fontWeight)},Xh=function(t){return zh.activations.filter((function(e){return e.actor===t}))},Qh=function(t,e){const n=e[t],i=Xh(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 Kh(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=Uh(Yh);e.message=ai.wrapLabel(`[${e.message}]`,n-2*Yh.wrapPadding,r),e.width=n,e.wrap=!0;const s=ai.calculateTextDimensions(e.message,r),o=Math.max(s.height,Yh.labelBoxHeight);a=i+o,Bt.debug(`${o} - ${e.message}`)}r(e),zh.bumpVerticalPos(a)}const Jh=function(t){let e=0;const n=qh(Yh);for(const i in t.links){const t=ai.calculateTextDimensions(i,n).width+2*Yh.wrapPadding+2*Yh.boxMargin;e<t&&(e=t)}return e};const tu=function(t,e,n,i){const r={},a=[];let s,o,c;return t.forEach((function(t){switch(t.id=ai.random({length:10}),t.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:a.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:t.message&&(s=a.pop(),r[s.id]=s,r[t.id]=s,a.push(s));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:s=a.pop(),r[s.id]=s;break;case i.db.LINETYPE.ACTIVE_START:{const n=e[t.from?t.from.actor:t.to.actor],i=Xh(t.from?t.from.actor:t.to.actor).length,r=n.x+n.width/2+(i-1)*Yh.activationWidth/2,a={startx:r,stopx:r+Yh.activationWidth,actor:t.from.actor,enabled:!0};zh.activations.push(a)}break;case i.db.LINETYPE.ACTIVE_END:{const e=zh.activations.map((t=>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=ai.calculateTextDimensions(a?ai.wrapLabel(t.message,Yh.width,Wh(Yh)):t.message,Wh(Yh));const o={width:a?Yh.width:Math.max(Yh.width,s.width+2*Yh.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(Yh.width,s.width):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*Yh.noteMargin),o.startx=i+(e[t.from].width+Yh.actorMargin)/2):t.placement===n.db.PLACEMENT.LEFTOF?(o.width=a?Math.max(Yh.width,s.width+2*Yh.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*Yh.noteMargin),o.startx=i-o.width+(e[t.from].width-Yh.actorMargin)/2):t.to===t.from?(s=ai.calculateTextDimensions(a?ai.wrapLabel(t.message,Math.max(Yh.width,e[t.from].width),Wh(Yh)):t.message,Wh(Yh)),o.width=a?Math.max(Yh.width,e[t.from].width):Math.max(e[t.from].width,Yh.width,s.width+2*Yh.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))+Yh.actorMargin,o.startx=i<r?i+e[t.from].width/2-Yh.actorMargin/2:r+e[t.to].width/2-Yh.actorMargin/2),a&&(o.message=ai.wrapLabel(t.message,o.width-2*Yh.wrapPadding,Wh(Yh))),Bt.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o}(t,e,i),t.noteModel=o,a.forEach((t=>{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))-Yh.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=Qh(t.from,e),a=Qh(t.to,e),s=r[0]<=a[0]?1:0,o=r[0]<a[0]?0:1,c=[...r,...a],l=Math.abs(a[o]-r[s]);t.wrap&&t.message&&(t.message=ai.wrapLabel(t.message,Math.max(l+2*Yh.wrapPadding,Yh.width),Uh(Yh)));const h=ai.calculateTextDimensions(t.message,Uh(Yh));return{width:Math.max(t.wrap?0:h.width+2*Yh.wrapPadding,l+2*Yh.wrapPadding,Yh.width),height:0,startx:r[s],stopx:a[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,c),toBounds:Math.max.apply(null,c)}}(t,e,i),t.msgModel=c,c.startx&&c.stopx&&a.length>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))-Yh.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)-Yh.labelBoxWidth})))})),zh.activations=[],Bt.debug("Loop type widths:",r),r},eu={bounds:zh,drawActors:Hh,drawActorsPopup:Vh,setConf:Gh,draw:function(t,e,n,i){const{securityLevel:r,sequence:a}=gi();let s;Yh=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?Wh(Yh):Uh(Yh),c=e.wrap?ai.wrapLabel(e.message,Yh.width-2*Yh.wrapPadding,o):e.message,l=ai.calculateTextDimensions(c,o).width+2*Yh.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);Yh.height=function(t,e,n){let i=0;Object.keys(t).forEach((e=>{const n=t[e];n.wrap&&(n.description=ai.wrapLabel(n.description,Yh.width-2*Yh.wrapPadding,qh(Yh)));const r=ai.calculateTextDimensions(n.description,qh(Yh));n.width=n.wrap?Yh.width:Math.max(Yh.width,r.width+2*Yh.wrapPadding),n.height=n.wrap?Math.max(r.height,Yh.height):Yh.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]+Yh.actorMargin-n.width/2;n.margin=Math.max(t,Yh.actorMargin);continue}const r=e[a]+Yh.actorMargin-n.width/2-i.width/2;n.margin=Math.max(r,Yh.actorMargin)}let r=0;return n.forEach((e=>{const n=Uh(Yh);let i=e.actorKeys.reduce(((e,n)=>e+(t[n].width+(t[n].margin||0))),0);i-=2*Yh.boxTextMargin,e.wrap&&(e.name=ai.wrapLabel(e.name,i-2*Yh.wrapPadding,n));const a=ai.calculateTextDimensions(e.name,n);r=Math.max(a.height,r);const s=Math.max(i,a.width+2*Yh.wrapPadding);if(e.margin=Yh.boxTextMargin,i<s){const t=(s-i)/2;e.margin+=t}})),n.forEach((t=>t.textMaxHeight=r)),Math.max(i,Yh.height)}(u,b,d),jh.insertComputerIcon(h),jh.insertDatabaseIcon(h),jh.insertClockIcon(h),y&&(zh.bumpVerticalPos(Yh.boxMargin),m&&zh.bumpVerticalPos(d[0].textMaxHeight)),Hh(h,u,p,0,Yh,f,!1);const _=tu(f,u,b,i);jh.insertArrowHead(h),jh.insertArrowCrossHead(h),jh.insertArrowFilledHead(h),jh.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(Yh.boxMargin),e.height=Yh.boxMargin,e.starty=zh.getVerticalPos();const n=jh.getNoteRect();n.x=e.startx,n.y=e.starty,n.width=e.width||Yh.width,n.class="note";const i=t.append("g"),r=jh.drawRect(i,n),a=jh.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=Yh.noteFontFamily,a.fontSize=Yh.noteFontSize,a.fontWeight=Yh.noteFontWeight,a.anchor=Yh.noteAlign,a.textMargin=Yh.noteMargin,a.valign="center";const s=Dh(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*Yh.noteMargin),e.height+=o+2*Yh.noteMargin,zh.bumpVerticalPos(o+2*Yh.noteMargin),e.stopy=e.starty+o+2*Yh.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),jh.drawActivation(h,n,e,Yh,Xh(t.from.actor).length),zh.insert(n.startx,e-10,n.stopx,e)}(t,zh.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:Kh(_,t,Yh.boxMargin,Yh.boxMargin+Yh.boxTextMargin,(t=>zh.newLoop(t)));break;case i.db.LINETYPE.LOOP_END:e=zh.endLoop(),jh.drawLoop(h,e,"loop",Yh),zh.bumpVerticalPos(e.stopy-zh.getVerticalPos()),zh.models.addLoop(e);break;case i.db.LINETYPE.RECT_START:Kh(_,t,Yh.boxMargin,Yh.boxMargin,(t=>zh.newLoop(void 0,t.message)));break;case i.db.LINETYPE.RECT_END:e=zh.endLoop(),jh.drawBackgroundRect(h,e),zh.models.addLoop(e),zh.bumpVerticalPos(e.stopy-zh.getVerticalPos());break;case i.db.LINETYPE.OPT_START:Kh(_,t,Yh.boxMargin,Yh.boxMargin+Yh.boxTextMargin,(t=>zh.newLoop(t)));break;case i.db.LINETYPE.OPT_END:e=zh.endLoop(),jh.drawLoop(h,e,"opt",Yh),zh.bumpVerticalPos(e.stopy-zh.getVerticalPos()),zh.models.addLoop(e);break;case i.db.LINETYPE.ALT_START:Kh(_,t,Yh.boxMargin,Yh.boxMargin+Yh.boxTextMargin,(t=>zh.newLoop(t)));break;case i.db.LINETYPE.ALT_ELSE:Kh(_,t,Yh.boxMargin+Yh.boxTextMargin,Yh.boxMargin,(t=>zh.addSectionToLoop(t)));break;case i.db.LINETYPE.ALT_END:e=zh.endLoop(),jh.drawLoop(h,e,"alt",Yh),zh.bumpVerticalPos(e.stopy-zh.getVerticalPos()),zh.models.addLoop(e);break;case i.db.LINETYPE.PAR_START:Kh(_,t,Yh.boxMargin,Yh.boxMargin+Yh.boxTextMargin,(t=>zh.newLoop(t)));break;case i.db.LINETYPE.PAR_AND:Kh(_,t,Yh.boxMargin+Yh.boxTextMargin,Yh.boxMargin,(t=>zh.addSectionToLoop(t)));break;case i.db.LINETYPE.PAR_END:e=zh.endLoop(),jh.drawLoop(h,e,"par",Yh),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:Kh(_,t,Yh.boxMargin,Yh.boxMargin+Yh.boxTextMargin,(t=>zh.newLoop(t)));break;case i.db.LINETYPE.CRITICAL_OPTION:Kh(_,t,Yh.boxMargin+Yh.boxTextMargin,Yh.boxMargin,(t=>zh.addSectionToLoop(t)));break;case i.db.LINETYPE.CRITICAL_END:e=zh.endLoop(),jh.drawLoop(h,e,"critical",Yh),zh.bumpVerticalPos(e.stopy-zh.getVerticalPos()),zh.models.addLoop(e);break;case i.db.LINETYPE.BREAK_START:Kh(_,t,Yh.boxMargin,Yh.boxMargin+Yh.boxTextMargin,(t=>zh.newLoop(t)));break;case i.db.LINETYPE.BREAK_END:e=zh.endLoop(),jh.drawLoop(h,e,"break",Yh),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=ai.calculateTextDimensions(r,Uh(Yh)),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,Yh.rightAngles||(l+=Yh.boxMargin,c=zh.getVerticalPos()+l),l+=30;const t=Math.max(h/2,Yh.width/2);zh.insert(n-t,zh.getVerticalPos()-10+l,i+t,zh.getVerticalPos()+30+l)}else l+=Yh.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=ai.calculateTextDimensions(o,Uh(Yh)),d=jh.getTextObj();d.x=r,d.y=s+10,d.width=a-r,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=Yh.messageFontFamily,d.fontSize=Yh.messageFontSize,d.fontWeight=Yh.messageFontWeight,d.anchor=Yh.messageAlign,d.valign="center",d.textMargin=Yh.wrapPadding,d.tspan=!1,Dh(t,d);const p=u.width;let f;r===a?f=Yh.rightAngles?t.append("path").attr("d",`M ${r},${n} H ${r+Math.max(Yh.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="";Yh.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||Yh.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))),Yh.mirrorActors&&(zh.bumpVerticalPos(2*Yh.boxMargin),Hh(h,u,p,zh.getVerticalPos(),Yh,f,!0),zh.bumpVerticalPos(Yh.boxMargin),Ih(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)",jh.drawBox(h,t,Yh)})),y&&zh.bumpVerticalPos(Yh.boxMargin);const w=Vh(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;T<w.maxHeight&&(T=w.maxHeight);let E=T+2*Yh.diagramMarginY;Yh.mirrorActors&&(E=E-Yh.boxMargin+Yh.bottomMarginAdj);let S=C.stopx-C.startx;S<w.maxWidth&&(S=w.maxWidth);const A=S+2*Yh.diagramMarginX;g&&h.append("text").text(g).attr("x",(C.stopx-C.startx)/2-2*Yh.diagramMarginX).attr("y",-25),ki(h,E,A,Yh.useMaxWidth);const L=g?40:0;h.attr("viewBox",C.startx-Yh.diagramMarginX+" -"+(Yh.diagramMarginY+L)+" "+A+" "+(E+L)),Bt.debug("models:",zh.models)}};var nu=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,21],h=[1,22],u=[1,23],d=[1,24],p=[1,37],f=[1,25],g=[1,26],y=[1,27],m=[1,28],b=[1,29],_=[1,32],x=[1,33],v=[1,34],k=[1,35],w=[1,36],C=[1,39],T=[1,40],E=[1,41],S=[1,42],A=[1,38],L=[1,45],B=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],N=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],D=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],O=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],M={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,class:42,CLASSENTITY_IDS:43,STYLECLASS:44,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 4:return i.setRootDoc(a[o]),a[o];case 5:this.$=[];break;case 6:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 7:case 8:case 12:this.$=a[o];break;case 9:this.$="nl";break;case 13:const t=a[o-1];t.description=i.trimColon(a[o]),this.$=t;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:const e=i.trimColon(a[o]);this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:e};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var c=a[o],l=a[o-2].trim();if(a[o].match(":")){var h=a[o].split(":");c=h[0],l=[l,h[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 30:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 31:case 32:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 35:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""};break;case 50:i.parseDirective("%%{","open_directive");break;case 51:i.parseDirective(a[o],"type_directive");break;case 52:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 53:i.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:n,5:i,6:4,7:r,45:6,60:a},{1:[3]},{3:8,4:n,5:i,6:4,7:r,45:6,60:a},{3:9,4:n,5:i,6:4,7:r,45:6,60:a},{3:10,4:n,5:i,6:4,7:r,45:6,60:a},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],s,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:c,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,22:d,24:p,25:f,26:g,27:y,28:m,29:b,32:31,33:_,35:x,37:v,38:k,42:w,45:6,50:C,51:T,52:E,53:S,56:A,60:a},{47:43,48:[1,44],63:L},e([48,63],[2,51]),e(B,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:l,17:h,19:u,22:d,24:p,25:f,26:g,27:y,28:m,29:b,32:31,33:_,35:x,37:v,38:k,42:w,45:6,50:C,51:T,52:E,53:S,56:A,60:a},e(B,[2,8]),e(B,[2,9]),e(B,[2,10]),e(B,[2,11]),e(B,[2,12],{14:[1,47],15:[1,48]}),e(B,[2,16]),{18:[1,49]},e(B,[2,18],{20:[1,50]}),{23:[1,51]},e(B,[2,22]),e(B,[2,23]),e(B,[2,24]),e(B,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},e(B,[2,28]),e(B,[2,29]),{34:[1,56]},{36:[1,57]},e(B,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},e(N,[2,44],{57:[1,61]}),e(N,[2,45],{57:[1,62]}),e(B,[2,38]),e(B,[2,39]),e(B,[2,40]),e(B,[2,41]),e(D,[2,36]),{49:63,62:[1,64]},e(D,[2,53]),e(B,[2,7]),e(B,[2,13]),{13:65,24:p,56:A},e(B,[2,17]),e(O,s,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},e(B,[2,30]),e(B,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:L},{63:[2,52]},e(B,[2,14],{14:[1,76]}),{4:o,5:c,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,21:[1,77],22:d,24:p,25:f,26:g,27:y,28:m,29:b,32:31,33:_,35:x,37:v,38:k,42:w,45:6,50:C,51:T,52:E,53:S,56:A,60:a},e(B,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},e(B,[2,33]),e(B,[2,34]),e(B,[2,35]),e(N,[2,46]),e(N,[2,47]),e(D,[2,37]),e(B,[2,15]),e(B,[2,19]),e(O,s,{8:81}),e(B,[2,26]),e(B,[2,27]),{4:o,5:c,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,21:[1,82],22:d,24:p,25:f,26:g,27:y,28:m,29:b,32:31,33:_,35:x,37:v,38:k,42:w,45:6,50:C,51:T,52:E,53:S,56:A,60:a},e(B,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},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}},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<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/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}();nu.parser=nu;const iu=nu,ru=(t,e)=>{var n;return"dagre-wrapper"!==(null==(n=null==e?void 0:e.state)?void 0:n.defaultRenderer)&&null!==t.match(/^\s*stateDiagram/)},au=(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))},su="state",ou="relation",cu="default",lu="divider",hu="[*]",uu="start",du=hu,pu="color",fu="fill";let gu="LR",yu=[],mu={};let bu={root:{relations:[],states:{},documents:{}}},_u=bu.root,xu=0,vu=0;const ku=t=>JSON.parse(JSON.stringify(t)),wu=(t,e,n)=>{if(e.stmt===ou)wu(t,e.state1,!0),wu(t,e.state2,!1);else if(e.stmt===su&&("[*]"===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<e.doc.length;n++)if(e.doc[n].type===lu){const r=ku(e.doc[n]);r.doc=ku(i),t.push(r),i=[]}else i.push(e.doc[n]);if(t.length>0&&i.length>0){const n={stmt:su,id:qn(),type:"divider",doc:ku(i)};t.push(ku(n)),e.doc=t}e.doc.forEach((t=>wu(e,t,!0)))}},Cu=function(t,e=cu,n=null,i=null,r=null,a=null,s=null,o=null){const c=null==t?void 0:t.trim();if(void 0===_u.states[c]?(Bt.info("Adding state ",c,i),_u.states[c]={id:c,descriptions:[],type:e,doc:n,note:r,classes:[],styles:[],textStyles:[]}):(_u.states[c].doc||(_u.states[c].doc=n),_u.states[c].type||(_u.states[c].type=e)),i&&(Bt.info("Setting state description",c,i),"string"==typeof i&&Bu(c,i.trim()),"object"==typeof i&&i.forEach((t=>Bu(c,t.trim())))),r&&(_u.states[c].note=r,_u.states[c].note.text=jt.sanitizeText(_u.states[c].note.text,gi())),a){Bt.info("Setting state classes",c,a);("string"==typeof a?[a]:a).forEach((t=>Du(c,t.trim())))}if(s){Bt.info("Setting state styles",c,s);("string"==typeof s?[s]:s).forEach((t=>Ou(c,t.trim())))}if(o){Bt.info("Setting state styles",c,s);("string"==typeof o?[o]:o).forEach((t=>Mu(c,t.trim())))}},Tu=function(t){bu={root:{relations:[],states:{},documents:{}}},_u=bu.root,xu=0,mu={},t||Yi()},Eu=function(t){return _u.states[t]};function Su(t=""){let e=t;return t===hu&&(xu++,e=`${uu}${xu}`),e}function Au(t="",e=cu){return t===hu?uu:e}const Lu=function(t,e,n){if("object"==typeof t)!function(t,e,n){let i=Su(t.id.trim()),r=Au(t.id.trim(),t.type),a=Su(e.id.trim()),s=Au(e.id.trim(),e.type);Cu(i,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Cu(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),_u.relations.push({id1:i,id2:a,relationTitle:jt.sanitizeText(n,gi())})}(t,e,n);else{const i=Su(t.trim()),r=Au(t),a=function(t=""){let e=t;return t===du&&(xu++,e=`end${xu}`),e}(e.trim()),s=function(t="",e=cu){return t===du?"end":e}(e);Cu(i,r),Cu(a,s),_u.relations.push({id1:i,id2:a,title:jt.sanitizeText(n,gi())})}},Bu=function(t,e){const n=_u.states[t],i=e.startsWith(":")?e.replace(":","").trim():e;n.descriptions.push(jt.sanitizeText(i,gi()))},Nu=function(t,e=""){void 0===mu[t]&&(mu[t]={id:t,styles:[],textStyles:[]});const n=mu[t];null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(t.match(pu)){const t=e.replace(fu,"bgFill").replace(pu,fu);n.textStyles.push(t)}n.styles.push(e)}))},Du=function(t,e){t.split(",").forEach((function(t){let n=Eu(t);if(void 0===n){const e=t.trim();Cu(e),n=Eu(e)}n.classes.push(e)}))},Ou=function(t,e){const n=Eu(t);void 0!==n&&n.textStyles.push(e)},Mu=function(t,e){const n=Eu(t);void 0!==n&&n.textStyles.push(e)},Iu={parseDirective:function(t,e,n){Cp.parseDirective(this,t,e,n)},getConfig:()=>gi().state,addState:Cu,clear:Tu,getState:Eu,getStates:function(){return _u.states},getRelations:function(){return _u.relations},getClasses:function(){return mu},getDirection:()=>gu,addRelation:Lu,getDividerId:()=>(vu++,"divider-id-"+vu),setDirection:t=>{gu=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 = ",bu)},getRootDoc:()=>yu,setRootDoc:t=>{Bt.info("Setting root doc",t),yu=t},getRootDocV2:()=>(wu({id:"root"},{id:"root",doc:yu},!0),{id:"root",doc:yu}),extract:t=>{let e;e=t.doc?t.doc:t,Bt.info(e),Tu(!0),Bt.info("Extract",e),e.forEach((t=>{switch(t.stmt){case su:Cu(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case ou:Lu(t.state1,t.state2,t.description);break;case"classDef":Nu(t.id.trim(),t.classes);break;case"applyClass":Du(t.id.trim(),t.styleClass)}}))},trimColon:t=>t&&":"===t[0]?t.substr(1).trim():t.trim(),getAccTitle:Ui,setAccTitle:zi,getAccDescription:qi,setAccDescription:Wi,addStyleClass:Nu,setCssClass:Du,addDescription:Bu,setDiagramTitle:Hi,getDiagramTitle:Vi},Fu={},$u=(t,e)=>{Fu[t]=e},Ru=(t,e)=>{const n=t.append("text").attr("x",2*gi().state.padding).attr("y",gi().state.textHeight+1.3*gi().state.padding).attr("font-size",gi().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,r=t.append("text").attr("x",gi().state.padding).attr("y",i+.4*gi().state.padding+gi().state.dividerMargin+gi().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*gi().state.padding).text(e);n||i.attr("dy",gi().state.textHeight)}(r,t,s),s=!1),a=!1}));const o=t.append("line").attr("x1",gi().state.padding).attr("y1",gi().state.padding+i+gi().state.dividerMargin/2).attr("y2",gi().state.padding+i+gi().state.dividerMargin/2).attr("class","descr-divider"),c=r.node().getBBox(),l=Math.max(c.width,n.width);return o.attr("x2",l+3*gi().state.padding),t.insert("rect",":first-child").attr("x",gi().state.padding).attr("y",gi().state.padding).attr("width",l+2*gi().state.padding).attr("height",c.height+i+2*gi().state.padding).attr("rx",gi().state.radius),t},Zu=(t,e,n)=>{const i=gi().state.padding,r=2*gi().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,c=t.append("text").attr("x",0).attr("y",gi().state.titleShift).attr("font-size",gi().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)<i&&l>s&&(h=o-(l-s)/2);const p=1-gi().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+gi().state.textHeight+gi().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",gi().state.titleShift-gi().state.textHeight-gi().state.padding).attr("width",u).attr("height",3*gi().state.textHeight).attr("rx",gi().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",gi().state.titleShift-gi().state.textHeight-gi().state.padding).attr("width",u).attr("height",d.height+3+2*gi().state.textHeight).attr("rx",gi().state.radius),t},Pu=(t,e)=>{e.attr("class","state-note");const n=e.append("rect").attr("x",0).attr("y",gi().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,"<br/>");s=s.replace(/\n/g,"<br/>");const o=s.split(jt.lineBreakRegex);let c=1.25*gi().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+gi().state.noteMargin),i.attr("y",n+r+1.25*gi().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:r}})(t,0,0,i);return n.attr("height",a+2*gi().state.noteMargin),n.attr("width",r+2*gi().state.noteMargin),n},ju=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",gi().state.sizeUnit).attr("cx",gi().state.padding+gi().state.sizeUnit).attr("cy",gi().state.padding+gi().state.sizeUnit)})(r),"end"===e.type&&(t=>{t.append("circle").attr("class","end-state-outer").attr("r",gi().state.sizeUnit+gi().state.miniPadding).attr("cx",gi().state.padding+gi().state.sizeUnit+gi().state.miniPadding).attr("cy",gi().state.padding+gi().state.sizeUnit+gi().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",gi().state.sizeUnit).attr("cx",gi().state.padding+gi().state.sizeUnit+2).attr("cy",gi().state.padding+gi().state.sizeUnit+2)})(r),"fork"!==e.type&&"join"!==e.type||((t,e)=>{let n=gi().state.forkWidth,i=gi().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",gi().state.padding).attr("y",gi().state.padding)})(r,e),"note"===e.type&&Pu(e.note.text,r),"divider"===e.type&&(t=>{t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",gi().state.textHeight).attr("class","divider").attr("x2",2*gi().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*gi().state.padding).attr("y",gi().state.textHeight+2*gi().state.padding).attr("font-size",gi().state.fontSize).attr("class","state-title").text(e.id),i=n.node().getBBox();t.insert("rect",":first-child").attr("x",gi().state.padding).attr("y",gi().state.padding).attr("width",i.width+2*gi().state.padding).attr("height",i.height+2*gi().state.padding).attr("rx",gi().state.radius)})(r,e),"default"===e.type&&e.descriptions.length>0&&Ru(r,e);const a=r.node().getBBox();return i.width=a.width+2*gi().state.padding,i.height=a.height+2*gi().state.padding,$u(n,i),i};let Yu=0;let zu;const Uu={},Wu=(t,e,n,i,r,a,s)=>{const c=new lt.k({compound:!0,multigraph:!0});let l,h=!0;for(l=0;l<t.length;l++)if("relation"===t[l].stmt){h=!1;break}n?c.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:zu.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):c.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:zu.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),c.setDefaultEdgeLabel((function(){return{}})),s.db.extract(t);const u=s.db.getStates(),d=s.db.getRelations(),p=Object.keys(u);for(const o of p){const t=u[o];let l;if(n&&(t.parentId=n),t.doc){let n=e.append("g").attr("id",t.id).attr("class","stateGroup");l=Wu(t.doc,n,t.id,!i,r,a,s);{n=Zu(n,t,i);let e=n.node().getBBox();l.width=e.width,l.height=e.height+zu.padding/2,Uu[t.id]={y:zu.compositTitleSize}}}else l=ju(e,t);if(t.note){const n={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},i=ju(e,n);"left of"===t.note.position?(c.setNode(l.id+"-note",i),c.setNode(l.id,l)):(c.setNode(l.id,l),c.setNode(l.id+"-note",i)),c.setParent(l.id,l.id+"-group"),c.setParent(l.id+"-note",l.id+"-group")}else c.setNode(l.id,l)}Bt.debug("Count=",c.nodeCount(),c);let f=0;d.forEach((function(t){var e;f++,Bt.debug("Setting edge",t),c.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*zu.fontSizeFactor:1),height:zu.labelHeight*jt.getRows(t.title).length,labelpos:"c"},"id"+f)})),(0,ct.bK)(c),Bt.debug("Graph after layout",c.nodes());const g=e.node();c.nodes().forEach((function(t){if(void 0!==t&&void 0!==c.node(t)){Bt.warn("Node "+t+": "+JSON.stringify(c.node(t))),r.select("#"+g.id+" #"+t).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y+(Uu[t]?Uu[t].y:0)-c.node(t).height/2)+" )"),r.select("#"+g.id+" #"+t).attr("data-x-shift",c.node(t).x-c.node(t).width/2);a.querySelectorAll("#"+g.id+" #"+t+" .divider").forEach((t=>{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"+Yu).attr("class","transition");let s="";if(gi().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 Iu.relationType.AGGREGATION:return"aggregation";case Iu.relationType.EXTENSION:return"extension";case Iu.relationType.COMPOSITION:return"composition";case Iu.relationType.DEPENDENCY:return"dependency"}}(Iu.relationType.DEPENDENCY)+"End)"),void 0!==n.title){const i=t.append("g").attr("class","stateLabel"),{x:r,y:a}=ai.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-gi().state.padding/2).attr("y",a-u/2-gi().state.padding/2-3.5).attr("width",l+gi().state.padding).attr("height",u+gi().state.padding),Bt.info(d)}Yu++}(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},qu={setConf:function(){},draw:function(t,e,n,i){zu=gi().state;const r=gi().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();Wu(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;ki(l,f,1.75*p,zu.useMaxWidth),l.attr("viewBox",`${d.x-zu.padding} ${d.y-zu.padding} `+p+" "+f)}},Hu="rect",Vu="rectWithTitle",Gu="statediagram",Xu=`${Gu}-state`,Qu="transition",Ku=`${Qu} note-edge`,Ju=`${Gu}-note`,td=`${Gu}-cluster`,ed=`${Gu}-cluster-alt`,nd="parent",id="note",rd="----",ad=`${rd}${id}`,sd=`${rd}${nd}`,od="fill:none",cd="fill: #333",ld="text",hd="normal";let ud={},dd=0;function pd(t="",e=0,n="",i=rd){return`state-${t}${null!==n&&n.length>0?`${i}${n}`:""}-${e}`}const fd=(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=Hu;!0===n.start&&(e="start"),!1===n.start&&(e="end"),n.type!==cu&&(e=n.type),ud[s]||(ud[s]={id:s,shape:e,description:jt.sanitizeText(s,gi()),classes:`${o} ${Xu}`});const i=ud[s];n.description&&(Array.isArray(i.description)?(i.shape=Vu,i.description.push(n.description)):i.description.length>0?(i.shape=Vu,i.description===s?i.description=[n.description]:i.description=[i.description,n.description]):(i.shape=Hu,i.description=n.description),i.description=jt.sanitizeTextOrArray(i.description,gi())),1===i.description.length&&i.shape===Vu&&(i.shape=Hu),!i.type&&n.doc&&(Bt.info("Setting cluster for ",s,yd(n)),i.type="group",i.dir=yd(n),i.shape=n.type===lu?"divider":"roundedWithTitle",i.classes=i.classes+" "+td+" "+(a?ed:""));const r={labelStyle:"",shape:i.shape,labelText:i.description,classes:i.classes,style:"",id:s,dir:i.dir,domId:pd(s,dd),type:i.type,padding:15};if(n.note){const e={labelStyle:"",shape:"note",labelText:n.note.text,classes:Ju,style:"",id:s+ad+"-"+dd,domId:pd(s,dd,id),type:i.type,padding:15},a={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:i.classes,style:"",id:s+sd,domId:pd(s,dd,nd),type:"group",padding:0};dd++;const o=s+sd;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:od,labelStyle:"",classes:Ku,arrowheadStyle:cd,labelpos:"c",labelType:ld,thickness:hd})}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 "),gd(t,n,n.doc,i,r,!a))},gd=(t,e,n,i,r,a)=>{Bt.trace("items",n),n.forEach((n=>{switch(n.stmt){case su:case cu:fd(t,e,n,i,r,a);break;case ou:{fd(t,e,n.state1,i,r,a),fd(t,e,n.state2,i,r,a);const s={id:"edge"+dd,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:od,labelStyle:"",label:jt.sanitizeText(n.description,gi()),arrowheadStyle:cd,labelpos:"c",labelType:ld,thickness:hd,classes:Qu};t.setEdge(n.state1.id,n.state2.id,s,dd),dd++}}}))},yd=(t,e="TB")=>{let n=e;if(t.doc)for(let i=0;i<t.doc.length;i++){const e=t.doc[i];"dir"===e.stmt&&(n=e.value)}return n},md={setConf:function(t){const e=Object.keys(t);for(const n of e)t[n]},getClasses:function(t,e){Bt.trace("Extracting classes"),e.db.clear();try{return e.parser.parse(t),e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}catch(n){return n}},draw:function(t,e,n,i){Bt.info("Drawing state diagram (v2)",e),ud={};let r=i.db.getDirection();void 0===r&&(r="LR");const{securityLevel:a,state:s}=gi(),c=s.nodeSpacing||50,l=s.rankSpacing||50;Bt.info(i.db.getRootDocV2()),i.db.extract(i.db.getRootDocV2()),Bt.info(i.db.getRootDocV2());const h=i.db.getStates(),u=new lt.k({multigraph:!0,compound:!0}).setGraph({rankdir:yd(i.db.getRootDocV2()),nodesep:c,ranksep:l,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));let d;fd(u,void 0,i.db.getRootDocV2(),h,i.db,!0),"sandbox"===a&&(d=(0,o.Ys)("#i"+e));const p="sandbox"===a?(0,o.Ys)(d.nodes()[0].contentDocument.body):(0,o.Ys)("body"),f=p.select(`[id="${e}"]`),g=p.select("#"+e+" g");no(g,u,["barb"],Gu,e);ai.insertTitle(f,"statediagramTitleText",s.titleTopMargin,i.db.getDiagramTitle());const y=f.node().getBBox(),m=y.width+16,b=y.height+16;f.attr("class",Gu);const _=f.node().getBBox();ki(f,b,m,s.useMaxWidth);const x=`${_.x-8} ${_.y-8} ${m} ${b}`;Bt.debug(`viewBox ${x}`),f.attr("viewBox",x);const v=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const o of v){const t=o.getBBox(),e=document.createElementNS("http://www.w3.org/2000/svg",Hu);e.setAttribute("rx",0),e.setAttribute("ry",0),e.setAttribute("width",t.width),e.setAttribute("height",t.height),o.insertBefore(e,o.firstChild)}}};var bd=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,17,18,20,22,23,24,26],a=[1,15],s=[1,16],o=[1,17],c=[1,18],l=[1,19],h=[1,20],u=[1,24],d=[4,6,9,11,17,18,20,22,23,24,26],p={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"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,2],[10,2],[10,1],[10,1],[10,2],[10,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:return a[o-1];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:this.$=a[o];break;case 11:i.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 12:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 13:case 14:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 15:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 16:i.addTask(a[o-1],a[o]),this.$="task";break;case 18:i.parseDirective("%%{","open_directive");break;case 19:i.parseDirective(a[o],"type_directive");break;case 20:a[o]=a[o].trim().replace(/'/g,'"'),i.parseDirective(a[o],"arg_directive");break;case 21:i.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:n,7:3,12:4,26:i},{1:[3]},e(r,[2,3],{5:6}),{3:7,4:n,7:3,12:4,26:i},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:a,18:s,20:o,22:c,23:l,24:h,26:i},{1:[2,2]},{14:22,15:[1,23],29:u},e([15,29],[2,19]),e(r,[2,8],{1:[2,1]}),e(r,[2,4]),{7:21,10:25,12:4,17:a,18:s,20:o,22:c,23:l,24:h,26:i},e(r,[2,6]),e(r,[2,7]),e(r,[2,11]),{19:[1,26]},{21:[1,27]},e(r,[2,14]),e(r,[2,15]),{25:[1,28]},e(r,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},e(r,[2,5]),e(r,[2,12]),e(r,[2,13]),e(r,[2,16]),e(d,[2,9]),{14:32,29:u},{29:[2,20]},{11:[1,33]},e(d,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},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}},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<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>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}();bd.parser=bd;const _d=bd,xd=t=>null!==t.match(/^\s*journey/);let vd="";const kd=[],wd=[],Cd=[],Td=function(){let t=!0;for(const[e,n]of Cd.entries())Cd[e].processed,t=t&&n.processed;return t},Ed={parseDirective:function(t,e,n){Cp.parseDirective(this,t,e,n)},getConfig:()=>gi().journey,clear:function(){kd.length=0,wd.length=0,vd="",Cd.length=0,Yi()},setDiagramTitle:Hi,getDiagramTitle:Vi,setAccTitle:zi,getAccTitle:Ui,setAccDescription:Wi,getAccDescription:qi,addSection:function(t){vd=t,kd.push(t)},getSections:function(){return kd},getTasks:function(){let t=Td();let e=0;for(;!t&&e<100;)t=Td(),e++;return wd.push(...Cd),wd},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:vd,type:vd,people:a,task:t,score:i};Cd.push(s)},addTaskOrg:function(t){const e={section:vd,type:vd,description:t,task:t,classes:[]};wd.push(e)},getActors:function(){return function(){const t=[];return wd.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}()}},Sd=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},Ad=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},Ld=function(t,e){const n=e.text.replace(/<br\s*\/?>/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 Bd=-1;const Nd=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},Dd=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(/<br\s*\/?>/gi);for(let p=0;p<d.length;p++){const t=p*h-h*(d.length-1)/2,c=e.append("text").attr("x",n+a/2).attr("y",r).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",u);c.append("tspan").attr("x",n+a/2).attr("dy",t).text(d[p]),c.attr("y",r+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(c,o)}}function n(t,n,r,a,s,o,c,l){const h=n.append("switch"),u=h.append("foreignObject").attr("x",r).attr("y",a).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,r,a,s,o,c,l),i(u,c)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),Od=Ad,Md=function(t,e,n){const i=t.append("g"),r=Nd();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,Sd(i,r),Dd(n)(e.text,i,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)},Id=Ld,Fd=function(t,e,n){const i=e.x+n.width/2,r=t.append("g");Bd++;r.append("line").attr("id","task"+Bd).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.score>3?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=Nd();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,Sd(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};Ad(r,i),s+=10})),Dd(n)(e.task,r,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)},$d=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")},Rd={};const Zd=gi().journey,Pd=Zd.leftMargin,jd={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=gi().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(jd.data,"startx",t-l*r.boxMargin,Math.min),a.updateVal(jd.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(jd.data,"starty",e-l*r.boxMargin,Math.min),a.updateVal(jd.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(jd.data,"startx",r,Math.min),this.updateVal(jd.data,"starty",s,Math.min),this.updateVal(jd.data,"stopx",a,Math.max),this.updateVal(jd.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}},Yd=Zd.sectionFills,zd=Zd.sectionColours,Ud=function(t,e,n){const i=gi().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=Yd[s%Yd.length],l=s%Yd.length,c=zd[s%zd.length];const e={x:h*i.taskMargin+h*i.width+Pd,y:50,text:u.section,fill:o,num:l,colour:c};Md(t,e,i),r=u.section,s++}const e=u.people.reduce(((t,e)=>(Rd[e]&&(t[e]=Rd[e]),t)),{});u.x=h*i.taskMargin+h*i.width+Pd,u.y=a,u.width=i.diagramMarginX,u.height=i.diagramMarginY,u.colour=c,u.fill=o,u.num=l,u.actors=e,Fd(t,u,i),jd.insert(u.x,u.y,u.x+u.width+i.taskMargin,450)}},Wd={setConf:function(t){Object.keys(t).forEach((function(e){Zd[e]=t[e]}))},draw:function(t,e,n,i){const r=gi().journey;i.db.clear(),i.parser.parse(t+"\n");const a=gi().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");jd.init();const l=c.select("#"+e);$d(l);const h=i.db.getTasks(),u=i.db.getDiagramTitle(),d=i.db.getActors();for(const o in Rd)delete Rd[o];let p=0;d.forEach((t=>{Rd[t]={color:r.actorColours[p%r.actorColours.length],position:p},p++})),function(t){const e=gi().journey;let n=60;Object.keys(Rd).forEach((i=>{const r=Rd[i].color,a={cx:20,cy:n,r:7,fill:r,stroke:"#000",pos:Rd[i].position};Od(t,a);const s={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};Id(t,s),n+=20}))}(l),jd.insert(0,0,Pd,50*Object.keys(Rd).length),Ud(l,h,0);const f=jd.getBounds();u&&l.append("text").text(u).attr("x",Pd).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const g=f.stopy-f.starty+2*r.diagramMarginY,y=Pd+f.stopx+2*r.diagramMarginX;ki(l,g,y,r.useMaxWidth),l.append("line").attr("x1",Pd).attr("y1",4*r.height).attr("x2",y-Pd-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 qd={};const Hd={setConf:function(t){qd={...qd,...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}},Vd="flowchart-elk",Gd={id:Vd,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:Vd,diagram:t}}},Xd="timeline",Qd={id:Xd,detector:t=>null!==t.match(/^\s*timeline/),loader:async()=>{const{diagram:t}=await n.e(6316).then(n.bind(n,6316));return{id:Xd,diagram:t}}},Kd="mindmap",Jd={id:Kd,detector:t=>null!==t.match(/^\s*mindmap/),loader:async()=>{const{diagram:t}=await n.e(7724).then(n.bind(n,7724));return{id:Kd,diagram:t}}};let tp=!1;const ep=()=>{tp||(tp=!0,Mn(Gd,Qd,Jd),or("error",{db:{clear:()=>{}},styles:Ei,renderer:Hd,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},(t=>"error"===t.toLowerCase().trim())),or("---",{db:{clear:()=>{}},styles:Ei,renderer:Hd,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("---"))),or("c4",{parser:qr,db:oa,renderer:Za,styles:Ii,init:t=>{Za.setConf(t.c4)}},Hr),or("class",{parser:ja,db:as,renderer:bs,styles:Ci,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,as.clear()}},Ya),or("classDiagram",{parser:ja,db:as,renderer:so,styles:Ci,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,as.clear()}},za),or("er",{parser:co,db:fo,renderer:Eo,styles:Ti},lo),or("gantt",{parser:Ic,db:fl,renderer:ml,styles:Ai},Fc),or("info",{parser:_l,db:kl,renderer:wl,styles:Li},Cl),or("pie",{parser:El,db:Bl,renderer:Ml,styles:Bi},Sl),or("requirement",{parser:Fl,db:zl,renderer:th,styles:Ni},$l),or("sequence",{parser:nh,db:wh,renderer:eu,styles:Di,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.");wh.setWrap(t.wrap),eu.setConf(t.sequence)}},ih),or("state",{parser:iu,db:Iu,renderer:qu,styles:Oi,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Iu.clear()}},ru),or("stateDiagram",{parser:iu,db:Iu,renderer:md,styles:Oi,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Iu.clear()}},au),or("journey",{parser:_d,db:Ed,renderer:Wd,styles:Mi,init:t=>{Wd.setConf(t.journey),Ed.clear()}},xd),or("flowchart",{parser:Ao,db:Ec,renderer:Oc,styles:Si,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Lc(t.flowchart),Ec.clear(),Ec.setGen("gen-1")}},Lo),or("flowchart-v2",{parser:Ao,db:Ec,renderer:Oc,styles:Si,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fi({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Oc.setConf(t.flowchart),Ec.clear(),Ec.setGen("gen-2")}},Bo),or("gitGraph",{parser:hr,db:Ar,renderer:zr,styles:Ur},ur))};class np{constructor(t,e){var n,i;this.txt=t,this.type="graph",this.detectTypeFailed=!1;const r=gi();this.txt=t;try{this.type=On(t,r)}catch(o){this.handleError(o,e),this.type="error",this.detectTypeFailed=!0}const a=cr(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(Ln);if(i){const r=An(i[1],{schema:Sn});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;ii(t)?e(t.str,t.hash):e(t)}getParser(){return this.parser}getType(){return this.type}}const ip=(t,e)=>{const n=On(t,gi());try{cr(n)}catch(i){const r=Dn[n].loader;if(!r)throw new Error(`Diagram ${n} not found.`);return r().then((({diagram:i})=>(or(n,i,void 0),new np(t,e))))}return new np(t,e)},rp=np,ap="graphics-document document";const sp=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],op="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",cp="sandbox",lp="loose",hp="http://www.w3.org/1999/xlink",up="http://www.w3.org/1999/xhtml",dp=["foreignobject"],pp=["dominant-baseline"];const fp=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},gp=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},yp=(t,e,n=[])=>`\n.${t} ${e} { ${n.join(" !important; ")} !important; }`,mp=(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)&&sp.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+=yp(i.id,t,i.styles)})),(0,At.Z)(i.textStyles)||(r+=yp(i.id,"tspan",i.textStyles))}}return r})(t,e,n);return M(it(`${i}{${$i(e,r,t.themeVariables)}}`),I)},bp=(t="",e,n)=>{let i=t;return n||e||(i=i.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),i=gp(i),i=i.replace(/<br>/g,"<br/>"),i},_p=(t="",e)=>`<iframe style="width:100%;height:${e?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+t+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,xp=(t,e,n,i,r)=>{const a=t.append("div");a.attr("id",n),i&&a.attr("style",i);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return r&&s.attr("xmlns:xlink",r),s.append("g"),t};function vp(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const kp=(t,e,n,i)=>{var r,a,s;null==(r=t.getElementById(e))||r.remove(),null==(a=t.getElementById(n))||a.remove(),null==(s=t.getElementById(i))||s.remove()};function wp(t,e,n,i){var r,a;a=t,(r=e).attr("role",ap),(0,At.Z)(a)||r.attr("aria-roledescription",a),function(t,e,n,i){if(void 0!==t.insert&&(e||n)){if(n){const e="chart-desc-"+i;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(n)}if(e){const n="chart-title-"+i;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}(e,n,i,e.attr("id"))}const Cp=Object.freeze({render:function(t,e,n,i){var r,a,s,c;ep(),bi();const l=ai.detectInit(e);l&&(ei(l),mi(l));const u=gi();Bt.debug(u),e.length>((null==u?void 0:u.maxTextSize)??5e4)&&(e=op),e=e.replace(/\r\n?/g,"\n");const d="#"+t,p="i"+t,f="#"+p,g="d"+t,y="#"+g;let m=(0,o.Ys)("body");const b=u.securityLevel===cp,_=u.securityLevel===lp,x=u.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),b){const t=vp((0,o.Ys)(i),p);m=(0,o.Ys)(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=(0,o.Ys)(i);xp(m,t,g,`font-family: ${x}`,hp)}else{if(kp(document,t,g,p),b){const t=vp((0,o.Ys)("body"),p);m=(0,o.Ys)(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=(0,o.Ys)("body");xp(m,t,g)}let v,k;e=fp(e);try{if(v=ip(e),"then"in v)throw new Error("Diagram is a promise. Use renderAsync.")}catch(O){v=new rp("error"),k=O}const w=m.select(y).node(),C=v.type,T=w.firstChild,E=T.firstChild,S=sp.includes(C)?v.renderer.getClasses(e,v):{},A=mp(u,C,S,d),L=document.createElement("style");L.innerHTML=A,T.insertBefore(L,E);try{v.renderer.draw(e,t,si,v)}catch(M){throw Hd.draw(e,t,si),M}wp(C,m.select(`${y} svg`),null==(a=(r=v.db).getAccTitle)?void 0:a.call(r),null==(c=(s=v.db).getAccDescription)?void 0:c.call(s)),m.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",up);let B=m.select(y).node().innerHTML;if(Bt.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),B=bp(B,b,Zt(u.arrowMarkerAbsolute)),b){const t=m.select(y+" svg").node();B=_p(B,t)}else _||(B=h().sanitize(B,{ADD_TAGS:dp,ADD_ATTR:pp}));if(void 0!==n)switch(C){case"flowchart":case"flowchart-v2":n(B,Ec.bindFunctions);break;case"gantt":n(B,fl.bindFunctions);break;case"class":case"classDiagram":n(B,as.bindFunctions);break;default:n(B)}else Bt.debug("CB = undefined!");Th();const N=b?f:y,D=(0,o.Ys)(N).node();if(D&&"remove"in D&&D.remove(),k)throw k;return B},renderAsync:async function(t,e,n,i){var r,a,s,c;ep(),bi();const l=ai.detectInit(e);l&&(ei(l),mi(l));const u=gi();Bt.debug(u),e.length>((null==u?void 0:u.maxTextSize)??5e4)&&(e=op),e=e.replace(/\r\n?/g,"\n");const d="#"+t,p="i"+t,f="#"+p,g="d"+t,y="#"+g;let m=(0,o.Ys)("body");const b=u.securityLevel===cp,_=u.securityLevel===lp,x=u.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),b){const t=vp((0,o.Ys)(i),p);m=(0,o.Ys)(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=(0,o.Ys)(i);xp(m,t,g,`font-family: ${x}`,hp)}else{if(kp(document,t,g,p),b){const t=vp((0,o.Ys)("body"),p);m=(0,o.Ys)(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=(0,o.Ys)("body");xp(m,t,g)}let v,k;e=fp(e);try{v=await ip(e)}catch(O){v=new rp("error"),k=O}const w=m.select(y).node(),C=v.type,T=w.firstChild,E=T.firstChild,S=sp.includes(C)?v.renderer.getClasses(e,v):{},A=mp(u,C,S,d),L=document.createElement("style");L.innerHTML=A,T.insertBefore(L,E);try{await v.renderer.draw(e,t,si,v)}catch(M){throw Hd.draw(e,t,si),M}wp(C,m.select(`${y} svg`),null==(a=(r=v.db).getAccTitle)?void 0:a.call(r),null==(c=(s=v.db).getAccDescription)?void 0:c.call(s)),m.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",up);let B=m.select(y).node().innerHTML;if(Bt.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),B=bp(B,b,Zt(u.arrowMarkerAbsolute)),b){const t=m.select(y+" svg").node();B=_p(B,t)}else _||(B=h().sanitize(B,{ADD_TAGS:dp,ADD_ATTR:pp}));if(void 0!==n)switch(C){case"flowchart":case"flowchart-v2":n(B,Ec.bindFunctions);break;case"gantt":n(B,fl.bindFunctions);break;case"class":case"classDiagram":n(B,as.bindFunctions);break;default:n(B)}else Bt.debug("CB = undefined!");Th();const N=b?f:y,D=(0,o.Ys)(N).node();if(D&&"remove"in D&&D.remove(),k)throw k;return B},parse:function(t,e){return ep(),new rp(t,e).parse(t,e)},parseAsync:async function(t,e){return ep(),(await ip(t,e)).parse(t,e)},parseDirective:Ki,initialize:function(t={}){var e;(null==t?void 0:t.fontFamily)&&!(null==(e=t.themeVariables)?void 0:e.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),ci=$n({},t),(null==t?void 0:t.theme)&&t.theme in Xt?t.themeVariables=Xt[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Xt.default.getThemeVariables(t.themeVariables));const n="object"==typeof t?(t=>(li=$n({},oi),li=$n(li,t),t.theme&&Xt[t.theme]&&(li.themeVariables=Xt[t.theme].getThemeVariables(t.themeVariables)),di(li,hi),li))(t):pi();Nt(n.logLevel),ep()},getConfig:gi,setConfig:fi,getSiteConfig:pi,updateSiteConfig:t=>(li=$n(li,t),di(li,hi),li),reset:()=>{bi()},globalReset:()=>{bi(oi)},defaultConfig:oi});Nt(gi().logLevel),bi(gi());const Tp=(t,e,n)=>{Bt.warn(t),ii(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},Ep=async function(t,e,n){const r=Cp.getConfig();let a;if(t&&(Np.sequenceConfig=t),Bt.debug((n?"":"No ")+"Callback function found"),void 0===e)a=document.querySelectorAll(".mermaid");else if("string"==typeof e)a=document.querySelectorAll(e);else if(e instanceof HTMLElement)a=[e];else{if(!(e instanceof NodeList))throw new Error("Invalid argument nodes for mermaid.init");a=e}Bt.debug(`Found ${a.length} diagrams`),void 0!==(null==t?void 0:t.startOnLoad)&&(Bt.debug("Start On Load: "+(null==t?void 0:t.startOnLoad)),Cp.updateSiteConfig({startOnLoad:null==t?void 0:t.startOnLoad}));const s=new ai.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let o;const c=[];for(const h of Array.from(a)){if(Bt.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const t=`mermaid-${s.next()}`;o=h.innerHTML,o=i(ai.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const e=ai.detectInit(o);e&&Bt.debug("Detected early reinit: ",e);try{await Cp.renderAsync(t,o,((e,i)=>{h.innerHTML=e,void 0!==n&&n(t),i&&i(h)}),h)}catch(l){Tp(l,c,Np.parseError)}}if(c.length>0)throw c[0]},Sp=function(){if(Np.startOnLoad){const{startOnLoad:t}=Cp.getConfig();t&&Np.init().catch((t=>Bt.error("Mermaid failed to initialize",t)))}};"undefined"!=typeof document&&window.addEventListener("load",Sp,!1);const Ap=[];let Lp=!1;const Bp=async()=>{if(!Lp){for(Lp=!0;Ap.length>0;){const e=Ap.shift();if(e)try{await e()}catch(t){Bt.error("Error executing queue",t)}}Lp=!1}},Np={startOnLoad:!0,diagrams:{},mermaidAPI:Cp,parse:t=>Cp.parse(t,Np.parseError),parseAsync:t=>new Promise(((e,n)=>{Ap.push((()=>new Promise(((i,r)=>{Cp.parseAsync(t,Np.parseError).then((t=>{i(t),e(t)}),(t=>{Bt.error("Error parsing",t),r(t),n(t)}))})))),Bp().catch(n)})),render:Cp.render,renderAsync:(t,e,n,i)=>new Promise(((r,a)=>{Ap.push((()=>new Promise(((s,o)=>{Cp.renderAsync(t,e,n,i).then((t=>{s(t),r(t)}),(t=>{Bt.error("Error parsing",t),o(t),a(t)}))})))),Bp().catch(a)})),init:async function(t,e,n){try{await Ep(t,e,n)}catch(i){Bt.warn("Syntax Error rendering"),ii(i)&&Bt.warn(i.str),Np.parseError&&Np.parseError(i)}},initThrowsErrors:function(t,e,n){const r=Cp.getConfig();let a;if(t&&(Np.sequenceConfig=t),Bt.debug((n?"":"No ")+"Callback function found"),void 0===e)a=document.querySelectorAll(".mermaid");else if("string"==typeof e)a=document.querySelectorAll(e);else if(e instanceof HTMLElement)a=[e];else{if(!(e instanceof NodeList))throw new Error("Invalid argument nodes for mermaid.init");a=e}Bt.debug(`Found ${a.length} diagrams`),void 0!==(null==t?void 0:t.startOnLoad)&&(Bt.debug("Start On Load: "+(null==t?void 0:t.startOnLoad)),Cp.updateSiteConfig({startOnLoad:null==t?void 0:t.startOnLoad}));const s=new ai.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let o;const c=[];for(const h of Array.from(a)){if(Bt.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const t=`mermaid-${s.next()}`;o=h.innerHTML,o=i(ai.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const e=ai.detectInit(o);e&&Bt.debug("Detected early reinit: ",e);try{Cp.render(t,o,((e,i)=>{h.innerHTML=e,void 0!==n&&n(t),i&&i(h)}),h)}catch(l){Tp(l,c,Np.parseError)}}if(c.length>0)throw c[0]},initThrowsErrorsAsync:Ep,registerExternalDiagrams:async(t,{lazyLoad:e=!0}={})=>{e?Mn(...t):await(async(...t)=>{Bt.debug(`Loading ${t.length} external diagrams`);const e=(await Promise.allSettled(t.map((async({id:t,detector:e,loader:n})=>{const{diagram:i}=await n();or(t,i,e)})))).filter((t=>"rejected"===t.status));if(e.length>0){Bt.error(`Failed to load ${e.length} external diagrams`);for(const t of e)Bt.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}})(...t)},initialize:function(t){Cp.initialize(t)},parseError:void 0,contentLoaded:Sp,setParseErrorHandler:function(t){Np.parseError=t}}},7594:(t,e)=>{function n(t){let e,n=[];for(let i of t.split(",").map((t=>t.trim())))if(/^-?\d+$/.test(i))n.push(parseInt(i,10));else if(e=i.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[t,i,r,a]=e;if(i&&a){i=parseInt(i),a=parseInt(a);const t=i<a?1:-1;"-"!==r&&".."!==r&&"\u2025"!==r||(a+=t);for(let e=i;e!==a;e+=t)n.push(e)}}return n}e.default=n,t.exports=n},9373:(t,e,n)=>{"use strict";function i(t,e){let n;if(void 0===e)for(const i of t)null!=i&&(n<i||void 0===n&&i>=i)&&(n=i);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n<r||void 0===n&&r>=r)&&(n=r)}return n}function r(t,e){let n;if(void 0===e)for(const i of t)null!=i&&(n>i||void 0===n&&i>=i)&&(n=i);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n>r||void 0===n&&r>=r)&&(n=r)}return n}function a(t){return t}n.d(e,{Nb1:()=>so,LLu:()=>b,F5q:()=>m,$0Z:()=>xo,Dts:()=>ko,WQY:()=>Co,qpX:()=>Eo,u93:()=>So,tFB:()=>Lo,YY7:()=>Do,OvA:()=>Mo,dCK:()=>Fo,zgE:()=>Zo,fGX:()=>jo,$m7:()=>zo,c_6:()=>lo,fxm:()=>Wo,FdL:()=>Jo,ak_:()=>tc,SxZ:()=>ic,eA_:()=>ac,jsv:()=>oc,iJ:()=>sc,JHv:()=>gi,jvg:()=>po,Fp7:()=>i,VV$:()=>r,ve8:()=>yo,BYU:()=>cr,PKp:()=>gr,Xf:()=>Ns,Ys:()=>Ds,td_:()=>Os,YPS:()=>Vn,rr1:()=>Dr,i$Z:()=>ha,WQD:()=>Br,Z_i:()=>Ar,F0B:()=>Qr,NGh:()=>Fr});var s=1,o=2,c=3,l=4,h=1e-6;function u(t){return"translate("+t+",0)"}function d(t){return"translate(0,"+t+")"}function p(t){return e=>+t(e)}function f(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function g(){return!this.__axis}function y(t,e){var n=[],i=null,r=null,y=6,m=6,b=3,_="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,x=t===s||t===l?-1:1,v=t===l||t===o?"x":"y",k=t===s||t===c?u:d;function w(u){var d=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,w=null==r?e.tickFormat?e.tickFormat.apply(e,n):a:r,C=Math.max(y,0)+b,T=e.range(),E=+T[0]+_,S=+T[T.length-1]+_,A=(e.bandwidth?f:p)(e.copy(),_),L=u.selection?u.selection():u,B=L.selectAll(".domain").data([null]),N=L.selectAll(".tick").data(d,e).order(),D=N.exit(),O=N.enter().append("g").attr("class","tick"),M=N.select("line"),I=N.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),N=N.merge(O),M=M.merge(O.append("line").attr("stroke","currentColor").attr(v+"2",x*y)),I=I.merge(O.append("text").attr("fill","currentColor").attr(v,x*C).attr("dy",t===s?"0em":t===c?"0.71em":"0.32em")),u!==L&&(B=B.transition(u),N=N.transition(u),M=M.transition(u),I=I.transition(u),D=D.transition(u).attr("opacity",h).attr("transform",(function(t){return isFinite(t=A(t))?k(t+_):this.getAttribute("transform")})),O.attr("opacity",h).attr("transform",(function(t){var e=this.parentNode.__axis;return k((e&&isFinite(e=e(t))?e:A(t))+_)}))),D.remove(),B.attr("d",t===l||t===o?m?"M"+x*m+","+E+"H"+_+"V"+S+"H"+x*m:"M"+_+","+E+"V"+S:m?"M"+E+","+x*m+"V"+_+"H"+S+"V"+x*m:"M"+E+","+_+"H"+S),N.attr("opacity",1).attr("transform",(function(t){return k(A(t)+_)})),M.attr(v+"2",x*y),I.attr(v,x*C).text(w),L.filter(g).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===o?"start":t===l?"end":"middle"),L.each((function(){this.__axis=A}))}return w.scale=function(t){return arguments.length?(e=t,w):e},w.ticks=function(){return n=Array.from(arguments),w},w.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),w):n.slice()},w.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),w):i&&i.slice()},w.tickFormat=function(t){return arguments.length?(r=t,w):r},w.tickSize=function(t){return arguments.length?(y=m=+t,w):y},w.tickSizeInner=function(t){return arguments.length?(y=+t,w):y},w.tickSizeOuter=function(t){return arguments.length?(m=+t,w):m},w.tickPadding=function(t){return arguments.length?(b=+t,w):b},w.offset=function(t){return arguments.length?(_=+t,w):_},w}function m(t){return y(s,t)}function b(t){return y(c,t)}function _(){}function x(t){return null==t?_:function(){return this.querySelector(t)}}function v(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function k(){return[]}function w(t){return null==t?k:function(){return this.querySelectorAll(t)}}function C(t){return function(){return this.matches(t)}}function T(t){return function(e){return e.matches(t)}}var E=Array.prototype.find;function S(){return this.firstElementChild}var A=Array.prototype.filter;function L(){return Array.from(this.children)}function B(t){return new Array(t.length)}function N(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function D(t,e,n,i,r,a){for(var s,o=0,c=e.length,l=a.length;o<l;++o)(s=e[o])?(s.__data__=a[o],i[o]=s):n[o]=new N(t,a[o]);for(;o<c;++o)(s=e[o])&&(r[o]=s)}function O(t,e,n,i,r,a,s){var o,c,l,h=new Map,u=e.length,d=a.length,p=new Array(u);for(o=0;o<u;++o)(c=e[o])&&(p[o]=l=s.call(c,c.__data__,o,e)+"",h.has(l)?r[o]=c:h.set(l,c));for(o=0;o<d;++o)l=s.call(t,a[o],o,a)+"",(c=h.get(l))?(i[o]=c,c.__data__=a[o],h.delete(l)):n[o]=new N(t,a[o]);for(o=0;o<u;++o)(c=e[o])&&h.get(p[o])===c&&(r[o]=c)}function M(t){return t.__data__}function I(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function F(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}N.prototype={constructor:N,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var $="http://www.w3.org/1999/xhtml";const R={svg:"http://www.w3.org/2000/svg",xhtml:$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Z(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),R.hasOwnProperty(e)?{space:R[e],local:t}:t}function P(t){return function(){this.removeAttribute(t)}}function j(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Y(t,e){return function(){this.setAttribute(t,e)}}function z(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function U(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function W(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function q(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function H(t){return function(){this.style.removeProperty(t)}}function V(t,e,n){return function(){this.style.setProperty(t,e,n)}}function G(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function X(t,e){return t.style.getPropertyValue(e)||q(t).getComputedStyle(t,null).getPropertyValue(e)}function Q(t){return function(){delete this[t]}}function K(t,e){return function(){this[t]=e}}function J(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function tt(t){return t.trim().split(/^|\s+/)}function et(t){return t.classList||new nt(t)}function nt(t){this._node=t,this._names=tt(t.getAttribute("class")||"")}function it(t,e){for(var n=et(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function rt(t,e){for(var n=et(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function at(t){return function(){it(this,t)}}function st(t){return function(){rt(this,t)}}function ot(t,e){return function(){(e.apply(this,arguments)?it:rt)(this,t)}}function ct(){this.textContent=""}function lt(t){return function(){this.textContent=t}}function ht(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ut(){this.innerHTML=""}function dt(t){return function(){this.innerHTML=t}}function pt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ft(){this.nextSibling&&this.parentNode.appendChild(this)}function gt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===$&&e.documentElement.namespaceURI===$?e.createElement(t):e.createElementNS(n,t)}}function mt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function bt(t){var e=Z(t);return(e.local?mt:yt)(e)}function _t(){return null}function xt(){var t=this.parentNode;t&&t.removeChild(this)}function vt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function kt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function wt(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,a=e.length;i<a;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function Ct(t,e,n){return function(){var i,r=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var s=0,o=r.length;s<o;++s)if((i=r[s]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),void(i.value=e);this.addEventListener(t.type,a,n),i={type:t.type,name:t.name,value:e,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Tt(t,e,n){var i=q(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function Et(t,e){return function(){return Tt(this,t,e)}}function St(t,e){return function(){return Tt(this,t,e.apply(this,arguments))}}nt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var At=[null];function Lt(t,e){this._groups=t,this._parents=e}function Bt(){return new Lt([[document.documentElement]],At)}Lt.prototype=Bt.prototype={constructor:Lt,select:function(t){"function"!=typeof t&&(t=x(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,s,o=e[r],c=o.length,l=i[r]=new Array(c),h=0;h<c;++h)(a=o[h])&&(s=t.call(a,a.__data__,h,o))&&("__data__"in a&&(s.__data__=a.__data__),l[h]=s);return new Lt(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return v(t.apply(this,arguments))}}(t):w(t);for(var e=this._groups,n=e.length,i=[],r=[],a=0;a<n;++a)for(var s,o=e[a],c=o.length,l=0;l<c;++l)(s=o[l])&&(i.push(t.call(s,s.__data__,l,o)),r.push(s));return new Lt(i,r)},selectChild:function(t){return this.select(null==t?S:function(t){return function(){return E.call(this.children,t)}}("function"==typeof t?t:T(t)))},selectChildren:function(t){return this.selectAll(null==t?L:function(t){return function(){return A.call(this.children,t)}}("function"==typeof t?t:T(t)))},filter:function(t){"function"!=typeof t&&(t=C(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,s=e[r],o=s.length,c=i[r]=[],l=0;l<o;++l)(a=s[l])&&t.call(a,a.__data__,l,s)&&c.push(a);return new Lt(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,M);var n,i=e?O:D,r=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var s=a.length,o=new Array(s),c=new Array(s),l=new Array(s),h=0;h<s;++h){var u=r[h],d=a[h],p=d.length,f=I(t.call(u,u&&u.__data__,h,r)),g=f.length,y=c[h]=new Array(g),m=o[h]=new Array(g);i(u,d,y,m,l[h]=new Array(p),f,e);for(var b,_,x=0,v=0;x<g;++x)if(b=y[x]){for(x>=v&&(v=x+1);!(_=m[v])&&++v<g;);b._next=_||null}}return(o=new Lt(o,r))._enter=c,o._exit=l,o},enter:function(){return new Lt(this._enter||this._groups.map(B),this._parents)},exit:function(){return new Lt(this._exit||this._groups.map(B),this._parents)},join:function(t,e,n){var i=this.enter(),r=this,a=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==n?a.remove():n(a),i&&r?i.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,a=i.length,s=Math.min(r,a),o=new Array(r),c=0;c<s;++c)for(var l,h=n[c],u=i[c],d=h.length,p=o[c]=new Array(d),f=0;f<d;++f)(l=h[f]||u[f])&&(p[f]=l);for(;c<r;++c)o[c]=n[c];return new Lt(o,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],a=r.length-1,s=r[a];--a>=0;)(i=r[a])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=F);for(var n=this._groups,i=n.length,r=new Array(i),a=0;a<i;++a){for(var s,o=n[a],c=o.length,l=r[a]=new Array(c),h=0;h<c;++h)(s=o[h])&&(l[h]=s);l.sort(e)}return new Lt(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,a=i.length;r<a;++r){var s=i[r];if(s)return s}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,a=e[n],s=0,o=a.length;s<o;++s)(r=a[s])&&t.call(r,r.__data__,s,a);return this},attr:function(t,e){var n=Z(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?j:P:"function"==typeof e?n.local?W:U:n.local?z:Y)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?H:"function"==typeof e?G:V)(t,e,null==n?"":n)):X(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Q:"function"==typeof e?J:K)(t,e)):this.node()[t]},classed:function(t,e){var n=tt(t+"");if(arguments.length<2){for(var i=et(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?ot:e?at:st)(n,e))},text:function(t){return arguments.length?this.each(null==t?ct:("function"==typeof t?ht:lt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ut:("function"==typeof t?pt:dt)(t)):this.node().innerHTML},raise:function(){return this.each(ft)},lower:function(){return this.each(gt)},append:function(t){var e="function"==typeof t?t:bt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:bt(t),i=null==e?_t:"function"==typeof e?e:x(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(xt)},clone:function(t){return this.select(t?kt:vt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,a=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=a.length;if(!(arguments.length<2)){for(o=e?Ct:wt,i=0;i<s;++i)this.each(o(a[i],e,n));return this}var o=this.node().__on;if(o)for(var c,l=0,h=o.length;l<h;++l)for(i=0,c=o[l];i<s;++i)if((r=a[i]).type===c.type&&r.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?St:Et)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,r=t[e],a=0,s=r.length;a<s;++a)(i=r[a])&&(yield i)}};const Nt=Bt;var Dt={value:()=>{}};function Ot(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new Mt(i)}function Mt(t){this._=t}function It(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function Ft(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Dt,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}Mt.prototype=Ot.prototype={constructor:Mt,on:function(t,e){var n,i,r=this._,a=(i=r,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),s=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<o;)if(n=(t=a[s]).type)r[n]=Ft(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Ft(r[n],t.name,null);return this}for(;++s<o;)if((n=(t=a[s]).type)&&(n=It(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Mt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),a=0;a<n;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(i=this._[t]).length;a<n;++a)i[a].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,a=i.length;r<a;++r)i[r].value.apply(e,n)}};const $t=Ot;var Rt,Zt,Pt=0,jt=0,Yt=0,zt=1e3,Ut=0,Wt=0,qt=0,Ht="object"==typeof performance&&performance.now?performance:Date,Vt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Gt(){return Wt||(Vt(Xt),Wt=Ht.now()+qt)}function Xt(){Wt=0}function Qt(){this._call=this._time=this._next=null}function Kt(t,e,n){var i=new Qt;return i.restart(t,e,n),i}function Jt(){Wt=(Ut=Ht.now())+qt,Pt=jt=0;try{!function(){Gt(),++Pt;for(var t,e=Rt;e;)(t=Wt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pt}()}finally{Pt=0,function(){var t,e,n=Rt,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Rt=e);Zt=t,ee(i)}(),Wt=0}}function te(){var t=Ht.now(),e=t-Ut;e>zt&&(qt-=e,Ut=t)}function ee(t){Pt||(jt&&(jt=clearTimeout(jt)),t-Wt>24?(t<1/0&&(jt=setTimeout(Jt,t-Ht.now()-qt)),Yt&&(Yt=clearInterval(Yt))):(Yt||(Ut=Ht.now(),Yt=setInterval(te,zt)),Pt=1,Vt(Jt)))}function ne(t,e,n){var i=new Qt;return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}Qt.prototype=Kt.prototype={constructor:Qt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Gt():+n)+(null==e?0:+e),this._next||Zt===this||(Zt?Zt._next=this:Rt=this,Zt=this),this._call=t,this._time=n,ee()},stop:function(){this._call&&(this._call=null,this._time=1/0,ee())}};var ie=$t("start","end","cancel","interrupt"),re=[],ae=0,se=1,oe=2,ce=3,le=4,he=5,ue=6;function de(t,e,n,i,r,a){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function a(t){n.state=se,n.timer.restart(s,n.delay,n.time),n.delay<=t&&s(t-n.delay)}function s(a){var l,h,u,d;if(n.state!==se)return c();for(l in r)if((d=r[l]).name===n.name){if(d.state===ce)return ne(s);d.state===le?(d.state=ue,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=ue,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(ne((function(){n.state===ce&&(n.state=le,n.timer.restart(o,n.delay,n.time),o(a))})),n.state=oe,n.on.call("start",t,t.__data__,n.index,n.group),n.state===oe){for(n.state=ce,i=new Array(u=n.tween.length),l=0,h=-1;l<u;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function o(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(c),n.state=he,1),a=-1,s=i.length;++a<s;)i[a].call(t,r);n.state===he&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){for(var i in n.state=ue,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=Kt(a,0,n.time)}(t,n,{name:e,index:i,group:r,on:ie,tween:re,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ae})}function pe(t,e){var n=ge(t,e);if(n.state>ae)throw new Error("too late; already scheduled");return n}function fe(t,e){var n=ge(t,e);if(n.state>ce)throw new Error("too late; already running");return n}function ge(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ye(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var me,be=180/Math.PI,_e={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xe(t,e,n,i,r,a){var s,o,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*i)&&(n-=t*c,i-=e*c),(o=Math.sqrt(n*n+i*i))&&(n/=o,i/=o,c/=o),t*i<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:r,translateY:a,rotate:Math.atan2(e,t)*be,skewX:Math.atan(c)*be,scaleX:s,scaleY:o}}function ve(t,e,n,i){function r(t){return t.length?t.pop()+" ":""}return function(a,s){var o=[],c=[];return a=t(a),s=t(s),function(t,i,r,a,s,o){if(t!==r||i!==a){var c=s.push("translate(",null,e,null,n);o.push({i:c-4,x:ye(t,r)},{i:c-2,x:ye(i,a)})}else(r||a)&&s.push("translate("+r+e+a+n)}(a.translateX,a.translateY,s.translateX,s.translateY,o,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(r(n)+"rotate(",null,i)-2,x:ye(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(a.rotate,s.rotate,o,c),function(t,e,n,a){t!==e?a.push({i:n.push(r(n)+"skewX(",null,i)-2,x:ye(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(a.skewX,s.skewX,o,c),function(t,e,n,i,a,s){if(t!==n||e!==i){var o=a.push(r(a)+"scale(",null,",",null,")");s.push({i:o-4,x:ye(t,n)},{i:o-2,x:ye(e,i)})}else 1===n&&1===i||a.push(r(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,s.scaleX,s.scaleY,o,c),a=s=null,function(t){for(var e,n=-1,i=c.length;++n<i;)o[(e=c[n]).i]=e.x(t);return o.join("")}}}var ke=ve((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?_e:xe(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),we=ve((function(t){return null==t?_e:(me||(me=document.createElementNS("http://www.w3.org/2000/svg","g")),me.setAttribute("transform",t),(t=me.transform.baseVal.consolidate())?xe((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):_e)}),", ",")",")");function Ce(t,e){var n,i;return function(){var r=fe(this,t),a=r.tween;if(a!==n)for(var s=0,o=(i=n=a).length;s<o;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}r.tween=i}}function Te(t,e,n){var i,r;if("function"!=typeof n)throw new Error;return function(){var a=fe(this,t),s=a.tween;if(s!==i){r=(i=s).slice();for(var o={name:e,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===e){r[c]=o;break}c===l&&r.push(o)}a.tween=r}}function Ee(t,e,n){var i=t._id;return t.each((function(){var t=fe(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ge(t,i).value[e]}}function Se(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ae(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Le(){}var Be=.7,Ne=1/Be,De="\\s*([+-]?\\d+)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ie=/^#([0-9a-f]{3,8})$/,Fe=new RegExp(`^rgb\\(${De},${De},${De}\\)$`),$e=new RegExp(`^rgb\\(${Me},${Me},${Me}\\)$`),Re=new RegExp(`^rgba\\(${De},${De},${De},${Oe}\\)$`),Ze=new RegExp(`^rgba\\(${Me},${Me},${Me},${Oe}\\)$`),Pe=new RegExp(`^hsl\\(${Oe},${Me},${Me}\\)$`),je=new RegExp(`^hsla\\(${Oe},${Me},${Me},${Oe}\\)$`),Ye={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ze(){return this.rgb().formatHex()}function Ue(){return this.rgb().formatRgb()}function We(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ie.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?qe(e):3===n?new Xe(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?He(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?He(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Fe.exec(t))?new Xe(e[1],e[2],e[3],1):(e=$e.exec(t))?new Xe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Re.exec(t))?He(e[1],e[2],e[3],e[4]):(e=Ze.exec(t))?He(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Pe.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=je.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):Ye.hasOwnProperty(t)?qe(Ye[t]):"transparent"===t?new Xe(NaN,NaN,NaN,0):null}function qe(t){return new Xe(t>>16&255,t>>8&255,255&t,1)}function He(t,e,n,i){return i<=0&&(t=e=n=NaN),new Xe(t,e,n,i)}function Ve(t){return t instanceof Le||(t=We(t)),t?new Xe((t=t.rgb()).r,t.g,t.b,t.opacity):new Xe}function Ge(t,e,n,i){return 1===arguments.length?Ve(t):new Xe(t,e,n,null==i?1:i)}function Xe(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Qe(){return`#${en(this.r)}${en(this.g)}${en(this.b)}`}function Ke(){const t=Je(this.opacity);return`${1===t?"rgb(":"rgba("}${tn(this.r)}, ${tn(this.g)}, ${tn(this.b)}${1===t?")":`, ${t})`}`}function Je(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function tn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function en(t){return((t=tn(t))<16?"0":"")+t.toString(16)}function nn(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new an(t,e,n,i)}function rn(t){if(t instanceof an)return new an(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=We(t)),!t)return new an;if(t instanceof an)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),a=Math.max(e,n,i),s=NaN,o=a-r,c=(a+r)/2;return o?(s=e===a?(n-i)/o+6*(n<i):n===a?(i-e)/o+2:(e-n)/o+4,o/=c<.5?a+r:2-a-r,s*=60):o=c>0&&c<1?0:s,new an(s,o,c,t.opacity)}function an(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function sn(t){return(t=(t||0)%360)<0?t+360:t}function on(t){return Math.max(0,Math.min(1,t||0))}function cn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function ln(t,e,n,i,r){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*n+(1+3*t+3*a-3*s)*i+s*r)/6}Se(Le,We,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ze,formatHex:ze,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return rn(this).formatHsl()},formatRgb:Ue,toString:Ue}),Se(Xe,Ge,Ae(Le,{brighter(t){return t=null==t?Ne:Math.pow(Ne,t),new Xe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Be:Math.pow(Be,t),new Xe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Xe(tn(this.r),tn(this.g),tn(this.b),Je(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Qe,formatHex:Qe,formatHex8:function(){return`#${en(this.r)}${en(this.g)}${en(this.b)}${en(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ke,toString:Ke})),Se(an,(function(t,e,n,i){return 1===arguments.length?rn(t):new an(t,e,n,null==i?1:i)}),Ae(Le,{brighter(t){return t=null==t?Ne:Math.pow(Ne,t),new an(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Be:Math.pow(Be,t),new an(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Xe(cn(t>=240?t-240:t+120,r,i),cn(t,r,i),cn(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new an(sn(this.h),on(this.s),on(this.l),Je(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Je(this.opacity);return`${1===t?"hsl(":"hsla("}${sn(this.h)}, ${100*on(this.s)}%, ${100*on(this.l)}%${1===t?")":`, ${t})`}`}}));const hn=t=>()=>t;function un(t,e){return function(n){return t+n*e}}function dn(t){return 1==(t=+t)?pn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):hn(isNaN(e)?n:e)}}function pn(t,e){var n=e-t;return n?un(t,n):hn(isNaN(t)?e:t)}const fn=function t(e){var n=dn(e);function i(t,e){var i=n((t=Ge(t)).r,(e=Ge(e)).r),r=n(t.g,e.g),a=n(t.b,e.b),s=pn(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=a(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function gn(t){return function(e){var n,i,r=e.length,a=new Array(r),s=new Array(r),o=new Array(r);for(n=0;n<r;++n)i=Ge(e[n]),a[n]=i.r||0,s[n]=i.g||0,o[n]=i.b||0;return a=t(a),s=t(s),o=t(o),i.opacity=1,function(t){return i.r=a(t),i.g=s(t),i.b=o(t),i+""}}}gn((function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),r=t[i],a=t[i+1],s=i>0?t[i-1]:2*r-a,o=i<e-1?t[i+2]:2*a-r;return ln((n-i/e)*e,s,r,a,o)}})),gn((function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),r=t[(i+e-1)%e],a=t[i%e],s=t[(i+1)%e],o=t[(i+2)%e];return ln((n-i/e)*e,r,a,s,o)}}));var yn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mn=new RegExp(yn.source,"g");function bn(t,e){var n,i,r,a=yn.lastIndex=mn.lastIndex=0,s=-1,o=[],c=[];for(t+="",e+="";(n=yn.exec(t))&&(i=mn.exec(e));)(r=i.index)>a&&(r=e.slice(a,r),o[s]?o[s]+=r:o[++s]=r),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,c.push({i:s,x:ye(n,i)})),a=mn.lastIndex;return a<e.length&&(r=e.slice(a),o[s]?o[s]+=r:o[++s]=r),o.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,i=0;i<e;++i)o[(n=c[i]).i]=n.x(t);return o.join("")})}function _n(t,e){var n;return("number"==typeof e?ye:e instanceof We?fn:(n=We(e))?(e=n,fn):bn)(t,e)}function xn(t){return function(){this.removeAttribute(t)}}function vn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kn(t,e,n){var i,r,a=n+"";return function(){var s=this.getAttribute(t);return s===a?null:s===i?r:r=e(i=s,n)}}function wn(t,e,n){var i,r,a=n+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===a?null:s===i?r:r=e(i=s,n)}}function Cn(t,e,n){var i,r,a;return function(){var s,o,c=n(this);if(null!=c)return(s=this.getAttribute(t))===(o=c+"")?null:s===i&&o===r?a:(r=o,a=e(i=s,c));this.removeAttribute(t)}}function Tn(t,e,n){var i,r,a;return function(){var s,o,c=n(this);if(null!=c)return(s=this.getAttributeNS(t.space,t.local))===(o=c+"")?null:s===i&&o===r?a:(r=o,a=e(i=s,c));this.removeAttributeNS(t.space,t.local)}}function En(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,r)),n}return r._value=e,r}function Sn(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,r)),n}return r._value=e,r}function An(t,e){return function(){pe(this,t).delay=+e.apply(this,arguments)}}function Ln(t,e){return e=+e,function(){pe(this,t).delay=e}}function Bn(t,e){return function(){fe(this,t).duration=+e.apply(this,arguments)}}function Nn(t,e){return e=+e,function(){fe(this,t).duration=e}}var Dn=Nt.prototype.constructor;function On(t){return function(){this.style.removeProperty(t)}}var Mn=0;function In(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Fn(){return++Mn}var $n=Nt.prototype;In.prototype=function(t){return Nt().transition(t)}.prototype={constructor:In,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=x(t));for(var i=this._groups,r=i.length,a=new Array(r),s=0;s<r;++s)for(var o,c,l=i[s],h=l.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=l[d])&&(c=t.call(o,o.__data__,d,l))&&("__data__"in o&&(c.__data__=o.__data__),u[d]=c,de(u[d],e,n,d,u,ge(o,n)));return new In(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=w(t));for(var i=this._groups,r=i.length,a=[],s=[],o=0;o<r;++o)for(var c,l=i[o],h=l.length,u=0;u<h;++u)if(c=l[u]){for(var d,p=t.call(c,c.__data__,u,l),f=ge(c,n),g=0,y=p.length;g<y;++g)(d=p[g])&&de(d,e,n,g,p,f);a.push(p),s.push(c)}return new In(a,s,e,n)},selectChild:$n.selectChild,selectChildren:$n.selectChildren,filter:function(t){"function"!=typeof t&&(t=C(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,s=e[r],o=s.length,c=i[r]=[],l=0;l<o;++l)(a=s[l])&&t.call(a,a.__data__,l,s)&&c.push(a);return new In(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,a=Math.min(i,r),s=new Array(i),o=0;o<a;++o)for(var c,l=e[o],h=n[o],u=l.length,d=s[o]=new Array(u),p=0;p<u;++p)(c=l[p]||h[p])&&(d[p]=c);for(;o<i;++o)s[o]=e[o];return new In(s,this._parents,this._name,this._id)},selection:function(){return new Dn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Fn(),i=this._groups,r=i.length,a=0;a<r;++a)for(var s,o=i[a],c=o.length,l=0;l<c;++l)if(s=o[l]){var h=ge(s,e);de(s,t,n,l,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new In(i,this._parents,t,n)},call:$n.call,nodes:$n.nodes,node:$n.node,size:$n.size,empty:$n.empty,each:$n.each,on:function(t,e){var n=this._id;return arguments.length<2?ge(this.node(),n).on.on(t):this.each(function(t,e,n){var i,r,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?pe:fe;return function(){var s=a(this,t),o=s.on;o!==i&&(r=(i=o).copy()).on(e,n),s.on=r}}(n,t,e))},attr:function(t,e){var n=Z(t),i="transform"===n?we:_n;return this.attrTween(t,"function"==typeof e?(n.local?Tn:Cn)(n,i,Ee(this,"attr."+t,e)):null==e?(n.local?vn:xn)(n):(n.local?wn:kn)(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=Z(t);return this.tween(n,(i.local?En:Sn)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?ke:_n;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var a=X(this,t),s=(this.style.removeProperty(t),X(this,t));return a===s?null:a===n&&s===i?r:r=e(n=a,i=s)}}(t,i)).on("end.style."+t,On(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,a;return function(){var s=X(this,t),o=n(this),c=o+"";return null==o&&(this.style.removeProperty(t),c=o=X(this,t)),s===c?null:s===i&&c===r?a:(r=c,a=e(i=s,o))}}(t,i,Ee(this,"style."+t,e))).each(function(t,e){var n,i,r,a,s="style."+e,o="end."+s;return function(){var c=fe(this,t),l=c.on,h=null==c.value[s]?a||(a=On(e)):void 0;l===n&&r===h||(i=(n=l).copy()).on(o,r=h),c.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r,a=n+"";return function(){var s=X(this,t);return s===a?null:s===i?r:r=e(i=s,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function a(){var a=e.apply(this,arguments);return a!==r&&(i=(r=a)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,a,n)),i}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ee(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=ge(this.node(),n).tween,a=0,s=r.length;a<s;++a)if((i=r[a]).name===t)return i.value;return null}return this.each((null==e?Ce:Te)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?An:Ln)(e,t)):ge(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Bn:Nn)(e,t)):ge(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){fe(this,t).ease=e}}(e,t)):ge(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;fe(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,r=n.size();return new Promise((function(a,s){var o={value:s},c={value:function(){0==--r&&a()}};n.each((function(){var n=fe(this,i),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(o),e._.interrupt.push(o),e._.end.push(c)),n.on=e})),0===r&&a()}))},[Symbol.iterator]:$n[Symbol.iterator]};var Rn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Zn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Nt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,i,r,a=t.__transition,s=!0;if(a){for(r in e=null==e?null:e+"",a)(n=a[r]).name===e?(i=n.state>oe&&n.state<he,n.state=ue,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[r]):s=!1;s&&delete t.__transition}}(this,t)}))},Nt.prototype.transition=function(t){var e,n;t instanceof In?(e=t._id,t=t._name):(e=Fn(),(n=Rn).time=Gt(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,a=0;a<r;++a)for(var s,o=i[a],c=o.length,l=0;l<c;++l)(s=o[l])&&de(s,t,e,l,o,n||Zn(s,e));return new In(i,this._parents,t,e)};const{abs:Pn,max:jn,min:Yn}=Math;function zn(t){return[+t[0],+t[1]]}function Un(t){return[zn(t[0]),zn(t[1])]}["w","e"].map(Wn),["n","s"].map(Wn),["n","w","e","s","nw","ne","sw","se"].map(Wn);function Wn(t){return{type:t}}function qn(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Hn(t){return(e,n)=>function(t,e){return fetch(t,e).then(qn)}(e,n).then((e=>(new DOMParser).parseFromString(e,t)))}Hn("application/xml");Hn("text/html");var Vn=Hn("image/svg+xml");const Gn=Math.PI/180,Xn=180/Math.PI,Qn=.96422,Kn=1,Jn=.82521,ti=4/29,ei=6/29,ni=3*ei*ei,ii=ei*ei*ei;function ri(t){if(t instanceof ai)return new ai(t.l,t.a,t.b,t.opacity);if(t instanceof di)return pi(t);t instanceof Xe||(t=Ve(t));var e,n,i=li(t.r),r=li(t.g),a=li(t.b),s=si((.2225045*i+.7168786*r+.0606169*a)/Kn);return i===r&&r===a?e=n=s:(e=si((.4360747*i+.3850649*r+.1430804*a)/Qn),n=si((.0139322*i+.0971045*r+.7141733*a)/Jn)),new ai(116*s-16,500*(e-s),200*(s-n),t.opacity)}function ai(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function si(t){return t>ii?Math.pow(t,1/3):t/ni+ti}function oi(t){return t>ei?t*t*t:ni*(t-ti)}function ci(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function li(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function hi(t){if(t instanceof di)return new di(t.h,t.c,t.l,t.opacity);if(t instanceof ai||(t=ri(t)),0===t.a&&0===t.b)return new di(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Xn;return new di(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ui(t,e,n,i){return 1===arguments.length?hi(t):new di(t,e,n,null==i?1:i)}function di(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function pi(t){if(isNaN(t.h))return new ai(t.l,0,0,t.opacity);var e=t.h*Gn;return new ai(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function fi(t){return function(e,n){var i=t((e=ui(e)).h,(n=ui(n)).h),r=pn(e.c,n.c),a=pn(e.l,n.l),s=pn(e.opacity,n.opacity);return function(t){return e.h=i(t),e.c=r(t),e.l=a(t),e.opacity=s(t),e+""}}}Se(ai,(function(t,e,n,i){return 1===arguments.length?ri(t):new ai(t,e,n,null==i?1:i)}),Ae(Le,{brighter(t){return new ai(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new ai(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Xe(ci(3.1338561*(e=Qn*oi(e))-1.6168667*(t=Kn*oi(t))-.4906146*(n=Jn*oi(n))),ci(-.9787684*e+1.9161415*t+.033454*n),ci(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Se(di,ui,Ae(Le,{brighter(t){return new di(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new di(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return pi(this).rgb()}}));const gi=fi((function(t,e){var n=e-t;return n?un(t,n>180||n<-180?n-360*Math.round(n/360):n):hn(isNaN(t)?e:t)}));fi(pn);const yi=Math.sqrt(50),mi=Math.sqrt(10),bi=Math.sqrt(2);function _i(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),s=a>=yi?10:a>=mi?5:a>=bi?2:1;let o,c,l;return r<0?(l=Math.pow(10,-r)/s,o=Math.round(t*l),c=Math.round(e*l),o/l<t&&++o,c/l>e&&--c,l=-l):(l=Math.pow(10,r)*s,o=Math.round(t/l),c=Math.round(e/l),o*l<t&&++o,c*l>e&&--c),c<o&&.5<=n&&n<2?_i(t,e,2*n):[o,c,l]}function xi(t,e,n){return _i(t=+t,e=+e,n=+n)[2]}function vi(t,e,n){n=+n;const i=(e=+e)<(t=+t),r=i?xi(e,t,n):xi(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function ki(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wi(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ci(t){let e,n,i;function r(t,i,r=0,a=t.length){if(r<a){if(0!==e(i,i))return a;do{const e=r+a>>>1;n(t[e],i)<0?r=e+1:a=e}while(r<a)}return r}return 2!==t.length?(e=ki,n=(e,n)=>ki(t(e),n),i=(e,n)=>t(e)-n):(e=t===ki||t===wi?t:Ti,n=t,i=t),{left:r,center:function(t,e,n=0,a=t.length){const s=r(t,e,n,a-1);return s>n&&i(t[s-1],e)>-i(t[s],e)?s-1:s},right:function(t,i,r=0,a=t.length){if(r<a){if(0!==e(i,i))return a;do{const e=r+a>>>1;n(t[e],i)<=0?r=e+1:a=e}while(r<a)}return r}}}function Ti(){return 0}const Ei=Ci(ki),Si=Ei.right,Ai=(Ei.left,Ci((function(t){return null===t?NaN:+t})).center,Si);function Li(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,a=new Array(r),s=new Array(i);for(n=0;n<r;++n)a[n]=Oi(t[n],e[n]);for(;n<i;++n)s[n]=e[n];return function(t){for(n=0;n<r;++n)s[n]=a[n](t);return s}}function Bi(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Ni(t,e){var n,i={},r={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=Oi(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}}function Di(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,r=e.slice();return function(a){for(n=0;n<i;++n)r[n]=t[n]*(1-a)+e[n]*a;return r}}function Oi(t,e){var n,i,r=typeof e;return null==e||"boolean"===r?hn(e):("number"===r?ye:"string"===r?(n=We(e))?(e=n,fn):bn:e instanceof We?fn:e instanceof Date?Bi:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?Li:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ni:ye:Di))(t,e)}function Mi(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Ii(t){return+t}var Fi=[0,1];function $i(t){return t}function Ri(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Zi(t,e,n){var i=t[0],r=t[1],a=e[0],s=e[1];return r<i?(i=Ri(r,i),a=n(s,a)):(i=Ri(i,r),a=n(a,s)),function(t){return a(i(t))}}function Pi(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),a=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=Ri(t[s],t[s+1]),a[s]=n(e[s],e[s+1]);return function(e){var n=Ai(t,e,1,i)-1;return a[n](r[n](e))}}function ji(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Yi(){var t,e,n,i,r,a,s=Fi,o=Fi,c=Oi,l=$i;function h(){var t,e,n,c=Math.min(s.length,o.length);return l!==$i&&(t=s[0],e=s[c-1],t>e&&(n=t,t=e,e=n),l=function(n){return Math.max(t,Math.min(e,n))}),i=c>2?Pi:Zi,r=a=null,u}function u(e){return null==e||isNaN(e=+e)?n:(r||(r=i(s.map(t),o,c)))(t(l(e)))}return u.invert=function(n){return l(e((a||(a=i(o,s.map(t),ye)))(n)))},u.domain=function(t){return arguments.length?(s=Array.from(t,Ii),h()):s.slice()},u.range=function(t){return arguments.length?(o=Array.from(t),h()):o.slice()},u.rangeRound=function(t){return o=Array.from(t),c=Mi,h()},u.clamp=function(t){return arguments.length?(l=!!t||$i,h()):l!==$i},u.interpolate=function(t){return arguments.length?(c=t,h()):c},u.unknown=function(t){return arguments.length?(n=t,u):n},function(n,i){return t=n,e=i,h()}}function zi(){return Yi()($i,$i)}function Ui(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Wi,qi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hi(t){if(!(e=qi.exec(t)))throw new Error("invalid format: "+t);var e;return new Vi({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Vi(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Gi(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Xi(t){return(t=Gi(Math.abs(t)))?t[1]:NaN}function Qi(t,e){var n=Gi(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}Hi.prototype=Vi.prototype,Vi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Ki={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Qi(100*t,e),r:Qi,s:function(t,e){var n=Gi(t,e);if(!n)return t+"";var i=n[0],r=n[1],a=r-(Wi=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return a===s?i:a>s?i+new Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Gi(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ji(t){return t}var tr,er,nr,ir=Array.prototype.map,rr=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function ar(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?Ji:(e=ir.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,a=[],s=0,o=e[0],c=0;r>0&&o>0&&(c+o+1>i&&(o=Math.max(1,i-c)),a.push(t.substring(r-=o,r+o)),!((c+=o+1)>i));)o=e[s=(s+1)%e.length];return a.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?Ji:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ir.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"\u2212":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=Hi(t)).fill,n=t.align,u=t.sign,d=t.symbol,p=t.zero,f=t.width,g=t.comma,y=t.precision,m=t.trim,b=t.type;"n"===b?(g=!0,b="g"):Ki[b]||(void 0===y&&(y=12),m=!0,b="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===d?r:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?a:/[%p]/.test(b)?c:"",v=Ki[b],k=/[defgprs%]/.test(b);function w(t){var r,a,c,d=_,w=x;if("c"===b)w=v(t)+w,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:v(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i<n;++i)switch(t[i]){case".":r=e=i;break;case"0":0===r&&(r=i),e=i;break;default:if(!+t[i])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),C&&0==+t&&"+"!==u&&(C=!1),d=(C?"("===u?u:l:"-"===u||"("===u?"":u)+d,w=("s"===b?rr[8+Wi/3]:"")+w+(C&&"("===u?")":""),k)for(r=-1,a=t.length;++r<a;)if(48>(c=t.charCodeAt(r))||c>57){w=(46===c?s+t.slice(r+1):t.slice(r))+w,t=t.slice(0,r);break}}g&&!p&&(t=i(t,1/0));var T=d.length+t.length+w.length,E=T<f?new Array(f-T+1).join(e):"";switch(g&&p&&(t=i(E+t,E.length?f-w.length:1/0),E=""),n){case"<":t=d+t+w+E;break;case"=":t=d+E+t+w;break;case"^":t=E.slice(0,T=E.length>>1)+d+t+w+E.slice(T);break;default:t=E+d+t+w}return o(t)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),w.toString=function(){return t+""},w}return{format:u,formatPrefix:function(t,e){var n=u(((t=Hi(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Xi(e)/3))),r=Math.pow(10,-i),a=rr[8+i/3];return function(t){return n(r*t)+a}}}}function sr(t,e,n,i){var r,a=vi(t,e,n);switch((i=Hi(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Xi(e)/3)))-Xi(Math.abs(t)))}(a,s))||(i.precision=r),nr(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Xi(e)-Xi(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-Xi(Math.abs(t)))}(a))||(i.precision=r-2*("%"===i.type))}return er(i)}function or(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const i=e<t,[r,a,s]=i?_i(e,t,n):_i(t,e,n);if(!(a>=r))return[];const o=a-r+1,c=new Array(o);if(i)if(s<0)for(let l=0;l<o;++l)c[l]=(a-l)/-s;else for(let l=0;l<o;++l)c[l]=(a-l)*s;else if(s<0)for(let l=0;l<o;++l)c[l]=(r+l)/-s;else for(let l=0;l<o;++l)c[l]=(r+l)*s;return c}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return sr(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r,a=e(),s=0,o=a.length-1,c=a[s],l=a[o],h=10;for(l<c&&(r=c,c=l,l=r,r=s,s=o,o=r);h-- >0;){if((r=xi(c,l,n))===i)return a[s]=c,a[o]=l,e(a);if(r>0)c=Math.floor(c/r)*r,l=Math.ceil(l/r)*r;else{if(!(r<0))break;c=Math.ceil(c*r)/r,l=Math.floor(l*r)/r}i=r}return t},t}function cr(){var t=zi();return t.copy=function(){return ji(t,cr())},Ui.apply(t,arguments),or(t)}tr=ar({thousands:",",grouping:[3],currency:["$",""]}),er=tr.format,nr=tr.formatPrefix;class lr extends Map{constructor(t,e=pr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(hr(this,t))}has(t){return super.has(hr(this,t))}set(t,e){return super.set(ur(this,t),e)}delete(t){return super.delete(dr(this,t))}}function hr({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function ur({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function dr({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function pr(t){return null!==t&&"object"==typeof t?t.valueOf():t}const fr=Symbol("implicit");function gr(){var t=new lr,e=[],n=[],i=fr;function r(r){let a=t.get(r);if(void 0===a){if(i!==fr)return i;t.set(r,a=e.push(r)-1)}return n[a%n.length]}return r.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new lr;for(const i of n)t.has(i)||t.set(i,e.push(i)-1);return r},r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return gr(e,n).unknown(i)},Ui.apply(r,arguments),r}const yr=1e3,mr=6e4,br=36e5,_r=864e5,xr=6048e5,vr=2592e6,kr=31536e6,wr=new Date,Cr=new Date;function Tr(t,e,n,i){function r(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return r.floor=e=>(t(e=new Date(+e)),e),r.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),r.round=t=>{const e=r(t),n=r.ceil(t);return t-e<n-t?e:n},r.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),r.range=(n,i,a)=>{const s=[];if(n=r.ceil(n),a=null==a?1:Math.floor(a),!(n<i&&a>0))return s;let o;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<i);return s},r.filter=n=>Tr((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););})),n&&(r.count=(e,i)=>(wr.setTime(+e),Cr.setTime(+i),t(wr),t(Cr),Math.floor(n(wr,Cr))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?e=>i(e)%t==0:e=>r.count(0,e)%t==0):r:null)),r}const Er=Tr((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Er.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Tr((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):Er:null);Er.range;const Sr=Tr((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*yr)}),((t,e)=>(e-t)/yr),(t=>t.getUTCSeconds())),Ar=(Sr.range,Tr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yr)}),((t,e)=>{t.setTime(+t+e*mr)}),((t,e)=>(e-t)/mr),(t=>t.getMinutes()))),Lr=(Ar.range,Tr((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*mr)}),((t,e)=>(e-t)/mr),(t=>t.getUTCMinutes()))),Br=(Lr.range,Tr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yr-t.getMinutes()*mr)}),((t,e)=>{t.setTime(+t+e*br)}),((t,e)=>(e-t)/br),(t=>t.getHours()))),Nr=(Br.range,Tr((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*br)}),((t,e)=>(e-t)/br),(t=>t.getUTCHours()))),Dr=(Nr.range,Tr((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*mr)/_r),(t=>t.getDate()-1))),Or=(Dr.range,Tr((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/_r),(t=>t.getUTCDate()-1))),Mr=(Or.range,Tr((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/_r),(t=>Math.floor(t/_r))));Mr.range;function Ir(t){return Tr((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*mr)/xr))}const Fr=Ir(0),$r=Ir(1),Rr=Ir(2),Zr=Ir(3),Pr=Ir(4),jr=Ir(5),Yr=Ir(6);Fr.range,$r.range,Rr.range,Zr.range,Pr.range,jr.range,Yr.range;function zr(t){return Tr((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/xr))}const Ur=zr(0),Wr=zr(1),qr=zr(2),Hr=zr(3),Vr=zr(4),Gr=zr(5),Xr=zr(6),Qr=(Ur.range,Wr.range,qr.range,Hr.range,Vr.range,Gr.range,Xr.range,Tr((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),Kr=(Qr.range,Tr((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),Jr=(Kr.range,Tr((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));Jr.every=t=>isFinite(t=Math.floor(t))&&t>0?Tr((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null;Jr.range;const ta=Tr((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));ta.every=t=>isFinite(t=Math.floor(t))&&t>0?Tr((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null;ta.range;function ea(t,e,n,i,r,a){const s=[[Sr,1,yr],[Sr,5,5e3],[Sr,15,15e3],[Sr,30,3e4],[a,1,mr],[a,5,3e5],[a,15,9e5],[a,30,18e5],[r,1,br],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,_r],[i,2,1728e5],[n,1,xr],[e,1,vr],[e,3,7776e6],[t,1,kr]];function o(e,n,i){const r=Math.abs(n-e)/i,a=Ci((([,,t])=>t)).right(s,r);if(a===s.length)return t.every(vi(e/kr,n/kr,i));if(0===a)return Er.every(Math.max(vi(e,n,i),1));const[o,c]=s[r/s[a-1][2]<s[a][2]/r?a-1:a];return o.every(c)}return[function(t,e,n){const i=e<t;i&&([t,e]=[e,t]);const r=n&&"function"==typeof n.range?n:o(t,e,n),a=r?r.range(t,+e+1):[];return i?a.reverse():a},o]}const[na,ia]=ea(ta,Kr,Ur,Mr,Nr,Lr),[ra,aa]=ea(Jr,Qr,Fr,Dr,Br,Ar);function sa(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function oa(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ca(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var la,ha,ua={"-":"",_:" ",0:"0"},da=/^\s*\d+/,pa=/^%/,fa=/[\\^$*+?|[\]().{}]/g;function ga(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",a=r.length;return i+(a<n?new Array(n-a+1).join(e)+r:r)}function ya(t){return t.replace(fa,"\\$&")}function ma(t){return new RegExp("^(?:"+t.map(ya).join("|")+")","i")}function ba(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function _a(t,e,n){var i=da.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function xa(t,e,n){var i=da.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function va(t,e,n){var i=da.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function ka(t,e,n){var i=da.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function wa(t,e,n){var i=da.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function Ca(t,e,n){var i=da.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Ta(t,e,n){var i=da.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Ea(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Sa(t,e,n){var i=da.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function Aa(t,e,n){var i=da.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function La(t,e,n){var i=da.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Ba(t,e,n){var i=da.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function Na(t,e,n){var i=da.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function Da(t,e,n){var i=da.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Oa(t,e,n){var i=da.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Ma(t,e,n){var i=da.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function Ia(t,e,n){var i=da.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Fa(t,e,n){var i=pa.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function $a(t,e,n){var i=da.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function Ra(t,e,n){var i=da.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function Za(t,e){return ga(t.getDate(),e,2)}function Pa(t,e){return ga(t.getHours(),e,2)}function ja(t,e){return ga(t.getHours()%12||12,e,2)}function Ya(t,e){return ga(1+Dr.count(Jr(t),t),e,3)}function za(t,e){return ga(t.getMilliseconds(),e,3)}function Ua(t,e){return za(t,e)+"000"}function Wa(t,e){return ga(t.getMonth()+1,e,2)}function qa(t,e){return ga(t.getMinutes(),e,2)}function Ha(t,e){return ga(t.getSeconds(),e,2)}function Va(t){var e=t.getDay();return 0===e?7:e}function Ga(t,e){return ga(Fr.count(Jr(t)-1,t),e,2)}function Xa(t){var e=t.getDay();return e>=4||0===e?Pr(t):Pr.ceil(t)}function Qa(t,e){return t=Xa(t),ga(Pr.count(Jr(t),t)+(4===Jr(t).getDay()),e,2)}function Ka(t){return t.getDay()}function Ja(t,e){return ga($r.count(Jr(t)-1,t),e,2)}function ts(t,e){return ga(t.getFullYear()%100,e,2)}function es(t,e){return ga((t=Xa(t)).getFullYear()%100,e,2)}function ns(t,e){return ga(t.getFullYear()%1e4,e,4)}function is(t,e){var n=t.getDay();return ga((t=n>=4||0===n?Pr(t):Pr.ceil(t)).getFullYear()%1e4,e,4)}function rs(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ga(e/60|0,"0",2)+ga(e%60,"0",2)}function as(t,e){return ga(t.getUTCDate(),e,2)}function ss(t,e){return ga(t.getUTCHours(),e,2)}function os(t,e){return ga(t.getUTCHours()%12||12,e,2)}function cs(t,e){return ga(1+Or.count(ta(t),t),e,3)}function ls(t,e){return ga(t.getUTCMilliseconds(),e,3)}function hs(t,e){return ls(t,e)+"000"}function us(t,e){return ga(t.getUTCMonth()+1,e,2)}function ds(t,e){return ga(t.getUTCMinutes(),e,2)}function ps(t,e){return ga(t.getUTCSeconds(),e,2)}function fs(t){var e=t.getUTCDay();return 0===e?7:e}function gs(t,e){return ga(Ur.count(ta(t)-1,t),e,2)}function ys(t){var e=t.getUTCDay();return e>=4||0===e?Vr(t):Vr.ceil(t)}function ms(t,e){return t=ys(t),ga(Vr.count(ta(t),t)+(4===ta(t).getUTCDay()),e,2)}function bs(t){return t.getUTCDay()}function _s(t,e){return ga(Wr.count(ta(t)-1,t),e,2)}function xs(t,e){return ga(t.getUTCFullYear()%100,e,2)}function vs(t,e){return ga((t=ys(t)).getUTCFullYear()%100,e,2)}function ks(t,e){return ga(t.getUTCFullYear()%1e4,e,4)}function ws(t,e){var n=t.getUTCDay();return ga((t=n>=4||0===n?Vr(t):Vr.ceil(t)).getUTCFullYear()%1e4,e,4)}function Cs(){return"+0000"}function Ts(){return"%"}function Es(t){return+t}function Ss(t){return Math.floor(+t/1e3)}function As(t){return new Date(t)}function Ls(t){return t instanceof Date?+t:+new Date(+t)}function Bs(t,e,n,i,r,a,s,o,c,l){var h=zi(),u=h.invert,d=h.domain,p=l(".%L"),f=l(":%S"),g=l("%I:%M"),y=l("%I %p"),m=l("%a %d"),b=l("%b %d"),_=l("%B"),x=l("%Y");function v(t){return(c(t)<t?p:o(t)<t?f:s(t)<t?g:a(t)<t?y:i(t)<t?r(t)<t?m:b:n(t)<t?_:x)(t)}return h.invert=function(t){return new Date(u(t))},h.domain=function(t){return arguments.length?d(Array.from(t,Ls)):d().map(As)},h.ticks=function(e){var n=d();return t(n[0],n[n.length-1],null==e?10:e)},h.tickFormat=function(t,e){return null==e?v:l(e)},h.nice=function(t){var n=d();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?d(function(t,e){var n,i=0,r=(t=t.slice()).length-1,a=t[i],s=t[r];return s<a&&(n=i,i=r,r=n,n=a,a=s,s=n),t[i]=e.floor(a),t[r]=e.ceil(s),t}(n,t)):h},h.copy=function(){return ji(h,Bs(t,e,n,i,r,a,s,o,c,l))},h}function Ns(){return Ui.apply(Bs(ra,aa,Jr,Qr,Fr,Dr,Br,Ar,Sr,ha).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ds(t){return"string"==typeof t?new Lt([[document.querySelector(t)]],[document.documentElement]):new Lt([[t]],At)}function Os(t){return"string"==typeof t?new Lt([document.querySelectorAll(t)],[document.documentElement]):new Lt([v(t)],At)}function Ms(t){return function(){return t}}!function(t){la=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,a=t.days,s=t.shortDays,o=t.months,c=t.shortMonths,l=ma(r),h=ba(r),u=ma(a),d=ba(a),p=ma(s),f=ba(s),g=ma(o),y=ba(o),m=ma(c),b=ba(c),_={a:function(t){return s[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return o[t.getMonth()]},c:null,d:Za,e:Za,f:Ua,g:es,G:is,H:Pa,I:ja,j:Ya,L:za,m:Wa,M:qa,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Es,s:Ss,S:Ha,u:Va,U:Ga,V:Qa,w:Ka,W:Ja,x:null,X:null,y:ts,Y:ns,Z:rs,"%":Ts},x={a:function(t){return s[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return o[t.getUTCMonth()]},c:null,d:as,e:as,f:hs,g:vs,G:ws,H:ss,I:os,j:cs,L:ls,m:us,M:ds,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Es,s:Ss,S:ps,u:fs,U:gs,V:ms,w:bs,W:_s,x:null,X:null,y:xs,Y:ks,Z:Cs,"%":Ts},v={a:function(t,e,n){var i=p.exec(e.slice(n));return i?(t.w=f.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=u.exec(e.slice(n));return i?(t.w=d.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=m.exec(e.slice(n));return i?(t.m=b.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=g.exec(e.slice(n));return i?(t.m=y.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return C(t,e,n,i)},d:La,e:La,f:Ia,g:Ta,G:Ca,H:Na,I:Na,j:Ba,L:Ma,m:Aa,M:Da,p:function(t,e,n){var i=l.exec(e.slice(n));return i?(t.p=h.get(i[0].toLowerCase()),n+i[0].length):-1},q:Sa,Q:$a,s:Ra,S:Oa,u:xa,U:va,V:ka,w:_a,W:wa,x:function(t,e,i){return C(t,n,e,i)},X:function(t,e,n){return C(t,i,e,n)},y:Ta,Y:Ca,Z:Ea,"%":Fa};function k(t,e){return function(n){var i,r,a,s=[],o=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++o<l;)37===t.charCodeAt(o)&&(s.push(t.slice(c,o)),null!=(r=ua[i=t.charAt(++o)])?i=t.charAt(++o):r="e"===i?" ":"0",(a=e[i])&&(i=a(n,r)),s.push(i),c=o+1);return s.push(t.slice(c,o)),s.join("")}}function w(t,e){return function(n){var i,r,a=ca(1900,void 0,1);if(C(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(r=(i=oa(ca(a.y,0,1))).getUTCDay(),i=r>4||0===r?Wr.ceil(i):Wr(i),i=Or.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(r=(i=sa(ca(a.y,0,1))).getDay(),i=r>4||0===r?$r.ceil(i):$r(i),i=Dr.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),r="Z"in a?oa(ca(a.y,0,1)).getUTCDay():sa(ca(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(r+5)%7:a.w+7*a.U-(r+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,oa(a)):sa(a)}}function C(t,e,n,i){for(var r,a,s=0,o=e.length,c=n.length;s<o;){if(i>=c)return-1;if(37===(r=e.charCodeAt(s++))){if(r=e.charAt(s++),!(a=v[r in ua?e.charAt(s++):r])||(i=a(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return _.x=k(n,_),_.X=k(i,_),_.c=k(e,_),x.x=k(n,x),x.X=k(i,x),x.c=k(e,x),{format:function(t){var e=k(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}(t),ha=la.format,la.parse,la.utcFormat,la.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Is=Math.abs,Fs=Math.atan2,$s=Math.cos,Rs=Math.max,Zs=Math.min,Ps=Math.sin,js=Math.sqrt,Ys=1e-12,zs=Math.PI,Us=zs/2,Ws=2*zs;function qs(t){return t>=1?Us:t<=-1?-Us:Math.asin(t)}const Hs=Math.PI,Vs=2*Hs,Gs=1e-6,Xs=Vs-Gs;function Qs(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class Ks{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Qs:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Qs;const n=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,i){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,e,n,i,r,a){this._append`C${+t},${+e},${+n},${+i},${this._x1=+r},${this._y1=+a}`}arcTo(t,e,n,i,r){if(t=+t,e=+e,n=+n,i=+i,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=this._x1,s=this._y1,o=n-t,c=i-e,l=a-t,h=s-e,u=l*l+h*h;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>Gs)if(Math.abs(h*o-c*l)>Gs&&r){let d=n-a,p=i-s,f=o*o+c*c,g=d*d+p*p,y=Math.sqrt(f),m=Math.sqrt(u),b=r*Math.tan((Hs-Math.acos((f+u-g)/(2*y*m)))/2),_=b/m,x=b/y;Math.abs(_-1)>Gs&&this._append`L${t+_*l},${e+_*h}`,this._append`A${r},${r},0,0,${+(h*d>l*p)},${this._x1=t+x*o},${this._y1=e+x*c}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,i,r,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),o=n*Math.sin(i),c=t+s,l=e+o,h=1^a,u=a?i-r:r-i;null===this._x1?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Gs||Math.abs(this._y1-l)>Gs)&&this._append`L${c},${l}`,n&&(u<0&&(u=u%Vs+Vs),u>Xs?this._append`A${n},${n},0,1,${h},${t-s},${e-o}A${n},${n},0,1,${h},${this._x1=c},${this._y1=l}`:u>Gs&&this._append`A${n},${n},0,${+(u>=Hs)},${h},${this._x1=t+n*Math.cos(r)},${this._y1=e+n*Math.sin(r)}`)}rect(t,e,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Js(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Ks(e)}function to(t){return t.innerRadius}function eo(t){return t.outerRadius}function no(t){return t.startAngle}function io(t){return t.endAngle}function ro(t){return t&&t.padAngle}function ao(t,e,n,i,r,a,s){var o=t-n,c=e-i,l=(s?a:-a)/js(o*o+c*c),h=l*c,u=-l*o,d=t+h,p=e+u,f=n+h,g=i+u,y=(d+f)/2,m=(p+g)/2,b=f-d,_=g-p,x=b*b+_*_,v=r-a,k=d*g-f*p,w=(_<0?-1:1)*js(Rs(0,v*v*x-k*k)),C=(k*_-b*w)/x,T=(-k*b-_*w)/x,E=(k*_+b*w)/x,S=(-k*b+_*w)/x,A=C-y,L=T-m,B=E-y,N=S-m;return A*A+L*L>B*B+N*N&&(C=E,T=S),{cx:C,cy:T,x01:-h,y01:-u,x11:C*(r/v-1),y11:T*(r/v-1)}}function so(){var t=to,e=eo,n=Ms(0),i=null,r=no,a=io,s=ro,o=null,c=Js(l);function l(){var l,h,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=r.apply(this,arguments)-Us,g=a.apply(this,arguments)-Us,y=Is(g-f),m=g>f;if(o||(o=l=c()),p<d&&(h=p,p=d,d=h),p>Ys)if(y>Ws-Ys)o.moveTo(p*$s(f),p*Ps(f)),o.arc(0,0,p,f,g,!m),d>Ys&&(o.moveTo(d*$s(g),d*Ps(g)),o.arc(0,0,d,g,f,m));else{var b,_,x=f,v=g,k=f,w=g,C=y,T=y,E=s.apply(this,arguments)/2,S=E>Ys&&(i?+i.apply(this,arguments):js(d*d+p*p)),A=Zs(Is(p-d)/2,+n.apply(this,arguments)),L=A,B=A;if(S>Ys){var N=qs(S/d*Ps(E)),D=qs(S/p*Ps(E));(C-=2*N)>Ys?(k+=N*=m?1:-1,w-=N):(C=0,k=w=(f+g)/2),(T-=2*D)>Ys?(x+=D*=m?1:-1,v-=D):(T=0,x=v=(f+g)/2)}var O=p*$s(x),M=p*Ps(x),I=d*$s(w),F=d*Ps(w);if(A>Ys){var $,R=p*$s(v),Z=p*Ps(v),P=d*$s(k),j=d*Ps(k);if(y<zs)if($=function(t,e,n,i,r,a,s,o){var c=n-t,l=i-e,h=s-r,u=o-a,d=u*c-h*l;if(!(d*d<Ys))return[t+(d=(h*(e-a)-u*(t-r))/d)*c,e+d*l]}(O,M,P,j,R,Z,I,F)){var Y=O-$[0],z=M-$[1],U=R-$[0],W=Z-$[1],q=1/Ps(((u=(Y*U+z*W)/(js(Y*Y+z*z)*js(U*U+W*W)))>1?0:u<-1?zs:Math.acos(u))/2),H=js($[0]*$[0]+$[1]*$[1]);L=Zs(A,(d-H)/(q-1)),B=Zs(A,(p-H)/(q+1))}else L=B=0}T>Ys?B>Ys?(b=ao(P,j,O,M,p,B,m),_=ao(R,Z,I,F,p,B,m),o.moveTo(b.cx+b.x01,b.cy+b.y01),B<A?o.arc(b.cx,b.cy,B,Fs(b.y01,b.x01),Fs(_.y01,_.x01),!m):(o.arc(b.cx,b.cy,B,Fs(b.y01,b.x01),Fs(b.y11,b.x11),!m),o.arc(0,0,p,Fs(b.cy+b.y11,b.cx+b.x11),Fs(_.cy+_.y11,_.cx+_.x11),!m),o.arc(_.cx,_.cy,B,Fs(_.y11,_.x11),Fs(_.y01,_.x01),!m))):(o.moveTo(O,M),o.arc(0,0,p,x,v,!m)):o.moveTo(O,M),d>Ys&&C>Ys?L>Ys?(b=ao(I,F,R,Z,d,-L,m),_=ao(O,M,P,j,d,-L,m),o.lineTo(b.cx+b.x01,b.cy+b.y01),L<A?o.arc(b.cx,b.cy,L,Fs(b.y01,b.x01),Fs(_.y01,_.x01),!m):(o.arc(b.cx,b.cy,L,Fs(b.y01,b.x01),Fs(b.y11,b.x11),!m),o.arc(0,0,d,Fs(b.cy+b.y11,b.cx+b.x11),Fs(_.cy+_.y11,_.cx+_.x11),m),o.arc(_.cx,_.cy,L,Fs(_.y11,_.x11),Fs(_.y01,_.x01),!m))):o.arc(0,0,d,w,k,m):o.lineTo(I,F)}else o.moveTo(0,0);if(o.closePath(),l)return o=null,l+""||null}return l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +a.apply(this,arguments))/2-zs/2;return[$s(i)*n,Ps(i)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ms(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ms(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Ms(+t),l):n},l.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Ms(+t),l):i},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ms(+t),l):r},l.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ms(+t),l):a},l.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:Ms(+t),l):s},l.context=function(t){return arguments.length?(o=null==t?null:t,l):o},l}Ks.prototype;Array.prototype.slice;function oo(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function co(t){this._context=t}function lo(t){return new co(t)}function ho(t){return t[0]}function uo(t){return t[1]}function po(t,e){var n=Ms(!0),i=null,r=lo,a=null,s=Js(o);function o(o){var c,l,h,u=(o=oo(o)).length,d=!1;for(null==i&&(a=r(h=s())),c=0;c<=u;++c)!(c<u&&n(l=o[c],c,o))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(l,c,o),+e(l,c,o));if(h)return a=null,h+""||null}return t="function"==typeof t?t:void 0===t?ho:Ms(t),e="function"==typeof e?e:void 0===e?uo:Ms(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:Ms(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Ms(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Ms(!!t),o):n},o.curve=function(t){return arguments.length?(r=t,null!=i&&(a=r(i)),o):r},o.context=function(t){return arguments.length?(null==t?i=a=null:a=r(i=t),o):i},o}function fo(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function go(t){return t}function yo(){var t=go,e=fo,n=null,i=Ms(0),r=Ms(Ws),a=Ms(0);function s(s){var o,c,l,h,u,d=(s=oo(s)).length,p=0,f=new Array(d),g=new Array(d),y=+i.apply(this,arguments),m=Math.min(Ws,Math.max(-Ws,r.apply(this,arguments)-y)),b=Math.min(Math.abs(m)/d,a.apply(this,arguments)),_=b*(m<0?-1:1);for(o=0;o<d;++o)(u=g[f[o]=o]=+t(s[o],o,s))>0&&(p+=u);for(null!=e?f.sort((function(t,n){return e(g[t],g[n])})):null!=n&&f.sort((function(t,e){return n(s[t],s[e])})),o=0,l=p?(m-d*_)/p:0;o<d;++o,y=h)c=f[o],h=y+((u=g[c])>0?u*l:0)+_,g[c]={data:s[c],index:o,value:u,startAngle:y,endAngle:h,padAngle:b};return g}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:Ms(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ms(+t),s):i},s.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ms(+t),s):r},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ms(+t),s):a},s}function mo(){}function bo(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function _o(t){this._context=t}function xo(t){return new _o(t)}function vo(t){this._context=t}function ko(t){return new vo(t)}function wo(t){this._context=t}function Co(t){return new wo(t)}co.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},_o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:bo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:bo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},vo.prototype={areaStart:mo,areaEnd:mo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:bo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},wo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:bo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class To{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function Eo(t){return new To(t,!0)}function So(t){return new To(t,!1)}function Ao(t,e){this._basis=new _o(t),this._beta=e}Ao.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i,r=t[0],a=e[0],s=t[n]-r,o=e[n]-a,c=-1;++c<=n;)i=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(r+i*s),this._beta*e[c]+(1-this._beta)*(a+i*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Lo=function t(e){function n(t){return 1===e?new _o(t):new Ao(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Bo(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function No(t,e){this._context=t,this._k=(1-e)/6}No.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bo(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Bo(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Do=function t(e){function n(t){return new No(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Oo(t,e){this._context=t,this._k=(1-e)/6}Oo.prototype={areaStart:mo,areaEnd:mo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Bo(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Mo=function t(e){function n(t){return new Oo(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Io(t,e){this._context=t,this._k=(1-e)/6}Io.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bo(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Fo=function t(e){function n(t){return new Io(t,e)}return n.tension=function(e){return t(+e)},n}(0);function $o(t,e,n){var i=t._x1,r=t._y1,a=t._x2,s=t._y2;if(t._l01_a>Ys){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Ys){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*l+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(i,r,a,s,t._x2,t._y2)}function Ro(t,e){this._context=t,this._alpha=e}Ro.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:$o(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Zo=function t(e){function n(t){return e?new Ro(t,e):new No(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Po(t,e){this._context=t,this._alpha=e}Po.prototype={areaStart:mo,areaEnd:mo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:$o(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const jo=function t(e){function n(t){return e?new Po(t,e):new Oo(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Yo(t,e){this._context=t,this._alpha=e}Yo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:$o(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zo=function t(e){function n(t){return e?new Yo(t,e):new Io(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Uo(t){this._context=t}function Wo(t){return new Uo(t)}function qo(t){return t<0?-1:1}function Ho(t,e,n){var i=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),o=(a*r+s*i)/(i+r);return(qo(a)+qo(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Vo(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Go(t,e,n){var i=t._x0,r=t._y0,a=t._x1,s=t._y1,o=(a-i)/3;t._context.bezierCurveTo(i+o,r+o*e,a-o,s-o*n,a,s)}function Xo(t){this._context=t}function Qo(t){this._context=new Ko(t)}function Ko(t){this._context=t}function Jo(t){return new Xo(t)}function tc(t){return new Qo(t)}function ec(t){this._context=t}function nc(t){var e,n,i=t.length-1,r=new Array(i),a=new Array(i),s=new Array(i);for(r[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)r[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,a[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=r[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(r[i-1]=s[i-1]/a[i-1],e=i-2;e>=0;--e)r[e]=(s[e]-r[e+1])/a[e];for(a[i-1]=(t[i]+r[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-r[e+1];return[r,a]}function ic(t){return new ec(t)}function rc(t,e){this._context=t,this._t=e}function ac(t){return new rc(t,.5)}function sc(t){return new rc(t,0)}function oc(t){return new rc(t,1)}function cc(t,e,n){this.k=t,this.x=e,this.y=n}Uo.prototype={areaStart:mo,areaEnd:mo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Xo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Go(this,this._t0,Vo(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Go(this,Vo(this,n=Ho(this,t,e)),n);break;default:Go(this,this._t0,n=Ho(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Qo.prototype=Object.create(Xo.prototype)).point=function(t,e){Xo.prototype.point.call(this,e,t)},Ko.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,a){this._context.bezierCurveTo(e,t,i,n,a,r)}},ec.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=nc(t),r=nc(e),a=0,s=1;s<n;++a,++s)this._context.bezierCurveTo(i[0][a],r[0][a],i[1][a],r[1][a],t[s],e[s]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},rc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},cc.prototype={constructor:cc,scale:function(t){return 1===t?this:new cc(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new cc(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new cc(1,0,0);cc.prototype},3352:(t,e,n)=>{"use strict";function i(t,e,n,i){var a,s,o,c,l,h,u,d,p,f,g,y,m;if(a=e.y-t.y,o=t.x-e.x,l=e.x*t.y-t.x*e.y,p=a*n.x+o*n.y+l,f=a*i.x+o*i.y+l,!(0!==p&&0!==f&&r(p,f)||(s=i.y-n.y,c=n.x-i.x,h=i.x*n.y-n.x*i.y,u=s*t.x+c*t.y+h,d=s*e.x+c*e.y+h,0!==u&&0!==d&&r(u,d)||0==(g=a*c-s*o))))return y=Math.abs(g/2),{x:(m=o*h-c*l)<0?(m-y)/g:(m+y)/g,y:(m=s*l-a*h)<0?(m-y)/g:(m+y)/g}}function r(t,e){return t*e>0}function a(t,e,n){var r=t.x,a=t.y,s=[],o=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){o=Math.min(o,t.x),c=Math.min(c,t.y)}));for(var l=r-t.width/2-o,h=a-t.height/2-c,u=0;u<e.length;u++){var d=e[u],p=e[u<e.length-1?u+1:0],f=i(t,n,{x:l+d.x,y:h+d.y},{x:l+p.x,y:h+p.y});f&&s.push(f)}return s.length?(s.length>1&&s.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<c?-1:a===c?0:1})),s[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}n.d(e,{A:()=>a})},2930:(t,e,n)=>{"use strict";function i(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}}n.d(e,{q:()=>i})},3349:(t,e,n)=>{"use strict";n.d(e,{a:()=>r});var i=n(6225);function r(t,e){var n=t.append("foreignObject").attr("width","100000"),r=n.append("xhtml:div");r.attr("xmlns","http://www.w3.org/1999/xhtml");var a=e.label;switch(typeof a){case"function":r.insert(a);break;case"object":r.insert((function(){return a}));break;default:r.html(a)}i.bg(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap");var s=r.node().getBoundingClientRect();return n.attr("width",s.width).attr("height",s.height),n}},6225:(t,e,n)=>{"use strict";n.d(e,{$p:()=>h,O1:()=>s,WR:()=>u,bF:()=>a,bg:()=>l});var i=n(7514),r=n(3234);function a(t,e){return!!t.children(e).length}function s(t){return c(t.v)+":"+c(t.w)+":"+c(t.name)}var o=/:/g;function c(t){return t?String(t).replace(o,"\\:"):""}function l(t,e){e&&t.attr("style",e)}function h(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))}function u(t,e){var n=e.graph();if(i.Z(n)){var a=n.transition;if(r.Z(a))return a(t)}return t}},277:(t,e,n)=>{"use strict";n.d(e,{bK:()=>Ge});var i=n(870),r=n(6749),a=n(5123),s=n(2002),o=n(7961),c=n(3836),l=n(4379),h=n(5625);class u{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,e=t._prev;if(e!==t)return d(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&d(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e}toString(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,p)),n=n._prev;return"["+t.join(", ")+"]"}}function d(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function p(t,e){if("_next"!==t&&"_prev"!==t)return e}var f=s.Z(1);function g(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new h.k,r=0,a=0;i.Z(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),i.Z(t.edges(),(function(t){var i=n.edge(t.v,t.w)||0,s=e(t),o=i+s;n.setEdge(t.v,t.w,o),a=Math.max(a,n.node(t.v).out+=s),r=Math.max(r,n.node(t.w).in+=s)}));var s=l.Z(a+r+3).map((function(){return new u})),o=r+1;return i.Z(n.nodes(),(function(t){m(s,o,n.node(t))})),{graph:n,buckets:s,zeroIdx:o}}(t,e||f),r=function(t,e,n){var i,r=[],a=e[e.length-1],s=e[0];for(;t.nodeCount();){for(;i=s.dequeue();)y(t,e,n,i);for(;i=a.dequeue();)y(t,e,n,i);if(t.nodeCount())for(var o=e.length-2;o>0;--o)if(i=e[o].dequeue()){r=r.concat(y(t,e,n,i,!0));break}}return r}(n.graph,n.buckets,n.zeroIdx);return o.Z(c.Z(r,(function(e){return t.outEdges(e.v,e.w)})))}function y(t,e,n,r,a){var s=a?[]:void 0;return i.Z(t.inEdges(r.v),(function(i){var r=t.edge(i),o=t.node(i.v);a&&s.push({v:i.v,w:i.w}),o.out-=r,m(e,n,o)})),i.Z(t.outEdges(r.v),(function(i){var r=t.edge(i),a=i.w,s=t.node(a);s.in-=r,m(e,n,s)})),t.removeNode(r.v),s}function m(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}function b(t){var e="greedy"===t.graph().acyclicer?g(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},r={};function s(o){a.Z(r,o)||(r[o]=!0,n[o]=!0,i.Z(t.outEdges(o),(function(t){a.Z(n,t.w)?e.push(t):s(t.w)})),delete n[o])}return i.Z(t.nodes(),s),e}(t);i.Z(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.Z("rev"))}))}var _=n(1667),x=n(4752),v=n(9651);const k=function(t,e,n){(void 0!==n&&!(0,v.Z)(t[e],n)||void 0===n&&!(e in t))&&(0,x.Z)(t,e,n)};var w=n(1395),C=n(1050),T=n(2701),E=n(7215),S=n(3658),A=n(9169),L=n(7771),B=n(836),N=n(7008),D=n(3234),O=n(7226),M=n(7514),I=n(8843);const F=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var $=n(1899),R=n(2957);const Z=function(t){return(0,$.Z)(t,(0,R.Z)(t))};const P=function(t,e,n,i,r,a,s){var o=F(t,n),c=F(e,n),l=s.get(c);if(l)k(t,n,l);else{var h=a?a(o,c,n+"",t,e,s):void 0,u=void 0===h;if(u){var d=(0,L.Z)(c),p=!d&&(0,N.Z)(c),f=!d&&!p&&(0,I.Z)(c);h=c,d||p||f?(0,L.Z)(o)?h=o:(0,B.Z)(o)?h=(0,E.Z)(o):p?(u=!1,h=(0,C.Z)(c,!0)):f?(u=!1,h=(0,T.Z)(c,!0)):h=[]:(0,M.Z)(c)||(0,A.Z)(c)?(h=o,(0,A.Z)(o)?h=Z(o):(0,O.Z)(o)&&!(0,D.Z)(o)||(h=(0,S.Z)(c))):u=!1}u&&(s.set(c,h),r(h,c,i,a,s),s.delete(c)),k(t,n,h)}};const j=function t(e,n,i,r,a){e!==n&&(0,w.Z)(n,(function(s,o){if(a||(a=new _.Z),(0,O.Z)(s))P(e,n,o,i,t,r,a);else{var c=r?r(F(e,o),s,o+"",e,n,a):void 0;void 0===c&&(c=s),k(e,o,c)}}),R.Z)};var Y=n(9581),z=n(439);const U=function(t){return(0,Y.Z)((function(e,n){var i=-1,r=n.length,a=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(r--,a):void 0,s&&(0,z.Z)(n[0],n[1],s)&&(a=r<3?void 0:a,r=1),e=Object(e);++i<r;){var o=n[i];o&&t(e,o,i,a)}return e}))}((function(t,e,n){j(t,e,n)}));var W=n(1666),q=n(3688),H=n(2714);const V=function(t,e,n){for(var i=-1,r=t.length;++i<r;){var a=t[i],s=e(a);if(null!=s&&(void 0===o?s==s&&!(0,H.Z)(s):n(s,o)))var o=s,c=a}return c};const G=function(t,e){return t>e};var X=n(9203);const Q=function(t){return t&&t.length?V(t,X.Z,G):void 0};const K=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};var J=n(2693),tt=n(4765);const et=function(t,e){var n={};return e=(0,tt.Z)(e,3),(0,J.Z)(t,(function(t,i,r){(0,x.Z)(n,i,e(t,i,r))})),n};var nt=n(9360);const it=function(t,e){return t<e};const rt=function(t){return t&&t.length?V(t,X.Z,it):void 0};var at=n(6092);const st=function(){return at.Z.Date.now()};function ot(t,e,n,i){var a;do{a=r.Z(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function ct(t){var e=new h.k({multigraph:t.isMultigraph()}).setGraph(t.graph());return i.Z(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),i.Z(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e}function lt(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;if(!s&&!o)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(o)*c>Math.abs(s)*l?(o<0&&(l=-l),n=l*s/o,i=l):(s<0&&(c=-c),n=c,i=c*o/s),{x:r+n,y:a+i}}function ht(t){var e=c.Z(l.Z(dt(t)+1),(function(){return[]}));return i.Z(t.nodes(),(function(n){var i=t.node(n),r=i.rank;nt.Z(r)||(e[r][i.order]=n)})),e}function ut(t,e,n,i){var r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=i),ot(t,"border",r,e)}function dt(t){return Q(c.Z(t.nodes(),(function(e){var n=t.node(e).rank;if(!nt.Z(n))return n})))}function pt(t,e){var n=st();try{return e()}finally{console.log(t+" time: "+(st()-n)+"ms")}}function ft(t,e){return e()}function gt(t,e,n,i,r,a){var s={width:0,height:0,rank:a,borderType:e},o=r[e][a-1],c=ot(t,"border",s,n);r[e][a]=c,t.setParent(c,i),o&&t.setEdge(o,c,{weight:1})}function yt(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){i.Z(t.nodes(),(function(e){_t(t.node(e))})),i.Z(t.edges(),(function(e){var n=t.edge(e);i.Z(n.points,_t),a.Z(n,"y")&&_t(n)}))}(t),"lr"!==e&&"rl"!==e||(!function(t){i.Z(t.nodes(),(function(e){xt(t.node(e))})),i.Z(t.edges(),(function(e){var n=t.edge(e);i.Z(n.points,xt),a.Z(n,"x")&&xt(n)}))}(t),mt(t))}function mt(t){i.Z(t.nodes(),(function(e){bt(t.node(e))})),i.Z(t.edges(),(function(e){bt(t.edge(e))}))}function bt(t){var e=t.width;t.width=t.height,t.height=e}function _t(t){t.y=-t.y}function xt(t){var e=t.x;t.x=t.y,t.y=e}function vt(t){t.graph().dummyChains=[],i.Z(t.edges(),(function(e){!function(t,e){var n,i,r,a=e.v,s=t.node(a).rank,o=e.w,c=t.node(o).rank,l=e.name,h=t.edge(e),u=h.labelRank;if(c===s+1)return;for(t.removeEdge(e),r=0,++s;s<c;++r,++s)h.points=[],n=ot(t,"edge",i={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},"_d"),s===u&&(i.width=h.width,i.height=h.height,i.dummy="edge-label",i.labelpos=h.labelpos),t.setEdge(a,n,{weight:h.weight},l),0===r&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,o,{weight:h.weight},l)}(t,e)}))}const kt=function(t,e){return t&&t.length?V(t,(0,tt.Z)(e,2),it):void 0};function wt(t){var e={};i.Z(t.sources(),(function n(i){var r=t.node(i);if(a.Z(e,i))return r.rank;e[i]=!0;var s=rt(c.Z(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return s!==Number.POSITIVE_INFINITY&&null!=s||(s=0),r.rank=s}))}function Ct(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function Tt(t){var e,n,i=new h.k({directed:!1}),r=t.nodes()[0],a=t.nodeCount();for(i.setNode(r,{});Et(i,t)<a;)e=St(i,t),n=i.hasNode(e.v)?Ct(t,e):-Ct(t,e),At(i,t,n);return i}function Et(t,e){return i.Z(t.nodes(),(function n(r){i.Z(e.nodeEdges(r),(function(i){var a=i.v,s=r===a?i.w:a;t.hasNode(s)||Ct(e,i)||(t.setNode(s,{}),t.setEdge(r,s,{}),n(s))}))})),t.nodeCount()}function St(t,e){return kt(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return Ct(e,n)}))}function At(t,e,n){i.Z(t.nodes(),(function(t){e.node(t).rank+=n}))}var Lt=n(585),Bt=n(7179);const Nt=function(t){return function(e,n,i){var r=Object(e);if(!(0,Lt.Z)(e)){var a=(0,tt.Z)(n,3);e=(0,Bt.Z)(e),n=function(t){return a(r[t],t,r)}}var s=t(e,n,i);return s>-1?r[a?e[s]:s]:void 0}};var Dt=n(1692),Ot=n(4099);const Mt=function(t){var e=(0,Ot.Z)(t),n=e%1;return e==e?n?e-n:e:0};var It=Math.max;const Ft=Nt((function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:Mt(n);return r<0&&(r=It(i+r,0)),(0,Dt.Z)(t,(0,tt.Z)(e,3),r)}));var $t=n(3445);s.Z(1);s.Z(1);n(9473),n(3970),n(3589),n(8533);(0,n(4193).Z)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Rt="\\ud800-\\udfff",Zt="["+Rt+"]",Pt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",jt="\\ud83c[\\udffb-\\udfff]",Yt="[^"+Rt+"]",zt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",Wt="(?:"+Pt+"|"+jt+")"+"?",qt="[\\ufe0e\\ufe0f]?",Ht=qt+Wt+("(?:\\u200d(?:"+[Yt,zt,Ut].join("|")+")"+qt+Wt+")*"),Vt="(?:"+[Yt+Pt+"?",Pt,zt,Ut,Zt].join("|")+")";RegExp(jt+"(?="+jt+")|"+Vt+Ht,"g");function Gt(){}function Xt(t,e,n){L.Z(e)||(e=[e]);var r=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],s={};return i.Z(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);Qt(t,e,"post"===n,s,r,a)})),a}function Qt(t,e,n,r,s,o){a.Z(r,e)||(r[e]=!0,n||o.push(e),i.Z(s(e),(function(e){Qt(t,e,n,r,s,o)})),n&&o.push(e))}Gt.prototype=new Error;n(2544);function Kt(t){t=function(t){var e=(new h.k).setGraph(t.graph());return i.Z(t.nodes(),(function(n){e.setNode(n,t.node(n))})),i.Z(t.edges(),(function(n){var i=e.edge(n.v,n.w)||{weight:0,minlen:1},r=t.edge(n);e.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})})),e}(t),wt(t);var e,n=Tt(t);for(ee(n),Jt(n,t);e=ie(n);)ae(n,t,e,re(n,t,e))}function Jt(t,e){var n=function(t,e){return Xt(t,e,"post")}(t,t.nodes());n=n.slice(0,n.length-1),i.Z(n,(function(n){!function(t,e,n){var i=t.node(n),r=i.parent;t.edge(n,r).cutvalue=te(t,e,n)}(t,e,n)}))}function te(t,e,n){var r=t.node(n).parent,a=!0,s=e.edge(n,r),o=0;return s||(a=!1,s=e.edge(r,n)),o=s.weight,i.Z(e.nodeEdges(n),(function(i){var s,c,l=i.v===n,h=l?i.w:i.v;if(h!==r){var u=l===a,d=e.edge(i).weight;if(o+=u?d:-d,s=n,c=h,t.hasEdge(s,c)){var p=t.edge(n,h).cutvalue;o+=u?-p:p}}})),o}function ee(t,e){arguments.length<2&&(e=t.nodes()[0]),ne(t,{},1,e)}function ne(t,e,n,r,s){var o=n,c=t.node(r);return e[r]=!0,i.Z(t.neighbors(r),(function(i){a.Z(e,i)||(n=ne(t,e,n,i,r))})),c.low=o,c.lim=n++,s?c.parent=s:delete c.parent,n}function ie(t){return Ft(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function re(t,e,n){var i=n.v,r=n.w;e.hasEdge(i,r)||(i=n.w,r=n.v);var a=t.node(i),s=t.node(r),o=a,c=!1;a.lim>s.lim&&(o=s,c=!0);var l=$t.Z(e.edges(),(function(e){return c===se(t,t.node(e.v),o)&&c!==se(t,t.node(e.w),o)}));return kt(l,(function(t){return Ct(e,t)}))}function ae(t,e,n,r){var a=n.v,s=n.w;t.removeEdge(a,s),t.setEdge(r.v,r.w,{}),ee(t),Jt(t,e),function(t,e){var n=Ft(t.nodes(),(function(t){return!e.node(t).parent})),r=function(t,e){return Xt(t,e,"pre")}(t,n);r=r.slice(1),i.Z(r,(function(n){var i=t.node(n).parent,r=e.edge(n,i),a=!1;r||(r=e.edge(i,n),a=!0),e.node(n).rank=e.node(i).rank+(a?r.minlen:-r.minlen)}))}(t,e)}function se(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}function oe(t){switch(t.graph().ranker){case"network-simplex":default:le(t);break;case"tight-tree":!function(t){wt(t),Tt(t)}(t);break;case"longest-path":ce(t)}}Kt.initLowLimValues=ee,Kt.initCutValues=Jt,Kt.calcCutValue=te,Kt.leaveEdge=ie,Kt.enterEdge=re,Kt.exchangeEdges=ae;var ce=wt;function le(t){Kt(t)}var he=n(4148),ue=n(2344);function de(t){var e=ot(t,"root",{},"_root"),n=function(t){var e={};function n(r,a){var s=t.children(r);s&&s.length&&i.Z(s,(function(t){n(t,a+1)})),e[r]=a}return i.Z(t.children(),(function(t){n(t,1)})),e}(t),r=Q(he.Z(n))-1,a=2*r+1;t.graph().nestingRoot=e,i.Z(t.edges(),(function(e){t.edge(e).minlen*=a}));var s=function(t){return ue.Z(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;i.Z(t.children(),(function(i){pe(t,e,a,s,r,n,i)})),t.graph().nodeRankFactor=a}function pe(t,e,n,r,a,s,o){var c=t.children(o);if(c.length){var l=ut(t,"_bt"),h=ut(t,"_bb"),u=t.node(o);t.setParent(l,o),u.borderTop=l,t.setParent(h,o),u.borderBottom=h,i.Z(c,(function(i){pe(t,e,n,r,a,s,i);var c=t.node(i),u=c.borderTop?c.borderTop:i,d=c.borderBottom?c.borderBottom:i,p=c.borderTop?r:2*r,f=u!==d?1:a-s[o]+1;t.setEdge(l,u,{weight:p,minlen:f,nestingEdge:!0}),t.setEdge(d,h,{weight:p,minlen:f,nestingEdge:!0})})),t.parent(o)||t.setEdge(e,l,{weight:0,minlen:a+s[o]})}else o!==e&&t.setEdge(e,o,{weight:0,minlen:n})}var fe=n(8451);const ge=function(t){return(0,fe.Z)(t,5)};function ye(t,e,n){var s=function(t){var e;for(;t.hasNode(e=r.Z("_root")););return e}(t),o=new h.k({compound:!0}).setGraph({root:s}).setDefaultNodeLabel((function(e){return t.node(e)}));return i.Z(t.nodes(),(function(r){var c=t.node(r),l=t.parent(r);(c.rank===e||c.minRank<=e&&e<=c.maxRank)&&(o.setNode(r),o.setParent(r,l||s),i.Z(t[n](r),(function(e){var n=e.v===r?e.w:e.v,i=o.edge(n,r),a=nt.Z(i)?0:i.weight;o.setEdge(n,r,{weight:t.edge(e).weight+a})})),a.Z(c,"minRank")&&o.setNode(r,{borderLeft:c.borderLeft[e],borderRight:c.borderRight[e]}))})),o}var me=n(2954);const be=function(t,e,n){for(var i=-1,r=t.length,a=e.length,s={};++i<r;){var o=i<a?e[i]:void 0;n(s,t[i],o)}return s};const _e=function(t,e){return be(t||[],e||[],me.Z)};var xe=n(626),ve=n(4073),ke=n(3317),we=n(1018);const Ce=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t};var Te=n(1162);const Ee=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,r=t==t,a=(0,H.Z)(t),s=void 0!==e,o=null===e,c=e==e,l=(0,H.Z)(e);if(!o&&!l&&!a&&t>e||a&&s&&c&&!o&&!l||i&&s&&c||!n&&c||!r)return 1;if(!i&&!a&&!l&&t<e||l&&n&&r&&!i&&!a||o&&n&&r||!s&&r||!c)return-1}return 0};const Se=function(t,e,n){for(var i=-1,r=t.criteria,a=e.criteria,s=r.length,o=n.length;++i<s;){var c=Ee(r[i],a[i]);if(c)return i>=o?c:c*("desc"==n[i]?-1:1)}return t.index-e.index};const Ae=function(t,e,n){e=e.length?(0,ve.Z)(e,(function(t){return(0,L.Z)(t)?function(e){return(0,ke.Z)(e,1===t.length?t[0]:t)}:t})):[X.Z];var i=-1;e=(0,ve.Z)(e,(0,Te.Z)(tt.Z));var r=(0,we.Z)(t,(function(t,n,r){return{criteria:(0,ve.Z)(e,(function(e){return e(t)})),index:++i,value:t}}));return Ce(r,(function(t,e){return Se(t,e,n)}))};const Le=(0,Y.Z)((function(t,e){if(null==t)return[];var n=e.length;return n>1&&(0,z.Z)(t,e[0],e[1])?e=[]:n>2&&(0,z.Z)(e[0],e[1],e[2])&&(e=[e[0]]),Ae(t,(0,xe.Z)(e,1),[])}));function Be(t,e){for(var n=0,i=1;i<e.length;++i)n+=Ne(t,e[i-1],e[i]);return n}function Ne(t,e,n){for(var r=_e(n,c.Z(n,(function(t,e){return e}))),a=o.Z(c.Z(e,(function(e){return Le(c.Z(t.outEdges(e),(function(e){return{pos:r[e.w],weight:t.edge(e).weight}})),"pos")}))),s=1;s<n.length;)s<<=1;var l=2*s-1;s-=1;var h=c.Z(new Array(l),(function(){return 0})),u=0;return i.Z(a.forEach((function(t){var e=t.pos+s;h[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=h[e+1]),h[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}function De(t,e){var n={};return i.Z(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};nt.Z(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),i.Z(e.edges(),(function(t){var e=n[t.v],i=n[t.w];nt.Z(e)||nt.Z(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(nt.Z(e.barycenter)||nt.Z(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,i=0;t.weight&&(n+=t.barycenter*t.weight,i+=t.weight);e.weight&&(n+=e.barycenter*e.weight,i+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function r(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),i.Z(a.in.reverse(),n(a)),i.Z(a.out,r(a))}return c.Z($t.Z(e,(function(t){return!t.merged})),(function(t){return W.Z(t,["vs","i","barycenter","weight"])}))}($t.Z(n,(function(t){return!t.indegree})))}function Oe(t,e){var n,r=function(t,e){var n={lhs:[],rhs:[]};return i.Z(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n}(t,(function(t){return a.Z(t,"barycenter")})),s=r.lhs,c=Le(r.rhs,(function(t){return-t.i})),l=[],h=0,u=0,d=0;s.sort((n=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:n?e.i-t.i:t.i-e.i})),d=Me(l,c,d),i.Z(s,(function(t){d+=t.vs.length,l.push(t.vs),h+=t.barycenter*t.weight,u+=t.weight,d=Me(l,c,d)}));var p={vs:o.Z(l)};return u&&(p.barycenter=h/u,p.weight=u),p}function Me(t,e,n){for(var i;e.length&&(i=K(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}function Ie(t,e,n,r){var s=t.children(e),l=t.node(e),h=l?l.borderLeft:void 0,u=l?l.borderRight:void 0,d={};h&&(s=$t.Z(s,(function(t){return t!==h&&t!==u})));var p=function(t,e){return c.Z(e,(function(e){var n=t.inEdges(e);if(n.length){var i=ue.Z(n,(function(e,n){var i=t.edge(n),r=t.node(n.v);return{sum:e.sum+i.weight*r.order,weight:e.weight+i.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}(t,s);i.Z(p,(function(e){if(t.children(e.v).length){var i=Ie(t,e.v,n,r);d[e.v]=i,a.Z(i,"barycenter")&&(s=e,o=i,nt.Z(s.barycenter)?(s.barycenter=o.barycenter,s.weight=o.weight):(s.barycenter=(s.barycenter*s.weight+o.barycenter*o.weight)/(s.weight+o.weight),s.weight+=o.weight))}var s,o}));var f=De(p,n);!function(t,e){i.Z(t,(function(t){t.vs=o.Z(t.vs.map((function(t){return e[t]?e[t].vs:t})))}))}(f,d);var g=Oe(f,r);if(h&&(g.vs=o.Z([h,g.vs,u]),t.predecessors(h).length)){var y=t.node(t.predecessors(h)[0]),m=t.node(t.predecessors(u)[0]);a.Z(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+y.order+m.order)/(g.weight+2),g.weight+=2}return g}function Fe(t){var e=dt(t),n=$e(t,l.Z(1,e+1),"inEdges"),r=$e(t,l.Z(e-1,-1,-1),"outEdges"),s=function(t){var e={},n=$t.Z(t.nodes(),(function(e){return!t.children(e).length})),r=Q(c.Z(n,(function(e){return t.node(e).rank}))),s=c.Z(l.Z(r+1),(function(){return[]})),o=Le(n,(function(e){return t.node(e).rank}));return i.Z(o,(function n(r){if(!a.Z(e,r)){e[r]=!0;var o=t.node(r);s[o.rank].push(r),i.Z(t.successors(r),n)}})),s}(t);Ze(t,s);for(var o,h=Number.POSITIVE_INFINITY,u=0,d=0;d<4;++u,++d){Re(u%2?n:r,u%4>=2);var p=Be(t,s=ht(t));p<h&&(d=0,o=ge(s),h=p)}Ze(t,o)}function $e(t,e,n){return c.Z(e,(function(e){return ye(t,e,n)}))}function Re(t,e){var n=new h.k;i.Z(t,(function(t){var r=t.graph().root,a=Ie(t,r,n,e);i.Z(a.vs,(function(e,n){t.node(e).order=n})),function(t,e,n){var r,a={};i.Z(n,(function(n){for(var i,s,o=t.parent(n);o;){if((i=t.parent(o))?(s=a[i],a[i]=o):(s=r,r=o),s&&s!==o)return void e.setEdge(s,o);o=i}}))}(t,n,a.vs)}))}function Ze(t,e){i.Z(e,(function(e){i.Z(e,(function(e,n){t.node(e).order=n}))}))}function Pe(t){var e=function(t){var e={},n=0;function r(a){var s=n;i.Z(t.children(a),r),e[a]={low:s,lim:n++}}return i.Z(t.children(),r),e}(t);i.Z(t.graph().dummyChains,(function(n){for(var i=t.node(n),r=i.edgeObj,a=function(t,e,n,i){var r,a,s=[],o=[],c=Math.min(e[n].low,e[i].low),l=Math.max(e[n].lim,e[i].lim);r=n;do{r=t.parent(r),s.push(r)}while(r&&(e[r].low>c||l>e[r].lim));a=r,r=i;for(;(r=t.parent(r))!==a;)o.push(r);return{path:s.concat(o.reverse()),lca:a}}(t,e,r.v,r.w),s=a.path,o=a.lca,c=0,l=s[c],h=!0;n!==r.w;){if(i=t.node(n),h){for(;(l=s[c])!==o&&t.node(l).maxRank<i.rank;)c++;l===o&&(h=!1)}if(!h){for(;c<s.length-1&&t.node(l=s[c+1]).minRank<=i.rank;)c++;l=s[c]}t.setParent(n,l),n=t.successors(n)[0]}}))}var je=n(8882);const Ye=function(t,e){return null==t?t:(0,w.Z)(t,(0,je.Z)(e),R.Z)};function ze(t,e){var n={};return ue.Z(e,(function(e,r){var a=0,s=0,o=e.length,c=K(r);return i.Z(r,(function(e,l){var h=function(t,e){if(t.node(e).dummy)return Ft(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),u=h?t.node(h).order:o;(h||e===c)&&(i.Z(r.slice(s,l+1),(function(e){i.Z(t.predecessors(e),(function(i){var r=t.node(i),s=r.order;!(s<a||u<s)||r.dummy&&t.node(e).dummy||Ue(n,i,e)}))})),s=l+1,a=u)})),r})),n}function Ue(t,e,n){if(e>n){var i=e;e=n,n=i}var r=t[e];r||(t[e]=r={}),r[n]=!0}function We(t,e,n){if(e>n){var i=e;e=n,n=i}return a.Z(t[e],n)}function qe(t,e,n,r,s){var o={},c=function(t,e,n,r){var s=new h.k,o=t.graph(),c=function(t,e,n){return function(i,r,s){var o,c=i.node(r),l=i.node(s),h=0;if(h+=c.width/2,a.Z(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":o=-c.width/2;break;case"r":o=c.width/2}if(o&&(h+=n?o:-o),o=0,h+=(c.dummy?e:t)/2,h+=(l.dummy?e:t)/2,h+=l.width/2,a.Z(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":o=l.width/2;break;case"r":o=-l.width/2}return o&&(h+=n?o:-o),o=0,h}}(o.nodesep,o.edgesep,r);return i.Z(e,(function(e){var r;i.Z(e,(function(e){var i=n[e];if(s.setNode(i),r){var a=n[r],o=s.edge(a,i);s.setEdge(a,i,Math.max(c(t,e,r),o||0))}r=e}))})),s}(t,e,n,s),l=s?"borderLeft":"borderRight";function u(t,e){for(var n=c.nodes(),i=n.pop(),r={};i;)r[i]?t(i):(r[i]=!0,n.push(i),n=n.concat(e(i))),i=n.pop()}return u((function(t){o[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,o[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),u((function(e){var n=c.outEdges(e).reduce((function(t,e){return Math.min(t,o[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),i=t.node(e);n!==Number.POSITIVE_INFINITY&&i.borderType!==l&&(o[e]=Math.max(o[e],n))}),c.successors.bind(c)),i.Z(r,(function(t){o[t]=o[n[t]]})),o}function He(t){var e,n=ht(t),r=U(ze(t,n),function(t,e){var n={};function r(e,r,a,s,o){var c;i.Z(l.Z(r,a),(function(r){c=e[r],t.node(c).dummy&&i.Z(t.predecessors(c),(function(e){var i=t.node(e);i.dummy&&(i.order<s||i.order>o)&&Ue(n,e,c)}))}))}return ue.Z(e,(function(e,n){var a,s=-1,o=0;return i.Z(n,(function(i,c){if("border"===t.node(i).dummy){var l=t.predecessors(i);l.length&&(a=t.node(l[0]).order,r(n,o,c,s,a),o=c,s=a)}r(n,o,n.length,a,e.length)})),n})),n}(t,n)),a={};i.Z(["u","d"],(function(s){e="u"===s?n:he.Z(n).reverse(),i.Z(["l","r"],(function(n){"r"===n&&(e=c.Z(e,(function(t){return he.Z(t).reverse()})));var o=("u"===s?t.predecessors:t.successors).bind(t),l=function(t,e,n,r){var a={},s={},o={};return i.Z(e,(function(t){i.Z(t,(function(t,e){a[t]=t,s[t]=t,o[t]=e}))})),i.Z(e,(function(t){var e=-1;i.Z(t,(function(t){var i=r(t);if(i.length){i=Le(i,(function(t){return o[t]}));for(var c=(i.length-1)/2,l=Math.floor(c),h=Math.ceil(c);l<=h;++l){var u=i[l];s[t]===t&&e<o[u]&&!We(n,t,u)&&(s[u]=t,s[t]=a[t]=a[u],e=o[u])}}}))})),{root:a,align:s}}(0,e,r,o),h=qe(t,e,l.root,l.align,"r"===n);"r"===n&&(h=et(h,(function(t){return-t}))),a[s+n]=h}))}));var s=function(t,e){return kt(he.Z(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Ye(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i)})),n-i}))}(t,a);return function(t,e){var n=he.Z(e),r=rt(n),a=Q(n);i.Z(["u","d"],(function(n){i.Z(["l","r"],(function(i){var s,o=n+i,c=t[o];if(c!==e){var l=he.Z(c);(s="l"===i?r-rt(l):a-Q(l))&&(t[o]=et(c,(function(t){return t+s})))}}))}))}(a,s),function(t,e){return et(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var r=Le(c.Z(t,i));return(r[1]+r[2])/2}))}(a,t.graph().align)}function Ve(t){(function(t){var e=ht(t),n=t.graph().ranksep,r=0;i.Z(e,(function(e){var a=Q(c.Z(e,(function(e){return t.node(e).height})));i.Z(e,(function(e){t.node(e).y=r+a/2})),r+=a+n}))})(t=ct(t)),i.Z(He(t),(function(e,n){t.node(n).x=e}))}function Ge(t,e){var n=e&&e.debugTiming?pt:ft;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new h.k({multigraph:!0,compound:!0}),n=sn(t.graph());return e.setGraph(U({},Qe,an(n,Xe),W.Z(n,Ke))),i.Z(t.nodes(),(function(n){var i=sn(t.node(n));e.setNode(n,q.Z(an(i,Je),tn)),e.setParent(n,t.parent(n))})),i.Z(t.edges(),(function(n){var i=sn(t.edge(n));e.setEdge(n,U({},nn,an(i,en),W.Z(i,rn)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,i.Z(t.edges(),(function(n){var i=t.edge(n);i.minlen*=2,"c"!==i.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?i.width+=i.labeloffset:i.height+=i.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){i.Z(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){b(t)})),e(" nestingGraph.run",(function(){de(t)})),e(" rank",(function(){oe(ct(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){i.Z(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var i=t.node(e.v),r={rank:(t.node(e.w).rank-i.rank)/2+i.rank,e:e};ot(t,"edge-proxy",r,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){!function(t){var e=rt(c.Z(t.nodes(),(function(e){return t.node(e).rank}))),n=[];i.Z(t.nodes(),(function(i){var r=t.node(i).rank-e;n[r]||(n[r]=[]),n[r].push(i)}));var r=0,a=t.graph().nodeRankFactor;i.Z(n,(function(e,n){nt.Z(e)&&n%a!=0?--r:r&&i.Z(e,(function(e){t.node(e).rank+=r}))}))}(t)})),e(" nestingGraph.cleanup",(function(){!function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,i.Z(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}(t)})),e(" normalizeRanks",(function(){!function(t){var e=rt(c.Z(t.nodes(),(function(e){return t.node(e).rank})));i.Z(t.nodes(),(function(n){var i=t.node(n);a.Z(i,"rank")&&(i.rank-=e)}))}(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;i.Z(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=Q(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){i.Z(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){vt(t)})),e(" parentDummyChains",(function(){Pe(t)})),e(" addBorderSegments",(function(){!function(t){i.Z(t.children(),(function e(n){var r=t.children(n),s=t.node(n);if(r.length&&i.Z(r,e),a.Z(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(var o=s.minRank,c=s.maxRank+1;o<c;++o)gt(t,"borderLeft","_bl",n,s,o),gt(t,"borderRight","_br",n,s,o)}}))}(t)})),e(" order",(function(){Fe(t)})),e(" insertSelfEdges",(function(){!function(t){var e=ht(t);i.Z(e,(function(e){var n=0;i.Z(e,(function(e,r){var a=t.node(e);a.order=r+n,i.Z(a.selfEdges,(function(e){ot(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:r+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){!function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||mt(t)}(t)})),e(" position",(function(){Ve(t)})),e(" positionSelfEdges",(function(){!function(t){i.Z(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var i=t.node(n.e.v),r=i.x+i.width/2,a=i.y,s=n.x-r,o=i.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:r+2*s/3,y:a-o},{x:r+5*s/6,y:a-o},{x:r+s,y:a},{x:r+5*s/6,y:a+o},{x:r+2*s/3,y:a+o}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){i.Z(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),r=t.node(n.borderBottom),a=t.node(K(n.borderLeft)),s=t.node(K(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(r.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),i.Z(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){!function(t){i.Z(t.graph().dummyChains,(function(e){var n,i=t.node(e),r=i.edgeLabel;for(t.setEdge(i.edgeObj,r);i.dummy;)n=t.successors(e)[0],t.removeNode(e),r.points.push({x:i.x,y:i.y}),"edge-label"===i.dummy&&(r.x=i.x,r.y=i.y,r.width=i.width,r.height=i.height),e=n,i=t.node(e)}))}(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){i.Z(t.edges(),(function(e){var n=t.edge(e);if(a.Z(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){yt(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,s=0,o=t.graph(),c=o.marginx||0,l=o.marginy||0;function h(t){var i=t.x,a=t.y,o=t.width,c=t.height;e=Math.min(e,i-o/2),n=Math.max(n,i+o/2),r=Math.min(r,a-c/2),s=Math.max(s,a+c/2)}i.Z(t.nodes(),(function(e){h(t.node(e))})),i.Z(t.edges(),(function(e){var n=t.edge(e);a.Z(n,"x")&&h(n)})),e-=c,r-=l,i.Z(t.nodes(),(function(n){var i=t.node(n);i.x-=e,i.y-=r})),i.Z(t.edges(),(function(n){var s=t.edge(n);i.Z(s.points,(function(t){t.x-=e,t.y-=r})),a.Z(s,"x")&&(s.x-=e),a.Z(s,"y")&&(s.y-=r)})),o.width=n-e+c,o.height=s-r+l}(t)})),e(" assignNodeIntersects",(function(){!function(t){i.Z(t.edges(),(function(e){var n,i,r=t.edge(e),a=t.node(e.v),s=t.node(e.w);r.points?(n=r.points[0],i=r.points[r.points.length-1]):(r.points=[],n=s,i=a),r.points.unshift(lt(a,n)),r.points.push(lt(s,i))}))}(t)})),e(" reversePoints",(function(){!function(t){i.Z(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){!function(t){i.Z(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var i=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,i)}}))}(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){i.Z(t.nodes(),(function(n){var i=t.node(n),r=e.node(n);i&&(i.x=r.x,i.y=r.y,e.children(n).length&&(i.width=r.width,i.height=r.height))})),i.Z(t.edges(),(function(n){var i=t.edge(n),r=e.edge(n);i.points=r.points,a.Z(r,"x")&&(i.x=r.x,i.y=r.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))}var Xe=["nodesep","edgesep","ranksep","marginx","marginy"],Qe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ke=["acyclicer","ranker","rankdir","align"],Je=["width","height"],tn={width:0,height:0},en=["minlen","weight","width","height","labeloffset"],nn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},rn=["labelpos"];function an(t,e){return et(W.Z(t,e),Number)}function sn(t){var e={};return i.Z(t,(function(t,n){e[n.toLowerCase()]=t})),e}},2544:(t,e,n)=>{"use strict";n.d(e,{k:()=>M});var i=n(5123),r=n(2002),a=n(3234),s=n(7179),o=n(3445),c=n(9697),l=n(870),h=n(9360),u=n(626),d=n(9581),p=n(3001),f=n(1692);const g=function(t){return t!=t};const y=function(t,e,n){for(var i=n-1,r=t.length;++i<r;)if(t[i]===e)return i;return-1};const m=function(t,e,n){return e==e?y(t,e,n):(0,f.Z)(t,g,n)};const b=function(t,e){return!!(null==t?0:t.length)&&m(t,e,0)>-1};const _=function(t,e,n){for(var i=-1,r=null==t?0:t.length;++i<r;)if(n(e,t[i]))return!0;return!1};var x=n(9548),v=n(3203);const k=function(){};var w=n(6545),C=v.Z&&1/(0,w.Z)(new v.Z([,-0]))[1]==1/0?function(t){return new v.Z(t)}:k;const T=C;const E=function(t,e,n){var i=-1,r=b,a=t.length,s=!0,o=[],c=o;if(n)s=!1,r=_;else if(a>=200){var l=e?null:T(t);if(l)return(0,w.Z)(l);s=!1,r=x.Z,c=new p.Z}else c=e?[]:o;t:for(;++i<a;){var h=t[i],u=e?e(h):h;if(h=n||0!==h?h:0,s&&u==u){for(var d=c.length;d--;)if(c[d]===u)continue t;e&&c.push(u),o.push(h)}else r(c,u,n)||(c!==o&&c.push(u),o.push(h))}return o};var S=n(836);const A=(0,d.Z)((function(t){return E((0,u.Z)(t,1,S.Z,!0))}));var L=n(4148),B=n(2344),N="\0",D="\0",O="\x01";class M{constructor(t={}){this._isDirected=!i.Z(t,"directed")||t.directed,this._isMultigraph=!!i.Z(t,"multigraph")&&t.multigraph,this._isCompound=!!i.Z(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.Z(void 0),this._defaultEdgeLabelFn=r.Z(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[D]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return a.Z(t)||(t=r.Z(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return s.Z(this._nodes)}sources(){var t=this;return o.Z(this.nodes(),(function(e){return c.Z(t._in[e])}))}sinks(){var t=this;return o.Z(this.nodes(),(function(e){return c.Z(t._out[e])}))}setNodes(t,e){var n=arguments,i=this;return l.Z(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this}setNode(t,e){return i.Z(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=D,this._children[t]={},this._children[D][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return i.Z(this._nodes,t)}removeNode(t){var e=this;if(i.Z(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],l.Z(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),l.Z(s.Z(this._in[t]),n),delete this._in[t],delete this._preds[t],l.Z(s.Z(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(h.Z(e))e=D;else{for(var n=e+="";!h.Z(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==D)return e}}children(t){if(h.Z(t)&&(t=D),this._isCompound){var e=this._children[t];if(e)return s.Z(e)}else{if(t===D)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return s.Z(e)}successors(t){var e=this._sucs[t];if(e)return s.Z(e)}neighbors(t){var e=this.predecessors(t);if(e)return A(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;l.Z(this._nodes,(function(n,i){t(i)&&e.setNode(i,n)})),l.Z(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};function r(t){var a=n.parent(t);return void 0===a||e.hasNode(a)?(i[t]=a,a):a in i?i[a]:r(a)}return this._isCompound&&l.Z(e.nodes(),(function(t){e.setParent(t,r(t))})),e}setDefaultEdgeLabel(t){return a.Z(t)||(t=r.Z(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return L.Z(this._edgeObjs)}setPath(t,e){var n=this,i=arguments;return B.Z(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this}setEdge(){var t,e,n,r,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(r=arguments[1],a=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],a=!0)),t=""+t,e=""+e,h.Z(n)||(n=""+n);var o=$(this._isDirected,t,e,n);if(i.Z(this._edgeLabels,o))return a&&(this._edgeLabels[o]=r),this;if(!h.Z(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[o]=a?r:this._defaultEdgeLabelFn(t,e,n);var c=function(t,e,n,i){var r=""+e,a=""+n;if(!t&&r>a){var s=r;r=a,a=s}var o={v:r,w:a};i&&(o.name=i);return o}(this._isDirected,t,e,n);return t=c.v,e=c.w,Object.freeze(c),this._edgeObjs[o]=c,I(this._preds[e],t),I(this._sucs[t],e),this._in[e][o]=c,this._out[t][o]=c,this._edgeCount++,this}edge(t,e,n){var i=1===arguments.length?R(this._isDirected,arguments[0]):$(this._isDirected,t,e,n);return this._edgeLabels[i]}hasEdge(t,e,n){var r=1===arguments.length?R(this._isDirected,arguments[0]):$(this._isDirected,t,e,n);return i.Z(this._edgeLabels,r)}removeEdge(t,e,n){var i=1===arguments.length?R(this._isDirected,arguments[0]):$(this._isDirected,t,e,n),r=this._edgeObjs[i];return r&&(t=r.v,e=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],F(this._preds[e],t),F(this._sucs[t],e),delete this._in[e][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var i=L.Z(n);return e?o.Z(i,(function(t){return t.v===e})):i}}outEdges(t,e){var n=this._out[t];if(n){var i=L.Z(n);return e?o.Z(i,(function(t){return t.w===e})):i}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}}function I(t,e){t[e]?t[e]++:t[e]=1}function F(t,e){--t[e]||delete t[e]}function $(t,e,n,i){var r=""+e,a=""+n;if(!t&&r>a){var s=r;r=a,a=s}return r+O+a+O+(h.Z(i)?N:i)}function R(t,e){return $(t,e.v,e.w,e.name)}M.prototype._nodeCount=0,M.prototype._edgeCount=0},5625:(t,e,n)=>{"use strict";n.d(e,{k:()=>i.k});var i=n(2544)},9354:(t,e,n)=>{"use strict";n.d(e,{c:()=>o});var i=n(9360),r=n(8451);const a=function(t){return(0,r.Z)(t,4)};var s=n(3836);n(2544);function o(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:c(t),edges:l(t)};return i.Z(t.graph())||(e.value=a(t.graph())),e}function c(t){return s.Z(t.nodes(),(function(e){var n=t.node(e),r=t.parent(e),a={v:e};return i.Z(n)||(a.value=n),i.Z(r)||(a.parent=r),a}))}function l(t){return s.Z(t.edges(),(function(e){var n=t.edge(e),r={v:e.v,w:e.w};return i.Z(e.name)||(r.name=e.name),i.Z(n)||(r.value=n),r}))}},1518:(t,e,n)=>{"use strict";n.d(e,{sY:()=>T});var i=n(9373),r=n(5123),a=n(3688),s=n(870),o=n(277),c=n(6225),l={normal:function(t,e,n,i){var r=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");c.bg(r,n[i+"Style"]),n[i+"Class"]&&r.attr("class",n[i+"Class"])},vee:function(t,e,n,i){var r=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");c.bg(r,n[i+"Style"]),n[i+"Class"]&&r.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var r=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");c.bg(r,n[i+"Style"]),n[i+"Class"]&&r.attr("class",n[i+"Class"])}};var h=n(3349);function u(t,e,n){var i=e.label,r=t.append("g");"svg"===e.labelType?function(t,e){var n=t;n.node().appendChild(e.label),c.bg(n,e.labelStyle)}(r,e):"string"!=typeof i||"html"===e.labelType?(0,h.a)(r,e):function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",i=!1,r=0;r<t.length;++r)e=t[r],i?(n+="n"===e?"\n":e,i=!1):"\\"===e?i=!0:n+=e;return n}(e.label).split("\n"),r=0;r<i.length;r++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[r]);c.bg(n,e.labelStyle)}(r,e);var a,s=r.node().getBBox();switch(n){case"top":a=-e.height/2;break;case"bottom":a=e.height/2-s.height;break;default:a=-s.height/2}return r.attr("transform","translate("+-s.width/2+","+a+")"),r}var d=function(t,e){var n=e.nodes().filter((function(t){return c.bF(e,t)})),r=t.selectAll("g.cluster").data(n,(function(t){return t}));c.WR(r.exit(),e).style("opacity",0).remove();var a=r.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0).each((function(t){var n=e.node(t),r=i.Ys(this);i.Ys(this).append("rect"),u(r.append("g").attr("class","label"),n,n.clusterLabelPos)}));return r=r.merge(a),(r=c.WR(r,e).style("opacity",1)).selectAll("rect").each((function(t){var n=e.node(t),r=i.Ys(this);c.bg(r,n.style)})),r};let p=function(t,e){var n,a=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return c.O1(t)})).classed("update",!0);return a.exit().remove(),a.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(a=t.selectAll("g.edgeLabel")).each((function(t){var n=i.Ys(this);n.select(".label").remove();var a=e.edge(t),s=u(n,e.edge(t),0).classed("label",!0),o=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.Z(a,"width")||(a.width=o.width),r.Z(a,"height")||(a.height=o.height)})),n=a.exit?a.exit():a.selectAll(null),c.WR(n,e).style("opacity",0).remove(),a};var f=n(6749),g=n(4379);function y(t,e){return t.intersect(e)}var m=function(t,e,n){var r=t.selectAll("g.edgePath").data(e.edges(),(function(t){return c.O1(t)})).classed("update",!0),a=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return b(n,g.Z(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(r,e);!function(t,e){var n=t.exit();c.WR(n,e).style("opacity",0).remove()}(r,e);var s=void 0!==r.merge?r.merge(a):r;return c.WR(s,e).style("opacity",1),s.each((function(t){var n=i.Ys(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),c.$p(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),s.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=f.Z("arrowhead");var r=i.Ys(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e+")");var t,e})).style("fill","none");c.WR(r,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),i=t.node(e.v),r=t.node(e.w),a=n.points.slice(1,n.points.length-1);return a.unshift(y(i,a[0])),a.push(y(r,a[a.length-1])),b(n,a)}(e,t)})),c.bg(r,n.style)})),s.selectAll("defs *").remove(),s.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(i.Ys(this),r.arrowheadId,r,"arrowhead")})),s};function b(t,e){var n=(i.jvg||i.YPS.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}var _=n(1666),x=function(t,e,n){var a,s=e.nodes().filter((function(t){return!c.bF(e,t)})),o=t.selectAll("g.node").data(s,(function(t){return t})).classed("update",!0);return o.exit().remove(),o.enter().append("g").attr("class","node").style("opacity",0),(o=t.selectAll("g.node")).each((function(t){var a=e.node(t),s=i.Ys(this);c.$p(s,a.class,(s.classed("update")?"update ":"")+"node"),s.select("g.label").remove();var o=s.append("g").attr("class","label"),l=u(o,a),h=n[a.shape],d=_.Z(l.node().getBBox(),"width","height");a.elem=this,a.id&&s.attr("id",a.id),a.labelId&&o.attr("id",a.labelId),r.Z(a,"width")&&(d.width=a.width),r.Z(a,"height")&&(d.height=a.height),d.width+=a.paddingLeft+a.paddingRight,d.height+=a.paddingTop+a.paddingBottom,o.attr("transform","translate("+(a.paddingLeft-a.paddingRight)/2+","+(a.paddingTop-a.paddingBottom)/2+")");var p=i.Ys(this);p.select(".label-container").remove();var f=h(p,d,a).classed("label-container",!0);c.bg(f,a.style);var g=f.node().getBBox();a.width=g.width,a.height=g.height})),a=o.exit?o.exit():o.selectAll(null),c.WR(a,e).style("opacity",0).remove(),o};function v(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.x<r&&(l=-l);var h=Math.abs(e*n*o/c);return i.y<a&&(h=-h),{x:r+l,y:a+h}}var k=n(3352),w=n(2930),C={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return(0,w.q)(n,t)},i},ellipse:function(t,e,n){var i=e.width/2,r=e.height/2,a=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",i).attr("ry",r);return n.intersect=function(t){return v(n,i,r,t)},a},circle:function(t,e,n){var i=Math.max(e.width,e.height)/2,r=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",i);return n.intersect=function(t){return function(t,e,n){return v(t,e,e,n)}(n,i,t)},r},diamond:function(t,e,n){var i=e.width*Math.SQRT2/2,r=e.height*Math.SQRT2/2,a=[{x:0,y:-r},{x:-i,y:0},{x:0,y:r},{x:i,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return(0,k.A)(n,a,t)},s}};function T(){var t=function(t,e){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.Z(n,"label")||t.children(e).length||(n.label=e),r.Z(n,"paddingX")&&a.Z(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.Z(n,"paddingY")&&a.Z(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.Z(n,"padding")&&a.Z(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),a.Z(n,E),s.Z(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.Z(n,"width")&&(n._prevWidth=n.width),r.Z(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.Z(n,"label")||(n.label=""),a.Z(n,S)}))}(e);var n=A(t,"output"),h=A(n,"clusters"),u=A(n,"edgePaths"),f=p(A(n,"edgeLabels"),e),g=x(A(n,"nodes"),e,C);(0,o.bK)(e),function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.Ys(this).classed("update")})).attr("transform",n),c.WR(t,e).style("opacity",1).attr("transform",n)}(g,e),function(t,e){function n(t){var n=e.edge(t);return r.Z(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.Ys(this).classed("update")})).attr("transform",n),c.WR(t,e).style("opacity",1).attr("transform",n)}(f,e),m(u,e,l),function(t,e){var n=t.filter((function(){return!i.Ys(this).classed("update")}));function r(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",r),c.WR(t,e).style("opacity",1).attr("transform",r),c.WR(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}(d(h,e),e),function(t){s.Z(t.nodes(),(function(e){var n=t.node(e);r.Z(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.Z(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(e)};return t.createNodes=function(e){return arguments.length?(function(t){x=t}(e),t):x},t.createClusters=function(e){return arguments.length?(function(t){d=t}(e),t):d},t.createEdgeLabels=function(e){return arguments.length?(function(t){p=t}(e),t):p},t.createEdgePaths=function(e){return arguments.length?(function(t){m=t}(e),t):m},t.shapes=function(e){return arguments.length?(function(t){C=t}(e),t):C},t.arrows=function(e){return arguments.length?(function(t){l=t}(e),t):l},t}var E={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},S={arrowhead:"normal",curve:i.c_6};function A(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}n(5625)},1883:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(1691),r=n(2142);const a=class{constructor(){this.type=r.w.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=r.w.ALL}is(t){return this.type===t}};const s=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=r.w.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:r}=t;void 0===e&&(t.h=i.Z.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=i.Z.channel.rgb2hsl(t,"s")),void 0===r&&(t.l=i.Z.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:n,b:r}=t;void 0===e&&(t.r=i.Z.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=i.Z.channel.hsl2rgb(t,"g")),void 0===r&&(t.b=i.Z.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(r.w.HSL)||void 0===e?(this._ensureHSL(),i.Z.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(r.w.HSL)||void 0===e?(this._ensureHSL(),i.Z.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(r.w.HSL)||void 0===e?(this._ensureHSL(),i.Z.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(r.w.RGB)||void 0===e?(this._ensureRGB(),i.Z.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(r.w.RGB)||void 0===e?(this._ensureRGB(),i.Z.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(r.w.RGB)||void 0===e?(this._ensureRGB(),i.Z.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(r.w.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(r.w.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(r.w.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(r.w.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(r.w.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(r.w.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},1610:(t,e,n)=>{"use strict";n.d(e,{Z:()=>g});var i=n(1883),r=n(2142);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const n=e[1],r=parseInt(n,16),s=n.length,o=s%4==0,c=s>4,l=c?1:17,h=c?8:4,u=o?0:-1,d=c?255:15;return i.Z.set({r:(r>>h*(u+3)&d)*l,g:(r>>h*(u+2)&d)*l,b:(r>>h*(u+1)&d)*l,a:o?(r&d)*l/255:1},t)},stringify:t=>{const{r:e,g:n,b:i,a:a}=t;return a<1?`#${r.Q[Math.round(e)]}${r.Q[Math.round(n)]}${r.Q[Math.round(i)]}${r.Q[Math.round(255*a)]}`:`#${r.Q[Math.round(e)]}${r.Q[Math.round(n)]}${r.Q[Math.round(i)]}`}},s=a;var o=n(1691);const c={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(c.hueRe);if(e){const[,t,n]=e;switch(n){case"grad":return o.Z.channel.clamp.h(.9*parseFloat(t));case"rad":return o.Z.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return o.Z.channel.clamp.h(360*parseFloat(t))}}return o.Z.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(c.re);if(!n)return;const[,r,a,s,l,h]=n;return i.Z.set({h:c._hue2deg(r),s:o.Z.channel.clamp.s(parseFloat(a)),l:o.Z.channel.clamp.l(parseFloat(s)),a:l?o.Z.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},t)},stringify:t=>{const{h:e,s:n,l:i,a:r}=t;return r<1?`hsla(${o.Z.lang.round(e)}, ${o.Z.lang.round(n)}%, ${o.Z.lang.round(i)}%, ${r})`:`hsl(${o.Z.lang.round(e)}, ${o.Z.lang.round(n)}%, ${o.Z.lang.round(i)}%)`}},l=c,h={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=h.colors[t];if(e)return s.parse(e)},stringify:t=>{const e=s.stringify(t);for(const n in h.colors)if(h.colors[n]===e)return n}},u=h,d={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(d.re);if(!n)return;const[,r,a,s,c,l,h,u,p]=n;return i.Z.set({r:o.Z.channel.clamp.r(a?2.55*parseFloat(r):parseFloat(r)),g:o.Z.channel.clamp.g(c?2.55*parseFloat(s):parseFloat(s)),b:o.Z.channel.clamp.b(h?2.55*parseFloat(l):parseFloat(l)),a:u?o.Z.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:n,b:i,a:r}=t;return r<1?`rgba(${o.Z.lang.round(e)}, ${o.Z.lang.round(n)}, ${o.Z.lang.round(i)}, ${o.Z.lang.round(r)})`:`rgb(${o.Z.lang.round(e)}, ${o.Z.lang.round(n)}, ${o.Z.lang.round(i)})`}},p=d,f={format:{keyword:h,hex:s,rgb:d,rgba:d,hsl:c,hsla:c},parse:t=>{if("string"!=typeof t)return t;const e=s.parse(t)||p.parse(t)||l.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(r.w.HSL)||void 0===t.data.r?l.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):s.stringify(t)},g=f},2142:(t,e,n)=>{"use strict";n.d(e,{Q:()=>r,w:()=>a});var i=n(1691);const r={};for(let s=0;s<=255;s++)r[s]=i.Z.unit.dec2hex(s);const a={ALL:0,RGB:1,HSL:2}},1506:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(1691),r=n(1610);const a=(t,e,n)=>{const a=r.Z.parse(t),s=a[e],o=i.Z.channel.clamp[e](s+n);return s!==o&&(a[e]=o),r.Z.stringify(a)}},7201:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(1506);const r=(t,e)=>(0,i.Z)(t,"l",-e)},5920:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(1506);const r=(t,e)=>(0,i.Z)(t,"l",e)},1691:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},r)=>{if(!e)return 2.55*n;t/=360,e/=100;const a=(n/=100)<.5?n*(1+e):n+e-n*e,s=2*n-a;switch(r){case"r":return 255*i.hue2rgb(s,a,t+1/3);case"g":return 255*i.hue2rgb(s,a,t);case"b":return 255*i.hue2rgb(s,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:n},i)=>{t/=255,e/=255,n/=255;const r=Math.max(t,e,n),a=Math.min(t,e,n),s=(r+a)/2;if("l"===i)return 100*s;if(r===a)return 0;const o=r-a;if("s"===i)return 100*(s>.5?o/(2-r-a):o/(r+a));switch(r){case t:return 60*((e-n)/o+(e<n?6:0));case e:return 60*((n-t)/o+2);case n:return 60*((t-e)/o+4);default:return-1}}},r={channel:i,lang:{clamp:(t,e,n)=>e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},7308:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});const i=function(){this.__data__=[],this.size=0};var r=n(9651);const a=function(t,e){for(var n=t.length;n--;)if((0,r.Z)(t[n][0],e))return n;return-1};var s=Array.prototype.splice;const o=function(t){var e=this.__data__,n=a(e,t);return!(n<0)&&(n==e.length-1?e.pop():s.call(e,n,1),--this.size,!0)};const c=function(t){var e=this.__data__,n=a(e,t);return n<0?void 0:e[n][1]};const l=function(t){return a(this.__data__,t)>-1};const h=function(t,e){var n=this.__data__,i=a(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=c,u.prototype.has=l,u.prototype.set=h;const d=u},6183:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(2508),r=n(6092);const a=(0,i.Z)(r.Z,"Map")},7834:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});const i=(0,n(2508).Z)(Object,"create");const r=function(){this.__data__=i?i(null):{},this.size=0};const a=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var s=Object.prototype.hasOwnProperty;const o=function(t){var e=this.__data__;if(i){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return s.call(e,t)?e[t]:void 0};var c=Object.prototype.hasOwnProperty;const l=function(t){var e=this.__data__;return i?void 0!==e[t]:c.call(e,t)};const h=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this};function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}u.prototype.clear=r,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=l,u.prototype.set=h;const d=u;var p=n(7308),f=n(6183);const g=function(){this.size=0,this.__data__={hash:new d,map:new(f.Z||p.Z),string:new d}};const y=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const m=function(t,e){var n=t.__data__;return y(e)?n["string"==typeof e?"string":"hash"]:n.map};const b=function(t){var e=m(this,t).delete(t);return this.size-=e?1:0,e};const _=function(t){return m(this,t).get(t)};const x=function(t){return m(this,t).has(t)};const v=function(t,e){var n=m(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};function k(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}k.prototype.clear=g,k.prototype.delete=b,k.prototype.get=_,k.prototype.has=x,k.prototype.set=v;const w=k},3203:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(2508),r=n(6092);const a=(0,i.Z)(r.Z,"Set")},3001:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(7834);const r=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const a=function(t){return this.__data__.has(t)};function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new i.Z;++e<n;)this.add(t[e])}s.prototype.add=s.prototype.push=r,s.prototype.has=a;const o=s},1667:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(7308);const r=function(){this.__data__=new i.Z,this.size=0};const a=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};const s=function(t){return this.__data__.get(t)};const o=function(t){return this.__data__.has(t)};var c=n(6183),l=n(7834);const h=function(t,e){var n=this.__data__;if(n instanceof i.Z){var r=n.__data__;if(!c.Z||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new l.Z(r)}return n.set(t,e),this.size=n.size,this};function u(t){var e=this.__data__=new i.Z(t);this.size=e.size}u.prototype.clear=r,u.prototype.delete=a,u.prototype.get=s,u.prototype.has=o,u.prototype.set=h;const d=u},7685:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=n(6092).Z.Symbol},7623:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=n(6092).Z.Uint8Array},6579:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t}},8774:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,a=[];++n<i;){var s=t[n];e(s,n,t)&&(a[r++]=s)}return a}},7668:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});const i=function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i};var r=n(9169),a=n(7771),s=n(7008),o=n(6009),c=n(8843),l=Object.prototype.hasOwnProperty;const h=function(t,e){var n=(0,a.Z)(t),h=!n&&(0,r.Z)(t),u=!n&&!h&&(0,s.Z)(t),d=!n&&!h&&!u&&(0,c.Z)(t),p=n||h||u||d,f=p?i(t.length,String):[],g=f.length;for(var y in t)!e&&!l.call(t,y)||p&&("length"==y||u&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||(0,o.Z)(y,g))||f.push(y);return f}},4073:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}},8694:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}},2954:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(4752),r=n(9651),a=Object.prototype.hasOwnProperty;const s=function(t,e,n){var s=t[e];a.call(t,e)&&(0,r.Z)(s,n)&&(void 0!==n||e in t)||(0,i.Z)(t,e,n)}},4752:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(7904);const r=function(t,e,n){"__proto__"==e&&i.Z?(0,i.Z)(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},8451:(t,e,n)=>{"use strict";n.d(e,{Z:()=>J});var i=n(1667),r=n(6579),a=n(2954),s=n(1899),o=n(7179);const c=function(t,e){return t&&(0,s.Z)(e,(0,o.Z)(e),t)};var l=n(2957);const h=function(t,e){return t&&(0,s.Z)(e,(0,l.Z)(e),t)};var u=n(1050),d=n(7215),p=n(5695);const f=function(t,e){return(0,s.Z)(t,(0,p.Z)(t),e)};var g=n(8694),y=n(2513),m=n(532);const b=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,g.Z)(e,(0,p.Z)(t)),t=(0,y.Z)(t);return e}:m.Z;const _=function(t,e){return(0,s.Z)(t,b(t),e)};var x=n(1808),v=n(3327);const k=function(t){return(0,v.Z)(t,l.Z,b)};var w=n(3970),C=Object.prototype.hasOwnProperty;const T=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&C.call(t,"index")&&(n.index=t.index,n.input=t.input),n};var E=n(1884);const S=function(t,e){var n=e?(0,E.Z)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)};var A=/\w*$/;const L=function(t){var e=new t.constructor(t.source,A.exec(t));return e.lastIndex=t.lastIndex,e};var B=n(7685),N=B.Z?B.Z.prototype:void 0,D=N?N.valueOf:void 0;const O=function(t){return D?Object(D.call(t)):{}};var M=n(2701);const I=function(t,e,n){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return(0,E.Z)(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return S(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,M.Z)(t,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return L(t);case"[object Symbol]":return O(t)}};var F=n(3658),$=n(7771),R=n(7008),Z=n(8533);const P=function(t){return(0,Z.Z)(t)&&"[object Map]"==(0,w.Z)(t)};var j=n(1162),Y=n(8351),z=Y.Z&&Y.Z.isMap;const U=z?(0,j.Z)(z):P;var W=n(7226);const q=function(t){return(0,Z.Z)(t)&&"[object Set]"==(0,w.Z)(t)};var H=Y.Z&&Y.Z.isSet;const V=H?(0,j.Z)(H):q;var G="[object Arguments]",X="[object Function]",Q="[object Object]",K={};K[G]=K["[object Array]"]=K["[object ArrayBuffer]"]=K["[object DataView]"]=K["[object Boolean]"]=K["[object Date]"]=K["[object Float32Array]"]=K["[object Float64Array]"]=K["[object Int8Array]"]=K["[object Int16Array]"]=K["[object Int32Array]"]=K["[object Map]"]=K["[object Number]"]=K[Q]=K["[object RegExp]"]=K["[object Set]"]=K["[object String]"]=K["[object Symbol]"]=K["[object Uint8Array]"]=K["[object Uint8ClampedArray]"]=K["[object Uint16Array]"]=K["[object Uint32Array]"]=!0,K["[object Error]"]=K[X]=K["[object WeakMap]"]=!1;const J=function t(e,n,s,p,g,y){var m,b=1&n,v=2&n,C=4&n;if(s&&(m=g?s(e,p,g,y):s(e)),void 0!==m)return m;if(!(0,W.Z)(e))return e;var E=(0,$.Z)(e);if(E){if(m=T(e),!b)return(0,d.Z)(e,m)}else{var S=(0,w.Z)(e),A=S==X||"[object GeneratorFunction]"==S;if((0,R.Z)(e))return(0,u.Z)(e,b);if(S==Q||S==G||A&&!g){if(m=v||A?{}:(0,F.Z)(e),!b)return v?_(e,h(m,e)):f(e,c(m,e))}else{if(!K[S])return g?e:{};m=I(e,S,b)}}y||(y=new i.Z);var L=y.get(e);if(L)return L;y.set(e,m),V(e)?e.forEach((function(i){m.add(t(i,n,s,i,e,y))})):U(e)&&e.forEach((function(i,r){m.set(r,t(i,n,s,r,e,y))}));var B=C?v?k:x.Z:v?l.Z:o.Z,N=E?void 0:B(e);return(0,r.Z)(N||e,(function(i,r){N&&(i=e[r=i]),(0,a.Z)(m,r,t(i,n,s,r,e,y))})),m}},9811:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(2693),r=n(585);const a=function(t,e){return function(n,i){if(null==n)return n;if(!(0,r.Z)(n))return t(n,i);for(var a=n.length,s=e?a:-1,o=Object(n);(e?s--:++s<a)&&!1!==i(o[s],s,o););return n}}(i.Z)},1692:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e,n,i){for(var r=t.length,a=n+(i?1:-1);i?a--:++a<r;)if(e(t[a],a,t))return a;return-1}},626:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(8694),r=n(7685),a=n(9169),s=n(7771),o=r.Z?r.Z.isConcatSpreadable:void 0;const c=function(t){return(0,s.Z)(t)||(0,a.Z)(t)||!!(o&&t&&t[o])};const l=function t(e,n,r,a,s){var o=-1,l=e.length;for(r||(r=c),s||(s=[]);++o<l;){var h=e[o];n>0&&r(h)?n>1?t(h,n-1,r,a,s):(0,i.Z)(s,h):a||(s[s.length]=h)}return s}},1395:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return function(e,n,i){for(var r=-1,a=Object(e),s=i(e),o=s.length;o--;){var c=s[t?o:++r];if(!1===n(a[c],c,a))break}return e}}()},2693:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(1395),r=n(7179);const a=function(t,e){return t&&(0,i.Z)(t,e,r.Z)}},3317:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(2823),r=n(2281);const a=function(t,e){for(var n=0,a=(e=(0,i.Z)(e,t)).length;null!=t&&n<a;)t=t[(0,r.Z)(e[n++])];return n&&n==a?t:void 0}},3327:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(8694),r=n(7771);const a=function(t,e,n){var a=e(t);return(0,r.Z)(t)?a:(0,i.Z)(a,n(t))}},3589:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(7685),r=Object.prototype,a=r.hasOwnProperty,s=r.toString,o=i.Z?i.Z.toStringTag:void 0;const c=function(t){var e=a.call(t,o),n=t[o];try{t[o]=void 0;var i=!0}catch(c){}var r=s.call(t);return i&&(e?t[o]=n:delete t[o]),r};var l=Object.prototype.toString;const h=function(t){return l.call(t)};var u=i.Z?i.Z.toStringTag:void 0;const d=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?c(t):h(t)}},4765:(t,e,n)=>{"use strict";n.d(e,{Z:()=>H});var i=n(1667),r=n(3001);const a=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1};var s=n(9548);const o=function(t,e,n,i,o,c){var l=1&n,h=t.length,u=e.length;if(h!=u&&!(l&&u>h))return!1;var d=c.get(t),p=c.get(e);if(d&&p)return d==e&&p==t;var f=-1,g=!0,y=2&n?new r.Z:void 0;for(c.set(t,e),c.set(e,t);++f<h;){var m=t[f],b=e[f];if(i)var _=l?i(b,m,f,e,t,c):i(m,b,f,t,e,c);if(void 0!==_){if(_)continue;g=!1;break}if(y){if(!a(e,(function(t,e){if(!(0,s.Z)(y,e)&&(m===t||o(m,t,n,i,c)))return y.push(e)}))){g=!1;break}}else if(m!==b&&!o(m,b,n,i,c)){g=!1;break}}return c.delete(t),c.delete(e),g};var c=n(7685),l=n(7623),h=n(9651);const u=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n};var d=n(6545),p=c.Z?c.Z.prototype:void 0,f=p?p.valueOf:void 0;const g=function(t,e,n,i,r,a,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new l.Z(t),new l.Z(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,h.Z)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var c=u;case"[object Set]":var p=1&i;if(c||(c=d.Z),t.size!=e.size&&!p)return!1;var g=s.get(t);if(g)return g==e;i|=2,s.set(t,e);var y=o(c(t),c(e),i,r,a,s);return s.delete(t),y;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1};var y=n(1808),m=Object.prototype.hasOwnProperty;const b=function(t,e,n,i,r,a){var s=1&n,o=(0,y.Z)(t),c=o.length;if(c!=(0,y.Z)(e).length&&!s)return!1;for(var l=c;l--;){var h=o[l];if(!(s?h in e:m.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var f=s;++l<c;){var g=t[h=o[l]],b=e[h];if(i)var _=s?i(b,g,h,e,t,a):i(g,b,h,t,e,a);if(!(void 0===_?g===b||r(g,b,n,i,a):_)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var x=t.constructor,v=e.constructor;x==v||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof v&&v instanceof v||(p=!1)}return a.delete(t),a.delete(e),p};var _=n(3970),x=n(7771),v=n(7008),k=n(8843),w="[object Arguments]",C="[object Array]",T="[object Object]",E=Object.prototype.hasOwnProperty;const S=function(t,e,n,r,a,s){var c=(0,x.Z)(t),l=(0,x.Z)(e),h=c?C:(0,_.Z)(t),u=l?C:(0,_.Z)(e),d=(h=h==w?T:h)==T,p=(u=u==w?T:u)==T,f=h==u;if(f&&(0,v.Z)(t)){if(!(0,v.Z)(e))return!1;c=!0,d=!1}if(f&&!d)return s||(s=new i.Z),c||(0,k.Z)(t)?o(t,e,n,r,a,s):g(t,e,h,n,r,a,s);if(!(1&n)){var y=d&&E.call(t,"__wrapped__"),m=p&&E.call(e,"__wrapped__");if(y||m){var S=y?t.value():t,A=m?e.value():e;return s||(s=new i.Z),a(S,A,n,r,s)}}return!!f&&(s||(s=new i.Z),b(t,e,n,r,a,s))};var A=n(8533);const L=function t(e,n,i,r,a){return e===n||(null==e||null==n||!(0,A.Z)(e)&&!(0,A.Z)(n)?e!=e&&n!=n:S(e,n,i,r,t,a))};const B=function(t,e,n,r){var a=n.length,s=a,o=!r;if(null==t)return!s;for(t=Object(t);a--;){var c=n[a];if(o&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<s;){var l=(c=n[a])[0],h=t[l],u=c[1];if(o&&c[2]){if(void 0===h&&!(l in t))return!1}else{var d=new i.Z;if(r)var p=r(h,u,l,t,e,d);if(!(void 0===p?L(u,h,3,r,d):p))return!1}}return!0};var N=n(7226);const D=function(t){return t==t&&!(0,N.Z)(t)};var O=n(7179);const M=function(t){for(var e=(0,O.Z)(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,D(r)]}return e};const I=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}};const F=function(t){var e=M(t);return 1==e.length&&e[0][2]?I(e[0][0],e[0][1]):function(n){return n===t||B(n,t,e)}};var $=n(3317);const R=function(t,e,n){var i=null==t?void 0:(0,$.Z)(t,e);return void 0===i?n:i};var Z=n(5487),P=n(9365),j=n(2281);const Y=function(t,e){return(0,P.Z)(t)&&D(e)?I((0,j.Z)(t),e):function(n){var i=R(n,t);return void 0===i&&i===e?(0,Z.Z)(n,t):L(e,i,3)}};var z=n(9203),U=n(4193);const W=function(t){return function(e){return(0,$.Z)(e,t)}};const q=function(t){return(0,P.Z)(t)?(0,U.Z)((0,j.Z)(t)):W(t)};const H=function(t){return"function"==typeof t?t:null==t?z.Z:"object"==typeof t?(0,x.Z)(t)?Y(t[0],t[1]):F(t):q(t)}},9473:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(2764);const r=(0,n(1851).Z)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,i.Z)(t))return r(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},1018:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(9811),r=n(585);const a=function(t,e){var n=-1,a=(0,r.Z)(t)?Array(t.length):[];return(0,i.Z)(t,(function(t,i,r){a[++n]=e(t,i,r)})),a}},4193:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return function(e){return null==e?void 0:e[t]}}},9581:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9203),r=n(1211),a=n(7227);const s=function(t,e){return(0,a.Z)((0,r.Z)(t,e,i.Z),t+"")}},1162:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return function(e){return t(e)}}},9548:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){return t.has(e)}},8882:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(9203);const r=function(t){return"function"==typeof t?t:i.Z}},2823:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(7771),r=n(9365),a=n(2454);var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;const c=function(t){var e=(0,a.Z)(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(s,(function(t,n,i,r){e.push(i?r.replace(o,"$1"):n||t)})),e}));var l=n(751);const h=function(t,e){return(0,i.Z)(t)?t:(0,r.Z)(t,e)?[t]:c((0,l.Z)(t))}},1884:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(7623);const r=function(t){var e=new t.constructor(t.byteLength);return new i.Z(e).set(new i.Z(t)),e}},1050:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(6092),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=r&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===r?i.Z.Buffer:void 0,o=s?s.allocUnsafe:void 0;const c=function(t,e){if(e)return t.slice();var n=t.length,i=o?o(n):new t.constructor(n);return t.copy(i),i}},2701:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(1884);const r=function(t,e){var n=e?(0,i.Z)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},7215:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}},1899:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(2954),r=n(4752);const a=function(t,e,n,a){var s=!n;n||(n={});for(var o=-1,c=e.length;++o<c;){var l=e[o],h=a?a(n[l],t[l],l,n,t):void 0;void 0===h&&(h=t[l]),s?(0,r.Z)(n,l,h):(0,i.Z)(n,l,h)}return n}},7904:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(2508);const r=function(){try{var t=(0,i.Z)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},3413:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i="object"==typeof global&&global&&global.Object===Object&&global},1808:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(3327),r=n(5695),a=n(7179);const s=function(t){return(0,i.Z)(t,a.Z,r.Z)}},2508:(t,e,n)=>{"use strict";n.d(e,{Z:()=>b});var i=n(3234);const r=n(6092).Z["__core-js_shared__"];var a,s=(a=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";const o=function(t){return!!s&&s in t};var c=n(7226),l=n(19),h=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,p=u.toString,f=d.hasOwnProperty,g=RegExp("^"+p.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const y=function(t){return!(!(0,c.Z)(t)||o(t))&&((0,i.Z)(t)?g:h).test((0,l.Z)(t))};const m=function(t,e){return null==t?void 0:t[e]};const b=function(t,e){var n=m(t,e);return y(n)?n:void 0}},2513:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=(0,n(1851).Z)(Object.getPrototypeOf,Object)},5695:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(8774),r=n(532),a=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;const o=s?function(t){return null==t?[]:(t=Object(t),(0,i.Z)(s(t),(function(e){return a.call(t,e)})))}:r.Z},3970:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var i=n(2508),r=n(6092);const a=(0,i.Z)(r.Z,"DataView");var s=n(6183);const o=(0,i.Z)(r.Z,"Promise");var c=n(3203);const l=(0,i.Z)(r.Z,"WeakMap");var h=n(3589),u=n(19),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",y="[object DataView]",m=(0,u.Z)(a),b=(0,u.Z)(s.Z),_=(0,u.Z)(o),x=(0,u.Z)(c.Z),v=(0,u.Z)(l),k=h.Z;(a&&k(new a(new ArrayBuffer(1)))!=y||s.Z&&k(new s.Z)!=d||o&&k(o.resolve())!=p||c.Z&&k(new c.Z)!=f||l&&k(new l)!=g)&&(k=function(t){var e=(0,h.Z)(t),n="[object Object]"==e?t.constructor:void 0,i=n?(0,u.Z)(n):"";if(i)switch(i){case m:return y;case b:return d;case _:return p;case x:return f;case v:return g}return e});const w=k},6174:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(2823),r=n(9169),a=n(7771),s=n(6009),o=n(1656),c=n(2281);const l=function(t,e,n){for(var l=-1,h=(e=(0,i.Z)(e,t)).length,u=!1;++l<h;){var d=(0,c.Z)(e[l]);if(!(u=null!=t&&n(t,d)))break;t=t[d]}return u||++l!=h?u:!!(h=null==t?0:t.length)&&(0,o.Z)(h)&&(0,s.Z)(d,h)&&((0,a.Z)(t)||(0,r.Z)(t))}},3658:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(7226),r=Object.create;const a=function(){function t(){}return function(e){if(!(0,i.Z)(e))return{};if(r)return r(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var s=n(2513),o=n(2764);const c=function(t){return"function"!=typeof t.constructor||(0,o.Z)(t)?{}:a((0,s.Z)(t))}},6009:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=/^(?:0|[1-9]\d*)$/;const r=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t<e}},439:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(9651),r=n(585),a=n(6009),s=n(7226);const o=function(t,e,n){if(!(0,s.Z)(n))return!1;var o=typeof e;return!!("number"==o?(0,r.Z)(n)&&(0,a.Z)(e,n.length):"string"==o&&e in n)&&(0,i.Z)(n[e],t)}},9365:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(7771),r=n(2714),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;const o=function(t,e){if((0,i.Z)(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!(0,r.Z)(t))||(s.test(t)||!a.test(t)||null!=e&&t in Object(e))}},2764:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=Object.prototype;const r=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},8351:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(3413),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=r&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===r&&i.Z.process;const o=function(){try{var t=a&&a.require&&a.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(e){}}()},1851:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){return function(n){return t(e(n))}}},1211:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});const i=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)};var r=Math.max;const a=function(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var a=arguments,s=-1,o=r(a.length-e,0),c=Array(o);++s<o;)c[s]=a[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=a[s];return l[e]=n(c),i(t,this,l)}}},6092:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(3413),r="object"==typeof self&&self&&self.Object===Object&&self;const a=i.Z||r||Function("return this")()},6545:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},7227:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(2002),r=n(7904),a=n(9203);const s=r.Z?function(t,e){return(0,r.Z)(t,"toString",{configurable:!0,enumerable:!1,value:(0,i.Z)(e),writable:!0})}:a.Z;var o=Date.now;const c=function(t){var e=0,n=0;return function(){var i=o(),r=16-(i-n);if(n=i,r>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(s)},2281:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(2714);const r=function(t){if("string"==typeof t||(0,i.Z)(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}},19:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=Function.prototype.toString;const r=function(t){if(null!=t){try{return i.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},2002:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return function(){return t}}},3688:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(9581),r=n(9651),a=n(439),s=n(2957),o=Object.prototype,c=o.hasOwnProperty;const l=(0,i.Z)((function(t,e){t=Object(t);var n=-1,i=e.length,l=i>2?e[2]:void 0;for(l&&(0,a.Z)(e[0],e[1],l)&&(i=1);++n<i;)for(var h=e[n],u=(0,s.Z)(h),d=-1,p=u.length;++d<p;){var f=u[d],g=t[f];(void 0===g||(0,r.Z)(g,o[f])&&!c.call(t,f))&&(t[f]=h[f])}return t}))},9651:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){return t===e||t!=t&&e!=e}},3445:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(8774),r=n(9811);const a=function(t,e){var n=[];return(0,r.Z)(t,(function(t,i,r){e(t,i,r)&&n.push(t)})),n};var s=n(4765),o=n(7771);const c=function(t,e){return((0,o.Z)(t)?i.Z:a)(t,(0,s.Z)(e,3))}},7961:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(626);const r=function(t){return(null==t?0:t.length)?(0,i.Z)(t,1):[]}},870:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(6579),r=n(9811),a=n(8882),s=n(7771);const o=function(t,e){return((0,s.Z)(t)?i.Z:r.Z)(t,(0,a.Z)(e))}},5123:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=Object.prototype.hasOwnProperty;const r=function(t,e){return null!=t&&i.call(t,e)};var a=n(6174);const s=function(t,e){return null!=t&&(0,a.Z)(t,e,r)}},5487:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});const i=function(t,e){return null!=t&&e in Object(t)};var r=n(6174);const a=function(t,e){return null!=t&&(0,r.Z)(t,e,i)}},9203:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return t}},9169:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(3589),r=n(8533);const a=function(t){return(0,r.Z)(t)&&"[object Arguments]"==(0,i.Z)(t)};var s=Object.prototype,o=s.hasOwnProperty,c=s.propertyIsEnumerable;const l=a(function(){return arguments}())?a:function(t){return(0,r.Z)(t)&&o.call(t,"callee")&&!c.call(t,"callee")}},7771:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=Array.isArray},585:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(3234),r=n(1656);const a=function(t){return null!=t&&(0,r.Z)(t.length)&&!(0,i.Z)(t)}},836:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(585),r=n(8533);const a=function(t){return(0,r.Z)(t)&&(0,i.Z)(t)}},7008:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(6092);const r=function(){return!1};var a="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=a&&"object"==typeof module&&module&&!module.nodeType&&module,o=s&&s.exports===a?i.Z.Buffer:void 0;const c=(o?o.isBuffer:void 0)||r},9697:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(9473),r=n(3970),a=n(9169),s=n(7771),o=n(585),c=n(7008),l=n(2764),h=n(8843),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,o.Z)(t)&&((0,s.Z)(t)||"string"==typeof t||"function"==typeof t.splice||(0,c.Z)(t)||(0,h.Z)(t)||(0,a.Z)(t)))return!t.length;var e=(0,r.Z)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,l.Z)(t))return!(0,i.Z)(t).length;for(var n in t)if(u.call(t,n))return!1;return!0}},3234:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(3589),r=n(7226);const a=function(t){if(!(0,r.Z)(t))return!1;var e=(0,i.Z)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1656:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7226:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},8533:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return null!=t&&"object"==typeof t}},7514:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(3589),r=n(2513),a=n(8533),s=Function.prototype,o=Object.prototype,c=s.toString,l=o.hasOwnProperty,h=c.call(Object);const u=function(t){if(!(0,a.Z)(t)||"[object Object]"!=(0,i.Z)(t))return!1;var e=(0,r.Z)(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==h}},2714:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(3589),r=n(8533);const a=function(t){return"symbol"==typeof t||(0,r.Z)(t)&&"[object Symbol]"==(0,i.Z)(t)}},8843:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(3589),r=n(1656),a=n(8533),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;const o=function(t){return(0,a.Z)(t)&&(0,r.Z)(t.length)&&!!s[(0,i.Z)(t)]};var c=n(1162),l=n(8351),h=l.Z&&l.Z.isTypedArray;const u=h?(0,c.Z)(h):o},9360:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return void 0===t}},7179:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(7668),r=n(9473),a=n(585);const s=function(t){return(0,a.Z)(t)?(0,i.Z)(t):(0,r.Z)(t)}},2957:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(7668),r=n(7226),a=n(2764);const s=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e};var o=Object.prototype.hasOwnProperty;const c=function(t){if(!(0,r.Z)(t))return s(t);var e=(0,a.Z)(t),n=[];for(var i in t)("constructor"!=i||!e&&o.call(t,i))&&n.push(i);return n};var l=n(585);const h=function(t){return(0,l.Z)(t)?(0,i.Z)(t,!0):c(t)}},3836:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(4073),r=n(4765),a=n(1018),s=n(7771);const o=function(t,e){return((0,s.Z)(t)?i.Z:a.Z)(t,(0,r.Z)(e,3))}},2454:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(7834);function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var s=t.apply(this,i);return n.cache=a.set(r,s)||a,s};return n.cache=new(r.Cache||i.Z),n}r.Cache=i.Z;const a=r},1666:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var i=n(3317),r=n(2954),a=n(2823),s=n(6009),o=n(7226),c=n(2281);const l=function(t,e,n,i){if(!(0,o.Z)(t))return t;for(var l=-1,h=(e=(0,a.Z)(e,t)).length,u=h-1,d=t;null!=d&&++l<h;){var p=(0,c.Z)(e[l]),f=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return t;if(l!=u){var g=d[p];void 0===(f=i?i(g,p,d):void 0)&&(f=(0,o.Z)(g)?g:(0,s.Z)(e[l+1])?[]:{})}(0,r.Z)(d,p,f),d=d[p]}return t};const h=function(t,e,n){for(var r=-1,s=e.length,o={};++r<s;){var c=e[r],h=(0,i.Z)(t,c);n(h,c)&&l(o,(0,a.Z)(c,t),h)}return o};var u=n(5487);const d=function(t,e){return h(t,e,(function(e,n){return(0,u.Z)(t,n)}))};var p=n(7961),f=n(1211),g=n(7227);const y=function(t){return(0,g.Z)((0,f.Z)(t,void 0,p.Z),t+"")}((function(t,e){return null==t?{}:d(t,e)}))},4379:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=Math.ceil,r=Math.max;const a=function(t,e,n,a){for(var s=-1,o=r(i((e-t)/(n||1)),0),c=Array(o);o--;)c[a?o:++s]=t,t+=n;return c};var s=n(439),o=n(4099);const c=function(t){return function(e,n,i){return i&&"number"!=typeof i&&(0,s.Z)(e,n,i)&&(n=i=void 0),e=(0,o.Z)(e),void 0===n?(n=e,e=0):n=(0,o.Z)(n),i=void 0===i?e<n?1:-1:(0,o.Z)(i),a(e,n,i,t)}}()},2344:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});const i=function(t,e,n,i){var r=-1,a=null==t?0:t.length;for(i&&a&&(n=t[++r]);++r<a;)n=e(n,t[r],r,t);return n};var r=n(9811),a=n(4765);const s=function(t,e,n,i,r){return r(t,(function(t,r,a){n=i?(i=!1,t):e(n,t,r,a)})),n};var o=n(7771);const c=function(t,e,n){var c=(0,o.Z)(t)?i:s,l=arguments.length<3;return c(t,(0,a.Z)(e,4),n,l,r.Z)}},532:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){return[]}},4099:(t,e,n)=>{"use strict";n.d(e,{Z:()=>g});var i=/\s/;const r=function(t){for(var e=t.length;e--&&i.test(t.charAt(e)););return e};var a=/^\s+/;const s=function(t){return t?t.slice(0,r(t)+1).replace(a,""):t};var o=n(7226),c=n(2714),l=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;const p=function(t){if("number"==typeof t)return t;if((0,c.Z)(t))return NaN;if((0,o.Z)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=(0,o.Z)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=s(t);var n=h.test(t);return n||u.test(t)?d(t.slice(2),n?2:8):l.test(t)?NaN:+t};var f=1/0;const g=function(t){return t?(t=p(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},751:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(7685),r=n(4073),a=n(7771),s=n(2714),o=i.Z?i.Z.prototype:void 0,c=o?o.toString:void 0;const l=function t(e){if("string"==typeof e)return e;if((0,a.Z)(e))return(0,r.Z)(e,t)+"";if((0,s.Z)(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n};const h=function(t){return null==t?"":l(t)}},6749:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(751),r=0;const a=function(t){var e=++r;return(0,i.Z)(t)+e}},4148:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(4073);const r=function(t,e){return(0,i.Z)(e,(function(e){return t[e]}))};var a=n(7179);const s=function(t){return null==t?[]:r(t,(0,a.Z)(t))}}}]);