export const __rspack_esm_id="9417";export const __rspack_esm_ids=["9417"];export const __webpack_modules__={31968(t,e,r){function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);rtu});let o=Object.entries,a=Object.setPrototypeOf,s=Object.isFrozen,l=Object.getPrototypeOf,n=Object.getOwnPropertyDescriptor,h=Object.freeze,c=Object.seal,d=Object.create,p="u">typeof Reflect&&Reflect,g=p.apply,u=p.construct;h||(h=function(t){return t}),c||(c=function(t){return t}),g||(g=function(t,e){for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o1?e-1:0),i=1;i1?r-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:b;if(a&&a(t,null),!k(e))return t;let i=e.length;for(;i--;){let o=e[i];if("string"==typeof o){let t=r(o);t!==o&&(s(e)||(e[i]=t),o=t)}t[o]=!0}return t}function q(t){let e=d(null);for(let a of o(t)){var r=function(t){if(Array.isArray(t))return t}(a)||function(t,e){var r=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,o,a,s,l=[],n=!0,h=!1;try{a=(r=r.call(t)).next,!1;for(;!(n=(i=a.call(r)).done)&&(l.push(i.value),2!==l.length);n=!0);}catch(t){h=!0,o=t}finally{try{if(!n&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(h)throw o}}return l}}(a,2)||function(t,e){if(t){if("string"==typeof t)return i(t,2);var r=({}).toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,2):void 0}}(a,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();let o=r[0],s=r[1];E(t,o)&&(k(s)?e[o]=function(t){for(let e=0;e/g),Q=c(/\${[\w\W]*/g),J=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),tt=c(/^aria-[\-\w]+$/),te=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tr=c(/^(?:\w+script|data):/i),ti=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),to=c(/^html$/i),ta=c(/^[a-z][.\w]*(-[.\w]+)+$/i),ts=c(/<[/\w!]/g),tl=c(/<[/\w]/g),tn=c(/<\/no(script|embed|frames)/i),th=c(/\/>/i),tc=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));let o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return null}},td=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},tp=function(t,e,r,i){return E(t,e)&&k(t[e])?D(i.base?q(i.base):{},t[e],i.transform):r};var tg,tu=function t(){let e,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"u"t(e);if(a.version="3.4.10",a.removed=[],!i||!i.document||9!==i.document.nodeType||!i.Element)return a.isSupported=!1,a;let s=i.document,l=s,n=l.currentScript;i.DocumentFragment;let p=i.HTMLTemplateElement,g=i.Node,u=i.Element,I=i.NodeFilter;void 0===i.NamedNodeMap&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;let tg=i.DOMParser,tu=i.trustedTypes,tm=u.prototype,tC=K(tm,"cloneNode"),ty=K(tm,"remove"),tf=K(tm,"nextSibling"),tx=K(tm,"childNodes"),tk=K(tm,"parentNode"),tb=K(tm,"shadowRoot"),tT=K(tm,"attributes"),tB=g&&g.prototype?K(g.prototype,"nodeType"):null,tw=g&&g.prototype?K(g.prototype,"nodeName"):null;if("function"==typeof p){let t=s.createElement("template");t.content&&t.content.ownerDocument&&(s=t.content.ownerDocument)}let tS="",tA=!1,tF=0,tL=function(){if(tF>0)throw O('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},tv=function(t){tL(),tF++;try{return e.createHTML(t)}finally{tF--}},tM=function(t){tL(),tF++;try{return e.createScriptURL(t)}finally{tF--}},tE=s,t_=tE.implementation,t$=tE.createNodeIterator,tO=tE.createDocumentFragment,tI=tE.getElementsByTagName,tD=l.importNode,tq=td();a.isSupported="function"==typeof o&&"function"==typeof tk&&t_&&void 0!==t_.createHTMLDocument;let tK=te,tR=null,tz=D({},[...R,...z,...P,...N,...H]),tP=null,tW=D({},[...U,...X,...G,...Y]),tN=Object.seal(d(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}})),tj=null,tH=null,tU=Object.seal(d(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),tX=!0,tG=!0,tY=!1,tV=!0,tZ=!1,tQ=!0,tJ=!1,t0=!1,t2=!1,t1=!1,t5=!1,t3=!1,t4=!0,t6=!1,t8="user-content-",t7=!0,t9=!1,et={},ee=null,er=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),ei=null,eo=D({},["audio","video","img","source","image","track"]),ea=null,es=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),el="http://www.w3.org/1998/Math/MathML",en="http://www.w3.org/2000/svg",eh="http://www.w3.org/1999/xhtml",ec=eh,ed=!1,ep=null,eg=D({},[el,en,eh],T),eu=h(["mi","mo","mn","ms","mtext"]),em=D({},eu),eC=h(["annotation-xml"]),ey=D({},eC),ef=D({},["title","style","font","a","script"]),ex=null,ek=["application/xhtml+xml","text/html"],eb=null,eT=null,eB=s.createElement("form"),ew=function(t){return t instanceof RegExp||t instanceof Function},eS=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(eT&&eT===t)return;t&&"object"==typeof t||(t={}),t=q(t),eb="application/xhtml+xml"===(ex=-1===ek.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE)?T:b,tR=tp(t,"ALLOWED_TAGS",tz,{transform:eb}),tP=tp(t,"ALLOWED_ATTR",tW,{transform:eb}),ep=tp(t,"ALLOWED_NAMESPACES",eg,{transform:T}),ea=tp(t,"ADD_URI_SAFE_ATTR",es,{transform:eb,base:es}),ei=tp(t,"ADD_DATA_URI_TAGS",eo,{transform:eb,base:eo}),ee=tp(t,"FORBID_CONTENTS",er,{transform:eb}),tj=tp(t,"FORBID_TAGS",q({}),{transform:eb}),tH=tp(t,"FORBID_ATTR",q({}),{transform:eb}),et=!!E(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?q(t.USE_PROFILES):t.USE_PROFILES),tX=!1!==t.ALLOW_ARIA_ATTR,tG=!1!==t.ALLOW_DATA_ATTR,tY=t.ALLOW_UNKNOWN_PROTOCOLS||!1,tV=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,tZ=t.SAFE_FOR_TEMPLATES||!1,tQ=!1!==t.SAFE_FOR_XML,tJ=t.WHOLE_DOCUMENT||!1,t1=t.RETURN_DOM||!1,t5=t.RETURN_DOM_FRAGMENT||!1,t3=t.RETURN_TRUSTED_TYPE||!1,t2=t.FORCE_BODY||!1,t4=!1!==t.SANITIZE_DOM,t6=t.SANITIZE_NAMED_PROPS||!1,t7=!1!==t.KEEP_CONTENT,t9=t.IN_PLACE||!1,tK=!function(t){try{return $(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?te:t.ALLOWED_URI_REGEXP,ec="string"==typeof t.NAMESPACE?t.NAMESPACE:eh,em=E(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?q(t.MATHML_TEXT_INTEGRATION_POINTS):D({},eu),ey=E(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?q(t.HTML_INTEGRATION_POINTS):D({},eC);let i=E(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?q(t.CUSTOM_ELEMENT_HANDLING):d(null);if(tN=d(null),E(i,"tagNameCheck")&&ew(i.tagNameCheck)&&(tN.tagNameCheck=i.tagNameCheck),E(i,"attributeNameCheck")&&ew(i.attributeNameCheck)&&(tN.attributeNameCheck=i.attributeNameCheck),E(i,"allowCustomizedBuiltInElements")&&"boolean"==typeof i.allowCustomizedBuiltInElements&&(tN.allowCustomizedBuiltInElements=i.allowCustomizedBuiltInElements),c(tN),tZ&&(tG=!1),t5&&(t1=!0),et&&(tR=D({},H),tP=d(null),!0===et.html&&(D(tR,R),D(tP,U)),!0===et.svg&&(D(tR,z),D(tP,X),D(tP,Y)),!0===et.svgFilters&&(D(tR,P),D(tP,X),D(tP,Y)),!0===et.mathMl&&(D(tR,N),D(tP,G),D(tP,Y))),tU.tagCheck=null,tU.attributeCheck=null,E(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?tU.tagCheck=t.ADD_TAGS:k(t.ADD_TAGS)&&(tR===tz&&(tR=q(tR)),D(tR,t.ADD_TAGS,eb))),E(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?tU.attributeCheck=t.ADD_ATTR:k(t.ADD_ATTR)&&(tP===tW&&(tP=q(tP)),D(tP,t.ADD_ATTR,eb))),E(t,"ADD_URI_SAFE_ATTR")&&k(t.ADD_URI_SAFE_ATTR)&&D(ea,t.ADD_URI_SAFE_ATTR,eb),E(t,"FORBID_CONTENTS")&&k(t.FORBID_CONTENTS)&&(ee===er&&(ee=q(ee)),D(ee,t.FORBID_CONTENTS,eb)),E(t,"ADD_FORBID_CONTENTS")&&k(t.ADD_FORBID_CONTENTS)&&(ee===er&&(ee=q(ee)),D(ee,t.ADD_FORBID_CONTENTS,eb)),t7&&(tR["#text"]=!0),tJ&&D(tR,["html","head","body"]),tR.table&&(D(tR,["tbody"]),delete tj.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw O('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw O('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let r=e;e=t.TRUSTED_TYPES_POLICY;try{tS=tv("")}catch(t){throw e=r,t}}else null===t.TRUSTED_TYPES_POLICY?(e=void 0,tS=""):(void 0===e&&(tA||(r=tc(tu,n),tA=!0),e=r),e&&"string"==typeof tS&&(tS=tv("")));(tq.uponSanitizeElement.length>0||tq.uponSanitizeAttribute.length>0)&&tR===tz&&(tR=q(tR)),tq.uponSanitizeAttribute.length>0&&tP===tW&&(tP=q(tP)),h&&h(t),eT=t},eA=D({},[...z,...P,...W]),eF=D({},[...N,...j]),eL=function(t){var e,r,i;let o=tk(t);o&&o.tagName||(o={namespaceURI:ec,tagName:"template"});let a=b(t.tagName),s=b(o.tagName);return!!ep[t.namespaceURI]&&(t.namespaceURI===en?(e=o).namespaceURI===eh?"svg"===a:e.namespaceURI===el?"svg"===a&&("annotation-xml"===s||em[s]):!!eA[a]:t.namespaceURI===el?(r=o).namespaceURI===eh?"math"===a:r.namespaceURI===en?"math"===a&&ey[s]:!!eF[a]:t.namespaceURI===eh?((i=o).namespaceURI!==en||!!ey[s])&&(i.namespaceURI!==el||!!em[s])&&!eF[a]&&(ef[a]||!eA[a]):"application/xhtml+xml"===ex&&!!ep[t.namespaceURI])},ev=function(t){f(a.removed,{element:t});try{tk(t).removeChild(t)}catch(e){if(ty(t),!tk(t))throw O("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},eM=function(t){let e=tx(t);if(e){let t=[];m(e,e=>{f(t,e)}),m(t,t=>{try{ty(t)}catch(t){}})}let r=tT(t);if(r)for(let e=r.length-1;e>=0;--e){let i=r[e],o=i&&i.name;if("string"==typeof o)try{t.removeAttribute(o)}catch(t){}}},eE=function(t,e){try{f(a.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){f(a.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(t1||t5)try{ev(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},e_=function(t){let e=tT(t);if(e)for(let r=e.length-1;r>=0;--r){let i=e[r],o=i&&i.name;if("string"==typeof o&&!tP[eb(o)])try{t.removeAttribute(o)}catch(t){}}},e$=function(t){let e=[t];for(;e.length>0;){let t=e.pop();(tB?tB(t):t.nodeType)===1&&e_(t);let r=tx(t);if(r)for(let t=r.length-1;t>=0;--t)e.push(r[t])}},eO=function(t){let r=null,i=null;if(t2)t=""+t;else{let e=B(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===ex&&ec===eh&&(t=''+t+"");let o=e?tv(t):t;if(ec===eh)try{r=new tg().parseFromString(o,ex)}catch(t){}if(!r||!r.documentElement){r=t_.createDocument(ec,"template",null);try{r.documentElement.innerHTML=ed?tS:o}catch(t){}}let a=r.body||r.documentElement;return(t&&i&&a.insertBefore(s.createTextNode(i),a.childNodes[0]||null),ec===eh)?tI.call(r,tJ?"html":"body")[0]:tJ?r.documentElement:a},eI=function(t){return t$.call(t.ownerDocument||t,t,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT|I.SHOW_PROCESSING_INSTRUCTION|I.SHOW_CDATA_SECTION,null)},eD=function(t){return t=w(t,V," "),t=w(t,Z," "),t=w(t,Q," ")},eq=function(t){var e;t.normalize();let r=t$.call(t.ownerDocument||t,t,I.SHOW_TEXT|I.SHOW_COMMENT|I.SHOW_CDATA_SECTION|I.SHOW_PROCESSING_INSTRUCTION,null),i=r.nextNode();for(;i;)i.data=eD(i.data),i=r.nextNode();let o=null==(e=t.querySelectorAll)?void 0:e.call(t,"template");o&&m(o,t=>{eR(t.content)&&eq(t.content)})},eK=function(t){let e=tw?tw(t):null;return"string"==typeof e&&"form"===eb(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==tT(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==tB(t)||t.childNodes!==tx(t))},eR=function(t){if(!tB||"object"!=typeof t||null===t)return!1;try{return 11===tB(t)}catch(t){return!1}},ez=function(t){if(!tB||"object"!=typeof t||null===t)return!1;try{return"number"==typeof tB(t)}catch(t){return!1}};function eP(t,e,r){0!==t.length&&m(t,t=>{t.call(a,e,r,eT)})}let eW=function(t,e){if(!tj[e]&&eU(e)&&(tN.tagNameCheck instanceof RegExp&&$(tN.tagNameCheck,e)||tN.tagNameCheck instanceof Function&&tN.tagNameCheck(e)))return!1;if(t7&&!ee[e]){let e=tk(t),r=tx(t);if(r&&e){let i=r.length;for(let o=i-1;o>=0;--o){let i=t9?r[o]:tC(r[o],!0);e.insertBefore(i,tf(t))}}}return ev(t),!0},eN=function(t){if(eP(tq.beforeSanitizeElements,t,null),eK(t))return ev(t),!0;let e=eb(tw?tw(t):t.nodeName);if(eP(tq.uponSanitizeElement,t,{tagName:e,allowedTags:tR}),tQ&&t.hasChildNodes()&&!ez(t.firstElementChild)&&$(ts,t.textContent)&&$(ts,t.innerHTML)||tQ&&t.namespaceURI===eh&&"style"===e&&ez(t.firstElementChild)||7===t.nodeType||tQ&&8===t.nodeType&&$(tl,t.data)||0)return ev(t),!0;if(tj[e]||!(tU.tagCheck instanceof Function&&tU.tagCheck(e))&&!tR[e])return eW(t,e);if((tB?tB(t):t.nodeType)===1&&!eL(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&$(tn,t.innerHTML))return ev(t),!0;if(tZ&&3===t.nodeType){let e=eD(t.textContent);t.textContent!==e&&(f(a.removed,{element:t.cloneNode()}),t.textContent=e)}return eP(tq.afterSanitizeElements,t,null),!1},ej=function(t,e,r){if(tH[e]||t4&&("id"===e||"name"===e)&&(r in s||r in eB))return!1;let i=tP[e]||tU.attributeCheck instanceof Function&&tU.attributeCheck(e,t);if(tG&&$(J,e));else if(tX&&$(tt,e));else if(i){if(ea[e]);else if($(tK,w(r,ti,"")));else if(("src"===e||"xlink:href"===e||"href"===e)&&"script"!==t&&0===S(r,"data:")&&ei[t]);else if(tY&&!$(tr,w(r,ti,"")));else if(r)return!1}else if(!(eU(t)&&(tN.tagNameCheck instanceof RegExp&&$(tN.tagNameCheck,t)||tN.tagNameCheck instanceof Function&&tN.tagNameCheck(t))&&(tN.attributeNameCheck instanceof RegExp&&$(tN.attributeNameCheck,e)||tN.attributeNameCheck instanceof Function&&tN.attributeNameCheck(e,t))||"is"===e&&tN.allowCustomizedBuiltInElements&&(tN.tagNameCheck instanceof RegExp&&$(tN.tagNameCheck,r)||tN.tagNameCheck instanceof Function&&tN.tagNameCheck(r))))return!1;return!0},eH=D({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),eU=function(t){return!eH[b(t)]&&$(ta,t)},eX=function(t,r,i,o){if(e&&"object"==typeof tu&&"function"==typeof tu.getAttributeType&&!i)switch(tu.getAttributeType(t,r)){case"TrustedHTML":return tv(o);case"TrustedScriptURL":return tM(o)}return o},eG=function(t,e,r,i){try{r?t.setAttributeNS(r,e,i):t.setAttribute(e,i),eK(t)?ev(t):y(a.removed)}catch(r){eE(e,t)}},eY=function(t){eP(tq.beforeSanitizeAttributes,t,null);let e=t.attributes;if(!e||eK(t))return;let r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:tP,forceKeepAttr:void 0},i=e.length,o=eb(t.nodeName);for(;i--;){let a=e[i],s=a.name,l=a.namespaceURI,n=a.value,h=eb(s),c="value"===s?n:A(n);if(r.attrName=h,r.attrValue=c,r.keepAttr=!0,r.forceKeepAttr=void 0,eP(tq.uponSanitizeAttribute,t,r),c=r.attrValue,t6&&("id"===h||"name"===h)&&0!==S(c,t8)&&(eE(s,t),c=t8+c),tQ&&$(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,c)||"attributename"===h&&B(c,"href")){eE(s,t);continue}if(!r.forceKeepAttr){if(!r.keepAttr||!tV&&$(th,c)||(tZ&&(c=eD(c)),!ej(o,h,c))){eE(s,t);continue}(c=eX(o,h,l,c))!==n&&eG(t,s,l,c)}}eP(tq.afterSanitizeAttributes,t,null)},eV=function(t){let e=null,r=eI(t);for(eP(tq.beforeSanitizeShadowDOM,t,null);e=r.nextNode();)if(eP(tq.uponSanitizeShadowNode,e,null),eN(e),eY(e),eR(e.content)&&eV(e.content),(tB?tB(e):e.nodeType)===1){let t=tb(e);eR(t)&&(eZ(t),eV(t))}eP(tq.afterSanitizeShadowDOM,t,null)},eZ=function(t){let e=[{node:t,shadow:null}];for(;e.length>0;){let t=e.pop();if(t.shadow){eV(t.shadow);continue}let r=t.node,i=(tB?tB(r):r.nodeType)===1,o=tx(r);if(o)for(let t=o.length-1;t>=0;--t)e.push({node:o[t],shadow:null});if(i){let t=tw?tw(r):null;if("string"==typeof t&&"template"===eb(t)){let t=r.content;eR(t)&&e.push({node:t,shadow:null})}}if(i){let t=tb(r);eR(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return a.sanitize=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,s=null,n=null;if((ed=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ez(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return F(t);case"boolean":return L(t);case"bigint":return v?v(t):"0";case"symbol":return M?M(t):"Symbol()";case"undefined":default:return _(t);case"function":case"object":{if(null===t)return _(t);let e=K(t,"toString");if("function"==typeof e){let r=e(t);return"string"==typeof r?r:_(r)}return _(t)}}}(t)))throw O("dirty is not a string, aborting");if(!a.isSupported)return t;t0||eS(r),a.removed=[];let h=t9&&"string"!=typeof t&&ez(t);if(h){let e=tw?tw(t):t.nodeName;if("string"==typeof e){let t=eb(e);if(!tR[t]||tj[t])throw O("root node is forbidden and cannot be sanitized in-place")}if(eK(t))throw O("root node is clobbered and cannot be sanitized in-place");try{eZ(t)}catch(e){throw eM(t),e}}else if(ez(t))1===(o=(i=eO("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o),eZ(o);else{if(!t1&&!tZ&&!tJ&&-1===t.indexOf("<"))return e&&t3?tv(t):t;if(!(i=eO(t)))return t1?null:t3?tS:""}i&&t2&&ev(i.firstChild);let c=eI(h?t:i);try{for(;s=c.nextNode();)eN(s),eY(s),eR(s.content)&&eV(s.content)}catch(e){throw h&&eM(t),e}if(h)return m(a.removed,t=>{t.element&&e$(t.element)}),tZ&&eq(t),t;if(t1){if(tZ&&eq(i),t5)for(n=tO.call(i.ownerDocument);i.firstChild;)n.appendChild(i.firstChild);else n=i;return(tP.shadowroot||tP.shadowrootmode)&&(n=tD.call(l,n,!0)),n}let d=tJ?i.outerHTML:i.innerHTML;return tJ&&tR["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&$(to,i.ownerDocument.doctype.name)&&(d="\n"+d),tZ&&(d=eD(d)),e&&t3?tv(d):d},a.setConfig=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};eS(t),t0=!0},a.clearConfig=function(){eT=null,t0=!1,e=r,tS=""},a.isValidAttribute=function(t,e,r){return eT||eS({}),ej(eb(t),eb(e),r)},a.addHook=function(t,e){"function"==typeof e&&f(tq[t],e)},a.removeHook=function(t,e){if(void 0!==e){let r=C(tq[t],e);return -1===r?void 0:x(tq[t],r,1)[0]}return y(tq[t])},a.removeHooks=function(t){tq[t]=[]},a.removeAllHooks=function(){tq=td()},a}()},46927(t,e,r){r.d(e,{b:()=>i});function i(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}},92876(t,e,r){r.d(e,{$V:()=>s,Av:()=>i,GX:()=>u,ML:()=>w,NA:()=>d,OG:()=>o,Qb:()=>C,R_:()=>l,Uw:()=>p,VP:()=>n,XZ:()=>k,ZR:()=>x,_u:()=>T,cT:()=>g,i1:()=>b,iq:()=>m,kj:()=>a,pj:()=>c,q:()=>y,ri:()=>B,vC:()=>h,x6:()=>f});let i="[object RegExp]",o="[object String]",a="[object Number]",s="[object Boolean]",l="[object Arguments]",n="[object Symbol]",h="[object Date]",c="[object Map]",d="[object Set]",p="[object Array]",g="[object ArrayBuffer]",u="[object Object]",m="[object DataView]",C="[object Uint8Array]",y="[object Uint8ClampedArray]",f="[object Uint16Array]",x="[object Uint32Array]",k="[object Int8Array]",b="[object Int16Array]",T="[object Int32Array]",B="[object Float32Array]",w="[object Float64Array]"},92370(t,e,r){r.d(e,{N:()=>o});var i=r(46927);function o(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===(0,i.b)(t)}},8987(t,e,r){r.d(e,{X:()=>i});function i(t){var e;return null!=t&&"function"!=typeof t&&Number.isSafeInteger(e=t.length)&&e>=0}},71253(t,e,r){r.d(e,{i:()=>o});var i=r(12618);function o(t){return(0,i.i)(t)}},13507(t,e,r){r.d(e,{P:()=>o});let i="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||function(){return this}();function o(t){return void 0!==i.Buffer&&i.Buffer.isBuffer(t)}},97688(t,e,r){r.d(e,{s:()=>i});function i(t){return null==t||"object"!=typeof t&&"function"!=typeof t}},12618(t,e,r){r.d(e,{i:()=>i});function i(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}},43273(t,e,r){r.d(e,{DA:()=>k,IU:()=>v,U:()=>L,U7:()=>eu,U_:()=>eC,Zk:()=>d,aP:()=>ed,gh:()=>em,lC:()=>g,on:()=>eg});var i=r(48230),o=r(10601),a=r(73825),s=r(72903),l=r(90047),n=r(76338),h=r(79723),c=r(25258),d=(0,n.K2)(async(t,e,r)=>{let o,n=e.useHtmlLabels||(0,l._3)((0,l.D7)()?.htmlLabels),c=t.insert("g").attr("class",r||"node default").attr("id",e.domId||e.id),d=c.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle));o=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let p=!!e.icon||!!e.img,g="markdown"===e.labelType,u=await (0,a.GZ)(d,(0,l.jZ)((0,s.Sm)(o),(0,l.D7)()),{useHtmlLabels:n,width:e.width||(0,l.D7)().flowchart?.wrappingWidth,classes:g?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:p,markdown:g},(0,l.D7)()),m=u.getBBox(),C=(e?.padding??0)/2;if(n){let t=u.children[0],e=(0,h.Ltv)(u);await (0,i.X)(t,o),m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}return n?d.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"):d.attr("transform","translate(0, "+-m.height/2+")"),e.centerLabel&&d.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),d.insert("rect",":first-child"),{shapeSvg:c,bbox:m,halfPadding:C,label:d}},"labelHelper"),p=(0,n.K2)(async(t,e,r)=>{let i=r.useHtmlLabels??(0,l.E)((0,l.D7)()),o=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),n=await (0,a.GZ)(o,(0,l.jZ)((0,s.Sm)(e),(0,l.D7)()),{useHtmlLabels:i,width:r.width||(0,l.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=n.getBBox(),d=r.padding/2;if((0,l.E)((0,l.D7)())){let t=n.children[0],e=(0,h.Ltv)(n);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return i?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:t,bbox:c,halfPadding:d,label:o}},"insertLabel"),g=(0,n.K2)((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),u=(0,n.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function m(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function C(t,e,r,i,o,a){let s=[],l=r-t,n=2*Math.PI/(l/a),h=e+(i-e)/2;for(let e=0;e<=50;e++){let r=t+e/50*l,i=h+o*Math.sin(n*(r-t));s.push({x:r,y:i})}return s}function y(t,e,r,i,o,a){let s=[],l=o*Math.PI/180,n=(a*Math.PI/180-l)/(i-1);for(let o=0;o"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);let o=e.find(t=>"none"!==t.getAttribute("fill")),a=e.find(t=>"none"!==t.getAttribute("stroke")),s=(0,n.K2)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");o&&Object.entries({fill:s(o,"fill"),"fill-opacity":s(o,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&r.setAttribute(t,e)}),a&&Object.entries({stroke:s(a,"stroke"),"stroke-width":s(a,"stroke-width")??"1","stroke-opacity":s(a,"stroke-opacity")??"1"}).forEach(([t,e])=>{e&&r.setAttribute(t,e)});let l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(r),l}(0,n.K2)(m,"createPathFromPoints"),(0,n.K2)(C,"generateFullSineWavePoints"),(0,n.K2)(y,"generateCirclePoints"),(0,n.K2)(f,"mergePaths");var x=(0,n.K2)((t,e)=>{var r,i,o=t.x,a=t.y,s=e.x-o,l=e.y-a,n=t.width/2,h=t.height/2;return Math.abs(l)*n>Math.abs(s)*h?(l<0&&(h=-h),r=0===l?0:h*s/l,i=h):(s<0&&(n=-n),r=n,i=0===s?0:n*l/s),{x:o+r,y:a+i}},"intersectRect"),k=(0,n.K2)(async(t,e,r,i=!1,o=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);let n=(0,l.D7)(),h=(0,l.E)(n);return await (0,a.GZ)(t,s,{style:r,isTitle:i,useHtmlLabels:h,markdown:!1,isNode:o,width:1/0},n)},"createLabel"),b=(0,n.K2)((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,"0 0 1",t+r,e+o,"V",e+i-o,"A",o,o,"0 0 1",t+r-o,e+i,"H",t+o,"A",o,o,"0 0 1",t,e+i-o,"V",e+o,"A",o,o,"0 0 1",t+o,e,"Z"].join(" "),"createRoundedRectPathD"),T=(0,n.K2)(async(t,e)=>{let r,s;n.Rm.info("Creating subgraph rect for ",e.id,e);let d=(0,l.D7)(),{themeVariables:p,handDrawnSeed:g}=d,{clusterBkg:u,clusterBorder:m}=p,{labelStyles:C,nodeStyles:y,borderStyles:f,backgroundStyles:T}=(0,o.GX)(e),B=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),w=(0,l.E)(d),S=B.insert("g").attr("class","cluster-label "),A=(r="markdown"===e.labelType?await (0,a.GZ)(S,e.label,{style:e.labelStyle,useHtmlLabels:w,isNode:!0,width:e.width}):await k(S,e.label,e.labelStyle||"",!1,!0)).getBBox();if((0,l.E)(d)){let t=r.children[0],e=(0,h.Ltv)(r);A=t.getBoundingClientRect(),e.attr("width",A.width),e.attr("height",A.height)}let F=e.width<=A.width+e.padding?A.width+e.padding:e.width;e.width<=A.width+e.padding?e.diff=(F-e.width)/2-e.padding:e.diff=-e.padding;let L=e.height,v=e.x-F/2,M=e.y-L/2;if(n.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=c.A.svg(B),r=(0,o.Fr)(e,{roughness:.7,fill:u,stroke:m,fillWeight:3,seed:g}),i=t.path(b(v,M,F,L,0),r);(s=B.insert(()=>(n.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",f.join(";")),s.select("path").attr("style",T.join(";").replace("fill","stroke"))}else(s=B.insert("rect",":first-child")).attr("style",y).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",M).attr("width",F).attr("height",L);let{subGraphTitleTopMargin:E}=(0,i.O)(d);if(S.attr("transform",`translate(${e.x-A.width/2}, ${e.y-e.height/2+E})`),C){let t=S.select("span");t&&t.attr("style",C)}let _=s.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=A.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:B,labelBBox:A}},"rect"),B=(0,n.K2)((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),o=0*e.padding,a=o/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+o).attr("height",e.height+o).attr("fill","none");let s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return x(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),w=(0,n.K2)(async(t,e)=>{let r,i=(0,l.D7)(),{themeVariables:o,handDrawnSeed:a}=i,{altBackground:s,compositeBackground:n,compositeTitleBackground:d,nodeBorder:p}=o,g=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),u=g.insert("g",":first-child"),m=g.insert("g").attr("class","cluster-label"),C=g.append("rect"),y=await k(m,e.label,e.labelStyle,void 0,!0),f=y.getBBox();if((0,l.E)(i)){let t=y.children[0],e=(0,h.Ltv)(y);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}let T=0*e.padding,B=(e.width<=f.width+e.padding?f.width+e.padding:e.width)+T;e.width<=f.width+e.padding?e.diff=(B-e.width)/2-e.padding:e.diff=-e.padding;let w=e.height+T,S=e.height+T-f.height-6,A=e.x-B/2,F=e.y-w/2;e.width=B;let L=e.y-e.height/2-T/2+f.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),i=c.A.svg(g),o=e.rx||e.ry?i.path(b(A,F,B,w,10),{roughness:.7,fill:d,fillStyle:"solid",stroke:p,seed:a}):i.rectangle(A,F,B,w,{seed:a});r=g.insert(()=>o,":first-child");let l=i.rectangle(A,L,B,S,{fill:t?s:n,fillStyle:t?"hachure":"solid",stroke:p,seed:a});r=g.insert(()=>o,":first-child"),C=g.insert(()=>l)}else(r=u.insert("rect",":first-child")).attr("class","outer").attr("x",A).attr("y",F).attr("width",B).attr("height",w).attr("data-look",e.look),C.attr("class","inner").attr("x",A).attr("y",L).attr("width",B).attr("height",S);return m.attr("transform",`translate(${e.x-f.width/2}, ${F+1-3*!(0,l.E)(i)})`),e.height=r.node().getBBox().height,e.offsetX=0,e.offsetY=f.height-e.padding/2,e.labelBBox=f,e.intersect=function(t){return x(e,t)},{cluster:g,labelBBox:f}},"roundedWithTitle"),S=(0,n.K2)(async(t,e)=>{let r;n.Rm.info("Creating subgraph rect for ",e.id,e);let s=(0,l.D7)(),{themeVariables:d,handDrawnSeed:p}=s,{clusterBkg:g,clusterBorder:u}=d,{labelStyles:m,nodeStyles:C,borderStyles:y,backgroundStyles:f}=(0,o.GX)(e),k=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),T=(0,l.E)(s),B=k.insert("g").attr("class","cluster-label "),w=await (0,a.GZ)(B,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),S=w.getBBox();if((0,l.E)(s)){let t=w.children[0],e=(0,h.Ltv)(w);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}let A=e.width<=S.width+e.padding?S.width+e.padding:e.width;e.width<=S.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let F=e.height,L=e.x-A/2,v=e.y-F/2;if(n.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=c.A.svg(k),i=(0,o.Fr)(e,{roughness:.7,fill:g,stroke:u,fillWeight:4,seed:p}),a=t.path(b(L,v,A,F,e.rx),i);(r=k.insert(()=>(n.Rm.debug("Rough node insert CXC",a),a),":first-child")).select("path:nth-child(2)").attr("style",y.join(";")),r.select("path").attr("style",f.join(";").replace("fill","stroke"))}else(r=k.insert("rect",":first-child")).attr("style",C).attr("rx",e.rx).attr("ry",e.ry).attr("x",L).attr("y",v).attr("width",A).attr("height",F);let{subGraphTitleTopMargin:M}=(0,i.O)(s);if(B.attr("transform",`translate(${e.x-S.width/2}, ${e.y-e.height/2+M})`),m){let t=B.select("span");t&&t.attr("style",m)}let E=r.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=S.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:k,labelBBox:S}},"kanbanSection"),A={rect:T,squareRect:T,roundedWithTitle:w,noteGroup:B,divider:(0,n.K2)((t,e)=>{let r,{themeVariables:i,handDrawnSeed:o}=(0,l.D7)(),{nodeBorder:a}=i,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),n=s.insert("g",":first-child"),h=0*e.padding,d=e.width+h;e.diff=-e.padding;let p=e.height+h,g=e.x-d/2,u=e.y-p/2;if(e.width=d,"handDrawn"===e.look){let t=c.A.svg(s).rectangle(g,u,d,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:o});r=s.insert(()=>t,":first-child")}else{r=n.insert("rect",":first-child");let t="outer";e.look,t="divider",r.attr("class",t).attr("x",g).attr("y",u).attr("width",d).attr("height",p).attr("data-look",e.look)}return e.height=r.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:s,labelBBox:{}}},"divider"),kanbanSection:S},F=new Map,L=(0,n.K2)(async(t,e)=>{let r=e.shape||"rect",i=await A[r](t,e);return F.set(e.id,i),i},"insertCluster"),v=(0,n.K2)(()=>{F=new Map},"clear");function M(t,e,r,i){var o=t.x,a=t.y,s=o-i.x,l=a-i.y,n=Math.sqrt(e*e*l*l+r*r*s*s),h=Math.abs(e*r*s/n);i.xMath.abs(p)&&1e-6>Math.abs(g)&&$(p,g))return;let u=o*c-h*a;if(0===u)return;let m=Math.abs(u/2),C=a*d-c*s;return{x:C<0?(C-m)/u:(C+m)/u,y:(C=h*s-o*d)<0?(C-m)/u:(C+m)/u}}}function $(t,e){return t*e>0}function O(t,e,r){let i=t.x,o=t.y,a=[],s=1/0,l=1/0;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),l=Math.min(l,t.y)}):(s=Math.min(s,e.x),l=Math.min(l,e.y));let n=i-t.width/2-s,h=o-t.height/2-l;for(let i=0;i1&&a.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,a=Math.sqrt(i*i+o*o),s=e.x-r.x,l=e.y-r.y,n=Math.sqrt(s*s+l*l);return am,":first-child");return C.attr("class","anchor").attr("style",(0,s.KL)(h)),g(e,C),e.intersect=function(t){return n.Rm.info("Circle intersect",e,1,t),E(e,1,t)},l}function D(t,e,r,i,o,a,s){let l=Math.atan2(i-e,r-t),n=Math.sqrt(((r-t)/2/o)**2+((i-e)/2/a)**2);if(n>1)throw Error("The given radii are too small to create an arc between the points.");let h=Math.sqrt(1-n**2),c=(t+r)/2+h*a*Math.sin(l)*(s?-1:1),d=(e+i)/2-h*o*Math.cos(l)*(s?-1:1),p=Math.atan2((e-d)/a,(t-c)/o),g=Math.atan2((i-d)/a,(r-c)/o)-p;s&&g<0&&(g+=2*Math.PI),!s&&g>0&&(g-=2*Math.PI);let u=[];for(let t=0;t<20;t++){let e=p+t/19*g,r=c+o*Math.cos(e),i=d+a*Math.sin(e);u.push({x:r,y:i})}return u}function q(t,e,r){let[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function K(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a,h=(0,n.K2)(t=>t+l,"calcTotalHeight"),p=(0,n.K2)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:C,bbox:y}=await d(t,e,u(e)),f=h(e?.height?e?.height:y.height),[x,k]=p(f),b=q(f,x,k),T=(e?.width?e?.width:y.width)+2*s+b-b,{cssStyles:B}=e,w=[{x:T/2,y:-f/2},{x:-T/2,y:-f/2},...D(-T/2,-f/2,-T/2,f/2,x,k,!1),{x:T/2,y:f/2},...D(T/2,f/2,T/2,-f/2,x,k,!0)],S=c.A.svg(C),A=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let F=m(w),L=S.path(F,A),v=C.insert(()=>L,":first-child");return v.attr("class","basic label-container outer-path"),B&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",B),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${x/2}, 0)`),g(e,v),e.intersect=function(t){return O(e,w,t)},C}function R(t,e,r,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+","+r/2+")")}async function z(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let s=e.padding??0,l="neo"===e.look?28:s,n="neo"===e.look?24:s,{shapeSvg:h,bbox:p}=await d(t,e,u(e)),C=(e?.width??p.width)+("neo"===e.look?2*l:l+12),y=(e?.height??p.height)+("neo"===e.look?2*n:n),f=-y,x=[{x:12,y:f},{x:C,y:f},{x:C,y:0},{x:0,y:0},{x:0,y:f+12},{x:12,y:f}],{cssStyles:k}=e;if("handDrawn"===e.look){let t=c.A.svg(h),i=(0,o.Fr)(e,{}),a=m(x),s=t.path(a,i);r=h.insert(()=>s,":first-child").attr("transform",`translate(${-C/2}, ${y/2})`),k&&r.attr("style",k)}else r=R(h,C,y,x);return a&&r.attr("style",a),g(e,r),e.intersect=function(t){return O(e,x,t)},h}function P(t,e){let{nodeStyles:r}=(0,o.GX)(e);e.label="";let i=t.insert("g").attr("class",u(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(28,e.width??0),l=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=c.A.svg(i),h=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");let d=m(l),p=n.path(d,h),g=i.insert(()=>p,":first-child");return a&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return O(e,l,t)},i}async function W(t,e,r){let i,{labelStyles:a,nodeStyles:l}=(0,o.GX)(e);e.labelStyle=a;let{shapeSvg:h,bbox:p,halfPadding:m}=await d(t,e,u(e)),C=r?.padding??m,y="neo"===e.look?p.width/2+32:p.width/2+C,{cssStyles:f}=e;if("handDrawn"===e.look){let t=c.A.svg(h),r=(0,o.Fr)(e,{}),a=t.circle(0,0,2*y,r);(i=h.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(f))}else i=h.insert("circle",":first-child").attr("class","basic label-container").attr("style",l).attr("r",y).attr("cx",0).attr("cy",0);return g(e,i),e.calcIntersect=function(t,e){let r=t.width/2;return E(t,r,e)},e.intersect=function(t){return n.Rm.info("Circle intersect",e,y,t),E(e,y,t)},h}function N(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t,o={x:i/2*e,y:i/2*r},a={x:-(i/2)*e,y:i/2*r},s={x:-(i/2)*e,y:-(i/2)*r},l={x:i/2*e,y:-(i/2)*r};return`M ${a.x},${a.y} L ${l.x},${l.y} M ${o.x},${o.y} L ${s.x},${s.y}`}function j(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r,e.label="";let a=t.insert("g").attr("class",u(e)).attr("id",e.domId??e.id),s=Math.max(30,e?.width??0),{cssStyles:l}=e,h=c.A.svg(a),d=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let p=h.circle(0,0,2*s,d),m=N(s),C=h.path(m,d),y=a.insert(()=>p,":first-child");return y.insert(()=>C),y.attr("class","outer-path"),l&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),g(e,y),e.intersect=function(t){return n.Rm.info("crossedCircle intersect",e,{radius:s,point:t}),E(e,s,t)},a}function H(t,e,r,i=100,o=0,a=180){let s=[],l=o*Math.PI/180,n=(a*Math.PI/180-l)/(i-1);for(let o=0;oA,":first-child").attr("stroke-opacity",0),F.insert(()=>w,":first-child"),F.attr("class","text"),f&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${y}, 0)`),l.attr("transform",`translate(${-p/2+y-(s.x-(s.left??0))},${-C/2+(e.padding??0)/2-(s.y-(s.top??0))})`),g(e,F),e.intersect=function(t){return O(e,k,t)},a}function X(t,e,r,i=100,o=0,a=180){let s=[],l=o*Math.PI/180,n=(a*Math.PI/180-l)/(i-1);for(let o=0;oA,":first-child").attr("stroke-opacity",0),F.insert(()=>w,":first-child"),F.attr("class","text"),f&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-y}, 0)`),l.attr("transform",`translate(${-p/2+(e.padding??0)/2-(s.x-(s.left??0))},${-C/2+(e.padding??0)/2-(s.y-(s.top??0))})`),g(e,F),e.intersect=function(t){return O(e,k,t)},a}function Y(t,e,r,i=100,o=0,a=180){let s=[],l=o*Math.PI/180,n=(a*Math.PI/180-l)/(i-1);for(let o=0;ov,":first-child").attr("stroke-opacity",0),M.insert(()=>S,":first-child"),M.insert(()=>F,":first-child"),M.attr("class","text"),f&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${y-y/4}, 0)`),l.attr("transform",`translate(${-p/2+(e.padding??0)/2-(s.x-(s.left??0))},${-C/2+(e.padding??0)/2-(s.y-(s.top??0))})`),g(e,M),e.intersect=function(t){return O(e,b,t)},a}async function Z(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a,{shapeSvg:n,bbox:h}=await d(t,e,u(e)),p=Math.max(20,(h.width+2*s)*1.25,e?.width??0),C=Math.max(5,h.height+2*l,e?.height??0),f=C/2,{cssStyles:x}=e,k=c.A.svg(n),b=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let T=p-f,B=C/4,w=[{x:T,y:0},{x:B,y:0},{x:0,y:C/2},{x:B,y:C},{x:T,y:C},...y(-T,-C/2,f,50,270,90)],S=m(w),A=k.path(S,b),F=n.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&F.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&F.selectChildren("path").attr("style",i),F.attr("transform",`translate(${-p/2}, ${-C/2})`),g(e,F),e.intersect=function(t){return O(e,w,t)},n}(0,n.K2)(I,"anchor"),(0,n.K2)(D,"generateArcPoints"),(0,n.K2)(q,"calculateArcSagitta"),(0,n.K2)(K,"bowTieRect"),(0,n.K2)(R,"insertPolygonShape"),(0,n.K2)(z,"card"),(0,n.K2)(P,"choice"),(0,n.K2)(W,"circle"),(0,n.K2)(N,"createLine"),(0,n.K2)(j,"crossedCircle"),(0,n.K2)(H,"generateCirclePoints"),(0,n.K2)(U,"curlyBraceLeft"),(0,n.K2)(X,"generateCirclePoints"),(0,n.K2)(G,"curlyBraceRight"),(0,n.K2)(Y,"generateCirclePoints"),(0,n.K2)(V,"curlyBraces"),(0,n.K2)(Z,"curvedTrapezoid");var Q=(0,n.K2)((t,e,r,i,o,a)=>`M${t},${e+a} a${o},${a} 0,0,0 ${r},0 a${o},${a} 0,0,0 ${-r},0 l0,${i} a${o},${a} 0,0,0 ${r},0 l0,${-i}`,"createCylinderPathD"),J=(0,n.K2)((t,e,r,i,o,a)=>`M${t},${e+a} M${t+r},${e+a} a${o},${a} 0,0,0 ${-r},0 l0,${i} a${o},${a} 0,0,0 ${r},0 l0,${-i}`,"createOuterCylinderPathD"),tt=(0,n.K2)((t,e,r,i,o,a)=>`M${t-r/2},${-i/2} a${o},${a} 0,0,0 ${r},0`,"createInnerCylinderPathD");async function te(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let l=e.padding??0,n="neo"===e.look?24:l,h="neo"===e.look?24:l;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-h,e.width<8&&(e.width=8),e.height=(e.height??0)-n-t/2/(2.5+t/50)*3,e.height<8&&(e.height=8)}let{shapeSvg:p,bbox:m,label:C}=await d(t,e,u(e)),y=(e.width?e.width:m.width)+h,f=y/2,k=f/(2.5+y/50),b=(e.height?e.height:m.height)+n+k,{cssStyles:T}=e;if("handDrawn"===e.look){let t=c.A.svg(p),i=J(0,0,y,b,f,k),a=tt(0,k,y,b,f,k),s=(0,o.Fr)(e,{}),l=t.path(i,s),n=t.path(a,(0,o.Fr)(e,{fill:"none"}));r=p.insert(()=>n,":first-child"),(r=p.insert(()=>l,":first-child")).attr("class","basic label-container"),T&&r.attr("style",T)}else{let t=Q(0,0,y,b,f,k);r=p.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(T)).attr("style",a)}return r.attr("label-offset-y",k),r.attr("transform",`translate(${-y/2}, ${-(b/2+k)})`),g(e,r),C.attr("transform",`translate(${-(m.width/2)-(m.x-(m.left??0))}, ${-(m.height/2)+(e.padding??0)/1.5-(m.y-(m.top??0))})`),e.intersect=function(t){let r=x(e,t),i=r.x-(e.x??0);if(0!=f&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-k)){let o=k*k*(1-i*i/(f*f));o>0&&(o=Math.sqrt(o)),o=k-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},p}async function tr(t,e,r){let i,{labelStyles:a,nodeStyles:l}=(0,o.GX)(e);e.labelStyle=a;let{shapeSvg:n,bbox:h}=await d(t,e,u(e)),p=Math.max(h.width+2*r.labelPaddingX,e?.width||0),m=Math.max(h.height+2*r.labelPaddingY,e?.height||0),C=-p/2,y=-m/2,{rx:f,ry:k}=e,{cssStyles:T}=e;if(r?.rx&&r.ry&&(f=r.rx,k=r.ry),"handDrawn"===e.look){let t=c.A.svg(n),r=(0,o.Fr)(e,{}),a=f||k?t.path(b(C,y,p,m,f||0),r):t.rectangle(C,y,p,m,r);(i=n.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(T))}else(i=n.insert("rect",":first-child")).attr("class","basic label-container").attr("style",l).attr("rx",(0,s.KL)(f)).attr("ry",(0,s.KL)(k)).attr("x",C).attr("y",y).attr("width",p).attr("height",m);return g(e,i),e.calcIntersect=function(t,e){return x(t,e)},e.intersect=function(t){return x(e,t)},n}async function ti(t,e){let{cssClasses:r,labelPaddingX:i,labelPaddingY:a,padding:s,width:l,height:n}=e,h=await tr(t,e,{rx:0,ry:0,classes:r??"",labelPaddingX:i??(s??0)*2,labelPaddingY:a??s??0});if("handDrawn"===e.look){let t=c.A.svg(h),r=(0,o.Fr)(e,{}),i=h.select(".basic.label-container > path:nth-child(2)"),a=i.node();if(!a)return h;let s=null;return a instanceof SVGGraphicsElement&&(s=a.getBBox(),h.insert(()=>t.line(s.x,s.y,s.x+s.width,s.y,r),".basic.label-container g.label"),h.insert(()=>t.line(s.x,s.y+s.height,s.x+s.width,s.y+s.height,r),".basic.label-container g.label"),i.remove()),h}let d=h.select(".basic.label-container"),p=(Number(d.attr("width"))||l)??0,g=(Number(d.attr("height"))||n)??0;return p>0&&g>0&&d.attr("stroke-dasharray",`${p} ${g}`),h}async function to(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a="neo"===e.look?16:e.padding??0,s="neo"===e.look?16:e.padding??0,{shapeSvg:l,bbox:n,label:h}=await d(t,e,u(e)),p=n.width+a,m=n.height+s,C=.2*m,y=-p/2,f=-m/2-C/2,{cssStyles:k}=e,b=c.A.svg(l),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");let B=b.polygon([{x:y,y:f+C},{x:-y,y:f+C},{x:-y,y:-f},{x:y,y:-f},{x:y,y:f},{x:-y,y:f},{x:-y,y:f+C}].map(t=>[t.x,t.y]),T),w=l.insert(()=>B,":first-child");return w.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),h.attr("transform",`translate(${y+(e.padding??0)/2-(n.x-(n.left??0))}, ${f+C+(e.padding??0)/2-(n.y-(n.top??0))})`),g(e,w),e.intersect=function(t){return x(e,t)},l}async function ta(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e),l="neo"===e.look?12:5;e.labelStyle=i;let h=e.padding??0,p="neo"===e.look?16:h,{shapeSvg:m,bbox:C}=await d(t,e,u(e)),y=(e?.width?e?.width/2:C.width/2)+(p??0),f=y-l,{cssStyles:x}=e;if("handDrawn"===e.look){let t=c.A.svg(m),i=(0,o.Fr)(e,{roughness:.2,strokeWidth:2.5}),a=(0,o.Fr)(e,{roughness:.2,strokeWidth:1.5}),l=t.circle(0,0,2*y,i),n=t.circle(0,0,2*f,a);(r=m.insert("g",":first-child")).attr("class",(0,s.KL)(e.cssClasses)).attr("style",(0,s.KL)(x)),r.node()?.appendChild(l),r.node()?.appendChild(n)}else{let t=(r=m.insert("g",":first-child")).insert("circle",":first-child"),e=r.insert("circle");r.attr("class","basic label-container").attr("style",a),t.attr("class","outer-circle").attr("style",a).attr("r",y).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",a).attr("r",f).attr("cx",0).attr("cy",0)}return g(e,r),e.intersect=function(t){return n.Rm.info("DoubleCircle intersect",e,y,t),E(e,y,t)},m}function ts(t,e,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.label="",e.labelStyle=i;let s=t.insert("g").attr("class",u(e)).attr("id",e.domId??e.id),{cssStyles:l}=e,h=c.A.svg(s),{nodeBorder:d}=r,p=(0,o.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(p.roughness=0);let m=h.circle(0,0,14,p),C=s.insert(()=>m,":first-child");return C.selectAll("path").attr("style",`fill: ${d} !important;`),l&&l.length>0&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),a&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",a),g(e,C),e.intersect=function(t){return n.Rm.info("filledCircle intersect",e,{radius:7,point:t}),E(e,7,t)},s}async function tl(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?2*a:a;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-s-s/2,e.width<10&&(e.width=10));let{shapeSvg:l,bbox:h,label:p}=await d(t,e,u(e)),C=(e?.width?e?.width:h.width)+(s??0),y=e?.height?e?.height:C+h.height,f=[{x:0,y:-y},{x:y,y:-y},{x:y/2,y:0}],{cssStyles:x}=e,k=c.A.svg(l),b=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let T=m(f),B=k.path(T,b),w=l.insert(()=>B,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`).attr("class","outer-path");return x&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",i),e.width=C,e.height=y,g(e,w),p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-y/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(t){return n.Rm.info("Triangle intersect",e,f,t),O(e,f,t)},l}function tn(t,e,{dir:r,config:{state:i,themeVariables:a}}){let{nodeStyles:s}=(0,o.GX)(e);e.label="";let l=t.insert("g").attr("class",u(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,h=Math.max(70,e?.width??0),d=Math.max(10,e?.height??0);"LR"===r&&(h=Math.max(10,e?.width??0),d=Math.max(70,e?.height??0));let p=-1*h/2,m=-1*d/2,C=c.A.svg(l),y=(0,o.Fr)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let f=C.rectangle(p,m,h,d,y),k=l.insert(()=>f,":first-child");n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),s&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",s),g(e,k);let b=i?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return x(e,t)},l}async function th(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*a,e.width<15&&(e.width=15));let{shapeSvg:l,bbox:h}=await d(t,e,u(e)),p=(e?.width?e?.width:Math.max(15,h.width))+2*a,C=(e?.height?e?.height:Math.max(10,h.height))+2*s,f=C/2,{cssStyles:x}=e,k=c.A.svg(l),b=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let T=[{x:-p/2,y:-C/2},{x:p/2-f,y:-C/2},...y(-p/2+f,0,f,50,90,270),{x:p/2-f,y:C/2},{x:-p/2,y:C/2}],B=m(T),w=k.path(B,b),S=l.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",i),g(e,S),e.intersect=function(t){return n.Rm.info("Pill intersect",e,{radius:f,point:t}),O(e,T,t)},l}(0,n.K2)(te,"cylinder"),(0,n.K2)(tr,"drawRect"),(0,n.K2)(ti,"datastore"),(0,n.K2)(to,"dividedRectangle"),(0,n.K2)(ta,"doublecircle"),(0,n.K2)(ts,"filledCircle"),(0,n.K2)(tl,"flippedTriangle"),(0,n.K2)(tn,"forkJoin"),(0,n.K2)(th,"halfRoundedRectangle");var tc=(0,n.K2)((t,e,r,i,o)=>`M${t+o},${e} L${t+r-o},${e} L${t+r},${e-i/2} L${t+r-o},${e-i} L${t+o},${e-i} L${t},${e-i/2} Z`,"createHexagonPathD");async function td(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e),s="neo"===e.look?3.5:4;e.labelStyle=i;let l=e.padding??0,n="neo"===e.look?70:l,h="neo"===e.look?32:l;if(e.width||e.height){let t=e.height??0;e.width=(e?.width??0)-t/s*2-h,e.height=(e.height??0)-n}let{shapeSvg:p,bbox:m}=await d(t,e,u(e)),C=(e?.height?e?.height:m.height)+n,y=C/s,f=(e?.width?e?.width:m.width)+2*y+h,x=[{x:y,y:0},{x:f-y,y:0},{x:f,y:-C/2},{x:f-y,y:-C},{x:y,y:-C},{x:0,y:-C/2}],{cssStyles:k}=e;if("handDrawn"===e.look){let t=c.A.svg(p),i=(0,o.Fr)(e,{}),a=tc(0,0,f,C,y),s=t.path(a,i);r=p.insert(()=>s,":first-child").attr("transform",`translate(${-f/2}, ${C/2})`),k&&r.attr("style",k)}else r=R(p,f,C,x);return a&&r.attr("style",a),e.width=f,e.height=C,g(e,r),e.intersect=function(t){return O(e,x,t)},p}async function tp(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.label="",e.labelStyle=r;let{shapeSvg:a}=await d(t,e,u(e)),s=Math.max(30,e?.width??0),l=Math.max(30,e?.height??0),{cssStyles:h}=e,p=c.A.svg(a),C=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let y=[{x:0,y:0},{x:s,y:0},{x:0,y:l},{x:s,y:l}],f=m(y),x=p.path(f,C),k=a.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-s/2}, ${-l/2})`),g(e,k),e.intersect=function(t){return n.Rm.info("Pill intersect",e,{points:y}),O(e,y,t)},a}async function tg(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:s}=(0,o.GX)(e);e.labelStyle=s;let l=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(l,i?.wrappingWidth??0);let{shapeSvg:h,bbox:p,label:u}=await d(t,e,"icon-shape default"),m="t"===e.pos,{nodeBorder:C}=r,{stylesMap:y}=(0,o.WW)(e),f=-l/2,k=-l/2,b=8*!!e.label,T=c.A.svg(h),B=(0,o.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let w=T.rectangle(f,k,l,l,B),S=Math.max(l,p.width),A=l+p.height+b,F=T.rectangle(-S/2,-A/2,S,A,{...B,fill:"transparent",stroke:"none"}),L=h.insert(()=>w,":first-child"),v=h.insert(()=>F);if(e.icon){let t=h.append("g");t.html(`${await (0,a.WY)(e.icon,{height:l,width:l,fallbackPrefix:""})}`);let r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,n=r.y;t.attr("transform",`translate(${-i/2-s},${m?p.height/2+b/2-o/2-n:-p.height/2-b/2-o/2-n})`),t.attr("style",`color: ${y.get("stroke")??C};`)}return u.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-A/2:A/2-p.height})`),L.attr("transform",`translate(0,${m?p.height/2+b/2:-p.height/2-b/2})`),g(e,v),e.intersect=function(t){if(n.Rm.info("iconSquare intersect",e,t),!e.label)return x(e,t);let r=e.x??0,i=e.y??0,o=e.height??0,a=[];return O(e,a=m?[{x:r-p.width/2,y:i-o/2},{x:r+p.width/2,y:i-o/2},{x:r+p.width/2,y:i-o/2+p.height+b},{x:r+l/2,y:i-o/2+p.height+b},{x:r+l/2,y:i+o/2},{x:r-l/2,y:i+o/2},{x:r-l/2,y:i-o/2+p.height+b},{x:r-p.width/2,y:i-o/2+p.height+b}]:[{x:r-l/2,y:i-o/2},{x:r+l/2,y:i-o/2},{x:r+l/2,y:i-o/2+l},{x:r+p.width/2,y:i-o/2+l},{x:r+p.width/2/2,y:i+o/2},{x:r-p.width/2,y:i+o/2},{x:r-p.width/2,y:i-o/2+l},{x:r-l/2,y:i-o/2+l}],t)},h}async function tu(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:s}=(0,o.GX)(e);e.labelStyle=s;let l=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(l,i?.wrappingWidth??0);let{shapeSvg:h,bbox:p,label:u}=await d(t,e,"icon-shape default"),m=8*!!e.label,C="t"===e.pos,{nodeBorder:y,mainBkg:f}=r,{stylesMap:k}=(0,o.WW)(e),b=c.A.svg(h),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid"),T.stroke=k.get("fill")??f;let B=h.append("g");e.icon&&B.html(`${await (0,a.WY)(e.icon,{height:l,width:l,fallbackPrefix:""})}`);let w=B.node().getBBox(),S=w.width,A=w.height,F=w.x,L=w.y,v=Math.max(S,A)*Math.SQRT2+40,M=b.circle(0,0,v,T),E=Math.max(v,p.width),_=v+p.height+m,$=b.rectangle(-E/2,-_/2,E,_,{...T,fill:"transparent",stroke:"none"}),O=h.insert(()=>M,":first-child"),I=h.insert(()=>$);return B.attr("transform",`translate(${-S/2-F},${C?p.height/2+m/2-A/2-L:-p.height/2-m/2-A/2-L})`),B.attr("style",`color: ${k.get("stroke")??y};`),u.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${C?-_/2:_/2-p.height})`),O.attr("transform",`translate(0,${C?p.height/2+m/2:-p.height/2-m/2})`),g(e,I),e.intersect=function(t){return n.Rm.info("iconSquare intersect",e,t),x(e,t)},h}async function tm(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:s}=(0,o.GX)(e);e.labelStyle=s;let l=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(l,i?.wrappingWidth??0);let{shapeSvg:h,bbox:p,halfPadding:u,label:m}=await d(t,e,"icon-shape default"),C="t"===e.pos,y=l+2*u,f=l+2*u,{nodeBorder:k,mainBkg:T}=r,{stylesMap:B}=(0,o.WW)(e),w=8*!!e.label,S=c.A.svg(h),A=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid"),A.stroke=B.get("fill")??T;let F=S.path(b(-f/2,-y/2,f,y,5),A),L=Math.max(f,p.width),v=y+p.height+w,M=S.rectangle(-L/2,-v/2,L,v,{...A,fill:"transparent",stroke:"none"}),E=h.insert(()=>F,":first-child").attr("class","icon-shape2"),_=h.insert(()=>M);if(e.icon){let t=h.append("g");t.html(`${await (0,a.WY)(e.icon,{height:l,width:l,fallbackPrefix:""})}`);let r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,n=r.y;t.attr("transform",`translate(${-i/2-s},${C?p.height/2+w/2-o/2-n:-p.height/2-w/2-o/2-n})`),t.attr("style",`color: ${B.get("stroke")??k};`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${C?-v/2:v/2-p.height})`),E.attr("transform",`translate(0,${C?p.height/2+w/2:-p.height/2-w/2})`),g(e,_),e.intersect=function(t){if(n.Rm.info("iconSquare intersect",e,t),!e.label)return x(e,t);let r=e.x??0,i=e.y??0,o=e.height??0,a=[];return O(e,a=C?[{x:r-p.width/2,y:i-o/2},{x:r+p.width/2,y:i-o/2},{x:r+p.width/2,y:i-o/2+p.height+w},{x:r+f/2,y:i-o/2+p.height+w},{x:r+f/2,y:i+o/2},{x:r-f/2,y:i+o/2},{x:r-f/2,y:i-o/2+p.height+w},{x:r-p.width/2,y:i-o/2+p.height+w}]:[{x:r-f/2,y:i-o/2},{x:r+f/2,y:i-o/2},{x:r+f/2,y:i-o/2+y},{x:r+p.width/2,y:i-o/2+y},{x:r+p.width/2/2,y:i+o/2},{x:r-p.width/2,y:i+o/2},{x:r-p.width/2,y:i-o/2+y},{x:r-f/2,y:i-o/2+y}],t)},h}async function tC(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:s}=(0,o.GX)(e);e.labelStyle=s;let l=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(l,i?.wrappingWidth??0);let{shapeSvg:h,bbox:p,halfPadding:u,label:m}=await d(t,e,"icon-shape default"),C="t"===e.pos,y=l+2*u,f=l+2*u,{nodeBorder:k,mainBkg:T}=r,{stylesMap:B}=(0,o.WW)(e),w=8*!!e.label,S=c.A.svg(h),A=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid"),A.stroke=B.get("fill")??T;let F=S.path(b(-f/2,-y/2,f,y,.1),A),L=Math.max(f,p.width),v=y+p.height+w,M=S.rectangle(-L/2,-v/2,L,v,{...A,fill:"transparent",stroke:"none"}),E=h.insert(()=>F,":first-child"),_=h.insert(()=>M);if(e.icon){let t=h.append("g");t.html(`${await (0,a.WY)(e.icon,{height:l,width:l,fallbackPrefix:""})}`);let r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,n=r.y;t.attr("transform",`translate(${-i/2-s},${C?p.height/2+w/2-o/2-n:-p.height/2-w/2-o/2-n})`),t.attr("style",`color: ${B.get("stroke")??k};`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${C?-v/2:v/2-p.height})`),E.attr("transform",`translate(0,${C?p.height/2+w/2:-p.height/2-w/2})`),g(e,_),e.intersect=function(t){if(n.Rm.info("iconSquare intersect",e,t),!e.label)return x(e,t);let r=e.x??0,i=e.y??0,o=e.height??0,a=[];return O(e,a=C?[{x:r-p.width/2,y:i-o/2},{x:r+p.width/2,y:i-o/2},{x:r+p.width/2,y:i-o/2+p.height+w},{x:r+f/2,y:i-o/2+p.height+w},{x:r+f/2,y:i+o/2},{x:r-f/2,y:i+o/2},{x:r-f/2,y:i-o/2+p.height+w},{x:r-p.width/2,y:i-o/2+p.height+w}]:[{x:r-f/2,y:i-o/2},{x:r+f/2,y:i-o/2},{x:r+f/2,y:i-o/2+y},{x:r+p.width/2,y:i-o/2+y},{x:r+p.width/2/2,y:i+o/2},{x:r-p.width/2,y:i+o/2},{x:r-p.width/2,y:i-o/2+y},{x:r-f/2,y:i-o/2+y}],t)},h}async function ty(t,e,{config:{flowchart:r}}){let i=new Image;i.src=e?.img??"",await i.decode();let a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/s;let{labelStyles:l}=(0,o.GX)(e);e.labelStyle=l;let h=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let p=Math.max(e.label?h??0:0,e?.assetWidth??a),u="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:p,m="on"===e.constraint?u/e.imageAspectRatio:e?.assetHeight??s;e.width=Math.max(u,h??0);let{shapeSvg:C,bbox:y,label:f}=await d(t,e,"image-shape default"),k="t"===e.pos,b=-u/2,T=8*!!e.label,B=c.A.svg(C),w=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let S=B.rectangle(b,-m/2,u,m,w),A=Math.max(u,y.width),F=m+y.height+T,L=B.rectangle(-A/2,-F/2,A,F,{...w,fill:"none",stroke:"none"}),v=C.insert(()=>S,":first-child"),M=C.insert(()=>L);if(e.img){let t=C.append("image");t.attr("href",e.img),t.attr("width",u),t.attr("height",m),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-u/2},${k?F/2-m:-F/2})`)}return f.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${k?-m/2-y.height/2-T/2:m/2-y.height/2+T/2})`),v.attr("transform",`translate(0,${k?y.height/2+T/2:-y.height/2-T/2})`),g(e,M),e.intersect=function(t){if(n.Rm.info("iconSquare intersect",e,t),!e.label)return x(e,t);let r=e.x??0,i=e.y??0,o=e.height??0,a=[];return O(e,a=k?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+T},{x:r+u/2,y:i-o/2+y.height+T},{x:r+u/2,y:i+o/2},{x:r-u/2,y:i+o/2},{x:r-u/2,y:i-o/2+y.height+T},{x:r-y.width/2,y:i-o/2+y.height+T}]:[{x:r-u/2,y:i-o/2},{x:r+u/2,y:i-o/2},{x:r+u/2,y:i-o/2+m},{x:r+y.width/2,y:i-o/2+m},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+m},{x:r-u/2,y:i-o/2+m}],t)},C}async function tf(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let s=e.padding??0,l="neo"===e.look?2*s:s,{shapeSvg:n,bbox:h}=await d(t,e,u(e)),p=Math.max(h.width+(l??0)*2,e?.width??0),C=Math.max(h.height+(s??0)*2,e?.height??0),y=[{x:0,y:0},{x:p,y:0},{x:p+3*C/6,y:-C},{x:-3*C/6,y:-C}],{cssStyles:f}=e;if("handDrawn"===e.look){let t=c.A.svg(n),i=(0,o.Fr)(e,{}),a=m(y),s=t.path(a,i);r=n.insert(()=>s,":first-child").attr("transform",`translate(${-p/2}, ${C/2})`),f&&r.attr("style",f)}else r=R(n,p,C,y);return a&&r.attr("style",a),e.width=p,e.height=C,g(e,r),e.intersect=function(t){return O(e,y,t)},n}async function tx(t,e){let{shapeSvg:r,bbox:i,label:o}=await d(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),g(e,a),e.intersect=function(t){return x(e,t)},r}async function tk(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let s=e.padding??0,l="neo"===e.look?2*s:s,{shapeSvg:n,bbox:h}=await d(t,e,u(e)),p=(e?.height??h.height)+s,C=(e?.width??h.width)+l,y=[{x:0,y:0},{x:C+3*p/6,y:0},{x:C,y:-p},{x:-(3*p)/6,y:-p}],{cssStyles:f}=e;if("handDrawn"===e.look){let t=c.A.svg(n),i=(0,o.Fr)(e,{}),a=m(y),s=t.path(a,i);r=n.insert(()=>s,":first-child").attr("transform",`translate(${-C/2}, ${p/2})`),f&&r.attr("style",f)}else r=R(n,C,p,y);return a&&r.attr("style",a),e.width=C,e.height=p,g(e,r),e.intersect=function(t){return O(e,y,t)},n}async function tb(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let s=e.padding??0,l="neo"===e.look?2*s:s,{shapeSvg:n,bbox:h}=await d(t,e,u(e)),p=(e?.height??h.height)+s,C=(e?.width??h.width)+l,y=[{x:-3*p/6,y:0},{x:C,y:0},{x:C+3*p/6,y:-p},{x:0,y:-p}],{cssStyles:f}=e;if("handDrawn"===e.look){let t=c.A.svg(n),i=(0,o.Fr)(e,{}),a=m(y),s=t.path(a,i);r=n.insert(()=>s,":first-child").attr("transform",`translate(${-C/2}, ${p/2})`),f&&r.attr("style",f)}else r=R(n,C,p,y);return a&&r.attr("style",a),e.width=C,e.height=p,g(e,r),e.intersect=function(t){return O(e,y,t)},n}function tT(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.label="",e.labelStyle=r;let a=t.insert("g").attr("class",u(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,l=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),d=[{x:l,y:0},{x:0,y:h+3.5},{x:l-14,y:h+3.5},{x:0,y:2*h},{x:l,y:h-3.5},{x:14,y:h-3.5}],p=c.A.svg(a),C=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let y=m(d),f=p.path(y,C),x=a.insert(()=>f,":first-child");return x.attr("class","outer-path"),s&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(-${l/2},${-h})`),g(e,x),e.intersect=function(t){return n.Rm.info("lightningBolt intersect",e,t),O(e,d,t)},a}(0,n.K2)(td,"hexagon"),(0,n.K2)(tp,"hourglass"),(0,n.K2)(tg,"icon"),(0,n.K2)(tu,"iconCircle"),(0,n.K2)(tm,"iconRounded"),(0,n.K2)(tC,"iconSquare"),(0,n.K2)(ty,"imageSquare"),(0,n.K2)(tf,"inv_trapezoid"),(0,n.K2)(tx,"labelRect"),(0,n.K2)(tk,"lean_left"),(0,n.K2)(tb,"lean_right"),(0,n.K2)(tT,"lightningBolt");var tB=(0,n.K2)((t,e,r,i,o,a,s)=>`M${t},${e+a} a${o},${a} 0,0,0 ${r},0 a${o},${a} 0,0,0 ${-r},0 l0,${i} a${o},${a} 0,0,0 ${r},0 l0,${-i} M${t},${e+a+s} a${o},${a} 0,0,0 ${r},0`,"createCylinderPathD"),tw=(0,n.K2)((t,e,r,i,o,a,s)=>`M${t},${e+a} M${t+r},${e+a} a${o},${a} 0,0,0 ${-r},0 l0,${i} a${o},${a} 0,0,0 ${r},0 l0,${-i} M${t},${e+a+s} a${o},${a} 0,0,0 ${r},0`,"createOuterCylinderPathD"),tS=(0,n.K2)((t,e,r,i,o,a)=>`M${t-r/2},${-i/2} a${o},${a} 0,0,0 ${r},0`,"createInnerCylinderPathD");async function tA(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let l=e.padding??0,n="neo"===e.look?16:l,h="neo"===e.look?24:l;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-n,e.width<10&&(e.width=10),e.height=(e.height??0)-h-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:p,bbox:m,label:C}=await d(t,e,u(e)),y=(e?.width?e?.width:m.width)+2*n,f=y/2,k=f/(2.5+y/50),b=(e?.height?e?.height:m.height)+k+2*h,T=.1*b,{cssStyles:B}=e;if("handDrawn"===e.look){let t=c.A.svg(p),i=tw(0,0,y,b,f,k,T),a=tS(0,k,y,b,f,k),s=(0,o.Fr)(e,{}),l=t.path(i,s),n=t.path(a,s);p.insert(()=>n,":first-child").attr("class","line"),(r=p.insert(()=>l,":first-child")).attr("class","basic label-container"),B&&r.attr("style",B)}else{let t=tB(0,0,y,b,f,k,T);r=p.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(B)).attr("style",a)}return r.attr("label-offset-y",k),r.attr("transform",`translate(${-y/2}, ${-(b/2+k)})`),g(e,r),C.attr("transform",`translate(${-(m.width/2)-(m.x-(m.left??0))}, ${-(m.height/2)+k-(m.y-(m.top??0))})`),e.intersect=function(t){let r=x(e,t),i=r.x-(e.x??0);if(0!=f&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-k)){let o=k*k*(1-i*i/(f*f));o>0&&(o=Math.sqrt(o)),o=k-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},p}async function tF(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a;if(e.width||e.height){let t=e.width;e.width=(t??0)*10/11-2*s,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*l,e.height<10&&(e.height=10)}let{shapeSvg:n,bbox:h,label:p}=await d(t,e,u(e)),m=(e?.width?e?.width:h.width)+(s??0)*2,y=(e?.height?e?.height:h.height)+(l??0)*2,f="neo"===e.look?y/4:y/8,x=y+f,{cssStyles:k}=e,b=c.A.svg(n),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");let B=[{x:-m/2-m/2*.1,y:-x/2},{x:-m/2-m/2*.1,y:x/2},...C(-m/2-m/2*.1,x/2,m/2+m/2*.1,x/2,f,.8),{x:m/2+m/2*.1,y:-x/2},{x:-m/2-m/2*.1,y:-x/2},{x:-m/2,y:-x/2},{x:-m/2,y:x/2*1.1},{x:-m/2,y:-x/2}],w=b.polygon(B.map(t=>[t.x,t.y]),T),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-f/2})`),p.attr("transform",`translate(${-m/2+(e.padding??0)+m/2*.1/2-(h.x-(h.left??0))},${-y/2+(e.padding??0)-f/2-(h.y-(h.top??0))})`),g(e,S),e.intersect=function(t){return O(e,B,t)},n}async function tL(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a,n="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*s-2*n,10),e.height=Math.max((e?.height??0)-2*l-2*n,10));let{shapeSvg:h,bbox:p,label:C}=await d(t,e,u(e)),y=(e?.width?e?.width:p.width)+2*s+2*n,x=(e?.height?e?.height:p.height)+2*l+2*n,k=y-2*n,b=x-2*n,T=-k/2,B=-b/2,{cssStyles:w}=e,S=c.A.svg(h),A=(0,o.Fr)(e,{}),F=[{x:T-n,y:B+n},{x:T-n,y:B+b+n},{x:T+k-n,y:B+b+n},{x:T+k-n,y:B+b},{x:T+k,y:B+b},{x:T+k,y:B+b-n},{x:T+k+n,y:B+b-n},{x:T+k+n,y:B-n},{x:T+n,y:B-n},{x:T+n,y:B},{x:T,y:B},{x:T,y:B+n}];"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let L=m(F),v=S.path(L,A),M=m([{x:T,y:B+n},{x:T+k-n,y:B+n},{x:T+k-n,y:B+b},{x:T+k,y:B+b},{x:T+k,y:B},{x:T,y:B}]),E=S.path(M,A);"handDrawn"!==e.look&&(v=f(v),E=f(E));let _=h.insert("g",":first-child");return _.insert(()=>v),_.insert(()=>E),_.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",w),i&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),C.attr("transform",`translate(${-(p.width/2)-n-(p.x-(p.left??0))}, ${-(p.height/2)+n-(p.y-(p.top??0))})`),g(e,_),e.intersect=function(t){return O(e,F,t)},h}async function tv(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s,label:l}=await d(t,e,u(e)),n=e.padding??0,h="neo"===e.look?16:n,p="neo"===e.look?12:n,y=!0;(e.width||e.height)&&(y=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*p);let f=Math.max(s.width,e?.width??0)+2*h,x=Math.max(s.height,e?.height??0)+3*p,k="neo"===e.look?x/4:x/8,b=x+(y?k/2:-k/2),T=-f/2,B=-b/2,{cssStyles:w}=e,S=C(T-10,B+b+10,T+f-10,B+b+10,k,.8),A=S?.[S.length-1],F=[{x:T-10,y:B+10},{x:T-10,y:B+b+10},...S,{x:T+f-10,y:A.y-10},{x:T+f,y:A.y-10},{x:T+f,y:A.y-20},{x:T+f+10,y:A.y-20},{x:T+f+10,y:B-10},{x:T+10,y:B-10},{x:T+10,y:B},{x:T,y:B},{x:T,y:B+10}],L=[{x:T,y:B+10},{x:T+f-10,y:B+10},{x:T+f-10,y:A.y-10},{x:T+f,y:A.y-10},{x:T+f,y:B},{x:T,y:B}],v=c.A.svg(a),M=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let E=m(F),_=v.path(E,M),$=m(L),I=v.path($,M),D=a.insert(()=>_,":first-child");return D.insert(()=>I),D.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",w),i&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-k/2})`),l.attr("transform",`translate(${-(s.width/2)-10-(s.x-(s.left??0))}, ${-(s.height/2)+10-k/2-(s.y-(s.top??0))})`),g(e,D),e.intersect=function(t){return O(e,F,t)},a}async function tM(t,e,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i,e.useHtmlLabels||(0,l.E)((0,l.zj)())||(e.centerLabel=!0);let{shapeSvg:s,bbox:n,label:h}=await d(t,e,u(e)),p=Math.max(n.width+(e.padding??0)*2,e?.width??0),m=Math.max(n.height+(e.padding??0)*2,e?.height??0),{cssStyles:C}=e,y=c.A.svg(s),f=(0,o.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let k=y.rectangle(-p/2,-m/2,p,m,f),b=s.insert(()=>k,":first-child");return b.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),C&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",C),a&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",a),h.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),g(e,b),e.intersect=function(t){return x(e,t)},s}(0,n.K2)(tA,"linedCylinder"),(0,n.K2)(tF,"linedWaveEdgedRect"),(0,n.K2)(tL,"multiRect"),(0,n.K2)(tv,"multiWaveEdgedRectangle"),(0,n.K2)(tM,"note");var tE=(0,n.K2)((t,e,r)=>`M${t+r/2},${e} L${t+r},${e-r/2} L${t+r/2},${e-r} L${t},${e-r/2} Z`,"createDecisionBoxPathD");async function t_(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let{shapeSvg:s,bbox:l}=await d(t,e,u(e)),n=l.width+(e.padding??0)+(l.height+(e.padding??0)),h=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],{cssStyles:p}=e;if("handDrawn"===e.look){let t=c.A.svg(s),i=(0,o.Fr)(e,{}),a=tE(0,0,n),l=t.path(a,i);r=s.insert(()=>l,":first-child").attr("transform",`translate(${-n/2+.5}, ${n/2})`),p&&r.attr("style",p)}else(r=R(s,n,n,h)).attr("transform",`translate(${-n/2+.5}, ${n/2})`);return a&&r.attr("style",a),g(e,r),e.calcIntersect=function(t,e){let r=t.width,i=O(t,[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],e);return{x:i.x-.5,y:i.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},s}async function t$(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?21:a??0,l="neo"===e.look?12:a??0,{shapeSvg:n,bbox:h,label:p}=await d(t,e,u(e)),C=(e?.width??h.width)+("neo"===e.look?2*s:s),y=(e?.height??h.height)+("neo"===e.look?2*l:l),f=-C/2,x=-y/2,k=x/2,b=[{x:f+k,y:x},{x:f,y:0},{x:f+k,y:-x},{x:-f,y:-x},{x:-f,y:x}],{cssStyles:T}=e,B=c.A.svg(n),w=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let S=m(b),A=B.path(S,w),F=n.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),T&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",T),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-k/2},0)`),p.attr("transform",`translate(${-k/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),g(e,F),e.intersect=function(t){return O(e,b,t)},n}async function tO(t,e){let r,i,a,{labelStyles:s,nodeStyles:d}=(0,o.GX)(e);e.labelStyle=s,r=e.cssClasses?"node "+e.cssClasses:"node default";let p=t.insert("g").attr("class",r).attr("id",e.domId||e.id),u=p.insert("g"),m=p.insert("g").attr("class","label").attr("style",d),C=e.description,y=e.label,f=await k(m,y,e.labelStyle,!0,!0),T={width:0,height:0};if((0,l.E)((0,l.D7)())){let t=f.children[0],e=(0,h.Ltv)(f);T=t.getBoundingClientRect(),e.attr("width",T.width),e.attr("height",T.height)}n.Rm.info("Text 2",C);let B=C||[],w=f.getBBox(),S=await k(m,Array.isArray(B)?B.join("
"):B,e.labelStyle,!0,!0),A=S.children[0],F=(0,h.Ltv)(S);T=A.getBoundingClientRect(),F.attr("width",T.width),F.attr("height",T.height);let L=(e.padding||0)/2;(0,h.Ltv)(S).attr("transform","translate( "+(T.width>w.width?0:(w.width-T.width)/2)+", "+(w.height+L+5)+")"),(0,h.Ltv)(f).attr("transform","translate( "+(T.width(n.Rm.debug("Rough node insert CXC",s),l),":first-child"),i=p.insert(()=>(n.Rm.debug("Rough node insert CXC",s),s),":first-child")}else i=u.insert("rect",":first-child"),a=u.insert("line"),i.attr("class","outer title-state").attr("style",d).attr("x",-T.width/2-L).attr("y",-T.height/2-L).attr("width",T.width+(e.padding||0)).attr("height",T.height+(e.padding||0)),a.attr("class","divider").attr("x1",-T.width/2-L).attr("x2",T.width/2+L).attr("y1",-T.height/2-L+w.height+L).attr("y2",-T.height/2-L+w.height+L);return g(e,i),e.intersect=function(t){return x(e,t)},p}async function tI(t,e,{config:{themeVariables:r}}){let i=r?.radius??5,o={rx:i,ry:i,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return tr(t,e,o)}async function tD(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a="neo"===e.look?16:e.padding??0,l="neo"===e.look?12:e.padding??0,{shapeSvg:n,bbox:h,label:p}=await d(t,e,u(e)),m=(e?.width??h.width)+2*a+("neo"===e.look?8:16),C=(e?.height??h.height)+2*l,y=m-8,f=8-m/2,k=-C/2,{cssStyles:b}=e,T=c.A.svg(n),B=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let w=T.polygon([{x:f,y:k},{x:f+y,y:k},{x:f+y,y:k+C},{x:f-8,y:k+C},{x:f-8,y:k},{x:f,y:k},{x:f,y:k+C}].map(t=>[t.x,t.y]),B),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path").attr("style",(0,s.KL)(b)),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),b&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),p.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),g(e,S),e.intersect=function(t){return x(e,t)},n}async function tq(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*s,10),e.height=Math.max((e?.height??0)/1.5-2*l,10));let{shapeSvg:n,bbox:h,label:p}=await d(t,e,u(e)),C=(e?.width?e?.width:h.width)+2*s,y=((e?.height?e?.height:h.height)+2*l)*1.5/1.5,f=-C/2,x=-y/2,{cssStyles:k}=e,b=c.A.svg(n),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");let B=[{x:f,y:x},{x:f,y:x+y},{x:f+C,y:x+y},{x:f+C,y:x-y/2}],w=m(B),S=b.path(w,T),A=n.insert(()=>S,":first-child");return A.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",k),i&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",i),A.attr("transform",`translate(0, ${y/4})`),p.attr("transform",`translate(${-C/2+(e.padding??0)-(h.x-(h.left??0))}, ${-y/4+(e.padding??0)-(h.y-(h.top??0))})`),g(e,A),e.intersect=function(t){return O(e,B,t)},n}async function tK(t,e){let r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??i,labelPaddingY:o};return tr(t,e,a)}async function tR(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?20:a,l="neo"===e.look?12:a,{shapeSvg:n,bbox:h}=await d(t,e,u(e)),p=h.height+("neo"===e.look?2*l:l),C=h.width+p/4+("neo"===e.look?2*s:s),f=p/2,{cssStyles:x}=e,k=c.A.svg(n),b=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let T=[{x:-C/2+f,y:-p/2},{x:C/2-f,y:-p/2},...y(-C/2+f,0,f,50,90,270),{x:C/2-f,y:p/2},...y(C/2-f,0,f,50,270,450)],B=m(T),w=k.path(B,b),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",i),g(e,S),e.intersect=function(t){return O(e,T,t)},n}async function tz(t,e){let r={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return tr(t,e,r)}function tP(t,e,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let{cssStyles:s}=e,{lineColor:l,stateBorder:n,nodeBorder:h,nodeShadow:d}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let p=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),u=c.A.svg(p),m=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let C=u.circle(0,0,e.width,{...m,stroke:l,strokeWidth:2}),y=n??h,f=(e.width??0)*5/14,x=u.circle(0,0,f,{...m,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),k=p.insert(()=>C,":first-child");if(k.insert(()=>x),"handDrawn"!==e.look&&k.attr("class","outer-path"),s&&k.selectAll("path").attr("style",s),a&&k.selectAll("path").attr("style",a),e.width<25&&d&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";k.attr("style",`filter:url(#${r})`)}return g(e,k),e.intersect=function(t){return E(e,(e.width??0)/2,t)},p}function tW(t,e,{config:{themeVariables:r}}){let i,{lineColor:a,nodeShadow:s}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let l=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=c.A.svg(l).circle(0,0,e.width,(0,o.ue)(a));(i=l.insert(()=>t)).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(i=l.insert("circle",":first-child")).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&s&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";i.attr("style",`filter:url(#${r})`)}return g(e,i),e.intersect=function(t){return E(e,(e.width??7)/2,t)},l}async function tN(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e?.padding??8,l="neo"===e.look?28:a,n="neo"===e.look?12:a,{shapeSvg:h,bbox:p}=await d(t,e,u(e)),m=(e?.width??p.width)+16+l,C=(e?.height??p.height)+n,y=m-16,f=-m/2,x=-C/2,k=[{x:0,y:0},{x:y,y:0},{x:y,y:-C},{x:0,y:-C},{x:0,y:0},{x:-8,y:0},{x:y+8,y:0},{x:y+8,y:-C},{x:-8,y:-C},{x:-8,y:0}];if("handDrawn"===e.look){let t=c.A.svg(h),r=(0,o.Fr)(e,{}),i=t.rectangle(f,x,y+16,C,r),a=t.line(f+8,x,f+8,x+C,r),l=t.line(f+8+y,x,f+8+y,x+C,r);h.insert(()=>a,":first-child"),h.insert(()=>l,":first-child");let n=h.insert(()=>i,":first-child"),{cssStyles:d}=e;n.attr("class","basic label-container").attr("style",(0,s.KL)(d)),g(e,n)}else{let t=R(h,y,C,k);i&&t.attr("style",i),g(e,t)}return e.intersect=function(t){return O(e,k,t)},h}async function tj(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*l,10),e.width=Math.max((e?.width??0)-2*s-.2*(e.height+2*l),10));let{shapeSvg:n,bbox:h}=await d(t,e,u(e)),p=(e?.height?e?.height:h.height)+2*l,C=.2*p,y=(e?.width?e?.width:h.width)+2*s+C-C,f=-y/2,x=-p/2,{cssStyles:k}=e,b=c.A.svg(n),T=(0,o.Fr)(e,{}),B=[{x:f-C/2,y:x},{x:f+y+C/2,y:x},{x:f+y+C/2,y:x+p},{x:f-C/2,y:x+p}];"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");let w=m(B),S=b.path(w,T),A=m([{x:f+y-C/2,y:x+p},{x:f+y+C/2,y:x+p},{x:f+y+C/2,y:x+p-.2*p}]),F=b.path(A,{...T,fillStyle:"solid"}),L=n.insert(()=>F,":first-child");return L.insert(()=>S,":first-child"),L.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",i),g(e,L),e.intersect=function(t){return O(e,B,t)},n}async function tH(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s,label:l}=await d(t,e,u(e)),n=Math.max(s.width+(e.padding??0)*2,e?.width??0),h=Math.max(s.height+(e.padding??0)*2,e?.height??0),p=h/8,y=.2*n,f=.2*h,x=h+p,{cssStyles:k}=e,b=c.A.svg(a),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");let B=[{x:-n/2-n/2*.1,y:x/2},...C(-n/2-n/2*.1,x/2,n/2+n/2*.1,x/2,p,.8),{x:n/2+n/2*.1,y:-x/2},{x:-n/2-n/2*.1,y:-x/2}],w=-n/2+n/2*.1,S=-x/2-.4*f,A=[{x:w+n-y,y:(S+h)*1.3},{x:w+n,y:S+h-f},{x:w+n,y:(S+h)*.9},...C(w+n,(S+h)*1.25,w+n-y,(S+h)*1.3,-(.02*h),.5)],F=m(B),L=b.path(F,T),v=m(A),M=b.path(v,{...T,fillStyle:"solid"}),E=a.insert(()=>M,":first-child");return E.insert(()=>L,":first-child"),E.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-p/2})`),l.attr("transform",`translate(${-n/2+(e.padding??0)-(s.x-(s.left??0))},${-h/2+(e.padding??0)-p/2-(s.y-(s.top??0))})`),g(e,E),e.intersect=function(t){return O(e,B,t)},a}async function tU(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s}=await d(t,e,u(e)),l=Math.max(s.width+(e.padding??0),e?.width||0),n=Math.max(s.height+(e.padding??0),e?.height||0),h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",-l/2).attr("y",-n/2).attr("width",l).attr("height",n),g(e,h),e.intersect=function(t){return x(e,t)},a}(0,n.K2)(t_,"question"),(0,n.K2)(t$,"rect_left_inv_arrow"),(0,n.K2)(tO,"rectWithTitle"),(0,n.K2)(tI,"roundedRect"),(0,n.K2)(tD,"shadedProcess"),(0,n.K2)(tq,"slopedRect"),(0,n.K2)(tK,"squareRect"),(0,n.K2)(tR,"stadium"),(0,n.K2)(tz,"state"),(0,n.K2)(tP,"stateEnd"),(0,n.K2)(tW,"stateStart"),(0,n.K2)(tN,"subroutine"),(0,n.K2)(tj,"taggedRect"),(0,n.K2)(tH,"taggedWaveEdgedRectangle"),(0,n.K2)(tU,"text");var tX=(0,n.K2)((t,e,r,i,o,a)=>`M${t},${e} a${o},${a} 0,0,1 0,${-i} l${r},0 a${o},${a} 0,0,1 0,${i} M${r},${-i} a${o},${a} 0,0,0 0,${i} l${-r},0`,"createCylinderPathD"),tG=(0,n.K2)((t,e,r,i,o,a)=>`M${t},${e} M${t+r},${e} a${o},${a} 0,0,0 0,${-i} l${-r},0 a${o},${a} 0,0,0 0,${i} l${r},0`,"createOuterCylinderPathD"),tY=(0,n.K2)((t,e,r,i,o,a)=>`M${t+r/2},${-i/2} a${o},${a} 0,0,0 0,${i}`,"createInnerCylinderPathD");async function tV(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let l=e.padding??0,n="neo"===e.look?12:l/2;if(e.width||e.height){let t=e.height??0;e.height=(e.height??0)-n,e.height<5&&(e.height=5),e.width=(e.width??0)-n-t/2/(2.5+t/50)*3,e.width<10&&(e.width=10)}let{shapeSvg:h,bbox:p,label:m}=await d(t,e,u(e)),C=(e.height?e.height:p.height)+n,y=C/2,f=y/(2.5+C/50),k=(e.width?e.width:p.width)+f+n,{cssStyles:b}=e;if("handDrawn"===e.look){let t=c.A.svg(h),i=tG(0,0,k,C,f,y),a=tY(0,0,k,C,f,y),s=t.path(i,(0,o.Fr)(e,{})),l=t.path(a,(0,o.Fr)(e,{fill:"none"}));r=h.insert(()=>l,":first-child"),(r=h.insert(()=>s,":first-child")).attr("class","basic label-container"),b&&r.attr("style",b)}else{let t=tX(0,0,k,C,f,y);(r=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)(b)).attr("style",a)).attr("class","basic label-container outer-path"),b&&r.selectAll("path").attr("style",b),a&&r.selectAll("path").attr("style",a)}return r.attr("label-offset-x",f),r.attr("transform",`translate(${-k/2}, ${C/2} )`),m.attr("transform",`translate(${-(p.width/2)-f-(p.x-(p.left??0))}, ${-(p.height/2)-(p.y-(p.top??0))})`),g(e,r),e.intersect=function(t){let r=x(e,t),i=r.y-(e.y??0);if(0!=y&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-f)){let o=f*f*(1-i*i/(y*y));0!=o&&(o=Math.sqrt(Math.abs(o))),o=f-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},h}async function tZ(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let s=e.padding??0,l=(e.look,s),n="neo"===e.look?2*s:s,{shapeSvg:h,bbox:p}=await d(t,e,u(e)),C=(e?.height??p.height)+l,y=(e?.width??p.width)+n,f=[{x:-3*C/6,y:0},{x:y+3*C/6,y:0},{x:y,y:-C},{x:0,y:-C}],{cssStyles:x}=e;if("handDrawn"===e.look){let t=c.A.svg(h),i=(0,o.Fr)(e,{}),a=m(f),s=t.path(a,i);r=h.insert(()=>s,":first-child").attr("transform",`translate(${-y/2}, ${C/2})`),x&&r.attr("style",x)}else r=R(h,y,C,f);return a&&r.attr("style",a),e.width=y,e.height=C,g(e,r),e.intersect=function(t){return O(e,f,t)},h}async function tQ(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a;(e.width||e.height)&&(e.height=(e.height??0)-2*l,e.height<5&&(e.height=5),e.width=(e.width??0)-2*s,e.width<15&&(e.width=15));let{shapeSvg:n,bbox:h}=await d(t,e,u(e)),p=(e?.width?e?.width:h.width)+2*s,C=(e?.height?e?.height:h.height)+2*l,{cssStyles:y}=e,f=c.A.svg(n),x=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let k=[{x:-p/2*.8,y:-C/2},{x:p/2*.8,y:-C/2},{x:p/2,y:-C/2*.6},{x:p/2,y:C/2},{x:-p/2,y:C/2},{x:-p/2,y:-C/2*.6}],b=m(k),T=f.path(b,x),B=n.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",y),i&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",i),g(e,B),e.intersect=function(t){return O(e,k,t)},n}async function tJ(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?2*a:a;(e.width||e.height)&&(e.width=((e?.width??0)-s)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));let{shapeSvg:h,bbox:p,label:C}=await d(t,e,u(e)),y=(0,l._3)((0,l.D7)().flowchart?.htmlLabels),f=(e?.width?e?.width:p.width)+s,x=e?.height?e?.height:f+p.height,k=[{x:0,y:0},{x:x,y:0},{x:x/2,y:-x}],{cssStyles:b}=e,T=c.A.svg(h),B=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let w=m(k),S=T.path(w,B),A=h.insert(()=>S,":first-child").attr("transform",`translate(${-x/2}, ${x/2})`).attr("class","outer-path");return b&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",b),i&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",i),e.width=f,e.height=x,g(e,A),C.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))}, ${x/2-(p.height+(e.padding??0)/(y?2:1)-(p.y-(p.top??0)))})`),e.intersect=function(t){return n.Rm.info("Triangle intersect",e,k,t),O(e,k,t)},h}async function t0(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a,n=!0;(e.width||e.height)&&(n=!1,e.width=(e?.width??0)-2*s,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*l,e.height<10&&(e.height=10));let{shapeSvg:h,bbox:p,label:y}=await d(t,e,u(e)),f=(e?.width?e?.width:p.width)+(s??0)*2,x=(e?.height?e?.height:p.height)+(l??0)*2,k="neo"===e.look?x/4:x/8,b=x+(n?k:-k),{cssStyles:T}=e,B=14-f,w=B>0?B/2:0,S=c.A.svg(h),A=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let F=[{x:-f/2-w,y:b/2},...C(-f/2-w,b/2,f/2+w,b/2,k,.8),{x:f/2+w,y:-b/2},{x:-f/2-w,y:-b/2}],L=m(F),v=S.path(L,A),M=h.insert(()=>v,":first-child");return M.attr("class","basic label-container outer-path"),T&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",T),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-k/2})`),y.attr("transform",`translate(${-f/2+(e.padding??0)-(p.x-(p.left??0))},${-x/2+(e.padding??0)-k-(p.y-(p.top??0))})`),g(e,M),e.intersect=function(t){return O(e,F,t)},h}async function t2(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?20:a;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);let t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-l-20/9*t),e.width=e.width-2*s}let{shapeSvg:n,bbox:h}=await d(t,e,u(e)),p=(e?.width?e?.width:h.width)+2*s,y=(e?.height?e?.height:h.height)+l,f=y/8,x=y+2*f,{cssStyles:k}=e,b=c.A.svg(n),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");let B=[{x:-p/2,y:x/2},...C(-p/2,x/2,p/2,x/2,f,1),{x:p/2,y:-x/2},...C(p/2,-x/2,-p/2,-x/2,f,-1)],w=m(B),S=b.path(w,T),A=n.insert(()=>S,":first-child");return A.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),g(e,A),e.intersect=function(t){return O(e,B,t)},n}async function t1(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-10,10),e.height=Math.max((e?.height??0)-2*s-10,10));let{shapeSvg:l,bbox:n,label:h}=await d(t,e,u(e)),p=(e?.width?e?.width:n.width)+2*a+10,m=(e?.height?e?.height:n.height)+2*s+10,C=p-10,y=m-10,f=-C/2,x=-y/2,{cssStyles:k}=e,b=c.A.svg(l),T=(0,o.Fr)(e,{}),B=[{x:f-10,y:x-10},{x:f-10,y:x+y},{x:f+C,y:x+y},{x:f+C,y:x-10}],w=`M${f-10},${x-10} L${f+C},${x-10} L${f+C},${x+y} L${f-10},${x+y} L${f-10},${x-10} M${f-10},${x} L${f+C},${x} M${f},${x-10} L${f},${x+y}`;"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");let S=b.path(w,T),A=l.insert(()=>S,":first-child");return A.attr("transform","translate(5, 5)"),A.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(n.width/2)+5-(n.x-(n.left??0))}, ${-(n.height/2)+5-(n.y-(n.top??0))})`),g(e,A),e.intersect=function(t){return O(e,B,t)},l}(0,n.K2)(tV,"tiltedCylinder"),(0,n.K2)(tZ,"trapezoid"),(0,n.K2)(tQ,"trapezoidalPentagon"),(0,n.K2)(tJ,"triangle"),(0,n.K2)(t0,"waveEdgedRectangle"),(0,n.K2)(t2,"waveRectangle"),(0,n.K2)(t1,"windowPane");var t5=new Set(["redux-color","redux-dark-color"]),t3=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function t4(t,e){e.alias&&(e.label=e.alias);let{theme:r,themeVariables:i}=(0,l.zj)(),{rowEven:a,rowOdd:n,nodeBorder:d,borderColorArray:p}=i;if("handDrawn"===e.look){let{themeVariables:r}=(0,l.zj)(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await t4(t,o)}let m=(0,l.zj)();e.useHtmlLabels=m.htmlLabels;let C=m.er?.diagramPadding??10,y=m.er?.entityPadding??6,{cssStyles:f}=e,{labelStyles:k,nodeStyles:b}=(0,o.GX)(e);if(0===e.attributes.length&&e.label){let i={rx:0,ry:0,labelPaddingX:C,labelPaddingY:1.5*C,classes:""};(0,s.Un)(e.label,m)+2*i.labelPaddingX0){let t=w.width+2*C-(L+v+M+E);L+=t/O,v+=t/O,M>0&&(M+=t/O),E>0&&(E+=t/O)}let D=L+v+M+E,q=c.A.svg(B),K=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(K.roughness=0,K.fillStyle="solid");let R=0;F.length>0&&(R=F.reduce((t,e)=>t+(e?.rowHeight??0),0));let z=Math.max(I.width+2*C,e?.width||0,D),P=Math.max((R??0)+w.height,e?.height||0),W=-z/2,N=-P/2;if(B.selectAll("g:not(:first-child)").each((t,e,r)=>{let i=(0,h.Ltv)(r[e]),o=i.attr("transform"),a=0,s=0;if(o){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?a+=L:i.attr("class").includes("attribute-keys")?a+=L+v:i.attr("class").includes("attribute-comment")&&(a+=L+v+M))}i.attr("transform",`translate(${W+C/2+a}, ${s+N+w.height+y/2})`)}),B.select(".name").attr("transform","translate("+-w.width/2+", "+(N+y/2)+")"),null!=r&&t5.has(r)){let t=e.colorIndex??0;B.attr("data-color-id",`color-${t%p.length}`)}let j=q.rectangle(W,N,z,P,K),H=B.insert(()=>j,":first-child").attr("class","outer-path").attr("style",f.join(""));for(let[t,e]of(A.push(0),F.entries())){let r=(t+1)%2==0&&0!==e.yOffset,i=q.rectangle(W,w.height+N+e?.yOffset,z,e?.rowHeight,{...K,fill:r?a:n,stroke:d});B.insert(()=>i,"g.label").attr("style",f.join("")).attr("class",`row-rect-${r?"even":"odd"}`)}let U=t8(W,w.height+N,z+W,w.height+N,1e-4),X=q.polygon(U.map(t=>[t.x,t.y]),K);if(B.insert(()=>X).attr("class","divider"),U=t8(L+W,w.height+N,L+W,P+N,1e-4),X=q.polygon(U.map(t=>[t.x,t.y]),K),B.insert(()=>X).attr("class","divider"),_){let t=L+v+W;U=t8(t,w.height+N,t,P+N,1e-4),X=q.polygon(U.map(t=>[t.x,t.y]),K),B.insert(()=>X).attr("class","divider")}if($){let t=L+v+M+W;U=t8(t,w.height+N,t,P+N,1e-4),X=q.polygon(U.map(t=>[t.x,t.y]),K),B.insert(()=>X).attr("class","divider")}for(let t of A){let e=w.height+N+t;U=t8(W,e,z+W,e,1e-4),X=q.polygon(U.map(t=>[t.x,t.y]),K),B.insert(()=>X).attr("class","divider")}if(g(e,H),b&&"handDrawn"!==e.look)if(null!=r&&t3.has(r))B.selectAll("path").attr("style",b);else{let t=b.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");B.selectAll("path").attr("style",e??""),B.selectAll(".row-rect-even path").attr("style",b)}return e.intersect=function(t){return x(e,t)},B}async function t6(t,e,r,i=0,o=0,n=[],c=""){let d=t.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",c);e!==(0,l.QO)(e)&&(e=(e=(0,l.QO)(e)).replaceAll("<","<").replaceAll(">",">"));let p=d.node().appendChild(await (0,a.GZ)(d,e,{width:(0,s.Un)(e,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=p.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let g=p.getBBox();if((0,l._3)(r.htmlLabels)){let t=p.children[0];t.style.textAlign="start";let e=(0,h.Ltv)(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}return g}function t8(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function t7(t,e,r,i,o=r.class.padding??12){let a=3*!i,s=t.insert("g").attr("class",u(e)).attr("id",e.domId||e.id),l=null,n=null,h=null,c=null,d=0,p=0,g=0;if(l=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await t9(l,{text:`\xab${t}\xbb`},0),d=l.node().getBBox().height}n=s.insert("g").attr("class","label-group text"),await t9(n,e,0,["font-weight: bolder"]);let m=n.node().getBBox();p=m.height,h=s.insert("g").attr("class","members-group text");let C=0;for(let t of e.members){let e=await t9(h,t,C,[t.parseClassifier()]);C+=e+a}(g=h.node().getBBox().height)<=0&&(g=o/2),c=s.insert("g").attr("class","methods-group text");let y=0;for(let t of e.methods){let e=await t9(c,t,y,[t.parseClassifier()]);y+=e+a}let f=s.node().getBBox();if(null!==l){let t=l.node().getBBox();l.attr("transform",`translate(${-t.width/2})`)}return n.attr("transform",`translate(${-m.width/2}, ${d})`),f=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+2*o})`),f=s.node().getBBox(),c.attr("transform",`translate(0, ${d+p+(g?g+4*o:2*o)})`),f=s.node().getBBox(),{shapeSvg:s,bbox:f}}async function t9(t,e,r,i=[]){let o,c=t.insert("g").attr("class","label").attr("style",i.join("; ")),d=(0,l.zj)(),p="useHtmlLabels"in e?e.useHtmlLabels:(0,l._3)(d.htmlLabels)??!0,g="";g="text"in e?e.text:e.label,!p&&g.startsWith("\\")&&(g=g.substring(1)),(0,l.Wi)(g)&&(p=!0);let u=await (0,a.GZ)(c,(0,l.oB)((0,s.Sm)(g)),{width:(0,s.Un)(g,d)+50,classes:"markdown-node-label",useHtmlLabels:p},d),m=1;if(p){let t=u.children[0],e=(0,h.Ltv)(u);m=t.innerHTML.split("
").length,t.innerHTML.includes("")&&(m+=t.innerHTML.split("").length-1);let r=t.getElementsByTagName("img");if(r){let t=""===g.replace(/]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(d.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";r(e)}(0,n.K2)(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}else{i.includes("font-weight: bolder")&&(0,h.Ltv)(u).selectAll("tspan").attr("font-weight",""),m=u.children.length;let t=u.children[0];(""===u.textContent||u.textContent.includes(">"))&&(t.textContent=g[0]+g.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===g[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),o=u.getBBox()}return c.attr("transform","translate(0,"+(-o.height/(2*m)+r)+")"),o.height}async function et(t,e){let r=(0,l.D7)(),{themeVariables:i}=r,{useGradient:a}=i,s=r.class.padding??12,n=e.useHtmlLabels??(0,l._3)(r.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:d,bbox:p}=await t7(t,e,r,n,s),{labelStyles:u,nodeStyles:m}=(0,o.GX)(e);e.labelStyle=u,e.cssStyles=e.styles||"";let C=e.styles?.join(";")||m||"";e.cssStyles||(e.cssStyles=C.replaceAll("!important","").split(";"));let y=0===e.members.length&&0===e.methods.length&&!r.class?.hideEmptyMembersBox,f=c.A.svg(d),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let b=Math.max(e.width??0,p.width),T=Math.max(e.height??0,p.height),B=(e.height??0)>p.height;0===e.members.length&&0===e.methods.length?T+=s:e.members.length>0&&0===e.methods.length&&(T+=2*s);let w=-b/2,S=-T/2,A=y?2*s:0===e.members.length&&0===e.methods.length?-s:0;B&&(A=2*s);let F=f.rectangle(w-s,S-s-(y?s:0===e.members.length&&0===e.methods.length?-s/2:0),b+2*s,T+2*s+A,k),L=d.insert(()=>F,":first-child");L.attr("class","basic label-container outer-path");let v=L.node().getBBox(),M=d.select(".annotation-group").node().getBBox().height-(y?s/2:0)||0,E=d.select(".label-group").node().getBBox().height-(y?s/2:0)||0,_=d.select(".members-group").node().getBBox().height-(y?s/2:0)||0,$=(M+E+S+s-(S-s-(y?s:0===e.members.length&&0===e.methods.length?-s/2:0)))/2;if(d.selectAll(".text").each((t,i,o)=>{let a=(0,h.Ltv)(o[i]),l=a.attr("transform"),c=0;if(l){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(l);t&&(c=parseFloat(t[2]))}let p=c+S+s-(y?s:0===e.members.length&&0===e.methods.length?-s/2:0);if(a.attr("class").includes("methods-group")){let t=Math.max(_,s/2);p=B?Math.max($,M+E+t+S+2*s+s)+2*s:M+E+t+S+4*s+s}0===e.members.length&&0===e.methods.length&&r.class?.hideEmptyMembersBox&&(p=e.annotations.length>0?c-s:c),n||(p-=4);let g=w;(a.attr("class").includes("label-group")||a.attr("class").includes("annotation-group"))&&(g=-a.node()?.getBBox().width/2||0,d.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(g=0)})),a.attr("transform",`translate(${g}, ${p})`)}),e.members.length>0||e.methods.length>0||y){let t=M+E+S+s,r=f.line(v.x,t,v.x+v.width,t+.001,k);d.insert(()=>r).attr("class",`divider${"neo"===e.look&&!a?" neo-line":""}`).attr("style",C)}if(y||e.members.length>0||e.methods.length>0){let t=M+E+_+S+2*s+s,r=f.line(v.x,B?Math.max($,t):t,v.x+v.width,(B?Math.max($,t):t)+.001,k);d.insert(()=>r).attr("class",`divider${"neo"===e.look&&!a?" neo-line":""}`).attr("style",C)}if("handDrawn"!==e.look&&d.selectAll("path").attr("style",C),L.select(":nth-child(2)").attr("style",C),d.selectAll(".divider").select("path").attr("style",C),e.labelStyle?d.selectAll("span").attr("style",e.labelStyle):d.selectAll("span").attr("style",C),!n){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(C);if(e){let t=e[0].replace("color","fill");d.selectAll("tspan").attr("style",t)}else if(u){let e=t.exec(u);if(e){let t=e[0].replace("color","fill");d.selectAll("tspan").attr("style",t)}}}return g(e,L),e.intersect=function(t){return x(e,t)},d}async function ee(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let s="verifyMethod"in e,n=u(e),{themeVariables:d}=(0,l.D7)(),{borderColorArray:p,requirementEdgeLabelBackground:m}=d,C=t.insert("g").attr("class",n).attr("id",e.domId??e.id),y=r=s?await er(C,`<<${e.type}>>`,0,e.labelStyle):await er(C,"<<Element>>",0,e.labelStyle),f=await er(C,e.name,y,e.labelStyle+"; font-weight: bold;");if(y+=f+20,s){let t=await er(C,`${e.requirementId?`ID: ${e.requirementId}`:""}`,y,e.labelStyle);y+=t;let r=await er(C,`${e.text?`Text: ${e.text}`:""}`,y,e.labelStyle);y+=r;let i=await er(C,`${e.risk?`Risk: ${e.risk}`:""}`,y,e.labelStyle);y+=i,await er(C,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,y,e.labelStyle)}else{let t=await er(C,`${e.type?`Type: ${e.type}`:""}`,y,e.labelStyle);y+=t,await er(C,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,y,e.labelStyle)}let k=(C.node()?.getBBox().width??200)+20,b=(C.node()?.getBBox().height??200)+20,T=-k/2,B=-b/2,w=c.A.svg(C),S=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let A=w.rectangle(T,B,k,b,S),F=C.insert(()=>A,":first-child");if(F.attr("class","basic label-container outer-path").attr("style",a),p?.length){let t=e.colorIndex??0;C.attr("data-color-id",`color-${t%p.length}`)}if(C.selectAll(".label").each((t,e,r)=>{let i=(0,h.Ltv)(r[e]),o=i.attr("transform"),a=0,s=0;if(o){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]))}let l=s-b/2,n=T+10;(0===e||1===e)&&(n=a),i.attr("transform",`translate(${n}, ${l+20})`)}),y>r+f+20){let t,i=B+r+f+20;if("neo"===e.look){let e=[[T,i],[T+k,i],[T+k,i+.001],[T,i+.001]];t=w.polygon(e,S)}else t=w.line(T,i,T+k,i,S);C.insert(()=>t).attr("class","divider")}return g(e,F),e.intersect=function(t){return x(e,t)},a&&"handDrawn"!==e.look&&(m||p?.length)&&C.selectAll("path").attr("style",a),C}async function er(t,e,r,i=""){let o;if(""===e)return 0;let n=t.insert("g").attr("class","label").attr("style",i),c=(0,l.D7)(),d=c.htmlLabels??!0,p=await (0,a.GZ)(n,(0,l.oB)((0,s.Sm)(e)),{width:(0,s.Un)(e,c)+50,classes:"markdown-node-label",useHtmlLabels:d,style:i},c);if(d){let t=p.children[0],e=(0,h.Ltv)(p);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}else{for(let t of p.children[0].children)i&&t.setAttribute("style",i);o=p.getBBox(),o.height+=6}return n.attr("transform",`translate(${-o.width/2},${-o.height/2+r})`),o.height}(0,n.K2)(t4,"erBox"),(0,n.K2)(t6,"addText"),(0,n.K2)(t8,"lineToPolygon"),(0,n.K2)(t7,"textHelper"),(0,n.K2)(t9,"addText"),(0,n.K2)(et,"classBox"),(0,n.K2)(ee,"requirementBox"),(0,n.K2)(er,"addText");var ei=(0,n.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function eo(t,e,{config:r}){let i,a,s,l,{labelStyles:n,nodeStyles:h}=(0,o.GX)(e);e.labelStyle=n||"";let m=e.width;e.width=(e.width??200)-10;let{shapeSvg:C,bbox:y,label:f}=await d(t,e,u(e)),k=e.padding||10,T="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(T=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),i=C.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",T).attr("target","_blank"));let B={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};i?{label:a,bbox:s}=await p(i,"ticket"in e&&e.ticket||"",B):{label:a,bbox:s}=await p(C,"ticket"in e&&e.ticket||"",B);let{label:w,bbox:S}=await p(C,"assigned"in e&&e.assigned||"",B);e.width=m;let A=e?.width||0,F=Math.max(s.height,S.height)/2,L=Math.max(y.height+20,e?.height||0)+F,v=-A/2,M=-L/2;f.attr("transform","translate("+(k-A/2)+", "+(-F-y.height/2)+")"),a.attr("transform","translate("+(k-A/2)+", "+(-F+y.height/2)+")"),w.attr("transform","translate("+(k+A/2-S.width-20)+", "+(-F+y.height/2)+")");let{rx:E,ry:_}=e,{cssStyles:$}=e;if("handDrawn"===e.look){let t=c.A.svg(C),r=(0,o.Fr)(e,{}),i=E||_?t.path(b(v,M,A,L,E||0),r):t.rectangle(v,M,A,L,r);(l=C.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",$||null)}else{(l=C.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",h).attr("rx",E??5).attr("ry",_??5).attr("x",v).attr("y",M).attr("width",A).attr("height",L);let t="priority"in e&&e.priority;if(t){let e=C.append("line"),r=v+2,i=M+Math.floor((E??0)/2),o=M+L-Math.floor((E??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",ei(t))}}return g(e,l),e.height=L,e.intersect=function(t){return x(e,t)},C}async function ea(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let{shapeSvg:l,bbox:h,halfPadding:p,label:m}=await d(t,e,u(e)),C=h.width+10*p,y=h.height+8*p,f=.15*C,{cssStyles:k}=e,b=h.width+20,T=h.height+20,B=Math.max(C,b),w=Math.max(y,T);m.attr("transform",`translate(${-h.width/2}, ${-h.height/2})`);let S=`M0 0 a${f},${f} 1 0,0 ${.25*B},${-1*w*.1} a${f},${f} 1 0,0 ${.25*B},0 a${f},${f} 1 0,0 ${.25*B},0 a${f},${f} 1 0,0 ${.25*B},${.1*w} a${f},${f} 1 0,0 ${.15*B},${.33*w} a${.8*f},${.8*f} 1 0,0 0,${.34*w} a${f},${f} 1 0,0 ${-1*B*.15},${.33*w} a${f},${f} 1 0,0 ${-1*B*.25},${.15*w} a${f},${f} 1 0,0 ${-1*B*.25},0 a${f},${f} 1 0,0 ${-1*B*.25},0 a${f},${f} 1 0,0 ${-1*B*.25},${-1*w*.15} a${f},${f} 1 0,0 ${-1*B*.1},${-1*w*.33} a${.8*f},${.8*f} 1 0,0 0,${-1*w*.34} a${f},${f} 1 0,0 ${.1*B},${-1*w*.33} H0 V0 Z`;if("handDrawn"===e.look){let t=c.A.svg(l),i=(0,o.Fr)(e,{}),a=t.path(S,i);(r=l.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(k))}else r=l.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",S);return r.attr("transform",`translate(${-B/2}, ${-w/2})`),g(e,r),e.calcIntersect=function(t,e){return x(t,e)},e.intersect=function(t){return n.Rm.info("Bang intersect",e,t),x(e,t)},l}async function es(t,e){let r,{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;let{shapeSvg:l,bbox:h,halfPadding:p,label:m}=await d(t,e,u(e)),C=h.width+2*p,y=h.height+2*p,f=.15*C,k=.25*C,b=.35*C,T=.2*C,{cssStyles:B}=e,w=`M0 0 a${f},${f} 0 0,1 ${.25*C},${-1*C*.1} a${b},${b} 1 0,1 ${.4*C},${-1*C*.1} a${k},${k} 1 0,1 ${.35*C},${.2*C} a${f},${f} 1 0,1 ${.15*C},${.35*y} a${T},${T} 1 0,1 ${-1*C*.15},${.65*y} a${k},${f} 1 0,1 ${-1*C*.25},${.15*C} a${b},${b} 1 0,1 ${-1*C*.5},0 a${f},${f} 1 0,1 ${-1*C*.25},${-1*C*.15} a${f},${f} 1 0,1 ${-1*C*.1},${-1*y*.35} a${T},${T} 1 0,1 ${.1*C},${-1*y*.65} H0 V0 Z`;if("handDrawn"===e.look){let t=c.A.svg(l),i=(0,o.Fr)(e,{}),a=t.path(w,i);(r=l.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(B))}else r=l.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",w);return m.attr("transform",`translate(${-h.width/2}, ${-h.height/2})`),r.attr("transform",`translate(${-C/2}, ${-y/2})`),g(e,r),e.calcIntersect=function(t,e){return x(t,e)},e.intersect=function(t){return n.Rm.info("Cloud intersect",e,t),x(e,t)},l}async function el(t,e){let{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s,halfPadding:l,label:n}=await d(t,e,u(e)),h=s.width+8*l,c=s.height+2*l,p="neo"===e.look?` M${-h/2} ${c/2-5} v${-c+10} q0,-5 5,-5 h${h-10} q5,0 5,5 v${c-5} H${-h/2} Z `:` M${-h/2} ${c/2-5} v${-c+10} q0,-5 5,-5 h${h-10} q5,0 5,5 v${c-10} q0,5 -5,5 h${-(h-10)} q-5,0 -5,-5 Z `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let m=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",p);return a.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),g(e,m),e.calcIntersect=function(t,e){return x(t,e)},e.intersect=function(t){return x(e,t)},a}async function en(t,e){let r={padding:e.padding??0};return W(t,e,r)}(0,n.K2)(eo,"kanbanItem"),(0,n.K2)(ea,"bang"),(0,n.K2)(es,"cloud"),(0,n.K2)(el,"defaultMindmapNode"),(0,n.K2)(en,"mindmapCircle");var eh=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tK},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tI},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tR},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tN},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:te},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ti},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:W},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ea},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:es},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:t_},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:td},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tb},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tk},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tZ},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:tf},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ta},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tU},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:z},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tD},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:tW},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tP},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:tn},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:U},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:G},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:V},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:tT},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:t0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:th},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tV},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tA},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Z},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:to},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tJ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t1},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ts},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:tQ},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tl},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tq},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tv},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tL},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:K},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:j},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tH},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tj},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t2},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:t$},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tF}],ec=(0,n.K2)(()=>Object.fromEntries([...Object.entries({state:tz,choice:P,note:tM,rectWithTitle:tO,labelRect:tx,iconSquare:tC,iconCircle:tu,icon:tg,iconRounded:tm,imageSquare:ty,anchor:I,kanbanItem:eo,mindmapCircle:en,defaultMindmapNode:el,classBox:et,erBox:t4,requirementBox:ee}),...eh.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function ed(t){return t in ec}(0,n.K2)(ed,"isValidShape");var ep=new Map;async function eg(t,e,r){let i,o;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?ec[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;"sandbox"===r.config.securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),o=await a(i,e,r)}else i=o=await a(t,e,r);return i.attr("data-look",(0,s.KL)(e.look)),e.tooltip&&o.attr("title",e.tooltip),ep.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}(0,n.K2)(eg,"insertNode");var eu=(0,n.K2)((t,e)=>{ep.set(e.id,t)},"setNodeElem"),em=(0,n.K2)(()=>{ep.clear()},"clear"),eC=(0,n.K2)(t=>{let e=ep.get(t.id);n.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},72903(t,e,r){r.d(e,{yT:()=>H,PX:()=>Q,vU:()=>v,rY:()=>tn,pe:()=>w,KL:()=>th,Ib:()=>E,I5:()=>ti,bH:()=>G,$C:()=>N,$t:()=>to,ru:()=>V,dq:()=>te,Sm:()=>tl,C4:()=>ts,sM:()=>P,_K:()=>ta,Un:()=>Z});var i,o=r(90047),a=r(76338),s=r(45086),l=r(79723);function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");let r=function(...i){let o=e?e.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);let s=t.apply(this,i);return r.cache=a.set(o,s)||a,s};return r.cache=new(n.Cache||Map),r}function h(){}n.Cache=Map;var c=r(97688),d=r(12618);function p(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var g=r(13507);function u(t){if("object"!=typeof t||null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){let e=t[Symbol.toStringTag];return null!=e&&!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var m=r(46927),C=r(92876);function y(t,e,r,i=new Map,o){let a=o?.(t,e,r,i);if(void 0!==a)return a;if((0,c.s)(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){let e=Array(t.length);i.set(t,e);for(let a=0;atypeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){let e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,e),f(e,t,r,i,o),e}if("u">typeof File&&t instanceof File){let e=new File([t],t.name,{type:t.type});return i.set(t,e),f(e,t,r,i,o),e}if("u">typeof Blob&&t instanceof Blob){let e=new Blob([t],{type:t.type});return i.set(t,e),f(e,t,r,i,o),e}if(t instanceof Error){let e=structuredClone(t);return i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,f(e,t,r,i,o),e}if(t instanceof Boolean){let e=new Boolean(t.valueOf());return i.set(t,e),f(e,t,r,i,o),e}if(t instanceof Number){let e=new Number(t.valueOf());return i.set(t,e),f(e,t,r,i,o),e}if(t instanceof String){let e=new String(t.valueOf());return i.set(t,e),f(e,t,r,i,o),e}if("object"==typeof t&&function(t){switch((0,m.b)(t)){case C.R_:case C.Uw:case C.cT:case C.iq:case C.$V:case C.vC:case C.ri:case C.ML:case C.XZ:case C.i1:case C._u:case C.pj:case C.kj:case C.GX:case C.Av:case C.NA:case C.OG:case C.VP:case C.Qb:case C.q:case C.x6:case C.ZR:return!0;default:return!1}}(t)){let e=Object.create(Object.getPrototypeOf(t));return i.set(t,e),f(e,t,r,i,o),e}return t}function f(t,e,r=t,i,o){let a=[...Object.keys(e),...p(e)];for(let s=0;s{let a;if(void 0!==a)return a;if("object"==typeof t){if("[object Object]"===(0,m.b)(t)&&"function"!=typeof t.constructor){let e={};return o.set(t,e),f(e,t,i,o),e}switch(Object.prototype.toString.call(t)){case C.kj:case C.OG:case C.$V:{let e=new t.constructor(t?.valueOf());return f(e,t),e}case C.R_:{let e={};return f(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}},y(t,void 0,t,new Map,e)}var k=r(92370);function b(t){return"object"==typeof t&&null!==t}var T=r(8987),B=r(71253),w="\u200B",S={curveBasis:l.qrM,curveBasisClosed:l.Yu4,curveBasisOpen:l.IA3,curveBumpX:l.Wi0,curveBumpY:l.PGM,curveBundle:l.OEq,curveCardinalClosed:l.olC,curveCardinalOpen:l.IrU,curveCardinal:l.y8u,curveCatmullRomClosed:l.Q7f,curveCatmullRomOpen:l.cVp,curveCatmullRom:l.oDi,curveLinear:l.lUB,curveLinearClosed:l.Lx9,curveMonotoneX:l.nVG,curveMonotoneY:l.uxU,curveNatural:l.Xf2,curveStep:l.GZz,curveStepAfter:l.UPb,curveStepBefore:l.dyv},A=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,F=(0,a.K2)(function(t,e){let r=L(t,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let t=r.map(t=>t.args);(0,o.$i)(t),i=(0,o.hH)(i,[...t])}else i=r.args;if(!i)return;let a=(0,o.Ch)(t,e),s="config";return void 0!==i[s]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),L=(0,a.K2)(function(t,e=null){try{let r,i=RegExp(`[%]{2}(?![{]${A.source})(?=[}][%]{2}).* `,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),a.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);let s=[];for(;null!==(r=o.DB.exec(t));)if(r.index===o.DB.lastIndex&&o.DB.lastIndex++,r&&!e||e&&r[1]?.match(e)||e&&r[2]?.match(e)){let t=r[1]?r[1]:r[2],e=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;s.push({type:t,args:e})}if(0===s.length)return{type:t,args:null};return 1===s.length?s[0]:s}catch(r){return a.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),v=(0,a.K2)(function(t){return t.replace(o.DB,"")},"removeDirectives"),M=(0,a.K2)(function(t,e){for(let[r,i]of e.entries())if(i.match(t))return r;return -1},"isSubstringInArray");function E(t,e){return t?S[`curve${t.charAt(0).toUpperCase()+t.slice(1)}`]??e:e}function _(t,e){let r=t.trim();if(r)return"loose"!==e.securityLevel?(0,s.sanitizeUrl)(r):r}(0,a.K2)(E,"interpolateToCurve"),(0,a.K2)(_,"formatUrl");var $=(0,a.K2)((t,...e)=>{let r=t.split("."),i=r.length-1,o=r[i],s=window;for(let e=0;e{r+=O(t,e),e=t}),K(t,r/2)}function D(t){return 1===t.length?t[0]:I(t)}(0,a.K2)(O,"distance"),(0,a.K2)(I,"traverseEdge"),(0,a.K2)(D,"calcLabelPosition");var q=(0,a.K2)((t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),K=(0,a.K2)((t,e)=>{let r,i=e;for(let e of t){if(r){let t=O(e,r);if(0===t)return r;if(t=1)return{x:e.x,y:e.y};if(o>0&&o<1)return{x:q((1-o)*r.x+o*e.x,5),y:q((1-o)*r.y+o*e.y,5)}}}r=e}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),R=(0,a.K2)((t,e,r)=>{a.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=K(e,25),o=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(s)*o+(e[0].x+i.x)/2,l.y=-Math.cos(s)*o+(e[0].y+i.y)/2,l},"calcCardinalityPosition");function z(t,e,r){let i=structuredClone(r);a.Rm.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();let o=K(i,25+t),s=10+.5*t,l=Math.atan2(i[0].y-o.y,i[0].x-o.x),n={x:0,y:0};return"start_left"===e?(n.x=Math.sin(l+Math.PI)*s+(i[0].x+o.x)/2,n.y=-Math.cos(l+Math.PI)*s+(i[0].y+o.y)/2):"end_right"===e?(n.x=Math.sin(l-Math.PI)*s+(i[0].x+o.x)/2-5,n.y=-Math.cos(l-Math.PI)*s+(i[0].y+o.y)/2-5):"end_left"===e?(n.x=Math.sin(l)*s+(i[0].x+o.x)/2-5,n.y=-Math.cos(l)*s+(i[0].y+o.y)/2-5):(n.x=Math.sin(l)*s+(i[0].x+o.x)/2,n.y=-Math.cos(l)*s+(i[0].y+o.y)/2),n}function P(t){let e="",r="";for(let i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,a.K2)(z,"calcTerminalLabelPosition"),(0,a.K2)(P,"getStylesFromArray");var W=0,N=(0,a.K2)(()=>(W++,"id-"+Math.random().toString(36).substr(2,12)+"-"+W),"generateId");function j(t){let e="",r="0123456789abcdef",i=r.length;for(let o=0;oj(t.length),"random"),U=(0,a.K2)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),X=(0,a.K2)(function(t,e){let r=e.text.replace(o.Y2.lineBreakRegex," "),[,i]=ti(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);let s=a.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.attr("fill",e.fill),s.text(r),a},"drawSimpleText"),G=n((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),o.Y2.lineBreakRegex.test(t)))return t;let i=t.split(" ").filter(Boolean),a=[],s="";return i.forEach((t,o)=>{let l=Z(`${t} `,r),n=Z(s,r);if(l>e){let{hyphenatedStrings:i,remainingWord:o}=Y(t,e,"-",r);a.push(s,...i),s=o}else n+l>=e?(a.push(s),s=t):s=[s,t].filter(Boolean).join(" ");o+1===i.length&&a.push(s)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Y=n((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let o=[...t],a=[],s="";return o.forEach((t,l)=>{let n=`${s}${t}`;if(Z(n,i)>=e){let t=o.length===l+1,e=`${n}${r}`;a.push(t?n:e),s=""}else s=n}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function V(t,e){return Q(t,e).height}function Z(t,e){return Q(t,e).width}(0,a.K2)(V,"calculateTextHeight"),(0,a.K2)(Z,"calculateTextWidth");var Q=n((t,e)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};let[,s]=ti(r),n=t.split(o.Y2.lineBreakRegex),h=[],c=(0,l.Ltv)("body");if(!c.remove)return{width:0,height:0,lineHeight:0};let d=c.append("svg");for(let t of["sans-serif",i]){let e=0,r={width:0,height:0,lineHeight:0};for(let i of n){let o=U();o.text=i||w;let l=X(d,o).style("font-size",s).style("font-weight",a).style("font-family",t),n=(l._groups||l)[0][0].getBBox();if(0===n.width&&0===n.height)throw Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,n.width)),e=Math.round(n.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}h.push(r)}d.remove();let p=isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1;return h[p]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),J=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,a.K2)(this,"InitIDGenerator")}},tt=(0,a.K2)(function(t){return i=i||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),i.innerHTML=t,unescape(i.textContent)},"entityDecode");function te(t){return"str"in t}(0,a.K2)(te,"isDetailedError");var tr=(0,a.K2)((t,e,r,i)=>{if(!i)return;let o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),ti=(0,a.K2)(t=>{if("number"==typeof t)return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function to(t,e){return function(t,...e){return function(t,...e){let r=e.slice(0,-1),i=e[e.length-1],o=t;for(let t=0;ttypeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);let e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);let r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){let e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let e;return(e=t instanceof AggregateError?new r(t.errors,t.message,{cause:t.cause}):new r(t.message,{cause:t.cause})).stack=t.stack,Object.assign(e,t),e}return"u">typeof File&&t instanceof File?new r([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):t}(o.get(r));if(o.set(r,e),Array.isArray(r)){r=r.slice();for(let t=0;ta||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function th(t){return t??null}function tc(t,e){let r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}(0,a.K2)(th,"handleUndefinedAttr"),(0,a.K2)(tc,"isLabelCoordinateInPath")},76338(t,e,r){r.d(e,{He:()=>h,K2:()=>a,Rm:()=>n,VA:()=>s});var i=r(31457),o=Object.defineProperty,a=(t,e)=>o(t,"name",{value:e,configurable:!0}),s=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},l={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},n={trace:a((...t)=>{},"trace"),debug:a((...t)=>{},"debug"),info:a((...t)=>{},"info"),warn:a((...t)=>{},"warn"),error:a((...t)=>{},"error"),fatal:a((...t)=>{},"fatal")},h=a(function(t="fatal"){let e=l.fatal;"string"==typeof t?t.toLowerCase()in l&&(e=l[t]):"number"==typeof t&&(e=t),n.trace=()=>{},n.debug=()=>{},n.info=()=>{},n.warn=()=>{},n.error=()=>{},n.fatal=()=>{},e<=l.fatal&&(n.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",c("FATAL"))),e<=l.error&&(n.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",c("ERROR"))),e<=l.warn&&(n.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",c("WARN"))),e<=l.info&&(n.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",c("INFO"))),e<=l.debug&&(n.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",c("DEBUG"))),e<=l.trace&&(n.trace=console.debug?console.debug.bind(console,c("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",c("TRACE")))},"setLogLevel"),c=a(t=>{let e=i().format("ss.SSS");return`%c${e} : ${t} : `},"format")},99249(t,e,r){r.d(e,{Nq:()=>s,RI:()=>h,Wg:()=>o,hq:()=>a});var i=r(76338),o=(0,i.K2)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";let r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),a={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},s={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function l(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=n(t),e=n(e);let[r,i]=[t.x,t.y],[o,a]=[e.x,e.y],s=o-r,l=a-i;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}(0,i.K2)(l,"calculateDeltaAndAngle");var n=(0,i.K2)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),h=(0,i.K2)(t=>({x:(0,i.K2)(function(e,r,i){let o=0,s=n(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){let{angle:e,deltaX:r}=l(i[i.length-1],i[i.length-2]);o=a[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}let h=Math.abs(n(e).x-n(i[i.length-1]).x),c=Math.abs(n(e).y-n(i[i.length-1]).y),d=Math.abs(n(e).x-n(i[0]).x),p=Math.abs(n(e).y-n(i[0]).y),g=a[t.arrowTypeStart],u=a[t.arrowTypeEnd];if(h0&&c0&&p=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){let{angle:e,deltaY:r}=l(i[i.length-1],i[i.length-2]);o=a[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}let h=Math.abs(n(e).y-n(i[i.length-1]).y),c=Math.abs(n(e).x-n(i[i.length-1]).x),d=Math.abs(n(e).y-n(i[0]).y),p=Math.abs(n(e).x-n(i[0]).x),g=a[t.arrowTypeStart],u=a[t.arrowTypeEnd];if(h0&&c0&&ptt,B6:()=>tc,C0:()=>C,Ch:()=>f,D7:()=>en,DB:()=>u,Df:()=>te,Dl:()=>tH,E:()=>tT,EI:()=>er,EJ:()=>g,Gs:()=>eC,H$:()=>G,H1:()=>tB,ID:()=>tI,IU:()=>t9,J$:()=>b,Js:()=>em,KG:()=>t0,ME:()=>ec,Nk:()=>tp,P$:()=>_,Q2:()=>td,QO:()=>tK,SV:()=>et,TM:()=>tb,UI:()=>J,UU:()=>tn,Wi:()=>tj,Wt:()=>t3,XV:()=>eh,Xd:()=>x,Y2:()=>tG,_3:()=>ti,a$:()=>tZ,ab:()=>ea,cL:()=>tC,dj:()=>tX,hH:()=>B,iN:()=>ee,jZ:()=>tv,ke:()=>eo,m7:()=>ei,mW:()=>y,mj:()=>ep,oB:()=>ed,ot:()=>tQ,sb:()=>tr,tM:()=>t5,wZ:()=>th,xA:()=>tm,zj:()=>tg});var o,a=r(76338),s=r(64395),l=r(92717),n=r(30611),h=r(70405),c=r(60217),d=r(47490),p=r(31968),g=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,u=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,m=/\s*%%.*\n/gm,C=class extends Error{static{(0,a.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},y={},f=(0,a.K2)(function(t,e){for(let[r,{detector:i}]of(t=t.replace(g,"").replace(u,"").replace(m,"\n"),Object.entries(y)))if(i(t,e))return r;throw new C(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),x=(0,a.K2)((...t)=>{for(let{id:e,detector:r,loader:i}of t)k(e,r,i)},"registerLazyLoadedDiagrams"),k=(0,a.K2)((t,e,r)=>{y[t]&&a.Rm.warn(`Detector with key ${t} already exists. Overwriting.`),y[t]={detector:e,loader:r},a.Rm.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),b=(0,a.K2)(t=>y[t].loader,"getDiagramLoader"),T=(0,a.K2)((t,e,{depth:r=2,clobber:i=!1}={})=>{let o={depth:r,clobber:i};if(Array.isArray(e)&&!Array.isArray(t))return e.forEach(e=>T(t,e,o)),t;if(Array.isArray(e)&&Array.isArray(t))return e.forEach(e=>{t.includes(e)||t.push(e)}),t;if(void 0===t||r<=0)if(null!=t&&"object"==typeof t&&"object"==typeof e)return Object.assign(t,e);else return e;return void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(o=>{"object"==typeof e[o]&&null!==e[o]&&(void 0===t[o]||"object"==typeof t[o])?(void 0===t[o]&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=T(t[o],e[o],{depth:r-1,clobber:i})):(i||"object"!=typeof t[o]&&"object"!=typeof e[o])&&(t[o]=e[o])}),t},"assignWithDepth"),B=T,w="#ffffff",S="#f2f2f2",A=(0,a.K2)((t,e)=>e?(0,s.A)(t,{s:-40,l:10}):(0,s.A)(t,{s:-40,l:-10}),"mkBorder"),F=class{static{(0,a.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||(0,s.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,s.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||(0,l.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,l.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,l.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,l.A)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,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,n.A)(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||this.actorBorder,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,n.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,l.A)(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,h.A)(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.vertLineColor=this.vertLineColor||"navy",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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,n.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,n.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,h.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,h.A)(this.mainBkg,5)),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||(0,s.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,s.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,s.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,s.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,s.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,s.A)(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||(0,s.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,s.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,s.A)(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},L=(0,a.K2)(t=>{let e=new F;return e.calculate(t),e},"getThemeVariables"),v=class{static{(0,a.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,h.A)(this.primaryColor,16),this.tertiaryColor=(0,s.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,l.A)(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.A)(this.primaryColor),this.secondaryTextColor=(0,l.A)(this.secondaryColor),this.tertiaryTextColor=(0,l.A)(this.tertiaryColor),this.lineColor=(0,l.A)(this.background),this.textColor=(0,l.A)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,h.A)((0,l.A)("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,d.A)(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.radius=5,this.strokeWidth=1,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.clusterBkg="#302F3D",this.sectionBkgColor=(0,n.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,n.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,d.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,d.A)(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.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,h.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,n.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=(0,h.A)(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,h.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,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,h.A)(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=(0,l.A)(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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=(0,s.A)(this.primaryColor,{h:64}),this.fillType3=(0,s.A)(this.secondaryColor,{h:64}),this.fillType4=(0,s.A)(this.primaryColor,{h:-64}),this.fillType5=(0,s.A)(this.secondaryColor,{h:-64}),this.fillType6=(0,s.A)(this.primaryColor,{h:128}),this.fillType7=(0,s.A)(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||(0,s.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,s.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,s.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,s.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,s.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,s.A)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,s.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,s.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,s.A)(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},M=(0,a.K2)(t=>{let e=new v;return e.calculate(t),e},"getThemeVariables"),E=class{static{(0,a.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=(0,s.A)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=(0,s.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.A)(this.primaryColor),this.secondaryTextColor=(0,l.A)(this.secondaryColor),this.tertiaryTextColor=(0,l.A)(this.tertiaryColor),this.lineColor=(0,l.A)(this.background),this.textColor=(0,l.A)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,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="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="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",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.vertLineColor="calculated",this.sectionBkgColor=(0,d.A)(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.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",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||(0,s.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,s.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,s.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,s.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,s.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,s.A)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,s.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,s.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,s.A)(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,n.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,n.A)(this.tertiaryColor,40);for(let t=0;t{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},_=(0,a.K2)(t=>{let e=new E;return e.calculate(t),e},"getThemeVariables"),$=class{static{(0,a.K2)(this,"Theme")}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,h.A)("#cde498",10),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.A)(this.primaryColor),this.secondaryTextColor=(0,l.A)(this.secondaryColor),this.tertiaryTextColor=(0,l.A)(this.primaryColor),this.lineColor=(0,l.A)(this.background),this.textColor=(0,l.A)(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,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="calculated",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.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=(0,n.A)(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.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,s.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,s.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,s.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,s.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,s.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,s.A)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,s.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,s.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,s.A)(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,n.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,n.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},O=(0,a.K2)(t=>{let e=new $;return e.calculate(t),e},"getThemeVariables"),I=class{static{(0,a.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,h.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=(0,s.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.A)(this.primaryColor),this.secondaryTextColor=(0,l.A)(this.secondaryColor),this.tertiaryTextColor=(0,l.A)(this.tertiaryColor),this.lineColor=(0,l.A)(this.background),this.textColor=(0,l.A)(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.radius=5,this.strokeWidth=1,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=this.actorBorder,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.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||(0,h.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=(0,h.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,h.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},D=(0,a.K2)(t=>{let e=new I;return e.calculate(t),e},"getThemeVariables"),q=class{static{(0,a.K2)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||(0,s.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,s.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||(0,l.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,l.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,l.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,l.A)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,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,n.A)(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||this.actorBorder,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,n.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,l.A)(this.lineColor);let t="#ECECFE",e="#E9E9F1",r=(0,s.A)(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,h.A)(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||(0,s.A)(t,{h:30}),this.cScale4=this.cScale4||(0,s.A)(t,{h:60}),this.cScale5=this.cScale5||(0,s.A)(t,{h:90}),this.cScale6=this.cScale6||(0,s.A)(t,{h:120}),this.cScale7=this.cScale7||(0,s.A)(t,{h:150}),this.cScale8=this.cScale8||(0,s.A)(t,{h:210,l:150}),this.cScale9=this.cScale9||(0,s.A)(t,{h:270}),this.cScale10=this.cScale10||(0,s.A)(t,{h:300}),this.cScale11=this.cScale11||(0,s.A)(t,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},K=(0,a.K2)(t=>{let e=new q;return e.calculate(t),e},"getThemeVariables"),R=class{static{(0,a.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,h.A)(this.primaryColor,16),this.tertiaryColor=(0,s.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,l.A)(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.A)(this.primaryColor),this.secondaryTextColor=(0,l.A)(this.secondaryColor),this.tertiaryTextColor=(0,l.A)(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,h.A)((0,l.A)("#323D47"),10),this.border1="#ccc",this.border2=(0,d.A)(255,255,255,.25),this.arrowheadColor=(0,l.A)(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||(0,s.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,s.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||(0,l.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,l.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,l.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,l.A)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,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,n.A)(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||this.actorBorder,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,n.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,l.A)(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,h.A)(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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||(0,s.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,s.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,s.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,s.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,s.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,s.A)(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||(0,s.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,s.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,s.A)(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},z=(0,a.K2)(t=>{let e=new R;return e.calculate(t),e},"getThemeVariables"),P=class{static{(0,a.K2)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=A("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||(0,s.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,s.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||(0,l.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,l.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,l.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,l.A)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,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,n.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,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,n.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,l.A)(this.lineColor);let t="#ECECFE",e="#E9E9F1",r=(0,s.A)(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,h.A)(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,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.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},W=(0,a.K2)(t=>{let e=new P;return e.calculate(t),e},"getThemeVariables"),N=class{static{(0,a.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,h.A)(this.primaryColor,16),this.tertiaryColor=(0,s.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,l.A)(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.A)(this.primaryColor),this.secondaryTextColor=(0,l.A)(this.secondaryColor),this.tertiaryTextColor=(0,l.A)(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,h.A)((0,l.A)("#323D47"),10),this.border1="#ccc",this.border2=(0,d.A)(255,255,255,.25),this.arrowheadColor=(0,l.A)(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||(0,s.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,s.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||(0,l.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,l.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,l.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,l.A)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,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,n.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,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,n.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,l.A)(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,h.A)(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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,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.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||(0,s.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,s.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,s.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,s.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,s.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,s.A)(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||(0,s.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,s.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,s.A)(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},j=(0,a.K2)(t=>{let e=new N;return e.calculate(t),e},"getThemeVariables"),H=class{static{(0,a.K2)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||(0,s.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,s.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||(0,l.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,l.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,l.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,l.A)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,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,n.A)(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||this.actorBorder,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,n.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,l.A)(this.lineColor);let t="#ECECFE",e="#E9E9F1",r=(0,s.A)(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,h.A)(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},U=(0,a.K2)(t=>{let e=new H;return e.calculate(t),e},"getThemeVariables"),X=class{static{(0,a.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,h.A)(this.primaryColor,16),this.tertiaryColor=(0,s.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,l.A)(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,l.A)(this.primaryColor),this.secondaryTextColor=(0,l.A)(this.secondaryColor),this.tertiaryTextColor=(0,l.A)(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,h.A)((0,l.A)("#323D47"),10),this.border1="#ccc",this.border2=(0,d.A)(255,255,255,.25),this.arrowheadColor=(0,l.A)(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||(0,s.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,s.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||(0,l.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,l.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,l.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,l.A)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,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,n.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,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,n.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,l.A)(this.lineColor),this.rootLabelColor="#FFFFFF",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,h.A)(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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},G={base:{getThemeVariables:L},dark:{getThemeVariables:M},default:{getThemeVariables:_},forest:{getThemeVariables:O},neutral:{getThemeVariables:D},neo:{getThemeVariables:K},"neo-dark":{getThemeVariables:z},redux:{getThemeVariables:W},"redux-dark":{getThemeVariables:j},"redux-color":{getThemeVariables:U},"redux-dark-color":{getThemeVariables:(0,a.K2)(t=>{let e=new X;return e.calculate(t),e},"getThemeVariables")}},Y={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,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,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},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,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"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,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,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{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},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,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},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,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,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"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},V={...Y,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:G.default.getThemeVariables(),sequence:{...Y.sequence,messageFont:(0,a.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,a.K2)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,a.K2)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Y.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Y.c4,useWidth:void 0,personFont:(0,a.K2)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Y.flowchart,inheritDir:!1},external_personFont:(0,a.K2)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,a.K2)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,a.K2)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,a.K2)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,a.K2)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,a.K2)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,a.K2)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,a.K2)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,a.K2)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,a.K2)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,a.K2)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,a.K2)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,a.K2)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,a.K2)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,a.K2)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,a.K2)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,a.K2)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,a.K2)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,a.K2)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,a.K2)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,a.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Y.pie,useWidth:984},xyChart:{...Y.xyChart,useWidth:void 0},requirement:{...Y.requirement,useWidth:void 0},packet:{...Y.packet},eventmodeling:{...Y.eventmodeling},treeView:{...Y.treeView,useWidth:void 0},radar:{...Y.radar},ishikawa:{...Y.ishikawa},sankey:{...Y.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Y.venn}},Z=(0,a.K2)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Z(t[i],"")]:[...r,e+i],[]),"keyify"),Q=new Set(Z(V,"")),J=V,tt=(0,a.K2)(t=>{if(a.Rm.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t){if(Array.isArray(t))return void t.forEach(t=>tt(t));for(let e of Object.keys(t)){if(a.Rm.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Q.has(e)||null==t[e]){a.Rm.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){if("nodeColors"===e){let r=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(let i of Object.keys(t[e]))"string"==typeof t[e][i]&&r.test(t[e][i])||(a.Rm.debug("sanitize deleting invalid color:",i,t[e][i]),delete t[e][i])}else a.Rm.debug("sanitizing object",e),tt(t[e]);continue}for(let r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(a.Rm.debug("sanitizing css option",e),t[e]=te(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}a.Rm.debug("After sanitization",t)}},"sanitizeDirective"),te=(0,a.K2)(t=>{let e=0,r=0;for(let i of t){if(e!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),to=B({},tr),ta=[],ts=B({},tr),tl=(0,a.K2)((t,e)=>{let r=B({},t),i={};for(let t of e)tu(t),i=B(i,t);if(r=B(r,i),i.theme&&i.theme in G){let t=B({},o),e=B(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in G&&(r.themeVariables=G[r.theme].getThemeVariables(e))}return tk(ts=r),ts},"updateCurrentConfig"),tn=(0,a.K2)(t=>(to=B({},tr),to=B(to,t),t.theme&&G[t.theme]&&(to.themeVariables=G[t.theme].getThemeVariables(t.themeVariables)),tl(to,ta),to),"setSiteConfig"),th=(0,a.K2)(t=>{o=B({},t)},"saveConfigFromInitialize"),tc=(0,a.K2)(t=>(to=B(to,t),tl(to,ta),to),"updateSiteConfig"),td=(0,a.K2)(()=>B({},to),"getSiteConfig"),tp=(0,a.K2)(t=>(tk(t),B(ts,t),tg()),"setConfig"),tg=(0,a.K2)(()=>B({},ts),"getConfig"),tu=(0,a.K2)(t=>{t&&(["secure",...to.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(a.Rm.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&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]&&tu(t[e])}))},"sanitize"),tm=(0,a.K2)(t=>{tt(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),ta.push(t),tl(to,ta)},"addDirective"),tC=(0,a.K2)((t=to)=>{tl(t,ta=[])},"reset"),ty={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},tf={},tx=(0,a.K2)(t=>{tf[t]||(a.Rm.warn(ty[t]),tf[t]=!0)},"issueWarning"),tk=(0,a.K2)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&tx("LAZY_LOAD_DEPRECATED")},"checkConfig"),tb=(0,a.K2)(()=>{let t={};for(let e of(o&&(t=B(t,o)),ta))t=B(t,e);return t},"getUserDefinedConfig"),tT=(0,a.K2)(t=>(t.flowchart?.htmlLabels!=void 0&&tx("FLOWCHART_HTML_LABELS_DEPRECATED"),ti(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),tB=//gi,tw=(0,a.K2)(t=>t?tO(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),tS=(i=!1,()=>{i||(tA(),i=!0)});function tA(){let t="data-temp-href-target";p.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),p.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,a.K2)(tA,"setupDompurifyHooks");var tF=(0,a.K2)(t=>(tS(),p.A.sanitize(t)),"removeScript"),tL=(0,a.K2)((t,e)=>{if(tT(e)){let r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=tF(t):"loose"!==r&&(t=t$(t=(t=(t=tO(t)).replace(//g,">")).replace(/=/g,"=")))}return t},"sanitizeMore"),tv=(0,a.K2)((t,e)=>t?t=e.dompurifyConfig?p.A.sanitize(tL(t,e),e.dompurifyConfig).toString():p.A.sanitize(tL(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),tM=(0,a.K2)((t,e)=>"string"==typeof t?tv(t,e):t.flat().map(t=>tv(t,e)),"sanitizeTextOrArray"),tE=(0,a.K2)(t=>tB.test(t),"hasBreaks"),t_=(0,a.K2)(t=>t.split(tB),"splitBreaks"),t$=(0,a.K2)(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),tO=(0,a.K2)(t=>t.replace(tB,"#br#"),"breakToPlaceholder"),tI=(0,a.K2)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),tD=(0,a.K2)(function(...t){return Math.max(...t.filter(t=>!isNaN(t)))},"getMax"),tq=(0,a.K2)(function(...t){return Math.min(...t.filter(t=>!isNaN(t)))},"getMin"),tK=(0,a.K2)(function(t){let e=t.split(/(,)/),r=[];for(let t=0;t0&&t+1Math.max(0,t.split(e).length-1),"countOccurrence"),tz=(0,a.K2)((t,e)=>{let r=tR(t,"~"),i=tR(e,"~");return 1===r&&1===i},"shouldCombineSets"),tP=(0,a.K2)(t=>{let e=tR(t,"~"),r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let i=[...t],o=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==o&&-1!==a&&o!==a;)i[o]="<",i[a]=">",o=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),tW=(0,a.K2)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),tN=/\$\$(.*)\$\$/g,tj=(0,a.K2)(t=>(t.match(tN)?.length??0)>0,"hasKatex"),tH=(0,a.K2)(async(t,e)=>{let r=document.createElement("div");r.innerHTML=await tX(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";let i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);let o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),tU=(0,a.K2)(async(t,e)=>{if(!tj(t))return t;if(!(tW()||e.legacyMathML||e.forceLegacyMathML))return t.replace(tN,"MathML is unsupported in this environment.");{let{default:i}=await Promise.resolve().then(r.bind(r,13359)),o=e.forceLegacyMathML||!tW()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(tB).map(t=>tj(t)?`
${t}
`:`
${t}
`).join("").replace(tN,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:o}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),tX=(0,a.K2)(async(t,e)=>tv(await tU(t,e),e),"renderKatexSanitized"),tG={getRows:tw,sanitizeText:tv,sanitizeTextOrArray:tM,hasBreaks:tE,splitBreaks:t_,lineBreakRegex:tB,removeScript:tF,getUrl:tI,evaluate:ti,getMax:tD,getMin:tq},tY=(0,a.K2)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),tV=(0,a.K2)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),tZ=(0,a.K2)(function(t,e,r,i){tY(t,tV(e,r,i))},"configureSvgSize"),tQ=(0,a.K2)(function(t,e,r,i){let o=e.node().getBBox(),s=o.width,l=o.height;a.Rm.info(`SVG bounds: ${s}x${l}`,o);let n=0,h=0;a.Rm.info(`Graph bounds: ${n}x${h}`,t),n=s+2*r,h=l+2*r,a.Rm.info(`Calculated bounds: ${n}x${h}`),tZ(e,h,n,i);let c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),tJ={};function t0(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}(0,a.K2)(t0,"cssStyleSheetToString");var t2=(0,a.K2)((t,e,r,i)=>{let o="";return t in tJ&&tJ[t]?o=tJ[t]({...r,svgId:i}):a.Rm.warn(`No theme found for ${t}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } @keyframes edge-animation-frame { from { stroke-dashoffset: 0; } } @keyframes dash { to { stroke-dashoffset: 0; } } & .edge-animation-slow { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 50s linear infinite; stroke-linecap: round; } & .edge-animation-fast { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 20s linear infinite; stroke-linecap: round; } /* Classes common for multiple diagrams */ & .error-icon { fill: ${r.errorBkgColor}; } & .error-text { fill: ${r.errorTextColor}; stroke: ${r.errorTextColor}; } & .edge-thickness-normal { stroke-width: ${r.strokeWidth??1}px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${r.lineColor}; stroke: ${r.lineColor}; } & .marker.cross { stroke: ${r.lineColor}; } & svg { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; } & p { margin: 0 } ${o} .node .neo-node { stroke: ${r.nodeBorder}; } [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; } [data-look="neo"].node path { stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; stroke-width: ${r.strokeWidth??1}px; } [data-look="neo"].node .outer-path { filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; } [data-look="neo"].node .neo-line path { stroke: ${r.nodeBorder}; filter: none; } [data-look="neo"].node circle{ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; } [data-look="neo"].node circle .state-start{ fill: #000000; } [data-look="neo"].icon-shape .icon { fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; } [data-look="neo"].icon-shape .icon-neo path { stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; } ${e} `},"getStyles"),t1=(0,a.K2)((t,e)=>{void 0!==e&&(tJ[t]=e)},"addStylesForDiagram"),t5=t2,t3={};(0,a.VA)(t3,{clear:()=>t9,getAccDescription:()=>ei,getAccTitle:()=>ee,getDiagramTitle:()=>ea,setAccDescription:()=>er,setAccTitle:()=>et,setDiagramTitle:()=>eo});var t4="",t6="",t8="",t7=(0,a.K2)(t=>tv(t,tg()),"sanitizeText"),t9=(0,a.K2)(()=>{t4="",t8="",t6=""},"clear"),et=(0,a.K2)(t=>{t4=t7(t).replace(/^\s+/g,"")},"setAccTitle"),ee=(0,a.K2)(()=>t4,"getAccTitle"),er=(0,a.K2)(t=>{t8=t7(t).replace(/\n\s+/g,"\n")},"setAccDescription"),ei=(0,a.K2)(()=>t8,"getAccDescription"),eo=(0,a.K2)(t=>{t6=t7(t)},"setDiagramTitle"),ea=(0,a.K2)(()=>t6,"getDiagramTitle"),es=a.Rm,el=a.He,en=tg,eh=tp,ec=tr,ed=(0,a.K2)(t=>tv(t,en()),"sanitizeText"),ep=tQ,eg=(0,a.K2)(()=>t3,"getCommonDb"),eu={},em=(0,a.K2)((t,e,r)=>{eu[t]&&es.warn(`Diagram with id ${t} already registered. Overwriting.`),eu[t]=e,r&&k(t,r),t1(t,e.styles),e.injectUtils?.(es,el,en,ed,ep,eg(),()=>{})},"registerDiagram"),eC=(0,a.K2)(t=>{if(t in eu)return eu[t];throw new ey(t)},"getDiagram"),ey=class extends Error{static{(0,a.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},84660(t,e,r){r.d(e,{IU:()=>k,Jo:()=>_,T_:()=>w,g0:()=>to,jP:()=>T});var i=r(99249),o=r(43273),a=r(48230),s=r(10601),l=r(73825),n=r(72903),h=r(90047),c=r(76338),d=r(79723),p=r(25258),g=(0,c.K2)((t,e,r,i,o,a=!1,s)=>{e.arrowTypeStart&&C(t,"start",e.arrowTypeStart,r,i,o,a,s),e.arrowTypeEnd&&C(t,"end",e.arrowTypeEnd,r,i,o,a,s)},"addEdgeMarkers"),u={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},m=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],C=(0,c.K2)((t,e,r,i,o,a,s=!1,l)=>{let n=u[r],h=n&&m.includes(n.type);if(!n)return void c.Rm.warn(`Unknown arrow type: ${r}`);let d=n.type,p=`${o}_${a}-${d}${"start"===e?"Start":"End"}${s&&h?"-margin":""}`;if(l&&""!==l.trim()){let r=l.replace(/[^\dA-Za-z]/g,"_"),o=`${p}_${r}`;if(!document.getElementById(o)){let t=document.getElementById(p);if(t){let e=t.cloneNode(!0);e.id=o,e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",l),n.fill&&t.setAttribute("fill",l)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${o})`)}else t.attr(`marker-${e}`,`url(${i}#${p})`)},"addEdgeMarker"),y=(0,c.K2)(t=>"string"==typeof t?t:(0,h.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),f=new Map,x=new Map,k=(0,c.K2)(()=>{f.clear(),x.clear()},"clear"),b=(0,c.K2)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),T=(0,c.K2)(async(t,e)=>{let r,a=(0,h.D7)(),n=(0,h.E)(a),{labelStyles:p}=(0,s.GX)(e);e.labelStyle=p;let g=t.insert("g").attr("class","edgeLabel"),u=g.insert("g").attr("class","label").attr("data-id",e.id),m="markdown"===e.labelType,C=await (0,l.GZ)(t,e.label,{style:b(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:m,width:void 0},a);u.node().appendChild(C),c.Rm.info("abc82",e,e.labelType);let y=C.getBBox(),k=y;if(n){let t=C.children[0],e=(0,d.Ltv)(C);k=y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}else{let t=(0,d.Ltv)(C).select("text").node();t&&"function"==typeof t.getBBox&&(k=t.getBBox())}if(u.attr("transform",(0,i.Wg)(k,n)),f.set(e.id,g),e.width=y.width,e.height=y.height,e.startLabelLeft){let a=t.insert("g").attr("class","edgeTerminals"),s=a.insert("g").attr("class","inner"),l=await (0,o.DA)(s,e.startLabelLeft,b(e.labelStyle)||"",!1,!1);r=l;let h=l.getBBox();if(n){let t=l.children[0],e=(0,d.Ltv)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}s.attr("transform",(0,i.Wg)(h,n)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).startLeft=a,B(r,e.startLabelLeft)}if(e.startLabelRight){let a=t.insert("g").attr("class","edgeTerminals"),s=a.insert("g").attr("class","inner"),l=await (0,o.DA)(s,e.startLabelRight,b(e.labelStyle)||"",!1,!1);r=l;let h=l.getBBox();if(n){let t=l.children[0],e=(0,d.Ltv)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}s.attr("transform",(0,i.Wg)(h,n)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).startRight=a,B(r,e.startLabelRight)}if(e.endLabelLeft){let a=t.insert("g").attr("class","edgeTerminals"),s=a.insert("g").attr("class","inner"),l=await (0,o.DA)(a,e.endLabelLeft,b(e.labelStyle)||"",!1,!1);r=l;let h=l.getBBox();if(n){let t=l.children[0],e=(0,d.Ltv)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}s.attr("transform",(0,i.Wg)(h,n)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).endLeft=a,B(r,e.endLabelLeft)}if(e.endLabelRight){let a=t.insert("g").attr("class","edgeTerminals"),s=a.insert("g").attr("class","inner"),l=await (0,o.DA)(a,e.endLabelRight,b(e.labelStyle)||"",!1,!1);r=l;let h=l.getBBox();if(n){let t=l.children[0],e=(0,d.Ltv)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}s.attr("transform",(0,i.Wg)(h,n)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).endRight=a,B(r,e.endLabelRight)}return C},"insertEdgeLabel");function B(t,e){(0,h.E)((0,h.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(B,"setTerminalWidth");var w=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,f.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,i=(0,h.D7)(),{subGraphTitleTotalMargin:o}=(0,a.O)(i);if(t.label){let i=f.get(t.id),a=t.x,s=t.y;if(r){let i=n._K.calcLabelPosition(r);c.Rm.debug("Moving label "+t.label+" from (",a,",",s,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(a=i.x,s=i.y)}i.attr("transform",`translate(${a}, ${s+o/2})`)}if(t.startLabelLeft){let e=x.get(t.id).startLeft,i=t.x,o=t.y;if(r){let e=n._K.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){let e=x.get(t.id).startRight,i=t.x,o=t.y;if(r){let e=n._K.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){let e=x.get(t.id).endLeft,i=t.x,o=t.y;if(r){let e=n._K.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){let e=x.get(t.id).endRight,i=t.x,o=t.y;if(r){let e=n._K.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),S=(0,c.K2)((t,e)=>{let r=t.x,i=t.y,o=Math.abs(e.x-r),a=Math.abs(e.y-i),s=t.width/2,l=t.height/2;return o>=s||a>=l},"outsideNode"),A=(0,c.K2)((t,e,r)=>{c.Rm.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let i=t.x,o=t.y,a=Math.abs(i-r.x),s=t.width/2,l=r.xMath.abs(i-e.x)*n){let t=r.y{c.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(c.Rm.info("abc88 checking point",t,e),S(e,t)||o)c.Rm.warn("abc88 outside",t,i),i=t,o||r.push(t);else{let a=A(e,i,t);c.Rm.debug("abc88 inside",t,i,a),c.Rm.debug("abc88 intersection",a,e);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?c.Rm.warn("abc88 no intersect",a,r):r.push(a),o=!0}}),c.Rm.debug("returning points",r),r},"cutPathAtIntersect");function L(t){let e=[],r=[];for(let i=1;i5&&Math.abs(a.y-o.y)>5?(e.push(a),r.push(i)):o.y===a.y&&a.x===s.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,c.K2)(L,"extractCornerPoints");var v=(0,c.K2)(function(t,e,r){let i=e.x-t.x,o=e.y-t.y,a=r/Math.sqrt(i*i+o*o);return{x:e.x-a*i,y:e.y-a*o}},"findAdjacentPoint"),M=(0,c.K2)(function(t){let{cornerPointPositions:e}=L(t),r=[];for(let i=0;i10&&Math.abs(o.y-e.y)>=10?(c.Rm.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y)),p=a.x===s.x?{x:n<0?s.x-5+d:s.x+5-d,y:h<0?s.y-d:s.y+d}:{x:n<0?s.x-d:s.x+d,y:h<0?s.y-5+d:s.y+5-d}):c.Rm.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y)),r.push(p,l)}else r.push(t[i]);return r},"fixCorners"),E=(0,c.K2)((t,e,r)=>{let i=Array(Math.floor((t-e-r)/4)).fill("2 2").join(" ");return`0 ${e} ${i} ${r}`},"generateDashArray"),_=(0,c.K2)(function(t,e,r,o,a,l,u,m=!1){let C,f;if(!u)throw Error(`insertEdge: missing diagramId for edge "${e.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:x}=(0,h.D7)(),k=e.points,b=!1,T=[];for(let t in e.cssCompiledStyles)(0,s.KX)(t)||T.push(e.cssCompiledStyles[t]);c.Rm.debug("UIO intersect check",e.points,l.x,a.x),l.intersect&&a.intersect&&!m&&((k=k.slice(1,e.points.length-1)).unshift(a.intersect(k[0])),c.Rm.debug("Last point UIO",e.start,"--\x3e",e.end,k[k.length-1],l,l.intersect(k[k.length-1])),k.push(l.intersect(k[k.length-1])));let B=btoa(JSON.stringify(k));e.toCluster&&(c.Rm.info("to cluster abc88",r.get(e.toCluster)),k=F(e.points,r.get(e.toCluster).node),b=!0),e.fromCluster&&(c.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(k,null,2)),k=F(k.reverse(),r.get(e.fromCluster).node).reverse(),b=!0);let w=k.filter(t=>!Number.isNaN(t.y)),S=y(e.curve);"rounded"!==S&&(w=M(w));let A=d.lUB;switch(S){case"linear":case"rounded":A=d.lUB;break;case"basis":default:A=d.qrM;break;case"cardinal":A=d.y8u;break;case"bumpX":A=d.Wi0;break;case"bumpY":A=d.PGM;break;case"catmullRom":A=d.oDi;break;case"monotoneX":A=d.nVG;break;case"monotoneY":A=d.uxU;break;case"natural":A=d.Xf2;break;case"step":A=d.GZz;break;case"stepAfter":A=d.UPb;break;case"stepBefore":A=d.dyv}let{x:L,y:v}=(0,i.RI)(e),_=(0,d.n8j)().x(L).y(v).curve(A);switch(e.thickness){case"normal":default:C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible"}switch(e.pattern){case"solid":default:C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed"}let O="rounded"===S?$(I(w,e),5):_(w),D=Array.isArray(e.style)?e.style:[e.style],q=D.find(t=>t?.startsWith("stroke:")),K="";e.animate&&(K="edge-animation-fast"),e.animation&&(K="edge-animation-"+e.animation);let R=!1;if("handDrawn"===e.look){let r=p.A.svg(t);Object.assign([],w);let i=r.path(O,{roughness:.3,seed:x});C+=" transition";let o=(f=(0,d.Ltv)(i).select("path").attr("id",`${u}-${e.id}`).attr("class"," "+C+(e.classes?" "+e.classes:"")+(K?" "+K:"")).attr("style",D?D.reduce((t,e)=>t+";"+e,""):"")).attr("d");f.attr("d",o),t.node().appendChild(f.node())}else{let r=T.join(";"),o=D?D.reduce((t,e)=>t+e+";",""):"",a=(r?r+";"+o+";":o)+";"+(D?D.reduce((t,e)=>t+";"+e,""):"");f=t.append("path").attr("d",O).attr("id",`${u}-${e.id}`).attr("class"," "+C+(e.classes?" "+e.classes:"")+(K?" "+K:"")).attr("style",a),q=a.match(/stroke:([^;]+)/)?.[1],R=!0===e.animate||!!e.animation||r.includes("animation");let s=f.node(),l="function"==typeof s.getTotalLength?s.getTotalLength():0,n=i.Nq[e.arrowTypeStart]||0,h=i.Nq[e.arrowTypeEnd]||0;if("neo"===e.look&&!R){let t="dotted"===e.pattern||"dashed"===e.pattern?E(l,n,h):`0 ${n} ${l-n-h} ${h}`,r=`stroke-dasharray: ${t}; stroke-dashoffset: 0;`;f.attr("style",r+f.attr("style"))}}f.attr("data-edge",!0),f.attr("data-et","edge"),f.attr("data-id",e.id),f.attr("data-points",B),f.attr("data-look",(0,n.KL)(e.look)),e.showPoints&&w.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let z="";((0,h.D7)().flowchart.arrowMarkerAbsolute||(0,h.D7)().state.arrowMarkerAbsolute)&&(z=(z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),c.Rm.info("arrowTypeStart",e.arrowTypeStart),c.Rm.info("arrowTypeEnd",e.arrowTypeEnd);let P=!R&&e?.look==="neo";g(f,e,z,u,o,P,q);let W=Math.floor(k.length/2),N=k[W];n._K.isLabelCoordinateInPath(N,f.attr("d"))||(b=!0);let j={};return b&&(j.updatedPath=k),j.originalPath=e.points,j},"insertEdge");function $(t,e){if(t.length<2)return"";let r="",i=t.length;for(let o=0;oMath.abs(Math.PI-m)){r+=`L${a.x},${a.y}`;continue}let C=Math.min(e/Math.sin(m/2),h/2,c/2),y=a.x-d*C,f=a.y-p*C,x=a.x+g*C,k=a.y+u*C;r+=`L${y},${f}Q${a.x},${a.y} ${x},${k}`}}return r}function O(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};let r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function I(t,e){let r=t.map(t=>({...t}));if(t.length>=2&&i.hq[e.arrowTypeStart]){let o=i.hq[e.arrowTypeStart],a=t[0],{angle:s}=O(a,t[1]),l=o*Math.cos(s),n=o*Math.sin(s);r[0].x=a.x+l,r[0].y=a.y+n}let o=t.length;if(o>=2&&i.hq[e.arrowTypeEnd]){let a=i.hq[e.arrowTypeEnd],s=t[o-1],{angle:l}=O(t[o-2],s),n=a*Math.cos(l),h=a*Math.sin(l);r[o-1].x=s.x-n,r[o-1].y=s.y-h}return r}(0,c.K2)($,"generateRoundedPath"),(0,c.K2)(O,"calculateDeltaAndAngle"),(0,c.K2)(I,"applyMarkerOffsetsToPoints");var D=(0,c.K2)((t,e,r,i)=>{e.forEach(e=>{ti[e](t,r,i)})},"insertMarkers"),q=(0,c.K2)((t,e,r)=>{c.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),K=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),R=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),z=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),P=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),W=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),N=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),j=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),H=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),U=(0,c.K2)((t,e,r)=>{let{themeVariables:i}=(0,h.zj)(),{transitionColor:o}=i;t.append("defs").append("marker").attr("id",r+"_"+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 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),X=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),G=(0,c.K2)((t,e,r)=>{let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");let o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Y=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),V=(0,c.K2)((t,e,r)=>{let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Z=(0,c.K2)((t,e,r)=>{let{themeVariables:i}=(0,h.zj)(),{strokeWidth:o}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),Q=(0,c.K2)((t,e,r)=>{let{themeVariables:i}=(0,h.zj)(),{strokeWidth:o,mainBkg:a}=i,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");s.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),s.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);let l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),J=(0,c.K2)((t,e,r)=>{let{themeVariables:i}=(0,h.zj)(),{strokeWidth:o}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),tt=(0,c.K2)((t,e,r)=>{let{themeVariables:i}=(0,h.zj)(),{strokeWidth:o,mainBkg:a}=i,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");s.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);let l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),te=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`)},"requirement_arrow"),tr=(0,c.K2)((t,e,r)=>{let{themeVariables:i}=(0,h.zj)(),{strokeWidth:o}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),ti={extension:q,composition:K,aggregation:R,dependency:z,lollipop:P,point:W,circle:N,cross:j,barb:H,barbNeo:U,only_one:X,zero_or_one:G,one_or_more:Y,zero_or_more:V,only_one_neo:Z,zero_or_one_neo:Q,one_or_more_neo:J,zero_or_more_neo:tt,requirement_arrow:te,requirement_contains:(0,c.K2)((t,e,r)=>{let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),requirement_arrow_neo:tr,requirement_contains_neo:(0,c.K2)((t,e,r)=>{let{themeVariables:i}=(0,h.zj)(),{strokeWidth:o}=i,a=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo")},to=D},48230(t,e,r){r.d(e,{O:()=>s,X:()=>l});var i=r(72903),o=r(90047),a=r(76338),s=(0,a.K2)(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins");async function l(t,e){let r=t.getElementsByTagName("img");if(!r||0===r.length)return;let s=""===e.replace(/]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",s){let e=(0,o.D7)().fontSize?(0,o.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[r=o.UI.fontSize]=(0,i.I5)(e),a=5*r+"px";t.style.minWidth=a,t.style.maxWidth=a}else t.style.width="100%";e(t)}(0,a.K2)(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}(0,a.K2)(l,"configureLabelImages")},51355(t,e,r){r.d(e,{XX:()=>d,q7:()=>p,sO:()=>c});var i=r(84660),o=r(43273),a=r(72903),s=r(90047),l=r(76338),n={common:s.Y2,getConfig:s.zj,insertCluster:o.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:o.on,interpolateToCurve:a.Ib,labelHelper:o.Zk,log:l.Rm,positionEdgeLabel:i.T_},h={},c=(0,l.K2)(t=>{for(let e of t)h[e.name]=e},"registerLayoutLoaders");(0,l.K2)(()=>{c([{name:"dagre",loader:(0,l.K2)(async()=>await Promise.all([r.e("4367"),r.e("7716"),r.e("957"),r.e("5676")]).then(r.bind(r,63127)),"loader")},{name:"cose-bilkent",loader:(0,l.K2)(async()=>await Promise.all([r.e("3745"),r.e("2493"),r.e("554")]).then(r.bind(r,50417)),"loader")}])},"registerDefaultLayoutLoaders")();var d=(0,l.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in h))throw Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let e of t.nodes){let r=e.domId||e.id;e.domId=`${t.diagramId}-${r}`}let r=h[t.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:a}=t.config,{useGradient:s,gradientStart:l,gradientStop:c}=a,d=e.attr("id");if(e.append("defs").append("filter").attr("id",`${d}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${d}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),s){let t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return i.render(t,e,n,{algorithm:r.algorithm})},"render"),p=(0,l.K2)((t="",{fallback:e="dagre"}={})=>{if(t in h)return t;if(e in h)return l.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},10601(t,e,r){r.d(e,{Fr:()=>c,GX:()=>h,KX:()=>n,WW:()=>s,ue:()=>a});var i=r(90047),o=r(76338),a=(0,o.K2)(t=>{let{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),s=(0,o.K2)(t=>{let e=l([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),l=(0,o.K2)(t=>{let e=new Map;return t.forEach(t=>{let[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),n=(0,o.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),h=(0,o.K2)(t=>{let{stylesArray:e}=s(t),r=[],i=[],o=[],a=[];return e.forEach(t=>{let e=t[0];n(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),c=(0,o.K2)((t,e)=>{let{themeVariables:r,handDrawnSeed:o}=(0,i.D7)(),{nodeBorder:a,mainBkg:l}=r,{stylesMap:n}=s(t);return Object.assign({roughness:.7,fill:n.get("fill")||l,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:n.get("stroke")||a,seed:o,strokeWidth:n.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:d(n.get("stroke-dasharray"))},e)},"userNodeOverrides"),d=(0,o.K2)(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(1===e.length){let t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},73825(t,e,r){r.d(e,{WY:()=>tP,pC:()=>tK,W6:()=>t1,Gc:()=>tI,GZ:()=>t8});var i=r(72903),o=r(90047),a=r(76338);let s=(t,e)=>!!t&&!!((e&&""===t.prefix||t.prefix)&&t.name),l=Object.freeze({left:0,top:0,width:16,height:16}),n=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...l,...n}),c=Object.freeze({...h,body:"",hidden:!1});function d(t,e){let r,i,o=(r={},!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0),(i=((t.rotate||0)+(e.rotate||0))%4)&&(r.rotate=i),r);for(let r in c)r in n?r in t&&!(r in o)&&(o[r]=n[r]):r in e?o[r]=e[r]:r in t&&(o[r]=t[r]);return o}function p(t,e,r){let i=t.icons,o=t.aliases||Object.create(null),a={};function s(t){a=d(i[t]||o[t],a)}return s(e),r.forEach(s),d(t,a)}let g=Object.freeze({...Object.freeze({width:null,height:null}),...n}),u=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function C(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;let i=t.split(u);if(null===i||!i.length)return t;let o=[],a=i.shift(),s=m.test(a);for(;;){if(s){let t=parseFloat(a);isNaN(t)?o.push(a):o.push(Math.ceil(t*e*r)/r)}else o.push(a);if(void 0===(a=i.shift()))return o.join("");s=!s}}let y=/\sid="(\S+)"/g,f=new Map;var x=r(79723);function k(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var b=k(),T={exec:()=>null};function B(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(S.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var w=(()=>{try{return!!RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,F=/(?:[*+-]|\d{1,9}[.)])/,L=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,v=B(L).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),M=B(L).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),E=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$=B(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),O=B(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,F).getRegex(),I="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",D=/|$))/,q=B("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",D).replace("tag",I).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K=B(E).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex(),R={blockquote:B(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",K).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:$,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:A,html:q,lheading:v,list:O,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:K,table:T,text:/^[^\n]+/},z=B("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex(),P={...R,lheading:M,table:z,paragraph:B(E).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",z).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex()},W={...R,html:B("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",D).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:T,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:B(E).replace("hr",A).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",v).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},N=/^( {2,}|\\)\n(?!\s*$)/,j=/[\p{P}\p{S}]/u,H=/[\s\p{P}\p{S}]/u,U=/[^\s\p{P}\p{S}]/u,X=B(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,H).getRegex(),G=/(?!~)[\p{P}\p{S}]/u,Y=B(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",w?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),V=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Z=B(V,"u").replace(/punct/g,j).getRegex(),Q=B(V,"u").replace(/punct/g,G).getRegex(),J="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",tt=B(J,"gu").replace(/notPunctSpace/g,U).replace(/punctSpace/g,H).replace(/punct/g,j).getRegex(),te=B(J,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,G).getRegex(),tr=B("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,U).replace(/punctSpace/g,H).replace(/punct/g,j).getRegex(),ti=B(/\\(punct)/,"gu").replace(/punct/g,j).getRegex(),to=B(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ta=B(D).replace("(?:--\x3e|$)","--\x3e").getRegex(),ts=B("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ta).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),tl=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,tn=B(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",tl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),th=B(/^!?\[(label)\]\[(ref)\]/).replace("label",tl).replace("ref",_).getRegex(),tc=B(/^!?\[(ref)\](?:\[\])?/).replace("ref",_).getRegex(),td=B("reflink|nolink(?!\\()","g").replace("reflink",th).replace("nolink",tc).getRegex(),tp=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,tg={_backpedal:T,anyPunctuation:ti,autolink:to,blockSkip:Y,br:N,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:T,emStrongLDelim:Z,emStrongRDelimAst:tt,emStrongRDelimUnd:tr,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:tn,nolink:tc,punctuation:X,reflink:th,reflinkSearch:td,tag:ts,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},tk=t=>tx[t];function tb(t,e){if(e){if(S.escapeTest.test(t))return t.replace(S.escapeReplace,tk)}else if(S.escapeTestNoEncode.test(t))return t.replace(S.escapeReplaceNoEncode,tk);return t}function tT(t){try{t=encodeURI(t).replace(S.percentDecode,"%")}catch{return null}return t}function tB(t,e){let r=t.replace(S.findPipe,(t,e,r)=>{let i=!1,o=e;for(;--o>=0&&"\\"===r[o];)i=!i;return i?"|":" |"}).split(S.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:tw(t,` `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let o=i[1];return e.split(` `).map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=o.length?t.slice(o.length):t}).join(` `)}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=tw(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:tw(e[0],` `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=tw(e[0],` `).split(` `),r="",i="",o=[];for(;t.length>0;){let e=!1,a=[],s;for(s=0;s1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let r=!1,i="",l="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let n=e[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split(` `,1)[0],c=!n.trim(),d=0;if(this.options.pedantic?(d=2,l=n.trimStart()):c?d=e[1].length+1:(d=(d=e[2].search(this.rules.other.nonSpaceChar))>4?1:d,l=n.slice(d),d+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+` `,t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),s=this.rules.other.htmlBeginRegex(d);for(;t;){let p=t.split(` `,1)[0],g;if(h=p,g=this.options.pedantic?h=h.replace(this.rules.other.listReplaceNesting," "):h.replace(this.rules.other.tabCharGlobal," "),o.test(h)||a.test(h)||s.test(h)||e.test(h)||r.test(h))break;if(g.search(this.rules.other.nonSpaceChar)>=d||!h.trim())l+=` `+g.slice(d);else{if(c||n.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(n)||a.test(n)||r.test(n))break;l+=` `+h}c||h.trim()||(c=!0),i+=p+` `,t=t.substring(p.length+1),n=g.slice(d)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(s=!0));let p=null,g;this.options.gfm&&(p=this.rules.other.listIsTask.exec(l))&&(g="[ ] "!==p[0],l=l.replace(this.rules.other.listReplaceTask,"")),o.items.push({type:"list_item",raw:i,task:!!p,checked:g,loose:!1,text:l,tokens:[]}),o.raw+=i}let l=o.items.at(-1);if(!l)return;l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t"space"===t.type);o.loose=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw))}if(o.loose)for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t=e[1].charAt(e[1].length-1)===` `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=tw(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(")"))return -1;let r=0;for(let e=0;e0?-2:-1}(e[2],0);if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),tS(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return tS(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!r||this.rules.inline.punctuation.exec(r))){let r=[...i[0]].length-1,o,a,s=r,l=0,n="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(n.lastIndex=0,e=e.slice(-1*t.length+r);null!=(i=n.exec(e));){if(!(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6]))continue;if(a=[...o].length,i[3]||i[4]){s+=a;continue}if((i[5]||i[6])&&r%3&&!((r+a)%3)){l+=a;continue}if((s-=a)>0)continue;a=Math.min(a,a+s+l);let e=[...i[0]][0].length,n=t.slice(0,r+i.index+e+a);if(Math.min(r,a)%2){let t=n.slice(1,-1);return{type:"em",raw:n,text:t,tokens:this.lexer.inlineTokens(t)}}let h=n.slice(2,-2);return{type:"strong",raw:n,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return r="@"===e[2]?"mailto:"+(t=e[1]):t=e[1],{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])r="mailto:"+(t=e[0]);else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},tF=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||b,this.options.tokenizer=this.options.tokenizer||new tA,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:S,block:ty.normal,inline:tf.normal};this.options.pedantic?(e.block=ty.pedantic,e.inline=tf.pedantic):this.options.gfm&&(e.block=ty.gfm,this.options.breaks?e.inline=tf.breaks:e.inline=tf.gfm),this.tokenizer.rules=e}static get rules(){return{block:ty,inline:tf}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(S.carriageReturn,` `),this.blockTokens(t,this.tokens);for(let t=0;t!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+=` `:e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(` `)?"":` `)+i.raw,r.text+=` `+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if((i=this.tokenizer.fences(t))||(i=this.tokenizer.heading(t))||(i=this.tokenizer.hr(t))||(i=this.tokenizer.blockquote(t))||(i=this.tokenizer.list(t))||(i=this.tokenizer.html(t))){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(` `)?"":` `)+i.raw,r.text+=` `+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if((i=this.tokenizer.table(t))||(i=this.tokenizer.lheading(t))){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let e=1/0,r=t.slice(1),i;this.options.extensions.startBlock.forEach(t=>{"number"==typeof(i=t.call({lexer:this},r))&&i>=0&&(e=Math.min(e,i))}),e<1/0&&e>=0&&(o=t.substring(0,e+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=e.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(` `)?"":` `)+i.raw,a.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);r?.type==="text"?(r.raw+=(r.raw.endsWith(` `)?"":` `)+i.raw,r.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,o=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;t;){let r;if(a||(s=""),a=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if((r=this.tokenizer.escape(t))||(r=this.tokenizer.tag(t))||(r=this.tokenizer.link(t))){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&i?.type==="text"?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if((r=this.tokenizer.emStrong(t,i,s))||(r=this.tokenizer.codespan(t))||(r=this.tokenizer.br(t))||(r=this.tokenizer.del(t))||(r=this.tokenizer.autolink(t))||!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startInline){let e=1/0,r=t.slice(1),i;this.options.extensions.startInline.forEach(t=>{"number"==typeof(i=t.call({lexer:this},r))&&i>=0&&(e=Math.min(e,i))}),e<1/0&&e>=0&&(o=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),a=!0;let i=e.at(-1);i?.type==="text"?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw Error(e)}}return e}},tL=class{options;parser;constructor(t){this.options=t||b}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(S.notSpaceStart)?.[0],o=t.replace(S.endingNewline,"")+` `;return i?'
'+(r?o:tb(o,!0))+`
`:"
"+(r?o:tb(o,!0))+`
`}blockquote({tokens:t}){return`
${this.parser.parse(t)}
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} `}hr(t){return`
`}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e `+i+" `}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+tb(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • `}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    `}table(t){let e="",r="";for(let e=0;e${i}`),` `+e+` `+i+`
    `}tablerow({text:t}){return` ${t} `}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+` `}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${tb(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),o=tT(t);if(null===o)return i;let a='
    "}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=tT(t);if(null===o)return tb(r);t=o;let a=`${r}{let o=t[i].flat(1/0);r=r.concat(this.walkTokens(o,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];r?e.renderers[t.name]=function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:e.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new tL(this.defaults);for(let r in t.renderer){if(!(r in e))throw Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=t.renderer[r],o=e[r];e[r]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=o.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new tA(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=t.tokenizer[r],o=e[r];e[r]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=o.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new tE;for(let r in t.hooks){if(!(r in e))throw Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=t.hooks[r],o=e[r];tE.passThroughHooks.has(r)?e[r]=t=>{if(this.defaults.async&&tE.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await i.call(e,t);return o.call(e,r)})();let a=i.call(e,t);return o.call(e,a)}:e[r]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await i.apply(e,t);return!1===r&&(r=await o.apply(e,t)),r})();let r=i.apply(e,t);return!1===r&&(r=o.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return tF.lex(t,e??this.defaults)}parser(t,e){return tM.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)return a(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let r=o.hooks?await o.hooks.preprocess(e):e,i=await (o.hooks?await o.hooks.provideLexer():t?tF.lex:tF.lexInline)(r,o),a=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(a,o.walkTokens));let s=await (o.hooks?await o.hooks.provideParser():t?tM.parse:tM.parseInline)(a,o);return o.hooks?await o.hooks.postprocess(s):s})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?tF.lex:tF.lexInline)(e,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():t?tM.parse:tM.parseInline)(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+=` Please report this to https://github.com/markedjs/marked.`,t){let t="

    An error occurred:

    "+tb(r.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function t$(t,e){return t_.parse(t,e)}t$.options=t$.setOptions=function(t){return t_.setOptions(t),t$.defaults=t_.defaults,b=t$.defaults,t$},t$.getDefaults=k,t$.defaults=b,t$.use=function(...t){return t_.use(...t),t$.defaults=t_.defaults,b=t$.defaults,t$},t$.walkTokens=function(t,e){return t_.walkTokens(t,e)},t$.parseInline=t_.parseInline,t$.Parser=tM,t$.parser=tM.parse,t$.Renderer=tL,t$.TextRenderer=tv,t$.Lexer=tF,t$.lexer=tF.lex,t$.Tokenizer=tA,t$.Hooks=tE,t$.parse=t$,t$.options,t$.setOptions,t$.use,t$.walkTokens,t$.parseInline,tM.parse,tF.lex;var tO=r(4397),tI={body:'?',height:80,width:80},tD=new Map,tq=new Map,tK=(0,a.K2)(t=>{for(let e of t){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.Rm.debug("Registering icon pack:",e.name),"loader"in e)tq.set(e.name,e.loader);else if("icons"in e)tD.set(e.name,e.icons);else throw a.Rm.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),tR=(0,a.K2)(async(t,e)=>{let r=((t,e,r,i="")=>{let o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let t=o.pop(),r=o.pop(),a={provider:o.length>0?o[0]:i,prefix:r,name:t};return e&&!s(a)?null:a}let a=o[0],l=a.split("-");if(l.length>1){let t={provider:i,prefix:l.shift(),name:l.join("-")};return e&&!s(t)?null:t}if(r&&""===i){let t={provider:i,prefix:"",name:a};return e&&!s(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw Error(`Invalid icon name: ${t}`);let i=r.prefix||e;if(!i)throw Error(`Icon name must contain a prefix: ${t}`);let o=tD.get(i);if(!o){let t=tq.get(i);if(!t)throw Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:i},tD.set(i,o)}catch(t){throw a.Rm.error(t),Error(`Failed to load icon set: ${r.prefix}`)}}let l=function(t,e){var r;let i,o,a;if(t.icons[e])return p(t,e,[]);let s=(r=[e],i=t.icons,o=t.aliases||Object.create(null),a=Object.create(null),(r||Object.keys(i).concat(Object.keys(o))).forEach(function t(e){if(i[e])return a[e]=[];if(!(e in a)){a[e]=null;let r=o[e]&&o[e].parent,i=r&&t(r);i&&(a[e]=[r].concat(i))}return a[e]}),a)[e];return s?p(t,e,s):null}(o,r.name);if(!l)throw Error(`Icon not found: ${t}`);return l},"getRegisteredIconData"),tz=(0,a.K2)(async t=>{try{return await tR(t),!0}catch{return!1}},"isIconAvailable"),tP=(0,a.K2)(async(t,e,r)=>{var i;let s,l,n,c,d,p,u,m,x,k,b,T,B,w;try{s=await tR(t,e?.fallbackPrefix)}catch(t){a.Rm.error(t),s=tI}let S=(i=s,c={...h,...i},d={...g,...e},p={left:c.left,top:c.top,width:c.width,height:c.height},u=c.body,[c,d].forEach(t=>{var e,r,i,o;let a,s,l=[],n=t.hFlip,h=t.vFlip,c=t.rotate;switch(n?h?c+=2:(l.push("translate("+(p.width+p.left).toString()+" "+(0-p.top).toString()+")"),l.push("scale(-1 1)"),p.top=p.left=0):h&&(l.push("translate("+(0-p.left).toString()+" "+(p.height+p.top).toString()+")"),l.push("scale(1 -1)"),p.top=p.left=0),c<0&&(c-=4*Math.floor(c/4)),c%=4){case 1:l.unshift("rotate(90 "+(a=p.height/2+p.top).toString()+" "+a.toString()+")");break;case 2:l.unshift("rotate(180 "+(p.width/2+p.left).toString()+" "+(p.height/2+p.top).toString()+")");break;case 3:l.unshift("rotate(-90 "+(a=p.width/2+p.left).toString()+" "+a.toString()+")")}c%2==1&&(p.left!==p.top&&(a=p.left,p.left=p.top,p.top=a),p.width!==p.height&&(a=p.width,p.width=p.height,p.height=a)),l.length&&(e=u,r='',i=(s=function(t,e="defs"){let r="",i=t.indexOf("<"+e);for(;i>=0;){let o=t.indexOf(">",i),a=t.indexOf("",a);if(-1===s)break;r+=t.slice(o+1,a).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}(e)).defs,o=r+s.content+"",u=i?""+i+""+o:o)}),m=d.width,x=d.height,k=p.width,b=p.height,null===m?l=C(n=null===x?"1em":"auto"===x?b:x,k/b):(l="auto"===m?k:m,n=null===x?C(l,b/k):"auto"===x?b:x),T={},(B=(t,e)=>{"unset"!==e&&"undefined"!==e&&"none"!==e&&(T[t]=e.toString())})("width",l),B("height",n),T.viewBox=(w=[p.left,p.top,k,b]).join(" "),{attributes:T,viewBox:w,body:u}),A=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let t in e)r+=" "+t+'="'+e[t]+'"';return'"+t+""}(function(t){let e,r=[];for(;e=y.exec(t);)r.push(e[1]);if(!r.length)return t;let i="suffix"+(0x1000000*Math.random()|Date.now()).toString(16);return r.forEach(e=>{var r;let o,a=(r=(r=e).replace(/[0-9]+$/,"")||"a",o=f.get(r)||0,f.set(r,o+1),o?`${r}${o}`:r),s=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),t=t.replace(RegExp(i,"g"),"")}(S.body),{...S.attributes,...r});return(0,o.jZ)(A,(0,o.zj)())},"getIconSVG");function tW(t,{markdownAutoWrap:e}){let r=t.replace(//g,"\n").replace(/\n{2,}/g,"\n");return(0,tO.T)(r)}function tN(t){return t.split(/\\n|\n|/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function tj(t,e={}){let r=tW(t,e),i=t$.lexer(r),o=[[]],s=0;function l(t,e="normal"){"text"===t.type?t.text.split("\n").forEach((t,r)=>{0!==r&&(s++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&o[s].push({content:t,type:e})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{l(e,t.type)}):"html"===t.type&&o[s].push({content:t.text,type:"normal"})}return(0,a.K2)(l,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{l(t)}):"html"===t.type?o[s].push({content:t.text,type:"normal"}):o[s].push({content:t.raw,type:"normal"})}),o}function tH(t){return t?`

    ${t.replace(/\\n|\n/g,"
    ")}

    `:""}function tU(t,{markdownAutoWrap:e}={}){let r=t$.lexer(t);function i(t){if("text"===t.type)return!1===e?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    ");if("strong"===t.type)return`${t.tokens?.map(i).join("")}`;if("em"===t.type)return`${t.tokens?.map(i).join("")}`;if("paragraph"===t.type)return`

    ${t.tokens?.map(i).join("")}

    `;if("space"===t.type)return"";else if("html"===t.type)return`${t.text}`;else if("escape"===t.type)return t.text;return a.Rm.warn(`Unsupported markdown: ${t.type}`),t.raw}return(0,a.K2)(i,"output"),r.map(i).join("")}function tX(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(t=>t.segment):[...t]}function tG(t,e){return tY(t,[],tX(e.content),e.type)}function tY(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];let[o,...a]=r,s=[...e,o];return t([{content:s.join(""),type:i}])?tY(t,s,a,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function tV(t,e){if(t.some(({content:t})=>t.includes("\n")))throw Error("splitLineToFitWidth does not support newlines in the line");return tZ(t,e)}function tZ(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());let a=t.shift()??{content:" ",type:"normal"},s=[...i];if(""!==o&&s.push({content:o,type:"normal"}),s.push(a),e(s))return tZ(t,e,r,s);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){let[i,o]=tG(e,a);r.push([i]),o.content&&t.unshift(o)}return tZ(t,e,r)}function tQ(t,e){e&&t.attr("style",e)}async function tJ(t,e,r,i,a=!1,s=(0,o.zj)()){let l=t.append("foreignObject");l.attr("width",`${Math.min(10*r,16384)}px`),l.attr("height",`${Math.min(10*r,16384)}px`);let n=l.append("xhtml:div"),h=(0,o.Wi)(e.label)?await (0,o.dj)(e.label.replace(o.Y2.lineBreakRegex,"\n"),s):(0,o.jZ)(e.label,s),c=e.isNode?"nodeLabel":"edgeLabel",d=n.append("span");d.html(h),tQ(d,e.labelStyle),d.attr("class",`${c} ${i}`),tQ(n,e.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==1/0&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let p=n.node().getBoundingClientRect();return p.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),p=n.node().getBoundingClientRect()),l.node()}function t0(t,e,r,i=!1){let o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function t2(t,e,r){let i=t.append("text"),o=t0(i,1,e);t4(o,r);let a=o.node().getComputedTextLength();return i.remove(),a}function t1(t,e,r){let i=t.append("text"),o=t0(i,1,e);t4(o,[{content:r,type:"normal"}]);let a=o.node()?.getBoundingClientRect();return a&&i.remove(),a}function t5(t,e,r,i=!1,o=!1){let s=e.append("g"),l=s.insert("rect").attr("class","background").attr("style","stroke: none"),n=s.append("text").attr("y","-10.1");o&&n.attr("text-anchor","middle");let h=0;for(let e of r){let r=(0,a.K2)(e=>t2(s,1.1,e)<=t,"checkWidth");for(let t of r(e)?[e]:tV(e,r))t4(t0(n,h,1.1,o),t),h++}if(!i)return n.node();{let t=n.node().getBBox();return l.attr("x",t.x-2).attr("y",t.y-2).attr("width",t.width+4).attr("height",t.height+4),s.node()}}function t3(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function t4(t,e){t.text(""),e.forEach((e,r)=>{let i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(t3(e.content)):i.text(" "+t3(e.content))})}async function t6(t,e={}){let r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,a)=>(r.push((async()=>{let r=`${i}:${a}`;return await tz(r)?await tP(r,void 0,{class:"label-icon"}):``})()),t));let i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}(0,a.K2)(tW,"preprocessMarkdown"),(0,a.K2)(tN,"nonMarkdownToLines"),(0,a.K2)(tj,"markdownToLines"),(0,a.K2)(tH,"nonMarkdownToHTML"),(0,a.K2)(tU,"markdownToHTML"),(0,a.K2)(tX,"splitTextToChars"),(0,a.K2)(tG,"splitWordToFitWidth"),(0,a.K2)(tY,"splitWordToFitWidthRecursion"),(0,a.K2)(tV,"splitLineToFitWidth"),(0,a.K2)(tZ,"splitLineToFitWidthRecursion"),(0,a.K2)(tQ,"applyStyle"),(0,a.K2)(tJ,"addHtmlSpan"),(0,a.K2)(t0,"createTspan"),(0,a.K2)(t2,"computeWidthOfText"),(0,a.K2)(t1,"computeDimensionOfText"),(0,a.K2)(t5,"createFormattedText"),(0,a.K2)(t3,"decodeHTMLEntities"),(0,a.K2)(t4,"updateTextContentAndStyles"),(0,a.K2)(t6,"replaceIconSubstring");var t8=(0,a.K2)(async(t,e="",{style:r="",isTitle:s=!1,classes:l="",useHtmlLabels:n=!0,markdown:h=!0,isNode:c=!0,width:d=200,addSvgBackground:p=!1}={},g)=>{if(a.Rm.debug("XYZ createText",e,r,s,l,n,c,"addSvgBackground: ",p),n){let a=h?tU(e,g):tH(e),s=await t6((0,i.Sm)(a),g),n=e.replace(/\\\\/g,"\\"),u={isNode:c,label:(0,o.Wi)(e)?n:s,labelStyle:r.replace("fill:","color:")};return await tJ(t,u,d,l,p,g)}{let o=(0,i.Sm)(e.replace(//g,"
    ")),a=t5(d,t,h?tj(o.replace("
    ","
    "),g):tN(o),!!e&&p,!c);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,x.Ltv)(a).attr("style",t)}else{let t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,x.Ltv)(a).select("rect").attr("style",t.replace(/background:/g,"fill:"));let e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,x.Ltv)(a).select("text").attr("style",e)}return s?(0,x.Ltv)(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,x.Ltv)(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a}},"createText")},51093(t,e,r){r.d(e,{D:()=>s});var i=r(90047),o=r(76338),a=r(79723),s=(0,o.K2)(t=>{let{securityLevel:e}=(0,i.D7)(),r=(0,a.Ltv)("body");if("sandbox"===e){let e=(0,a.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,a.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},39868(t,e,r){r.d(e,{H:()=>eq,r:()=>eD});var i,o=r(76338);function a(t){return null==t}function s(t){return"object"==typeof t&&null!==t}function l(t,e){var r,i="";for(r=0;rl&&(e=i-l+(a=" ... ").length),r-i>l&&(r=i+l-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+s,pos:i-e+a.length}}function p(t,e){return l(" ",e-t.length)+t}function g(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 r=/\r?\n|\r|\0/g,i=[0],o=[],a=-1;s=r.exec(t.buffer);)o.push(s.index),i.push(s.index+s[0].length),t.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s,n,h,c="",g=Math.min(t.line+e.linesAfter,o.length).toString().length,u=e.maxLength-(e.indent+g+3);for(n=1;n<=e.linesBefore&&!(a-n<0);n++)h=d(t.buffer,i[a-n],o[a-n],t.position-(i[a]-i[a-n]),u),c=l(" ",e.indent)+p((t.line-n+1).toString(),g)+" | "+h.str+"\n"+c;for(h=d(t.buffer,i[a],o[a],t.position,u),c+=l(" ",e.indent)+p((t.line+1).toString(),g)+" | "+h.str+"\n"+l("-",e.indent+g+3+h.pos)+"^\n",n=1;n<=e.linesAfter&&!(a+n>=o.length);n++)h=d(t.buffer,i[a+n],o[a+n],t.position-(i[a]-i[a+n]),u),c+=l(" ",e.indent)+p((t.line+n+1).toString(),g)+" | "+h.str+"\n";return c.replace(/\n$/,"")}(0,o.K2)(h,"formatError"),(0,o.K2)(c,"YAMLException$1"),c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,c.prototype.toString=(0,o.K2)(function(t){return this.name+": "+h(this,t)},"toString"),(0,o.K2)(d,"getLine"),(0,o.K2)(p,"padStart"),(0,o.K2)(g,"makeSnippet");var u=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],m=["scalar","sequence","mapping"];function C(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function y(t,e){if(Object.keys(e=e||{}).forEach(function(e){if(-1===u.indexOf(e))throw new c('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=C(e.styleAliases||null),-1===m.indexOf(this.kind))throw new c('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function f(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function x(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,o.K2)(i,"collectType"),t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,o.K2)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,o.K2)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,o.K2)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),q=RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function K(t){return null!==t&&!!q.test(t)&&"_"!==t[t.length-1]}function R(t){var e,r;return(r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e)?1===r?1/0:-1/0:".nan"===e?NaN:r*parseFloat(e,10)}(0,o.K2)(K,"resolveYamlFloat"),(0,o.K2)(R,"constructYamlFloat");var z=/^[-+]?[0-9]+e/;function P(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(1/0===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(-1/0===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n(t))return"-0.0";return r=t.toString(10),z.test(r)?r.replace("e",".e"):r}function W(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||n(t))}(0,o.K2)(P,"representYamlFloat"),(0,o.K2)(W,"isFloat");var N=new y("tag:yaml.org,2002:float",{kind:"scalar",resolve:K,construct:R,predicate:W,represent:P,defaultStyle:"lowercase"}),j=b.extend({implicit:[S,v,D,N]}),H=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),U=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]))?))?$");function X(t){return null!==t&&(null!==H.exec(t)||null!==U.exec(t))}function G(t){var e,r,i,o,a,s,l,n,h=0,c=null;if(null===(e=H.exec(t))&&(e=U.exec(t)),null===e)throw Error("Date resolve error");if(r=+e[1],i=e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,i,o));if(a=+e[4],s=+e[5],l=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h*=1}return e[9]&&(c=(60*e[10]+ +(e[11]||0))*6e4,"-"===e[9]&&(c=-c)),n=new Date(Date.UTC(r,i,o,a,s,l,h)),c&&n.setTime(n.getTime()-c),n}function Y(t){return t.toISOString()}(0,o.K2)(X,"resolveYamlTimestamp"),(0,o.K2)(G,"constructYamlTimestamp"),(0,o.K2)(Y,"representYamlTimestamp");var V=new y("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:X,construct:G,instanceOf:Date,represent:Y});function Z(t){return"<<"===t||null===t}(0,o.K2)(Z,"resolveYamlMerge");var Q=new y("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Z}),J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function tt(t){if(null===t)return!1;var e,r,i=0,o=t.length;for(r=0;r64)){if(e<0)return!1;i+=6}return i%8==0}function te(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|J.indexOf(i.charAt(e));return 0==(r=o%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)}function tr(t){var e,r,i="",o=0,a=t.length;for(e=0;e>18&63],i+=J[o>>12&63],i+=J[o>>6&63],i+=J[63&o]),o=(o<<8)+t[e];return 0==(r=a%3)?(i+=J[o>>18&63],i+=J[o>>12&63],i+=J[o>>6&63],i+=J[63&o]):2===r?(i+=J[o>>10&63],i+=J[o>>4&63],i+=J[o<<2&63],i+=J[64]):1===r&&(i+=J[o>>2&63],i+=J[o<<4&63],i+=J[64],i+=J[64]),i}function ti(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,o.K2)(tt,"resolveYamlBinary"),(0,o.K2)(te,"constructYamlBinary"),(0,o.K2)(tr,"representYamlBinary"),(0,o.K2)(ti,"isBinary");var to=new y("tag:yaml.org,2002:binary",{kind:"scalar",resolve:tt,construct:te,predicate:ti,represent:tr}),ta=Object.prototype.hasOwnProperty,ts=Object.prototype.toString;function tl(t){if(null===t)return!0;var e,r,i,o,a,s=[];for(e=0,r=t.length;e>10)+55296,(t-65536&1023)+56320)}function tI(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,o.K2)(tS,"_class"),(0,o.K2)(tA,"is_EOL"),(0,o.K2)(tF,"is_WHITE_SPACE"),(0,o.K2)(tL,"is_WS_OR_EOL"),(0,o.K2)(tv,"is_FLOW_INDICATOR"),(0,o.K2)(tM,"fromHexCode"),(0,o.K2)(tE,"escapedHexLen"),(0,o.K2)(t_,"fromDecimalCode"),(0,o.K2)(t$,"simpleEscapeSequence"),(0,o.K2)(tO,"charFromCodepoint"),(0,o.K2)(tI,"setProperty");var tD=Array(256),tq=Array(256);for(i=0;i<256;i++)tD[i]=+!!t$(i),tq[i]=t$(i);function tK(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||tf,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 tR(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=g(r),new c(e,r)}function tz(t,e){throw tR(t,e)}function tP(t,e){t.onWarning&&t.onWarning.call(null,tR(t,e))}(0,o.K2)(tK,"State$1"),(0,o.K2)(tR,"generateError"),(0,o.K2)(tz,"throwError"),(0,o.K2)(tP,"throwWarning");var tW={YAML:(0,o.K2)(function(t,e,r){var i,o,a;null!==t.version&&tz(t,"duplication of %YAML directive"),1!==r.length&&tz(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&tz(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),1!==o&&tz(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&tP(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,o.K2)(function(t,e,r){var i,o;2!==r.length&&tz(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],tB.test(i)||tz(t,"ill-formed tag handle (first argument) of the TAG directive"),tx.call(t.tagMap,i)&&tz(t,'there is a previously declared suffix for "'+i+'" tag handle'),tw.test(o)||tz(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(e){tz(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o},"handleTagDirective")};function tN(t,e,r,i){var o,a,s,l;if(e1&&(t.result+=l("\n",e-1))}function tV(t,e,r){var i,o,a,s,l,n,h,c,d=t.kind,p=t.result;if(tL(c=t.input.charCodeAt(t.position))||tv(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c||(63===c||45===c)&&(tL(i=t.input.charCodeAt(t.position+1))||r&&tv(i)))return!1;for(t.kind="scalar",t.result="",o=a=t.position,s=!1;0!==c;){if(58===c){if(tL(i=t.input.charCodeAt(t.position+1))||r&&tv(i))break}else if(35===c){if(tL(t.input.charCodeAt(t.position-1)))break}else if(t.position===t.lineStart&&tG(t)||r&&tv(c))break;else if(tA(c)){if(l=t.line,n=t.lineStart,h=t.lineIndent,tX(t,!1,-1),t.lineIndent>=e){s=!0,c=t.input.charCodeAt(t.position);continue}t.position=a,t.line=l,t.lineStart=n,t.lineIndent=h;break}s&&(tN(t,o,a,!1),tY(t,t.line-l),o=a=t.position,s=!1),tF(c)||(a=t.position+1),c=t.input.charCodeAt(++t.position)}return tN(t,o,a,!1),!!t.result||(t.kind=d,t.result=p,!1)}function tZ(t,e){var r,i,o;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(tN(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,o=t.position}else tA(r)?(tN(t,i,o,!0),tY(t,tX(t,!1,e)),i=o=t.position):t.position===t.lineStart&&tG(t)?tz(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);tz(t,"unexpected end of the stream within a single quoted scalar")}function tQ(t,e){var r,i,o,a,s,l;if(34!==(l=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(l=t.input.charCodeAt(t.position));)if(34===l)return tN(t,r,t.position,!0),t.position++,!0;else if(92===l){if(tN(t,r,t.position,!0),tA(l=t.input.charCodeAt(++t.position)))tX(t,!1,e);else if(l<256&&tD[l])t.result+=tq[l],t.position++;else if((s=tE(l))>0){for(o=s,a=0;o>0;o--)(s=tM(l=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:tz(t,"expected hexadecimal character");t.result+=tO(a),t.position++}else tz(t,"unknown escape sequence");r=i=t.position}else tA(l)?(tN(t,r,i,!0),tY(t,tX(t,!1,e)),r=i=t.position):t.position===t.lineStart&&tG(t)?tz(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position);tz(t,"unexpected end of the stream within a double quoted scalar")}function tJ(t,e){var r,i,o,a,s,l,n,h,c,d,p,g,u=!0,m=t.tag,C=t.anchor,y=Object.create(null);if(91===(g=t.input.charCodeAt(t.position)))s=93,h=!1,a=[];else{if(123!==g)return!1;s=125,h=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),g=t.input.charCodeAt(++t.position);0!==g;){if(tX(t,!0,e),(g=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=m,t.anchor=C,t.kind=h?"mapping":"sequence",t.result=a,!0;u?44===g&&tz(t,"expected the node content, but found ','"):tz(t,"missed comma between flow collection entries"),d=c=p=null,l=n=!1,63===g&&tL(t.input.charCodeAt(t.position+1))&&(l=n=!0,t.position++,tX(t,!0,e)),r=t.line,i=t.lineStart,o=t.position,t6(t,e,1,!1,!0),d=t.tag,c=t.result,tX(t,!0,e),g=t.input.charCodeAt(t.position),(n||t.line===r)&&58===g&&(l=!0,g=t.input.charCodeAt(++t.position),tX(t,!0,e),t6(t,e,1,!1,!0),p=t.result),h?tH(t,a,y,d,c,p,r,i,o):l?a.push(tH(t,null,y,d,c,p,r,i,o)):a.push(c),tX(t,!0,e),44===(g=t.input.charCodeAt(t.position))?(u=!0,g=t.input.charCodeAt(++t.position)):u=!1}tz(t,"unexpected end of the stream within a flow collection")}function t0(t,e){var r,i,o,a,s=1,n=!1,h=!1,c=e,d=0,p=!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)1===s?s=43===a?3:2:tz(t,"repeat of a chomping mode identifier");else if((o=t_(a))>=0)0===o?tz(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?tz(t,"repeat of an indentation width identifier"):(c=e+o-1,h=!0);else break;if(tF(a)){do a=t.input.charCodeAt(++t.position);while(tF(a));if(35===a)do a=t.input.charCodeAt(++t.position);while(!tA(a)&&0!==a)}for(;0!==a;){for(tU(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!h||t.lineIndentc&&(c=t.lineIndent),tA(a)){d++;continue}if(t.lineIndente)&&0!==i)tz(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(s=t.line,l=t.lineStart,n=t.position),t6(t,e,4,!0,o)&&(y?m=t.result:C=t.result),y||(tH(t,p,g,u,m,C,s,l,n),u=m=C=null),tX(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==h)tz(t,"bad indentation of a mapping entry");else if(t.lineIndente?u=1:t.lineIndent===e?u=0:t.lineIndente?u=1:t.lineIndent===e?u=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),n=0,h=t.implicitTypes.length;n"),null!==t.result&&d.kind!==t.kind&&tz(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):tz(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||C}function t8(t){var e,r,i,o,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(o=t.input.charCodeAt(t.position))&&(tX(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0)&&37===o);){for(s=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!tL(o);)o=t.input.charCodeAt(++t.position);for(r=t.input.slice(e,t.position),i=[],r.length<1&&tz(t,"directive name must not be less than one character in length");0!==o;){for(;tF(o);)o=t.input.charCodeAt(++t.position);if(35===o){do o=t.input.charCodeAt(++t.position);while(0!==o&&!tA(o));break}if(tA(o))break;for(e=t.position;0!==o&&!tL(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==o&&tU(t),tx.call(tW,r)?tW[r](t,r,i):tP(t,'unknown document directive "'+r+'"')}if(tX(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,tX(t,!0,-1)):s&&tz(t,"directives end mark is expected"),t6(t,t.lineIndent-1,4,!1,!0),tX(t,!0,-1),t.checkLineBreaks&&tb.test(t.input.slice(a,t.position))&&tP(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&tG(t)){46===t.input.charCodeAt(t.position)&&(t.position+=3,tX(t,!0,-1));return}t.position=55296&&i<=56319&&e+1=56320&&r<=57343?(i-55296)*1024+r-56320+65536:i}function ex(t){return/^\n* /.test(t)}function ek(t,e,r,i,o,a,s,l){var n,h=0,c=null,d=!1,p=!1,g=-1!==i,u=-1,m=eC(ef(t,0))&&ey(ef(t,t.length-1));if(e||s)for(n=0;n=65536?n+=2:n++){if(!eg(h=ef(t,n)))return 5;m=m&&em(h,c,l),c=h}else{for(n=0;n=65536?n+=2:n++){if(10===(h=ef(t,n)))d=!0,g&&(p=p||n-u-1>i&&" "!==t[u+1],u=n);else if(!eg(h))return 5;m=m&&em(h,c,l),c=h}p=p||g&&n-u-1>i&&" "!==t[u+1]}return d||p?r>9&&ex(t)?5:s?2===a?5:2:p?4:3:!m||s||o(t)?2===a?5:2:1}function eb(t,e,r,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==eo.indexOf(e)||ea.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),l=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),n=i||t.flowLevel>-1&&r>=t.flowLevel;function h(e){return ed(t,e)}switch((0,o.K2)(h,"testAmbiguity"),ek(e,n,t.indent,l,h,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+eT(e,t.indent)+eB(eh(e,s));case 4:return">"+eT(e,t.indent)+eB(eh(ew(e,l),s));case 5:return'"'+eA(e)+'"';default:throw new c("impossible error: invalid scalar style")}}()}function eT(t,e){var r=ex(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function eB(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function ew(t,e){for(var r,i,o,a=/(\n+)([^\n]*)/g,s=(a.lastIndex=r=-1!==(r=t.indexOf("\n"))?r:t.length,eS(t.slice(0,r),e)),l="\n"===t[0]||" "===t[0];o=a.exec(t);){var n=o[1],h=o[2];i=" "===h[0],s+=n+(l||i||""===h?"":"\n")+eS(h,e),l=i}return s}function eS(t,e){if(""===t||" "===t[0])return t;for(var r,i,o=/ [^ ]/g,a=0,s=0,l=0,n="";r=o.exec(t);)(l=r.index)-a>e&&(i=s>a?s:l,n+="\n"+t.slice(a,i),a=i+1),s=l;return n+="\n",t.length-a>e&&s>a?n+=t.slice(a,s)+"\n"+t.slice(s+1):n+=t.slice(a),n.slice(1)}function eA(t){for(var e,r="",i=0,o=0;o=65536?o+=2:o++)!(e=ei[i=ef(t,o)])&&eg(i)?(r+=t[o],i>=65536&&(r+=t[o+1])):r+=e||el(i);return r}function eF(t,e,r){var i,o,a,s="",l=t.tag;for(i=0,o=r.length;i1024&&(l+="? "),l+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),e_(t,e,s,!1,!1)&&(l+=t.dump,n+=l));t.tag=h,t.dump="{"+n+"}"}function eM(t,e,r,i){var o,a,s,l,n,h,d="",p=t.tag,g=Object.keys(r);if(!0===t.sortKeys)g.sort();else if("function"==typeof t.sortKeys)g.sort(t.sortKeys);else if(t.sortKeys)throw new c("sortKeys must be a boolean or a function");for(o=0,a=g.length;o1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,n&&(h+=ec(t,e)),e_(t,e+1,l,!0,n)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",h+=t.dump,d+=h));t.tag=p,t.dump=d||"{}"}function eE(t,e,r){var i,o,a,s,l,n;for(a=0,s=(o=r?t.explicitTypes:t.implicitTypes).length;a tag resolver accepts not "'+n+'" style');t.dump=i}return!0}return!1}function e_(t,e,r,i,o,a,s){t.tag=null,t.dump=r,eE(t,r,!1)||eE(t,r,!0);var l=ee.call(t.dump),n=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var h,d,p,g="[object Object]"===l||"[object Array]"===l;if(g&&(p=-1!==(d=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||p||2!==t.indent&&e>0)&&(o=!1),p&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(g&&p&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(eM(t,e,t.dump,o),p&&(t.dump="&ref_"+d+t.dump)):(ev(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!s&&e>0?eL(t,e-1,t.dump,o):eL(t,e,t.dump,o),p&&(t.dump="&ref_"+d+t.dump)):(eF(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if("[object String]"===l)"?"!==t.tag&&eb(t,t.dump,e,a,n);else{if("[object Undefined]"===l||t.skipInvalid)return!1;throw new c("unacceptable kind of an object to dump "+l)}null!==t.tag&&"?"!==t.tag&&(h=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),h="!"===t.tag[0]?"!"+h:"tag:yaml.org,2002:"===h.slice(0,18)?"!!"+h.slice(18):"!<"+h+">",t.dump=h+" "+t.dump)}return!0}function e$(t,e){var r,i,o=[],a=[];for(eO(t,o,a),r=0,i=a.length;rrh});var i=r(51093),o=r(39868),a=r(51355);r(84660),r(99249),r(43273),r(48230),r(10601);var s=r(73825),l=r(72903),n=r(90047),h=r(76338),c=r(4397),d=r(79723),p=r(10925),g=r(12525),u=r(93629),m=r(60804),C=r(31968),y=r(13507),f=r(8987),x=r(92370),k=r(71253);function b(t){if(null==t)return!0;if((0,f.X)(t))return("function"==typeof t.splice||"string"==typeof t||!!(0,y.P)(t)||!!(0,k.i)(t)||!!(0,x.N)(t))&&0===t.length;if("object"==typeof t||"function"==typeof t){let e;if(t instanceof Map||t instanceof Set)return 0===t.size;let r=Object.keys(t);return(e=t?.constructor,t===("function"==typeof e?e.prototype:Object.prototype))?0===r.filter(t=>"constructor"!==t).length:0===r.length}return!0}var T={id:"c4",detector:(0,h.K2)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,h.K2)(async()=>{let{diagram:t}=await r.e("1627").then(r.bind(r,2758));return{id:"c4",diagram:t}},"loader")},B="flowchart",w=(0,h.K2)((t,e)=>e?.flowchart?.defaultRenderer!=="dagre-wrapper"&&e?.flowchart?.defaultRenderer!=="elk"&&/^\s*graph/.test(t),"detector"),S=(0,h.K2)(async()=>{let{diagram:t}=await r.e("7493").then(r.bind(r,61652));return{id:B,diagram:t}},"loader"),A={id:B,detector:w,loader:S},F="flowchart-v2",L=(0,h.K2)((t,e)=>e?.flowchart?.defaultRenderer!=="dagre-d3"&&(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),!!/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"||/^\s*flowchart/.test(t)),"detector"),v=(0,h.K2)(async()=>{let{diagram:t}=await r.e("7493").then(r.bind(r,61652));return{id:F,diagram:t}},"loader"),M={id:F,detector:L,loader:v},E={id:"er",detector:(0,h.K2)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{let{diagram:t}=await r.e("2619").then(r.bind(r,29254));return{id:"er",diagram:t}},"loader")},_="gitGraph",$=(0,h.K2)(t=>/^\s*gitGraph/.test(t),"detector"),O=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9546"),r.e("249")]).then(r.bind(r,64416));return{id:_,diagram:t}},"loader"),I={id:_,detector:$,loader:O},D="gantt",q=(0,h.K2)(t=>/^\s*gantt/.test(t),"detector"),K=(0,h.K2)(async()=>{let{diagram:t}=await r.e("1997").then(r.bind(r,92991));return{id:D,diagram:t}},"loader"),R={id:D,detector:q,loader:K},z="info",P=(0,h.K2)(t=>/^\s*info/.test(t),"detector"),W=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9546"),r.e("9738")]).then(r.bind(r,16305));return{id:z,diagram:t}},"loader"),N={id:z,detector:P,loader:W},j={id:"pie",detector:(0,h.K2)(t=>/^\s*pie/.test(t),"detector"),loader:(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9546"),r.e("1361")]).then(r.bind(r,16056));return{id:"pie",diagram:t}},"loader")},H="quadrantChart",U=(0,h.K2)(t=>/^\s*quadrantChart/.test(t),"detector"),X=(0,h.K2)(async()=>{let{diagram:t}=await r.e("9126").then(r.bind(r,92949));return{id:H,diagram:t}},"loader"),G={id:H,detector:U,loader:X},Y="xychart",V=(0,h.K2)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),Z=(0,h.K2)(async()=>{let{diagram:t}=await r.e("2810").then(r.bind(r,77569));return{id:Y,diagram:t}},"loader"),Q={id:Y,detector:V,loader:Z},J="requirement",tt=(0,h.K2)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),te=(0,h.K2)(async()=>{let{diagram:t}=await r.e("4253").then(r.bind(r,96764));return{id:J,diagram:t}},"loader"),tr={id:J,detector:tt,loader:te},ti="sequence",to=(0,h.K2)(t=>/^\s*sequenceDiagram/.test(t),"detector"),ta=(0,h.K2)(async()=>{let{diagram:t}=await r.e("3190").then(r.bind(r,66805));return{id:ti,diagram:t}},"loader"),ts={id:ti,detector:to,loader:ta},tl="class",tn=(0,h.K2)((t,e)=>e?.class?.defaultRenderer!=="dagre-wrapper"&&/^\s*classDiagram/.test(t),"detector"),th=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9053"),r.e("3462")]).then(r.bind(r,27797));return{id:tl,diagram:t}},"loader"),tc={id:tl,detector:tn,loader:th},td="classDiagram",tp=(0,h.K2)((t,e)=>!!/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"||/^\s*classDiagram-v2/.test(t),"detector"),tg=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9053"),r.e("2186")]).then(r.bind(r,12625));return{id:td,diagram:t}},"loader"),tu={id:td,detector:tp,loader:tg},tm="state",tC=(0,h.K2)((t,e)=>e?.state?.defaultRenderer!=="dagre-wrapper"&&/^\s*stateDiagram/.test(t),"detector"),ty=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("4367"),r.e("7716"),r.e("957"),r.e("3995"),r.e("2043")]).then(r.bind(r,99558));return{id:tm,diagram:t}},"loader"),tf={id:tm,detector:tC,loader:ty},tx="stateDiagram",tk=(0,h.K2)((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),tb=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("3995"),r.e("1509")]).then(r.bind(r,99524));return{id:tx,diagram:t}},"loader"),tT={id:tx,detector:tk,loader:tb},tB="journey",tw=(0,h.K2)(t=>/^\s*journey/.test(t),"detector"),tS=(0,h.K2)(async()=>{let{diagram:t}=await r.e("394").then(r.bind(r,87729));return{id:tB,diagram:t}},"loader"),tA={id:tB,detector:tw,loader:tS},tF={draw:(0,h.K2)((t,e,r)=>{h.Rm.debug("rendering svg for syntax error\n");let o=(0,i.D)(e),a=o.append("g");o.attr("viewBox","0 0 2412 512"),(0,n.a$)(o,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},tL={db:{},renderer:tF,parser:{parse:(0,h.K2)(()=>{},"parse")}},tv="flowchart-elk",tM=(0,h.K2)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&e?.flowchart?.defaultRenderer==="elk")&&(e.layout="elk",!0),"detector"),tE=(0,h.K2)(async()=>{let{diagram:t}=await r.e("7493").then(r.bind(r,61652));return{id:tv,diagram:t}},"loader"),t_={id:tv,detector:tM,loader:tE},t$="timeline",tO=(0,h.K2)(t=>/^\s*timeline/.test(t),"detector"),tI=(0,h.K2)(async()=>{let{diagram:t}=await r.e("4335").then(r.bind(r,39554));return{id:t$,diagram:t}},"loader"),tD={id:t$,detector:tO,loader:tI},tq="mindmap",tK=(0,h.K2)(t=>/^\s*mindmap/.test(t),"detector"),tR=(0,h.K2)(async()=>{let{diagram:t}=await r.e("2211").then(r.bind(r,53726));return{id:tq,diagram:t}},"loader"),tz={id:tq,detector:tK,loader:tR},tP="kanban",tW=(0,h.K2)(t=>/^\s*kanban/.test(t),"detector"),tN=(0,h.K2)(async()=>{let{diagram:t}=await r.e("3541").then(r.bind(r,14724));return{id:tP,diagram:t}},"loader"),tj={id:tP,detector:tW,loader:tN},tH="sankey",tU=(0,h.K2)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),tX=(0,h.K2)(async()=>{let{diagram:t}=await r.e("1598").then(r.bind(r,81245));return{id:tH,diagram:t}},"loader"),tG={id:tH,detector:tU,loader:tX},tY="packet",tV=(0,h.K2)(t=>/^\s*packet(-beta)?/.test(t),"detector"),tZ=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9546"),r.e("241")]).then(r.bind(r,56872));return{id:tY,diagram:t}},"loader"),tQ={id:tY,detector:tV,loader:tZ},tJ="radar",t0=(0,h.K2)(t=>/^\s*radar-beta/.test(t),"detector"),t2=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9546"),r.e("274")]).then(r.bind(r,5129));return{id:tJ,diagram:t}},"loader"),t1={id:tJ,detector:t0,loader:t2},t5="block",t3=(0,h.K2)(t=>/^\s*block(-beta)?/.test(t),"detector"),t4=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("7716"),r.e("430")]).then(r.bind(r,99691));return{id:t5,diagram:t}},"loader"),t6={id:t5,detector:t3,loader:t4},t8="treeView",t7=(0,h.K2)(t=>/^\s*treeView-beta/.test(t),"detector"),t9=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9546"),r.e("7400")]).then(r.bind(r,68027));return{id:t8,diagram:t}},"loader"),et={id:t8,detector:t7,loader:t9},ee="architecture",er=(0,h.K2)(t=>/^\s*architecture/.test(t),"detector"),ei=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9546"),r.e("3745"),r.e("4990"),r.e("7535")]).then(r.bind(r,8306));return{id:ee,diagram:t}},"loader"),eo={id:ee,detector:er,loader:ei},ea="eventmodeling",es=(0,h.K2)(t=>/^\s*eventmodeling/.test(t),"detector"),el=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9546"),r.e("2832")]).then(r.bind(r,77059));return{id:ea,diagram:t}},"loader"),en={id:ea,detector:es,loader:el},eh="ishikawa",ec=(0,h.K2)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),ed=(0,h.K2)(async()=>{let{diagram:t}=await r.e("2322").then(r.bind(r,50148));return{id:eh,diagram:t}},"loader"),ep={id:eh,detector:ec,loader:ed},eg="venn",eu=(0,h.K2)(t=>/^\s*venn-beta/.test(t),"detector"),em=(0,h.K2)(async()=>{let{diagram:t}=await r.e("7265").then(r.bind(r,41080));return{id:eg,diagram:t}},"loader"),eC={id:eg,detector:eu,loader:em},ey="treemap",ef=(0,h.K2)(t=>/^\s*treemap/.test(t),"detector"),ex=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9546"),r.e("9401")]).then(r.bind(r,32128));return{id:ey,diagram:t}},"loader"),ek={id:ey,detector:ef,loader:ex},eb="wardley-beta",eT=(0,h.K2)(t=>/^\s*wardley-beta/i.test(t),"detector"),eB=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e("9546"),r.e("9757")]).then(r.bind(r,12828));return{id:eb,diagram:t}},"loader"),ew={id:eb,detector:eT,loader:eB},eS=!1,eA=(0,h.K2)(()=>{eS||(eS=!0,(0,n.Js)("error",tL,t=>"error"===t.toLowerCase().trim()),(0,n.Js)("---",{db:{clear:(0,h.K2)(()=>{},"clear")},styles:{},renderer:{draw:(0,h.K2)(()=>{},"draw")},parser:{parse:(0,h.K2)(()=>{throw 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 un-indented `---` blocks")},"parse")},init:(0,h.K2)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,n.Xd)(t_,tz,eo),(0,n.Xd)(T,tj,tu,tc,E,R,N,j,tr,ts,M,A,tD,I,tT,tf,tA,G,tG,tQ,Q,t6,en,et,t1,ep,ek,eC,ew))},"addDiagrams"),eF=(0,h.K2)(async()=>{h.Rm.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(n.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,n.Gs)(t)}catch{try{let{diagram:t,id:i}=await r();(0,n.Js)(i,t,e)}catch(e){throw h.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete n.mW[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){for(let e of(h.Rm.error(`Failed to load ${t.length} external diagrams`),t))h.Rm.error(e);throw Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function eL(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function ev(t,e,r,i){if(void 0!==t.insert){if(r){let e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){let r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,h.K2)(eL,"setA11yDiagramInfo"),(0,h.K2)(ev,"addSVGa11yTitleDescription");var eM=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{(0,h.K2)(this,"Diagram")}static async fromText(e,r={}){let i=(0,n.zj)(),o=(0,n.Ch)(e,i);e=(0,l.C4)(e)+"\n";try{(0,n.Gs)(o)}catch{let t=(0,n.J$)(o);if(!t)throw new n.C0(`Diagram ${o} not found.`);let{id:e,diagram:r}=await t();(0,n.Js)(e,r)}let{db:a,parser:s,renderer:h,init:c}=(0,n.Gs)(o);return s.parser&&(s.parser.yy=a),a.clear?.(),c?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new t(o,e,a,s,h)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},eE=[],e_=(0,h.K2)(()=>{eE.forEach(t=>{t()}),eE=[]},"attachFunctions"),e$=(0,h.K2)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function eO(t){let e=t.match(n.EJ);if(!e)return{text:t,metadata:{}};let r=(0,o.H)(e[1],{schema:o.r})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;let i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}(0,h.K2)(eO,"extractFrontMatter");var eI=(0,h.K2)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),eD=(0,h.K2)(t=>{let{text:e,metadata:r}=eO(t),{displayMode:i,title:o,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:o,config:a,text:e}},"processFrontmatter"),eq=(0,h.K2)(t=>{let e=l._K.detectInit(t)??{},r=l._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):r?.type==="wrap"&&(e.wrap=!0),{text:(0,l.vU)(t),directive:e}},"processDirectives");function eK(t){let e=eD(eI(t)),r=eq(e.text),i=(0,l.$t)(e.config,r.directive);return{code:t=e$(r.text),title:e.title,config:i}}function eR(t){return btoa(Array.from(new TextEncoder().encode(t),t=>String.fromCodePoint(t)).join(""))}(0,h.K2)(eK,"preprocessDiagram"),(0,h.K2)(eR,"toBase64");var ez=["foreignobject"],eP=["dominant-baseline"];function eW(t){let e=eK(t);return(0,n.cL)(),(0,n.xA)(e.config??{}),e}async function eN(t,e){eA();try{let{code:e,config:r}=eW(t);return{diagramType:(await e2(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,h.K2)(eW,"processAndSetConfigs"),(0,h.K2)(eN,"parse");var ej=(0,h.K2)((t,e,r=[])=>{let i=(0,n.Df)(`{ ${r.join(" !important; ")} !important; }`);return`.${t} ${e} ${i}`},"cssImportantStyles"),eH=(0,h.K2)((t,e=new Map)=>{let r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){let i=(0,n.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{b(t.styles)||i.forEach(e=>{r.insertRule(ej(t.id,e,t.styles),r.cssRules.length)}),b(t.textStyles)||r.insertRule(ej(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let i="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){let e=new CSSStyleSheet;e.replaceSync(t.themeCSS),i=(0,n.KG)(e)+"\n"}else i+=`${t.themeCSS} `;return i+(0,n.KG)(r)},"createCssStyles"),eU=(0,h.K2)((t,e)=>{var r,i;return(0,p.l)((0,g.wE)(`${t}{${e}}`),(r=[(0,h.K2)(function(e,r,i,o){"rule"===e.type&&Array.isArray(e.props)?e.parent&&e.parent.type===m.Sv||(e.props=e.props.map(e=>e.startsWith(t)?e:`${t} ${e}`)):e.type.startsWith("@")&&([m.Rn,m.$1,m.IO,m.hx,"@container","@starting-style",m.Sv].includes(e.type)||(h.Rm.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=m.YK))},"addNamespace"),p.A],i=(0,u.FK)(r),function(t,e,o,a){for(var s="",l=0;l{let o=eH(t,r),a=(0,n.tM)(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return eU(i,a)},"createUserStyles"),eG=(0,h.K2)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(i=(0,l.Sm)(i)).replace(/
    /g,"
    ")},"cleanUpSvgCode"),eY=(0,h.K2)((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%",i=eR(`${t}`);return``},"putIntoIFrame"),eV=(0,h.K2)((t,e,r,i,o)=>{let a=t.append("div");a.attr("id",r),i&&a.attr("style",i);let s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&s.attr("xmlns:xlink",o),s.append("g"),t},"appendDivSvgG");function eZ(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,h.K2)(eZ,"sandboxedIframe");var eQ=(0,h.K2)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),eJ=(0,h.K2)(async function(t,e,r){let i,o;eA();let a=eW(e);e=a.code;let s=(0,n.zj)();h.Rm.debug(s),e.length>(s?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let l=`#${t}`,c="i"+t,p="#"+c,g="d"+t,u="#"+g,m=(0,h.K2)(()=>{let t=f?p:u,e=(0,d.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements"),y=(0,d.Ltv)(document.body),f="sandbox"===s.securityLevel,x="loose"===s.securityLevel,k=s.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),f){let t=eZ((0,d.Ltv)(r),c);(y=(0,d.Ltv)(t.nodes()[0].contentDocument.body)).node().style.margin="0"}else y=(0,d.Ltv)(r);eV(y,t,g,`font-family: ${k}`,"http://www.w3.org/1999/xlink")}else{if(eQ(document,t,g,c),f){let t=eZ((0,d.Ltv)(document.body),c);(y=(0,d.Ltv)(t.nodes()[0].contentDocument.body)).node().style.margin="0"}else y=(0,d.Ltv)("body");eV(y,t,g)}try{i=await eM.fromText(e,{title:a.title})}catch(t){if(s.suppressErrorRendering)throw m(),t;i=await eM.fromText("error"),o=t}let b=y.select(u).node(),T=i.type,B=b.firstChild,w=B.firstChild,S=eX(s,T,i.renderer.getClasses?.(e,i),l),A=document.createElement("style");A.innerHTML=S,B.insertBefore(A,w);try{await i.renderer.draw(e,t,"11.15.0",i)}catch(r){throw s.suppressErrorRendering?m():tF.draw(e,t,"11.15.0"),r}e1(T,y.select(`${u} svg`),i.db.getAccTitle?.(),i.db.getAccDescription?.()),y.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let F=y.select(u).node().innerHTML;if(h.Rm.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),F=eG(F,f,(0,n._3)(s.arrowMarkerAbsolute)),f?F=eY(F,y.select(u+" svg").node()):x||(F=C.A.sanitize(F,{ADD_TAGS:ez,ADD_ATTR:eP,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),e_(),o)throw o;return m(),{diagramType:T,svg:F,bindFunctions:i.db.bindFunctions}},"render");function e0(t={}){let e=(0,n.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,n.wZ)(e),e?.theme&&e.theme in n.H$?e.themeVariables=n.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=n.H$.default.getThemeVariables(e.themeVariables));let r="object"==typeof e?(0,n.UU)(e):(0,n.Q2)();(0,h.He)(r.logLevel),eA()}(0,h.K2)(e0,"initialize");var e2=(0,h.K2)((t,e={})=>{let{code:r}=eK(t);return eM.fromText(r,e)},"getDiagramFromText");function e1(t,e,r,i){eL(e,t),ev(e,r,i,e.attr("id"))}(0,h.K2)(e1,"addA11yInfo");var e5=Object.freeze({render:eJ,parse:eN,getDiagramFromText:e2,initialize:e0,getConfig:n.zj,setConfig:n.Nk,getSiteConfig:n.Q2,updateSiteConfig:n.B6,reset:(0,h.K2)(()=>{(0,n.cL)()},"reset"),globalReset:(0,h.K2)(()=>{(0,n.cL)(n.sb)},"globalReset"),defaultConfig:n.sb});(0,h.He)((0,n.zj)().logLevel),(0,n.cL)((0,n.zj)());var e3=(0,h.K2)((t,e,r)=>{h.Rm.warn(t),(0,l.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),e4=(0,h.K2)(async function(t={querySelector:".mermaid"}){try{await e6(t)}catch(e){if((0,l.dq)(e)&&h.Rm.error(e.str),rn.parseError&&rn.parseError(e),!t.suppressErrors)throw h.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),e6=(0,h.K2)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let i,o,a=e5.getConfig();if(h.Rm.debug(`${!t?"No ":""}Callback function found`),r)i=r;else if(e)i=document.querySelectorAll(e);else throw Error("Nodes and querySelector are both undefined");h.Rm.debug(`Found ${i.length} diagrams`),a?.startOnLoad!==void 0&&(h.Rm.debug("Start On Load: "+a?.startOnLoad),e5.updateSiteConfig({startOnLoad:a?.startOnLoad}));let s=new l._K.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed),n=[];for(let e of Array.from(i)){if(h.Rm.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");let r=`mermaid-${s.next()}`;o=e.innerHTML,o=(0,c.T)(l._K.entityDecode(o)).trim().replace(//gi,"
    ");let i=l._K.detectInit(o);i&&h.Rm.debug("Detected early reinit: ",i);try{let{svg:i,bindFunctions:a}=await rs(r,o,e);e.innerHTML=i,t&&await t(r),a&&a(e)}catch(t){e3(t,n,rn.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),e8=(0,h.K2)(function(t){e5.initialize(t)},"initialize"),e7=(0,h.K2)(async function(t,e,r){h.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&e8(t);let i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await e4(i)},"init"),e9=(0,h.K2)(async(t,{lazyLoad:e=!0}={})=>{eA(),(0,n.Xd)(...t),!1===e&&await eF()},"registerExternalDiagrams"),rt=(0,h.K2)(function(){if(rn.startOnLoad){let{startOnLoad:t}=e5.getConfig();t&&rn.run().catch(t=>h.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"u">typeof document&&window.addEventListener("load",rt,!1);var re=(0,h.K2)(function(t){rn.parseError=t},"setParseErrorHandler"),rr=[],ri=!1,ro=(0,h.K2)(async()=>{if(!ri){for(ri=!0;rr.length>0;){let t=rr.shift();if(t)try{await t()}catch(t){h.Rm.error("Error executing queue",t)}}ri=!1}},"executeQueue"),ra=(0,h.K2)(async(t,e)=>new Promise((r,i)=>{let o=(0,h.K2)(()=>new Promise((o,a)=>{e5.parse(t,e).then(t=>{o(t),r(t)},t=>{h.Rm.error("Error parsing",t),rn.parseError?.(t),a(t),i(t)})}),"performCall");rr.push(o),ro().catch(i)}),"parse"),rs=(0,h.K2)((t,e,r)=>new Promise((i,o)=>{let a=(0,h.K2)(()=>new Promise((a,s)=>{e5.render(t,e,r).then(t=>{a(t),i(t)},t=>{h.Rm.error("Error parsing",t),rn.parseError?.(t),s(t),o(t)})}),"performCall");rr.push(a),ro().catch(o)}),"render"),rl=(0,h.K2)(()=>Object.keys(n.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),rn={startOnLoad:!0,mermaidAPI:e5,parse:ra,render:rs,init:e7,run:e4,registerExternalDiagrams:e9,registerLayoutLoaders:a.sO,initialize:e8,parseError:void 0,contentLoaded:rt,setParseErrorHandler:re,detectType:n.Ch,registerIconPacks:s.pC,getRegisteredDiagramsMetadata:rl},rh=rn}};