Files
build_notes_simengweb/assets/mermaid.esm.min-DGQNoR5D.js
2026-03-29 16:10:06 +08:00

260 lines
534 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-GD7MH7QM-DGjPZnL0.js","assets/app-t8Vldhgr.js","assets/dagre-GNUAUHNH-DXQ162y-.js","assets/chunk-3YCYZ6SJ-ByBZ6Mce.js","assets/chunk-HN6EAY2L-CnY8HTH7.js","assets/chunk-H3VCZNTA-CxC2d02b.js","assets/cose-bilkent-PNC4W37J-DyN6PpA4.js","assets/chunk-7RZVMHOQ-CtEdmHqa.js","assets/c4Diagram-BBK6TRR6-FZk4-nd8.js","assets/chunk-W2A4CRWB-CEpUqVuh.js","assets/flowDiagram-IIOBCMXN-CYRKx13h.js","assets/chunk-KSICW3F5-Cj3UG-uo.js","assets/chunk-TBF5ZNIQ-Dqy_PWBE.js","assets/chunk-T4EQAHMB-BSu_zLEL.js","assets/erDiagram-L2NYR2MQ--3oSmcc2.js","assets/gitGraphDiagram-FCDOK2W6-DtwLq5NW.js","assets/chunk-AEOMTBSW-DS2XDHi2.js","assets/treemap-KZPCXAKY-RU5UWGQG-Bieyf2w6.js","assets/chunk-TU3PZOEN-CJBJzapT.js","assets/ganttDiagram-CBGYKTO2-V9ASDzMX.js","assets/infoDiagram-JC2SMEGH-olRUjSou.js","assets/pieDiagram-O4VNXU6G-DrxXmGzS.js","assets/quadrantDiagram-DYU4IJOS-Bg6H8a2k.js","assets/xychartDiagram-TMDUDL2A-CsQ9VQk_.js","assets/requirementDiagram-N2XL27SN-D0ML_frX.js","assets/sequenceDiagram-PYXOKC54-CiRRnoB5.js","assets/classDiagram-JG6F6YBT-B47N4DC6.js","assets/chunk-TFLKLN34-BRUeNpWv.js","assets/classDiagram-v2-CFK7UN3Z-B47N4DC6.js","assets/stateDiagram-UFOXNHOX-DF6iuymG.js","assets/chunk-33NP3AWU-fW7s6hbK.js","assets/stateDiagram-v2-C774GKM7-NXQNeIBp.js","assets/journeyDiagram-FZRSWBTQ-DuIFoGQv.js","assets/timeline-definition-GC5UGDFR-BsXHSaaA.js","assets/mindmap-definition-QTQOGDLH-GhXRjx3h.js","assets/kanban-definition-ETIEC4YN-Bx3CknX6.js","assets/sankeyDiagram-HWP7ZNIN-BUY3YMp8.js","assets/diagram-SUXTHJMA-h0U9qop-.js","assets/diagram-G7E7SVAT-Cb6uMcqw.js","assets/blockDiagram-HG7WUIX4-pYMouvi2.js","assets/architectureDiagram-EJXTDGMB-BixUofLv.js","assets/ishikawaDiagram-LCPTV24A-dqzGV9xc.js","assets/vennDiagram-R4MEU4WM-Dvbyfwqt.js","assets/diagram-HOHITQNR-RHmJhdrA.js"])))=>i.map(i=>d[i]);
var gv=Object.defineProperty;var yv=(t,e,r)=>e in t?gv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var sl=(t,e,r)=>yv(t,typeof e!="symbol"?e+"":e,r);import{a9 as gt}from"./app-t8Vldhgr.js";var mv=Object.create,xn=Object.defineProperty,xv=Object.getOwnPropertyDescriptor,bv=Object.getOwnPropertyNames,kv=Object.getPrototypeOf,Cv=Object.prototype.hasOwnProperty,l=(t,e)=>xn(t,"name",{value:e,configurable:!0}),yE=(t,e)=>()=>(t&&(e=t(t=0)),e),oc=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$v=(t,e)=>{for(var r in e)xn(t,r,{get:e[r],enumerable:!0})},sc=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of bv(e))!Cv.call(t,a)&&a!==r&&xn(t,a,{get:()=>e[a],enumerable:!(i=xv(e,a))||i.enumerable});return t},mE=(t,e,r)=>(sc(t,e,"default"),r),Yp=(t,e,r)=>(r=t!=null?mv(kv(t)):{},sc(xn(r,"default",{value:t,enumerable:!0}),t)),xE=t=>sc(xn({},"__esModule",{value:!0}),t),wv=oc((t,e)=>{(function(r,i){typeof t=="object"&&typeof e<"u"?e.exports=i():typeof define=="function"&&define.amd?define(i):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=i()})(t,(function(){var r=1e3,i=6e4,a=36e5,n="millisecond",s="second",o="minute",c="hour",h="day",u="week",d="month",p="quarter",f="year",g="date",y="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:l(function(B){var L=["th","st","nd","rd"],M=B%100;return"["+B+(L[(M-20)%10]||L[M]||L[0])+"]"},"ordinal")},k=l(function(B,L,M){var E=String(B);return!E||E.length>=L?B:""+Array(L+1-E.length).join(M)+B},"m"),_={s:k,z:l(function(B){var L=-B.utcOffset(),M=Math.abs(L),E=Math.floor(M/60),F=M%60;return(L<=0?"+":"-")+k(E,2,"0")+":"+k(F,2,"0")},"z"),m:l(function B(L,M){if(L.date()<M.date())return-B(M,L);var E=12*(M.year()-L.year())+(M.month()-L.month()),F=L.clone().add(E,d),z=M-F<0,V=L.clone().add(E+(z?-1:1),d);return+(-(E+(M-F)/(z?F-V:V-F))||0)},"t"),a:l(function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},"a"),p:l(function(B){return{M:d,y:f,w:u,d:h,D:g,h:c,m:o,s,ms:n,Q:p}[B]||String(B||"").toLowerCase().replace(/s$/,"")},"p"),u:l(function(B){return B===void 0},"u")},w="en",$={};$[w]=b;var T="$isDayjsObject",O=l(function(B){return B instanceof D||!(!B||!B[T])},"S"),R=l(function B(L,M,E){var F;if(!L)return w;if(typeof L=="string"){var z=L.toLowerCase();$[z]&&(F=z),M&&($[z]=M,F=z);var V=L.split("-");if(!F&&V.length>1)return B(V[0])}else{var G=L.name;$[G]=L,F=G}return!E&&F&&(w=F),F||!E&&w},"t"),I=l(function(B,L){if(O(B))return B.clone();var M=typeof L=="object"?L:{};return M.date=B,M.args=arguments,new D(M)},"O"),S=_;S.l=R,S.i=O,S.w=function(B,L){return I(B,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var D=(function(){function B(M){this.$L=R(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[T]=!0}l(B,"M");var L=B.prototype;return L.parse=function(M){this.$d=(function(E){var F=E.date,z=E.utc;if(F===null)return new Date(NaN);if(S.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var V=F.match(m);if(V){var G=V[2]-1||0,Z=(V[7]||"0").substring(0,3);return z?new Date(Date.UTC(V[1],G,V[3]||1,V[4]||0,V[5]||0,V[6]||0,Z)):new Date(V[1],G,V[3]||1,V[4]||0,V[5]||0,V[6]||0,Z)}}return new Date(F)})(M),this.init()},L.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},L.$utils=function(){return S},L.isValid=function(){return this.$d.toString()!==y},L.isSame=function(M,E){var F=I(M);return this.startOf(E)<=F&&F<=this.endOf(E)},L.isAfter=function(M,E){return I(M)<this.startOf(E)},L.isBefore=function(M,E){return this.endOf(E)<I(M)},L.$g=function(M,E,F){return S.u(M)?this[E]:this.set(F,M)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(M,E){var F=this,z=!!S.u(E)||E,V=S.p(M),G=l(function(q,rt){var ht=S.w(F.$u?Date.UTC(F.$y,rt,q):new Date(F.$y,rt,q),F);return z?ht:ht.endOf(h)},"l"),Z=l(function(q,rt){return S.w(F.toDate()[q].apply(F.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(rt)),F)},"$"),U=this.$W,ct=this.$M,et=this.$D,wt="set"+(this.$u?"UTC":"");switch(V){case f:return z?G(1,0):G(31,11);case d:return z?G(1,ct):G(0,ct+1);case u:var Ct=this.$locale().weekStart||0,Tt=(U<Ct?U+7:U)-Ct;return G(z?et-Tt:et+(6-Tt),ct);case h:case g:return Z(wt+"Hours",0);case c:return Z(wt+"Minutes",1);case o:return Z(wt+"Seconds",2);case s:return Z(wt+"Milliseconds",3);default:return this.clone()}},L.endOf=function(M){return this.startOf(M,!1)},L.$set=function(M,E){var F,z=S.p(M),V="set"+(this.$u?"UTC":""),G=(F={},F[h]=V+"Date",F[g]=V+"Date",F[d]=V+"Month",F[f]=V+"FullYear",F[c]=V+"Hours",F[o]=V+"Minutes",F[s]=V+"Seconds",F[n]=V+"Milliseconds",F)[z],Z=z===h?this.$D+(E-this.$W):E;if(z===d||z===f){var U=this.clone().set(g,1);U.$d[G](Z),U.init(),this.$d=U.set(g,Math.min(this.$D,U.daysInMonth())).$d}else G&&this.$d[G](Z);return this.init(),this},L.set=function(M,E){return this.clone().$set(M,E)},L.get=function(M){return this[S.p(M)]()},L.add=function(M,E){var F,z=this;M=Number(M);var V=S.p(E),G=l(function(ct){var et=I(z);return S.w(et.date(et.date()+Math.round(ct*M)),z)},"y");if(V===d)return this.set(d,this.$M+M);if(V===f)return this.set(f,this.$y+M);if(V===h)return G(1);if(V===u)return G(7);var Z=(F={},F[o]=i,F[c]=a,F[s]=r,F)[V]||1,U=this.$d.getTime()+M*Z;return S.w(U,this)},L.subtract=function(M,E){return this.add(-1*M,E)},L.format=function(M){var E=this,F=this.$locale();if(!this.isValid())return F.invalidDate||y;var z=M||"YYYY-MM-DDTHH:mm:ssZ",V=S.z(this),G=this.$H,Z=this.$m,U=this.$M,ct=F.weekdays,et=F.months,wt=F.meridiem,Ct=l(function(rt,ht,N,$t){return rt&&(rt[ht]||rt(E,z))||N[ht].slice(0,$t)},"h"),Tt=l(function(rt){return S.s(G%12||12,rt,"0")},"d"),q=wt||function(rt,ht,N){var $t=rt<12?"AM":"PM";return N?$t.toLowerCase():$t};return z.replace(x,(function(rt,ht){return ht||(function(N){switch(N){case"YY":return String(E.$y).slice(-2);case"YYYY":return S.s(E.$y,4,"0");case"M":return U+1;case"MM":return S.s(U+1,2,"0");case"MMM":return Ct(F.monthsShort,U,et,3);case"MMMM":return Ct(et,U);case"D":return E.$D;case"DD":return S.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return Ct(F.weekdaysMin,E.$W,ct,2);case"ddd":return Ct(F.weekdaysShort,E.$W,ct,3);case"dddd":return ct[E.$W];case"H":return String(G);case"HH":return S.s(G,2,"0");case"h":return Tt(1);case"hh":return Tt(2);case"a":return q(G,Z,!0);case"A":return q(G,Z,!1);case"m":return String(Z);case"mm":return S.s(Z,2,"0");case"s":return String(E.$s);case"ss":return S.s(E.$s,2,"0");case"SSS":return S.s(E.$ms,3,"0");case"Z":return V}return null})(rt)||V.replace(":","")}))},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(M,E,F){var z,V=this,G=S.p(E),Z=I(M),U=(Z.utcOffset()-this.utcOffset())*i,ct=this-Z,et=l(function(){return S.m(V,Z)},"D");switch(G){case f:z=et()/12;break;case d:z=et();break;case p:z=et()/3;break;case u:z=(ct-U)/6048e5;break;case h:z=(ct-U)/864e5;break;case c:z=ct/a;break;case o:z=ct/i;break;case s:z=ct/r;break;default:z=ct}return F?z:S.a(z)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return $[this.$L]},L.locale=function(M,E){if(!M)return this.$L;var F=this.clone(),z=R(M,E,!0);return z&&(F.$L=z),F},L.clone=function(){return S.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},B})(),A=D.prototype;return I.prototype=A,[["$ms",n],["$s",s],["$m",o],["$H",c],["$W",h],["$M",d],["$y",f],["$D",g]].forEach((function(B){A[B[1]]=function(L){return this.$g(L,B[0],B[1])}})),I.extend=function(B,L){return B.$i||(B(L,D,I),B.$i=!0),I},I.locale=R,I.isDayjs=O,I.unix=function(B){return I(1e3*B)},I.en=$[w],I.Ls=$,I.p={},I}))}),vv=Yp(wv()),We={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},P={trace:l((...t)=>{},"trace"),debug:l((...t)=>{},"debug"),info:l((...t)=>{},"info"),warn:l((...t)=>{},"warn"),error:l((...t)=>{},"error"),fatal:l((...t)=>{},"fatal")},lc=l(function(t="fatal"){let e=We.fatal;typeof t=="string"?t.toLowerCase()in We&&(e=We[t]):typeof t=="number"&&(e=t),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},e<=We.fatal&&(P.fatal=console.error?console.error.bind(console,he("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",he("FATAL"))),e<=We.error&&(P.error=console.error?console.error.bind(console,he("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",he("ERROR"))),e<=We.warn&&(P.warn=console.warn?console.warn.bind(console,he("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",he("WARN"))),e<=We.info&&(P.info=console.info?console.info.bind(console,he("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",he("INFO"))),e<=We.debug&&(P.debug=console.debug?console.debug.bind(console,he("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("DEBUG"))),e<=We.trace&&(P.trace=console.debug?console.debug.bind(console,he("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("TRACE")))},"setLogLevel"),he=l(t=>`%c${(0,vv.default)().format("ss.SSS")} : ${t} : `,"format");function _v(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}l(_v,"max");function Sv(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}l(Sv,"min");function La(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}l(La,"ascending");function Vp(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}l(Vp,"descending");function fs(t){let e,r,i;t.length!==2?(e=La,r=l((o,c)=>La(t(o),c),"compare2"),i=l((o,c)=>t(o)-c,"delta")):(e=t===La||t===Vp?t:Gp,r=t,i=t);function a(o,c,h=0,u=o.length){if(h<u){if(e(c,c)!==0)return u;do{let d=h+u>>>1;r(o[d],c)<0?h=d+1:u=d}while(h<u)}return h}l(a,"left");function n(o,c,h=0,u=o.length){if(h<u){if(e(c,c)!==0)return u;do{let d=h+u>>>1;r(o[d],c)<=0?h=d+1:u=d}while(h<u)}return h}l(n,"right");function s(o,c,h=0,u=o.length){let d=a(o,c,h,u-1);return d>h&&i(o[d-1],c)>-i(o[d],c)?d-1:d}return l(s,"center"),{left:a,center:s,right:n}}l(fs,"bisector");function Gp(){return 0}l(Gp,"zero");function Xp(t){return t===null?NaN:+t}l(Xp,"number");var Zp=fs(La),Tv=Zp.right;Zp.left;fs(Xp).center;var Mv=Tv,ki,Id=(ki=class extends Map{constructor(e,r=Kp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[i,a]of e)this.set(i,a)}get(e){return super.get(Sl(this,e))}has(e){return super.has(Sl(this,e))}set(e,r){return super.set(Qp(this,e),r)}delete(e){return super.delete(Jp(this,e))}},l(ki,"InternMap"),ki);function Sl({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):r}l(Sl,"intern_get");function Qp({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}l(Qp,"intern_set");function Jp({_intern:t,_key:e},r){let i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}l(Jp,"intern_delete");function Kp(t){return t!==null&&typeof t=="object"?t.valueOf():t}l(Kp,"keyof");var Bv=Math.sqrt(50),Av=Math.sqrt(10),Lv=Math.sqrt(2);function Ha(t,e,r){let i=(e-t)/Math.max(0,r),a=Math.floor(Math.log10(i)),n=i/Math.pow(10,a),s=n>=Bv?10:n>=Av?5:n>=Lv?2:1,o,c,h;return a<0?(h=Math.pow(10,-a)/s,o=Math.round(t*h),c=Math.round(e*h),o/h<t&&++o,c/h>e&&--c,h=-h):(h=Math.pow(10,a)*s,o=Math.round(t/h),c=Math.round(e/h),o*h<t&&++o,c*h>e&&--c),c<o&&.5<=r&&r<2?Ha(t,e,r*2):[o,c,h]}l(Ha,"tickSpec");function tf(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let i=e<t,[a,n,s]=i?Ha(e,t,r):Ha(t,e,r);if(!(n>=a))return[];let o=n-a+1,c=new Array(o);if(i)if(s<0)for(let h=0;h<o;++h)c[h]=(n-h)/-s;else for(let h=0;h<o;++h)c[h]=(n-h)*s;else if(s<0)for(let h=0;h<o;++h)c[h]=(a+h)/-s;else for(let h=0;h<o;++h)c[h]=(a+h)*s;return c}l(tf,"ticks");function _o(t,e,r){return e=+e,t=+t,r=+r,Ha(t,e,r)[2]}l(_o,"tickIncrement");function So(t,e,r){e=+e,t=+t,r=+r;let i=e<t,a=i?_o(e,t,r):_o(t,e,r);return(i?-1:1)*(a<0?1/-a:a)}l(So,"tickStep");function ef(t,e,r){t=+t,e=+e,r=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+r;for(var i=-1,a=Math.max(0,Math.ceil((e-t)/r))|0,n=new Array(a);++i<a;)n[i]=t+i*r;return n}l(ef,"range");function rf(t){return t}l(rf,"default");var to=1,ll=2,Tl=3,jn=4,Pd=1e-6;function af(t){return"translate("+t+",0)"}l(af,"translateX");function nf(t){return"translate(0,"+t+")"}l(nf,"translateY");function of(t){return e=>+t(e)}l(of,"number");function sf(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}l(sf,"center");function lf(){return!this.__axis}l(lf,"entering");function hc(t,e){var r=[],i=null,a=null,n=6,s=6,o=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=t===to||t===jn?-1:1,u=t===jn||t===ll?"x":"y",d=t===to||t===Tl?af:nf;function p(f){var g=i??(e.ticks?e.ticks.apply(e,r):e.domain()),y=a??(e.tickFormat?e.tickFormat.apply(e,r):rf),m=Math.max(n,0)+o,x=e.range(),b=+x[0]+c,k=+x[x.length-1]+c,_=(e.bandwidth?sf:of)(e.copy(),c),w=f.selection?f.selection():f,$=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(g,e).order(),O=T.exit(),R=T.enter().append("g").attr("class","tick"),I=T.select("line"),S=T.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(R),I=I.merge(R.append("line").attr("stroke","currentColor").attr(u+"2",h*n)),S=S.merge(R.append("text").attr("fill","currentColor").attr(u,h*m).attr("dy",t===to?"0em":t===Tl?"0.71em":"0.32em")),f!==w&&($=$.transition(f),T=T.transition(f),I=I.transition(f),S=S.transition(f),O=O.transition(f).attr("opacity",Pd).attr("transform",function(D){return isFinite(D=_(D))?d(D+c):this.getAttribute("transform")}),R.attr("opacity",Pd).attr("transform",function(D){var A=this.parentNode.__axis;return d((A&&isFinite(A=A(D))?A:_(D))+c)})),O.remove(),$.attr("d",t===jn||t===ll?s?"M"+h*s+","+b+"H"+c+"V"+k+"H"+h*s:"M"+c+","+b+"V"+k:s?"M"+b+","+h*s+"V"+c+"H"+k+"V"+h*s:"M"+b+","+c+"H"+k),T.attr("opacity",1).attr("transform",function(D){return d(_(D)+c)}),I.attr(u+"2",h*n),S.attr(u,h*m).text(y),w.filter(lf).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ll?"start":t===jn?"end":"middle"),w.each(function(){this.__axis=_})}return l(p,"axis"),p.scale=function(f){return arguments.length?(e=f,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(f){return arguments.length?(r=f==null?[]:Array.from(f),p):r.slice()},p.tickValues=function(f){return arguments.length?(i=f==null?null:Array.from(f),p):i&&i.slice()},p.tickFormat=function(f){return arguments.length?(a=f,p):a},p.tickSize=function(f){return arguments.length?(n=s=+f,p):n},p.tickSizeInner=function(f){return arguments.length?(n=+f,p):n},p.tickSizeOuter=function(f){return arguments.length?(s=+f,p):s},p.tickPadding=function(f){return arguments.length?(o=+f,p):o},p.offset=function(f){return arguments.length?(c=+f,p):c},p}l(hc,"axis");function Fv(t){return hc(to,t)}l(Fv,"axisTop");function Ev(t){return hc(Tl,t)}l(Ev,"axisBottom");function hf(){}l(hf,"none");function gs(t){return t==null?hf:function(){return this.querySelector(t)}}l(gs,"default");function cf(t){typeof t!="function"&&(t=gs(t));for(var e=this._groups,r=e.length,i=new Array(r),a=0;a<r;++a)for(var n=e[a],s=n.length,o=i[a]=new Array(s),c,h,u=0;u<s;++u)(c=n[u])&&(h=t.call(c,c.__data__,u,n))&&("__data__"in c&&(h.__data__=c.__data__),o[u]=h);return new se(i,this._parents)}l(cf,"default");function uf(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}l(uf,"array");function df(){return[]}l(df,"empty");function cc(t){return t==null?df:function(){return this.querySelectorAll(t)}}l(cc,"default");function pf(t){return function(){return uf(t.apply(this,arguments))}}l(pf,"arrayAll");function ff(t){typeof t=="function"?t=pf(t):t=cc(t);for(var e=this._groups,r=e.length,i=[],a=[],n=0;n<r;++n)for(var s=e[n],o=s.length,c,h=0;h<o;++h)(c=s[h])&&(i.push(t.call(c,c.__data__,h,s)),a.push(c));return new se(i,a)}l(ff,"default");function uc(t){return function(){return this.matches(t)}}l(uc,"default");function dc(t){return function(e){return e.matches(t)}}l(dc,"childMatcher");var Dv=Array.prototype.find;function gf(t){return function(){return Dv.call(this.children,t)}}l(gf,"childFind");function yf(){return this.firstElementChild}l(yf,"childFirst");function mf(t){return this.select(t==null?yf:gf(typeof t=="function"?t:dc(t)))}l(mf,"default");var Ov=Array.prototype.filter;function xf(){return Array.from(this.children)}l(xf,"children");function bf(t){return function(){return Ov.call(this.children,t)}}l(bf,"childrenFilter");function kf(t){return this.selectAll(t==null?xf:bf(typeof t=="function"?t:dc(t)))}l(kf,"default");function Cf(t){typeof t!="function"&&(t=uc(t));for(var e=this._groups,r=e.length,i=new Array(r),a=0;a<r;++a)for(var n=e[a],s=n.length,o=i[a]=[],c,h=0;h<s;++h)(c=n[h])&&t.call(c,c.__data__,h,n)&&o.push(c);return new se(i,this._parents)}l(Cf,"default");function pc(t){return new Array(t.length)}l(pc,"default");function $f(){return new se(this._enter||this._groups.map(pc),this._parents)}l($f,"default");function Ua(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}l(Ua,"EnterNode");Ua.prototype={constructor:Ua,appendChild:l(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:l(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:l(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:l(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")};function wf(t){return function(){return t}}l(wf,"default");function vf(t,e,r,i,a,n){for(var s=0,o,c=e.length,h=n.length;s<h;++s)(o=e[s])?(o.__data__=n[s],i[s]=o):r[s]=new Ua(t,n[s]);for(;s<c;++s)(o=e[s])&&(a[s]=o)}l(vf,"bindIndex");function _f(t,e,r,i,a,n,s){var o,c,h=new Map,u=e.length,d=n.length,p=new Array(u),f;for(o=0;o<u;++o)(c=e[o])&&(p[o]=f=s.call(c,c.__data__,o,e)+"",h.has(f)?a[o]=c:h.set(f,c));for(o=0;o<d;++o)f=s.call(t,n[o],o,n)+"",(c=h.get(f))?(i[o]=c,c.__data__=n[o],h.delete(f)):r[o]=new Ua(t,n[o]);for(o=0;o<u;++o)(c=e[o])&&h.get(p[o])===c&&(a[o]=c)}l(_f,"bindKey");function Sf(t){return t.__data__}l(Sf,"datum");function Tf(t,e){if(!arguments.length)return Array.from(this,Sf);var r=e?_f:vf,i=this._parents,a=this._groups;typeof t!="function"&&(t=wf(t));for(var n=a.length,s=new Array(n),o=new Array(n),c=new Array(n),h=0;h<n;++h){var u=i[h],d=a[h],p=d.length,f=Mf(t.call(u,u&&u.__data__,h,i)),g=f.length,y=o[h]=new Array(g),m=s[h]=new Array(g),x=c[h]=new Array(p);r(u,d,y,m,x,f,e);for(var b=0,k=0,_,w;b<g;++b)if(_=y[b]){for(b>=k&&(k=b+1);!(w=m[k])&&++k<g;);_._next=w||null}}return s=new se(s,i),s._enter=o,s._exit=c,s}l(Tf,"default");function Mf(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}l(Mf,"arraylike");function Bf(){return new se(this._exit||this._groups.map(pc),this._parents)}l(Bf,"default");function Af(t,e,r){var i=this.enter(),a=this,n=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(a=e(a),a&&(a=a.selection())),r==null?n.remove():r(n),i&&a?i.merge(a).order():a}l(Af,"default");function Lf(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,a=r.length,n=i.length,s=Math.min(a,n),o=new Array(a),c=0;c<s;++c)for(var h=r[c],u=i[c],d=h.length,p=o[c]=new Array(d),f,g=0;g<d;++g)(f=h[g]||u[g])&&(p[g]=f);for(;c<a;++c)o[c]=r[c];return new se(o,this._parents)}l(Lf,"default");function Ff(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],a=i.length-1,n=i[a],s;--a>=0;)(s=i[a])&&(n&&s.compareDocumentPosition(n)^4&&n.parentNode.insertBefore(s,n),n=s);return this}l(Ff,"default");function Ef(t){t||(t=Df);function e(d,p){return d&&p?t(d.__data__,p.__data__):!d-!p}l(e,"compareNode");for(var r=this._groups,i=r.length,a=new Array(i),n=0;n<i;++n){for(var s=r[n],o=s.length,c=a[n]=new Array(o),h,u=0;u<o;++u)(h=s[u])&&(c[u]=h);c.sort(e)}return new se(a,this._parents).order()}l(Ef,"default");function Df(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}l(Df,"ascending");function Of(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}l(Of,"default");function If(){return Array.from(this)}l(If,"default");function Pf(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],a=0,n=i.length;a<n;++a){var s=i[a];if(s)return s}return null}l(Pf,"default");function Rf(){let t=0;for(let e of this)++t;return t}l(Rf,"default");function Nf(){return!this.node()}l(Nf,"default");function zf(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var a=e[r],n=0,s=a.length,o;n<s;++n)(o=a[n])&&t.call(o,o.__data__,n,a);return this}l(zf,"default");var Ml="http://www.w3.org/1999/xhtml",Rd={svg:"http://www.w3.org/2000/svg",xhtml:Ml,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function bn(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Rd.hasOwnProperty(e)?{space:Rd[e],local:t}:t}l(bn,"default");function qf(t){return function(){this.removeAttribute(t)}}l(qf,"attrRemove");function Wf(t){return function(){this.removeAttributeNS(t.space,t.local)}}l(Wf,"attrRemoveNS");function jf(t,e){return function(){this.setAttribute(t,e)}}l(jf,"attrConstant");function Hf(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}l(Hf,"attrConstantNS");function Uf(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}l(Uf,"attrFunction");function Yf(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}l(Yf,"attrFunctionNS");function Vf(t,e){var r=bn(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?Wf:qf:typeof e=="function"?r.local?Yf:Uf:r.local?Hf:jf)(r,e))}l(Vf,"default");function fc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}l(fc,"default");function Gf(t){return function(){this.style.removeProperty(t)}}l(Gf,"styleRemove");function Xf(t,e,r){return function(){this.style.setProperty(t,e,r)}}l(Xf,"styleConstant");function Zf(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}l(Zf,"styleFunction");function Qf(t,e,r){return arguments.length>1?this.each((e==null?Gf:typeof e=="function"?Zf:Xf)(t,e,r??"")):Or(this.node(),t)}l(Qf,"default");function Or(t,e){return t.style.getPropertyValue(e)||fc(t).getComputedStyle(t,null).getPropertyValue(e)}l(Or,"styleValue");function Jf(t){return function(){delete this[t]}}l(Jf,"propertyRemove");function Kf(t,e){return function(){this[t]=e}}l(Kf,"propertyConstant");function tg(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}l(tg,"propertyFunction");function eg(t,e){return arguments.length>1?this.each((e==null?Jf:typeof e=="function"?tg:Kf)(t,e)):this.node()[t]}l(eg,"default");function gc(t){return t.trim().split(/^|\s+/)}l(gc,"classArray");function ys(t){return t.classList||new yc(t)}l(ys,"classList");function yc(t){this._node=t,this._names=gc(t.getAttribute("class")||"")}l(yc,"ClassList");yc.prototype={add:l(function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:l(function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:l(function(t){return this._names.indexOf(t)>=0},"contains")};function mc(t,e){for(var r=ys(t),i=-1,a=e.length;++i<a;)r.add(e[i])}l(mc,"classedAdd");function xc(t,e){for(var r=ys(t),i=-1,a=e.length;++i<a;)r.remove(e[i])}l(xc,"classedRemove");function rg(t){return function(){mc(this,t)}}l(rg,"classedTrue");function ig(t){return function(){xc(this,t)}}l(ig,"classedFalse");function ag(t,e){return function(){(e.apply(this,arguments)?mc:xc)(this,t)}}l(ag,"classedFunction");function ng(t,e){var r=gc(t+"");if(arguments.length<2){for(var i=ys(this.node()),a=-1,n=r.length;++a<n;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?ag:e?rg:ig)(r,e))}l(ng,"default");function og(){this.textContent=""}l(og,"textRemove");function sg(t){return function(){this.textContent=t}}l(sg,"textConstant");function lg(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}l(lg,"textFunction");function hg(t){return arguments.length?this.each(t==null?og:(typeof t=="function"?lg:sg)(t)):this.node().textContent}l(hg,"default");function cg(){this.innerHTML=""}l(cg,"htmlRemove");function ug(t){return function(){this.innerHTML=t}}l(ug,"htmlConstant");function dg(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}l(dg,"htmlFunction");function pg(t){return arguments.length?this.each(t==null?cg:(typeof t=="function"?dg:ug)(t)):this.node().innerHTML}l(pg,"default");function fg(){this.nextSibling&&this.parentNode.appendChild(this)}l(fg,"raise");function gg(){return this.each(fg)}l(gg,"default");function yg(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}l(yg,"lower");function mg(){return this.each(yg)}l(mg,"default");function xg(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Ml&&e.documentElement.namespaceURI===Ml?e.createElement(t):e.createElementNS(r,t)}}l(xg,"creatorInherit");function bg(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}l(bg,"creatorFixed");function bc(t){var e=bn(t);return(e.local?bg:xg)(e)}l(bc,"default");function kg(t){var e=typeof t=="function"?t:bc(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}l(kg,"default");function Cg(){return null}l(Cg,"constantNull");function $g(t,e){var r=typeof t=="function"?t:bc(t),i=e==null?Cg:typeof e=="function"?e:gs(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}l($g,"default");function wg(){var t=this.parentNode;t&&t.removeChild(this)}l(wg,"remove");function vg(){return this.each(wg)}l(vg,"default");function _g(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}l(_g,"selection_cloneShallow");function Sg(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}l(Sg,"selection_cloneDeep");function Tg(t){return this.select(t?Sg:_g)}l(Tg,"default");function Mg(t){return arguments.length?this.property("__data__",t):this.node().__data__}l(Mg,"default");function Bg(t){return function(e){t.call(this,e,this.__data__)}}l(Bg,"contextListener");function Ag(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}l(Ag,"parseTypenames");function Lg(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,a=e.length,n;r<a;++r)n=e[r],(!t.type||n.type===t.type)&&n.name===t.name?this.removeEventListener(n.type,n.listener,n.options):e[++i]=n;++i?e.length=i:delete this.__on}}}l(Lg,"onRemove");function Fg(t,e,r){return function(){var i=this.__on,a,n=Bg(e);if(i){for(var s=0,o=i.length;s<o;++s)if((a=i[s]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=n,a.options=r),a.value=e;return}}this.addEventListener(t.type,n,r),a={type:t.type,name:t.name,value:e,listener:n,options:r},i?i.push(a):this.__on=[a]}}l(Fg,"onAdd");function Eg(t,e,r){var i=Ag(t+""),a,n=i.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var c=0,h=o.length,u;c<h;++c)for(a=0,u=o[c];a<n;++a)if((s=i[a]).type===u.type&&s.name===u.name)return u.value}return}for(o=e?Fg:Lg,a=0;a<n;++a)this.each(o(i[a],e,r));return this}l(Eg,"default");function kc(t,e,r){var i=fc(t),a=i.CustomEvent;typeof a=="function"?a=new a(e,r):(a=i.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}l(kc,"dispatchEvent");function Dg(t,e){return function(){return kc(this,t,e)}}l(Dg,"dispatchConstant");function Og(t,e){return function(){return kc(this,t,e.apply(this,arguments))}}l(Og,"dispatchFunction");function Ig(t,e){return this.each((typeof e=="function"?Og:Dg)(t,e))}l(Ig,"default");function*Pg(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],a=0,n=i.length,s;a<n;++a)(s=i[a])&&(yield s)}l(Pg,"default");var Rg=[null];function se(t,e){this._groups=t,this._parents=e}l(se,"Selection");function Cc(){return new se([[document.documentElement]],Rg)}l(Cc,"selection");function Ng(){return this}l(Ng,"selection_selection");se.prototype=Cc.prototype={constructor:se,select:cf,selectAll:ff,selectChild:mf,selectChildren:kf,filter:Cf,data:Tf,enter:$f,exit:Bf,join:Af,merge:Lf,selection:Ng,order:Ff,sort:Ef,call:Of,nodes:If,node:Pf,size:Rf,empty:Nf,each:zf,attr:Vf,style:Qf,property:eg,classed:ng,text:hg,html:pg,raise:gg,lower:mg,append:kg,insert:$g,remove:vg,clone:Tg,datum:Mg,on:Eg,dispatch:Ig,[Symbol.iterator]:Pg};var kn=Cc;function ut(t){return typeof t=="string"?new se([[document.querySelector(t)]],[document.documentElement]):new se([[t]],Rg)}l(ut,"default");function ra(t,e,r){t.prototype=e.prototype=r,r.constructor=t}l(ra,"default");function Cn(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}l(Cn,"extend");function mr(){}l(mr,"Color");var Ya=.7,To=1/Ya,yi="\\s*([+-]?\\d+)\\s*",Va="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Iv=/^#([0-9a-f]{3,8})$/,Pv=new RegExp(`^rgb\\(${yi},${yi},${yi}\\)$`),Rv=new RegExp(`^rgb\\(${Oe},${Oe},${Oe}\\)$`),Nv=new RegExp(`^rgba\\(${yi},${yi},${yi},${Va}\\)$`),zv=new RegExp(`^rgba\\(${Oe},${Oe},${Oe},${Va}\\)$`),qv=new RegExp(`^hsl\\(${Va},${Oe},${Oe}\\)$`),Wv=new RegExp(`^hsla\\(${Va},${Oe},${Oe},${Va}\\)$`),Nd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ra(mr,pr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Bl,formatHex:Bl,formatHex8:zg,formatHsl:qg,formatRgb:Al,toString:Al});function Bl(){return this.rgb().formatHex()}l(Bl,"color_formatHex");function zg(){return this.rgb().formatHex8()}l(zg,"color_formatHex8");function qg(){return wc(this).formatHsl()}l(qg,"color_formatHsl");function Al(){return this.rgb().formatRgb()}l(Al,"color_formatRgb");function pr(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Iv.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?Ll(e):r===3?new Wt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?ka(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?ka(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Pv.exec(t))?new Wt(e[1],e[2],e[3],1):(e=Rv.exec(t))?new Wt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Nv.exec(t))?ka(e[1],e[2],e[3],e[4]):(e=zv.exec(t))?ka(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=qv.exec(t))?Dl(e[1],e[2]/100,e[3]/100,1):(e=Wv.exec(t))?Dl(e[1],e[2]/100,e[3]/100,e[4]):Nd.hasOwnProperty(t)?Ll(Nd[t]):t==="transparent"?new Wt(NaN,NaN,NaN,0):null}l(pr,"color");function Ll(t){return new Wt(t>>16&255,t>>8&255,t&255,1)}l(Ll,"rgbn");function ka(t,e,r,i){return i<=0&&(t=e=r=NaN),new Wt(t,e,r,i)}l(ka,"rgba");function $c(t){return t instanceof mr||(t=pr(t)),t?(t=t.rgb(),new Wt(t.r,t.g,t.b,t.opacity)):new Wt}l($c,"rgbConvert");function Ga(t,e,r,i){return arguments.length===1?$c(t):new Wt(t,e,r,i??1)}l(Ga,"rgb");function Wt(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}l(Wt,"Rgb");ra(Wt,Ga,Cn(mr,{brighter(t){return t=t==null?To:Math.pow(To,t),new Wt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ya:Math.pow(Ya,t),new Wt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Wt(hr(this.r),hr(this.g),hr(this.b),Xa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fl,formatHex:Fl,formatHex8:Wg,formatRgb:El,toString:El}));function Fl(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}`}l(Fl,"rgb_formatHex");function Wg(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}${sr((isNaN(this.opacity)?1:this.opacity)*255)}`}l(Wg,"rgb_formatHex8");function El(){let t=Xa(this.opacity);return`${t===1?"rgb(":"rgba("}${hr(this.r)}, ${hr(this.g)}, ${hr(this.b)}${t===1?")":`, ${t})`}`}l(El,"rgb_formatRgb");function Xa(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}l(Xa,"clampa");function hr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}l(hr,"clampi");function sr(t){return t=hr(t),(t<16?"0":"")+t.toString(16)}l(sr,"hex");function Dl(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new de(t,e,r,i)}l(Dl,"hsla");function wc(t){if(t instanceof de)return new de(t.h,t.s,t.l,t.opacity);if(t instanceof mr||(t=pr(t)),!t)return new de;if(t instanceof de)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),n=Math.max(e,r,i),s=NaN,o=n-a,c=(n+a)/2;return o?(e===n?s=(r-i)/o+(r<i)*6:r===n?s=(i-e)/o+2:s=(e-r)/o+4,o/=c<.5?n+a:2-n-a,s*=60):o=c>0&&c<1?0:s,new de(s,o,c,t.opacity)}l(wc,"hslConvert");function jg(t,e,r,i){return arguments.length===1?wc(t):new de(t,e,r,i??1)}l(jg,"hsl");function de(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}l(de,"Hsl");ra(de,jg,Cn(mr,{brighter(t){return t=t==null?To:Math.pow(To,t),new de(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ya:Math.pow(Ya,t),new de(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,a=2*r-i;return new Wt(eo(t>=240?t-240:t+120,a,i),eo(t,a,i),eo(t<120?t+240:t-120,a,i),this.opacity)},clamp(){return new de(Ol(this.h),Ca(this.s),Ca(this.l),Xa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=Xa(this.opacity);return`${t===1?"hsl(":"hsla("}${Ol(this.h)}, ${Ca(this.s)*100}%, ${Ca(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ol(t){return t=(t||0)%360,t<0?t+360:t}l(Ol,"clamph");function Ca(t){return Math.max(0,Math.min(1,t||0))}l(Ca,"clampt");function eo(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}l(eo,"hsl2rgb");var jv=Math.PI/180,Hv=180/Math.PI,Mo=18,Hg=.96422,Ug=1,Yg=.82521,Vg=4/29,mi=6/29,Gg=3*mi*mi,Uv=mi*mi*mi;function vc(t){if(t instanceof _e)return new _e(t.l,t.a,t.b,t.opacity);if(t instanceof De)return _c(t);t instanceof Wt||(t=$c(t));var e=no(t.r),r=no(t.g),i=no(t.b),a=ro((.2225045*e+.7168786*r+.0606169*i)/Ug),n,s;return e===r&&r===i?n=s=a:(n=ro((.4360747*e+.3850649*r+.1430804*i)/Hg),s=ro((.0139322*e+.0971045*r+.7141733*i)/Yg)),new _e(116*a-16,500*(n-a),200*(a-s),t.opacity)}l(vc,"labConvert");function Xg(t,e,r,i){return arguments.length===1?vc(t):new _e(t,e,r,i??1)}l(Xg,"lab");function _e(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}l(_e,"Lab");ra(_e,Xg,Cn(mr,{brighter(t){return new _e(this.l+Mo*(t??1),this.a,this.b,this.opacity)},darker(t){return new _e(this.l-Mo*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=Hg*io(e),t=Ug*io(t),r=Yg*io(r),new Wt(ao(3.1338561*e-1.6168667*t-.4906146*r),ao(-.9787684*e+1.9161415*t+.033454*r),ao(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function ro(t){return t>Uv?Math.pow(t,1/3):t/Gg+Vg}l(ro,"xyz2lab");function io(t){return t>mi?t*t*t:Gg*(t-Vg)}l(io,"lab2xyz");function ao(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}l(ao,"lrgb2rgb");function no(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}l(no,"rgb2lrgb");function Zg(t){if(t instanceof De)return new De(t.h,t.c,t.l,t.opacity);if(t instanceof _e||(t=vc(t)),t.a===0&&t.b===0)return new De(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Hv;return new De(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}l(Zg,"hclConvert");function Bo(t,e,r,i){return arguments.length===1?Zg(t):new De(t,e,r,i??1)}l(Bo,"hcl");function De(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}l(De,"Hcl");function _c(t){if(isNaN(t.h))return new _e(t.l,0,0,t.opacity);var e=t.h*jv;return new _e(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}l(_c,"hcl2lab");ra(De,Bo,Cn(mr,{brighter(t){return new De(this.h,this.c,this.l+Mo*(t??1),this.opacity)},darker(t){return new De(this.h,this.c,this.l-Mo*(t??1),this.opacity)},rgb(){return _c(this).rgb()}}));var ms=l(t=>()=>t,"default");function Sc(t,e){return function(r){return t+r*e}}l(Sc,"linear");function Qg(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}l(Qg,"exponential");function Jg(t,e){var r=e-t;return r?Sc(t,r>180||r<-180?r-360*Math.round(r/360):r):ms(isNaN(t)?e:t)}l(Jg,"hue");function Kg(t){return(t=+t)==1?xi:function(e,r){return r-e?Qg(e,r,t):ms(isNaN(e)?r:e)}}l(Kg,"gamma");function xi(t,e){var r=e-t;return r?Sc(t,r):ms(isNaN(t)?e:t)}l(xi,"nogamma");function ty(t){return function(e,r){var i=t((e=Bo(e)).h,(r=Bo(r)).h),a=xi(e.c,r.c),n=xi(e.l,r.l),s=xi(e.opacity,r.opacity);return function(o){return e.h=i(o),e.c=a(o),e.l=n(o),e.opacity=s(o),e+""}}}l(ty,"hcl");var bE=ty(Jg);function Tc(t,e,r,i,a){var n=t*t,s=n*t;return((1-3*t+3*n-s)*e+(4-6*n+3*s)*r+(1+3*t+3*n-3*s)*i+s*a)/6}l(Tc,"basis");function Yv(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),a=t[i],n=t[i+1],s=i>0?t[i-1]:2*a-n,o=i<e-1?t[i+2]:2*n-a;return Tc((r-i/e)*e,s,a,n,o)}}l(Yv,"default");function Vv(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),a=t[(i+e-1)%e],n=t[i%e],s=t[(i+1)%e],o=t[(i+2)%e];return Tc((r-i/e)*e,a,n,s,o)}}l(Vv,"default");var Ao=l((function t(e){var r=Kg(e);function i(a,n){var s=r((a=Ga(a)).r,(n=Ga(n)).r),o=r(a.g,n.g),c=r(a.b,n.b),h=xi(a.opacity,n.opacity);return function(u){return a.r=s(u),a.g=o(u),a.b=c(u),a.opacity=h(u),a+""}}return l(i,"rgb"),i.gamma=t,i}),"rgbGamma")(1);function Gv(t){return function(e){var r=e.length,i=new Array(r),a=new Array(r),n=new Array(r),s,o;for(s=0;s<r;++s)o=Ga(e[s]),i[s]=o.r||0,a[s]=o.g||0,n[s]=o.b||0;return i=t(i),a=t(a),n=t(n),o.opacity=1,function(c){return o.r=i(c),o.g=a(c),o.b=n(c),o+""}}}l(Gv,"rgbSpline");function ey(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,i=e.slice(),a;return function(n){for(a=0;a<r;++a)i[a]=t[a]*(1-n)+e[a]*n;return i}}l(ey,"default");function ry(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}l(ry,"isNumberArray");function iy(t,e){var r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),n=new Array(r),s;for(s=0;s<i;++s)a[s]=xs(t[s],e[s]);for(;s<r;++s)n[s]=e[s];return function(o){for(s=0;s<i;++s)n[s]=a[s](o);return n}}l(iy,"genericArray");function ay(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}l(ay,"default");function ue(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}l(ue,"default");function ny(t,e){var r={},i={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=xs(t[a],e[a]):i[a]=e[a];return function(n){for(a in r)i[a]=r[a](n);return i}}l(ny,"default");var Il=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hl=new RegExp(Il.source,"g");function oy(t){return function(){return t}}l(oy,"zero");function sy(t){return function(e){return t(e)+""}}l(sy,"one");function Mc(t,e){var r=Il.lastIndex=hl.lastIndex=0,i,a,n,s=-1,o=[],c=[];for(t=t+"",e=e+"";(i=Il.exec(t))&&(a=hl.exec(e));)(n=a.index)>r&&(n=e.slice(r,n),o[s]?o[s]+=n:o[++s]=n),(i=i[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,c.push({i:s,x:ue(i,a)})),r=hl.lastIndex;return r<e.length&&(n=e.slice(r),o[s]?o[s]+=n:o[++s]=n),o.length<2?c[0]?sy(c[0].x):oy(e):(e=c.length,function(h){for(var u=0,d;u<e;++u)o[(d=c[u]).i]=d.x(h);return o.join("")})}l(Mc,"default");function xs(t,e){var r=typeof e,i;return e==null||r==="boolean"?ms(e):(r==="number"?ue:r==="string"?(i=pr(e))?(e=i,Ao):Mc:e instanceof pr?Ao:e instanceof Date?ay:ry(e)?ey:Array.isArray(e)?iy:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?ny:ue)(t,e)}l(xs,"default");function ly(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}l(ly,"default");var zd=180/Math.PI,Pl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Bc(t,e,r,i,a,n){var s,o,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*r+e*i)&&(r-=t*c,i-=e*c),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,c/=o),t*i<e*r&&(t=-t,e=-e,c=-c,s=-s),{translateX:a,translateY:n,rotate:Math.atan2(e,t)*zd,skewX:Math.atan(c)*zd,scaleX:s,scaleY:o}}l(Bc,"default");var Hn;function hy(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Pl:Bc(e.a,e.b,e.c,e.d,e.e,e.f)}l(hy,"parseCss");function cy(t){return t==null?Pl:(Hn||(Hn=document.createElementNS("http://www.w3.org/2000/svg","g")),Hn.setAttribute("transform",t),(t=Hn.transform.baseVal.consolidate())?(t=t.matrix,Bc(t.a,t.b,t.c,t.d,t.e,t.f)):Pl)}l(cy,"parseSvg");function Ac(t,e,r,i){function a(h){return h.length?h.pop()+" ":""}l(a,"pop");function n(h,u,d,p,f,g){if(h!==d||u!==p){var y=f.push("translate(",null,e,null,r);g.push({i:y-4,x:ue(h,d)},{i:y-2,x:ue(u,p)})}else(d||p)&&f.push("translate("+d+e+p+r)}l(n,"translate");function s(h,u,d,p){h!==u?(h-u>180?u+=360:u-h>180&&(h+=360),p.push({i:d.push(a(d)+"rotate(",null,i)-2,x:ue(h,u)})):u&&d.push(a(d)+"rotate("+u+i)}l(s,"rotate");function o(h,u,d,p){h!==u?p.push({i:d.push(a(d)+"skewX(",null,i)-2,x:ue(h,u)}):u&&d.push(a(d)+"skewX("+u+i)}l(o,"skewX");function c(h,u,d,p,f,g){if(h!==d||u!==p){var y=f.push(a(f)+"scale(",null,",",null,")");g.push({i:y-4,x:ue(h,d)},{i:y-2,x:ue(u,p)})}else(d!==1||p!==1)&&f.push(a(f)+"scale("+d+","+p+")")}return l(c,"scale"),function(h,u){var d=[],p=[];return h=t(h),u=t(u),n(h.translateX,h.translateY,u.translateX,u.translateY,d,p),s(h.rotate,u.rotate,d,p),o(h.skewX,u.skewX,d,p),c(h.scaleX,h.scaleY,u.scaleX,u.scaleY,d,p),h=u=null,function(f){for(var g=-1,y=p.length,m;++g<y;)d[(m=p[g]).i]=m.x(f);return d.join("")}}}l(Ac,"interpolateTransform");var Xv=Ac(hy,"px, ","px)","deg)"),Zv=Ac(cy,", ",")",")");function uy(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}l(uy,"default");function Za(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}l(Za,"formatDecimalParts");function Ir(t){return t=Za(Math.abs(t)),t?t[1]:NaN}l(Ir,"default");function dy(t,e){return function(r,i){for(var a=r.length,n=[],s=0,o=t[0],c=0;a>0&&o>0&&(c+o+1>i&&(o=Math.max(1,i-c)),n.push(r.substring(a-=o,a+o)),!((c+=o+1)>i));)o=t[s=(s+1)%t.length];return n.reverse().join(e)}}l(dy,"default");function py(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}l(py,"default");var Qv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qa(t){if(!(e=Qv.exec(t)))throw new Error("invalid format: "+t);var e;return new bs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}l(Qa,"formatSpecifier");Qa.prototype=bs.prototype;function bs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}l(bs,"FormatSpecifier");bs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function fy(t){t:for(var e=t.length,r=1,i=-1,a;r<e;++r)switch(t[r]){case".":i=a=r;break;case"0":i===0&&(i=r),a=r;break;default:if(!+t[r])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(a+1):t}l(fy,"default");var gy;function yy(t,e){var r=Za(t,e);if(!r)return t+"";var i=r[0],a=r[1],n=a-(gy=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=i.length;return n===s?i:n>s?i+new Array(n-s+1).join("0"):n>0?i.slice(0,n)+"."+i.slice(n):"0."+new Array(1-n).join("0")+Za(t,Math.max(0,e+n-1))[0]}l(yy,"default");function Rl(t,e){var r=Za(t,e);if(!r)return t+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}l(Rl,"default");var qd={"%":l((t,e)=>(t*100).toFixed(e),"%"),b:l(t=>Math.round(t).toString(2),"b"),c:l(t=>t+"","c"),d:uy,e:l((t,e)=>t.toExponential(e),"e"),f:l((t,e)=>t.toFixed(e),"f"),g:l((t,e)=>t.toPrecision(e),"g"),o:l(t=>Math.round(t).toString(8),"o"),p:l((t,e)=>Rl(t*100,e),"p"),r:Rl,s:yy,X:l(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:l(t=>Math.round(t).toString(16),"x")};function Nl(t){return t}l(Nl,"default");var Wd=Array.prototype.map,jd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function my(t){var e=t.grouping===void 0||t.thousands===void 0?Nl:dy(Wd.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",n=t.numerals===void 0?Nl:py(Wd.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function h(d){d=Qa(d);var p=d.fill,f=d.align,g=d.sign,y=d.symbol,m=d.zero,x=d.width,b=d.comma,k=d.precision,_=d.trim,w=d.type;w==="n"?(b=!0,w="g"):qd[w]||(k===void 0&&(k=12),_=!0,w="g"),(m||p==="0"&&f==="=")&&(m=!0,p="0",f="=");var $=y==="$"?r:y==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T=y==="$"?i:/[%p]/.test(w)?s:"",O=qd[w],R=/[defgprs%]/.test(w);k=k===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function I(S){var D=$,A=T,B,L,M;if(w==="c")A=O(S)+A,S="";else{S=+S;var E=S<0||1/S<0;if(S=isNaN(S)?c:O(Math.abs(S),k),_&&(S=fy(S)),E&&+S==0&&g!=="+"&&(E=!1),D=(E?g==="("?g:o:g==="-"||g==="("?"":g)+D,A=(w==="s"?jd[8+gy/3]:"")+A+(E&&g==="("?")":""),R){for(B=-1,L=S.length;++B<L;)if(M=S.charCodeAt(B),48>M||M>57){A=(M===46?a+S.slice(B+1):S.slice(B))+A,S=S.slice(0,B);break}}}b&&!m&&(S=e(S,1/0));var F=D.length+S.length+A.length,z=F<x?new Array(x-F+1).join(p):"";switch(b&&m&&(S=e(z+S,z.length?x-A.length:1/0),z=""),f){case"<":S=D+S+A+z;break;case"=":S=D+z+S+A;break;case"^":S=z.slice(0,F=z.length>>1)+D+S+A+z.slice(F);break;default:S=z+D+S+A;break}return n(S)}return l(I,"format"),I.toString=function(){return d+""},I}l(h,"newFormat");function u(d,p){var f=h((d=Qa(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Ir(p)/3)))*3,y=Math.pow(10,-g),m=jd[8+g/3];return function(x){return f(y*x)+m}}return l(u,"formatPrefix"),{format:h,formatPrefix:u}}l(my,"default");var Un,xy,by;ky({thousands:",",grouping:[3],currency:["$",""]});function ky(t){return Un=my(t),xy=Un.format,by=Un.formatPrefix,Un}l(ky,"defaultLocale");function Cy(t){return Math.max(0,-Ir(Math.abs(t)))}l(Cy,"default");function $y(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ir(e)/3)))*3-Ir(Math.abs(t)))}l($y,"default");function wy(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ir(e)-Ir(t))+1}l(wy,"default");function vy(t){var e=0,r=t.children,i=r&&r.length;if(!i)e=1;else for(;--i>=0;)e+=r[i].value;t.value=e}l(vy,"count");function _y(){return this.eachAfter(vy)}l(_y,"default");function Sy(t,e){let r=-1;for(let i of this)t.call(e,i,++r,this);return this}l(Sy,"default");function Ty(t,e){for(var r=this,i=[r],a,n,s=-1;r=i.pop();)if(t.call(e,r,++s,this),a=r.children)for(n=a.length-1;n>=0;--n)i.push(a[n]);return this}l(Ty,"default");function My(t,e){for(var r=this,i=[r],a=[],n,s,o,c=-1;r=i.pop();)if(a.push(r),n=r.children)for(s=0,o=n.length;s<o;++s)i.push(n[s]);for(;r=a.pop();)t.call(e,r,++c,this);return this}l(My,"default");function By(t,e){let r=-1;for(let i of this)if(t.call(e,i,++r,this))return i}l(By,"default");function Ay(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,a=i&&i.length;--a>=0;)r+=i[a].value;e.value=r})}l(Ay,"default");function Ly(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}l(Ly,"default");function Fy(t){for(var e=this,r=Ey(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var a=i.length;t!==r;)i.splice(a,0,t),t=t.parent;return i}l(Fy,"default");function Ey(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),a=null;for(t=r.pop(),e=i.pop();t===e;)a=t,t=r.pop(),e=i.pop();return a}l(Ey,"leastCommonAncestor");function Dy(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}l(Dy,"default");function Oy(){return Array.from(this)}l(Oy,"default");function Iy(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}l(Iy,"default");function Py(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}l(Py,"default");function*Ry(){var t=this,e,r=[t],i,a,n;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,i=t.children)for(a=0,n=i.length;a<n;++a)r.push(i[a]);while(r.length)}l(Ry,"default");function Lc(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=qy)):e===void 0&&(e=zy);for(var r=new Ja(t),i,a=[r],n,s,o,c;i=a.pop();)if((s=e(i.data))&&(c=(s=Array.from(s)).length))for(i.children=s,o=c-1;o>=0;--o)a.push(n=s[o]=new Ja(s[o])),n.parent=i,n.depth=i.depth+1;return r.eachBefore(jy)}l(Lc,"hierarchy");function Ny(){return Lc(this).eachBefore(Wy)}l(Ny,"node_copy");function zy(t){return t.children}l(zy,"objectChildren");function qy(t){return Array.isArray(t)?t[1]:null}l(qy,"mapChildren");function Wy(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}l(Wy,"copyData");function jy(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}l(jy,"computeHeight");function Ja(t){this.data=t,this.depth=this.height=0,this.parent=null}l(Ja,"Node");Ja.prototype=Lc.prototype={constructor:Ja,count:_y,each:Sy,eachAfter:My,eachBefore:Ty,find:By,sum:Ay,sort:Ly,path:Fy,ancestors:Dy,descendants:Oy,leaves:Iy,links:Py,copy:Ny,[Symbol.iterator]:Ry};function Hy(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}l(Hy,"default");function Uy(t,e,r,i,a){for(var n=t.children,s,o=-1,c=n.length,h=t.value&&(i-e)/t.value;++o<c;)s=n[o],s.y0=r,s.y1=a,s.x0=e,s.x1=e+=s.value*h}l(Uy,"default");function Yy(t,e,r,i,a){for(var n=t.children,s,o=-1,c=n.length,h=t.value&&(a-r)/t.value;++o<c;)s=n[o],s.x0=e,s.x1=i,s.y0=r,s.y1=r+=s.value*h}l(Yy,"default");var Jv=(1+Math.sqrt(5))/2;function Vy(t,e,r,i,a,n){for(var s=[],o=e.children,c,h,u=0,d=0,p=o.length,f,g,y=e.value,m,x,b,k,_,w,$;u<p;){f=a-r,g=n-i;do m=o[d++].value;while(!m&&d<p);for(x=b=m,w=Math.max(g/f,f/g)/(y*t),$=m*m*w,_=Math.max(b/$,$/x);d<p;++d){if(m+=h=o[d].value,h<x&&(x=h),h>b&&(b=h),$=m*m*w,k=Math.max(b/$,$/x),k>_){m-=h;break}_=k}s.push(c={value:m,dice:f<g,children:o.slice(u,d)}),c.dice?Uy(c,r,i,a,y?i+=g*m/y:n):Yy(c,r,i,y?r+=f*m/y:a,n),y-=m,u=d}return s}l(Vy,"squarifyRatio");var Kv=l((function t(e){function r(i,a,n,s,o){Vy(e,i,a,n,s,o)}return l(r,"squarify"),r.ratio=function(i){return t((i=+i)>1?i:1)},r}),"custom")(Jv);function Gy(t){if(typeof t!="function")throw new Error;return t}l(Gy,"required");function ri(){return 0}l(ri,"constantZero");function ii(t){return function(){return t}}l(ii,"default");function t_(){var t=Kv,e=!1,r=1,i=1,a=[0],n=ri,s=ri,o=ri,c=ri,h=ri;function u(p){return p.x0=p.y0=0,p.x1=r,p.y1=i,p.eachBefore(d),a=[0],e&&p.eachBefore(Hy),p}l(u,"treemap");function d(p){var f=a[p.depth],g=p.x0+f,y=p.y0+f,m=p.x1-f,x=p.y1-f;m<g&&(g=m=(g+m)/2),x<y&&(y=x=(y+x)/2),p.x0=g,p.y0=y,p.x1=m,p.y1=x,p.children&&(f=a[p.depth+1]=n(p)/2,g+=h(p)-f,y+=s(p)-f,m-=o(p)-f,x-=c(p)-f,m<g&&(g=m=(g+m)/2),x<y&&(y=x=(y+x)/2),t(p,g,y,m,x))}return l(d,"positionNode"),u.round=function(p){return arguments.length?(e=!!p,u):e},u.size=function(p){return arguments.length?(r=+p[0],i=+p[1],u):[r,i]},u.tile=function(p){return arguments.length?(t=Gy(p),u):t},u.padding=function(p){return arguments.length?u.paddingInner(p).paddingOuter(p):u.paddingInner()},u.paddingInner=function(p){return arguments.length?(n=typeof p=="function"?p:ii(+p),u):n},u.paddingOuter=function(p){return arguments.length?u.paddingTop(p).paddingRight(p).paddingBottom(p).paddingLeft(p):u.paddingTop()},u.paddingTop=function(p){return arguments.length?(s=typeof p=="function"?p:ii(+p),u):s},u.paddingRight=function(p){return arguments.length?(o=typeof p=="function"?p:ii(+p),u):o},u.paddingBottom=function(p){return arguments.length?(c=typeof p=="function"?p:ii(+p),u):c},u.paddingLeft=function(p){return arguments.length?(h=typeof p=="function"?p:ii(+p),u):h},u}l(t_,"default");function $n(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}l($n,"initRange");var Hd=Symbol("implicit");function Fc(){var t=new Id,e=[],r=[],i=Hd;function a(n){let s=t.get(n);if(s===void 0){if(i!==Hd)return i;t.set(n,s=e.push(n)-1)}return r[s%r.length]}return l(a,"scale"),a.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Id;for(let s of n)t.has(s)||t.set(s,e.push(s)-1);return a},a.range=function(n){return arguments.length?(r=Array.from(n),a):r.slice()},a.unknown=function(n){return arguments.length?(i=n,a):i},a.copy=function(){return Fc(e,r).unknown(i)},$n.apply(a,arguments),a}l(Fc,"ordinal");function Xy(t){return function(){return t}}l(Xy,"constants");function Zy(t){return+t}l(Zy,"number");var Ud=[0,1];function Br(t){return t}l(Br,"identity");function Lo(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:Xy(isNaN(e)?NaN:.5)}l(Lo,"normalize");function Qy(t,e){var r;return t>e&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}l(Qy,"clamper");function Jy(t,e,r){var i=t[0],a=t[1],n=e[0],s=e[1];return a<i?(i=Lo(a,i),n=r(s,n)):(i=Lo(i,a),n=r(n,s)),function(o){return n(i(o))}}l(Jy,"bimap");function Ky(t,e,r){var i=Math.min(t.length,e.length)-1,a=new Array(i),n=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)a[s]=Lo(t[s],t[s+1]),n[s]=r(e[s],e[s+1]);return function(o){var c=Mv(t,o,1,i)-1;return n[c](a[c](o))}}l(Ky,"polymap");function Ec(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}l(Ec,"copy");function tm(){var t=Ud,e=Ud,r=xs,i,a,n,s=Br,o,c,h;function u(){var p=Math.min(t.length,e.length);return s!==Br&&(s=Qy(t[0],t[p-1])),o=p>2?Ky:Jy,c=h=null,d}l(u,"rescale");function d(p){return p==null||isNaN(p=+p)?n:(c||(c=o(t.map(i),e,r)))(i(s(p)))}return l(d,"scale"),d.invert=function(p){return s(a((h||(h=o(e,t.map(i),ue)))(p)))},d.domain=function(p){return arguments.length?(t=Array.from(p,Zy),u()):t.slice()},d.range=function(p){return arguments.length?(e=Array.from(p),u()):e.slice()},d.rangeRound=function(p){return e=Array.from(p),r=ly,u()},d.clamp=function(p){return arguments.length?(s=p?!0:Br,u()):s!==Br},d.interpolate=function(p){return arguments.length?(r=p,u()):r},d.unknown=function(p){return arguments.length?(n=p,d):n},function(p,f){return i=p,a=f,u()}}l(tm,"transformer");function Dc(){return tm()(Br,Br)}l(Dc,"continuous");function em(t,e,r,i){var a=So(t,e,r),n;switch(i=Qa(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(n=$y(a,s))&&(i.precision=n),by(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(n=wy(a,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=n-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(n=Cy(a))&&(i.precision=n-(i.type==="%")*2);break}}return xy(i)}l(em,"tickFormat");function rm(t){var e=t.domain;return t.ticks=function(r){var i=e();return tf(i[0],i[i.length-1],r??10)},t.tickFormat=function(r,i){var a=e();return em(a[0],a[a.length-1],r??10,i)},t.nice=function(r){r==null&&(r=10);var i=e(),a=0,n=i.length-1,s=i[a],o=i[n],c,h,u=10;for(o<s&&(h=s,s=o,o=h,h=a,a=n,n=h);u-- >0;){if(h=_o(s,o,r),h===c)return i[a]=s,i[n]=o,e(i);if(h>0)s=Math.floor(s/h)*h,o=Math.ceil(o/h)*h;else if(h<0)s=Math.ceil(s*h)/h,o=Math.floor(o*h)/h;else break;c=h}return t},t}l(rm,"linearish");function im(){var t=Dc();return t.copy=function(){return Ec(t,im())},$n.apply(t,arguments),rm(t)}l(im,"linear");var cl=new Date,ul=new Date;function Ft(t,e,r,i){function a(n){return t(n=arguments.length===0?new Date:new Date(+n)),n}return l(a,"interval"),a.floor=n=>(t(n=new Date(+n)),n),a.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),a.round=n=>{let s=a(n),o=a.ceil(n);return n-s<o-n?s:o},a.offset=(n,s)=>(e(n=new Date(+n),s==null?1:Math.floor(s)),n),a.range=(n,s,o)=>{let c=[];if(n=a.ceil(n),o=o==null?1:Math.floor(o),!(n<s)||!(o>0))return c;let h;do c.push(h=new Date(+n)),e(n,o),t(n);while(h<n&&n<s);return c},a.filter=n=>Ft(s=>{if(s>=s)for(;t(s),!n(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!n(s););else for(;--o>=0;)for(;e(s,1),!n(s););}),r&&(a.count=(n,s)=>(cl.setTime(+n),ul.setTime(+s),t(cl),t(ul),Math.floor(r(cl,ul))),a.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?a.filter(i?s=>i(s)%n===0:s=>a.count(0,s)%n===0):a)),a}l(Ft,"timeInterval");var Fo=Ft(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Fo.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Ft(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Fo);Fo.range;var pi=Ft(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds());pi.range;var Oc=Ft(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes());Oc.range;var am=Ft(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes());am.range;var Ic=Ft(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours());Ic.range;var nm=Ft(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours());nm.range;var wn=Ft(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1);wn.range;var Pc=Ft(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1);Pc.range;var om=Ft(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5));om.range;function xr(t){return Ft(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}l(xr,"timeWeekday");var ks=xr(0),Eo=xr(1),e_=xr(2),r_=xr(3),Vi=xr(4),i_=xr(5),a_=xr(6);ks.range;Eo.range;e_.range;r_.range;Vi.range;i_.range;a_.range;function br(t){return Ft(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}l(br,"utcWeekday");var Rc=br(0),Do=br(1),n_=br(2),o_=br(3),Gi=br(4),s_=br(5),l_=br(6);Rc.range;Do.range;n_.range;o_.range;Gi.range;s_.range;l_.range;var Nc=Ft(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Nc.range;var sm=Ft(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());sm.range;var Qe=Ft(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Qe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ft(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});Qe.range;var fr=Ft(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());fr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ft(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});fr.range;function zc(t,e,r,i,a,n){let s=[[pi,1,1e3],[pi,5,5e3],[pi,15,15e3],[pi,30,3e4],[n,1,6e4],[n,5,3e5],[n,15,9e5],[n,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[i,1,864e5],[i,2,1728e5],[r,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function o(h,u,d){let p=u<h;p&&([h,u]=[u,h]);let f=d&&typeof d.range=="function"?d:c(h,u,d),g=f?f.range(h,+u+1):[];return p?g.reverse():g}l(o,"ticks");function c(h,u,d){let p=Math.abs(u-h)/d,f=fs(([,,m])=>m).right(s,p);if(f===s.length)return t.every(So(h/31536e6,u/31536e6,d));if(f===0)return Fo.every(Math.max(So(h,u,d),1));let[g,y]=s[p/s[f-1][2]<s[f][2]/p?f-1:f];return g.every(y)}return l(c,"tickInterval"),[o,c]}l(zc,"ticker");var[kE,CE]=zc(fr,sm,Rc,om,nm,am),[h_,c_]=zc(Qe,Nc,ks,wn,Ic,Oc);function oo(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}l(oo,"localDate");function so(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}l(so,"utcDate");function ai(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}l(ai,"newDate");function lm(t){var e=t.dateTime,r=t.date,i=t.time,a=t.periods,n=t.days,s=t.shortDays,o=t.months,c=t.shortMonths,h=ni(a),u=oi(a),d=ni(n),p=oi(n),f=ni(s),g=oi(s),y=ni(o),m=oi(o),x=ni(c),b=oi(c),k={a:E,A:F,b:z,B:V,c:null,d:Hl,e:Hl,f:Bm,g:Nm,G:qm,H:Sm,I:Tm,j:Mm,L:qc,m:Am,M:Lm,p:G,q:Z,Q:Vl,s:Gl,S:Fm,u:Em,U:Dm,V:Om,w:Im,W:Pm,x:null,X:null,y:Rm,Y:zm,Z:Wm,"%":Yl},_={a:U,A:ct,b:et,B:wt,c:null,d:Ul,e:Ul,f:Ym,g:r0,G:a0,H:jm,I:Hm,j:Um,L:jc,m:Vm,M:Gm,p:Ct,q:Tt,Q:Vl,s:Gl,S:Xm,u:Zm,U:Qm,V:Jm,w:Km,W:t0,x:null,X:null,y:e0,Y:i0,Z:n0,"%":Yl},w={a:I,A:S,b:D,B:A,c:B,d:Wl,e:Wl,f:$m,g:ql,G:zl,H:jl,I:jl,j:xm,L:Cm,m:mm,M:bm,p:R,q:ym,Q:vm,s:_m,S:km,u:um,U:dm,V:pm,w:cm,W:fm,x:L,X:M,y:ql,Y:zl,Z:gm,"%":wm};k.x=$(r,k),k.X=$(i,k),k.c=$(e,k),_.x=$(r,_),_.X=$(i,_),_.c=$(e,_);function $(q,rt){return function(ht){var N=[],$t=-1,yt=0,Bt=q.length,Pt,me,Ne;for(ht instanceof Date||(ht=new Date(+ht));++$t<Bt;)q.charCodeAt($t)===37&&(N.push(q.slice(yt,$t)),(me=Yd[Pt=q.charAt(++$t)])!=null?Pt=q.charAt(++$t):me=Pt==="e"?" ":"0",(Ne=rt[Pt])&&(Pt=Ne(ht,me)),N.push(Pt),yt=$t+1);return N.push(q.slice(yt,$t)),N.join("")}}l($,"newFormat");function T(q,rt){return function(ht){var N=ai(1900,void 0,1),$t=O(N,q,ht+="",0),yt,Bt;if($t!=ht.length)return null;if("Q"in N)return new Date(N.Q);if("s"in N)return new Date(N.s*1e3+("L"in N?N.L:0));if(rt&&!("Z"in N)&&(N.Z=0),"p"in N&&(N.H=N.H%12+N.p*12),N.m===void 0&&(N.m="q"in N?N.q:0),"V"in N){if(N.V<1||N.V>53)return null;"w"in N||(N.w=1),"Z"in N?(yt=so(ai(N.y,0,1)),Bt=yt.getUTCDay(),yt=Bt>4||Bt===0?Do.ceil(yt):Do(yt),yt=Pc.offset(yt,(N.V-1)*7),N.y=yt.getUTCFullYear(),N.m=yt.getUTCMonth(),N.d=yt.getUTCDate()+(N.w+6)%7):(yt=oo(ai(N.y,0,1)),Bt=yt.getDay(),yt=Bt>4||Bt===0?Eo.ceil(yt):Eo(yt),yt=wn.offset(yt,(N.V-1)*7),N.y=yt.getFullYear(),N.m=yt.getMonth(),N.d=yt.getDate()+(N.w+6)%7)}else("W"in N||"U"in N)&&("w"in N||(N.w="u"in N?N.u%7:"W"in N?1:0),Bt="Z"in N?so(ai(N.y,0,1)).getUTCDay():oo(ai(N.y,0,1)).getDay(),N.m=0,N.d="W"in N?(N.w+6)%7+N.W*7-(Bt+5)%7:N.w+N.U*7-(Bt+6)%7);return"Z"in N?(N.H+=N.Z/100|0,N.M+=N.Z%100,so(N)):oo(N)}}l(T,"newParse");function O(q,rt,ht,N){for(var $t=0,yt=rt.length,Bt=ht.length,Pt,me;$t<yt;){if(N>=Bt)return-1;if(Pt=rt.charCodeAt($t++),Pt===37){if(Pt=rt.charAt($t++),me=w[Pt in Yd?rt.charAt($t++):Pt],!me||(N=me(q,ht,N))<0)return-1}else if(Pt!=ht.charCodeAt(N++))return-1}return N}l(O,"parseSpecifier");function R(q,rt,ht){var N=h.exec(rt.slice(ht));return N?(q.p=u.get(N[0].toLowerCase()),ht+N[0].length):-1}l(R,"parsePeriod");function I(q,rt,ht){var N=f.exec(rt.slice(ht));return N?(q.w=g.get(N[0].toLowerCase()),ht+N[0].length):-1}l(I,"parseShortWeekday");function S(q,rt,ht){var N=d.exec(rt.slice(ht));return N?(q.w=p.get(N[0].toLowerCase()),ht+N[0].length):-1}l(S,"parseWeekday");function D(q,rt,ht){var N=x.exec(rt.slice(ht));return N?(q.m=b.get(N[0].toLowerCase()),ht+N[0].length):-1}l(D,"parseShortMonth");function A(q,rt,ht){var N=y.exec(rt.slice(ht));return N?(q.m=m.get(N[0].toLowerCase()),ht+N[0].length):-1}l(A,"parseMonth");function B(q,rt,ht){return O(q,e,rt,ht)}l(B,"parseLocaleDateTime");function L(q,rt,ht){return O(q,r,rt,ht)}l(L,"parseLocaleDate");function M(q,rt,ht){return O(q,i,rt,ht)}l(M,"parseLocaleTime");function E(q){return s[q.getDay()]}l(E,"formatShortWeekday");function F(q){return n[q.getDay()]}l(F,"formatWeekday");function z(q){return c[q.getMonth()]}l(z,"formatShortMonth");function V(q){return o[q.getMonth()]}l(V,"formatMonth");function G(q){return a[+(q.getHours()>=12)]}l(G,"formatPeriod");function Z(q){return 1+~~(q.getMonth()/3)}l(Z,"formatQuarter");function U(q){return s[q.getUTCDay()]}l(U,"formatUTCShortWeekday");function ct(q){return n[q.getUTCDay()]}l(ct,"formatUTCWeekday");function et(q){return c[q.getUTCMonth()]}l(et,"formatUTCShortMonth");function wt(q){return o[q.getUTCMonth()]}l(wt,"formatUTCMonth");function Ct(q){return a[+(q.getUTCHours()>=12)]}l(Ct,"formatUTCPeriod");function Tt(q){return 1+~~(q.getUTCMonth()/3)}return l(Tt,"formatUTCQuarter"),{format:l(function(q){var rt=$(q+="",k);return rt.toString=function(){return q},rt},"format"),parse:l(function(q){var rt=T(q+="",!1);return rt.toString=function(){return q},rt},"parse"),utcFormat:l(function(q){var rt=$(q+="",_);return rt.toString=function(){return q},rt},"utcFormat"),utcParse:l(function(q){var rt=T(q+="",!0);return rt.toString=function(){return q},rt},"utcParse")}}l(lm,"formatLocale");var Yd={"-":"",_:" ",0:"0"},It=/^\s*\d+/,u_=/^%/,d_=/[\\^$*+?|[\]().{}]/g;function ft(t,e,r){var i=t<0?"-":"",a=(i?-t:t)+"",n=a.length;return i+(n<r?new Array(r-n+1).join(e)+a:a)}l(ft,"pad");function hm(t){return t.replace(d_,"\\$&")}l(hm,"requote");function ni(t){return new RegExp("^(?:"+t.map(hm).join("|")+")","i")}l(ni,"formatRe");function oi(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}l(oi,"formatLookup");function cm(t,e,r){var i=It.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}l(cm,"parseWeekdayNumberSunday");function um(t,e,r){var i=It.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}l(um,"parseWeekdayNumberMonday");function dm(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}l(dm,"parseWeekNumberSunday");function pm(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}l(pm,"parseWeekNumberISO");function fm(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}l(fm,"parseWeekNumberMonday");function zl(t,e,r){var i=It.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}l(zl,"parseFullYear");function ql(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}l(ql,"parseYear");function gm(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}l(gm,"parseZone");function ym(t,e,r){var i=It.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}l(ym,"parseQuarter");function mm(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}l(mm,"parseMonthNumber");function Wl(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}l(Wl,"parseDayOfMonth");function xm(t,e,r){var i=It.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}l(xm,"parseDayOfYear");function jl(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}l(jl,"parseHour24");function bm(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}l(bm,"parseMinutes");function km(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}l(km,"parseSeconds");function Cm(t,e,r){var i=It.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}l(Cm,"parseMilliseconds");function $m(t,e,r){var i=It.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}l($m,"parseMicroseconds");function wm(t,e,r){var i=u_.exec(e.slice(r,r+1));return i?r+i[0].length:-1}l(wm,"parseLiteralPercent");function vm(t,e,r){var i=It.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}l(vm,"parseUnixTimestamp");function _m(t,e,r){var i=It.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}l(_m,"parseUnixTimestampSeconds");function Hl(t,e){return ft(t.getDate(),e,2)}l(Hl,"formatDayOfMonth");function Sm(t,e){return ft(t.getHours(),e,2)}l(Sm,"formatHour24");function Tm(t,e){return ft(t.getHours()%12||12,e,2)}l(Tm,"formatHour12");function Mm(t,e){return ft(1+wn.count(Qe(t),t),e,3)}l(Mm,"formatDayOfYear");function qc(t,e){return ft(t.getMilliseconds(),e,3)}l(qc,"formatMilliseconds");function Bm(t,e){return qc(t,e)+"000"}l(Bm,"formatMicroseconds");function Am(t,e){return ft(t.getMonth()+1,e,2)}l(Am,"formatMonthNumber");function Lm(t,e){return ft(t.getMinutes(),e,2)}l(Lm,"formatMinutes");function Fm(t,e){return ft(t.getSeconds(),e,2)}l(Fm,"formatSeconds");function Em(t){var e=t.getDay();return e===0?7:e}l(Em,"formatWeekdayNumberMonday");function Dm(t,e){return ft(ks.count(Qe(t)-1,t),e,2)}l(Dm,"formatWeekNumberSunday");function Wc(t){var e=t.getDay();return e>=4||e===0?Vi(t):Vi.ceil(t)}l(Wc,"dISO");function Om(t,e){return t=Wc(t),ft(Vi.count(Qe(t),t)+(Qe(t).getDay()===4),e,2)}l(Om,"formatWeekNumberISO");function Im(t){return t.getDay()}l(Im,"formatWeekdayNumberSunday");function Pm(t,e){return ft(Eo.count(Qe(t)-1,t),e,2)}l(Pm,"formatWeekNumberMonday");function Rm(t,e){return ft(t.getFullYear()%100,e,2)}l(Rm,"formatYear");function Nm(t,e){return t=Wc(t),ft(t.getFullYear()%100,e,2)}l(Nm,"formatYearISO");function zm(t,e){return ft(t.getFullYear()%1e4,e,4)}l(zm,"formatFullYear");function qm(t,e){var r=t.getDay();return t=r>=4||r===0?Vi(t):Vi.ceil(t),ft(t.getFullYear()%1e4,e,4)}l(qm,"formatFullYearISO");function Wm(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ft(e/60|0,"0",2)+ft(e%60,"0",2)}l(Wm,"formatZone");function Ul(t,e){return ft(t.getUTCDate(),e,2)}l(Ul,"formatUTCDayOfMonth");function jm(t,e){return ft(t.getUTCHours(),e,2)}l(jm,"formatUTCHour24");function Hm(t,e){return ft(t.getUTCHours()%12||12,e,2)}l(Hm,"formatUTCHour12");function Um(t,e){return ft(1+Pc.count(fr(t),t),e,3)}l(Um,"formatUTCDayOfYear");function jc(t,e){return ft(t.getUTCMilliseconds(),e,3)}l(jc,"formatUTCMilliseconds");function Ym(t,e){return jc(t,e)+"000"}l(Ym,"formatUTCMicroseconds");function Vm(t,e){return ft(t.getUTCMonth()+1,e,2)}l(Vm,"formatUTCMonthNumber");function Gm(t,e){return ft(t.getUTCMinutes(),e,2)}l(Gm,"formatUTCMinutes");function Xm(t,e){return ft(t.getUTCSeconds(),e,2)}l(Xm,"formatUTCSeconds");function Zm(t){var e=t.getUTCDay();return e===0?7:e}l(Zm,"formatUTCWeekdayNumberMonday");function Qm(t,e){return ft(Rc.count(fr(t)-1,t),e,2)}l(Qm,"formatUTCWeekNumberSunday");function Hc(t){var e=t.getUTCDay();return e>=4||e===0?Gi(t):Gi.ceil(t)}l(Hc,"UTCdISO");function Jm(t,e){return t=Hc(t),ft(Gi.count(fr(t),t)+(fr(t).getUTCDay()===4),e,2)}l(Jm,"formatUTCWeekNumberISO");function Km(t){return t.getUTCDay()}l(Km,"formatUTCWeekdayNumberSunday");function t0(t,e){return ft(Do.count(fr(t)-1,t),e,2)}l(t0,"formatUTCWeekNumberMonday");function e0(t,e){return ft(t.getUTCFullYear()%100,e,2)}l(e0,"formatUTCYear");function r0(t,e){return t=Hc(t),ft(t.getUTCFullYear()%100,e,2)}l(r0,"formatUTCYearISO");function i0(t,e){return ft(t.getUTCFullYear()%1e4,e,4)}l(i0,"formatUTCFullYear");function a0(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Gi(t):Gi.ceil(t),ft(t.getUTCFullYear()%1e4,e,4)}l(a0,"formatUTCFullYearISO");function n0(){return"+0000"}l(n0,"formatUTCZone");function Yl(){return"%"}l(Yl,"formatLiteralPercent");function Vl(t){return+t}l(Vl,"formatUnixTimestamp");function Gl(t){return Math.floor(+t/1e3)}l(Gl,"formatUnixTimestampSeconds");var ei,o0;s0({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function s0(t){return ei=lm(t),o0=ei.format,ei.parse,ei.utcFormat,ei.utcParse,ei}l(s0,"defaultLocale");function l0(t,e){t=t.slice();var r=0,i=t.length-1,a=t[r],n=t[i],s;return n<a&&(s=r,r=i,i=s,s=a,a=n,n=s),t[r]=e.floor(a),t[i]=e.ceil(n),t}l(l0,"nice");function h0(t){return new Date(t)}l(h0,"date");function c0(t){return t instanceof Date?+t:+new Date(+t)}l(c0,"number");function Uc(t,e,r,i,a,n,s,o,c,h){var u=Dc(),d=u.invert,p=u.domain,f=h(".%L"),g=h(":%S"),y=h("%I:%M"),m=h("%I %p"),x=h("%a %d"),b=h("%b %d"),k=h("%B"),_=h("%Y");function w($){return(c($)<$?f:o($)<$?g:s($)<$?y:n($)<$?m:i($)<$?a($)<$?x:b:r($)<$?k:_)($)}return l(w,"tickFormat"),u.invert=function($){return new Date(d($))},u.domain=function($){return arguments.length?p(Array.from($,c0)):p().map(h0)},u.ticks=function($){var T=p();return t(T[0],T[T.length-1],$??10)},u.tickFormat=function($,T){return T==null?w:h(T)},u.nice=function($){var T=p();return(!$||typeof $.range!="function")&&($=e(T[0],T[T.length-1],$??10)),$?p(l0(T,$)):u},u.copy=function(){return Ec(u,Uc(t,e,r,i,a,n,s,o,c,h))},u}l(Uc,"calendar");function p_(){return $n.apply(Uc(h_,c_,Qe,Nc,ks,wn,Ic,Oc,pi,o0).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}l(p_,"time");function u0(){var t=Fc().unknown(void 0),e=t.domain,r=t.range,i=0,a=1,n,s,o=!1,c=0,h=0,u=.5;delete t.unknown;function d(){var p=e().length,f=a<i,g=f?a:i,y=f?i:a;n=(y-g)/Math.max(1,p-c+h*2),o&&(n=Math.floor(n)),g+=(y-g-n*(p-c))*u,s=n*(1-c),o&&(g=Math.round(g),s=Math.round(s));var m=ef(p).map(function(x){return g+n*x});return r(f?m.reverse():m)}return l(d,"rescale"),t.domain=function(p){return arguments.length?(e(p),d()):e()},t.range=function(p){return arguments.length?([i,a]=p,i=+i,a=+a,d()):[i,a]},t.rangeRound=function(p){return[i,a]=p,i=+i,a=+a,o=!0,d()},t.bandwidth=function(){return s},t.step=function(){return n},t.round=function(p){return arguments.length?(o=!!p,d()):o},t.padding=function(p){return arguments.length?(c=Math.min(1,h=+p),d()):c},t.paddingInner=function(p){return arguments.length?(c=Math.min(1,p),d()):c},t.paddingOuter=function(p){return arguments.length?(h=+p,d()):h},t.align=function(p){return arguments.length?(u=Math.max(0,Math.min(1,p)),d()):u},t.copy=function(){return u0(e(),[i,a]).round(o).paddingInner(c).paddingOuter(h).align(u)},$n.apply(d(),arguments)}l(u0,"band");function d0(t){for(var e=t.length/6|0,r=new Array(e),i=0;i<e;)r[i]="#"+t.slice(i*6,++i*6);return r}l(d0,"default");var $E=d0("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Mt(t){return l(function(){return t},"constant")}l(Mt,"default");var Vd=Math.abs,jt=Math.atan2,vr=Math.cos,f_=Math.max,dl=Math.min,Fe=Math.sin,fi=Math.sqrt,Ht=1e-12,Ka=Math.PI,Oo=Ka/2,lo=2*Ka;function p0(t){return t>1?0:t<-1?Ka:Math.acos(t)}l(p0,"acos");function Xl(t){return t>=1?Oo:t<=-1?-Oo:Math.asin(t)}l(Xl,"asin");var Zl=Math.PI,Ql=2*Zl,Sr=1e-6,g_=Ql-Sr;function Yc(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}l(Yc,"append");function f0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Yc;let r=10**e;return function(i){this._+=i[0];for(let a=1,n=i.length;a<n;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}l(f0,"appendRound");var Ci,Vc=(Ci=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Yc:f0(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,i,a){this._append`Q${+e},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(e,r,i,a,n,s){this._append`C${+e},${+r},${+i},${+a},${this._x1=+n},${this._y1=+s}`}arcTo(e,r,i,a,n){if(e=+e,r=+r,i=+i,a=+a,n=+n,n<0)throw new Error(`negative radius: ${n}`);let s=this._x1,o=this._y1,c=i-e,h=a-r,u=s-e,d=o-r,p=u*u+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(p>Sr)if(!(Math.abs(d*c-h*u)>Sr)||!n)this._append`L${this._x1=e},${this._y1=r}`;else{let f=i-s,g=a-o,y=c*c+h*h,m=f*f+g*g,x=Math.sqrt(y),b=Math.sqrt(p),k=n*Math.tan((Zl-Math.acos((y+p-m)/(2*x*b)))/2),_=k/b,w=k/x;Math.abs(_-1)>Sr&&this._append`L${e+_*u},${r+_*d}`,this._append`A${n},${n},0,0,${+(d*f>u*g)},${this._x1=e+w*c},${this._y1=r+w*h}`}}arc(e,r,i,a,n,s){if(e=+e,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(a),c=i*Math.sin(a),h=e+o,u=r+c,d=1^s,p=s?a-n:n-a;this._x1===null?this._append`M${h},${u}`:(Math.abs(this._x1-h)>Sr||Math.abs(this._y1-u)>Sr)&&this._append`L${h},${u}`,i&&(p<0&&(p=p%Ql+Ql),p>g_?this._append`A${i},${i},0,1,${d},${e-o},${r-c}A${i},${i},0,1,${d},${this._x1=h},${this._y1=u}`:p>Sr&&this._append`A${i},${i},0,${+(p>=Zl)},${d},${this._x1=e+i*Math.cos(n)},${this._y1=r+i*Math.sin(n)}`)}rect(e,r,i,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}},l(Ci,"Path"),Ci);function g0(){return new Vc}l(g0,"path");g0.prototype=Vc.prototype;function Gc(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new Vc(e)}l(Gc,"withPath");function y0(t){return t.innerRadius}l(y0,"arcInnerRadius");function m0(t){return t.outerRadius}l(m0,"arcOuterRadius");function x0(t){return t.startAngle}l(x0,"arcStartAngle");function b0(t){return t.endAngle}l(b0,"arcEndAngle");function k0(t){return t&&t.padAngle}l(k0,"arcPadAngle");function C0(t,e,r,i,a,n,s,o){var c=r-t,h=i-e,u=s-a,d=o-n,p=d*c-u*h;if(!(p*p<Ht))return p=(u*(e-n)-d*(t-a))/p,[t+p*c,e+p*h]}l(C0,"intersect");function $a(t,e,r,i,a,n,s){var o=t-r,c=e-i,h=(s?n:-n)/fi(o*o+c*c),u=h*c,d=-h*o,p=t+u,f=e+d,g=r+u,y=i+d,m=(p+g)/2,x=(f+y)/2,b=g-p,k=y-f,_=b*b+k*k,w=a-n,$=p*y-g*f,T=(k<0?-1:1)*fi(f_(0,w*w*_-$*$)),O=($*k-b*T)/_,R=(-$*b-k*T)/_,I=($*k+b*T)/_,S=(-$*b+k*T)/_,D=O-m,A=R-x,B=I-m,L=S-x;return D*D+A*A>B*B+L*L&&(O=I,R=S),{cx:O,cy:R,x01:-u,y01:-d,x11:O*(a/w-1),y11:R*(a/w-1)}}l($a,"cornerTangents");function y_(){var t=y0,e=m0,r=Mt(0),i=null,a=x0,n=b0,s=k0,o=null,c=Gc(h);function h(){var u,d,p=+t.apply(this,arguments),f=+e.apply(this,arguments),g=a.apply(this,arguments)-Oo,y=n.apply(this,arguments)-Oo,m=Vd(y-g),x=y>g;if(o||(o=u=c()),f<p&&(d=f,f=p,p=d),!(f>Ht))o.moveTo(0,0);else if(m>lo-Ht)o.moveTo(f*vr(g),f*Fe(g)),o.arc(0,0,f,g,y,!x),p>Ht&&(o.moveTo(p*vr(y),p*Fe(y)),o.arc(0,0,p,y,g,x));else{var b=g,k=y,_=g,w=y,$=m,T=m,O=s.apply(this,arguments)/2,R=O>Ht&&(i?+i.apply(this,arguments):fi(p*p+f*f)),I=dl(Vd(f-p)/2,+r.apply(this,arguments)),S=I,D=I,A,B;if(R>Ht){var L=Xl(R/p*Fe(O)),M=Xl(R/f*Fe(O));($-=L*2)>Ht?(L*=x?1:-1,_+=L,w-=L):($=0,_=w=(g+y)/2),(T-=M*2)>Ht?(M*=x?1:-1,b+=M,k-=M):(T=0,b=k=(g+y)/2)}var E=f*vr(b),F=f*Fe(b),z=p*vr(w),V=p*Fe(w);if(I>Ht){var G=f*vr(k),Z=f*Fe(k),U=p*vr(_),ct=p*Fe(_),et;if(m<Ka)if(et=C0(E,F,U,ct,G,Z,z,V)){var wt=E-et[0],Ct=F-et[1],Tt=G-et[0],q=Z-et[1],rt=1/Fe(p0((wt*Tt+Ct*q)/(fi(wt*wt+Ct*Ct)*fi(Tt*Tt+q*q)))/2),ht=fi(et[0]*et[0]+et[1]*et[1]);S=dl(I,(p-ht)/(rt-1)),D=dl(I,(f-ht)/(rt+1))}else S=D=0}T>Ht?D>Ht?(A=$a(U,ct,E,F,f,D,x),B=$a(G,Z,z,V,f,D,x),o.moveTo(A.cx+A.x01,A.cy+A.y01),D<I?o.arc(A.cx,A.cy,D,jt(A.y01,A.x01),jt(B.y01,B.x01),!x):(o.arc(A.cx,A.cy,D,jt(A.y01,A.x01),jt(A.y11,A.x11),!x),o.arc(0,0,f,jt(A.cy+A.y11,A.cx+A.x11),jt(B.cy+B.y11,B.cx+B.x11),!x),o.arc(B.cx,B.cy,D,jt(B.y11,B.x11),jt(B.y01,B.x01),!x))):(o.moveTo(E,F),o.arc(0,0,f,b,k,!x)):o.moveTo(E,F),!(p>Ht)||!($>Ht)?o.lineTo(z,V):S>Ht?(A=$a(z,V,G,Z,p,-S,x),B=$a(E,F,U,ct,p,-S,x),o.lineTo(A.cx+A.x01,A.cy+A.y01),S<I?o.arc(A.cx,A.cy,S,jt(A.y01,A.x01),jt(B.y01,B.x01),!x):(o.arc(A.cx,A.cy,S,jt(A.y01,A.x01),jt(A.y11,A.x11),!x),o.arc(0,0,p,jt(A.cy+A.y11,A.cx+A.x11),jt(B.cy+B.y11,B.cx+B.x11),x),o.arc(B.cx,B.cy,S,jt(B.y11,B.x11),jt(B.y01,B.x01),!x))):o.arc(0,0,p,w,_,x)}if(o.closePath(),u)return o=null,u+""||null}return l(h,"arc"),h.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+a.apply(this,arguments)+ +n.apply(this,arguments))/2-Ka/2;return[vr(d)*u,Fe(d)*u]},h.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Mt(+u),h):t},h.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Mt(+u),h):e},h.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Mt(+u),h):r},h.padRadius=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:Mt(+u),h):i},h.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Mt(+u),h):a},h.endAngle=function(u){return arguments.length?(n=typeof u=="function"?u:Mt(+u),h):n},h.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Mt(+u),h):s},h.context=function(u){return arguments.length?(o=u??null,h):o},h}l(y_,"default");function Xc(t){this._context=t}l(Xc,"Linear");Xc.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._point=0},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}},"point")};function bi(t){return new Xc(t)}l(bi,"default");function Zc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}l(Zc,"default");function $0(t){return t[0]}l($0,"x");function w0(t){return t[1]}l(w0,"y");function v0(t,e){var r=Mt(!0),i=null,a=bi,n=null,s=Gc(o);t=typeof t=="function"?t:t===void 0?$0:Mt(t),e=typeof e=="function"?e:e===void 0?w0:Mt(e);function o(c){var h,u=(c=Zc(c)).length,d,p=!1,f;for(i==null&&(n=a(f=s())),h=0;h<=u;++h)!(h<u&&r(d=c[h],h,c))===p&&((p=!p)?n.lineStart():n.lineEnd()),p&&n.point(+t(d,h,c),+e(d,h,c));if(f)return n=null,f+""||null}return l(o,"line"),o.x=function(c){return arguments.length?(t=typeof c=="function"?c:Mt(+c),o):t},o.y=function(c){return arguments.length?(e=typeof c=="function"?c:Mt(+c),o):e},o.defined=function(c){return arguments.length?(r=typeof c=="function"?c:Mt(!!c),o):r},o.curve=function(c){return arguments.length?(a=c,i!=null&&(n=a(i)),o):a},o.context=function(c){return arguments.length?(c==null?i=n=null:n=a(i=c),o):i},o}l(v0,"default");function _0(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}l(_0,"default");function S0(t){return t}l(S0,"default");function m_(){var t=S0,e=_0,r=null,i=Mt(0),a=Mt(lo),n=Mt(0);function s(o){var c,h=(o=Zc(o)).length,u,d,p=0,f=new Array(h),g=new Array(h),y=+i.apply(this,arguments),m=Math.min(lo,Math.max(-lo,a.apply(this,arguments)-y)),x,b=Math.min(Math.abs(m)/h,n.apply(this,arguments)),k=b*(m<0?-1:1),_;for(c=0;c<h;++c)(_=g[f[c]=c]=+t(o[c],c,o))>0&&(p+=_);for(e!=null?f.sort(function(w,$){return e(g[w],g[$])}):r!=null&&f.sort(function(w,$){return r(o[w],o[$])}),c=0,d=p?(m-h*k)/p:0;c<h;++c,y=x)u=f[c],_=g[u],x=y+(_>0?_*d:0)+k,g[u]={data:o[u],index:c,value:_,startAngle:y,endAngle:x,padAngle:b};return g}return l(s,"pie"),s.value=function(o){return arguments.length?(t=typeof o=="function"?o:Mt(+o),s):t},s.sortValues=function(o){return arguments.length?(e=o,r=null,s):e},s.sort=function(o){return arguments.length?(r=o,e=null,s):r},s.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Mt(+o),s):i},s.endAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Mt(+o),s):a},s.padAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Mt(+o),s):n},s}l(m_,"default");var $i,T0=($i=class{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}},l($i,"Bump"),$i);function Qc(t){return new T0(t,!0)}l(Qc,"bumpX");function Jc(t){return new T0(t,!1)}l(Jc,"bumpY");function tn(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}l(tn,"point");function vn(t){this._context=t}l(vn,"Basis");vn.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 3:tn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:tn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function Io(t){return new vn(t)}l(Io,"default");function Je(){}l(Je,"default");function Kc(t){this._context=t}l(Kc,"BasisClosed");Kc.prototype={areaStart:Je,areaEnd:Je,lineStart:l(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:tn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function M0(t){return new Kc(t)}l(M0,"default");function tu(t){this._context=t}l(tu,"BasisOpen");tu.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:tn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function B0(t){return new tu(t)}l(B0,"default");function eu(t,e){this._basis=new vn(t),this._beta=e}l(eu,"Bundle");eu.prototype={lineStart:l(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:l(function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i=t[0],a=e[0],n=t[r]-i,s=e[r]-a,o=-1,c;++o<=r;)c=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(i+c*n),this._beta*e[o]+(1-this._beta)*(a+c*s));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:l(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};var x_=l((function t(e){function r(i){return e===1?new vn(i):new eu(i,e)}return l(r,"bundle"),r.beta=function(i){return t(+i)},r}),"custom")(.85);function en(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}l(en,"point");function Cs(t,e){this._context=t,this._k=(1-e)/6}l(Cs,"Cardinal");Cs.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:en(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:en(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var A0=l((function t(e){function r(i){return new Cs(i,e)}return l(r,"cardinal"),r.tension=function(i){return t(+i)},r}),"custom")(0);function $s(t,e){this._context=t,this._k=(1-e)/6}l($s,"CardinalClosed");$s.prototype={areaStart:Je,areaEnd:Je,lineStart:l(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:en(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var b_=l((function t(e){function r(i){return new $s(i,e)}return l(r,"cardinal"),r.tension=function(i){return t(+i)},r}),"custom")(0);function ws(t,e){this._context=t,this._k=(1-e)/6}l(ws,"CardinalOpen");ws.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:en(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var k_=l((function t(e){function r(i){return new ws(i,e)}return l(r,"cardinal"),r.tension=function(i){return t(+i)},r}),"custom")(0);function vs(t,e,r){var i=t._x1,a=t._y1,n=t._x2,s=t._y2;if(t._l01_a>Ht){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,a=(a*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Ht){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*h+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*h+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(i,a,n,s,t._x2,t._y2)}l(vs,"point");function ru(t,e){this._context=t,this._alpha=e}l(ru,"CatmullRom");ru.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:vs(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var L0=l((function t(e){function r(i){return e?new ru(i,e):new Cs(i,0)}return l(r,"catmullRom"),r.alpha=function(i){return t(+i)},r}),"custom")(.5);function iu(t,e){this._context=t,this._alpha=e}l(iu,"CatmullRomClosed");iu.prototype={areaStart:Je,areaEnd:Je,lineStart:l(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},"lineEnd"),point:l(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:vs(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var C_=l((function t(e){function r(i){return e?new iu(i,e):new $s(i,0)}return l(r,"catmullRom"),r.alpha=function(i){return t(+i)},r}),"custom")(.5);function au(t,e){this._context=t,this._alpha=e}l(au,"CatmullRomOpen");au.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vs(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var $_=l((function t(e){function r(i){return e?new au(i,e):new ws(i,0)}return l(r,"catmullRom"),r.alpha=function(i){return t(+i)},r}),"custom")(.5);function nu(t){this._context=t}l(nu,"LinearClosed");nu.prototype={areaStart:Je,areaEnd:Je,lineStart:l(function(){this._point=0},"lineStart"),lineEnd:l(function(){this._point&&this._context.closePath()},"lineEnd"),point:l(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")};function F0(t){return new nu(t)}l(F0,"default");function Jl(t){return t<0?-1:1}l(Jl,"sign");function Kl(t,e,r){var i=t._x1-t._x0,a=e-t._x1,n=(t._y1-t._y0)/(i||a<0&&-0),s=(r-t._y1)/(a||i<0&&-0),o=(n*a+s*i)/(i+a);return(Jl(n)+Jl(s))*Math.min(Math.abs(n),Math.abs(s),.5*Math.abs(o))||0}l(Kl,"slope3");function th(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}l(th,"slope2");function ho(t,e,r){var i=t._x0,a=t._y0,n=t._x1,s=t._y1,o=(n-i)/3;t._context.bezierCurveTo(i+o,a+o*e,n-o,s-o*r,n,s)}l(ho,"point");function rn(t){this._context=t}l(rn,"MonotoneX");rn.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ho(this,this._t0,th(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ho(this,th(this,r=Kl(this,t,e)),r);break;default:ho(this,this._t0,r=Kl(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")};function ou(t){this._context=new su(t)}l(ou,"MonotoneY");(ou.prototype=Object.create(rn.prototype)).point=function(t,e){rn.prototype.point.call(this,e,t)};function su(t){this._context=t}l(su,"ReflectContext");su.prototype={moveTo:l(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:l(function(){this._context.closePath()},"closePath"),lineTo:l(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:l(function(t,e,r,i,a,n){this._context.bezierCurveTo(e,t,i,r,n,a)},"bezierCurveTo")};function lu(t){return new rn(t)}l(lu,"monotoneX");function hu(t){return new ou(t)}l(hu,"monotoneY");function cu(t){this._context=t}l(cu,"Natural");cu.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:l(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=eh(t),a=eh(e),n=0,s=1;s<r;++n,++s)this._context.bezierCurveTo(i[0][n],a[0][n],i[1][n],a[1][n],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:l(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};function eh(t){var e,r=t.length-1,i,a=new Array(r),n=new Array(r),s=new Array(r);for(a[0]=0,n[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)a[e]=1,n[e]=4,s[e]=4*t[e]+2*t[e+1];for(a[r-1]=2,n[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=a[e]/n[e-1],n[e]-=i,s[e]-=i*s[e-1];for(a[r-1]=s[r-1]/n[r-1],e=r-2;e>=0;--e)a[e]=(s[e]-a[e+1])/n[e];for(n[r-1]=(t[r]+a[r-1])/2,e=0;e<r-1;++e)n[e]=2*t[e+1]-a[e+1];return[a,n]}l(eh,"controlPoints");function uu(t){return new cu(t)}l(uu,"default");function _n(t,e){this._context=t,this._t=e}l(_n,"Step");_n.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:l(function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e},"point")};function du(t){return new _n(t,.5)}l(du,"default");function pu(t){return new _n(t,0)}l(pu,"stepBefore");function fu(t){return new _n(t,1)}l(fu,"stepAfter");var w_={value:l(()=>{},"value")};function gu(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Fa(r)}l(gu,"dispatch");function Fa(t){this._=t}l(Fa,"Dispatch");function E0(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",a=r.indexOf(".");if(a>=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}l(E0,"parseTypenames");Fa.prototype=gu.prototype={constructor:Fa,on:l(function(t,e){var r=this._,i=E0(t+"",r),a,n=-1,s=i.length;if(arguments.length<2){for(;++n<s;)if((a=(t=i[n]).type)&&(a=D0(r[a],t.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++n<s;)if(a=(t=i[n]).type)r[a]=rh(r[a],t.name,e);else if(e==null)for(a in r)r[a]=rh(r[a],t.name,null);return this},"on"),copy:l(function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Fa(t)},"copy"),call:l(function(t,e){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,n;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)},"call"),apply:l(function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],a=0,n=i.length;a<n;++a)i[a].value.apply(e,r)},"apply")};function D0(t,e){for(var r=0,i=t.length,a;r<i;++r)if((a=t[r]).name===e)return a.value}l(D0,"get");function rh(t,e,r){for(var i=0,a=t.length;i<a;++i)if(t[i].name===e){t[i]=w_,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}l(rh,"set");var v_=gu,Xi=0,wa=0,ua=0,O0=1e3,Po,va,Ro=0,Pr=0,_s=0,an=typeof performance=="object"&&performance.now?performance:Date,I0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ss(){return Pr||(I0(P0),Pr=an.now()+_s)}l(Ss,"now");function P0(){Pr=0}l(P0,"clearNow");function nn(){this._call=this._time=this._next=null}l(nn,"Timer");nn.prototype=yu.prototype={constructor:nn,restart:l(function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?Ss():+r)+(e==null?0:+e),!this._next&&va!==this&&(va?va._next=this:Po=this,va=this),this._call=t,this._time=r,No()},"restart"),stop:l(function(){this._call&&(this._call=null,this._time=1/0,No())},"stop")};function yu(t,e,r){var i=new nn;return i.restart(t,e,r),i}l(yu,"timer");function R0(){Ss(),++Xi;for(var t=Po,e;t;)(e=Pr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Xi}l(R0,"timerFlush");function ih(){Pr=(Ro=an.now())+_s,Xi=wa=0;try{R0()}finally{Xi=0,z0(),Pr=0}}l(ih,"wake");function N0(){var t=an.now(),e=t-Ro;e>O0&&(_s-=e,Ro=t)}l(N0,"poke");function z0(){for(var t,e=Po,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Po=r);va=t,No(i)}l(z0,"nap");function No(t){if(!Xi){wa&&(wa=clearTimeout(wa));var e=t-Pr;e>24?(t<1/0&&(wa=setTimeout(ih,t-an.now()-_s)),ua&&(ua=clearInterval(ua))):(ua||(Ro=an.now(),ua=setInterval(N0,O0)),Xi=1,I0(ih))}}l(No,"sleep");function ah(t,e,r){var i=new nn;return e=e==null?0:+e,i.restart(a=>{i.stop(),t(a+e)},e,r),i}l(ah,"default");var __=v_("start","end","cancel","interrupt"),S_=[],q0=0,Gd=1,nh=2,co=3,Xd=4,oh=5,uo=6;function Sn(t,e,r,i,a,n){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;W0(t,r,{name:e,index:i,group:a,on:__,tween:S_,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:q0})}l(Sn,"default");function Ts(t,e){var r=ye(t,e);if(r.state>q0)throw new Error("too late; already scheduled");return r}l(Ts,"init");function Be(t,e){var r=ye(t,e);if(r.state>co)throw new Error("too late; already running");return r}l(Be,"set");function ye(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}l(ye,"get");function W0(t,e,r){var i=t.__transition,a;i[e]=r,r.timer=yu(n,0,r.time);function n(h){r.state=Gd,r.timer.restart(s,r.delay,r.time),r.delay<=h&&s(h-r.delay)}l(n,"schedule");function s(h){var u,d,p,f;if(r.state!==Gd)return c();for(u in i)if(f=i[u],f.name===r.name){if(f.state===co)return ah(s);f.state===Xd?(f.state=uo,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=uo,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(ah(function(){r.state===co&&(r.state=Xd,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=nh,r.on.call("start",t,t.__data__,r.index,r.group),r.state===nh){for(r.state=co,a=new Array(p=r.tween.length),u=0,d=-1;u<p;++u)(f=r.tween[u].value.call(t,t.__data__,r.index,r.group))&&(a[++d]=f);a.length=d+1}}l(s,"start");function o(h){for(var u=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(c),r.state=oh,1),d=-1,p=a.length;++d<p;)a[d].call(t,u);r.state===oh&&(r.on.call("end",t,t.__data__,r.index,r.group),c())}l(o,"tick");function c(){r.state=uo,r.timer.stop(),delete i[e];for(var h in i)return;delete t.__transition}l(c,"stop")}l(W0,"create");function j0(t,e){var r=t.__transition,i,a,n=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((i=r[s]).name!==e){n=!1;continue}a=i.state>nh&&i.state<oh,i.state=uo,i.timer.stop(),i.on.call(a?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[s]}n&&delete t.__transition}}l(j0,"default");function H0(t){return this.each(function(){j0(this,t)})}l(H0,"default");function U0(t,e){var r,i;return function(){var a=Be(this,t),n=a.tween;if(n!==r){i=r=n;for(var s=0,o=i.length;s<o;++s)if(i[s].name===e){i=i.slice(),i.splice(s,1);break}}a.tween=i}}l(U0,"tweenRemove");function Y0(t,e,r){var i,a;if(typeof r!="function")throw new Error;return function(){var n=Be(this,t),s=n.tween;if(s!==i){a=(i=s).slice();for(var o={name:e,value:r},c=0,h=a.length;c<h;++c)if(a[c].name===e){a[c]=o;break}c===h&&a.push(o)}n.tween=a}}l(Y0,"tweenFunction");function V0(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=ye(this.node(),r).tween,a=0,n=i.length,s;a<n;++a)if((s=i[a]).name===t)return s.value;return null}return this.each((e==null?U0:Y0)(r,t,e))}l(V0,"default");function Ms(t,e,r){var i=t._id;return t.each(function(){var a=Be(this,i);(a.value||(a.value={}))[e]=r.apply(this,arguments)}),function(a){return ye(a,i).value[e]}}l(Ms,"tweenValue");function mu(t,e){var r;return(typeof e=="number"?ue:e instanceof pr?Ao:(r=pr(e))?(e=r,Ao):Mc)(t,e)}l(mu,"default");function G0(t){return function(){this.removeAttribute(t)}}l(G0,"attrRemove");function X0(t){return function(){this.removeAttributeNS(t.space,t.local)}}l(X0,"attrRemoveNS");function Z0(t,e,r){var i,a=r+"",n;return function(){var s=this.getAttribute(t);return s===a?null:s===i?n:n=e(i=s,r)}}l(Z0,"attrConstant");function Q0(t,e,r){var i,a=r+"",n;return function(){var s=this.getAttributeNS(t.space,t.local);return s===a?null:s===i?n:n=e(i=s,r)}}l(Q0,"attrConstantNS");function J0(t,e,r){var i,a,n;return function(){var s,o=r(this),c;return o==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=o+"",s===c?null:s===i&&c===a?n:(a=c,n=e(i=s,o)))}}l(J0,"attrFunction");function K0(t,e,r){var i,a,n;return function(){var s,o=r(this),c;return o==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=o+"",s===c?null:s===i&&c===a?n:(a=c,n=e(i=s,o)))}}l(K0,"attrFunctionNS");function t1(t,e){var r=bn(t),i=r==="transform"?Zv:mu;return this.attrTween(t,typeof e=="function"?(r.local?K0:J0)(r,i,Ms(this,"attr."+t,e)):e==null?(r.local?X0:G0)(r):(r.local?Q0:Z0)(r,i,e))}l(t1,"default");function e1(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}l(e1,"attrInterpolate");function r1(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}l(r1,"attrInterpolateNS");function i1(t,e){var r,i;function a(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&r1(t,n)),r}return l(a,"tween"),a._value=e,a}l(i1,"attrTweenNS");function a1(t,e){var r,i;function a(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&e1(t,n)),r}return l(a,"tween"),a._value=e,a}l(a1,"attrTween");function n1(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var i=bn(t);return this.tween(r,(i.local?i1:a1)(i,e))}l(n1,"default");function o1(t,e){return function(){Ts(this,t).delay=+e.apply(this,arguments)}}l(o1,"delayFunction");function s1(t,e){return e=+e,function(){Ts(this,t).delay=e}}l(s1,"delayConstant");function l1(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?o1:s1)(e,t)):ye(this.node(),e).delay}l(l1,"default");function h1(t,e){return function(){Be(this,t).duration=+e.apply(this,arguments)}}l(h1,"durationFunction");function c1(t,e){return e=+e,function(){Be(this,t).duration=e}}l(c1,"durationConstant");function u1(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?h1:c1)(e,t)):ye(this.node(),e).duration}l(u1,"default");function d1(t,e){if(typeof e!="function")throw new Error;return function(){Be(this,t).ease=e}}l(d1,"easeConstant");function p1(t){var e=this._id;return arguments.length?this.each(d1(e,t)):ye(this.node(),e).ease}l(p1,"default");function f1(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Be(this,t).ease=r}}l(f1,"easeVarying");function g1(t){if(typeof t!="function")throw new Error;return this.each(f1(this._id,t))}l(g1,"default");function y1(t){typeof t!="function"&&(t=uc(t));for(var e=this._groups,r=e.length,i=new Array(r),a=0;a<r;++a)for(var n=e[a],s=n.length,o=i[a]=[],c,h=0;h<s;++h)(c=n[h])&&t.call(c,c.__data__,h,n)&&o.push(c);return new Ie(i,this._parents,this._name,this._id)}l(y1,"default");function m1(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,a=r.length,n=Math.min(i,a),s=new Array(i),o=0;o<n;++o)for(var c=e[o],h=r[o],u=c.length,d=s[o]=new Array(u),p,f=0;f<u;++f)(p=c[f]||h[f])&&(d[f]=p);for(;o<i;++o)s[o]=e[o];return new Ie(s,this._parents,this._name,this._id)}l(m1,"default");function x1(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}l(x1,"start");function b1(t,e,r){var i,a,n=x1(e)?Ts:Be;return function(){var s=n(this,t),o=s.on;o!==i&&(a=(i=o).copy()).on(e,r),s.on=a}}l(b1,"onFunction");function k1(t,e){var r=this._id;return arguments.length<2?ye(this.node(),r).on.on(t):this.each(b1(r,t,e))}l(k1,"default");function C1(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}l(C1,"removeFunction");function $1(){return this.on("end.remove",C1(this._id))}l($1,"default");function w1(t){var e=this._name,r=this._id;typeof t!="function"&&(t=gs(t));for(var i=this._groups,a=i.length,n=new Array(a),s=0;s<a;++s)for(var o=i[s],c=o.length,h=n[s]=new Array(c),u,d,p=0;p<c;++p)(u=o[p])&&(d=t.call(u,u.__data__,p,o))&&("__data__"in u&&(d.__data__=u.__data__),h[p]=d,Sn(h[p],e,r,p,h,ye(u,r)));return new Ie(n,this._parents,e,r)}l(w1,"default");function v1(t){var e=this._name,r=this._id;typeof t!="function"&&(t=cc(t));for(var i=this._groups,a=i.length,n=[],s=[],o=0;o<a;++o)for(var c=i[o],h=c.length,u,d=0;d<h;++d)if(u=c[d]){for(var p=t.call(u,u.__data__,d,c),f,g=ye(u,r),y=0,m=p.length;y<m;++y)(f=p[y])&&Sn(f,e,r,y,p,g);n.push(p),s.push(u)}return new Ie(n,s,e,r)}l(v1,"default");var T_=kn.prototype.constructor;function _1(){return new T_(this._groups,this._parents)}l(_1,"default");function S1(t,e){var r,i,a;return function(){var n=Or(this,t),s=(this.style.removeProperty(t),Or(this,t));return n===s?null:n===r&&s===i?a:a=e(r=n,i=s)}}l(S1,"styleNull");function xu(t){return function(){this.style.removeProperty(t)}}l(xu,"styleRemove");function T1(t,e,r){var i,a=r+"",n;return function(){var s=Or(this,t);return s===a?null:s===i?n:n=e(i=s,r)}}l(T1,"styleConstant");function M1(t,e,r){var i,a,n;return function(){var s=Or(this,t),o=r(this),c=o+"";return o==null&&(c=o=(this.style.removeProperty(t),Or(this,t))),s===c?null:s===i&&c===a?n:(a=c,n=e(i=s,o))}}l(M1,"styleFunction");function B1(t,e){var r,i,a,n="style."+e,s="end."+n,o;return function(){var c=Be(this,t),h=c.on,u=c.value[n]==null?o||(o=xu(e)):void 0;(h!==r||a!==u)&&(i=(r=h).copy()).on(s,a=u),c.on=i}}l(B1,"styleMaybeRemove");function A1(t,e,r){var i=(t+="")=="transform"?Xv:mu;return e==null?this.styleTween(t,S1(t,i)).on("end.style."+t,xu(t)):typeof e=="function"?this.styleTween(t,M1(t,i,Ms(this,"style."+t,e))).each(B1(this._id,t)):this.styleTween(t,T1(t,i,e),r).on("end.style."+t,null)}l(A1,"default");function L1(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}l(L1,"styleInterpolate");function F1(t,e,r){var i,a;function n(){var s=e.apply(this,arguments);return s!==a&&(i=(a=s)&&L1(t,s,r)),i}return l(n,"tween"),n._value=e,n}l(F1,"styleTween");function E1(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,F1(t,e,r??""))}l(E1,"default");function D1(t){return function(){this.textContent=t}}l(D1,"textConstant");function O1(t){return function(){var e=t(this);this.textContent=e??""}}l(O1,"textFunction");function I1(t){return this.tween("text",typeof t=="function"?O1(Ms(this,"text",t)):D1(t==null?"":t+""))}l(I1,"default");function P1(t){return function(e){this.textContent=t.call(this,e)}}l(P1,"textInterpolate");function R1(t){var e,r;function i(){var a=t.apply(this,arguments);return a!==r&&(e=(r=a)&&P1(a)),e}return l(i,"tween"),i._value=t,i}l(R1,"textTween");function N1(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,R1(t))}l(N1,"default");function z1(){for(var t=this._name,e=this._id,r=bu(),i=this._groups,a=i.length,n=0;n<a;++n)for(var s=i[n],o=s.length,c,h=0;h<o;++h)if(c=s[h]){var u=ye(c,e);Sn(c,t,r,h,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Ie(i,this._parents,t,r)}l(z1,"default");function q1(){var t,e,r=this,i=r._id,a=r.size();return new Promise(function(n,s){var o={value:s},c={value:l(function(){--a===0&&n()},"value")};r.each(function(){var h=Be(this,i),u=h.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(c)),h.on=e}),a===0&&n()})}l(q1,"default");var M_=0;function Ie(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}l(Ie,"Transition");function W1(t){return kn().transition(t)}l(W1,"transition");function bu(){return++M_}l(bu,"newId");var je=kn.prototype;Ie.prototype=W1.prototype={constructor:Ie,select:w1,selectAll:v1,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:y1,merge:m1,selection:_1,transition:z1,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:k1,attr:t1,attrTween:n1,style:A1,styleTween:E1,text:I1,textTween:N1,remove:$1,tween:V0,delay:l1,duration:u1,ease:p1,easeVarying:g1,end:q1,[Symbol.iterator]:je[Symbol.iterator]};function j1(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}l(j1,"cubicInOut");var B_={time:null,delay:0,duration:250,ease:j1};function H1(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}l(H1,"inherit");function U1(t){var e,r;t instanceof Ie?(e=t._id,t=t._name):(e=bu(),(r=B_).time=Ss(),t=t==null?null:t+"");for(var i=this._groups,a=i.length,n=0;n<a;++n)for(var s=i[n],o=s.length,c,h=0;h<o;++h)(c=s[h])&&Sn(c,t,e,h,s,r||H1(c,e));return new Ie(i,this._parents,t,e)}l(U1,"default");kn.prototype.interrupt=H0;kn.prototype.transition=U1;function sh(t){return[+t[0],+t[1]]}l(sh,"number1");function Y1(t){return[sh(t[0]),sh(t[1])]}l(Y1,"number2");l(function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),l(function(t){return t&&[t[0][0],t[1][0]]},"output");l(function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),l(function(t){return t&&[t[0][1],t[1][1]]},"output");l(function(t){return t==null?null:Y1(t)},"input"),l(function(t){return t},"output");function A_(t){return{type:t}}l(A_,"type");function Ar(t,e,r){this.k=t,this.x=e,this.y=r}l(Ar,"Transform");Ar.prototype={constructor:Ar,scale:l(function(t){return t===1?this:new Ar(this.k*t,this.x,this.y)},"scale"),translate:l(function(t,e){return t===0&e===0?this:new Ar(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:l(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:l(function(t){return t*this.k+this.x},"applyX"),applyY:l(function(t){return t*this.k+this.y},"applyY"),invert:l(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:l(function(t){return(t-this.x)/this.k},"invertX"),invertY:l(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:l(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:l(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:l(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")};var L_=new Ar(1,0,0);V1.prototype=Ar.prototype;function V1(t){for(;!t.__zoom;)if(!(t=t.parentNode))return L_;return t.__zoom}l(V1,"transform");var G1=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ea=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,F_=/\s*%%.*\n/gm,wi,X1=(wi=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},l(wi,"UnknownDiagramError"),wi),Rr={},ku=l(function(t,e){t=t.replace(G1,"").replace(Ea,"").replace(F_,`
`);for(let[r,{detector:i}]of Object.entries(Rr))if(i(t,e))return r;throw new X1(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),lh=l((...t)=>{for(let{id:e,detector:r,loader:i}of t)Z1(e,r,i)},"registerLazyLoadedDiagrams"),Z1=l((t,e,r)=>{Rr[t]&&P.warn(`Detector with key ${t} already exists. Overwriting.`),Rr[t]={detector:e,loader:r},P.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),E_=l(t=>Rr[t].loader,"getDiagramLoader"),hh=l((t,e,{depth:r=2,clobber:i=!1}={})=>{let a={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(n=>hh(t,n,a)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(n=>{t.includes(n)||t.push(n)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(n=>{typeof e[n]=="object"&&e[n]!==null&&(t[n]===void 0||typeof t[n]=="object")?(t[n]===void 0&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=hh(t[n],e[n],{depth:r-1,clobber:i})):(i||typeof t[n]!="object"&&typeof e[n]!="object")&&(t[n]=e[n])}),t)},"assignWithDepth"),Dt=hh,po={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:l(t=>t>=255?255:t<0?0:t,"r"),g:l(t=>t>=255?255:t<0?0:t,"g"),b:l(t=>t>=255?255:t<0?0:t,"b"),h:l(t=>t%360,"h"),s:l(t=>t>=100?100:t<0?0:t,"s"),l:l(t=>t>=100?100:t<0?0:t,"l"),a:l(t=>t>=1?1:t<0?0:t,"a")},toLinear:l(t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},"toLinear"),hue2rgb:l((t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),"hue2rgb"),hsl2rgb:l(({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let a=r<.5?r*(1+e):r+e-r*e,n=2*r-a;switch(i){case"r":return po.hue2rgb(n,a,t+.3333333333333333)*255;case"g":return po.hue2rgb(n,a,t)*255;case"b":return po.hue2rgb(n,a,t-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:l(({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;let a=Math.max(t,e,r),n=Math.min(t,e,r),s=(a+n)/2;if(i==="l")return s*100;if(a===n)return 0;let o=a-n,c=s>.5?o/(2-a-n):o/(a+n);if(i==="s")return c*100;switch(a){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}},"rgb2hsl")},D_=po,O_={clamp:l((t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),"clamp"),round:l(t=>Math.round(t*1e10)/1e10,"round")},I_=O_,P_={dec2hex:l(t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`},"dec2hex")},R_=P_,N_={channel:D_,lang:I_,unit:R_},lt=N_,ar={};for(let t=0;t<=255;t++)ar[t]=lt.unit.dec2hex(t);var Ut={ALL:0,RGB:1,HSL:2},vi,z_=(vi=class{constructor(){this.type=Ut.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Ut.ALL}is(e){return this.type===e}},l(vi,"Type"),vi),q_=z_,_i,W_=(_i=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new q_}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Ut.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:i,l:a}=e;r===void 0&&(e.h=lt.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=lt.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=lt.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:i,b:a}=e;r===void 0&&(e.r=lt.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=lt.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=lt.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Ut.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ut.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ut.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ut.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ut.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ut.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},l(_i,"Channels"),_i),j_=W_,H_=new j_({r:0,g:0,b:0,a:0},"transparent"),Bs=H_,Q1={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:l(t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(Q1.re);if(!e)return;let r=e[1],i=parseInt(r,16),a=r.length,n=a%4===0,s=a>4,o=s?1:17,c=s?8:4,h=n?0:-1,u=s?255:15;return Bs.set({r:(i>>c*(h+3)&u)*o,g:(i>>c*(h+2)&u)*o,b:(i>>c*(h+1)&u)*o,a:n?(i&u)*o/255:1},t)},"parse"),stringify:l(t=>{let{r:e,g:r,b:i,a}=t;return a<1?`#${ar[Math.round(e)]}${ar[Math.round(r)]}${ar[Math.round(i)]}${ar[Math.round(a*255)]}`:`#${ar[Math.round(e)]}${ar[Math.round(r)]}${ar[Math.round(i)]}`},"stringify")},Da=Q1,fo={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:l(t=>{let e=t.match(fo.hueRe);if(e){let[,r,i]=e;switch(i){case"grad":return lt.channel.clamp.h(parseFloat(r)*.9);case"rad":return lt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return lt.channel.clamp.h(parseFloat(r)*360)}}return lt.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:l(t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(fo.re);if(!r)return;let[,i,a,n,s,o]=r;return Bs.set({h:fo._hue2deg(i),s:lt.channel.clamp.s(parseFloat(a)),l:lt.channel.clamp.l(parseFloat(n)),a:s?lt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:l(t=>{let{h:e,s:r,l:i,a}=t;return a<1?`hsla(${lt.lang.round(e)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%, ${a})`:`hsl(${lt.lang.round(e)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%)`},"stringify")},Yn=fo,go={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:l(t=>{t=t.toLowerCase();let e=go.colors[t];if(e)return Da.parse(e)},"parse"),stringify:l(t=>{let e=Da.stringify(t);for(let r in go.colors)if(go.colors[r]===e)return r},"stringify")},Zd=go,J1={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:l(t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(J1.re);if(!r)return;let[,i,a,n,s,o,c,h,u]=r;return Bs.set({r:lt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:lt.channel.clamp.g(s?parseFloat(n)*2.55:parseFloat(n)),b:lt.channel.clamp.b(c?parseFloat(o)*2.55:parseFloat(o)),a:h?lt.channel.clamp.a(u?parseFloat(h)/100:parseFloat(h)):1},t)},"parse"),stringify:l(t=>{let{r:e,g:r,b:i,a}=t;return a<1?`rgba(${lt.lang.round(e)}, ${lt.lang.round(r)}, ${lt.lang.round(i)}, ${lt.lang.round(a)})`:`rgb(${lt.lang.round(e)}, ${lt.lang.round(r)}, ${lt.lang.round(i)})`},"stringify")},Vn=J1,U_={format:{keyword:Zd,hex:Da,rgb:Vn,rgba:Vn,hsl:Yn,hsla:Yn},parse:l(t=>{if(typeof t!="string")return t;let e=Da.parse(t)||Vn.parse(t)||Yn.parse(t)||Zd.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:l(t=>!t.changed&&t.color?t.color:t.type.is(Ut.HSL)||t.data.r===void 0?Yn.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Vn.stringify(t):Da.stringify(t),"stringify")},Te=U_,Y_=l((t,e)=>{let r=Te.parse(t);for(let i in e)r[i]=lt.channel.clamp[i](e[i]);return Te.stringify(r)},"change"),K1=Y_,V_=l((t,e,r=0,i=1)=>{if(typeof t!="number")return K1(t,{a:e});let a=Bs.set({r:lt.channel.clamp.r(t),g:lt.channel.clamp.g(e),b:lt.channel.clamp.b(r),a:lt.channel.clamp.a(i)});return Te.stringify(a)},"rgba"),Oa=V_,G_=l((t,e)=>lt.lang.round(Te.parse(t)[e]),"channel"),wE=G_,X_=l(t=>{let{r:e,g:r,b:i}=Te.parse(t),a=.2126*lt.channel.toLinear(e)+.7152*lt.channel.toLinear(r)+.0722*lt.channel.toLinear(i);return lt.lang.round(a)},"luminance"),Z_=X_,Q_=l(t=>Z_(t)>=.5,"isLight"),J_=Q_,K_=l(t=>!J_(t),"isDark"),Tn=K_,tS=l((t,e,r)=>{let i=Te.parse(t),a=i[e],n=lt.channel.clamp[e](a+r);return a!==n&&(i[e]=n),Te.stringify(i)},"adjustChannel"),Cu=tS,eS=l((t,e)=>Cu(t,"l",e),"lighten"),X=eS,rS=l((t,e)=>Cu(t,"l",-e),"darken"),at=rS,iS=l((t,e)=>Cu(t,"a",-e),"transparentize"),vE=iS,aS=l((t,e)=>{let r=Te.parse(t),i={};for(let a in e)e[a]&&(i[a]=r[a]+e[a]);return K1(t,i)},"adjust"),v=aS,nS=l((t,e,r=50)=>{let{r:i,g:a,b:n,a:s}=Te.parse(t),{r:o,g:c,b:h,a:u}=Te.parse(e),d=r/100,p=d*2-1,f=s-u,g=((p*f===-1?p:(p+f)/(1+p*f))+1)/2,y=1-g,m=i*g+o*y,x=a*g+c*y,b=n*g+h*y,k=s*d+u*(1-d);return Oa(m,x,b,k)},"mix"),oS=nS,sS=l((t,e=100)=>{let r=Te.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,oS(r,t,e)},"invert"),j=sS,As="#ffffff",Ls="#f2f2f2",te=l((t,e)=>e?v(t,{s:-40,l:10}):v(t,{s:-40,l:-10}),"mkBorder"),Si,lS=(Si=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||j(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||j(this.tertiaryColor),this.lineColor=this.lineColor||j(this.background),this.arrowheadColor=this.arrowheadColor||j(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?at(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||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||j(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||X(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||at(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||at(this.mainBkg,10)):(this.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||X(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||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=at(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=at(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||j(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||X(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||at(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||v(this.mainBkg,{h:180,s:-15,l:e*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||v(this.mainBkg,{h:180,s:-15,l:e*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||v(this.primaryColor,{h:64}),this.fillType3=this.fillType3||v(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||v(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||v(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||v(this.primaryColor,{h:128}),this.fillType7=this.fillType7||v(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||v(this.primaryColor,{l:-10}),this.pie5=this.pie5||v(this.secondaryColor,{l:-10}),this.pie6=this.pie6||v(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||v(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||v(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??v(this.primaryColor,{l:-30}),this.venn2=this.venn2??v(this.secondaryColor,{l:-30}),this.venn3=this.venn3??v(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??v(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??v(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??v(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??v(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??v(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Tn(this.quadrant1Fill)?X(this.quadrant1Fill):at(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?at(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||As,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ls}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},l(Si,"Theme"),Si),hS=l(t=>{let e=new lS;return e.calculate(t),e},"getThemeVariables"),Ti,cS=(Ti=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=X(this.primaryColor,16),this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=j(this.background),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=X(j("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Oa(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=at("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=at(this.sectionBkgColor,10),this.taskBorderColor=Oa(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Oa(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||X(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||at(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=X(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=X(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=X(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=j(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=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(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||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||j(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||X(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??X(this["cScale"+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Tn(this.quadrant1Fill)?X(this.quadrant1Fill):at(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?at(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=X(this.secondaryColor,20),this.git1=X(this.pie2||this.secondaryColor,20),this.git2=X(this.pie3||this.tertiaryColor,20),this.git3=X(this.pie4||v(this.primaryColor,{h:-30}),20),this.git4=X(this.pie5||v(this.primaryColor,{h:-60}),20),this.git5=X(this.pie6||v(this.primaryColor,{h:-90}),10),this.git6=X(this.pie7||v(this.primaryColor,{h:60}),10),this.git7=X(this.pie8||v(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||j(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||j(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||X(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||X(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},l(Ti,"Theme"),Ti),uS=l(t=>{let e=new cS;return e.calculate(t),e},"getThemeVariables"),Mi,dS=(Mi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=v(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="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.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=Oa(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.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||at(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||at(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=at(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||at(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||v(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||j(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||j(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=X(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||X(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||X(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||v(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||v(this.primaryColor,{l:-10}),this.pie5=this.pie5||v(this.secondaryColor,{l:-30}),this.pie6=this.pie6||v(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||v(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||v(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??v(this.primaryColor,{l:-30}),this.venn2=this.venn2??v(this.secondaryColor,{l:-30}),this.venn3=this.venn3??v(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??v(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??v(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??v(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??v(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??v(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Tn(this.quadrant1Fill)?X(this.quadrant1Fill):at(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||at(j(this.git0),25),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||j(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||j(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||As,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ls}calculate(e){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},l(Mi,"Theme"),Mi),pS=l(t=>{let e=new dS;return e.calculate(t),e},"getThemeVariables"),Bi,fS=(Bi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=X("#cde498",10),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.primaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=at(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||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||at(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||at(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=at(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||at(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||v(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||v(this.primaryColor,{l:-30}),this.pie5=this.pie5||v(this.secondaryColor,{l:-30}),this.pie6=this.pie6||v(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||v(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||v(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??v(this.primaryColor,{l:-30}),this.venn2=this.venn2??v(this.secondaryColor,{l:-30}),this.venn3=this.venn3??v(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??v(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??v(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??v(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??v(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??v(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Tn(this.quadrant1Fill)?X(this.quadrant1Fill):at(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||j(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||j(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||As,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ls}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},l(Bi,"Theme"),Bi),gS=l(t=>{let e=new fS;return e.calculate(t),e},"getThemeVariables"),Ai,yS=(Ai=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=X(this.contrast,55),this.background="#ffffff",this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=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.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=X(this.contrast,55),this.border2=this.contrast,this.actorBorder=X(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||j(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||X(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||at(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=X(this.contrast,30),this.sectionBkgColor2=X(this.contrast,30),this.taskBorderColor=at(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=X(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=at(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??this["cScale"+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Tn(this.quadrant1Fill)?X(this.quadrant1Fill):at(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=at(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||v(this.primaryColor,{h:-30}),this.git4=this.pie5||v(this.primaryColor,{h:-60}),this.git5=this.pie6||v(this.primaryColor,{h:-90}),this.git6=this.pie7||v(this.primaryColor,{h:60}),this.git7=this.pie8||v(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||As,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ls}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},l(Ai,"Theme"),Ai),mS=l(t=>{let e=new yS;return e.calculate(t),e},"getThemeVariables"),Xe={base:{getThemeVariables:hS},dark:{getThemeVariables:uS},default:{getThemeVariables:pS},forest:{getThemeVariables:gS},neutral:{getThemeVariables:mS}},ce={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},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,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:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},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},tx={...ce,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Xe.default.getThemeVariables(),sequence:{...ce.sequence,messageFont:l(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:l(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:l(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...ce.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ce.c4,useWidth:void 0,personFont:l(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ce.flowchart,inheritDir:!1},external_personFont:l(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:l(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:l(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:l(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:l(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:l(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:l(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:l(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:l(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:l(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:l(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:l(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:l(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:l(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:l(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:l(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:l(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:l(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:l(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:l(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:l(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ce.pie,useWidth:984},xyChart:{...ce.xyChart,useWidth:void 0},requirement:{...ce.requirement,useWidth:void 0},packet:{...ce.packet},radar:{...ce.radar},ishikawa:{...ce.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...ce.venn}},ex=l((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...ex(t[i],"")]:[...r,e+i],[]),"keyify"),xS=new Set(ex(tx,"")),rx=tx,zo=l(t=>{if(P.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>zo(e));return}for(let e of Object.keys(t)){if(P.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!xS.has(e)||t[e]==null){P.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){P.debug("sanitizing object",e),zo(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let i of r)e.includes(i)&&(P.debug("sanitizing css option",e),t[e]=bS(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]="")}P.debug("After sanitization",t)}},"sanitizeDirective"),bS=l(t=>{let e=0,r=0;for(let i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?e++:i==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),Zi=Object.freeze(rx),kr=l(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),ne=Dt({},Zi),qo,Nr=[],Ia=Dt({},Zi),Fs=l((t,e)=>{let r=Dt({},t),i={};for(let a of e)nx(a),i=Dt(i,a);if(r=Dt(r,i),i.theme&&i.theme in Xe){let a=Dt({},qo),n=Dt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in Xe&&(r.themeVariables=Xe[r.theme].getThemeVariables(n))}return Ia=r,sx(Ia),Ia},"updateCurrentConfig"),kS=l(t=>(ne=Dt({},Zi),ne=Dt(ne,t),t.theme&&Xe[t.theme]&&(ne.themeVariables=Xe[t.theme].getThemeVariables(t.themeVariables)),Fs(ne,Nr),ne),"setSiteConfig"),CS=l(t=>{qo=Dt({},t)},"saveConfigFromInitialize"),$S=l(t=>(ne=Dt(ne,t),Fs(ne,Nr),ne),"updateSiteConfig"),ix=l(()=>Dt({},ne),"getSiteConfig"),ax=l(t=>(sx(t),Dt(Ia,t),Vt()),"setConfig"),Vt=l(()=>Dt({},Ia),"getConfig"),nx=l(t=>{t&&(["secure",...ne.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(P.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=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&nx(t[e])}))},"sanitize"),wS=l(t=>{zo(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Nr.push(t),Fs(ne,Nr)},"addDirective"),Wo=l((t=ne)=>{Nr=[],Fs(t,Nr)},"reset"),vS={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."},Qd={},ox=l(t=>{Qd[t]||(P.warn(vS[t]),Qd[t]=!0)},"issueWarning"),sx=l(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ox("LAZY_LOAD_DEPRECATED")},"checkConfig"),_E=l(()=>{let t={};qo&&(t=Dt(t,qo));for(let e of Nr)t=Dt(t,e);return t},"getUserDefinedConfig"),Zt=l(t=>(t.flowchart?.htmlLabels!=null&&ox("FLOWCHART_HTML_LABELS_DEPRECATED"),kr(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),{entries:lx,setPrototypeOf:Jd,isFrozen:_S,getPrototypeOf:SS,getOwnPropertyDescriptor:TS}=Object,{freeze:ie,seal:fe,create:ch}=Object,{apply:uh,construct:dh}=typeof Reflect<"u"&&Reflect;ie||(ie=l(function(t){return t},"freeze"));fe||(fe=l(function(t){return t},"seal"));uh||(uh=l(function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];return t.apply(e,i)},"apply"));dh||(dh=l(function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new t(...r)},"construct"));var Gn=Qt(Array.prototype.forEach),MS=Qt(Array.prototype.lastIndexOf),Kd=Qt(Array.prototype.pop),da=Qt(Array.prototype.push),BS=Qt(Array.prototype.splice),yo=Qt(String.prototype.toLowerCase),pl=Qt(String.prototype.toString),fl=Qt(String.prototype.match),pa=Qt(String.prototype.replace),AS=Qt(String.prototype.indexOf),LS=Qt(String.prototype.trim),ke=Qt(Object.prototype.hasOwnProperty),Kt=Qt(RegExp.prototype.test),fa=hx(TypeError);function Qt(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return uh(t,e,i)}}l(Qt,"unapply");function hx(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return dh(t,r)}}l(hx,"unconstruct");function dt(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yo;Jd&&Jd(t,null);let i=e.length;for(;i--;){let a=e[i];if(typeof a=="string"){let n=r(a);n!==a&&(_S(e)||(e[i]=n),a=n)}t[a]=!0}return t}l(dt,"addToSet");function cx(t){for(let e=0;e<t.length;e++)ke(t,e)||(t[e]=null);return t}l(cx,"cleanArray");function Ce(t){let e=ch(null);for(let[r,i]of lx(t))ke(t,r)&&(Array.isArray(i)?e[r]=cx(i):i&&typeof i=="object"&&i.constructor===Object?e[r]=Ce(i):e[r]=i);return e}l(Ce,"clone");function si(t,e){for(;t!==null;){let i=TS(t,e);if(i){if(i.get)return Qt(i.get);if(typeof i.value=="function")return Qt(i.value)}t=SS(t)}function r(){return null}return l(r,"fallbackValue"),r}l(si,"lookupGetter");var tp=ie(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),gl=ie(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),yl=ie(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),FS=ie(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ml=ie(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ES=ie(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ep=ie(["#text"]),rp=ie(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),xl=ie(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ip=ie(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Xn=ie(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),DS=fe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),OS=fe(/<%[\w\W]*|[\w\W]*%>/gm),IS=fe(/\$\{[\w\W]*/gm),PS=fe(/^data-[\-\w.\u00B7-\uFFFF]+$/),RS=fe(/^aria-[\-\w]+$/),ux=fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),NS=fe(/^(?:\w+script|data):/i),zS=fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),dx=fe(/^html$/i),qS=fe(/^[a-z][.\w]*(-[.\w]+)+$/i),ap=Object.freeze({__proto__:null,ARIA_ATTR:RS,ATTR_WHITESPACE:zS,CUSTOM_ELEMENT:qS,DATA_ATTR:PS,DOCTYPE_NAME:dx,ERB_EXPR:OS,IS_ALLOWED_URI:ux,IS_SCRIPT_OR_DATA:NS,MUSTACHE_EXPR:DS,TMPLIT_EXPR:IS}),ga={element:1,text:3,progressingInstruction:7,comment:8,document:9},WS=l(function(){return typeof window>"u"?null:window},"getGlobal"),jS=l(function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));let a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML(n){return n},createScriptURL(n){return n}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},"_createTrustedTypesPolicy"),np=l(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap");function $u(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:WS(),e=l(C=>$u(C),"DOMPurify");if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==ga.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t,i=r,a=i.currentScript,{DocumentFragment:n,HTMLTemplateElement:s,Node:o,Element:c,NodeFilter:h,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:f}=t,g=c.prototype,y=si(g,"cloneNode"),m=si(g,"remove"),x=si(g,"nextSibling"),b=si(g,"childNodes"),k=si(g,"parentNode");if(typeof s=="function"){let C=r.createElement("template");C.content&&C.content.ownerDocument&&(r=C.content.ownerDocument)}let _,w="",{implementation:$,createNodeIterator:T,createDocumentFragment:O,getElementsByTagName:R}=r,{importNode:I}=i,S=np();e.isSupported=typeof lx=="function"&&typeof k=="function"&&$&&$.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:D,ERB_EXPR:A,TMPLIT_EXPR:B,DATA_ATTR:L,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:E,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:z}=ap,{IS_ALLOWED_URI:V}=ap,G=null,Z=dt({},[...tp,...gl,...yl,...ml,...ep]),U=null,ct=dt({},[...rp,...xl,...ip,...Xn]),et=Object.seal(ch(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}})),wt=null,Ct=null,Tt=Object.seal(ch(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),q=!0,rt=!0,ht=!1,N=!0,$t=!1,yt=!0,Bt=!1,Pt=!1,me=!1,Ne=!1,Pn=!1,Rn=!1,kd=!0,Cd=!1,ov="user-content-",Ks=!0,ha=!1,Jr={},Ae=null,tl=dt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),$d=null,wd=dt({},["audio","video","img","source","image","track"]),el=null,vd=dt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Nn="http://www.w3.org/1998/Math/MathML",zn="http://www.w3.org/2000/svg",ze="http://www.w3.org/1999/xhtml",Kr=ze,rl=!1,il=null,sv=dt({},[Nn,zn,ze],pl),qn=dt({},["mi","mo","mn","ms","mtext"]),Wn=dt({},["annotation-xml"]),lv=dt({},["title","style","font","a","script"]),ca=null,hv=["application/xhtml+xml","text/html"],cv="text/html",Et=null,ti=null,uv=r.createElement("form"),_d=l(function(C){return C instanceof RegExp||C instanceof Function},"isRegexOrFunction"),al=l(function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ti&&ti===C)){if((!C||typeof C!="object")&&(C={}),C=Ce(C),ca=hv.indexOf(C.PARSER_MEDIA_TYPE)===-1?cv:C.PARSER_MEDIA_TYPE,Et=ca==="application/xhtml+xml"?pl:yo,G=ke(C,"ALLOWED_TAGS")?dt({},C.ALLOWED_TAGS,Et):Z,U=ke(C,"ALLOWED_ATTR")?dt({},C.ALLOWED_ATTR,Et):ct,il=ke(C,"ALLOWED_NAMESPACES")?dt({},C.ALLOWED_NAMESPACES,pl):sv,el=ke(C,"ADD_URI_SAFE_ATTR")?dt(Ce(vd),C.ADD_URI_SAFE_ATTR,Et):vd,$d=ke(C,"ADD_DATA_URI_TAGS")?dt(Ce(wd),C.ADD_DATA_URI_TAGS,Et):wd,Ae=ke(C,"FORBID_CONTENTS")?dt({},C.FORBID_CONTENTS,Et):tl,wt=ke(C,"FORBID_TAGS")?dt({},C.FORBID_TAGS,Et):Ce({}),Ct=ke(C,"FORBID_ATTR")?dt({},C.FORBID_ATTR,Et):Ce({}),Jr=ke(C,"USE_PROFILES")?C.USE_PROFILES:!1,q=C.ALLOW_ARIA_ATTR!==!1,rt=C.ALLOW_DATA_ATTR!==!1,ht=C.ALLOW_UNKNOWN_PROTOCOLS||!1,N=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$t=C.SAFE_FOR_TEMPLATES||!1,yt=C.SAFE_FOR_XML!==!1,Bt=C.WHOLE_DOCUMENT||!1,Ne=C.RETURN_DOM||!1,Pn=C.RETURN_DOM_FRAGMENT||!1,Rn=C.RETURN_TRUSTED_TYPE||!1,me=C.FORCE_BODY||!1,kd=C.SANITIZE_DOM!==!1,Cd=C.SANITIZE_NAMED_PROPS||!1,Ks=C.KEEP_CONTENT!==!1,ha=C.IN_PLACE||!1,V=C.ALLOWED_URI_REGEXP||ux,Kr=C.NAMESPACE||ze,qn=C.MATHML_TEXT_INTEGRATION_POINTS||qn,Wn=C.HTML_INTEGRATION_POINTS||Wn,et=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&_d(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(et.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&_d(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(et.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(et.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),$t&&(rt=!1),Pn&&(Ne=!0),Jr&&(G=dt({},ep),U=[],Jr.html===!0&&(dt(G,tp),dt(U,rp)),Jr.svg===!0&&(dt(G,gl),dt(U,xl),dt(U,Xn)),Jr.svgFilters===!0&&(dt(G,yl),dt(U,xl),dt(U,Xn)),Jr.mathMl===!0&&(dt(G,ml),dt(U,ip),dt(U,Xn))),C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?Tt.tagCheck=C.ADD_TAGS:(G===Z&&(G=Ce(G)),dt(G,C.ADD_TAGS,Et))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?Tt.attributeCheck=C.ADD_ATTR:(U===ct&&(U=Ce(U)),dt(U,C.ADD_ATTR,Et))),C.ADD_URI_SAFE_ATTR&&dt(el,C.ADD_URI_SAFE_ATTR,Et),C.FORBID_CONTENTS&&(Ae===tl&&(Ae=Ce(Ae)),dt(Ae,C.FORBID_CONTENTS,Et)),C.ADD_FORBID_CONTENTS&&(Ae===tl&&(Ae=Ce(Ae)),dt(Ae,C.ADD_FORBID_CONTENTS,Et)),Ks&&(G["#text"]=!0),Bt&&dt(G,["html","head","body"]),G.table&&(dt(G,["tbody"]),delete wt.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw fa('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fa('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=C.TRUSTED_TYPES_POLICY,w=_.createHTML("")}else _===void 0&&(_=jS(f,a)),_!==null&&typeof w=="string"&&(w=_.createHTML(""));ie&&ie(C),ti=C}},"_parseConfig"),Sd=dt({},[...gl,...yl,...FS]),Td=dt({},[...ml,...ES]),dv=l(function(C){let Y=k(C);(!Y||!Y.tagName)&&(Y={namespaceURI:Kr,tagName:"template"});let W=yo(C.tagName),kt=yo(Y.tagName);return il[C.namespaceURI]?C.namespaceURI===zn?Y.namespaceURI===ze?W==="svg":Y.namespaceURI===Nn?W==="svg"&&(kt==="annotation-xml"||qn[kt]):!!Sd[W]:C.namespaceURI===Nn?Y.namespaceURI===ze?W==="math":Y.namespaceURI===zn?W==="math"&&Wn[kt]:!!Td[W]:C.namespaceURI===ze?Y.namespaceURI===zn&&!Wn[kt]||Y.namespaceURI===Nn&&!qn[kt]?!1:!Td[W]&&(lv[W]||!Sd[W]):!!(ca==="application/xhtml+xml"&&il[C.namespaceURI]):!1},"_checkValidNamespace"),$r=l(function(C){da(e.removed,{element:C});try{k(C).removeChild(C)}catch{m(C)}},"_forceRemove"),wr=l(function(C,Y){try{da(e.removed,{attribute:Y.getAttributeNode(C),from:Y})}catch{da(e.removed,{attribute:null,from:Y})}if(Y.removeAttribute(C),C==="is")if(Ne||Pn)try{$r(Y)}catch{}else try{Y.setAttribute(C,"")}catch{}},"_removeAttribute"),Md=l(function(C){let Y=null,W=null;if(me)C="<remove></remove>"+C;else{let St=fl(C,/^[\r\n\t ]+/);W=St&&St[0]}ca==="application/xhtml+xml"&&Kr===ze&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");let kt=_?_.createHTML(C):C;if(Kr===ze)try{Y=new p().parseFromString(kt,ca)}catch{}if(!Y||!Y.documentElement){Y=$.createDocument(Kr,"template",null);try{Y.documentElement.innerHTML=rl?w:kt}catch{}}let Rt=Y.body||Y.documentElement;return C&&W&&Rt.insertBefore(r.createTextNode(W),Rt.childNodes[0]||null),Kr===ze?R.call(Y,Bt?"html":"body")[0]:Bt?Y.documentElement:Rt},"_initDocument"),Bd=l(function(C){return T.call(C.ownerDocument||C,C,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),nl=l(function(C){return C instanceof d&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof u)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},"_isClobbered"),Ad=l(function(C){return typeof o=="function"&&C instanceof o},"_isNode");function Le(C,Y,W){Gn(C,kt=>{kt.call(e,Y,W,ti)})}l(Le,"_executeHooks");let Ld=l(function(C){let Y=null;if(Le(S.beforeSanitizeElements,C,null),nl(C))return $r(C),!0;let W=Et(C.nodeName);if(Le(S.uponSanitizeElement,C,{tagName:W,allowedTags:G}),yt&&C.hasChildNodes()&&!Ad(C.firstElementChild)&&Kt(/<[/\w!]/g,C.innerHTML)&&Kt(/<[/\w!]/g,C.textContent)||C.nodeType===ga.progressingInstruction||yt&&C.nodeType===ga.comment&&Kt(/<[/\w]/g,C.data))return $r(C),!0;if(!(Tt.tagCheck instanceof Function&&Tt.tagCheck(W))&&(!G[W]||wt[W])){if(!wt[W]&&Ed(W)&&(et.tagNameCheck instanceof RegExp&&Kt(et.tagNameCheck,W)||et.tagNameCheck instanceof Function&&et.tagNameCheck(W)))return!1;if(Ks&&!Ae[W]){let kt=k(C)||C.parentNode,Rt=b(C)||C.childNodes;if(Rt&&kt){let St=Rt.length;for(let qe=St-1;qe>=0;--qe){let xe=y(Rt[qe],!0);xe.__removalCount=(C.__removalCount||0)+1,kt.insertBefore(xe,x(C))}}}return $r(C),!0}return C instanceof c&&!dv(C)||(W==="noscript"||W==="noembed"||W==="noframes")&&Kt(/<\/no(script|embed|frames)/i,C.innerHTML)?($r(C),!0):($t&&C.nodeType===ga.text&&(Y=C.textContent,Gn([D,A,B],kt=>{Y=pa(Y,kt," ")}),C.textContent!==Y&&(da(e.removed,{element:C.cloneNode()}),C.textContent=Y)),Le(S.afterSanitizeElements,C,null),!1)},"_sanitizeElements"),Fd=l(function(C,Y,W){if(kd&&(Y==="id"||Y==="name")&&(W in r||W in uv))return!1;if(!(rt&&!Ct[Y]&&Kt(L,Y))&&!(q&&Kt(M,Y))&&!(Tt.attributeCheck instanceof Function&&Tt.attributeCheck(Y,C))){if(!U[Y]||Ct[Y]){if(!(Ed(C)&&(et.tagNameCheck instanceof RegExp&&Kt(et.tagNameCheck,C)||et.tagNameCheck instanceof Function&&et.tagNameCheck(C))&&(et.attributeNameCheck instanceof RegExp&&Kt(et.attributeNameCheck,Y)||et.attributeNameCheck instanceof Function&&et.attributeNameCheck(Y,C))||Y==="is"&&et.allowCustomizedBuiltInElements&&(et.tagNameCheck instanceof RegExp&&Kt(et.tagNameCheck,W)||et.tagNameCheck instanceof Function&&et.tagNameCheck(W))))return!1}else if(!el[Y]&&!Kt(V,pa(W,F,""))&&!((Y==="src"||Y==="xlink:href"||Y==="href")&&C!=="script"&&AS(W,"data:")===0&&$d[C])&&!(ht&&!Kt(E,pa(W,F,"")))&&W)return!1}return!0},"_isValidAttribute"),Ed=l(function(C){return C!=="annotation-xml"&&fl(C,z)},"_isBasicCustomElement"),Dd=l(function(C){Le(S.beforeSanitizeAttributes,C,null);let{attributes:Y}=C;if(!Y||nl(C))return;let W={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U,forceKeepAttr:void 0},kt=Y.length;for(;kt--;){let Rt=Y[kt],{name:St,namespaceURI:qe,value:xe}=Rt,be=Et(St),ol=xe,Nt=St==="value"?ol:LS(ol);if(W.attrName=be,W.attrValue=Nt,W.keepAttr=!0,W.forceKeepAttr=void 0,Le(S.uponSanitizeAttribute,C,W),Nt=W.attrValue,Cd&&(be==="id"||be==="name")&&(wr(St,C),Nt=ov+Nt),yt&&Kt(/((--!?|])>)|<\/(style|title|textarea)/i,Nt)){wr(St,C);continue}if(be==="attributename"&&fl(Nt,"href")){wr(St,C);continue}if(W.forceKeepAttr)continue;if(!W.keepAttr){wr(St,C);continue}if(!N&&Kt(/\/>/i,Nt)){wr(St,C);continue}$t&&Gn([D,A,B],fv=>{Nt=pa(Nt,fv," ")});let Od=Et(C.nodeName);if(!Fd(Od,be,Nt)){wr(St,C);continue}if(_&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!qe)switch(f.getAttributeType(Od,be)){case"TrustedHTML":{Nt=_.createHTML(Nt);break}case"TrustedScriptURL":{Nt=_.createScriptURL(Nt);break}}if(Nt!==ol)try{qe?C.setAttributeNS(qe,St,Nt):C.setAttribute(St,Nt),nl(C)?$r(C):Kd(e.removed)}catch{wr(St,C)}}Le(S.afterSanitizeAttributes,C,null)},"_sanitizeAttributes"),pv=l(function C(Y){let W=null,kt=Bd(Y);for(Le(S.beforeSanitizeShadowDOM,Y,null);W=kt.nextNode();)Le(S.uponSanitizeShadowNode,W,null),Ld(W),Dd(W),W.content instanceof n&&C(W.content);Le(S.afterSanitizeShadowDOM,Y,null)},"_sanitizeShadowDOM");return e.sanitize=function(C){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,kt=null,Rt=null,St=null;if(rl=!C,rl&&(C="<!-->"),typeof C!="string"&&!Ad(C))if(typeof C.toString=="function"){if(C=C.toString(),typeof C!="string")throw fa("dirty is not a string, aborting")}else throw fa("toString is not a function");if(!e.isSupported)return C;if(Pt||al(Y),e.removed=[],typeof C=="string"&&(ha=!1),ha){if(C.nodeName){let be=Et(C.nodeName);if(!G[be]||wt[be])throw fa("root node is forbidden and cannot be sanitized in-place")}}else if(C instanceof o)W=Md("<!---->"),kt=W.ownerDocument.importNode(C,!0),kt.nodeType===ga.element&&kt.nodeName==="BODY"||kt.nodeName==="HTML"?W=kt:W.appendChild(kt);else{if(!Ne&&!$t&&!Bt&&C.indexOf("<")===-1)return _&&Rn?_.createHTML(C):C;if(W=Md(C),!W)return Ne?null:Rn?w:""}W&&me&&$r(W.firstChild);let qe=Bd(ha?C:W);for(;Rt=qe.nextNode();)Ld(Rt),Dd(Rt),Rt.content instanceof n&&pv(Rt.content);if(ha)return C;if(Ne){if(Pn)for(St=O.call(W.ownerDocument);W.firstChild;)St.appendChild(W.firstChild);else St=W;return(U.shadowroot||U.shadowrootmode)&&(St=I.call(i,St,!0)),St}let xe=Bt?W.outerHTML:W.innerHTML;return Bt&&G["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&Kt(dx,W.ownerDocument.doctype.name)&&(xe="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
`+xe),$t&&Gn([D,A,B],be=>{xe=pa(xe,be," ")}),_&&Rn?_.createHTML(xe):xe},e.setConfig=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};al(C),Pt=!0},e.clearConfig=function(){ti=null,Pt=!1},e.isValidAttribute=function(C,Y,W){ti||al({});let kt=Et(C),Rt=Et(Y);return Fd(kt,Rt,W)},e.addHook=function(C,Y){typeof Y=="function"&&da(S[C],Y)},e.removeHook=function(C,Y){if(Y!==void 0){let W=MS(S[C],Y);return W===-1?void 0:BS(S[C],W,1)[0]}return Kd(S[C])},e.removeHooks=function(C){S[C]=[]},e.removeAllHooks=function(){S=np()},e}l($u,"createDOMPurify");var Qi=$u(),Mn=/<br\s*\/?>/gi,HS=l(t=>t?gx(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),US=(()=>{let t=!1;return()=>{t||(px(),t=!0)}})();function px(){let t="data-temp-href-target";Qi.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),Qi.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}l(px,"setupDompurifyHooks");var fx=l(t=>(US(),Qi.sanitize(t)),"removeScript"),op=l((t,e)=>{if(Zt(e)){let r=e.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?t=fx(t):r!=="loose"&&(t=gx(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=XS(t))}return t},"sanitizeMore"),Me=l((t,e)=>t&&(e.dompurifyConfig?t=Qi.sanitize(op(t,e),e.dompurifyConfig).toString():t=Qi.sanitize(op(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),YS=l((t,e)=>typeof t=="string"?Me(t,e):t.flat().map(r=>Me(r,e)),"sanitizeTextOrArray"),VS=l(t=>Mn.test(t),"hasBreaks"),GS=l(t=>t.split(Mn),"splitBreaks"),XS=l(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),gx=l(t=>t.replace(Mn,"#br#"),"breakToPlaceholder"),ZS=l(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),QS=l(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),JS=l(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),sp=l(function(t){let e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let a=e[i];if(a===","&&i>0&&i+1<e.length){let n=e[i-1],s=e[i+1];KS(n,s)&&(a=n+","+s,i++,r.pop())}r.push(tT(a))}return r.join("")},"parseGenericTypes"),ph=l((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),KS=l((t,e)=>{let r=ph(t,"~"),i=ph(e,"~");return r===1&&i===1},"shouldCombineSets"),tT=l(t=>{let e=ph(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let i=[...t],a=i.indexOf("~"),n=i.lastIndexOf("~");for(;a!==-1&&n!==-1&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),lp=l(()=>window.MathMLElement!==void 0,"isMathMLSupported"),fh=/\$\$(.*)\$\$/g,on=l(t=>(t.match(fh)?.length??0)>0,"hasKatex"),SE=l(async(t,e)=>{let r=document.createElement("div");r.innerHTML=await yx(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),eT=l(async(t,e)=>{if(!on(t))return t;if(!(lp()||e.legacyMathML||e.forceLegacyMathML))return t.replace(fh,"MathML is unsupported in this environment.");{let{default:r}=await gt(()=>import("./katex-GD7MH7QM-DGjPZnL0.js"),__vite__mapDeps([0,1])),i=e.forceLegacyMathML||!lp()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Mn).map(a=>on(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(fh,(a,n)=>r.renderToString(n,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),yx=l(async(t,e)=>Me(await eT(t,e),e),"renderKatexSanitized"),Bn={getRows:HS,sanitizeText:Me,sanitizeTextOrArray:YS,hasBreaks:VS,splitBreaks:GS,lineBreakRegex:Mn,removeScript:fx,getUrl:ZS,evaluate:kr,getMax:QS,getMin:JS},rT=l(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),iT=l(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"),mx=l(function(t,e,r,i){let a=iT(e,r,i);rT(t,a)},"configureSvgSize"),aT=l(function(t,e,r,i){let a=e.node().getBBox(),n=a.width,s=a.height;P.info(`SVG bounds: ${n}x${s}`,a);let o=0,c=0;P.info(`Graph bounds: ${o}x${c}`,t),o=n+r*2,c=s+r*2,P.info(`Calculated bounds: ${o}x${c}`),mx(e,c,o,i);let h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),mo={},nT=l((t,e,r)=>{let i="";return t in mo&&mo[t]?i=mo[t](r):P.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: 1px;
}
& .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
}
${i}
${e}
`},"getStyles"),oT=l((t,e)=>{e!==void 0&&(mo[t]=e)},"addStylesForDiagram"),sT=nT,xx={};$v(xx,{clear:()=>lT,getAccDescription:()=>dT,getAccTitle:()=>cT,getDiagramTitle:()=>fT,setAccDescription:()=>uT,setAccTitle:()=>hT,setDiagramTitle:()=>pT});var wu="",vu="",_u="",Su=l(t=>Me(t,Vt()),"sanitizeText"),lT=l(()=>{wu="",_u="",vu=""},"clear"),hT=l(t=>{wu=Su(t).replace(/^\s+/g,"")},"setAccTitle"),cT=l(()=>wu,"getAccTitle"),uT=l(t=>{_u=Su(t).replace(/\n\s+/g,`
`)},"setAccDescription"),dT=l(()=>_u,"getAccDescription"),pT=l(t=>{vu=Su(t)},"setDiagramTitle"),fT=l(()=>vu,"getDiagramTitle"),hp=P,gT=lc,xt=Vt,TE=ax,ME=Zi,Tu=l(t=>Me(t,xt()),"sanitizeText"),yT=aT,mT=l(()=>xx,"getCommonDb"),jo={},Ho=l((t,e,r)=>{jo[t]&&hp.warn(`Diagram with id ${t} already registered. Overwriting.`),jo[t]=e,r&&Z1(t,r),oT(t,e.styles),e.injectUtils?.(hp,gT,xt,Tu,yT,mT(),()=>{})},"registerDiagram"),gh=l(t=>{if(t in jo)return jo[t];throw new xT(t)},"getDiagram"),Li,xT=(Li=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},l(Li,"DiagramNotFoundError"),Li);/*! Bundled license information:
dompurify/dist/purify.es.mjs:
(*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE *)
*/var bT=l(t=>{let{securityLevel:e}=xt(),r=ut("body");if(e==="sandbox"){let i=ut(`#i${t}`).node()?.contentDocument??document;r=ut(i.body)}return r.select(`#${t}`)},"selectSvgElement");function Mu(t){return typeof t>"u"||t===null}l(Mu,"isNothing");function bx(t){return typeof t=="object"&&t!==null}l(bx,"isObject");function kx(t){return Array.isArray(t)?t:Mu(t)?[]:[t]}l(kx,"toArray");function Cx(t,e){var r,i,a,n;if(e)for(n=Object.keys(e),r=0,i=n.length;r<i;r+=1)a=n[r],t[a]=e[a];return t}l(Cx,"extend");function $x(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}l($x,"repeat");function wx(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}l(wx,"isNegativeZero");var kT=Mu,CT=bx,$T=kx,wT=$x,vT=wx,_T=Cx,Ot={isNothing:kT,isObject:CT,toArray:$T,repeat:wT,isNegativeZero:vT,extend:_T};function Bu(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
`+t.mark.snippet),i+" "+r):i}l(Bu,"formatError");function Ji(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Bu(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}l(Ji,"YAMLException$1");Ji.prototype=Object.create(Error.prototype);Ji.prototype.constructor=Ji;Ji.prototype.toString=l(function(t){return this.name+": "+Bu(this,t)},"toString");var oe=Ji;function xo(t,e,r,i,a){var n="",s="",o=Math.floor(a/2)-1;return i-e>o&&(n=" ... ",e=i-o+n.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:n+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+n.length}}l(xo,"getLine");function bo(t,e){return Ot.repeat(" ",e-t.length)+t}l(bo,"padStart");function vx(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],n,s=-1;n=r.exec(t.buffer);)a.push(n.index),i.push(n.index+n[0].length),t.position<=n.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",c,h,u=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+u+3);for(c=1;c<=e.linesBefore&&!(s-c<0);c++)h=xo(t.buffer,i[s-c],a[s-c],t.position-(i[s]-i[s-c]),d),o=Ot.repeat(" ",e.indent)+bo((t.line-c+1).toString(),u)+" | "+h.str+`
`+o;for(h=xo(t.buffer,i[s],a[s],t.position,d),o+=Ot.repeat(" ",e.indent)+bo((t.line+1).toString(),u)+" | "+h.str+`
`,o+=Ot.repeat("-",e.indent+u+3+h.pos)+`^
`,c=1;c<=e.linesAfter&&!(s+c>=a.length);c++)h=xo(t.buffer,i[s+c],a[s+c],t.position-(i[s]-i[s+c]),d),o+=Ot.repeat(" ",e.indent)+bo((t.line+c+1).toString(),u)+" | "+h.str+`
`;return o.replace(/\n$/,"")}l(vx,"makeSnippet");var ST=vx,TT=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],MT=["scalar","sequence","mapping"];function _x(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}l(_x,"compileStyleAliases");function Sx(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(TT.indexOf(r)===-1)throw new oe('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=_x(e.styleAliases||null),MT.indexOf(this.kind)===-1)throw new oe('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}l(Sx,"Type$1");var Gt=Sx;function yh(t,e){var r=[];return t[e].forEach(function(i){var a=r.length;r.forEach(function(n,s){n.tag===i.tag&&n.kind===i.kind&&n.multi===i.multi&&(a=s)}),r[a]=i}),r}l(yh,"compileList");function Tx(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(a){a.multi?(t.multi[a.kind].push(a),t.multi.fallback.push(a)):t[a.kind][a.tag]=t.fallback[a.tag]=a}for(l(i,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}l(Tx,"compileMap");function Uo(t){return this.extend(t)}l(Uo,"Schema$1");Uo.prototype.extend=l(function(t){var e=[],r=[];if(t instanceof Gt)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new oe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.forEach(function(a){if(!(a instanceof Gt))throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new oe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new oe("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(a){if(!(a instanceof Gt))throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Uo.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=yh(i,"implicit"),i.compiledExplicit=yh(i,"explicit"),i.compiledTypeMap=Tx(i.compiledImplicit,i.compiledExplicit),i},"extend");var BT=Uo,AT=new Gt("tag:yaml.org,2002:str",{kind:"scalar",construct:l(function(t){return t!==null?t:""},"construct")}),LT=new Gt("tag:yaml.org,2002:seq",{kind:"sequence",construct:l(function(t){return t!==null?t:[]},"construct")}),FT=new Gt("tag:yaml.org,2002:map",{kind:"mapping",construct:l(function(t){return t!==null?t:{}},"construct")}),ET=new BT({explicit:[AT,LT,FT]});function Mx(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}l(Mx,"resolveYamlNull");function Bx(){return null}l(Bx,"constructYamlNull");function Ax(t){return t===null}l(Ax,"isNull");var DT=new Gt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Mx,construct:Bx,predicate:Ax,represent:{canonical:l(function(){return"~"},"canonical"),lowercase:l(function(){return"null"},"lowercase"),uppercase:l(function(){return"NULL"},"uppercase"),camelcase:l(function(){return"Null"},"camelcase"),empty:l(function(){return""},"empty")},defaultStyle:"lowercase"});function Lx(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}l(Lx,"resolveYamlBoolean");function Fx(t){return t==="true"||t==="True"||t==="TRUE"}l(Fx,"constructYamlBoolean");function Ex(t){return Object.prototype.toString.call(t)==="[object Boolean]"}l(Ex,"isBoolean");var OT=new Gt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Lx,construct:Fx,predicate:Ex,represent:{lowercase:l(function(t){return t?"true":"false"},"lowercase"),uppercase:l(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:l(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Dx(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}l(Dx,"isHexCode");function Ox(t){return 48<=t&&t<=55}l(Ox,"isOctCode");function Ix(t){return 48<=t&&t<=57}l(Ix,"isDecCode");function Px(t){if(t===null)return!1;var e=t.length,r=0,i=!1,a;if(!e)return!1;if(a=t[r],(a==="-"||a==="+")&&(a=t[++r]),a==="0"){if(r+1===e)return!0;if(a=t[++r],a==="b"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(!Dx(t.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(!Ox(t.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<e;r++)if(a=t[r],a!=="_"){if(!Ix(t.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}l(Px,"resolveYamlInteger");function Rx(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}l(Rx,"constructYamlInteger");function Nx(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Ot.isNegativeZero(t)}l(Nx,"isInteger");var IT=new Gt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Px,construct:Rx,predicate:Nx,represent:{binary:l(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:l(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:l(function(t){return t.toString(10)},"decimal"),hexadecimal:l(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"]}}),PT=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function zx(t){return!(t===null||!PT.test(t)||t[t.length-1]==="_")}l(zx,"resolveYamlFloat");function qx(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}l(qx,"constructYamlFloat");var RT=/^[-+]?[0-9]+e/;function Wx(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ot.isNegativeZero(t))return"-0.0";return r=t.toString(10),RT.test(r)?r.replace("e",".e"):r}l(Wx,"representYamlFloat");function jx(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Ot.isNegativeZero(t))}l(jx,"isFloat");var NT=new Gt("tag:yaml.org,2002:float",{kind:"scalar",resolve:zx,construct:qx,predicate:jx,represent:Wx,defaultStyle:"lowercase"}),Hx=ET.extend({implicit:[DT,OT,IT,NT]}),zT=Hx,Ux=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Yx=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Vx(t){return t===null?!1:Ux.exec(t)!==null||Yx.exec(t)!==null}l(Vx,"resolveYamlTimestamp");function Gx(t){var e,r,i,a,n,s,o,c=0,h=null,u,d,p;if(e=Ux.exec(t),e===null&&(e=Yx.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,i,a));if(n=+e[4],s=+e[5],o=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=+e[10],d=+(e[11]||0),h=(u*60+d)*6e4,e[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,a,n,s,o,c)),h&&p.setTime(p.getTime()-h),p}l(Gx,"constructYamlTimestamp");function Xx(t){return t.toISOString()}l(Xx,"representYamlTimestamp");var qT=new Gt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Vx,construct:Gx,instanceOf:Date,represent:Xx});function Zx(t){return t==="<<"||t===null}l(Zx,"resolveYamlMerge");var WT=new Gt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Zx}),Au=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function Qx(t){if(t===null)return!1;var e,r,i=0,a=t.length,n=Au;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}l(Qx,"resolveYamlBinary");function Jx(t){var e,r,i=t.replace(/[\r\n=]/g,""),a=i.length,n=Au,s=0,o=[];for(e=0;e<a;e++)e%4===0&&e&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|n.indexOf(i.charAt(e));return r=a%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}l(Jx,"constructYamlBinary");function Kx(t){var e="",r=0,i,a,n=t.length,s=Au;for(i=0;i<n;i++)i%3===0&&i&&(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[i];return a=n%3,a===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):a===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):a===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}l(Kx,"representYamlBinary");function tb(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}l(tb,"isBinary");var jT=new Gt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Qx,construct:Jx,predicate:tb,represent:Kx}),HT=Object.prototype.hasOwnProperty,UT=Object.prototype.toString;function eb(t){if(t===null)return!0;var e=[],r,i,a,n,s,o=t;for(r=0,i=o.length;r<i;r+=1){if(a=o[r],s=!1,UT.call(a)!=="[object Object]")return!1;for(n in a)if(HT.call(a,n))if(!s)s=!0;else return!1;if(!s)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}l(eb,"resolveYamlOmap");function rb(t){return t!==null?t:[]}l(rb,"constructYamlOmap");var YT=new Gt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:eb,construct:rb}),VT=Object.prototype.toString;function ib(t){if(t===null)return!0;var e,r,i,a,n,s=t;for(n=new Array(s.length),e=0,r=s.length;e<r;e+=1){if(i=s[e],VT.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;n[e]=[a[0],i[a[0]]]}return!0}l(ib,"resolveYamlPairs");function ab(t){if(t===null)return[];var e,r,i,a,n,s=t;for(n=new Array(s.length),e=0,r=s.length;e<r;e+=1)i=s[e],a=Object.keys(i),n[e]=[a[0],i[a[0]]];return n}l(ab,"constructYamlPairs");var GT=new Gt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:ib,construct:ab}),XT=Object.prototype.hasOwnProperty;function nb(t){if(t===null)return!0;var e,r=t;for(e in r)if(XT.call(r,e)&&r[e]!==null)return!1;return!0}l(nb,"resolveYamlSet");function ob(t){return t!==null?t:{}}l(ob,"constructYamlSet");var ZT=new Gt("tag:yaml.org,2002:set",{kind:"mapping",resolve:nb,construct:ob}),sb=zT.extend({implicit:[qT,WT],explicit:[jT,YT,GT,ZT]}),gr=Object.prototype.hasOwnProperty,Yo=1,lb=2,hb=3,Vo=4,bl=1,QT=2,cp=3,JT=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,KT=/[\x85\u2028\u2029]/,t3=/[,\[\]\{\}]/,cb=/^(?:!|!!|![a-z\-]+!)$/i,ub=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function mh(t){return Object.prototype.toString.call(t)}l(mh,"_class");function Se(t){return t===10||t===13}l(Se,"is_EOL");function cr(t){return t===9||t===32}l(cr,"is_WHITE_SPACE");function ee(t){return t===9||t===32||t===10||t===13}l(ee,"is_WS_OR_EOL");function Lr(t){return t===44||t===91||t===93||t===123||t===125}l(Lr,"is_FLOW_INDICATOR");function db(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}l(db,"fromHexCode");function pb(t){return t===120?2:t===117?4:t===85?8:0}l(pb,"escapedHexLen");function fb(t){return 48<=t&&t<=57?t-48:-1}l(fb,"fromDecimalCode");function xh(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}l(xh,"simpleEscapeSequence");function gb(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}l(gb,"charFromCodepoint");function Lu(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}l(Lu,"setProperty");var yb=new Array(256),mb=new Array(256);for(_r=0;_r<256;_r++)yb[_r]=xh(_r)?1:0,mb[_r]=xh(_r);var _r;function xb(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||sb,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=[]}l(xb,"State$1");function Fu(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=ST(r),new oe(e,r)}l(Fu,"generateError");function it(t,e){throw Fu(t,e)}l(it,"throwError");function sn(t,e){t.onWarning&&t.onWarning.call(null,Fu(t,e))}l(sn,"throwWarning");var up={YAML:l(function(t,e,r){var i,a,n;t.version!==null&&it(t,"duplication of %YAML directive"),r.length!==1&&it(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&it(t,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),n=parseInt(i[2],10),a!==1&&it(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&sn(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:l(function(t,e,r){var i,a;r.length!==2&&it(t,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],cb.test(i)||it(t,"ill-formed tag handle (first argument) of the TAG directive"),gr.call(t.tagMap,i)&&it(t,'there is a previously declared suffix for "'+i+'" tag handle'),ub.test(a)||it(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{it(t,"tag prefix is malformed: "+a)}t.tagMap[i]=a},"handleTagDirective")};function Ze(t,e,r,i){var a,n,s,o;if(e<r){if(o=t.input.slice(e,r),i)for(a=0,n=o.length;a<n;a+=1)s=o.charCodeAt(a),s===9||32<=s&&s<=1114111||it(t,"expected valid JSON character");else JT.test(o)&&it(t,"the stream contains non-printable characters");t.result+=o}}l(Ze,"captureSegment");function bh(t,e,r,i){var a,n,s,o;for(Ot.isObject(r)||it(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),s=0,o=a.length;s<o;s+=1)n=a[s],gr.call(e,n)||(Lu(e,n,r[n]),i[n]=!0)}l(bh,"mergeMappings");function Fr(t,e,r,i,a,n,s,o,c){var h,u;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),h=0,u=a.length;h<u;h+=1)Array.isArray(a[h])&&it(t,"nested arrays are not supported inside keys"),typeof a=="object"&&mh(a[h])==="[object Object]"&&(a[h]="[object Object]");if(typeof a=="object"&&mh(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(h=0,u=n.length;h<u;h+=1)bh(t,e,n[h],r);else bh(t,e,n,r);else!t.json&&!gr.call(r,a)&&gr.call(e,a)&&(t.line=s||t.line,t.lineStart=o||t.lineStart,t.position=c||t.position,it(t,"duplicated mapping key")),Lu(e,a,n),delete r[a];return e}l(Fr,"storeMappingPair");function Es(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):it(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}l(Es,"readLineBreak");function At(t,e,r){for(var i=0,a=t.input.charCodeAt(t.position);a!==0;){for(;cr(a);)a===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(Se(a))for(Es(t),a=t.input.charCodeAt(t.position),i++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&sn(t,"deficient indentation"),i}l(At,"skipSeparationSpace");function An(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||ee(r)))}l(An,"testDocumentSeparator");function Ds(t,e){e===1?t.result+=" ":e>1&&(t.result+=Ot.repeat(`
`,e-1))}l(Ds,"writeFoldedLines");function bb(t,e,r){var i,a,n,s,o,c,h,u,d=t.kind,p=t.result,f;if(f=t.input.charCodeAt(t.position),ee(f)||Lr(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(a=t.input.charCodeAt(t.position+1),ee(a)||r&&Lr(a)))return!1;for(t.kind="scalar",t.result="",n=s=t.position,o=!1;f!==0;){if(f===58){if(a=t.input.charCodeAt(t.position+1),ee(a)||r&&Lr(a))break}else if(f===35){if(i=t.input.charCodeAt(t.position-1),ee(i))break}else{if(t.position===t.lineStart&&An(t)||r&&Lr(f))break;if(Se(f))if(c=t.line,h=t.lineStart,u=t.lineIndent,At(t,!1,-1),t.lineIndent>=e){o=!0,f=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=c,t.lineStart=h,t.lineIndent=u;break}}o&&(Ze(t,n,s,!1),Ds(t,t.line-c),n=s=t.position,o=!1),cr(f)||(s=t.position+1),f=t.input.charCodeAt(++t.position)}return Ze(t,n,s,!1),t.result?!0:(t.kind=d,t.result=p,!1)}l(bb,"readPlainScalar");function kb(t,e){var r,i,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Ze(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,a=t.position;else return!0;else Se(r)?(Ze(t,i,a,!0),Ds(t,At(t,!1,e)),i=a=t.position):t.position===t.lineStart&&An(t)?it(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);it(t,"unexpected end of the stream within a single quoted scalar")}l(kb,"readSingleQuotedScalar");function Cb(t,e){var r,i,a,n,s,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return Ze(t,r,t.position,!0),t.position++,!0;if(o===92){if(Ze(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Se(o))At(t,!1,e);else if(o<256&&yb[o])t.result+=mb[o],t.position++;else if((s=pb(o))>0){for(a=s,n=0;a>0;a--)o=t.input.charCodeAt(++t.position),(s=db(o))>=0?n=(n<<4)+s:it(t,"expected hexadecimal character");t.result+=gb(n),t.position++}else it(t,"unknown escape sequence");r=i=t.position}else Se(o)?(Ze(t,r,i,!0),Ds(t,At(t,!1,e)),r=i=t.position):t.position===t.lineStart&&An(t)?it(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}it(t,"unexpected end of the stream within a double quoted scalar")}l(Cb,"readDoubleQuotedScalar");function $b(t,e){var r=!0,i,a,n,s=t.tag,o,c=t.anchor,h,u,d,p,f,g=Object.create(null),y,m,x,b;if(b=t.input.charCodeAt(t.position),b===91)u=93,f=!1,o=[];else if(b===123)u=125,f=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),b=t.input.charCodeAt(++t.position);b!==0;){if(At(t,!0,e),b=t.input.charCodeAt(t.position),b===u)return t.position++,t.tag=s,t.anchor=c,t.kind=f?"mapping":"sequence",t.result=o,!0;r?b===44&&it(t,"expected the node content, but found ','"):it(t,"missed comma between flow collection entries"),m=y=x=null,d=p=!1,b===63&&(h=t.input.charCodeAt(t.position+1),ee(h)&&(d=p=!0,t.position++,At(t,!0,e))),i=t.line,a=t.lineStart,n=t.position,zr(t,e,Yo,!1,!0),m=t.tag,y=t.result,At(t,!0,e),b=t.input.charCodeAt(t.position),(p||t.line===i)&&b===58&&(d=!0,b=t.input.charCodeAt(++t.position),At(t,!0,e),zr(t,e,Yo,!1,!0),x=t.result),f?Fr(t,o,g,m,y,x,i,a,n):d?o.push(Fr(t,null,g,m,y,x,i,a,n)):o.push(y),At(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}it(t,"unexpected end of the stream within a flow collection")}l($b,"readFlowCollection");function wb(t,e){var r,i,a=bl,n=!1,s=!1,o=e,c=0,h=!1,u,d;if(d=t.input.charCodeAt(t.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)bl===a?a=d===43?cp:QT:it(t,"repeat of a chomping mode identifier");else if((u=fb(d))>=0)u===0?it(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?it(t,"repeat of an indentation width identifier"):(o=e+u-1,s=!0);else break;if(cr(d)){do d=t.input.charCodeAt(++t.position);while(cr(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!Se(d)&&d!==0)}for(;d!==0;){for(Es(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!s||t.lineIndent<o)&&d===32;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>o&&(o=t.lineIndent),Se(d)){c++;continue}if(t.lineIndent<o){a===cp?t.result+=Ot.repeat(`
`,n?1+c:c):a===bl&&n&&(t.result+=`
`);break}for(i?cr(d)?(h=!0,t.result+=Ot.repeat(`
`,n?1+c:c)):h?(h=!1,t.result+=Ot.repeat(`
`,c+1)):c===0?n&&(t.result+=" "):t.result+=Ot.repeat(`
`,c):t.result+=Ot.repeat(`
`,n?1+c:c),n=!0,s=!0,c=0,r=t.position;!Se(d)&&d!==0;)d=t.input.charCodeAt(++t.position);Ze(t,r,t.position,!1)}return!0}l(wb,"readBlockScalar");function kh(t,e){var r,i=t.tag,a=t.anchor,n=[],s,o=!1,c;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),c=t.input.charCodeAt(t.position);c!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,it(t,"tab characters must not be used in indentation")),!(c!==45||(s=t.input.charCodeAt(t.position+1),!ee(s))));){if(o=!0,t.position++,At(t,!0,-1)&&t.lineIndent<=e){n.push(null),c=t.input.charCodeAt(t.position);continue}if(r=t.line,zr(t,e,hb,!1,!0),n.push(t.result),At(t,!0,-1),c=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&c!==0)it(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=i,t.anchor=a,t.kind="sequence",t.result=n,!0):!1}l(kh,"readBlockSequence");function vb(t,e,r){var i,a,n,s,o,c,h=t.tag,u=t.anchor,d={},p=Object.create(null),f=null,g=null,y=null,m=!1,x=!1,b;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=d),b=t.input.charCodeAt(t.position);b!==0;){if(!m&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,it(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),n=t.line,(b===63||b===58)&&ee(i))b===63?(m&&(Fr(t,d,p,f,g,null,s,o,c),f=g=y=null),x=!0,m=!0,a=!0):m?(m=!1,a=!0):it(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,b=i;else{if(s=t.line,o=t.lineStart,c=t.position,!zr(t,r,lb,!1,!0))break;if(t.line===n){for(b=t.input.charCodeAt(t.position);cr(b);)b=t.input.charCodeAt(++t.position);if(b===58)b=t.input.charCodeAt(++t.position),ee(b)||it(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Fr(t,d,p,f,g,null,s,o,c),f=g=y=null),x=!0,m=!1,a=!1,f=t.tag,g=t.result;else if(x)it(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=u,!0}else if(x)it(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=u,!0}if((t.line===n||t.lineIndent>e)&&(m&&(s=t.line,o=t.lineStart,c=t.position),zr(t,e,Vo,!0,a)&&(m?g=t.result:y=t.result),m||(Fr(t,d,p,f,g,y,s,o,c),f=g=y=null),At(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&b!==0)it(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&Fr(t,d,p,f,g,null,s,o,c),x&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),x}l(vb,"readBlockMapping");function _b(t){var e,r=!1,i=!1,a,n,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&it(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(r=!0,s=t.input.charCodeAt(++t.position)):s===33?(i=!0,a="!!",s=t.input.charCodeAt(++t.position)):a="!",e=t.position,r){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(n=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):it(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!ee(s);)s===33&&(i?it(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(e-1,t.position+1),cb.test(a)||it(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),t3.test(n)&&it(t,"tag suffix cannot contain flow indicator characters")}n&&!ub.test(n)&&it(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{it(t,"tag name is malformed: "+n)}return r?t.tag=n:gr.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a==="!"?t.tag="!"+n:a==="!!"?t.tag="tag:yaml.org,2002:"+n:it(t,'undeclared tag handle "'+a+'"'),!0}l(_b,"readTagProperty");function Sb(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&it(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!ee(r)&&!Lr(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&it(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}l(Sb,"readAnchorProperty");function Tb(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!ee(i)&&!Lr(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&it(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),gr.call(t.anchorMap,r)||it(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],At(t,!0,-1),!0}l(Tb,"readAlias");function zr(t,e,r,i,a){var n,s,o,c=1,h=!1,u=!1,d,p,f,g,y,m;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=s=o=Vo===r||hb===r,i&&At(t,!0,-1)&&(h=!0,t.lineIndent>e?c=1:t.lineIndent===e?c=0:t.lineIndent<e&&(c=-1)),c===1)for(;_b(t)||Sb(t);)At(t,!0,-1)?(h=!0,o=n,t.lineIndent>e?c=1:t.lineIndent===e?c=0:t.lineIndent<e&&(c=-1)):o=!1;if(o&&(o=h||a),(c===1||Vo===r)&&(Yo===r||lb===r?y=e:y=e+1,m=t.position-t.lineStart,c===1?o&&(kh(t,m)||vb(t,m,y))||$b(t,y)?u=!0:(s&&wb(t,y)||kb(t,y)||Cb(t,y)?u=!0:Tb(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&it(t,"alias node should not have any properties")):bb(t,y,Yo===r)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):c===0&&(u=o&&kh(t,m))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&it(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),d=0,p=t.implicitTypes.length;d<p;d+=1)if(g=t.implicitTypes[d],g.resolve(t.result)){t.result=g.construct(t.result),t.tag=g.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(gr.call(t.typeMap[t.kind||"fallback"],t.tag))g=t.typeMap[t.kind||"fallback"][t.tag];else for(g=null,f=t.typeMap.multi[t.kind||"fallback"],d=0,p=f.length;d<p;d+=1)if(t.tag.slice(0,f[d].tag.length)===f[d].tag){g=f[d];break}g||it(t,"unknown tag !<"+t.tag+">"),t.result!==null&&g.kind!==t.kind&&it(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):it(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}l(zr,"composeNode");function Mb(t){var e=t.position,r,i,a,n=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(At(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(n=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!ee(s);)s=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),a=[],i.length<1&&it(t,"directive name must not be less than one character in length");s!==0;){for(;cr(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Se(s));break}if(Se(s))break;for(r=t.position;s!==0&&!ee(s);)s=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}s!==0&&Es(t),gr.call(up,i)?up[i](t,i,a):sn(t,'unknown document directive "'+i+'"')}if(At(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,At(t,!0,-1)):n&&it(t,"directives end mark is expected"),zr(t,t.lineIndent-1,Vo,!1,!0),At(t,!0,-1),t.checkLineBreaks&&KT.test(t.input.slice(e,t.position))&&sn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&An(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,At(t,!0,-1));return}if(t.position<t.length-1)it(t,"end of the stream or a document separator is expected");else return}l(Mb,"readDocument");function Eu(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new xb(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,it(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Mb(r);return r.documents}l(Eu,"loadDocuments");function e3(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var i=Eu(t,r);if(typeof e!="function")return i;for(var a=0,n=i.length;a<n;a+=1)e(i[a])}l(e3,"loadAll$1");function Bb(t,e){var r=Eu(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new oe("expected a single document in the stream, but found more")}}l(Bb,"load$1");var r3=Bb,i3={load:r3},Ab=Object.prototype.toString,Lb=Object.prototype.hasOwnProperty,Du=65279,a3=9,ln=10,n3=13,o3=32,s3=33,l3=34,Ch=35,h3=37,c3=38,u3=39,d3=42,Fb=44,p3=45,Go=58,f3=61,g3=62,y3=63,m3=64,Eb=91,Db=93,x3=96,Ob=123,b3=124,Ib=125,Jt={};Jt[0]="\\0";Jt[7]="\\a";Jt[8]="\\b";Jt[9]="\\t";Jt[10]="\\n";Jt[11]="\\v";Jt[12]="\\f";Jt[13]="\\r";Jt[27]="\\e";Jt[34]='\\"';Jt[92]="\\\\";Jt[133]="\\N";Jt[160]="\\_";Jt[8232]="\\L";Jt[8233]="\\P";var k3=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],C3=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Pb(t,e){var r,i,a,n,s,o,c;if(e===null)return{};for(r={},i=Object.keys(e),a=0,n=i.length;a<n;a+=1)s=i[a],o=String(e[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=t.compiledTypeMap.fallback[s],c&&Lb.call(c.styleAliases,o)&&(o=c.styleAliases[o]),r[s]=o;return r}l(Pb,"compileStyleMap");function Rb(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else if(t<=4294967295)r="U",i=8;else throw new oe("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ot.repeat("0",i-e.length)+e}l(Rb,"encodeHex");var $3=1,hn=2;function Nb(t){this.schema=t.schema||sb,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Ot.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Pb(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?hn:$3,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}l(Nb,"State");function $h(t,e){for(var r=Ot.repeat(" ",e),i=0,a=-1,n="",s,o=t.length;i<o;)a=t.indexOf(`
`,i),a===-1?(s=t.slice(i),i=o):(s=t.slice(i,a+1),i=a+1),s.length&&s!==`
`&&(n+=r),n+=s;return n}l($h,"indentString");function Xo(t,e){return`
`+Ot.repeat(" ",t.indent*e)}l(Xo,"generateNextLine");function zb(t,e){var r,i,a;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}l(zb,"testImplicitResolving");function cn(t){return t===o3||t===a3}l(cn,"isWhitespace");function Ki(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==Du||65536<=t&&t<=1114111}l(Ki,"isPrintable");function wh(t){return Ki(t)&&t!==Du&&t!==n3&&t!==ln}l(wh,"isNsCharOrWhitespace");function vh(t,e,r){var i=wh(t),a=i&&!cn(t);return(r?i:i&&t!==Fb&&t!==Eb&&t!==Db&&t!==Ob&&t!==Ib)&&t!==Ch&&!(e===Go&&!a)||wh(e)&&!cn(e)&&t===Ch||e===Go&&a}l(vh,"isPlainSafe");function qb(t){return Ki(t)&&t!==Du&&!cn(t)&&t!==p3&&t!==y3&&t!==Go&&t!==Fb&&t!==Eb&&t!==Db&&t!==Ob&&t!==Ib&&t!==Ch&&t!==c3&&t!==d3&&t!==s3&&t!==b3&&t!==f3&&t!==g3&&t!==u3&&t!==l3&&t!==h3&&t!==m3&&t!==x3}l(qb,"isPlainSafeFirst");function Wb(t){return!cn(t)&&t!==Go}l(Wb,"isPlainSafeLast");function gi(t,e){var r=t.charCodeAt(e),i;return r>=55296&&r<=56319&&e+1<t.length&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}l(gi,"codePointAt");function Ou(t){var e=/^\n* /;return e.test(t)}l(Ou,"needIndentIndicator");var jb=1,_h=2,Hb=3,Ub=4,li=5;function Yb(t,e,r,i,a,n,s,o){var c,h=0,u=null,d=!1,p=!1,f=i!==-1,g=-1,y=qb(gi(t,0))&&Wb(gi(t,t.length-1));if(e||s)for(c=0;c<t.length;h>=65536?c+=2:c++){if(h=gi(t,c),!Ki(h))return li;y=y&&vh(h,u,o),u=h}else{for(c=0;c<t.length;h>=65536?c+=2:c++){if(h=gi(t,c),h===ln)d=!0,f&&(p=p||c-g-1>i&&t[g+1]!==" ",g=c);else if(!Ki(h))return li;y=y&&vh(h,u,o),u=h}p=p||f&&c-g-1>i&&t[g+1]!==" "}return!d&&!p?y&&!s&&!a(t)?jb:n===hn?li:_h:r>9&&Ou(t)?li:s?n===hn?li:_h:p?Ub:Hb}l(Yb,"chooseScalarStyle");function Vb(t,e,r,i,a){t.dump=(function(){if(e.length===0)return t.quotingType===hn?'""':"''";if(!t.noCompatMode&&(k3.indexOf(e)!==-1||C3.test(e)))return t.quotingType===hn?'"'+e+'"':"'"+e+"'";var n=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-n),o=i||t.flowLevel>-1&&r>=t.flowLevel;function c(h){return zb(t,h)}switch(l(c,"testAmbiguity"),Yb(e,o,t.indent,s,c,t.quotingType,t.forceQuotes&&!i,a)){case jb:return e;case _h:return"'"+e.replace(/'/g,"''")+"'";case Hb:return"|"+Sh(e,t.indent)+Th($h(e,n));case Ub:return">"+Sh(e,t.indent)+Th($h(Gb(e,s),n));case li:return'"'+Xb(e)+'"';default:throw new oe("impossible error: invalid scalar style")}})()}l(Vb,"writeScalar");function Sh(t,e){var r=Ou(t)?String(e):"",i=t[t.length-1]===`
`,a=i&&(t[t.length-2]===`
`||t===`
`),n=a?"+":i?"":"-";return r+n+`
`}l(Sh,"blockHeader");function Th(t){return t[t.length-1]===`
`?t.slice(0,-1):t}l(Th,"dropEndingNewline");function Gb(t,e){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=t.indexOf(`
`);return h=h!==-1?h:t.length,r.lastIndex=h,Mh(t.slice(0,h),e)})(),a=t[0]===`
`||t[0]===" ",n,s;s=r.exec(t);){var o=s[1],c=s[2];n=c[0]===" ",i+=o+(!a&&!n&&c!==""?`
`:"")+Mh(c,e),a=n}return i}l(Gb,"foldString");function Mh(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,i,a=0,n,s=0,o=0,c="";i=r.exec(t);)o=i.index,o-a>e&&(n=s>a?s:o,c+=`
`+t.slice(a,n),a=n+1),s=o;return c+=`
`,t.length-a>e&&s>a?c+=t.slice(a,s)+`
`+t.slice(s+1):c+=t.slice(a),c.slice(1)}l(Mh,"foldLine");function Xb(t){for(var e="",r=0,i,a=0;a<t.length;r>=65536?a+=2:a++)r=gi(t,a),i=Jt[r],!i&&Ki(r)?(e+=t[a],r>=65536&&(e+=t[a+1])):e+=i||Rb(r);return e}l(Xb,"escapeString");function Zb(t,e,r){var i="",a=t.tag,n,s,o;for(n=0,s=r.length;n<s;n+=1)o=r[n],t.replacer&&(o=t.replacer.call(r,String(n),o)),(Pe(t,e,o,!1,!1)||typeof o>"u"&&Pe(t,e,null,!1,!1))&&(i!==""&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=a,t.dump="["+i+"]"}l(Zb,"writeFlowSequence");function Bh(t,e,r,i){var a="",n=t.tag,s,o,c;for(s=0,o=r.length;s<o;s+=1)c=r[s],t.replacer&&(c=t.replacer.call(r,String(s),c)),(Pe(t,e+1,c,!0,!0,!1,!0)||typeof c>"u"&&Pe(t,e+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=Xo(t,e)),t.dump&&ln===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=n,t.dump=a||"[]"}l(Bh,"writeBlockSequence");function Qb(t,e,r){var i="",a=t.tag,n=Object.keys(r),s,o,c,h,u;for(s=0,o=n.length;s<o;s+=1)u="",i!==""&&(u+=", "),t.condenseFlow&&(u+='"'),c=n[s],h=r[c],t.replacer&&(h=t.replacer.call(r,c,h)),Pe(t,e,c,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Pe(t,e,h,!1,!1)&&(u+=t.dump,i+=u));t.tag=a,t.dump="{"+i+"}"}l(Qb,"writeFlowMapping");function Jb(t,e,r,i){var a="",n=t.tag,s=Object.keys(r),o,c,h,u,d,p;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new oe("sortKeys must be a boolean or a function");for(o=0,c=s.length;o<c;o+=1)p="",(!i||a!=="")&&(p+=Xo(t,e)),h=s[o],u=r[h],t.replacer&&(u=t.replacer.call(r,h,u)),Pe(t,e+1,h,!0,!0,!0)&&(d=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,d&&(t.dump&&ln===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,d&&(p+=Xo(t,e)),Pe(t,e+1,u,!0,d)&&(t.dump&&ln===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,a+=p));t.tag=n,t.dump=a||"{}"}l(Jb,"writeBlockMapping");function Ah(t,e,r){var i,a,n,s,o,c;for(a=r?t.explicitTypes:t.implicitTypes,n=0,s=a.length;n<s;n+=1)if(o=a[n],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof e=="object"&&e instanceof o.instanceOf)&&(!o.predicate||o.predicate(e))){if(r?o.multi&&o.representName?t.tag=o.representName(e):t.tag=o.tag:t.tag="?",o.represent){if(c=t.styleMap[o.tag]||o.defaultStyle,Ab.call(o.represent)==="[object Function]")i=o.represent(e,c);else if(Lb.call(o.represent,c))i=o.represent[c](e,c);else throw new oe("!<"+o.tag+'> tag resolver accepts not "'+c+'" style');t.dump=i}return!0}return!1}l(Ah,"detectType");function Pe(t,e,r,i,a,n,s){t.tag=null,t.dump=r,Ah(t,r,!1)||Ah(t,r,!0);var o=Ab.call(t.dump),c=i,h;i&&(i=t.flowLevel<0||t.flowLevel>e);var u=o==="[object Object]"||o==="[object Array]",d,p;if(u&&(d=t.duplicates.indexOf(r),p=d!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(a=!1),p&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(u&&p&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),o==="[object Object]")i&&Object.keys(t.dump).length!==0?(Jb(t,e,t.dump,a),p&&(t.dump="&ref_"+d+t.dump)):(Qb(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(o==="[object Array]")i&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?Bh(t,e-1,t.dump,a):Bh(t,e,t.dump,a),p&&(t.dump="&ref_"+d+t.dump)):(Zb(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&Vb(t,t.dump,e,n,c);else{if(o==="[object Undefined]"||t.skipInvalid)return!1;throw new oe("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump)}return!0}l(Pe,"writeNode");function Kb(t,e){var r=[],i=[],a,n;for(Zo(t,r,i),a=0,n=i.length;a<n;a+=1)e.duplicates.push(r[i[a]]);e.usedDuplicates=new Array(n)}l(Kb,"getDuplicateReferences");function Zo(t,e,r){var i,a,n;if(t!==null&&typeof t=="object")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)Zo(t[a],e,r);else for(i=Object.keys(t),a=0,n=i.length;a<n;a+=1)Zo(t[i[a]],e,r)}l(Zo,"inspectNode");function w3(t,e){e=e||{};var r=new Nb(e);r.noRefs||Kb(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Pe(r,0,i,!0,!0)?r.dump+`
`:""}l(w3,"dump$1");function v3(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}l(v3,"renamed");var _3=Hx,S3=i3.load;/*! Bundled license information:
js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
*/var ya=l((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"),Yt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},dp={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function _a(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=_t(t),e=_t(e);let[r,i]=[t.x,t.y],[a,n]=[e.x,e.y],s=a-r,o=n-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}l(_a,"calculateDeltaAndAngle");var _t=l(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),T3=l(t=>({x:l(function(e,r,i){let a=0,n=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Yt,t.arrowTypeStart)){let{angle:f,deltaX:g}=_a(i[0],i[1]);a=Yt[t.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Yt,t.arrowTypeEnd)){let{angle:f,deltaX:g}=_a(i[i.length-1],i[i.length-2]);a=Yt[t.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}let s=Math.abs(_t(e).x-_t(i[i.length-1]).x),o=Math.abs(_t(e).y-_t(i[i.length-1]).y),c=Math.abs(_t(e).x-_t(i[0]).x),h=Math.abs(_t(e).y-_t(i[0]).y),u=Yt[t.arrowTypeStart],d=Yt[t.arrowTypeEnd],p=1;if(s<d&&s>0&&o<d){let f=d+p-s;f*=n==="right"?-1:1,a-=f}if(c<u&&c>0&&h<u){let f=u+p-c;f*=n==="right"?-1:1,a+=f}return _t(e).x+a},"x"),y:l(function(e,r,i){let a=0,n=_t(i[0]).y<_t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Yt,t.arrowTypeStart)){let{angle:f,deltaY:g}=_a(i[0],i[1]);a=Yt[t.arrowTypeStart]*Math.abs(Math.sin(f))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Yt,t.arrowTypeEnd)){let{angle:f,deltaY:g}=_a(i[i.length-1],i[i.length-2]);a=Yt[t.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}let s=Math.abs(_t(e).y-_t(i[i.length-1]).y),o=Math.abs(_t(e).x-_t(i[i.length-1]).x),c=Math.abs(_t(e).y-_t(i[0]).y),h=Math.abs(_t(e).x-_t(i[0]).x),u=Yt[t.arrowTypeStart],d=Yt[t.arrowTypeEnd],p=1;if(s<d&&s>0&&o<d){let f=d+p-s;f*=n==="up"?-1:1,a-=f}if(c<u&&c>0&&h<u){let f=u+p-c;f*=n==="up"?-1:1,a+=f}return _t(e).y+a},"y")}),"getLineFunctionsWithOffset"),M3=oc(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|&colon;)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}),B3=oc(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var e=M3();function r(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}l(r,"isRelativeUrlWithoutProtocol");function i(o){var c=o.replace(e.ctrlCharactersRegex,"");return c.replace(e.htmlEntitiesRegex,function(h,u){return String.fromCharCode(u)})}l(i,"decodeHtmlCharacters");function a(o){return URL.canParse(o)}l(a,"isValidUrl");function n(o){try{return decodeURIComponent(o)}catch{return o}}l(n,"decodeURI");function s(o){if(!o)return e.BLANK_URL;var c,h=n(o.trim());do h=i(h).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),h=n(h),c=h.match(e.ctrlCharactersRegex)||h.match(e.htmlEntitiesRegex)||h.match(e.htmlCtrlEntityRegex)||h.match(e.whitespaceEscapeCharsRegex);while(c&&c.length>0);var u=h;if(!u)return e.BLANK_URL;if(r(u))return u;var d=u.trimStart(),p=d.match(e.urlSchemeRegex);if(!p)return u;var f=p[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var g=d.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return g;if(f==="http:"||f==="https:"){if(!a(g))return e.BLANK_URL;var y=new URL(g);return y.protocol=y.protocol.toLowerCase(),y.hostname=y.hostname.toLowerCase(),y.toString()}return g}l(s,"sanitizeUrl"),t.sanitizeUrl=s}),A3=typeof global=="object"&&global&&global.Object===Object&&global,t2=A3,L3=typeof self=="object"&&self&&self.Object===Object&&self,F3=t2||L3||Function("return this")(),Re=F3,E3=Re.Symbol,Qo=E3,e2=Object.prototype,D3=e2.hasOwnProperty,O3=e2.toString,ma=Qo?Qo.toStringTag:void 0;function r2(t){var e=D3.call(t,ma),r=t[ma];try{t[ma]=void 0;var i=!0}catch{}var a=O3.call(t);return i&&(e?t[ma]=r:delete t[ma]),a}l(r2,"getRawTag");var I3=r2,P3=Object.prototype,R3=P3.toString;function i2(t){return R3.call(t)}l(i2,"objectToString");var N3=i2,z3="[object Null]",q3="[object Undefined]",pp=Qo?Qo.toStringTag:void 0;function a2(t){return t==null?t===void 0?q3:z3:pp&&pp in Object(t)?I3(t):N3(t)}l(a2,"baseGetTag");var ia=a2;function n2(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}l(n2,"isObject");var Hr=n2,W3="[object AsyncFunction]",j3="[object Function]",H3="[object GeneratorFunction]",U3="[object Proxy]";function o2(t){if(!Hr(t))return!1;var e=ia(t);return e==j3||e==H3||e==W3||e==U3}l(o2,"isFunction");var Iu=o2,Y3=Re["__core-js_shared__"],kl=Y3,fp=(function(){var t=/[^.]+$/.exec(kl&&kl.keys&&kl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function s2(t){return!!fp&&fp in t}l(s2,"isMasked");var V3=s2,G3=Function.prototype,X3=G3.toString;function l2(t){if(t!=null){try{return X3.call(t)}catch{}try{return t+""}catch{}}return""}l(l2,"toSource");var Ur=l2,Z3=/[\\^$.*+?()[\]{}|]/g,Q3=/^\[object .+?Constructor\]$/,J3=Function.prototype,K3=Object.prototype,tM=J3.toString,eM=K3.hasOwnProperty,rM=RegExp("^"+tM.call(eM).replace(Z3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h2(t){if(!Hr(t)||V3(t))return!1;var e=Iu(t)?rM:Q3;return e.test(Ur(t))}l(h2,"baseIsNative");var iM=h2;function c2(t,e){return t?.[e]}l(c2,"getValue");var aM=c2;function u2(t,e){var r=aM(t,e);return iM(r)?r:void 0}l(u2,"getNative");var Yr=u2,nM=Yr(Object,"create"),un=nM;function d2(){this.__data__=un?un(null):{},this.size=0}l(d2,"hashClear");var oM=d2;function p2(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}l(p2,"hashDelete");var sM=p2,lM="__lodash_hash_undefined__",hM=Object.prototype,cM=hM.hasOwnProperty;function f2(t){var e=this.__data__;if(un){var r=e[t];return r===lM?void 0:r}return cM.call(e,t)?e[t]:void 0}l(f2,"hashGet");var uM=f2,dM=Object.prototype,pM=dM.hasOwnProperty;function g2(t){var e=this.__data__;return un?e[t]!==void 0:pM.call(e,t)}l(g2,"hashHas");var fM=g2,gM="__lodash_hash_undefined__";function y2(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=un&&e===void 0?gM:e,this}l(y2,"hashSet");var yM=y2;function Vr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}l(Vr,"Hash");Vr.prototype.clear=oM;Vr.prototype.delete=sM;Vr.prototype.get=uM;Vr.prototype.has=fM;Vr.prototype.set=yM;var gp=Vr;function m2(){this.__data__=[],this.size=0}l(m2,"listCacheClear");var mM=m2;function x2(t,e){return t===e||t!==t&&e!==e}l(x2,"eq");var Os=x2;function b2(t,e){for(var r=t.length;r--;)if(Os(t[r][0],e))return r;return-1}l(b2,"assocIndexOf");var Is=b2,xM=Array.prototype,bM=xM.splice;function k2(t){var e=this.__data__,r=Is(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():bM.call(e,r,1),--this.size,!0}l(k2,"listCacheDelete");var kM=k2;function C2(t){var e=this.__data__,r=Is(e,t);return r<0?void 0:e[r][1]}l(C2,"listCacheGet");var CM=C2;function $2(t){return Is(this.__data__,t)>-1}l($2,"listCacheHas");var $M=$2;function w2(t,e){var r=this.__data__,i=Is(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}l(w2,"listCacheSet");var wM=w2;function Gr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}l(Gr,"ListCache");Gr.prototype.clear=mM;Gr.prototype.delete=kM;Gr.prototype.get=CM;Gr.prototype.has=$M;Gr.prototype.set=wM;var Ps=Gr,vM=Yr(Re,"Map"),dn=vM;function v2(){this.size=0,this.__data__={hash:new gp,map:new(dn||Ps),string:new gp}}l(v2,"mapCacheClear");var _M=v2;function _2(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}l(_2,"isKeyable");var SM=_2;function S2(t,e){var r=t.__data__;return SM(e)?r[typeof e=="string"?"string":"hash"]:r.map}l(S2,"getMapData");var Rs=S2;function T2(t){var e=Rs(this,t).delete(t);return this.size-=e?1:0,e}l(T2,"mapCacheDelete");var TM=T2;function M2(t){return Rs(this,t).get(t)}l(M2,"mapCacheGet");var MM=M2;function B2(t){return Rs(this,t).has(t)}l(B2,"mapCacheHas");var BM=B2;function A2(t,e){var r=Rs(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}l(A2,"mapCacheSet");var AM=A2;function Xr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}l(Xr,"MapCache");Xr.prototype.clear=_M;Xr.prototype.delete=TM;Xr.prototype.get=MM;Xr.prototype.has=BM;Xr.prototype.set=AM;var Pu=Xr,LM="Expected a function";function Ns(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(LM);var r=l(function(){var i=arguments,a=e?e.apply(this,i):i[0],n=r.cache;if(n.has(a))return n.get(a);var s=t.apply(this,i);return r.cache=n.set(a,s)||n,s},"memoized");return r.cache=new(Ns.Cache||Pu),r}l(Ns,"memoize");Ns.Cache=Pu;var Ru=Ns;function L2(t){return function(){return t}}l(L2,"constant");var FM=L2;function F2(){this.__data__=new Ps,this.size=0}l(F2,"stackClear");var EM=F2;function E2(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}l(E2,"stackDelete");var DM=E2;function D2(t){return this.__data__.get(t)}l(D2,"stackGet");var OM=D2;function O2(t){return this.__data__.has(t)}l(O2,"stackHas");var IM=O2,PM=200;function I2(t,e){var r=this.__data__;if(r instanceof Ps){var i=r.__data__;if(!dn||i.length<PM-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new Pu(i)}return r.set(t,e),this.size=r.size,this}l(I2,"stackSet");var RM=I2;function Zr(t){var e=this.__data__=new Ps(t);this.size=e.size}l(Zr,"Stack");Zr.prototype.clear=EM;Zr.prototype.delete=DM;Zr.prototype.get=OM;Zr.prototype.has=IM;Zr.prototype.set=RM;var NM=Zr,zM=(function(){try{var t=Yr(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Jo=zM;function P2(t,e,r){e=="__proto__"&&Jo?Jo(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}l(P2,"baseAssignValue");var Nu=P2;function R2(t,e,r){(r!==void 0&&!Os(t[e],r)||r===void 0&&!(e in t))&&Nu(t,e,r)}l(R2,"assignMergeValue");var Lh=R2;function N2(t){return function(e,r,i){for(var a=-1,n=Object(e),s=i(e),o=s.length;o--;){var c=s[t?o:++a];if(r(n[c],c,n)===!1)break}return e}}l(N2,"createBaseFor");var qM=N2,WM=qM(),jM=WM,z2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yp=z2&&typeof module=="object"&&module&&!module.nodeType&&module,HM=yp&&yp.exports===z2,mp=HM?Re.Buffer:void 0,xp=mp?mp.allocUnsafe:void 0;function q2(t,e){if(e)return t.slice();var r=t.length,i=xp?xp(r):new t.constructor(r);return t.copy(i),i}l(q2,"cloneBuffer");var UM=q2,YM=Re.Uint8Array,bp=YM;function W2(t){var e=new t.constructor(t.byteLength);return new bp(e).set(new bp(t)),e}l(W2,"cloneArrayBuffer");var VM=W2;function j2(t,e){var r=e?VM(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}l(j2,"cloneTypedArray");var GM=j2;function H2(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}l(H2,"copyArray");var XM=H2,kp=Object.create,ZM=(function(){function t(){}return l(t,"object"),function(e){if(!Hr(e))return{};if(kp)return kp(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),QM=ZM;function U2(t,e){return function(r){return t(e(r))}}l(U2,"overArg");var Y2=U2,JM=Y2(Object.getPrototypeOf,Object),V2=JM,KM=Object.prototype;function G2(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||KM;return t===r}l(G2,"isPrototype");var zs=G2;function X2(t){return typeof t.constructor=="function"&&!zs(t)?QM(V2(t)):{}}l(X2,"initCloneObject");var t5=X2;function Z2(t){return t!=null&&typeof t=="object"}l(Z2,"isObjectLike");var Ln=Z2,e5="[object Arguments]";function Q2(t){return Ln(t)&&ia(t)==e5}l(Q2,"baseIsArguments");var Cp=Q2,J2=Object.prototype,r5=J2.hasOwnProperty,i5=J2.propertyIsEnumerable,a5=Cp((function(){return arguments})())?Cp:function(t){return Ln(t)&&r5.call(t,"callee")&&!i5.call(t,"callee")},Ko=a5,n5=Array.isArray,ts=n5,o5=9007199254740991;function K2(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=o5}l(K2,"isLength");var tk=K2;function ek(t){return t!=null&&tk(t.length)&&!Iu(t)}l(ek,"isArrayLike");var qs=ek;function rk(t){return Ln(t)&&qs(t)}l(rk,"isArrayLikeObject");var s5=rk;function ik(){return!1}l(ik,"stubFalse");var l5=ik,ak=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$p=ak&&typeof module=="object"&&module&&!module.nodeType&&module,h5=$p&&$p.exports===ak,wp=h5?Re.Buffer:void 0,c5=wp?wp.isBuffer:void 0,u5=c5||l5,zu=u5,d5="[object Object]",p5=Function.prototype,f5=Object.prototype,nk=p5.toString,g5=f5.hasOwnProperty,y5=nk.call(Object);function ok(t){if(!Ln(t)||ia(t)!=d5)return!1;var e=V2(t);if(e===null)return!0;var r=g5.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&nk.call(r)==y5}l(ok,"isPlainObject");var m5=ok,x5="[object Arguments]",b5="[object Array]",k5="[object Boolean]",C5="[object Date]",$5="[object Error]",w5="[object Function]",v5="[object Map]",_5="[object Number]",S5="[object Object]",T5="[object RegExp]",M5="[object Set]",B5="[object String]",A5="[object WeakMap]",L5="[object ArrayBuffer]",F5="[object DataView]",E5="[object Float32Array]",D5="[object Float64Array]",O5="[object Int8Array]",I5="[object Int16Array]",P5="[object Int32Array]",R5="[object Uint8Array]",N5="[object Uint8ClampedArray]",z5="[object Uint16Array]",q5="[object Uint32Array]",vt={};vt[E5]=vt[D5]=vt[O5]=vt[I5]=vt[P5]=vt[R5]=vt[N5]=vt[z5]=vt[q5]=!0;vt[x5]=vt[b5]=vt[L5]=vt[k5]=vt[F5]=vt[C5]=vt[$5]=vt[w5]=vt[v5]=vt[_5]=vt[S5]=vt[T5]=vt[M5]=vt[B5]=vt[A5]=!1;function sk(t){return Ln(t)&&tk(t.length)&&!!vt[ia(t)]}l(sk,"baseIsTypedArray");var W5=sk;function lk(t){return function(e){return t(e)}}l(lk,"baseUnary");var j5=lk,hk=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pa=hk&&typeof module=="object"&&module&&!module.nodeType&&module,H5=Pa&&Pa.exports===hk,Cl=H5&&t2.process,U5=(function(){try{var t=Pa&&Pa.require&&Pa.require("util").types;return t||Cl&&Cl.binding&&Cl.binding("util")}catch{}})(),vp=U5,_p=vp&&vp.isTypedArray,Y5=_p?j5(_p):W5,qu=Y5;function ck(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}l(ck,"safeGet");var Fh=ck,V5=Object.prototype,G5=V5.hasOwnProperty;function uk(t,e,r){var i=t[e];(!(G5.call(t,e)&&Os(i,r))||r===void 0&&!(e in t))&&Nu(t,e,r)}l(uk,"assignValue");var X5=uk;function dk(t,e,r,i){var a=!r;r||(r={});for(var n=-1,s=e.length;++n<s;){var o=e[n],c=i?i(r[o],t[o],o,r,t):void 0;c===void 0&&(c=t[o]),a?Nu(r,o,c):X5(r,o,c)}return r}l(dk,"copyObject");var Z5=dk;function pk(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}l(pk,"baseTimes");var Q5=pk,J5=9007199254740991,K5=/^(?:0|[1-9]\d*)$/;function fk(t,e){var r=typeof t;return e=e??J5,!!e&&(r=="number"||r!="symbol"&&K5.test(t))&&t>-1&&t%1==0&&t<e}l(fk,"isIndex");var gk=fk,tB=Object.prototype,eB=tB.hasOwnProperty;function yk(t,e){var r=ts(t),i=!r&&Ko(t),a=!r&&!i&&zu(t),n=!r&&!i&&!a&&qu(t),s=r||i||a||n,o=s?Q5(t.length,String):[],c=o.length;for(var h in t)(e||eB.call(t,h))&&!(s&&(h=="length"||a&&(h=="offset"||h=="parent")||n&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||gk(h,c)))&&o.push(h);return o}l(yk,"arrayLikeKeys");var rB=yk;function mk(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}l(mk,"nativeKeysIn");var iB=mk,aB=Object.prototype,nB=aB.hasOwnProperty;function xk(t){if(!Hr(t))return iB(t);var e=zs(t),r=[];for(var i in t)i=="constructor"&&(e||!nB.call(t,i))||r.push(i);return r}l(xk,"baseKeysIn");var oB=xk;function bk(t){return qs(t)?rB(t,!0):oB(t)}l(bk,"keysIn");var kk=bk;function Ck(t){return Z5(t,kk(t))}l(Ck,"toPlainObject");var sB=Ck;function $k(t,e,r,i,a,n,s){var o=Fh(t,r),c=Fh(e,r),h=s.get(c);if(h){Lh(t,r,h);return}var u=n?n(o,c,r+"",t,e,s):void 0,d=u===void 0;if(d){var p=ts(c),f=!p&&zu(c),g=!p&&!f&&qu(c);u=c,p||f||g?ts(o)?u=o:s5(o)?u=XM(o):f?(d=!1,u=UM(c,!0)):g?(d=!1,u=GM(c,!0)):u=[]:m5(c)||Ko(c)?(u=o,Ko(o)?u=sB(o):(!Hr(o)||Iu(o))&&(u=t5(c))):d=!1}d&&(s.set(c,u),a(u,c,i,n,s),s.delete(c)),Lh(t,r,u)}l($k,"baseMergeDeep");var lB=$k;function Wu(t,e,r,i,a){t!==e&&jM(e,function(n,s){if(a||(a=new NM),Hr(n))lB(t,e,s,r,Wu,i,a);else{var o=i?i(Fh(t,s),n,s+"",t,e,a):void 0;o===void 0&&(o=n),Lh(t,s,o)}},kk)}l(Wu,"baseMerge");var hB=Wu;function wk(t){return t}l(wk,"identity");var vk=wk;function _k(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}l(_k,"apply");var cB=_k,Sp=Math.max;function Sk(t,e,r){return e=Sp(e===void 0?t.length-1:e,0),function(){for(var i=arguments,a=-1,n=Sp(i.length-e,0),s=Array(n);++a<n;)s[a]=i[e+a];a=-1;for(var o=Array(e+1);++a<e;)o[a]=i[a];return o[e]=r(s),cB(t,this,o)}}l(Sk,"overRest");var uB=Sk,dB=Jo?function(t,e){return Jo(t,"toString",{configurable:!0,enumerable:!1,value:FM(e),writable:!0})}:vk,pB=dB,fB=800,gB=16,yB=Date.now;function Tk(t){var e=0,r=0;return function(){var i=yB(),a=gB-(i-r);if(r=i,a>0){if(++e>=fB)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}l(Tk,"shortOut");var mB=Tk,xB=mB(pB),bB=xB;function Mk(t,e){return bB(uB(t,e,vk),t+"")}l(Mk,"baseRest");var kB=Mk;function Bk(t,e,r){if(!Hr(r))return!1;var i=typeof e;return(i=="number"?qs(r)&&gk(e,r.length):i=="string"&&e in r)?Os(r[e],t):!1}l(Bk,"isIterateeCall");var CB=Bk;function Ak(t){return kB(function(e,r){var i=-1,a=r.length,n=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(n=t.length>3&&typeof n=="function"?(a--,n):void 0,s&&CB(r[0],r[1],s)&&(n=a<3?void 0:n,a=1),e=Object(e);++i<a;){var o=r[i];o&&t(e,o,i,n)}return e})}l(Ak,"createAssigner");var $B=Ak,wB=$B(function(t,e,r){hB(t,e,r)}),vB=wB,_B=Yp(B3()),SB="",TB={curveBasis:Io,curveBasisClosed:M0,curveBasisOpen:B0,curveBumpX:Qc,curveBumpY:Jc,curveBundle:x_,curveCardinalClosed:b_,curveCardinalOpen:k_,curveCardinal:A0,curveCatmullRomClosed:C_,curveCatmullRomOpen:$_,curveCatmullRom:L0,curveLinear:bi,curveLinearClosed:F0,curveMonotoneX:lu,curveMonotoneY:hu,curveNatural:uu,curveStep:du,curveStepAfter:fu,curveStepBefore:pu},MB=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,BB=l(function(t,e){let r=Lk(t,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let s=r.map(o=>o.args);zo(s),i=Dt(i,[...s])}else i=r.args;if(!i)return;let a=ku(t,e),n="config";return i[n]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[n],delete i[n]),i},"detectInit"),Lk=l(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${MB.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i,a=[];for(;(i=Ea.exec(t))!==null;)if(i.index===Ea.lastIndex&&Ea.lastIndex++,i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e)){let n=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:n,args:s})}return a.length===0?{type:t,args:null}:a.length===1?a[0]:a}catch(r){return P.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),AB=l(function(t){return t.replace(Ea,"")},"removeDirectives"),LB=l(function(t,e){for(let[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function ju(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return TB[r]??e}l(ju,"interpolateToCurve");function Fk(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,_B.sanitizeUrl)(r):r}l(Fk,"formatUrl");var FB=l((t,...e)=>{let r=t.split("."),i=r.length-1,a=r[i],n=window;for(let s=0;s<i;s++)if(n=n[r[s]],!n){P.error(`Function name: ${t} not found in window`);return}n[a](...e)},"runFunc");function Hu(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}l(Hu,"distance");function Ek(t){let e,r=0;t.forEach(a=>{r+=Hu(a,e),e=a});let i=r/2;return Uu(t,i)}l(Ek,"traverseEdge");function Dk(t){return t.length===1?t[0]:Ek(t)}l(Dk,"calcLabelPosition");var Tp=l((t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),Uu=l((t,e)=>{let r,i=e;for(let a of t){if(r){let n=Hu(a,r);if(n===0)return r;if(n<i)i-=n;else{let s=i/n;if(s<=0)return r;if(s>=1)return{x:a.x,y:a.y};if(s>0&&s<1)return{x:Tp((1-s)*r.x+s*a.x,5),y:Tp((1-s)*r.y+s*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),EB=l((t,e,r)=>{P.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=Uu(e,25),a=t?10:5,n=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(n)*a+(e[0].x+i.x)/2,s.y=-Math.cos(n)*a+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function Ok(t,e,r){let i=structuredClone(r);P.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();let a=25+t,n=Uu(i,a),s=10+t*.5,o=Math.atan2(i[0].y-n.y,i[0].x-n.x),c={x:0,y:0};return e==="start_left"?(c.x=Math.sin(o+Math.PI)*s+(i[0].x+n.x)/2,c.y=-Math.cos(o+Math.PI)*s+(i[0].y+n.y)/2):e==="end_right"?(c.x=Math.sin(o-Math.PI)*s+(i[0].x+n.x)/2-5,c.y=-Math.cos(o-Math.PI)*s+(i[0].y+n.y)/2-5):e==="end_left"?(c.x=Math.sin(o)*s+(i[0].x+n.x)/2-5,c.y=-Math.cos(o)*s+(i[0].y+n.y)/2-5):(c.x=Math.sin(o)*s+(i[0].x+n.x)/2,c.y=-Math.cos(o)*s+(i[0].y+n.y)/2),c}l(Ok,"calcTerminalLabelPosition");function Ik(t){let e="",r="";for(let i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}l(Ik,"getStylesFromArray");var Mp=0,DB=l(()=>(Mp++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Mp),"generateId");function Pk(t){let e="",r="0123456789abcdef",i=r.length;for(let a=0;a<t;a++)e+=r.charAt(Math.floor(Math.random()*i));return e}l(Pk,"makeRandomHex");var OB=l(t=>Pk(t.length),"random"),IB=l(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"),PB=l(function(t,e){let r=e.text.replace(Bn.lineBreakRegex," "),[,i]=Ws(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),e.class!==void 0&&a.attr("class",e.class);let n=a.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(r),a},"drawSimpleText"),RB=Ru((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Bn.lineBreakRegex.test(t)))return t;let i=t.split(" ").filter(Boolean),a=[],n="";return i.forEach((s,o)=>{let c=Ke(`${s} `,r),h=Ke(n,r);if(c>e){let{hyphenatedStrings:u,remainingWord:d}=NB(s,e,"-",r);a.push(n,...u),n=d}else h+c>=e?(a.push(n),n=s):n=[n,s].filter(Boolean).join(" ");o+1===i.length&&a.push(n)}),a.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),NB=Ru((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let a=[...t],n=[],s="";return a.forEach((o,c)=>{let h=`${s}${o}`;if(Ke(h,i)>=e){let u=c+1,d=a.length===u,p=`${h}${r}`;n.push(d?h:p),s=""}else s=h}),{hyphenatedStrings:n,remainingWord:s}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Rk(t,e){return Yu(t,e).height}l(Rk,"calculateTextHeight");function Ke(t,e){return Yu(t,e).width}l(Ke,"calculateTextWidth");var Yu=Ru((t,e)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};let[,n]=Ws(r),s=["sans-serif",i],o=t.split(Bn.lineBreakRegex),c=[],h=ut("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let u=h.append("svg");for(let p of s){let f=0,g={width:0,height:0,lineHeight:0};for(let y of o){let m=IB();m.text=y||SB;let x=PB(u,m).style("font-size",n).style("font-weight",a).style("font-family",p),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),f=Math.round(b.height),g.height+=f,g.lineHeight=Math.round(Math.max(g.lineHeight,f))}c.push(g)}u.remove();let d=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Fi,zB=(Fi=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},l(Fi,"InitIDGenerator"),Fi),Zn,qB=l(function(t){return Zn=Zn||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Zn.innerHTML=t,unescape(Zn.textContent)},"entityDecode");function Vu(t){return"str"in t}l(Vu,"isDetailedError");var WB=l((t,e,r,i)=>{if(!i)return;let a=t.node()?.getBBox();a&&t.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Ws=l(t=>{if(typeof t=="number")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 Gu(t,e){return vB({},t,e)}l(Gu,"cleanAndMerge");var ve={assignWithDepth:Dt,wrapLabel:RB,calculateTextHeight:Rk,calculateTextWidth:Ke,calculateTextDimensions:Yu,cleanAndMerge:Gu,detectInit:BB,detectDirective:Lk,isSubstringInArray:LB,interpolateToCurve:ju,calcLabelPosition:Dk,calcCardinalityPosition:EB,calcTerminalLabelPosition:Ok,formatUrl:Fk,getStylesFromArray:Ik,generateId:DB,random:OB,runFunc:FB,entityDecode:qB,insertTitle:WB,isLabelCoordinateInPath:Nk,parseFontSize:Ws,InitIDGenerator:zB},jB=l(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){let i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},"encodeEntities"),aa=l(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),BE=l((t,e,{counter:r=0,prefix:i,suffix:a},n)=>n||`${i?`${i}_`:""}${t}_${e}_${r}${a?`_${a}`:""}`,"getEdgeId");function Xt(t){return t??null}l(Xt,"handleUndefinedAttr");function Nk(t,e){let r=Math.round(t.x),i=Math.round(t.y),a=e.replace(/(\d+\.\d+)/g,n=>Math.round(parseFloat(n)).toString());return a.includes(r.toString())||a.includes(i.toString())}l(Nk,"isLabelCoordinateInPath");var Xu=l(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,i=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function zk(t,e){let r=t.getElementsByTagName("img");if(!r||r.length===0)return;let i=e.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(n=>{function s(){if(a.style.display="flex",a.style.flexDirection="column",i){let o=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,c=5,[h=rx.fontSize]=Ws(o),u=h*c+"px";a.style.minWidth=u,a.style.maxWidth=u}else a.style.width="100%";n(a)}l(s,"setupImage"),setTimeout(()=>{a.complete&&s()}),a.addEventListener("error",s),a.addEventListener("load",s)})))}l(zk,"configureLabelImages");function ko(t,e,r){if(t&&t.length){let[i,a]=e,n=Math.PI/180*r,s=Math.cos(n),o=Math.sin(n);for(let c of t){let[h,u]=c;c[0]=(h-i)*s-(u-a)*o+i,c[1]=(h-i)*o+(u-a)*s+a}}}l(ko,"t");function qk(t,e){return t[0]===e[0]&&t[1]===e[1]}l(qk,"e");function Wk(t,e,r,i=1){let a=r,n=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(a)for(let h of s)ko(h,o,a);let c=(function(h,u,d){let p=[];for(let b of h){let k=[...b];qk(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}let f=[];u=Math.max(u,.1);let g=[];for(let b of p)for(let k=0;k<b.length-1;k++){let _=b[k],w=b[k+1];if(_[1]!==w[1]){let $=Math.min(_[1],w[1]);g.push({ymin:$,ymax:Math.max(_[1],w[1]),x:$===_[1]?_[0]:w[0],islope:(w[0]-_[0])/(w[1]-_[1])})}}if(g.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!g.length)return f;let y=[],m=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>m);k++)b=k;g.splice(0,b+1).forEach((k=>{y.push({s:m,edge:k})}))}if(y=y.filter((b=>!(b.edge.ymax<=m))),y.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||x%u==0)&&y.length>1)for(let b=0;b<y.length;b+=2){let k=b+1;if(k>=y.length)break;let _=y[b].edge,w=y[k].edge;f.push([[Math.round(_.x),m],[Math.round(w.x),m]])}m+=d,y.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),x++}return f})(s,n,i);if(a){for(let h of s)ko(h,o,-a);(function(h,u,d){let p=[];h.forEach((f=>p.push(...f))),ko(p,u,d)})(c,o,-a)}return c}l(Wk,"s");function na(t,e){var r;let i=e.hachureAngle+90,a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(n=a),Wk(t,a,i,n||1)}l(na,"n");var Ei,Zu=(Ei=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let i=na(e,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(e,r){let i=[];for(let a of e)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}},l(Ei,"o"),Ei);function Fn(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}l(Fn,"a");var Di,HB=(Di=class extends Zu{fillPolygons(e,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=na(e,Object.assign({},r,{hachureGap:i})),n=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(n),c=.5*i*Math.sin(n);for(let[h,u]of a)Fn([h,u])&&s.push([[h[0]-o,h[1]+c],[...u]],[[h[0]+o,h[1]-c],[...u]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},l(Di,"h"),Di),Oi,UB=(Oi=class extends Zu{fillPolygons(e,r){let i=this._fillPolygons(e,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),n=this._fillPolygons(e,a);return i.ops=i.ops.concat(n.ops),i}},l(Oi,"r"),Oi),Ii,YB=(Ii=class{constructor(e){this.helper=e}fillPolygons(e,r){let i=na(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(e,r){let i=[],a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);let s=a/4;for(let o of e){let c=Fn(o),h=c/a,u=Math.ceil(h)-1,d=c-u*a,p=(o[0][0]+o[1][0])/2-a/4,f=Math.min(o[0][1],o[1][1]);for(let g=0;g<u;g++){let y=f+d+g*a,m=p-s+2*Math.random()*s,x=y-s+2*Math.random()*s,b=this.helper.ellipse(m,x,n,n,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}},l(Ii,"i"),Ii),Pi,VB=(Pi=class{constructor(e){this.helper=e}fillPolygons(e,r){let i=na(e,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(e,r){let i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,n=[];return e.forEach((s=>{let o=Fn(s),c=Math.floor(o/(i+a)),h=(o+a-c*(i+a))/2,u=s[0],d=s[1];u[0]>d[0]&&(u=s[1],d=s[0]);let p=Math.atan((d[1]-u[1])/(d[0]-u[0]));for(let f=0;f<c;f++){let g=f*(i+a),y=g+i,m=[u[0]+g*Math.cos(p)+h*Math.cos(p),u[1]+g*Math.sin(p)+h*Math.sin(p)],x=[u[0]+y*Math.cos(p)+h*Math.cos(p),u[1]+y*Math.sin(p)+h*Math.sin(p)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],r))}})),n}},l(Pi,"c"),Pi),Ri,GB=(Ri=class{constructor(e){this.helper=e}fillPolygons(e,r){let i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,n=na(e,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(n,a,r)}}zigzagLines(e,r,i){let a=[];return e.forEach((n=>{let s=Fn(n),o=Math.round(s/(2*r)),c=n[0],h=n[1];c[0]>h[0]&&(c=n[1],h=n[0]);let u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let d=0;d<o;d++){let p=2*d*r,f=2*(d+1)*r,g=Math.sqrt(2*Math.pow(r,2)),y=[c[0]+p*Math.cos(u),c[1]+p*Math.sin(u)],m=[c[0]+f*Math.cos(u),c[1]+f*Math.sin(u)],x=[y[0]+g*Math.cos(u+Math.PI/4),y[1]+g*Math.sin(u+Math.PI/4)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],m[0],m[1],i))}})),a}},l(Ri,"l"),Ri),ae={},Ni,XB=(Ni=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},l(Ni,"p"),Ni),ZB=0,$l=1,Bp=2,Qn={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Co(t,e){return t.type===e}l(Co,"k");function js(t){let e=[],r=(function(s){let o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:ZB,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:$l,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:Bp,text:""},o})(t),i="BOD",a=0,n=r[a];for(;!Co(n,Bp);){let s=0,o=[];if(i==="BOD"){if(n.text!=="M"&&n.text!=="m")return js("M0,0"+t);a++,s=Qn[n.text],i=n.text}else Co(n,$l)?s=Qn[i]:(a++,s=Qn[n.text],i=n.text);if(!(a+s<r.length))throw new Error("Path data ended short");for(let c=a;c<a+s;c++){let h=r[c];if(!Co(h,$l))throw new Error("Param not a number: "+i+","+h.text);o[o.length]=+h.text}if(typeof Qn[i]!="number")throw new Error("Bad segment: "+i);{let c={key:i,data:o};e.push(c),a+=s,n=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return e}l(js,"b");function Qu(t){let e=0,r=0,i=0,a=0,n=[];for(let{key:s,data:o}of t)switch(s){case"M":n.push({key:"M",data:[...o]}),[e,r]=o,[i,a]=o;break;case"m":e+=o[0],r+=o[1],n.push({key:"M",data:[e,r]}),i=e,a=r;break;case"L":n.push({key:"L",data:[...o]}),[e,r]=o;break;case"l":e+=o[0],r+=o[1],n.push({key:"L",data:[e,r]});break;case"C":n.push({key:"C",data:[...o]}),e=o[4],r=o[5];break;case"c":{let c=o.map(((h,u)=>u%2?h+r:h+e));n.push({key:"C",data:c}),e=c[4],r=c[5];break}case"Q":n.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{let c=o.map(((h,u)=>u%2?h+r:h+e));n.push({key:"Q",data:c}),e=c[2],r=c[3];break}case"A":n.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],n.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":n.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{let c=o.map(((h,u)=>u%2?h+r:h+e));n.push({key:"S",data:c}),e=c[2],r=c[3];break}case"T":n.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=a}return n}l(Qu,"y");function Ju(t){let e=[],r="",i=0,a=0,n=0,s=0,o=0,c=0;for(let{key:h,data:u}of t){switch(h){case"M":e.push({key:"M",data:[...u]}),[i,a]=u,[n,s]=u;break;case"C":e.push({key:"C",data:[...u]}),i=u[4],a=u[5],o=u[2],c=u[3];break;case"L":e.push({key:"L",data:[...u]}),[i,a]=u;break;case"H":i=u[0],e.push({key:"L",data:[i,a]});break;case"V":a=u[0],e.push({key:"L",data:[i,a]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=i+(i-o),p=a+(a-c)):(d=i,p=a),e.push({key:"C",data:[d,p,...u]}),o=u[0],c=u[1],i=u[2],a=u[3];break}case"T":{let[d,p]=u,f=0,g=0;r==="Q"||r==="T"?(f=i+(i-o),g=a+(a-c)):(f=i,g=a);let y=i+2*(f-i)/3,m=a+2*(g-a)/3,x=d+2*(f-d)/3,b=p+2*(g-p)/3;e.push({key:"C",data:[y,m,x,b,d,p]}),o=f,c=g,i=d,a=p;break}case"Q":{let[d,p,f,g]=u,y=i+2*(d-i)/3,m=a+2*(p-a)/3,x=f+2*(d-f)/3,b=g+2*(p-g)/3;e.push({key:"C",data:[y,m,x,b,f,g]}),o=d,c=p,i=f,a=g;break}case"A":{let d=Math.abs(u[0]),p=Math.abs(u[1]),f=u[2],g=u[3],y=u[4],m=u[5],x=u[6];d===0||p===0?(e.push({key:"C",data:[i,a,m,x,m,x]}),i=m,a=x):(i!==m||a!==x)&&(Ku(i,a,m,x,d,p,f,g,y).forEach((function(b){e.push({key:"C",data:b})})),i=m,a=x);break}case"Z":e.push({key:"Z",data:[]}),i=n,a=s}r=h}return e}l(Ju,"m");function hi(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}l(hi,"w");function Ku(t,e,r,i,a,n,s,o,c,h){let u=(d=s,Math.PI*d/180);var d;let p=[],f=0,g=0,y=0,m=0;if(h)[f,g,y,m]=h;else{[t,e]=hi(t,e,-u),[r,i]=hi(r,i,-u);let A=(t-r)/2,B=(e-i)/2,L=A*A/(a*a)+B*B/(n*n);L>1&&(L=Math.sqrt(L),a*=L,n*=L);let M=a*a,E=n*n,F=M*E-M*B*B-E*A*A,z=M*B*B+E*A*A,V=(o===c?-1:1)*Math.sqrt(Math.abs(F/z));y=V*a*B/n+(t+r)/2,m=V*-n*A/a+(e+i)/2,f=Math.asin(parseFloat(((e-m)/n).toFixed(9))),g=Math.asin(parseFloat(((i-m)/n).toFixed(9))),t<y&&(f=Math.PI-f),r<y&&(g=Math.PI-g),f<0&&(f=2*Math.PI+f),g<0&&(g=2*Math.PI+g),c&&f>g&&(f-=2*Math.PI),!c&&g>f&&(g-=2*Math.PI)}let x=g-f;if(Math.abs(x)>120*Math.PI/180){let A=g,B=r,L=i;g=c&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=Ku(r=y+a*Math.cos(g),i=m+n*Math.sin(g),B,L,a,n,s,0,c,[g,A,y,m])}x=g-f;let b=Math.cos(f),k=Math.sin(f),_=Math.cos(g),w=Math.sin(g),$=Math.tan(x/4),T=4/3*a*$,O=4/3*n*$,R=[t,e],I=[t+T*k,e-O*b],S=[r+T*w,i-O*_],D=[r,i];if(I[0]=2*R[0]-I[0],I[1]=2*R[1]-I[1],h)return[I,S,D].concat(p);{p=[I,S,D].concat(p);let A=[];for(let B=0;B<p.length;B+=3){let L=hi(p[B][0],p[B][1],u),M=hi(p[B+1][0],p[B+1][1],u),E=hi(p[B+2][0],p[B+2][1],u);A.push([L[0],L[1],M[0],M[1],E[0],E[1]])}return A}}l(Ku,"x");var QB={randOffset:l(function(t,e){return nt(t,e)},"randOffset"),randOffsetWithRange:l(function(t,e,r){return pn(t,e,r)},"randOffsetWithRange"),ellipse:l(function(t,e,r,i,a){let n=ed(r,i,a);return es(t,e,a,n).opset},"ellipse"),doubleLineOps:l(function(t,e,r,i,a){return tr(t,e,r,i,a,!0)},"doubleLineOps")};function td(t,e,r,i,a){return{type:"path",ops:tr(t,e,r,i,a)}}l(td,"v");function Ra(t,e,r){let i=(t||[]).length;if(i>2){let a=[];for(let n=0;n<i-1;n++)a.push(...tr(t[n][0],t[n][1],t[n+1][0],t[n+1][1],r));return e&&a.push(...tr(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:a}}return i===2?td(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}l(Ra,"S");function jk(t,e,r,i,a){return(function(n,s){return Ra(n,!0,s)})([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],a)}l(jk,"O");function Eh(t,e){if(t.length){let r=typeof t[0][0]=="number"?[t]:t,i=Sa(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:Sa(r[0],1.5*(1+.22*e.roughness),Ih(e));for(let n=1;n<r.length;n++){let s=r[n];if(s.length){let o=Sa(s,1*(1+.2*e.roughness),e),c=e.disableMultiStroke?[]:Sa(s,1.5*(1+.22*e.roughness),Ih(e));for(let h of o)h.op!=="move"&&i.push(h);for(let h of c)h.op!=="move"&&a.push(h)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}l(Eh,"L");function ed(t,e,r){let i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/a,s=Math.abs(t/2),o=Math.abs(e/2),c=1-r.curveFitting;return s+=nt(s*c,r),o+=nt(o*c,r),{increment:n,rx:s,ry:o}}l(ed,"T");function es(t,e,r,i){let[a,n]=Ph(i.increment,t,e,i.rx,i.ry,1,i.increment*pn(.1,pn(.4,1,r),r),r),s=fn(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){let[o]=Ph(i.increment,t,e,i.rx,i.ry,1.5,0,r),c=fn(o,null,r);s=s.concat(c)}return{estimatedPoints:n,opset:{type:"path",ops:s}}}l(es,"D");function Dh(t,e,r,i,a,n,s,o,c){let h=t,u=e,d=Math.abs(r/2),p=Math.abs(i/2);d+=nt(.01*d,c),p+=nt(.01*p,c);let f=a,g=n;for(;f<0;)f+=2*Math.PI,g+=2*Math.PI;g-f>2*Math.PI&&(f=0,g=2*Math.PI);let y=2*Math.PI/c.curveStepCount,m=Math.min(y/2,(g-f)/2),x=Rh(m,h,u,d,p,f,g,1,c);if(!c.disableMultiStroke){let b=Rh(m,h,u,d,p,f,g,1.5,c);x.push(...b)}return s&&(o?x.push(...tr(h,u,h+d*Math.cos(f),u+p*Math.sin(f),c),...tr(h,u,h+d*Math.cos(g),u+p*Math.sin(g),c)):x.push({op:"lineTo",data:[h,u]},{op:"lineTo",data:[h+d*Math.cos(f),u+p*Math.sin(f)]})),{type:"path",ops:x}}l(Dh,"A");function Oh(t,e){let r=Ju(Qu(js(t))),i=[],a=[0,0],n=[0,0];for(let{key:s,data:o}of r)switch(s){case"M":n=[o[0],o[1]],a=[o[0],o[1]];break;case"L":i.push(...tr(n[0],n[1],o[0],o[1],e)),n=[o[0],o[1]];break;case"C":{let[c,h,u,d,p,f]=o;i.push(...Hk(c,h,u,d,p,f,n,e)),n=[p,f];break}case"Z":i.push(...tr(n[0],n[1],a[0],a[1],e)),n=[a[0],a[1]]}return{type:"path",ops:i}}l(Oh,"_");function $o(t,e){let r=[];for(let i of t)if(i.length){let a=e.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+nt(a,e),i[0][1]+nt(a,e)]});for(let s=1;s<n;s++)r.push({op:"lineTo",data:[i[s][0]+nt(a,e),i[s][1]+nt(a,e)]})}}return{type:"fillPath",ops:r}}l($o,"I");function Tr(t,e){return(function(r,i){let a=r.fillStyle||"hachure";if(!ae[a])switch(a){case"zigzag":ae[a]||(ae[a]=new HB(i));break;case"cross-hatch":ae[a]||(ae[a]=new UB(i));break;case"dots":ae[a]||(ae[a]=new YB(i));break;case"dashed":ae[a]||(ae[a]=new VB(i));break;case"zigzag-line":ae[a]||(ae[a]=new GB(i));break;default:a="hachure",ae[a]||(ae[a]=new Zu(i))}return ae[a]})(e,QB).fillPolygons(t,e)}l(Tr,"C");function Ih(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}l(Ih,"z");function rd(t){return t.randomizer||(t.randomizer=new XB(t.seed||0)),t.randomizer.next()}l(rd,"W");function pn(t,e,r,i=1){return r.roughness*i*(rd(r)*(e-t)+t)}l(pn,"E");function nt(t,e,r=1){return pn(-t,t,e,r)}l(nt,"G");function tr(t,e,r,i,a,n=!1){let s=n?a.disableMultiStrokeFill:a.disableMultiStroke,o=rs(t,e,r,i,a,!0,!1);if(s)return o;let c=rs(t,e,r,i,a,!0,!0);return o.concat(c)}l(tr,"$");function rs(t,e,r,i,a,n,s){let o=Math.pow(t-r,2)+Math.pow(e-i,2),c=Math.sqrt(o),h=1;h=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=a.maxRandomnessOffset||0;u*u*100>o&&(u=c/10);let d=u/2,p=.2+.2*rd(a),f=a.bowing*a.maxRandomnessOffset*(i-e)/200,g=a.bowing*a.maxRandomnessOffset*(t-r)/200;f=nt(f,a,h),g=nt(g,a,h);let y=[],m=l(()=>nt(d,a,h),"M"),x=l(()=>nt(u,a,h),"k"),b=a.preserveVertices;return n&&(s?y.push({op:"move",data:[t+(b?0:m()),e+(b?0:m())]}):y.push({op:"move",data:[t+(b?0:nt(u,a,h)),e+(b?0:nt(u,a,h))]})),s?y.push({op:"bcurveTo",data:[f+t+(r-t)*p+m(),g+e+(i-e)*p+m(),f+t+2*(r-t)*p+m(),g+e+2*(i-e)*p+m(),r+(b?0:m()),i+(b?0:m())]}):y.push({op:"bcurveTo",data:[f+t+(r-t)*p+x(),g+e+(i-e)*p+x(),f+t+2*(r-t)*p+x(),g+e+2*(i-e)*p+x(),r+(b?0:x()),i+(b?0:x())]}),y}l(rs,"R");function Sa(t,e,r){if(!t.length)return[];let i=[];i.push([t[0][0]+nt(e,r),t[0][1]+nt(e,r)]),i.push([t[0][0]+nt(e,r),t[0][1]+nt(e,r)]);for(let a=1;a<t.length;a++)i.push([t[a][0]+nt(e,r),t[a][1]+nt(e,r)]),a===t.length-1&&i.push([t[a][0]+nt(e,r),t[a][1]+nt(e,r)]);return fn(i,null,r)}l(Sa,"j");function fn(t,e,r){let i=t.length,a=[];if(i>3){let n=[],s=1-r.curveTightness;a.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+2<i;o++){let c=t[o];n[0]=[c[0],c[1]],n[1]=[c[0]+(s*t[o+1][0]-s*t[o-1][0])/6,c[1]+(s*t[o+1][1]-s*t[o-1][1])/6],n[2]=[t[o+1][0]+(s*t[o][0]-s*t[o+2][0])/6,t[o+1][1]+(s*t[o][1]-s*t[o+2][1])/6],n[3]=[t[o+1][0],t[o+1][1]],a.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}if(e&&e.length===2){let o=r.maxRandomnessOffset;a.push({op:"lineTo",data:[e[0]+nt(o,r),e[1]+nt(o,r)]})}}else i===3?(a.push({op:"move",data:[t[1][0],t[1][1]]}),a.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):i===2&&a.push(...rs(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return a}l(fn,"q");function Ph(t,e,r,i,a,n,s,o){let c=[],h=[];if(o.roughness===0){t/=4,h.push([e+i*Math.cos(-t),r+a*Math.sin(-t)]);for(let u=0;u<=2*Math.PI;u+=t){let d=[e+i*Math.cos(u),r+a*Math.sin(u)];c.push(d),h.push(d)}h.push([e+i*Math.cos(0),r+a*Math.sin(0)]),h.push([e+i*Math.cos(t),r+a*Math.sin(t)])}else{let u=nt(.5,o)-Math.PI/2;h.push([nt(n,o)+e+.9*i*Math.cos(u-t),nt(n,o)+r+.9*a*Math.sin(u-t)]);let d=2*Math.PI+u-.01;for(let p=u;p<d;p+=t){let f=[nt(n,o)+e+i*Math.cos(p),nt(n,o)+r+a*Math.sin(p)];c.push(f),h.push(f)}h.push([nt(n,o)+e+i*Math.cos(u+2*Math.PI+.5*s),nt(n,o)+r+a*Math.sin(u+2*Math.PI+.5*s)]),h.push([nt(n,o)+e+.98*i*Math.cos(u+s),nt(n,o)+r+.98*a*Math.sin(u+s)]),h.push([nt(n,o)+e+.9*i*Math.cos(u+.5*s),nt(n,o)+r+.9*a*Math.sin(u+.5*s)])}return[h,c]}l(Ph,"F");function Rh(t,e,r,i,a,n,s,o,c){let h=n+nt(.1,c),u=[];u.push([nt(o,c)+e+.9*i*Math.cos(h-t),nt(o,c)+r+.9*a*Math.sin(h-t)]);for(let d=h;d<=s;d+=t)u.push([nt(o,c)+e+i*Math.cos(d),nt(o,c)+r+a*Math.sin(d)]);return u.push([e+i*Math.cos(s),r+a*Math.sin(s)]),u.push([e+i*Math.cos(s),r+a*Math.sin(s)]),fn(u,null,c)}l(Rh,"V");function Hk(t,e,r,i,a,n,s,o){let c=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3],u=[0,0],d=o.disableMultiStroke?1:2,p=o.preserveVertices;for(let f=0;f<d;f++)f===0?c.push({op:"move",data:[s[0],s[1]]}):c.push({op:"move",data:[s[0]+(p?0:nt(h[0],o)),s[1]+(p?0:nt(h[0],o))]}),u=p?[a,n]:[a+nt(h[f],o),n+nt(h[f],o)],c.push({op:"bcurveTo",data:[t+nt(h[f],o),e+nt(h[f],o),r+nt(h[f],o),i+nt(h[f],o),u[0],u[1]]});return c}l(Hk,"Z");function ci(t){return[...t]}l(ci,"Q");function Nh(t,e=0){let r=t.length;if(r<3)throw new Error("A curve must have at least three points.");let i=[];if(r===3)i.push(ci(t[0]),ci(t[1]),ci(t[2]),ci(t[2]));else{let a=[];a.push(t[0],t[0]);for(let o=1;o<t.length;o++)a.push(t[o]),o===t.length-1&&a.push(t[o]);let n=[],s=1-e;i.push(ci(a[0]));for(let o=1;o+2<a.length;o++){let c=a[o];n[0]=[c[0],c[1]],n[1]=[c[0]+(s*a[o+1][0]-s*a[o-1][0])/6,c[1]+(s*a[o+1][1]-s*a[o-1][1])/6],n[2]=[a[o+1][0]+(s*a[o][0]-s*a[o+2][0])/6,a[o+1][1]+(s*a[o][1]-s*a[o+2][1])/6],n[3]=[a[o+1][0],a[o+1][1]],i.push(n[1],n[2],n[3])}}return i}l(Nh,"H");function Na(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}l(Na,"N");function Uk(t,e,r){let i=Na(e,r);if(i===0)return Na(t,e);let a=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return a=Math.max(0,Math.min(1,a)),Na(t,nr(e,r,a))}l(Uk,"B");function nr(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}l(nr,"J");function is(t,e,r,i){let a=i||[];if((function(o,c){let h=o[c+0],u=o[c+1],d=o[c+2],p=o[c+3],f=3*u[0]-2*h[0]-p[0];f*=f;let g=3*u[1]-2*h[1]-p[1];g*=g;let y=3*d[0]-2*p[0]-h[0];y*=y;let m=3*d[1]-2*p[1]-h[1];return m*=m,f<y&&(f=y),g<m&&(g=m),f+g})(t,e)<r){let o=t[e+0];a.length?(n=a[a.length-1],s=o,Math.sqrt(Na(n,s))>1&&a.push(o)):a.push(o),a.push(t[e+3])}else{let o=t[e+0],c=t[e+1],h=t[e+2],u=t[e+3],d=nr(o,c,.5),p=nr(c,h,.5),f=nr(h,u,.5),g=nr(d,p,.5),y=nr(p,f,.5),m=nr(g,y,.5);is([o,d,g,m],0,r,a),is([m,y,f,u],0,r,a)}var n,s;return a}l(is,"K");function Yk(t,e){return gn(t,0,t.length,e)}l(Yk,"U");function gn(t,e,r,i,a){let n=a||[],s=t[e],o=t[r-1],c=0,h=1;for(let u=e+1;u<r-1;++u){let d=Uk(t[u],s,o);d>c&&(c=d,h=u)}return Math.sqrt(c)>i?(gn(t,e,h+1,i,n),gn(t,h,r,i,n)):(n.length||n.push(s),n.push(o)),n}l(gn,"X");function wo(t,e=.15,r){let i=[],a=(t.length-1)/3;for(let n=0;n<a;n++)is(t,3*n,e,i);return r&&r>0?gn(i,0,i.length,r):i}l(wo,"Y");var le="none",zi,as=(zi=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,i){return{shape:e,sets:r||[],options:i||this.defaultOptions}}line(e,r,i,a,n){let s=this._o(n);return this._d("line",[td(e,r,i,a,s)],s)}rectangle(e,r,i,a,n){let s=this._o(n),o=[],c=jk(e,r,i,a,s);if(s.fill){let h=[[e,r],[e+i,r],[e+i,r+a],[e,r+a]];s.fillStyle==="solid"?o.push($o([h],s)):o.push(Tr([h],s))}return s.stroke!==le&&o.push(c),this._d("rectangle",o,s)}ellipse(e,r,i,a,n){let s=this._o(n),o=[],c=ed(i,a,s),h=es(e,r,s,c);if(s.fill)if(s.fillStyle==="solid"){let u=es(e,r,s,c).opset;u.type="fillPath",o.push(u)}else o.push(Tr([h.estimatedPoints],s));return s.stroke!==le&&o.push(h.opset),this._d("ellipse",o,s)}circle(e,r,i,a){let n=this.ellipse(e,r,i,i,a);return n.shape="circle",n}linearPath(e,r){let i=this._o(r);return this._d("linearPath",[Ra(e,!1,i)],i)}arc(e,r,i,a,n,s,o=!1,c){let h=this._o(c),u=[],d=Dh(e,r,i,a,n,s,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){let p=Object.assign({},h);p.disableMultiStroke=!0;let f=Dh(e,r,i,a,n,s,!0,!1,p);f.type="fillPath",u.push(f)}else u.push((function(p,f,g,y,m,x,b){let k=p,_=f,w=Math.abs(g/2),$=Math.abs(y/2);w+=nt(.01*w,b),$+=nt(.01*$,b);let T=m,O=x;for(;T<0;)T+=2*Math.PI,O+=2*Math.PI;O-T>2*Math.PI&&(T=0,O=2*Math.PI);let R=(O-T)/b.curveStepCount,I=[];for(let S=T;S<=O;S+=R)I.push([k+w*Math.cos(S),_+$*Math.sin(S)]);return I.push([k+w*Math.cos(O),_+$*Math.sin(O)]),I.push([k,_]),Tr([I],b)})(e,r,i,a,n,s,h));return h.stroke!==le&&u.push(d),this._d("arc",u,h)}curve(e,r){let i=this._o(r),a=[],n=Eh(e,i);if(i.fill&&i.fill!==le)if(i.fillStyle==="solid"){let s=Eh(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],o=e;if(o.length){let c=typeof o[0][0]=="number"?[o]:o;for(let h of c)h.length<3?s.push(...h):h.length===3?s.push(...wo(Nh([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):s.push(...wo(Nh(h),10,(1+i.roughness)/2))}s.length&&a.push(Tr([s],i))}return i.stroke!==le&&a.push(n),this._d("curve",a,i)}polygon(e,r){let i=this._o(r),a=[],n=Ra(e,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push($o([e],i)):a.push(Tr([e],i))),i.stroke!==le&&a.push(n),this._d("polygon",a,i)}path(e,r){let i=this._o(r),a=[];if(!e)return this._d("path",a,i);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let n=i.fill&&i.fill!=="transparent"&&i.fill!==le,s=i.stroke!==le,o=!!(i.simplification&&i.simplification<1),c=(function(u,d,p){let f=Ju(Qu(js(u))),g=[],y=[],m=[0,0],x=[],b=l(()=>{x.length>=4&&y.push(...wo(x,d)),x=[]},"i"),k=l(()=>{b(),y.length&&(g.push(y),y=[])},"c");for(let{key:w,data:$}of f)switch(w){case"M":k(),m=[$[0],$[1]],y.push(m);break;case"L":b(),y.push([$[0],$[1]]);break;case"C":if(!x.length){let T=y.length?y[y.length-1]:m;x.push([T[0],T[1]])}x.push([$[0],$[1]]),x.push([$[2],$[3]]),x.push([$[4],$[5]]);break;case"Z":b(),y.push([m[0],m[1]])}if(k(),!p)return g;let _=[];for(let w of g){let $=Yk(w,p);$.length&&_.push($)}return _})(e,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=Oh(e,i);if(n)if(i.fillStyle==="solid")if(c.length===1){let u=Oh(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else a.push($o(c,i));else a.push(Tr(c,i));return s&&(o?c.forEach((u=>{a.push(Ra(u,!1,i))})):a.push(h)),this._d("path",a,i)}opsToPath(e,r){let i="";for(let a of e.ops){let n=typeof r=="number"&&r>=0?a.data.map((s=>+s.toFixed(r))):a.data;switch(a.op){case"move":i+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":i+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":i+=`L${n[0]} ${n[1]} `}}return i.trim()}toPaths(e){let r=e.sets||[],i=e.options||this.defaultOptions,a=[];for(let n of r){let s=null;switch(n.type){case"path":s={d:this.opsToPath(n),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:le};break;case"fillPath":s={d:this.opsToPath(n),stroke:le,strokeWidth:0,fill:i.fill||le};break;case"fillSketch":s=this.fillSketch(n,i)}s&&a.push(s)}return a}fillSketch(e,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||le,strokeWidth:i,fill:le}}_mergedShape(e){return e.filter(((r,i)=>i===0||r.op!=="move"))}},l(zi,"et"),zi),qi,JB=(qi=class{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new as(r)}draw(e){let r=e.sets||[],i=e.options||this.getDefaultOptions(),a=this.ctx,n=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,s,n),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";let o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,s,n,o),a.restore();break}case"fillSketch":this.fillSketch(a,s,i)}}fillSketch(e,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),e.save(),i.fillLineDash&&e.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(e.lineDashOffset=i.fillLineDashOffset),e.strokeStyle=i.fill||"",e.lineWidth=a,this._drawToContext(e,r,i.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,i,a="nonzero"){e.beginPath();for(let n of r.ops){let s=typeof i=="number"&&i>=0?n.data.map((o=>+o.toFixed(i))):n.data;switch(n.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(a):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,i,a,n){let s=this.gen.line(e,r,i,a,n);return this.draw(s),s}rectangle(e,r,i,a,n){let s=this.gen.rectangle(e,r,i,a,n);return this.draw(s),s}ellipse(e,r,i,a,n){let s=this.gen.ellipse(e,r,i,a,n);return this.draw(s),s}circle(e,r,i,a){let n=this.gen.circle(e,r,i,a);return this.draw(n),n}linearPath(e,r){let i=this.gen.linearPath(e,r);return this.draw(i),i}polygon(e,r){let i=this.gen.polygon(e,r);return this.draw(i),i}arc(e,r,i,a,n,s,o=!1,c){let h=this.gen.arc(e,r,i,a,n,s,o,c);return this.draw(h),h}curve(e,r){let i=this.gen.curve(e,r);return this.draw(i),i}path(e,r){let i=this.gen.path(e,r);return this.draw(i),i}},l(qi,"st"),qi),Jn="http://www.w3.org/2000/svg",Wi,KB=(Wi=class{constructor(e,r){this.svg=e,this.gen=new as(r)}draw(e){let r=e.sets||[],i=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,n=a.createElementNS(Jn,"g"),s=e.options.fixedDecimalPlaceDigits;for(let o of r){let c=null;switch(o.type){case"path":c=a.createElementNS(Jn,"path"),c.setAttribute("d",this.opsToPath(o,s)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=a.createElementNS(Jn,"path"),c.setAttribute("d",this.opsToPath(o,s)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(a,o,i)}c&&n.appendChild(c)}return n}fillSketch(e,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);let n=e.createElementNS(Jn,"path");return n.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),n.setAttribute("stroke",i.fill||""),n.setAttribute("stroke-width",a+""),n.setAttribute("fill","none"),i.fillLineDash&&n.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,i,a,n){let s=this.gen.line(e,r,i,a,n);return this.draw(s)}rectangle(e,r,i,a,n){let s=this.gen.rectangle(e,r,i,a,n);return this.draw(s)}ellipse(e,r,i,a,n){let s=this.gen.ellipse(e,r,i,a,n);return this.draw(s)}circle(e,r,i,a){let n=this.gen.circle(e,r,i,a);return this.draw(n)}linearPath(e,r){let i=this.gen.linearPath(e,r);return this.draw(i)}polygon(e,r){let i=this.gen.polygon(e,r);return this.draw(i)}arc(e,r,i,a,n,s,o=!1,c){let h=this.gen.arc(e,r,i,a,n,s,o,c);return this.draw(h)}curve(e,r){let i=this.gen.curve(e,r);return this.draw(i)}path(e,r){let i=this.gen.path(e,r);return this.draw(i)}},l(Wi,"ot"),Wi),Q={canvas:l((t,e)=>new JB(t,e),"canvas"),svg:l((t,e)=>new KB(t,e),"svg"),generator:l(t=>new as(t),"generator"),newSeed:l(()=>as.newSeed(),"newSeed")},tA=l(t=>{let{handDrawnSeed:e}=xt();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),oa=l(t=>{let e=eA([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),eA=l(t=>{let e=new Map;return t.forEach(r=>{let[i,a]=r.split(":");e.set(i.trim(),a?.trim())}),e},"styles2Map"),Vk=l(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),K=l(t=>{let{stylesArray:e}=oa(t),r=[],i=[],a=[],n=[];return e.forEach(s=>{let o=s[0];Vk(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&a.push(s.join(":")+" !important"),o==="fill"&&n.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:n}},"styles2String"),J=l((t,e)=>{let{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:a,mainBkg:n}=r,{stylesMap:s}=oa(t);return Object.assign({roughness:.7,fill:s.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||a,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:rA(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),rA=l(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let a=isNaN(e[0])?0:e[0];return[a,a]}let r=isNaN(e[0])?0:e[0],i=isNaN(e[1])?0:e[1];return[r,i]},"getStrokeDashArray"),iA=Object.freeze({left:0,top:0,width:16,height:16}),ns=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Gk=Object.freeze({...iA,...ns}),aA=Object.freeze({...Gk,body:"",hidden:!1}),nA=Object.freeze({width:null,height:null}),oA=Object.freeze({...nA,...ns}),sA=l((t,e,r,i="")=>{let a=t.split(":");if(t.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){let o=a.pop(),c=a.pop(),h={provider:a.length>0?a[0]:i,prefix:c,name:o};return e&&!wl(h)?null:h}let n=a[0],s=n.split("-");if(s.length>1){let o={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!wl(o)?null:o}if(r&&i===""){let o={provider:i,prefix:"",name:n};return e&&!wl(o,r)?null:o}return null},"stringToIcon"),wl=l((t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1,"validateIconName");function Xk(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}l(Xk,"mergeIconTransformations");function zh(t,e){let r=Xk(t,e);for(let i in aA)i in ns?i in t&&!(i in r)&&(r[i]=ns[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}l(zh,"mergeIconData");function Zk(t,e){let r=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);function n(s){if(r[s])return a[s]=[];if(!(s in a)){a[s]=null;let o=i[s]&&i[s].parent,c=o&&n(o);c&&(a[s]=[o].concat(c))}return a[s]}return l(n,"resolve"),(e||Object.keys(r).concat(Object.keys(i))).forEach(n),a}l(Zk,"getIconsTree");function qh(t,e,r){let i=t.icons,a=t.aliases||Object.create(null),n={};function s(o){n=zh(i[o]||a[o],n)}return l(s,"parse"),s(e),r.forEach(s),zh(t,n)}l(qh,"internalGetIconData");function Qk(t,e){if(t.icons[e])return qh(t,e,[]);let r=Zk(t,[e])[e];return r?qh(t,e,r):null}l(Qk,"getIconData");var lA=/(-?[0-9.]*[0-9]+[0-9.]*)/g,hA=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Wh(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;let i=t.split(lA);if(i===null||!i.length)return t;let a=[],n=i.shift(),s=hA.test(n);for(;;){if(s){let o=parseFloat(n);isNaN(o)?a.push(n):a.push(Math.ceil(o*e*r)/r)}else a.push(n);if(n=i.shift(),n===void 0)return a.join("");s=!s}}l(Wh,"calculateSize");function Jk(t,e="defs"){let r="",i=t.indexOf("<"+e);for(;i>=0;){let a=t.indexOf(">",i),n=t.indexOf("</"+e);if(a===-1||n===-1)break;let s=t.indexOf(">",n);if(s===-1)break;r+=t.slice(a+1,n).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}l(Jk,"splitSVGDefs");function Kk(t,e){return t?"<defs>"+t+"</defs>"+e:e}l(Kk,"mergeDefsAndContent");function tC(t,e,r){let i=Jk(t);return Kk(i.defs,e+i.content+r)}l(tC,"wrapSVGContent");var cA=l(t=>t==="unset"||t==="undefined"||t==="none","isUnsetKeyword");function eC(t,e){let r={...Gk,...t},i={...oA,...e},a={left:r.left,top:r.top,width:r.width,height:r.height},n=r.body;[r,i].forEach(y=>{let m=[],x=y.hFlip,b=y.vFlip,k=y.rotate;x?b?k+=2:(m.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),m.push("scale(-1 1)"),a.top=a.left=0):b&&(m.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),m.push("scale(1 -1)"),a.top=a.left=0);let _;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:_=a.height/2+a.top,m.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:m.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:_=a.width/2+a.left,m.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}k%2===1&&(a.left!==a.top&&(_=a.left,a.left=a.top,a.top=_),a.width!==a.height&&(_=a.width,a.width=a.height,a.height=_)),m.length&&(n=tC(n,'<g transform="'+m.join(" ")+'">',"</g>"))});let s=i.width,o=i.height,c=a.width,h=a.height,u,d;s===null?(d=o===null?"1em":o==="auto"?h:o,u=Wh(d,c/h)):(u=s==="auto"?c:s,d=o===null?Wh(u,h/c):o==="auto"?h:o);let p={},f=l((y,m)=>{cA(m)||(p[y]=m.toString())},"setAttr");f("width",u),f("height",d);let g=[a.left,a.top,c,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:n}}l(eC,"iconToSVG");var uA=/\sid="(\S+)"/g,dA="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),pA=0;function rC(t,e=dA){let r=[],i;for(;i=uA.exec(t);)r.push(i[1]);if(!r.length)return t;let a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(n=>{let s=typeof e=="function"?e(n):e+(pA++).toString(),o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+a+"$3")}),t=t.replace(new RegExp(a,"g"),""),t}l(rC,"replaceIDs");function iC(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}l(iC,"iconToHTML");var fA={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},jh=new Map,aC=new Map,gA=l(t=>{for(let e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(P.debug("Registering icon pack:",e.name),"loader"in e)aC.set(e.name,e.loader);else if("icons"in e)jh.set(e.name,e.icons);else throw P.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),nC=l(async(t,e)=>{let r=sA(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);let i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let a=jh.get(i);if(!a){let s=aC.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await s(),prefix:i},jh.set(i,a)}catch(o){throw P.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}let n=Qk(a,r.name);if(!n)throw new Error(`Icon not found: ${t}`);return n},"getRegisteredIconData"),yA=l(async t=>{try{return await nC(t),!0}catch{return!1}},"isIconAvailable"),En=l(async(t,e,r)=>{let i;try{i=await nC(t,e?.fallbackPrefix)}catch(s){P.error(s),i=fA}let a=eC(i,e),n=iC(rC(a.body),{...a.attributes,...r});return Me(n,Vt())},"getIconSVG");function id(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(o,c){var h=c.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(u){var d,p;return(p=(d=u.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):o},[]);if(a.length){var n=new RegExp(`
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(o){return o.replace(n,`
`)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return e.forEach(function(o,c){var h=s.match(/(?:^|\n)( *)$/),u=h?h[1]:"",d=o;typeof o=="string"&&o.includes(`
`)&&(d=String(o).split(`
`).map(function(p,f){return f===0?p:""+u+p}).join(`
`)),s+=d+i[c+1]}),s}l(id,"dedent");function Hs(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}l(Hs,"L");var Qr=Hs();function ad(t){Qr=t}l(ad,"G");var za={exec:l(()=>null,"exec")};function bt(t,e=""){let r=typeof t=="string"?t:t.source,i={replace:l((a,n)=>{let s=typeof n=="string"?n:n.source;return s=s.replace(re.caret,"$1"),r=r.replace(a,s),i},"replace"),getRegex:l(()=>new RegExp(r,e),"getRegex")};return i}l(bt,"h");var re={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,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:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,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:l(t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},mA=/^(?:[ \t]*(?:\n|$))+/,xA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,bA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Dn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,nd=/(?:[*+-]|\d{1,9}[.)])/,oC=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,sC=bt(oC).replace(/bull/g,nd).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(),CA=bt(oC).replace(/bull/g,nd).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(),od=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$A=/^[^\n]+/,sd=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,wA=bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",sd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vA=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,nd).getRegex(),Us="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",ld=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_A=bt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ld).replace("tag",Us).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lC=bt(od).replace("hr",Dn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Us).getRegex(),SA=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lC).getRegex(),hd={blockquote:SA,code:xA,def:wA,fences:bA,heading:kA,hr:Dn,html:_A,lheading:sC,list:vA,newline:mA,paragraph:lC,table:za,text:$A},Ap=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Dn).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Us).getRegex(),TA={...hd,lheading:CA,table:Ap,paragraph:bt(od).replace("hr",Dn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ap).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Us).getRegex()},MA={...hd,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ld).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:za,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(od).replace("hr",Dn).replace("heading",` *#{1,6} *[^
]`).replace("lheading",sC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},BA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,AA=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hC=/^( {2,}|\\)\n(?!\s*$)/,LA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ys=/[\p{P}\p{S}]/u,cd=/[\s\p{P}\p{S}]/u,cC=/[^\s\p{P}\p{S}]/u,FA=bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,cd).getRegex(),uC=/(?!~)[\p{P}\p{S}]/u,EA=/(?!~)[\s\p{P}\p{S}]/u,DA=/(?:[^\s\p{P}\p{S}]|~)/u,OA=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,dC=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,IA=bt(dC,"u").replace(/punct/g,Ys).getRegex(),PA=bt(dC,"u").replace(/punct/g,uC).getRegex(),pC="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",RA=bt(pC,"gu").replace(/notPunctSpace/g,cC).replace(/punctSpace/g,cd).replace(/punct/g,Ys).getRegex(),NA=bt(pC,"gu").replace(/notPunctSpace/g,DA).replace(/punctSpace/g,EA).replace(/punct/g,uC).getRegex(),zA=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,cC).replace(/punctSpace/g,cd).replace(/punct/g,Ys).getRegex(),qA=bt(/\\(punct)/,"gu").replace(/punct/g,Ys).getRegex(),WA=bt(/^<(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(),jA=bt(ld).replace("(?:-->|$)","-->").getRegex(),HA=bt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",jA).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),os=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,UA=bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",os).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fC=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",os).replace("ref",sd).getRegex(),gC=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",sd).getRegex(),YA=bt("reflink|nolink(?!\\()","g").replace("reflink",fC).replace("nolink",gC).getRegex(),ud={_backpedal:za,anyPunctuation:qA,autolink:WA,blockSkip:OA,br:hC,code:AA,del:za,emStrongLDelim:IA,emStrongRDelimAst:RA,emStrongRDelimUnd:zA,escape:BA,link:UA,nolink:gC,punctuation:FA,reflink:fC,reflinkSearch:YA,tag:HA,text:LA,url:za},VA={...ud,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",os).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",os).getRegex()},Hh={...ud,emStrongRDelimAst:NA,emStrongLDelim:PA,url:bt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},GA={...Hh,br:bt(hC).replace("{2,}","*").getRegex(),text:bt(Hh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Kn={normal:hd,gfm:TA,pedantic:MA},xa={normal:ud,gfm:Hh,breaks:GA,pedantic:VA},XA={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lp=l(t=>XA[t],"ke");function $e(t,e){if(e){if(re.escapeTest.test(t))return t.replace(re.escapeReplace,Lp)}else if(re.escapeTestNoEncode.test(t))return t.replace(re.escapeReplaceNoEncode,Lp);return t}l($e,"w");function Uh(t){try{t=encodeURI(t).replace(re.percentDecode,"%")}catch{return null}return t}l(Uh,"J");function Yh(t,e){let r=t.replace(re.findPipe,(n,s,o)=>{let c=!1,h=s;for(;--h>=0&&o[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(re.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(re.slashPipe,"|");return i}l(Yh,"V");function ui(t,e,r){let i=t.length;if(i===0)return"";let a=0;for(;a<i;){let n=t.charAt(i-a-1);if(n===e&&!r)a++;else if(n!==e&&r)a++;else break}return t.slice(0,i-a)}l(ui,"z");function yC(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}l(yC,"ge");function Vh(t,e,r,i,a){let n=e.href,s=e.title||null,o=t[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:n,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,c}l(Vh,"fe");function mC(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(i===null)return e;let a=i[1];return e.split(`
`).map(n=>{let s=n.match(r.other.beginningSpace);if(s===null)return n;let[o]=s;return o.length>=a.length?n.slice(a.length):n}).join(`
`)}l(mC,"Je");var ji,ss=(ji=class{options;rules;lexer;constructor(e){this.options=e||Qr}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ui(i,`
`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let i=r[0],a=mC(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let a=ui(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:ui(r[0],`
`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let i=ui(r[0],`
`).split(`
`),a="",n="",s=[];for(;i.length>0;){let o=!1,c=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))c.push(i[h]),o=!0;else if(!o)c.push(i[h]);else break;i=i.slice(h);let u=c.join(`
`),d=u.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
${u}`:u,n=n?`${n}
${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,s,!0),this.lexer.state.top=p,i.length===0)break;let f=s.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let g=f,y=g.raw+`
`+i.join(`
`),m=this.blockquote(y);s[s.length-1]=m,a=a.substring(0,a.length-g.raw.length)+m.raw,n=n.substring(0,n.length-g.text.length)+m.text;break}else if(f?.type==="list"){let g=f,y=g.raw+`
`+i.join(`
`),m=this.list(y);s[s.length-1]=m,a=a.substring(0,a.length-f.raw.length)+m.raw,n=n.substring(0,n.length-g.raw.length)+m.raw,i=y.substring(s.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:a,tokens:s,text:n}}}list(e){let r=this.rules.block.list.exec(e);if(r){let i=r[1].trim(),a=i.length>1,n={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let s=this.rules.other.listItemRegex(i),o=!1;for(;e;){let h=!1,u="",d="";if(!(r=s.exec(e))||this.rules.block.hr.test(e))break;u=r[0],e=e.substring(u.length);let p=r[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=e.split(`
`,1)[0],g=!p.trim(),y=0;if(this.options.pedantic?(y=2,d=p.trimStart()):g?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=p.slice(y),y+=r[1].length),g&&this.rules.other.blankLine.test(f)&&(u+=f+`
`,e=e.substring(f.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),_=this.rules.other.fencesBeginRegex(y),w=this.rules.other.headingBeginRegex(y),$=this.rules.other.htmlBeginRegex(y);for(;e;){let T=e.split(`
`,1)[0],O;if(f=T,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),O=f):O=f.replace(this.rules.other.tabCharGlobal," "),_.test(f)||w.test(f)||$.test(f)||b.test(f)||k.test(f))break;if(O.search(this.rules.other.nonSpaceChar)>=y||!f.trim())d+=`
`+O.slice(y);else{if(g||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(p)||w.test(p)||k.test(p))break;d+=`
`+f}!g&&!f.trim()&&(g=!0),u+=T+`
`,e=e.substring(T.length+1),p=O.slice(y)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0));let m=null,x;this.options.gfm&&(m=this.rules.other.listIsTask.exec(d),m&&(x=m[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:u,task:!!m,checked:x,loose:!1,text:d,tokens:[]}),n.raw+=u}let c=n.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let h=0;h<n.items.length;h++)if(this.lexer.state.top=!1,n.items[h].tokens=this.lexer.blockTokens(n.items[h].text,[]),!n.loose){let u=n.items[h].tokens.filter(p=>p.type==="space"),d=u.length>0&&u.some(p=>this.rules.other.anyLine.test(p.raw));n.loose=d}if(n.loose)for(let h=0;h<n.items.length;h++)n.items[h].loose=!0;return n}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:a,title:n}}}table(e){let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Yh(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let o of a)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<i.length;o++)s.header.push({text:i[o],tokens:this.lexer.inline(i[o]),header:!0,align:s.align[o]});for(let o of n)s.rows.push(Yh(o,s.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:s.align[h]})));return s}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let i=r[1].charAt(r[1].length-1)===`
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let s=ui(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=yC(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let a=r[2],n="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(a);s&&(a=s[1],n=s[3])}else n=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),Vh(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=r[a.toLowerCase()];if(!n){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return Vh(i,n,i[0],this.lexer,this.rules)}}emStrong(e,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let n=[...a[0]].length-1,s,o,c=n,h=0,u=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*e.length+n);(a=u.exec(r))!=null;){if(s=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!s)continue;if(o=[...s].length,a[3]||a[4]){c+=o;continue}else if((a[5]||a[6])&&n%3&&!((n+o)%3)){h+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c+h);let d=[...a[0]][0].length,p=e.slice(0,n+a.index+d+o);if(Math.min(n,o)%2){let g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}let f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),n=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&n&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let i,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let i,a;if(r[2]==="@")i=r[0],a="mailto:"+i;else{let n;do n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(n!==r[0]);i=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},l(ji,"y"),ji),ur,Ye=(ur=class{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Qr,this.options.tokenizer=this.options.tokenizer||new ss,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 r={other:re,block:Kn.normal,inline:xa.normal};this.options.pedantic?(r.block=Kn.pedantic,r.inline=xa.pedantic):this.options.gfm&&(r.block=Kn.gfm,this.options.breaks?r.inline=xa.breaks:r.inline=xa.gfm),this.tokenizer.rules=r}static get rules(){return{block:Kn,inline:xa}}static lex(e,r){return new ur(r).lex(e)}static lexInline(e,r){return new ur(r).inlineTokens(e)}lex(e){e=e.replace(re.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],i=!1){for(this.options.pedantic&&(e=e.replace(re.tabCharGlobal," ").replace(re.spaceLine,""));e;){let a;if(this.options.extensions?.block?.some(s=>(a=s.call({lexer:this},e,r))?(e=e.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let s=r.at(-1);a.raw.length===1&&s!==void 0?s.raw+=`
`:r.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
`)?"":`
`)+a.raw,s.text+=`
`+a.text,this.inlineQueue.at(-1).src=s.text):r.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
`)?"":`
`)+a.raw,s.text+=`
`+a.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},r.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),r.push(a);continue}let n=e;if(this.options.extensions?.startBlock){let s=1/0,o=e.slice(1),c;this.options.extensions.startBlock.forEach(h=>{c=h.call({lexer:this},o),typeof c=="number"&&c>=0&&(s=Math.min(s,c))}),s<1/0&&s>=0&&(n=e.substring(0,s+1))}if(this.state.top&&(a=this.tokenizer.paragraph(n))){let s=r.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
`)?"":`
`)+a.raw,s.text+=`
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(a),i=n.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
`)?"":`
`)+a.raw,s.text+=`
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(a);continue}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let i=e,a=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)o.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let n=!1,s="";for(;e;){n||(s=""),n=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let h=r.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):r.push(o);continue}if(o=this.tokenizer.emStrong(e,i,s)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),r.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),r.push(o);continue}let c=e;if(this.options.extensions?.startInline){let h=1/0,u=e.slice(1),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},u),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(c=e.substring(0,h+1))}if(o=this.tokenizer.inlineText(c)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(s=o.raw.slice(-1)),n=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):r.push(o);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},l(ur,"l"),ur),Hi,ls=(Hi=class{options;parser;constructor(e){this.options=e||Qr}space(e){return""}code({text:e,lang:r,escaped:i}){let a=(r||"").match(re.notSpaceStart)?.[0],n=e.replace(re.endingNewline,"")+`
`;return a?'<pre><code class="language-'+$e(a)+'">'+(i?n:$e(n,!0))+`</code></pre>
`:"<pre><code>"+(i?n:$e(n,!0))+`</code></pre>
`}blockquote({tokens:e}){return`<blockquote>
${this.parser.parse(e)}</blockquote>
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
`}hr(e){return`<hr>
`}list(e){let r=e.ordered,i=e.start,a="";for(let o=0;o<e.items.length;o++){let c=e.items[o];a+=this.listitem(c)}let n=r?"ol":"ul",s=r&&i!==1?' start="'+i+'"':"";return"<"+n+s+`>
`+a+"</"+n+`>
`}listitem(e){let r="";if(e.task){let i=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+$e(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
`}table(e){let r="",i="";for(let n=0;n<e.header.length;n++)i+=this.tablecell(e.header[n]);r+=this.tablerow({text:i});let a="";for(let n=0;n<e.rows.length;n++){let s=e.rows[n];i="";for(let o=0;o<s.length;o++)i+=this.tablecell(s[o]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
<thead>
`+r+`</thead>
`+a+`</table>
`}tablerow({text:e}){return`<tr>
${e}</tr>
`}tablecell(e){let r=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+r+`</${i}>
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${$e(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:i}){let a=this.parser.parseInline(i),n=Uh(e);if(n===null)return a;e=n;let s='<a href="'+e+'"';return r&&(s+=' title="'+$e(r)+'"'),s+=">"+a+"</a>",s}image({href:e,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let n=Uh(e);if(n===null)return $e(i);e=n;let s=`<img src="${e}" alt="${i}"`;return r&&(s+=` title="${$e(r)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:$e(e.text)}},l(Hi,"P"),Hi),Ui,dd=(Ui=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},l(Ui,"$"),Ui),dr,Ve=(dr=class{options;renderer;textRenderer;constructor(e){this.options=e||Qr,this.options.renderer=this.options.renderer||new ls,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new dd}static parse(e,r){return new dr(r).parse(e)}static parseInline(e,r){return new dr(r).parseInline(e)}parse(e,r=!0){let i="";for(let a=0;a<e.length;a++){let n=e[a];if(this.options.extensions?.renderers?.[n.type]){let o=n,c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){i+=c||"";continue}}let s=n;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"def":{i+=this.renderer.def(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let o=s,c=this.renderer.text(o);for(;a+1<e.length&&e[a+1].type==="text";)o=e[++a],c+=`
`+this.renderer.text(o);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}parseInline(e,r=this.renderer){let i="";for(let a=0;a<e.length;a++){let n=e[a];if(this.options.extensions?.renderers?.[n.type]){let o=this.options.extensions.renderers[n.type].call({parser:this},n);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=o||"";continue}}let s=n;switch(s.type){case"escape":{i+=r.text(s);break}case"html":{i+=r.html(s);break}case"link":{i+=r.link(s);break}case"image":{i+=r.image(s);break}case"strong":{i+=r.strong(s);break}case"em":{i+=r.em(s);break}case"codespan":{i+=r.codespan(s);break}case"br":{i+=r.br(s);break}case"del":{i+=r.del(s);break}case"text":{i+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},l(dr,"l"),dr),or,Ta=(or=class{options;block;constructor(e){this.options=e||Qr}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Ye.lex:Ye.lexInline}provideParser(){return this.block?Ve.parse:Ve.parseInline}},l(or,"S"),sl(or,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),sl(or,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),or),Yi,ZA=(Yi=class{defaults=Hs();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ve;Renderer=ls;TextRenderer=dd;Lexer=Ye;Tokenizer=ss;Hooks=Ta;constructor(...e){this.use(...e)}walkTokens(e,r){let i=[];for(let a of e)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let n=a;for(let s of n.header)i=i.concat(this.walkTokens(s.tokens,r));for(let s of n.rows)for(let o of s)i=i.concat(this.walkTokens(o.tokens,r));break}case"list":{let n=a;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=a;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(s=>{let o=n[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let s=r.renderers[n.name];s?r.renderers[n.name]=function(...o){let c=n.renderer.apply(this,o);return c===!1&&(c=s.apply(this,o)),c}:r.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[n.level];s?s.unshift(n.tokenizer):r[n.level]=[n.tokenizer],n.start&&(n.level==="block"?r.startBlock?r.startBlock.push(n.start):r.startBlock=[n.start]:n.level==="inline"&&(r.startInline?r.startInline.push(n.start):r.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(r.childTokens[n.name]=n.childTokens)}),a.extensions=r),i.renderer){let n=this.defaults.renderer||new ls(this.defaults);for(let s in i.renderer){if(!(s in n))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,c=i.renderer[o],h=n[o];n[o]=(...u)=>{let d=c.apply(n,u);return d===!1&&(d=h.apply(n,u)),d||""}}a.renderer=n}if(i.tokenizer){let n=this.defaults.tokenizer||new ss(this.defaults);for(let s in i.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,c=i.tokenizer[o],h=n[o];n[o]=(...u)=>{let d=c.apply(n,u);return d===!1&&(d=h.apply(n,u)),d}}a.tokenizer=n}if(i.hooks){let n=this.defaults.hooks||new Ta;for(let s in i.hooks){if(!(s in n))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,c=i.hooks[o],h=n[o];Ta.passThroughHooks.has(s)?n[o]=u=>{if(this.defaults.async&&Ta.passThroughHooksRespectAsync.has(s))return Promise.resolve(c.call(n,u)).then(p=>h.call(n,p));let d=c.call(n,u);return h.call(n,d)}:n[o]=(...u)=>{let d=c.apply(n,u);return d===!1&&(d=h.apply(n,u)),d}}a.hooks=n}if(i.walkTokens){let n=this.defaults.walkTokens,s=i.walkTokens;a.walkTokens=function(o){let c=[];return c.push(s.call(this,o)),n&&(c=c.concat(n.call(this,o))),c}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return Ye.lex(e,r??this.defaults)}parser(e,r){return Ve.parse(e,r??this.defaults)}parseMarkdown(e){return(r,i)=>{let a={...i},n={...this.defaults,...a},s=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&a.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));n.hooks&&(n.hooks.options=n,n.hooks.block=e);let o=n.hooks?n.hooks.provideLexer():e?Ye.lex:Ye.lexInline,c=n.hooks?n.hooks.provideParser():e?Ve.parse:Ve.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(h=>o(h,n)).then(h=>n.hooks?n.hooks.processAllTokens(h):h).then(h=>n.walkTokens?Promise.all(this.walkTokens(h,n.walkTokens)).then(()=>h):h).then(h=>c(h,n)).then(h=>n.hooks?n.hooks.postprocess(h):h).catch(s);try{n.hooks&&(r=n.hooks.preprocess(r));let h=o(r,n);n.hooks&&(h=n.hooks.processAllTokens(h)),n.walkTokens&&this.walkTokens(h,n.walkTokens);let u=c(h,n);return n.hooks&&(u=n.hooks.postprocess(u)),u}catch(h){return s(h)}}}onError(e,r){return i=>{if(i.message+=`
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+$e(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},l(Yi,"B"),Yi),qr=new ZA;function mt(t,e){return qr.parse(t,e)}l(mt,"d");mt.options=mt.setOptions=function(t){return qr.setOptions(t),mt.defaults=qr.defaults,ad(mt.defaults),mt};mt.getDefaults=Hs;mt.defaults=Qr;mt.use=function(...t){return qr.use(...t),mt.defaults=qr.defaults,ad(mt.defaults),mt};mt.walkTokens=function(t,e){return qr.walkTokens(t,e)};mt.parseInline=qr.parseInline;mt.Parser=Ve;mt.parser=Ve.parse;mt.Renderer=ls;mt.TextRenderer=dd;mt.Lexer=Ye;mt.lexer=Ye.lex;mt.Tokenizer=ss;mt.Hooks=Ta;mt.parse=mt;mt.options;mt.setOptions;mt.use;mt.walkTokens;mt.parseInline;Ve.parse;Ye.lex;function xC(t,{markdownAutoWrap:e}){let r=t.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`);return id(r)}l(xC,"preprocessMarkdown");function bC(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}l(bC,"nonMarkdownToLines");function kC(t,e={}){let r=xC(t,e),i=mt.lexer(r),a=[[]],n=0;function s(o,c="normal"){o.type==="text"?o.text.split(`
`).forEach((h,u)=>{u!==0&&(n++,a.push([])),h.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&a[n].push({content:d,type:c})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{s(h,o.type)}):o.type==="html"&&a[n].push({content:o.text,type:"normal"})}return l(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(c=>{s(c)}):o.type==="html"?a[n].push({content:o.text,type:"normal"}):a[n].push({content:o.raw,type:"normal"})}),a}l(kC,"markdownToLines");function CC(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}l(CC,"nonMarkdownToHTML");function $C(t,{markdownAutoWrap:e}={}){let r=mt.lexer(t);function i(a){return a.type==="text"?e===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${a.tokens?.map(i).join("")}</strong>`:a.type==="em"?`<em>${a.tokens?.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${a.tokens?.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(P.warn(`Unsupported markdown: ${a.type}`),a.raw)}return l(i,"output"),r.map(i).join("")}l($C,"markdownToHTML");function wC(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}l(wC,"splitTextToChars");function vC(t,e){let r=wC(e.content);return pd(t,[],r,e.type)}l(vC,"splitWordToFitWidth");function pd(t,e,r,i){if(r.length===0)return[{content:e.join(""),type:i},{content:"",type:i}];let[a,...n]=r,s=[...e,a];return t([{content:s.join(""),type:i}])?pd(t,s,n,i):(e.length===0&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}l(pd,"splitWordToFitWidthRecursion");function _C(t,e){if(t.some(({content:r})=>r.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return hs(t,e)}l(_C,"splitLineToFitWidth");function hs(t,e,r=[],i=[]){if(t.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";t[0].content===" "&&(a=" ",t.shift());let n=t.shift()??{content:" ",type:"normal"},s=[...i];if(a!==""&&s.push({content:a,type:"normal"}),s.push(n),e(s))return hs(t,e,r,s);if(i.length>0)r.push(i),t.unshift(n);else if(n.content){let[o,c]=vC(e,n);r.push([o]),c.content&&t.unshift(c)}return hs(t,e,r)}l(hs,"splitLineToFitWidthRecursion");function Gh(t,e){e&&t.attr("style",e)}l(Gh,"applyStyle");var Fp=16384;async function SC(t,e,r,i,a=!1,n=Vt()){let s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,Fp)}px`),s.attr("height",`${Math.min(10*r,Fp)}px`);let o=s.append("xhtml:div"),c=on(e.label)?await yx(e.label.replace(Bn.lineBreakRegex,`
`),n):Me(e.label,n),h=e.isNode?"nodeLabel":"edgeLabel",u=o.append("span");u.html(c),Gh(u,e.labelStyle),u.attr("class",`${h} ${i}`),Gh(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&o.attr("class","labelBkg");let d=o.node().getBoundingClientRect();return d.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),d=o.node().getBoundingClientRect()),s.node()}l(SC,"addHtmlSpan");function Vs(t,e,r,i=!1){let a=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}l(Vs,"createTspan");function TC(t,e,r){let i=t.append("text"),a=Vs(i,1,e);Gs(a,r);let n=a.node().getComputedTextLength();return i.remove(),n}l(TC,"computeWidthOfText");function QA(t,e,r){let i=t.append("text"),a=Vs(i,1,e);Gs(a,[{content:r,type:"normal"}]);let n=a.node()?.getBoundingClientRect();return n&&i.remove(),n}l(QA,"computeDimensionOfText");function MC(t,e,r,i=!1,a=!1){let n=e.append("g"),s=n.insert("rect").attr("class","background").attr("style","stroke: none"),o=n.append("text").attr("y","-10.1");a&&o.attr("text-anchor","middle");let c=0;for(let h of r){let u=l(p=>TC(n,1.1,p)<=t,"checkWidth"),d=u(h)?[h]:_C(h,u);for(let p of d){let f=Vs(o,c,1.1,a);Gs(f,p),c++}}if(i){let h=o.node().getBBox(),u=2;return s.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),n.node()}else return o.node()}l(MC,"createFormattedText");function Gs(t,e){t.text(""),e.forEach((r,i)=>{let a=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}l(Gs,"updateTextContentAndStyles");async function BC(t,e={}){let r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,n,s)=>(r.push((async()=>{let o=`${n}:${s}`;return await yA(o)?await En(o,void 0,{class:"label-icon"}):`<i class='${Me(a,e).replace(":"," ")}'></i>`})()),a));let i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}l(BC,"replaceIconSubstring");var rr=l(async(t,e="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,markdown:s=!0,isNode:o=!0,width:c=200,addSvgBackground:h=!1}={},u)=>{if(P.debug("XYZ createText",e,r,i,a,n,o,"addSvgBackground: ",h),n){let d=s?$C(e,u):CC(e),p=await BC(aa(d),u),f=e.replace(/\\\\/g,"\\"),g={isNode:o,label:on(e)?f:p,labelStyle:r.replace("fill:","color:")};return await SC(t,g,c,a,h,u)}else{let d=e.replace(/<br\s*\/?>/g,"<br/>"),p=s?kC(d.replace("<br>","<br/>"),u):bC(d),f=MC(c,t,p,e?h:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(f).attr("style",g)}else{let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ut(f).select("rect").attr("style",g.replace(/background:/g,"fill:"));let y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(f).select("text").attr("style",y)}return i?ut(f).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ut(f).selectAll("tspan.text-outer-tspan").classed("row",!0),f}},"createText"),st=l(async(t,e,r)=>{let i,a=e.useHtmlLabels||kr(xt()?.htmlLabels);r?i=r:i="node default";let n=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=n.insert("g").attr("class","label").attr("style",Xt(e.labelStyle)),o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];let c=!!e.icon||!!e.img,h=e.labelType==="markdown",u=await rr(s,Me(aa(o),xt()),{useHtmlLabels:a,width:e.width||xt().flowchart?.wrappingWidth,cssClasses:h?"markdown-node-label":void 0,style:e.labelStyle,addSvgBackground:c,markdown:h},xt()),d=u.getBBox(),p=(e?.padding??0)/2;if(a){let f=u.children[0],g=ut(u);await zk(f,o),d=f.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return a?s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):s.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:n,bbox:d,halfPadding:p,label:s}},"labelHelper"),vl=l(async(t,e,r)=>{let i=r.useHtmlLabels??Zt(xt()),a=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),n=await rr(a,Me(aa(e),xt()),{useHtmlLabels:i,width:r.width||xt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=n.getBBox(),o=r.padding/2;if(Zt(xt())){let c=n.children[0],h=ut(n);s=c.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}return i?a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):a.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:a}},"insertLabel"),tt=l((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),ot=l((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function pt(t){let e=t.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}l(pt,"createPathFromPoints");function yr(t,e,r,i,a,n){let s=[],o=r-t,c=i-e,h=o/n,u=2*Math.PI/h,d=e+c/2;for(let p=0;p<=50;p++){let f=p/50,g=t+f*o,y=d+a*Math.sin(u*(g-t));s.push({x:g,y})}return s}l(yr,"generateFullSineWavePoints");function yn(t,e,r,i,a,n){let s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let h=0;h<i;h++){let u=o+h*c,d=t+r*Math.cos(u),p=e+r*Math.sin(u);s.push({x:-d,y:-p})}return s}l(yn,"generateCirclePoints");var JA=l((t,e)=>{var r=t.x,i=t.y,a=e.x-r,n=e.y-i,s=t.width/2,o=t.height/2,c,h;return Math.abs(n)*s>Math.abs(a)*o?(n<0&&(o=-o),c=n===0?0:o*a/n,h=o):(a<0&&(s=-s),c=s,h=a===0?0:s*n/a),{x:r+c,y:i+h}},"intersectRect"),sa=JA,KA=l(async(t,e,r,i=!1,a=!1)=>{let n=e||"";typeof n=="object"&&(n=n[0]);let s=xt(),o=Zt(s);return await rr(t,n,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},s)},"createLabel"),lr=KA,Cr=l((t,e,r,i,a)=>["M",t+a,e,"H",t+r-a,"A",a,a,0,0,1,t+r,e+a,"V",e+i-a,"A",a,a,0,0,1,t+r-a,e+i,"H",t+a,"A",a,a,0,0,1,t,e+i-a,"V",e+a,"A",a,a,0,0,1,t+a,e,"Z"].join(" "),"createRoundedRectPathD"),AC=l(async(t,e)=>{P.info("Creating subgraph rect for ",e.id,e);let r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:s}=i,{labelStyles:o,nodeStyles:c,borderStyles:h,backgroundStyles:u}=K(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=Zt(r),f=d.insert("g").attr("class","cluster-label "),g;e.labelType==="markdown"?g=await rr(f,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}):g=await lr(f,e.label,e.labelStyle||"",!1,!0);let y=g.getBBox();if(Zt(r)){let T=g.children[0],O=ut(g);y=T.getBoundingClientRect(),O.attr("width",y.width),O.attr("height",y.height)}let m=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-m/2,k=e.y-x/2;P.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let T=Q.svg(d),O=J(e,{roughness:.7,fill:n,stroke:s,fillWeight:3,seed:a}),R=T.path(Cr(b,k,m,x,0),O);_=d.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",u.join(";").replace("fill","stroke"))}else _=d.insert("rect",":first-child"),_.attr("style",c).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",x);let{subGraphTitleTopMargin:w}=Xu(r);if(f.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),o){let T=f.select("span");T&&T.attr("style",o)}let $=_.node().getBBox();return e.offsetX=0,e.width=$.width,e.height=$.height,e.offsetY=y.height-e.padding/2,e.intersect=function(T){return sa(e,T)},{cluster:d,labelBBox:y}},"rect"),tL=l((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),a=0*e.padding,n=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");let s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return sa(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),eL=l(async(t,e)=>{let r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,compositeBackground:s,compositeTitleBackground:o,nodeBorder:c}=i,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),u=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),f=await lr(d,e.label,e.labelStyle,void 0,!0),g=f.getBBox();if(Zt(r)){let R=f.children[0],I=ut(f);g=R.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}let y=0*e.padding,m=y/2,x=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+y;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+y,k=e.height+y-g.height-6,_=e.x-x/2,w=e.y-b/2;e.width=x;let $=e.y-e.height/2-m+g.height+2,T;if(e.look==="handDrawn"){let R=e.cssClasses.includes("statediagram-cluster-alt"),I=Q.svg(h),S=e.rx||e.ry?I.path(Cr(_,w,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:c,seed:a}):I.rectangle(_,w,x,b,{seed:a});T=h.insert(()=>S,":first-child");let D=I.rectangle(_,$,x,k,{fill:R?n:s,fillStyle:R?"hachure":"solid",stroke:c,seed:a});T=h.insert(()=>S,":first-child"),p=h.insert(()=>D)}else T=u.insert("rect",":first-child"),T.attr("class","outer").attr("x",_).attr("y",w).attr("width",x).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",_).attr("y",$).attr("width",x).attr("height",k);d.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(Zt(r)?0:3)})`);let O=T.node().getBBox();return e.height=O.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(R){return sa(e,R)},{cluster:h,labelBBox:g}},"roundedWithTitle"),rL=l(async(t,e)=>{P.info("Creating subgraph rect for ",e.id,e);let r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:s}=i,{labelStyles:o,nodeStyles:c,borderStyles:h,backgroundStyles:u}=K(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=Zt(r),f=d.insert("g").attr("class","cluster-label "),g=await rr(f,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}),y=g.getBBox();if(Zt(r)){let T=g.children[0],O=ut(g);y=T.getBoundingClientRect(),O.attr("width",y.width),O.attr("height",y.height)}let m=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-m/2,k=e.y-x/2;P.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let T=Q.svg(d),O=J(e,{roughness:.7,fill:n,stroke:s,fillWeight:4,seed:a}),R=T.path(Cr(b,k,m,x,e.rx),O);_=d.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",u.join(";").replace("fill","stroke"))}else _=d.insert("rect",":first-child"),_.attr("style",c).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",x);let{subGraphTitleTopMargin:w}=Xu(r);if(f.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),o){let T=f.select("span");T&&T.attr("style",o)}let $=_.node().getBBox();return e.offsetX=0,e.width=$.width,e.height=$.height,e.offsetY=y.height-e.padding/2,e.intersect=function(T){return sa(e,T)},{cluster:d,labelBBox:y}},"kanbanSection"),iL=l((t,e)=>{let r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=i,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),c=0*e.padding,h=e.width+c;e.diff=-e.padding;let u=e.height+c,d=e.x-h/2,p=e.y-u/2;e.width=h;let f;if(e.look==="handDrawn"){let y=Q.svg(s).rectangle(d,p,h,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});f=s.insert(()=>y,":first-child")}else f=o.insert("rect",":first-child"),f.attr("class","divider").attr("x",d).attr("y",p).attr("width",h).attr("height",u).attr("data-look",e.look);let g=f.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(y){return sa(e,y)},{cluster:s,labelBBox:{}}},"divider"),aL=AC,nL={rect:AC,squareRect:aL,roundedWithTitle:eL,noteGroup:tL,divider:iL,kanbanSection:rL},LC=new Map,oL=l(async(t,e)=>{let r=e.shape||"rect",i=await nL[r](t,e);return LC.set(e.id,i),i},"insertCluster"),AE=l(()=>{LC=new Map},"clear");function FC(t,e){return t.intersect(e)}l(FC,"intersectNode");var sL=FC;function EC(t,e,r,i){var a=t.x,n=t.y,s=a-i.x,o=n-i.y,c=Math.sqrt(e*e*o*o+r*r*s*s),h=Math.abs(e*r*s/c);i.x<a&&(h=-h);var u=Math.abs(e*r*o/c);return i.y<n&&(u=-u),{x:a+h,y:n+u}}l(EC,"intersectEllipse");var DC=EC;function OC(t,e,r){return DC(t,e,e,r)}l(OC,"intersectCircle");var lL=OC;function IC(t,e,r,i){{let a=e.y-t.y,n=t.x-e.x,s=e.x*t.y-t.x*e.y,o=a*r.x+n*r.y+s,c=a*i.x+n*i.y+s,h=1e-6;if(o!==0&&c!==0&&Xh(o,c))return;let u=i.y-r.y,d=r.x-i.x,p=i.x*r.y-r.x*i.y,f=u*t.x+d*t.y+p,g=u*e.x+d*e.y+p;if(Math.abs(f)<h&&Math.abs(g)<h&&Xh(f,g))return;let y=a*d-u*n;if(y===0)return;let m=Math.abs(y/2),x=n*p-d*s,b=x<0?(x-m)/y:(x+m)/y;x=u*s-a*p;let k=x<0?(x-m)/y:(x+m)/y;return{x:b,y:k}}}l(IC,"intersectLine");function Xh(t,e){return t*e>0}l(Xh,"sameSign");var hL=IC;function PC(t,e,r){let i=t.x,a=t.y,n=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(u){s=Math.min(s,u.x),o=Math.min(o,u.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let c=i-t.width/2-s,h=a-t.height/2-o;for(let u=0;u<e.length;u++){let d=e[u],p=e[u<e.length-1?u+1:0],f=hL(t,r,{x:c+d.x,y:h+d.y},{x:c+p.x,y:h+p.y});f&&n.push(f)}return n.length?(n.length>1&&n.sort(function(u,d){let p=u.x-r.x,f=u.y-r.y,g=Math.sqrt(p*p+f*f),y=d.x-r.x,m=d.y-r.y,x=Math.sqrt(y*y+m*m);return g<x?-1:g===x?0:1}),n[0]):t}l(PC,"intersectPolygon");var cL=PC,H={node:sL,circle:lL,ellipse:DC,polygon:cL,rect:sa};function RC(t,e){let{labelStyles:r}=K(e);e.labelStyle=r;let i=ot(e),a=i;i||(a="anchor");let n=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=1,{cssStyles:o}=e,c=Q.svg(n),h=J(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);let u=c.circle(0,0,s*2,h),d=n.insert(()=>u,":first-child");return d.attr("class","anchor").attr("style",Xt(o)),tt(e,d),e.intersect=function(p){return P.info("Circle intersect",e,s,p),H.circle(e,s,p)},n}l(RC,"anchor");function Zh(t,e,r,i,a,n,s){let o=(t+r)/2,c=(e+i)/2,h=Math.atan2(i-e,r-t),u=(r-t)/2,d=(i-e)/2,p=u/a,f=d/n,g=Math.sqrt(p**2+f**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");let y=Math.sqrt(1-g**2),m=o+y*n*Math.sin(h)*(s?-1:1),x=c-y*a*Math.cos(h)*(s?-1:1),b=Math.atan2((e-x)/n,(t-m)/a),k=Math.atan2((i-x)/n,(r-m)/a)-b;s&&k<0&&(k+=2*Math.PI),!s&&k>0&&(k-=2*Math.PI);let _=[];for(let w=0;w<20;w++){let $=w/19,T=b+$*k,O=m+a*Math.cos(T),R=x+n*Math.sin(T);_.push({x:O,y:R})}return _}l(Zh,"generateArcPoints");async function NC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=n.width+e.padding+20,o=n.height+e.padding,c=o/2,h=c/(2.5+o/50),{cssStyles:u}=e,d=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...Zh(-s/2,-o/2,-s/2,o/2,h,c,!1),{x:s/2,y:o/2},...Zh(s/2,o/2,s/2,-o/2,h,c,!0)],p=Q.svg(a),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=pt(d),y=p.path(g,f),m=a.insert(()=>y,":first-child");return m.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(${h/2}, 0)`),tt(e,m),e.intersect=function(x){return H.polygon(e,d,x)},a}l(NC,"bowTieRect");function ir(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}l(ir,"insertPolygonShape");async function zC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=n.height+e.padding,o=12,c=n.width+e.padding+o,h=0,u=c,d=-s,p=0,f=[{x:h+o,y:d},{x:u,y:d},{x:u,y:p},{x:h,y:p},{x:h,y:d+o},{x:h+o,y:d}],g,{cssStyles:y}=e;if(e.look==="handDrawn"){let m=Q.svg(a),x=J(e,{}),b=pt(f),k=m.path(b,x);g=a.insert(()=>k,":first-child").attr("transform",`translate(${-c/2}, ${s/2})`),y&&g.attr("style",y)}else g=ir(a,c,s,f);return i&&g.attr("style",i),tt(e,g),e.intersect=function(m){return H.polygon(e,f,m)},a}l(zC,"card");function qC(t,e){let{nodeStyles:r}=K(e);e.label="";let i=t.insert("g").attr("class",ot(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],o=Q.svg(i),c=J(e,{});e.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");let h=pt(s),u=o.path(h,c),d=i.insert(()=>u,":first-child");return a&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",a),r&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(p){return H.polygon(e,s,p)},i}l(qC,"choice");async function fd(t,e,r){let{labelStyles:i,nodeStyles:a}=K(e);e.labelStyle=i;let{shapeSvg:n,bbox:s,halfPadding:o}=await st(t,e,ot(e)),c=r?.padding??o,h=s.width/2+c,u,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Q.svg(n),f=J(e,{}),g=p.circle(0,0,h*2,f);u=n.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",Xt(d))}else u=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",h).attr("cx",0).attr("cy",0);return tt(e,u),e.calcIntersect=function(p,f){let g=p.width/2;return H.circle(p,g,f)},e.intersect=function(p){return P.info("Circle intersect",e,h,p),H.circle(e,h,p)},n}l(fd,"circle");function WC(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=t*2,a={x:i/2*e,y:i/2*r},n={x:-(i/2)*e,y:i/2*r},s={x:-(i/2)*e,y:-(i/2)*r},o={x:i/2*e,y:-(i/2)*r};return`M ${n.x},${n.y} L ${o.x},${o.y}
M ${a.x},${a.y} L ${s.x},${s.y}`}l(WC,"createLine");function jC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r,e.label="";let a=t.insert("g").attr("class",ot(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=Q.svg(a),c=J(e,{});e.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");let h=o.circle(0,0,n*2,c),u=WC(n),d=o.path(u,c),p=a.insert(()=>h,":first-child");return p.insert(()=>d),s&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",s),i&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",i),tt(e,p),e.intersect=function(f){return P.info("crossedCircle intersect",e,{radius:n,point:f}),H.circle(e,n,f)},a}l(jC,"crossedCircle");function He(t,e,r,i=100,a=0,n=180){let s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let h=0;h<i;h++){let u=o+h*c,d=t+r*Math.cos(u),p=e+r*Math.sin(u);s.push({x:-d,y:-p})}return s}l(He,"generateCirclePoints");async function HC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=n.width+(e.padding??0),c=n.height+(e.padding??0),h=Math.max(5,c*.1),{cssStyles:u}=e,d=[...He(o/2,-c/2,h,30,-90,0),{x:-o/2-h,y:h},...He(o/2+h*2,-h,h,20,-180,-270),...He(o/2+h*2,h,h,20,-90,-180),{x:-o/2-h,y:-c/2},...He(o/2,c/2,h,20,0,90)],p=[{x:o/2,y:-c/2-h},{x:-o/2,y:-c/2-h},...He(o/2,-c/2,h,20,-90,0),{x:-o/2-h,y:-h},...He(o/2+o*.1,-h,h,20,-180,-270),...He(o/2+o*.1,h,h,20,-90,-180),{x:-o/2-h,y:c/2},...He(o/2,c/2,h,20,0,90),{x:-o/2,y:c/2+h},{x:o/2,y:c/2+h}],f=Q.svg(a),g=J(e,{fill:"none"});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=pt(d).replace("Z",""),m=f.path(y,g),x=pt(p),b=f.path(x,{...g}),k=a.insert("g",":first-child");return k.insert(()=>b,":first-child").attr("stroke-opacity",0),k.insert(()=>m,":first-child"),k.attr("class","text"),u&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${h}, 0)`),s.attr("transform",`translate(${-o/2+h-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),tt(e,k),e.intersect=function(_){return H.polygon(e,p,_)},a}l(HC,"curlyBraceLeft");function Ue(t,e,r,i=100,a=0,n=180){let s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let h=0;h<i;h++){let u=o+h*c,d=t+r*Math.cos(u),p=e+r*Math.sin(u);s.push({x:d,y:p})}return s}l(Ue,"generateCirclePoints");async function UC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=n.width+(e.padding??0),c=n.height+(e.padding??0),h=Math.max(5,c*.1),{cssStyles:u}=e,d=[...Ue(o/2,-c/2,h,20,-90,0),{x:o/2+h,y:-h},...Ue(o/2+h*2,-h,h,20,-180,-270),...Ue(o/2+h*2,h,h,20,-90,-180),{x:o/2+h,y:c/2},...Ue(o/2,c/2,h,20,0,90)],p=[{x:-o/2,y:-c/2-h},{x:o/2,y:-c/2-h},...Ue(o/2,-c/2,h,20,-90,0),{x:o/2+h,y:-h},...Ue(o/2+h*2,-h,h,20,-180,-270),...Ue(o/2+h*2,h,h,20,-90,-180),{x:o/2+h,y:c/2},...Ue(o/2,c/2,h,20,0,90),{x:o/2,y:c/2+h},{x:-o/2,y:c/2+h}],f=Q.svg(a),g=J(e,{fill:"none"});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=pt(d).replace("Z",""),m=f.path(y,g),x=pt(p),b=f.path(x,{...g}),k=a.insert("g",":first-child");return k.insert(()=>b,":first-child").attr("stroke-opacity",0),k.insert(()=>m,":first-child"),k.attr("class","text"),u&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-h}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),tt(e,k),e.intersect=function(_){return H.polygon(e,p,_)},a}l(UC,"curlyBraceRight");function zt(t,e,r,i=100,a=0,n=180){let s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let h=0;h<i;h++){let u=o+h*c,d=t+r*Math.cos(u),p=e+r*Math.sin(u);s.push({x:-d,y:-p})}return s}l(zt,"generateCirclePoints");async function YC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=n.width+(e.padding??0),c=n.height+(e.padding??0),h=Math.max(5,c*.1),{cssStyles:u}=e,d=[...zt(o/2,-c/2,h,30,-90,0),{x:-o/2-h,y:h},...zt(o/2+h*2,-h,h,20,-180,-270),...zt(o/2+h*2,h,h,20,-90,-180),{x:-o/2-h,y:-c/2},...zt(o/2,c/2,h,20,0,90)],p=[...zt(-o/2+h+h/2,-c/2,h,20,-90,-180),{x:o/2-h/2,y:h},...zt(-o/2-h/2,-h,h,20,0,90),...zt(-o/2-h/2,h,h,20,-90,0),{x:o/2-h/2,y:-h},...zt(-o/2+h+h/2,c/2,h,30,-180,-270)],f=[{x:o/2,y:-c/2-h},{x:-o/2,y:-c/2-h},...zt(o/2,-c/2,h,20,-90,0),{x:-o/2-h,y:-h},...zt(o/2+h*2,-h,h,20,-180,-270),...zt(o/2+h*2,h,h,20,-90,-180),{x:-o/2-h,y:c/2},...zt(o/2,c/2,h,20,0,90),{x:-o/2,y:c/2+h},{x:o/2-h-h/2,y:c/2+h},...zt(-o/2+h+h/2,-c/2,h,20,-90,-180),{x:o/2-h/2,y:h},...zt(-o/2-h/2,-h,h,20,0,90),...zt(-o/2-h/2,h,h,20,-90,0),{x:o/2-h/2,y:-h},...zt(-o/2+h+h/2,c/2,h,30,-180,-270)],g=Q.svg(a),y=J(e,{fill:"none"});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=pt(d).replace("Z",""),x=g.path(m,y),b=pt(p).replace("Z",""),k=g.path(b,y),_=pt(f),w=g.path(_,{...y}),$=a.insert("g",":first-child");return $.insert(()=>w,":first-child").attr("stroke-opacity",0),$.insert(()=>x,":first-child"),$.insert(()=>k,":first-child"),$.attr("class","text"),u&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(${h-h/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),tt(e,$),e.intersect=function(T){return H.polygon(e,f,T)},a}l(YC,"curlyBraces");async function VC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=80,o=20,c=Math.max(s,(n.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(o,n.height+(e.padding??0)*2,e?.height??0),u=h/2,{cssStyles:d}=e,p=Q.svg(a),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=c,y=h,m=g-u,x=y/4,b=[{x:m,y:0},{x,y:0},{x:0,y:y/2},{x,y},{x:m,y},...yn(-m,-y/2,u,50,270,90)],k=pt(b),_=p.path(k,f),w=a.insert(()=>_,":first-child");return w.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",d),i&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-c/2}, ${-h/2})`),tt(e,w),e.intersect=function($){return H.polygon(e,b,$)},a}l(VC,"curvedTrapezoid");var uL=l((t,e,r,i,a,n)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),dL=l((t,e,r,i,a,n)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),pL=l((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function GC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+e.padding,e.width??0),c=o/2,h=c/(2.5+o/50),u=Math.max(n.height+h+e.padding,e.height??0),d,{cssStyles:p}=e;if(e.look==="handDrawn"){let f=Q.svg(a),g=dL(0,0,o,u,c,h),y=pL(0,h,o,u,c,h),m=f.path(g,J(e,{})),x=f.path(y,J(e,{fill:"none"}));d=a.insert(()=>x,":first-child"),d=a.insert(()=>m,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let f=uL(0,0,o,u,c,h);d=a.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Xt(p)).attr("style",i)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-o/2}, ${-(u/2+h)})`),tt(e,d),s.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(e.padding??0)/1.5-(n.y-(n.top??0))})`),e.intersect=function(f){let g=H.rect(e,f),y=g.x-(e.x??0);if(c!=0&&(Math.abs(y)<(e.width??0)/2||Math.abs(y)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-h)){let m=h*h*(1-y*y/(c*c));m>0&&(m=Math.sqrt(m)),m=h-m,f.y-(e.y??0)>0&&(m=-m),g.y+=m}return g},a}l(GC,"cylinder");async function XC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=n.width+e.padding,c=n.height+e.padding,h=c*.2,u=-o/2,d=-c/2-h/2,{cssStyles:p}=e,f=Q.svg(a),g=J(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:u,y:d+h},{x:-u,y:d+h},{x:-u,y:-d},{x:u,y:-d},{x:u,y:d},{x:-u,y:d},{x:-u,y:d+h}],m=f.polygon(y.map(b=>[b.x,b.y]),g),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${u+(e.padding??0)/2-(n.x-(n.left??0))}, ${d+h+(e.padding??0)/2-(n.y-(n.top??0))})`),tt(e,x),e.intersect=function(b){return H.rect(e,b)},a}l(XC,"dividedRectangle");async function ZC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,halfPadding:s}=await st(t,e,ot(e)),o=n.width/2+s+5,c=n.width/2+s,h,{cssStyles:u}=e;if(e.look==="handDrawn"){let d=Q.svg(a),p=J(e,{roughness:.2,strokeWidth:2.5}),f=J(e,{roughness:.2,strokeWidth:1.5}),g=d.circle(0,0,o*2,p),y=d.circle(0,0,c*2,f);h=a.insert("g",":first-child"),h.attr("class",Xt(e.cssClasses)).attr("style",Xt(u)),h.node()?.appendChild(g),h.node()?.appendChild(y)}else{h=a.insert("g",":first-child");let d=h.insert("circle",":first-child"),p=h.insert("circle");h.attr("class","basic label-container").attr("style",i),d.attr("class","outer-circle").attr("style",i).attr("r",o).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return tt(e,h),e.intersect=function(d){return P.info("DoubleCircle intersect",e,o,d),H.circle(e,o,d)},a}l(ZC,"doublecircle");function QC(t,e,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=K(e);e.label="",e.labelStyle=i;let n=t.insert("g").attr("class",ot(e)).attr("id",e.domId??e.id),s=7,{cssStyles:o}=e,c=Q.svg(n),{nodeBorder:h}=r,u=J(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(u.roughness=0);let d=c.circle(0,0,s*2,u),p=n.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",a),tt(e,p),e.intersect=function(f){return P.info("filledCircle intersect",e,{radius:s,point:f}),H.circle(e,s,f)},n}l(QC,"filledCircle");async function JC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=n.width+(e.padding??0),c=o+n.height,h=o+n.height,u=[{x:0,y:-c},{x:h,y:-c},{x:h/2,y:0}],{cssStyles:d}=e,p=Q.svg(a),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=pt(u),y=p.path(g,f),m=a.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",d),i&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),e.width=o,e.height=c,tt(e,m),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(x){return P.info("Triangle intersect",e,u,x),H.polygon(e,u,x)},a}l(JC,"flippedTriangle");function KC(t,e,{dir:r,config:{state:i,themeVariables:a}}){let{nodeStyles:n}=K(e);e.label="";let s=t.insert("g").attr("class",ot(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,c=Math.max(70,e?.width??0),h=Math.max(10,e?.height??0);r==="LR"&&(c=Math.max(10,e?.width??0),h=Math.max(70,e?.height??0));let u=-1*c/2,d=-1*h/2,p=Q.svg(s),f=J(e,{stroke:a.lineColor,fill:a.lineColor});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=p.rectangle(u,d,c,h,f),y=s.insert(()=>g,":first-child");o&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",o),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),tt(e,y);let m=i?.padding??0;return e.width&&e.height&&(e.width+=m/2||0,e.height+=m/2||0),e.intersect=function(x){return H.rect(e,x)},s}l(KC,"forkJoin");async function t$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let a=80,n=50,{shapeSvg:s,bbox:o}=await st(t,e,ot(e)),c=Math.max(a,o.width+(e.padding??0)*2,e?.width??0),h=Math.max(n,o.height+(e.padding??0)*2,e?.height??0),u=h/2,{cssStyles:d}=e,p=Q.svg(s),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=[{x:-c/2,y:-h/2},{x:c/2-u,y:-h/2},...yn(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},{x:-c/2,y:h/2}],y=pt(g),m=p.path(y,f),x=s.insert(()=>m,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),tt(e,x),e.intersect=function(b){return P.info("Pill intersect",e,{radius:u,point:b}),H.polygon(e,g,b)},s}l(t$,"halfRoundedRectangle");var fL=l((t,e,r,i,a)=>[`M${t+a},${e}`,`L${t+r-a},${e}`,`L${t+r},${e-i/2}`,`L${t+r-a},${e-i}`,`L${t+a},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function e$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=4,o=n.height+e.padding,c=o/s,h=n.width+2*c+e.padding,u=[{x:c,y:0},{x:h-c,y:0},{x:h,y:-o/2},{x:h-c,y:-o},{x:c,y:-o},{x:0,y:-o/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let f=Q.svg(a),g=J(e,{}),y=fL(0,0,h,o,c),m=f.path(y,g);d=a.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),p&&d.attr("style",p)}else d=ir(a,h,o,u);return i&&d.attr("style",i),e.width=h,e.height=o,tt(e,d),e.intersect=function(f){return H.polygon(e,u,f)},a}l(e$,"hexagon");async function r$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.label="",e.labelStyle=r;let{shapeSvg:a}=await st(t,e,ot(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,c=Q.svg(a),h=J(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],d=pt(u),p=c.path(d,h),f=a.insert(()=>p,":first-child");return f.attr("class","basic label-container"),o&&e.look!=="handDrawn"&&f.selectChildren("path").attr("style",o),i&&e.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-n/2}, ${-s/2})`),tt(e,f),e.intersect=function(g){return P.info("Pill intersect",e,{points:u}),H.polygon(e,u,g)},a}l(r$,"hourglass");async function i$(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=K(e);e.labelStyle=a;let n=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(n,s),c=i?.wrappingWidth;e.width=Math.max(o,c??0);let{shapeSvg:h,bbox:u,label:d}=await st(t,e,"icon-shape default"),p=e.pos==="t",f=o,g=o,{nodeBorder:y}=r,{stylesMap:m}=oa(e),x=-g/2,b=-f/2,k=e.label?8:0,_=Q.svg(h),w=J(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let $=_.rectangle(x,b,g,f,w),T=Math.max(g,u.width),O=f+u.height+k,R=_.rectangle(-T/2,-O/2,T,O,{...w,fill:"transparent",stroke:"none"}),I=h.insert(()=>$,":first-child"),S=h.insert(()=>R);if(e.icon){let D=h.append("g");D.html(`<g>${await En(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);let A=D.node().getBBox(),B=A.width,L=A.height,M=A.x,E=A.y;D.attr("transform",`translate(${-B/2-M},${p?u.height/2+k/2-L/2-E:-u.height/2-k/2-L/2-E})`),D.attr("style",`color: ${m.get("stroke")??y};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-O/2:O/2-u.height})`),I.attr("transform",`translate(0,${p?u.height/2+k/2:-u.height/2-k/2})`),tt(e,S),e.intersect=function(D){if(P.info("iconSquare intersect",e,D),!e.label)return H.rect(e,D);let A=e.x??0,B=e.y??0,L=e.height??0,M=[];return p?M=[{x:A-u.width/2,y:B-L/2},{x:A+u.width/2,y:B-L/2},{x:A+u.width/2,y:B-L/2+u.height+k},{x:A+g/2,y:B-L/2+u.height+k},{x:A+g/2,y:B+L/2},{x:A-g/2,y:B+L/2},{x:A-g/2,y:B-L/2+u.height+k},{x:A-u.width/2,y:B-L/2+u.height+k}]:M=[{x:A-g/2,y:B-L/2},{x:A+g/2,y:B-L/2},{x:A+g/2,y:B-L/2+f},{x:A+u.width/2,y:B-L/2+f},{x:A+u.width/2/2,y:B+L/2},{x:A-u.width/2,y:B+L/2},{x:A-u.width/2,y:B-L/2+f},{x:A-g/2,y:B-L/2+f}],H.polygon(e,M,D)},h}l(i$,"icon");async function a$(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=K(e);e.labelStyle=a;let n=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(n,s),c=i?.wrappingWidth;e.width=Math.max(o,c??0);let{shapeSvg:h,bbox:u,label:d}=await st(t,e,"icon-shape default"),p=20,f=e.label?8:0,g=e.pos==="t",{nodeBorder:y,mainBkg:m}=r,{stylesMap:x}=oa(e),b=Q.svg(h),k=J(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=x.get("fill");k.stroke=_??m;let w=h.append("g");e.icon&&w.html(`<g>${await En(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);let $=w.node().getBBox(),T=$.width,O=$.height,R=$.x,I=$.y,S=Math.max(T,O)*Math.SQRT2+p*2,D=b.circle(0,0,S,k),A=Math.max(S,u.width),B=S+u.height+f,L=b.rectangle(-A/2,-B/2,A,B,{...k,fill:"transparent",stroke:"none"}),M=h.insert(()=>D,":first-child"),E=h.insert(()=>L);return w.attr("transform",`translate(${-T/2-R},${g?u.height/2+f/2-O/2-I:-u.height/2-f/2-O/2-I})`),w.attr("style",`color: ${x.get("stroke")??y};`),d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-B/2:B/2-u.height})`),M.attr("transform",`translate(0,${g?u.height/2+f/2:-u.height/2-f/2})`),tt(e,E),e.intersect=function(F){return P.info("iconSquare intersect",e,F),H.rect(e,F)},h}l(a$,"iconCircle");async function n$(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=K(e);e.labelStyle=a;let n=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(n,s),c=i?.wrappingWidth;e.width=Math.max(o,c??0);let{shapeSvg:h,bbox:u,halfPadding:d,label:p}=await st(t,e,"icon-shape default"),f=e.pos==="t",g=o+d*2,y=o+d*2,{nodeBorder:m,mainBkg:x}=r,{stylesMap:b}=oa(e),k=-y/2,_=-g/2,w=e.label?8:0,$=Q.svg(h),T=J(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let O=b.get("fill");T.stroke=O??x;let R=$.path(Cr(k,_,y,g,5),T),I=Math.max(y,u.width),S=g+u.height+w,D=$.rectangle(-I/2,-S/2,I,S,{...T,fill:"transparent",stroke:"none"}),A=h.insert(()=>R,":first-child").attr("class","icon-shape2"),B=h.insert(()=>D);if(e.icon){let L=h.append("g");L.html(`<g>${await En(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);let M=L.node().getBBox(),E=M.width,F=M.height,z=M.x,V=M.y;L.attr("transform",`translate(${-E/2-z},${f?u.height/2+w/2-F/2-V:-u.height/2-w/2-F/2-V})`),L.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-S/2:S/2-u.height})`),A.attr("transform",`translate(0,${f?u.height/2+w/2:-u.height/2-w/2})`),tt(e,B),e.intersect=function(L){if(P.info("iconSquare intersect",e,L),!e.label)return H.rect(e,L);let M=e.x??0,E=e.y??0,F=e.height??0,z=[];return f?z=[{x:M-u.width/2,y:E-F/2},{x:M+u.width/2,y:E-F/2},{x:M+u.width/2,y:E-F/2+u.height+w},{x:M+y/2,y:E-F/2+u.height+w},{x:M+y/2,y:E+F/2},{x:M-y/2,y:E+F/2},{x:M-y/2,y:E-F/2+u.height+w},{x:M-u.width/2,y:E-F/2+u.height+w}]:z=[{x:M-y/2,y:E-F/2},{x:M+y/2,y:E-F/2},{x:M+y/2,y:E-F/2+g},{x:M+u.width/2,y:E-F/2+g},{x:M+u.width/2/2,y:E+F/2},{x:M-u.width/2,y:E+F/2},{x:M-u.width/2,y:E-F/2+g},{x:M-y/2,y:E-F/2+g}],H.polygon(e,z,L)},h}l(n$,"iconRounded");async function o$(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=K(e);e.labelStyle=a;let n=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(n,s),c=i?.wrappingWidth;e.width=Math.max(o,c??0);let{shapeSvg:h,bbox:u,halfPadding:d,label:p}=await st(t,e,"icon-shape default"),f=e.pos==="t",g=o+d*2,y=o+d*2,{nodeBorder:m,mainBkg:x}=r,{stylesMap:b}=oa(e),k=-y/2,_=-g/2,w=e.label?8:0,$=Q.svg(h),T=J(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let O=b.get("fill");T.stroke=O??x;let R=$.path(Cr(k,_,y,g,.1),T),I=Math.max(y,u.width),S=g+u.height+w,D=$.rectangle(-I/2,-S/2,I,S,{...T,fill:"transparent",stroke:"none"}),A=h.insert(()=>R,":first-child"),B=h.insert(()=>D);if(e.icon){let L=h.append("g");L.html(`<g>${await En(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);let M=L.node().getBBox(),E=M.width,F=M.height,z=M.x,V=M.y;L.attr("transform",`translate(${-E/2-z},${f?u.height/2+w/2-F/2-V:-u.height/2-w/2-F/2-V})`),L.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-S/2:S/2-u.height})`),A.attr("transform",`translate(0,${f?u.height/2+w/2:-u.height/2-w/2})`),tt(e,B),e.intersect=function(L){if(P.info("iconSquare intersect",e,L),!e.label)return H.rect(e,L);let M=e.x??0,E=e.y??0,F=e.height??0,z=[];return f?z=[{x:M-u.width/2,y:E-F/2},{x:M+u.width/2,y:E-F/2},{x:M+u.width/2,y:E-F/2+u.height+w},{x:M+y/2,y:E-F/2+u.height+w},{x:M+y/2,y:E+F/2},{x:M-y/2,y:E+F/2},{x:M-y/2,y:E-F/2+u.height+w},{x:M-u.width/2,y:E-F/2+u.height+w}]:z=[{x:M-y/2,y:E-F/2},{x:M+y/2,y:E-F/2},{x:M+y/2,y:E-F/2+g},{x:M+u.width/2,y:E-F/2+g},{x:M+u.width/2/2,y:E+F/2},{x:M-u.width/2,y:E+F/2},{x:M-u.width/2,y:E-F/2+g},{x:M-y/2,y:E-F/2+g}],H.polygon(e,z,L)},h}l(o$,"iconSquare");async function s$(t,e,{config:{flowchart:r}}){let i=new Image;i.src=e?.img??"",await i.decode();let a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/n;let{labelStyles:s}=K(e);e.labelStyle=s;let o=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let c=Math.max(e.label?o??0:0,e?.assetWidth??a),h=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:c,u=e.constraint==="on"?h/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(h,o??0);let{shapeSvg:d,bbox:p,label:f}=await st(t,e,"image-shape default"),g=e.pos==="t",y=-h/2,m=-u/2,x=e.label?8:0,b=Q.svg(d),k=J(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=b.rectangle(y,m,h,u,k),w=Math.max(h,p.width),$=u+p.height+x,T=b.rectangle(-w/2,-$/2,w,$,{...k,fill:"none",stroke:"none"}),O=d.insert(()=>_,":first-child"),R=d.insert(()=>T);if(e.img){let I=d.append("image");I.attr("href",e.img),I.attr("width",h),I.attr("height",u),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-h/2},${g?$/2-u:-$/2})`)}return f.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-u/2-p.height/2-x/2:u/2-p.height/2+x/2})`),O.attr("transform",`translate(0,${g?p.height/2+x/2:-p.height/2-x/2})`),tt(e,R),e.intersect=function(I){if(P.info("iconSquare intersect",e,I),!e.label)return H.rect(e,I);let S=e.x??0,D=e.y??0,A=e.height??0,B=[];return g?B=[{x:S-p.width/2,y:D-A/2},{x:S+p.width/2,y:D-A/2},{x:S+p.width/2,y:D-A/2+p.height+x},{x:S+h/2,y:D-A/2+p.height+x},{x:S+h/2,y:D+A/2},{x:S-h/2,y:D+A/2},{x:S-h/2,y:D-A/2+p.height+x},{x:S-p.width/2,y:D-A/2+p.height+x}]:B=[{x:S-h/2,y:D-A/2},{x:S+h/2,y:D-A/2},{x:S+h/2,y:D-A/2+u},{x:S+p.width/2,y:D-A/2+u},{x:S+p.width/2/2,y:D+A/2},{x:S-p.width/2,y:D+A/2},{x:S-p.width/2,y:D-A/2+u},{x:S-h/2,y:D-A/2+u}],H.polygon(e,B,I)},d}l(s$,"imageSquare");async function l$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),c=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],h,{cssStyles:u}=e;if(e.look==="handDrawn"){let d=Q.svg(a),p=J(e,{}),f=pt(c),g=d.path(f,p);h=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&h.attr("style",u)}else h=ir(a,s,o,c);return i&&h.attr("style",i),e.width=s,e.height=o,tt(e,h),e.intersect=function(d){return H.polygon(e,c,d)},a}l(l$,"inv_trapezoid");async function On(t,e,r){let{labelStyles:i,nodeStyles:a}=K(e);e.labelStyle=i;let{shapeSvg:n,bbox:s}=await st(t,e,ot(e)),o=Math.max(s.width+r.labelPaddingX*2,e?.width||0),c=Math.max(s.height+r.labelPaddingY*2,e?.height||0),h=-o/2,u=-c/2,d,{rx:p,ry:f}=e,{cssStyles:g}=e;if(r?.rx&&r.ry&&(p=r.rx,f=r.ry),e.look==="handDrawn"){let y=Q.svg(n),m=J(e,{}),x=p||f?y.path(Cr(h,u,o,c,p||0),m):y.rectangle(h,u,o,c,m);d=n.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",Xt(g))}else d=n.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",Xt(p)).attr("ry",Xt(f)).attr("x",h).attr("y",u).attr("width",o).attr("height",c);return tt(e,d),e.calcIntersect=function(y,m){return H.rect(y,m)},e.intersect=function(y){return H.rect(e,y)},n}l(On,"drawRect");async function h$(t,e){let{shapeSvg:r,bbox:i,label:a}=await st(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),tt(e,n),e.intersect=function(s){return H.rect(e,s)},r}l(h$,"labelRect");async function c$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=Math.max(n.width+(e.padding??0),e?.width??0),o=Math.max(n.height+(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}],h,{cssStyles:u}=e;if(e.look==="handDrawn"){let d=Q.svg(a),p=J(e,{}),f=pt(c),g=d.path(f,p);h=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&h.attr("style",u)}else h=ir(a,s,o,c);return i&&h.attr("style",i),e.width=s,e.height=o,tt(e,h),e.intersect=function(d){return H.polygon(e,c,d)},a}l(c$,"lean_left");async function u$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=Math.max(n.width+(e.padding??0),e?.width??0),o=Math.max(n.height+(e.padding??0),e?.height??0),c=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],h,{cssStyles:u}=e;if(e.look==="handDrawn"){let d=Q.svg(a),p=J(e,{}),f=pt(c),g=d.path(f,p);h=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&h.attr("style",u)}else h=ir(a,s,o,c);return i&&h.attr("style",i),e.width=s,e.height=o,tt(e,h),e.intersect=function(d){return H.polygon(e,c,d)},a}l(u$,"lean_right");function d$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.label="",e.labelStyle=r;let a=t.insert("g").attr("class",ot(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),c=7,h=[{x:s,y:0},{x:0,y:o+c/2},{x:s-2*c,y:o+c/2},{x:0,y:2*o},{x:s,y:o-c/2},{x:2*c,y:o-c/2}],u=Q.svg(a),d=J(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=pt(h),f=u.path(p,d),g=a.insert(()=>f,":first-child");return n&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",n),i&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),tt(e,g),e.intersect=function(y){return P.info("lightningBolt intersect",e,y),H.polygon(e,h,y)},a}l(d$,"lightningBolt");var gL=l((t,e,r,i,a,n,s)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${t},${e+n+s}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),yL=l((t,e,r,i,a,n,s)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${t},${e+n+s}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),mL=l((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function p$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0),e.width??0),c=o/2,h=c/(2.5+o/50),u=Math.max(n.height+h+(e.padding??0),e.height??0),d=u*.1,p,{cssStyles:f}=e;if(e.look==="handDrawn"){let g=Q.svg(a),y=yL(0,0,o,u,c,h,d),m=mL(0,h,o,u,c,h),x=J(e,{}),b=g.path(y,x),k=g.path(m,x);a.insert(()=>k,":first-child").attr("class","line"),p=a.insert(()=>b,":first-child"),p.attr("class","basic label-container"),f&&p.attr("style",f)}else{let g=gL(0,0,o,u,c,h,d);p=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Xt(f)).attr("style",i)}return p.attr("label-offset-y",h),p.attr("transform",`translate(${-o/2}, ${-(u/2+h)})`),tt(e,p),s.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+h-(n.y-(n.top??0))})`),e.intersect=function(g){let y=H.rect(e,g),m=y.x-(e.x??0);if(c!=0&&(Math.abs(m)<(e.width??0)/2||Math.abs(m)==(e.width??0)/2&&Math.abs(y.y-(e.y??0))>(e.height??0)/2-h)){let x=h*h*(1-m*m/(c*c));x>0&&(x=Math.sqrt(x)),x=h-x,g.y-(e.y??0)>0&&(x=-x),y.y+=x}return y},a}l(p$,"linedCylinder");async function f$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=c/4,u=c+h,{cssStyles:d}=e,p=Q.svg(a),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=[{x:-o/2-o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:u/2},...yr(-o/2-o/2*.1,u/2,o/2+o/2*.1,u/2,h,.8),{x:o/2+o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:-u/2},{x:-o/2,y:-u/2},{x:-o/2,y:u/2*1.1},{x:-o/2,y:-u/2}],y=p.polygon(g.map(x=>[x.x,x.y]),f),m=a.insert(()=>y,":first-child");return m.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),tt(e,m),e.intersect=function(x){return H.polygon(e,g,x)},a}l(f$,"linedWaveEdgedRect");async function g$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=5,u=-o/2,d=-c/2,{cssStyles:p}=e,f=Q.svg(a),g=J(e,{}),y=[{x:u-h,y:d+h},{x:u-h,y:d+c+h},{x:u+o-h,y:d+c+h},{x:u+o-h,y:d+c},{x:u+o,y:d+c},{x:u+o,y:d+c-h},{x:u+o+h,y:d+c-h},{x:u+o+h,y:d-h},{x:u+h,y:d-h},{x:u+h,y:d},{x:u,y:d},{x:u,y:d+h}],m=[{x:u,y:d+h},{x:u+o-h,y:d+h},{x:u+o-h,y:d+c},{x:u+o,y:d+c},{x:u+o,y:d},{x:u,y:d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=pt(y),b=f.path(x,g),k=pt(m),_=f.path(k,{...g,fill:"none"}),w=a.insert(()=>_,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(n.width/2)-h-(n.x-(n.left??0))}, ${-(n.height/2)+h-(n.y-(n.top??0))})`),tt(e,w),e.intersect=function($){return H.polygon(e,y,$)},a}l(g$,"multiRect");async function y$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=c/4,u=c+h,d=-o/2,p=-u/2,f=5,{cssStyles:g}=e,y=yr(d-f,p+u+f,d+o-f,p+u+f,h,.8),m=y?.[y.length-1],x=[{x:d-f,y:p+f},{x:d-f,y:p+u+f},...y,{x:d+o-f,y:m.y-f},{x:d+o,y:m.y-f},{x:d+o,y:m.y-2*f},{x:d+o+f,y:m.y-2*f},{x:d+o+f,y:p-f},{x:d+f,y:p-f},{x:d+f,y:p},{x:d,y:p},{x:d,y:p+f}],b=[{x:d,y:p+f},{x:d+o-f,y:p+f},{x:d+o-f,y:m.y-f},{x:d+o,y:m.y-f},{x:d+o,y:p},{x:d,y:p}],k=Q.svg(a),_=J(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let w=pt(x),$=k.path(w,_),T=pt(b),O=k.path(T,_),R=a.insert(()=>$,":first-child");return R.insert(()=>O),R.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",g),i&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-(n.width/2)-f-(n.x-(n.left??0))}, ${-(n.height/2)+f-h/2-(n.y-(n.top??0))})`),tt(e,R),e.intersect=function(I){return H.polygon(e,x,I)},a}l(y$,"multiWaveEdgedRectangle");async function m$(t,e,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=K(e);e.labelStyle=i,e.useHtmlLabels||Zt(Vt())||(e.centerLabel=!0);let{shapeSvg:n,bbox:s,label:o}=await st(t,e,ot(e)),c=Math.max(s.width+(e.padding??0)*2,e?.width??0),h=Math.max(s.height+(e.padding??0)*2,e?.height??0),u=-c/2,d=-h/2,{cssStyles:p}=e,f=Q.svg(n),g=J(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=f.rectangle(u,d,c,h,g),m=n.insert(()=>y,":first-child");return m.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",p),a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),tt(e,m),e.intersect=function(x){return H.rect(e,x)},n}l(m$,"note");var xL=l((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function x$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=n.width+e.padding,o=n.height+e.padding,c=s+o,h=.5,u=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let f=Q.svg(a),g=J(e,{}),y=xL(0,0,c),m=f.path(y,g);d=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2+h}, ${c/2})`),p&&d.attr("style",p)}else d=ir(a,c,c,u),d.attr("transform",`translate(${-c/2+h}, ${c/2})`);return i&&d.attr("style",i),tt(e,d),e.calcIntersect=function(f,g){let y=f.width,m=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=H.polygon(f,m,g);return{x:x.x-.5,y:x.y-.5}},e.intersect=function(f){return this.calcIntersect(e,f)},a}l(x$,"question");async function b$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0),e?.width??0),c=Math.max(n.height+(e.padding??0),e?.height??0),h=-o/2,u=-c/2,d=u/2,p=[{x:h+d,y:u},{x:h,y:0},{x:h+d,y:-u},{x:-h,y:-u},{x:-h,y:u}],{cssStyles:f}=e,g=Q.svg(a),y=J(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=pt(p),x=g.path(m,y),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-d/2},0)`),s.attr("transform",`translate(${-d/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),tt(e,b),e.intersect=function(k){return H.polygon(e,p,k)},a}l(b$,"rect_left_inv_arrow");async function k$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";let n=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=n.insert("g"),o=n.insert("g").attr("class","label").attr("style",i),c=e.description,h=e.label,u=await lr(o,h,e.labelStyle,!0,!0),d={width:0,height:0};if(Zt(xt())){let O=u.children[0],R=ut(u);d=O.getBoundingClientRect(),R.attr("width",d.width),R.attr("height",d.height)}P.info("Text 2",c);let p=c||[],f=u.getBBox(),g=await lr(o,Array.isArray(p)?p.join("<br/>"):p,e.labelStyle,!0,!0),y=g.children[0],m=ut(g);d=y.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height);let x=(e.padding||0)/2;ut(g).attr("transform","translate( "+(d.width>f.width?0:(f.width-d.width)/2)+", "+(f.height+x+5)+")"),ut(u).attr("transform","translate( "+(d.width<f.width?0:-(f.width-d.width)/2)+", 0)"),d=o.node().getBBox(),o.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");let b=d.width+(e.padding||0),k=d.height+(e.padding||0),_=-d.width/2-x,w=-d.height/2-x,$,T;if(e.look==="handDrawn"){let O=Q.svg(n),R=J(e,{}),I=O.path(Cr(_,w,b,k,e.rx||0),R),S=O.line(-d.width/2-x,-d.height/2-x+f.height+x,d.width/2+x,-d.height/2-x+f.height+x,R);T=n.insert(()=>(P.debug("Rough node insert CXC",I),S),":first-child"),$=n.insert(()=>(P.debug("Rough node insert CXC",I),I),":first-child")}else $=s.insert("rect",":first-child"),T=s.insert("line"),$.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),T.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+f.height+x).attr("y2",-d.height/2-x+f.height+x);return tt(e,$),e.intersect=function(O){return H.rect(e,O)},n}l(k$,"rectWithTitle");async function C$(t,e){let r={rx:5,ry:5,labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return On(t,e,r)}l(C$,"roundedRect");async function $$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=e?.padding??0,c=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),u=-n.width/2-o,d=-n.height/2-o,{cssStyles:p}=e,f=Q.svg(a),g=J(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:u,y:d},{x:u+c+8,y:d},{x:u+c+8,y:d+h},{x:u-8,y:d+h},{x:u-8,y:d},{x:u,y:d},{x:u,y:d+h}],m=f.polygon(y.map(b=>[b.x,b.y]),g),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container").attr("style",Xt(p)),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${-c/2+4+(e.padding??0)-(n.x-(n.left??0))},${-h/2+(e.padding??0)-(n.y-(n.top??0))})`),tt(e,x),e.intersect=function(b){return H.rect(e,b)},a}l($$,"shadedProcess");async function w$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=-o/2,u=-c/2,{cssStyles:d}=e,p=Q.svg(a),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=[{x:h,y:u},{x:h,y:u+c},{x:h+o,y:u+c},{x:h+o,y:u-c/2}],y=pt(g),m=p.path(y,f),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${c/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(n.x-(n.left??0))}, ${-c/4+(e.padding??0)-(n.y-(n.top??0))})`),tt(e,x),e.intersect=function(b){return H.polygon(e,g,b)},a}l(w$,"slopedRect");async function v$(t,e){let r={rx:0,ry:0,labelPaddingX:e.labelPaddingX??(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return On(t,e,r)}l(v$,"squareRect");async function _$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=n.height+e.padding,o=n.width+s/4+e.padding,c=s/2,{cssStyles:h}=e,u=Q.svg(a),d=J(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-o/2+c,y:-s/2},{x:o/2-c,y:-s/2},...yn(-o/2+c,0,c,50,90,270),{x:o/2-c,y:s/2},...yn(o/2-c,0,c,50,270,450)],f=pt(p),g=u.path(f,d),y=a.insert(()=>g,":first-child");return y.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),tt(e,y),e.intersect=function(m){return H.polygon(e,p,m)},a}l(_$,"stadium");async function S$(t,e){return On(t,e,{rx:5,ry:5})}l(S$,"state");function T$(t,e,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=K(e);e.labelStyle=i;let{cssStyles:n}=e,{lineColor:s,stateBorder:o,nodeBorder:c}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),u=Q.svg(h),d=J(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=u.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),f=o??c,g=u.circle(0,0,5,{...d,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),y=h.insert(()=>p,":first-child");return y.insert(()=>g),n&&y.selectAll("path").attr("style",n),a&&y.selectAll("path").attr("style",a),tt(e,y),e.intersect=function(m){return H.circle(e,7,m)},h}l(T$,"stateEnd");function M$(t,e,{config:{themeVariables:r}}){let{lineColor:i}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n;if(e.look==="handDrawn"){let s=Q.svg(a).circle(0,0,14,tA(i));n=a.insert(()=>s),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return tt(e,n),e.intersect=function(s){return H.circle(e,7,s)},a}l(M$,"stateStart");async function B$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=(e?.padding||0)/2,o=n.width+e.padding,c=n.height+e.padding,h=-n.width/2-s,u=-n.height/2-s,d=[{x:0,y:0},{x:o,y:0},{x:o,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(e.look==="handDrawn"){let p=Q.svg(a),f=J(e,{}),g=p.rectangle(h-8,u,o+16,c,f),y=p.line(h,u,h,u+c,f),m=p.line(h+o,u,h+o,u+c,f);a.insert(()=>y,":first-child"),a.insert(()=>m,":first-child");let x=a.insert(()=>g,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",Xt(b)),tt(e,x)}else{let p=ir(a,o,c,d);i&&p.attr("style",i),tt(e,p)}return e.intersect=function(p){return H.polygon(e,d,p)},a}l(B$,"subroutine");async function A$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),c=-s/2,h=-o/2,u=.2*o,d=.2*o,{cssStyles:p}=e,f=Q.svg(a),g=J(e,{}),y=[{x:c-u/2,y:h},{x:c+s+u/2,y:h},{x:c+s+u/2,y:h+o},{x:c-u/2,y:h+o}],m=[{x:c+s-u/2,y:h+o},{x:c+s+u/2,y:h+o},{x:c+s+u/2,y:h+o-d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=pt(y),b=f.path(x,g),k=pt(m),_=f.path(k,{...g,fillStyle:"solid"}),w=a.insert(()=>_,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),tt(e,w),e.intersect=function($){return H.polygon(e,y,$)},a}l(A$,"taggedRect");async function L$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=c/4,u=.2*o,d=.2*c,p=c+h,{cssStyles:f}=e,g=Q.svg(a),y=J(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=[{x:-o/2-o/2*.1,y:p/2},...yr(-o/2-o/2*.1,p/2,o/2+o/2*.1,p/2,h,.8),{x:o/2+o/2*.1,y:-p/2},{x:-o/2-o/2*.1,y:-p/2}],x=-o/2+o/2*.1,b=-p/2-d*.4,k=[{x:x+o-u,y:(b+c)*1.4},{x:x+o,y:b+c-d},{x:x+o,y:(b+c)*.9},...yr(x+o,(b+c)*1.3,x+o-u,(b+c)*1.5,-c*.03,.5)],_=pt(m),w=g.path(_,y),$=pt(k),T=g.path($,{...y,fillStyle:"solid"}),O=a.insert(()=>T,":first-child");return O.insert(()=>w,":first-child"),O.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(n.x-(n.left??0))},${-c/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),tt(e,O),e.intersect=function(R){return H.polygon(e,m,R)},a}l(L$,"taggedWaveEdgedRectangle");async function F$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=Math.max(n.width+e.padding,e?.width||0),o=Math.max(n.height+e.padding,e?.height||0),c=-s/2,h=-o/2,u=a.insert("rect",":first-child");return u.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",s).attr("height",o),tt(e,u),e.intersect=function(d){return H.rect(e,d)},a}l(F$,"text");var bL=l((t,e,r,i,a,n)=>`M${t},${e}
a${a},${n} 0,0,1 0,${-i}
l${r},0
a${a},${n} 0,0,1 0,${i}
M${r},${-i}
a${a},${n} 0,0,0 0,${i}
l${-r},0`,"createCylinderPathD"),kL=l((t,e,r,i,a,n)=>[`M${t},${e}`,`M${t+r},${e}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),CL=l((t,e,r,i,a,n)=>[`M${t+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function E$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s,halfPadding:o}=await st(t,e,ot(e)),c=e.look==="neo"?o*2:o,h=n.height+c,u=h/2,d=u/(2.5+h/50),p=n.width+d+c,{cssStyles:f}=e,g;if(e.look==="handDrawn"){let y=Q.svg(a),m=kL(0,0,p,h,d,u),x=CL(0,0,p,h,d,u),b=y.path(m,J(e,{})),k=y.path(x,J(e,{fill:"none"}));g=a.insert(()=>k,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{let y=bL(0,0,p,h,d,u);g=a.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",Xt(f)).attr("style",i),g.attr("class","basic label-container"),f&&g.selectAll("path").attr("style",f),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-p/2}, ${h/2} )`),s.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),tt(e,g),e.intersect=function(y){let m=H.rect(e,y),x=m.y-(e.y??0);if(u!=0&&(Math.abs(x)<(e.height??0)/2||Math.abs(x)==(e.height??0)/2&&Math.abs(m.x-(e.x??0))>(e.width??0)/2-d)){let b=d*d*(1-x*x/(u*u));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,y.x-(e.x??0)>0&&(b=-b),m.x+=b}return m},a}l(E$,"tiltedCylinder");async function D$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=n.width+e.padding,o=n.height+e.padding,c=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],h,{cssStyles:u}=e;if(e.look==="handDrawn"){let d=Q.svg(a),p=J(e,{}),f=pt(c),g=d.path(f,p);h=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&h.attr("style",u)}else h=ir(a,s,o,c);return i&&h.attr("style",i),e.width=s,e.height=o,tt(e,h),e.intersect=function(d){return H.polygon(e,c,d)},a}l(D$,"trapezoid");async function O$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=60,o=20,c=Math.max(s,n.width+(e.padding??0)*2,e?.width??0),h=Math.max(o,n.height+(e.padding??0)*2,e?.height??0),{cssStyles:u}=e,d=Q.svg(a),p=J(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let f=[{x:-c/2*.8,y:-h/2},{x:c/2*.8,y:-h/2},{x:c/2,y:-h/2*.6},{x:c/2,y:h/2},{x:-c/2,y:h/2},{x:-c/2,y:-h/2*.6}],g=pt(f),y=d.path(g,p),m=a.insert(()=>y,":first-child");return m.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",u),i&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),tt(e,m),e.intersect=function(x){return H.polygon(e,f,x)},a}l(O$,"trapezoidalPentagon");async function I$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=e.useHtmlLabels||Zt(xt()),c=n.width+(e.padding??0),h=c+n.height,u=c+n.height,d=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-h}],{cssStyles:p}=e,f=Q.svg(a),g=J(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=pt(d),m=f.path(y,g),x=a.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return p&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",p),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),e.width=c,e.height=h,tt(e,x),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${h/2-(n.height+(e.padding??0)/(o?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(b){return P.info("Triangle intersect",e,d,b),H.polygon(e,d,b)},a}l(I$,"triangle");async function P$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=c/8,u=c+h,{cssStyles:d}=e,p=70-o,f=p>0?p/2:0,g=Q.svg(a),y=J(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=[{x:-o/2-f,y:u/2},...yr(-o/2-f,u/2,o/2+f,u/2,h,.8),{x:o/2+f,y:-u/2},{x:-o/2-f,y:-u/2}],x=pt(m),b=g.path(x,y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(n.x-(n.left??0))},${-c/2+(e.padding??0)-h-(n.y-(n.top??0))})`),tt(e,k),e.intersect=function(_){return H.polygon(e,m,_)},a}l(P$,"waveEdgedRectangle");async function R$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=100,o=50,c=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),u=c/h,d=c,p=h;d>p*u?p=d/u:d=p*u,d=Math.max(d,s),p=Math.max(p,o);let f=Math.min(p*.2,p/4),g=p+f*2,{cssStyles:y}=e,m=Q.svg(a),x=J(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-d/2,y:g/2},...yr(-d/2,g/2,d/2,g/2,f,1),{x:d/2,y:-g/2},...yr(d/2,-g/2,-d/2,-g/2,f,-1)],k=pt(b),_=m.path(k,x),w=a.insert(()=>_,":first-child");return w.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),tt(e,w),e.intersect=function($){return H.polygon(e,b,$)},a}l(R$,"waveRectangle");async function N$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=5,u=-o/2,d=-c/2,{cssStyles:p}=e,f=Q.svg(a),g=J(e,{}),y=[{x:u-h,y:d-h},{x:u-h,y:d+c},{x:u+o,y:d+c},{x:u+o,y:d-h}],m=`M${u-h},${d-h} L${u+o},${d-h} L${u+o},${d+c} L${u-h},${d+c} L${u-h},${d-h}
M${u-h},${d} L${u+o},${d}
M${u},${d-h} L${u},${d+c}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=f.path(m,g),b=a.insert(()=>x,":first-child");return b.attr("transform",`translate(${h/2}, ${h/2})`),b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(n.width/2)+h/2-(n.x-(n.left??0))}, ${-(n.height/2)+h/2-(n.y-(n.top??0))})`),tt(e,b),e.intersect=function(k){return H.polygon(e,y,k)},a}l(N$,"windowPane");async function gd(t,e){let r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){let{themeVariables:Z}=Vt(),{background:U}=Z,ct={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${U}`]};await gd(t,ct)}let i=Vt();e.useHtmlLabels=i.htmlLabels;let a=i.er?.diagramPadding??10,n=i.er?.entityPadding??6,{cssStyles:s}=e,{labelStyles:o,nodeStyles:c}=K(e);if(r.attributes.length===0&&e.label){let Z={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5};Ke(e.label,i)+Z.labelPaddingX*2<i.er.minEntityWidth&&(e.width=i.er.minEntityWidth);let U=await On(t,e,Z);if(!kr(i.htmlLabels)){let ct=U.select("text"),et=ct.node()?.getBBox();ct.attr("transform",`translate(${-et.width/2}, 0)`)}return U}i.htmlLabels||(a*=1.25,n*=1.25);let h=ot(e);h||(h="node default");let u=t.insert("g").attr("class",h).attr("id",e.domId||e.id),d=await di(u,e.label??"",i,0,0,["name"],o);d.height+=n;let p=0,f=[],g=[],y=0,m=0,x=0,b=0,k=!0,_=!0;for(let Z of r.attributes){let U=await di(u,Z.type,i,0,p,["attribute-type"],o);y=Math.max(y,U.width+a);let ct=await di(u,Z.name,i,0,p,["attribute-name"],o);m=Math.max(m,ct.width+a);let et=await di(u,Z.keys.join(),i,0,p,["attribute-keys"],o);x=Math.max(x,et.width+a);let wt=await di(u,Z.comment,i,0,p,["attribute-comment"],o);b=Math.max(b,wt.width+a);let Ct=Math.max(U.height,ct.height,et.height,wt.height)+n;g.push({yOffset:p,rowHeight:Ct}),p+=Ct}let w=4;x<=a&&(k=!1,x=0,w--),b<=a&&(_=!1,b=0,w--);let $=u.node().getBBox();if(d.width+a*2-(y+m+x+b)>0){let Z=d.width+a*2-(y+m+x+b);y+=Z/w,m+=Z/w,x>0&&(x+=Z/w),b>0&&(b+=Z/w)}let T=y+m+x+b,O=Q.svg(u),R=J(e,{});e.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let I=0;g.length>0&&(I=g.reduce((Z,U)=>Z+(U?.rowHeight??0),0));let S=Math.max($.width+a*2,e?.width||0,T),D=Math.max((I??0)+d.height,e?.height||0),A=-S/2,B=-D/2;u.selectAll("g:not(:first-child)").each((Z,U,ct)=>{let et=ut(ct[U]),wt=et.attr("transform"),Ct=0,Tt=0;if(wt){let q=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(wt);q&&(Ct=parseFloat(q[1]),Tt=parseFloat(q[2]),et.attr("class").includes("attribute-name")?Ct+=y:et.attr("class").includes("attribute-keys")?Ct+=y+m:et.attr("class").includes("attribute-comment")&&(Ct+=y+m+x))}et.attr("transform",`translate(${A+a/2+Ct}, ${Tt+B+d.height+n/2})`)}),u.select(".name").attr("transform","translate("+-d.width/2+", "+(B+n/2)+")");let L=O.rectangle(A,B,S,D,R),M=u.insert(()=>L,":first-child").attr("style",s.join("")),{themeVariables:E}=Vt(),{rowEven:F,rowOdd:z,nodeBorder:V}=E;f.push(0);for(let[Z,U]of g.entries()){let ct=(Z+1)%2===0&&U.yOffset!==0,et=O.rectangle(A,d.height+B+U?.yOffset,S,U?.rowHeight,{...R,fill:ct?F:z,stroke:V});u.insert(()=>et,"g.label").attr("style",s.join("")).attr("class",`row-rect-${ct?"even":"odd"}`)}let G=O.line(A,d.height+B,S+A,d.height+B,R);u.insert(()=>G).attr("class","divider"),G=O.line(y+A,d.height+B,y+A,D+B,R),u.insert(()=>G).attr("class","divider"),k&&(G=O.line(y+m+A,d.height+B,y+m+A,D+B,R),u.insert(()=>G).attr("class","divider")),_&&(G=O.line(y+m+x+A,d.height+B,y+m+x+A,D+B,R),u.insert(()=>G).attr("class","divider"));for(let Z of f)G=O.line(A,d.height+B+Z,S+A,d.height+B+Z,R),u.insert(()=>G).attr("class","divider");if(tt(e,M),c&&e.look!=="handDrawn"){let Z=c.split(";")?.filter(U=>U.includes("stroke"))?.map(U=>`${U}`).join("; ");u.selectAll("path").attr("style",Z??""),u.selectAll(".row-rect-even path").attr("style",c)}return e.intersect=function(Z){return H.rect(e,Z)},u}l(gd,"erBox");async function di(t,e,r,i=0,a=0,n=[],s=""){let o=t.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",s);e!==sp(e)&&(e=sp(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;"));let c=o.node().appendChild(await rr(o,e,{width:Ke(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let u=c.children[0];for(u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");u.childNodes[0];)u=u.childNodes[0],u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let h=c.getBBox();if(kr(r.htmlLabels)){let u=c.children[0];u.style.textAlign="start";let d=ut(c);h=u.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}l(di,"addText");async function z$(t,e,r,i,a=r.class.padding??12){let n=i?0:3,s=t.insert("g").attr("class",ot(e)).attr("id",e.domId||e.id),o=null,c=null,h=null,u=null,d=0,p=0,f=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let b=e.annotations[0];await Ma(o,{text:`«${b}»`},0),d=o.node().getBBox().height}c=s.insert("g").attr("class","label-group text"),await Ma(c,e,0,["font-weight: bolder"]);let g=c.node().getBBox();p=g.height,h=s.insert("g").attr("class","members-group text");let y=0;for(let b of e.members){let k=await Ma(h,b,y,[b.parseClassifier()]);y+=k+n}f=h.node().getBBox().height,f<=0&&(f=a/2),u=s.insert("g").attr("class","methods-group text");let m=0;for(let b of e.methods){let k=await Ma(u,b,m,[b.parseClassifier()]);m+=k+n}let x=s.node().getBBox();if(o!==null){let b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-g.width/2}, ${d})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+a*2})`),x=s.node().getBBox(),u.attr("transform",`translate(0, ${d+p+(f?f+a*4:a*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}l(z$,"textHelper");async function Ma(t,e,r,i=[]){let a=t.insert("g").attr("class","label").attr("style",i.join("; ")),n=Vt(),s="useHtmlLabels"in e?e.useHtmlLabels:kr(n.htmlLabels)??!0,o="";"text"in e?o=e.text:o=e.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),on(o)&&(s=!0);let c=await rr(a,Tu(aa(o)),{width:Ke(o,n)+50,classes:"markdown-node-label",useHtmlLabels:s},n),h,u=1;if(s){let d=c.children[0],p=ut(c);u=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(u+=d.innerHTML.split("<mrow>").length-1);let f=d.getElementsByTagName("img");if(f){let g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(y=>new Promise(m=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=n.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,k=parseInt(b,10)*5+"px";y.style.minWidth=k,y.style.maxWidth=k}else y.style.width="100%";m(y)}l(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ut(c).selectAll("tspan").attr("font-weight",""),u=c.children.length;let d=c.children[0];(c.textContent===""||c.textContent.includes("&gt"))&&(d.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),o[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=c.getBBox()}return a.attr("transform","translate(0,"+(-h.height/(2*u)+r)+")"),h.height}l(Ma,"addText");async function q$(t,e){let r=xt(),i=r.class.padding??12,a=i,n=e.useHtmlLabels??kr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:o,bbox:c}=await z$(t,e,r,n,a),{labelStyles:h,nodeStyles:u}=K(e);e.labelStyle=h,e.cssStyles=s.styles||"";let d=s.styles?.join(";")||u||"";e.cssStyles||(e.cssStyles=d.replaceAll("!important","").split(";"));let p=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,f=Q.svg(o),g=J(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=c.width,m=c.height;s.members.length===0&&s.methods.length===0?m+=a:s.members.length>0&&s.methods.length===0&&(m+=a*2);let x=-y/2,b=-m/2,k=f.rectangle(x-i,b-i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0),y+2*i,m+2*i+(p?i*2:s.members.length===0&&s.methods.length===0?-i:0),g),_=o.insert(()=>k,":first-child");_.attr("class","basic label-container");let w=_.node().getBBox();o.selectAll(".text").each((R,I,S)=>{let D=ut(S[I]),A=D.attr("transform"),B=0;if(A){let E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);E&&(B=parseFloat(E[2]))}let L=B+b+i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0);n||(L-=4);let M=x;(D.attr("class").includes("label-group")||D.attr("class").includes("annotation-group"))&&(M=-D.node()?.getBBox().width/2||0,o.selectAll("text").each(function(E,F,z){window.getComputedStyle(z[F]).textAnchor==="middle"&&(M=0)})),D.attr("transform",`translate(${M}, ${L})`)});let $=o.select(".annotation-group").node().getBBox().height-(p?i/2:0)||0,T=o.select(".label-group").node().getBBox().height-(p?i/2:0)||0,O=o.select(".members-group").node().getBBox().height-(p?i/2:0)||0;if(s.members.length>0||s.methods.length>0||p){let R=f.line(w.x,$+T+b+i,w.x+w.width,$+T+b+i,g);o.insert(()=>R).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){let R=f.line(w.x,$+T+O+b+a*2+i,w.x+w.width,$+T+O+b+i+a*2,g);o.insert(()=>R).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",d),_.select(":nth-child(2)").attr("style",d),o.selectAll(".divider").select("path").attr("style",d),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",d),!n){let R=RegExp(/color\s*:\s*([^;]*)/),I=R.exec(d);if(I){let S=I[0].replace("color","fill");o.selectAll("tspan").attr("style",S)}else if(h){let S=R.exec(h);if(S){let D=S[0].replace("color","fill");o.selectAll("tspan").attr("style",D)}}}return tt(e,_),e.intersect=function(R){return H.rect(e,R)},o}l(q$,"classBox");async function W$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let a=e,n=e,s=20,o=20,c="verifyMethod"in e,h=ot(e),u=t.insert("g").attr("class",h).attr("id",e.domId??e.id),d;c?d=await Ee(u,`&lt;&lt;${a.type}&gt;&gt;`,0,e.labelStyle):d=await Ee(u,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let p=d,f=await Ee(u,a.name,p,e.labelStyle+"; font-weight: bold;");if(p+=f+o,c){let $=await Ee(u,`${a.requirementId?`ID: ${a.requirementId}`:""}`,p,e.labelStyle);p+=$;let T=await Ee(u,`${a.text?`Text: ${a.text}`:""}`,p,e.labelStyle);p+=T;let O=await Ee(u,`${a.risk?`Risk: ${a.risk}`:""}`,p,e.labelStyle);p+=O,await Ee(u,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,p,e.labelStyle)}else{let $=await Ee(u,`${n.type?`Type: ${n.type}`:""}`,p,e.labelStyle);p+=$,await Ee(u,`${n.docRef?`Doc Ref: ${n.docRef}`:""}`,p,e.labelStyle)}let g=(u.node()?.getBBox().width??200)+s,y=(u.node()?.getBBox().height??200)+s,m=-g/2,x=-y/2,b=Q.svg(u),k=J(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=b.rectangle(m,x,g,y,k),w=u.insert(()=>_,":first-child");if(w.attr("class","basic label-container").attr("style",i),u.selectAll(".label").each(($,T,O)=>{let R=ut(O[T]),I=R.attr("transform"),S=0,D=0;if(I){let L=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);L&&(S=parseFloat(L[1]),D=parseFloat(L[2]))}let A=D-y/2,B=m+s/2;(T===0||T===1)&&(B=S),R.attr("transform",`translate(${B}, ${A+s})`)}),p>d+f+o){let $=b.line(m,x+d+f+o,m+g,x+d+f+o,k);u.insert(()=>$).attr("style",i)}return tt(e,w),e.intersect=function($){return H.rect(e,$)},u}l(W$,"requirementBox");async function Ee(t,e,r,i=""){if(e==="")return 0;let a=t.insert("g").attr("class","label").attr("style",i),n=xt(),s=n.htmlLabels??!0,o=await rr(a,Tu(aa(e)),{width:Ke(e,n)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},n),c;if(s){let h=o.children[0],u=ut(o);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{let h=o.children[0];for(let u of h.children)u.textContent=u.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&u.setAttribute("style",i);c=o.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}l(Ee,"addText");var $L=l(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 j$(t,e,{config:r}){let{labelStyles:i,nodeStyles:a}=K(e);e.labelStyle=i||"";let n=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:o,bbox:c,label:h}=await st(t,e,ot(e)),u=e.padding||10,d="",p;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),p=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));let f={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await vl(p,"ticket"in e&&e.ticket||"",f):{label:g,bbox:y}=await vl(o,"ticket"in e&&e.ticket||"",f);let{label:m,bbox:x}=await vl(o,"assigned"in e&&e.assigned||"",f);e.width=s;let b=10,k=e?.width||0,_=Math.max(y.height,x.height)/2,w=Math.max(c.height+b*2,e?.height||0)+_,$=-k/2,T=-w/2;h.attr("transform","translate("+(u-k/2)+", "+(-_-c.height/2)+")"),g.attr("transform","translate("+(u-k/2)+", "+(-_+c.height/2)+")"),m.attr("transform","translate("+(u+k/2-x.width-2*n)+", "+(-_+c.height/2)+")");let O,{rx:R,ry:I}=e,{cssStyles:S}=e;if(e.look==="handDrawn"){let D=Q.svg(o),A=J(e,{}),B=R||I?D.path(Cr($,T,k,w,R||0),A):D.rectangle($,T,k,w,A);O=o.insert(()=>B,":first-child"),O.attr("class","basic label-container").attr("style",S||null)}else{O=o.insert("rect",":first-child"),O.attr("class","basic label-container __APA__").attr("style",a).attr("rx",R??5).attr("ry",I??5).attr("x",$).attr("y",T).attr("width",k).attr("height",w);let D="priority"in e&&e.priority;if(D){let A=o.append("line"),B=$+2,L=T+Math.floor((R??0)/2),M=T+w-Math.floor((R??0)/2);A.attr("x1",B).attr("y1",L).attr("x2",B).attr("y2",M).attr("stroke-width","4").attr("stroke",$L(D))}}return tt(e,O),e.height=w,e.intersect=function(D){return H.rect(e,D)},o}l(j$,"kanbanItem");async function H$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,halfPadding:s,label:o}=await st(t,e,ot(e)),c=n.width+10*s,h=n.height+8*s,u=.15*c,{cssStyles:d}=e,p=n.width+20,f=n.height+20,g=Math.max(c,p),y=Math.max(h,f);o.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);let m,x=`M0 0
a${u},${u} 1 0,0 ${g*.25},${-1*y*.1}
a${u},${u} 1 0,0 ${g*.25},0
a${u},${u} 1 0,0 ${g*.25},0
a${u},${u} 1 0,0 ${g*.25},${y*.1}
a${u},${u} 1 0,0 ${g*.15},${y*.33}
a${u*.8},${u*.8} 1 0,0 0,${y*.34}
a${u},${u} 1 0,0 ${-1*g*.15},${y*.33}
a${u},${u} 1 0,0 ${-1*g*.25},${y*.15}
a${u},${u} 1 0,0 ${-1*g*.25},0
a${u},${u} 1 0,0 ${-1*g*.25},0
a${u},${u} 1 0,0 ${-1*g*.25},${-1*y*.15}
a${u},${u} 1 0,0 ${-1*g*.1},${-1*y*.33}
a${u*.8},${u*.8} 1 0,0 0,${-1*y*.34}
a${u},${u} 1 0,0 ${g*.1},${-1*y*.33}
H0 V0 Z`;if(e.look==="handDrawn"){let b=Q.svg(a),k=J(e,{}),_=b.path(x,k);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",Xt(d))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return m.attr("transform",`translate(${-g/2}, ${-y/2})`),tt(e,m),e.calcIntersect=function(b,k){return H.rect(b,k)},e.intersect=function(b){return P.info("Bang intersect",e,b),H.rect(e,b)},a}l(H$,"bang");async function U$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,halfPadding:s,label:o}=await st(t,e,ot(e)),c=n.width+2*s,h=n.height+2*s,u=.15*c,d=.25*c,p=.35*c,f=.2*c,{cssStyles:g}=e,y,m=`M0 0
a${u},${u} 0 0,1 ${c*.25},${-1*c*.1}
a${p},${p} 1 0,1 ${c*.4},${-1*c*.1}
a${d},${d} 1 0,1 ${c*.35},${c*.2}
a${u},${u} 1 0,1 ${c*.15},${h*.35}
a${f},${f} 1 0,1 ${-1*c*.15},${h*.65}
a${d},${u} 1 0,1 ${-1*c*.25},${c*.15}
a${p},${p} 1 0,1 ${-1*c*.5},0
a${u},${u} 1 0,1 ${-1*c*.25},${-1*c*.15}
a${u},${u} 1 0,1 ${-1*c*.1},${-1*h*.35}
a${f},${f} 1 0,1 ${c*.1},${-1*h*.65}
H0 V0 Z`;if(e.look==="handDrawn"){let x=Q.svg(a),b=J(e,{}),k=x.path(m,b);y=a.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",Xt(g))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return o.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),y.attr("transform",`translate(${-c/2}, ${-h/2})`),tt(e,y),e.calcIntersect=function(x,b){return H.rect(x,b)},e.intersect=function(x){return P.info("Cloud intersect",e,x),H.rect(e,x)},a}l(U$,"cloud");async function Y$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,halfPadding:s,label:o}=await st(t,e,ot(e)),c=n.width+8*s,h=n.height+2*s,u=5,d=`
M${-c/2} ${h/2-u}
v${-h+2*u}
q0,-${u} ${u},-${u}
h${c-2*u}
q${u},0 ${u},${u}
v${h-2*u}
q0,${u} -${u},${u}
h${-c+2*u}
q-${u},0 -${u},-${u}
Z
`,p=a.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),o.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),a.append(()=>o.node()),tt(e,p),e.calcIntersect=function(f,g){return H.rect(f,g)},e.intersect=function(f){return H.rect(e,f)},a}l(Y$,"defaultMindmapNode");async function V$(t,e){let r={padding:e.padding??0};return fd(t,e,r)}l(V$,"mindmapCircle");var wL=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:v$},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:C$},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:_$},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:B$},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:GC},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:fd},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:H$},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:U$},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:x$},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:e$},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:u$},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:c$},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:D$},{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:l$},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ZC},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:F$},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:zC},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:$$},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:M$},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:T$},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:KC},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:r$},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:HC},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:UC},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:YC},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:d$},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:P$},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:t$},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:E$},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:p$},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:VC},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:XC},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:I$},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:N$},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:QC},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:O$},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:JC},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:w$},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:y$},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:g$},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:NC},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:jC},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:L$},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:A$},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:R$},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:b$},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:f$}],vL=l(()=>{let t=[...Object.entries({state:S$,choice:qC,note:m$,rectWithTitle:k$,labelRect:h$,iconSquare:o$,iconCircle:a$,icon:i$,iconRounded:n$,imageSquare:s$,anchor:RC,kanbanItem:j$,mindmapCircle:V$,defaultMindmapNode:Y$,classBox:q$,erBox:gd,requirementBox:W$}),...wL.flatMap(e=>[e.shortName,..."aliases"in e?e.aliases:[],..."internalAliases"in e?e.internalAliases:[]].map(r=>[r,e.handler]))];return Object.fromEntries(t)},"generateShapeMap"),G$=vL();function _L(t){return t in G$}l(_L,"isValidShape");var Xs=new Map;async function X$(t,e,r){let i,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let n=e.shape?G$[e.shape]:void 0;if(!n)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),a=await n(i,e,r)}else a=await n(t,e,r),i=a;return e.tooltip&&a.attr("title",e.tooltip),Xs.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}l(X$,"insertNode");var LE=l((t,e)=>{Xs.set(e.id,t)},"setNodeElem"),FE=l(()=>{Xs.clear()},"clear"),EE=l(t=>{let e=Xs.get(t.id);P.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,i=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+i-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),i},"positionNode"),SL=l((t,e,r,i,a,n)=>{e.arrowTypeStart&&Ep(t,"start",e.arrowTypeStart,r,i,a,n),e.arrowTypeEnd&&Ep(t,"end",e.arrowTypeEnd,r,i,a,n)},"addEdgeMarkers"),TL={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Ep=l((t,e,r,i,a,n,s)=>{let o=TL[r];if(!o){P.warn(`Unknown arrow type: ${r}`);return}let c=o.type,h=`${a}_${n}-${c}${e==="start"?"Start":"End"}`;if(s&&s.trim()!==""){let u=s.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${u}`;if(!document.getElementById(d)){let p=document.getElementById(h);if(p){let f=p.cloneNode(!0);f.id=d,f.querySelectorAll("path, circle, line").forEach(g=>{g.setAttribute("stroke",s),o.fill&&g.setAttribute("fill",s)}),p.parentNode?.appendChild(f)}}t.attr(`marker-${e}`,`url(${i}#${d})`)}else t.attr(`marker-${e}`,`url(${i}#${h})`)},"addEdgeMarker"),ML=l(t=>typeof t=="string"?t:xt()?.flowchart?.curve,"resolveEdgeCurveType"),cs=new Map,qt=new Map,DE=l(()=>{cs.clear(),qt.clear()},"clear"),ba=l(t=>t?typeof t=="string"?t:t.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),BL=l(async(t,e)=>{let r=xt(),i=Zt(r),{labelStyles:a}=K(e);e.labelStyle=a;let n=t.insert("g").attr("class","edgeLabel"),s=n.insert("g").attr("class","label").attr("data-id",e.id),o=e.labelType==="markdown",c=await rr(t,e.label,{style:ba(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:void 0},r);s.node().appendChild(c),P.info("abc82",e,e.labelType);let h=c.getBBox(),u=h;if(i){let p=c.children[0],f=ut(c);h=p.getBoundingClientRect(),u=h,f.attr("width",h.width),f.attr("height",h.height)}else{let p=ut(c).select("text").node();p&&typeof p.getBBox=="function"&&(u=p.getBBox())}s.attr("transform",ya(u,i)),cs.set(e.id,n),e.width=h.width,e.height=h.height;let d;if(e.startLabelLeft){let p=t.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await lr(f,e.startLabelLeft,ba(e.labelStyle)||"",!1,!1);d=g;let y=g.getBBox();if(i){let m=g.children[0],x=ut(g);y=m.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}f.attr("transform",ya(y,i)),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).startLeft=p,Ba(d,e.startLabelLeft)}if(e.startLabelRight){let p=t.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await lr(f,e.startLabelRight,ba(e.labelStyle)||"",!1,!1);d=g,f.node().appendChild(g);let y=g.getBBox();if(i){let m=g.children[0],x=ut(g);y=m.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}f.attr("transform",ya(y,i)),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).startRight=p,Ba(d,e.startLabelRight)}if(e.endLabelLeft){let p=t.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await lr(f,e.endLabelLeft,ba(e.labelStyle)||"",!1,!1);d=g;let y=g.getBBox();if(i){let m=g.children[0],x=ut(g);y=m.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}f.attr("transform",ya(y,i)),p.node().appendChild(g),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).endLeft=p,Ba(d,e.endLabelLeft)}if(e.endLabelRight){let p=t.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await lr(f,e.endLabelRight,ba(e.labelStyle)||"",!1,!1);d=g;let y=g.getBBox();if(i){let m=g.children[0],x=ut(g);y=m.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}f.attr("transform",ya(y,i)),p.node().appendChild(g),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).endRight=p,Ba(d,e.endLabelRight)}return c},"insertEdgeLabel");function Ba(t,e){Zt(xt())&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}l(Ba,"setTerminalWidth");var AL=l((t,e)=>{P.debug("Moving label abc88 ",t.id,t.label,cs.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,i=xt(),{subGraphTitleTotalMargin:a}=Xu(i);if(t.label){let n=cs.get(t.id),s=t.x,o=t.y;if(r){let c=ve.calcLabelPosition(r);P.debug("Moving label "+t.label+" from (",s,",",o,") to (",c.x,",",c.y,") abc88"),e.updatedPath&&(s=c.x,o=c.y)}n.attr("transform",`translate(${s}, ${o+a/2})`)}if(t.startLabelLeft){let n=qt.get(t.id).startLeft,s=t.x,o=t.y;if(r){let c=ve.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let n=qt.get(t.id).startRight,s=t.x,o=t.y;if(r){let c=ve.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let n=qt.get(t.id).endLeft,s=t.x,o=t.y;if(r){let c=ve.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let n=qt.get(t.id).endRight,s=t.x,o=t.y;if(r){let c=ve.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),LL=l((t,e)=>{let r=t.x,i=t.y,a=Math.abs(e.x-r),n=Math.abs(e.y-i),s=t.width/2,o=t.height/2;return a>=s||n>=o},"outsideNode"),FL=l((t,e,r)=>{P.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,a=t.y,n=Math.abs(i-r.x),s=t.width/2,o=r.x<e.x?s-n:s+n,c=t.height/2,h=Math.abs(e.y-r.y),u=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*s>Math.abs(i-e.x)*c){let d=r.y<e.y?e.y-c-a:a-c-e.y;o=u*d/h;let p={x:r.x<e.x?r.x+o:r.x-u+o,y:r.y<e.y?r.y+h-d:r.y-h+d};return o===0&&(p.x=e.x,p.y=e.y),u===0&&(p.x=e.x),h===0&&(p.y=e.y),P.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${u}, r ${o}`,p),p}else{r.x<e.x?o=e.x-s-i:o=i-s-e.x;let d=h*o/u,p=r.x<e.x?r.x+u-o:r.x-u+o,f=r.y<e.y?r.y+d:r.y-d;return P.debug(`sides calc abc89, Q ${h}, q ${d}, R ${u}, r ${o}`,{_x:p,_y:f}),o===0&&(p=e.x,f=e.y),u===0&&(p=e.x),h===0&&(f=e.y),{x:p,y:f}}},"intersection"),Dp=l((t,e)=>{P.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],a=!1;return t.forEach(n=>{if(P.info("abc88 checking point",n,e),!LL(e,n)&&!a){let s=FL(e,i,n);P.debug("abc88 inside",n,i,s),P.debug("abc88 intersection",s,e);let o=!1;r.forEach(c=>{o=o||c.x===s.x&&c.y===s.y}),r.some(c=>c.x===s.x&&c.y===s.y)?P.warn("abc88 no intersect",s,r):r.push(s),a=!0}else P.warn("abc88 outside",n,i),i=n,a||r.push(n)}),P.debug("returning points",r),r},"cutPathAtIntersect");function Z$(t){let e=[],r=[];for(let i=1;i<t.length-1;i++){let a=t[i-1],n=t[i],s=t[i+1];(a.x===n.x&&n.y===s.y&&Math.abs(n.x-s.x)>5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===s.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-s.y)>5)&&(e.push(n),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}l(Z$,"extractCornerPoints");var Op=l(function(t,e,r){let i=e.x-t.x,a=e.y-t.y,n=Math.sqrt(i*i+a*a),s=r/n;return{x:e.x-s*i,y:e.y-s*a}},"findAdjacentPoint"),EL=l(function(t){let{cornerPointPositions:e}=Z$(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){let a=t[i-1],n=t[i+1],s=t[i],o=Op(a,s,5),c=Op(n,s,5),h=c.x-o.x,u=c.y-o.y;r.push(o);let d=Math.sqrt(2)*2,p={x:s.x,y:s.y};if(Math.abs(n.x-a.x)>10&&Math.abs(n.y-a.y)>=10){P.debug("Corner point fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));let f=5;s.x===o.x?p={x:h<0?o.x-f+d:o.x+f-d,y:u<0?o.y-d:o.y+d}:p={x:h<0?o.x-d:o.x+d,y:u<0?o.y-f+d:o.y+f-d}}else P.debug("Corner point skipping fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));r.push(p,c)}else r.push(t[i]);return r},"fixCorners"),DL=l((t,e,r)=>{let i=t-e-r,a=2,n=2,s=a+n,o=Math.floor(i/s),c=Array(o).fill(`${a} ${n}`).join(" ");return`0 ${e} ${c} ${r}`},"generateDashArray"),OL=l(function(t,e,r,i,a,n,s,o=!1){let{handDrawnSeed:c}=xt(),h=e.points,u=!1,d=a;var p=n;let f=[];for(let M in e.cssCompiledStyles)Vk(M)||f.push(e.cssCompiledStyles[M]);P.debug("UIO intersect check",e.points,p.x,d.x),p.intersect&&d.intersect&&!o&&(h=h.slice(1,e.points.length-1),h.unshift(d.intersect(h[0])),P.debug("Last point UIO",e.start,"-->",e.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));let g=btoa(JSON.stringify(h));e.toCluster&&(P.info("to cluster abc88",r.get(e.toCluster)),h=Dp(e.points,r.get(e.toCluster).node),u=!0),e.fromCluster&&(P.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(h,null,2)),h=Dp(h.reverse(),r.get(e.fromCluster).node).reverse(),u=!0);let y=h.filter(M=>!Number.isNaN(M.y)),m=ML(e.curve);m!=="rounded"&&(y=EL(y));let x=bi;switch(m){case"linear":x=bi;break;case"basis":x=Io;break;case"cardinal":x=A0;break;case"bumpX":x=Qc;break;case"bumpY":x=Jc;break;case"catmullRom":x=L0;break;case"monotoneX":x=lu;break;case"monotoneY":x=hu;break;case"natural":x=uu;break;case"step":x=du;break;case"stepAfter":x=fu;break;case"stepBefore":x=pu;break;case"rounded":x=bi;break;default:x=Io}let{x:b,y:k}=T3(e),_=v0().x(b).y(k).curve(x),w;switch(e.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(e.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let $,T=m==="rounded"?Q$(J$(y,e),5):_(y),O=Array.isArray(e.style)?e.style:[e.style],R=O.find(M=>M?.startsWith("stroke:")),I="";e.animate&&(I="edge-animation-fast"),e.animation&&(I="edge-animation-"+e.animation);let S=!1;if(e.look==="handDrawn"){let M=Q.svg(t);Object.assign([],y);let E=M.path(T,{roughness:.3,seed:c});w+=" transition",$=ut(E).select("path").attr("id",e.id).attr("class"," "+w+(e.classes?" "+e.classes:"")+(I?" "+I:"")).attr("style",O?O.reduce((z,V)=>z+";"+V,""):"");let F=$.attr("d");$.attr("d",F),t.node().appendChild($.node())}else{let M=f.join(";"),E=O?O.reduce((U,ct)=>U+ct+";",""):"",F=(M?M+";"+E+";":E)+";"+(O?O.reduce((U,ct)=>U+";"+ct,""):"");$=t.append("path").attr("d",T).attr("id",e.id).attr("class"," "+w+(e.classes?" "+e.classes:"")+(I?" "+I:"")).attr("style",F),R=F.match(/stroke:([^;]+)/)?.[1],S=e.animate===!0||!!e.animation||M.includes("animation");let z=$.node(),V=typeof z.getTotalLength=="function"?z.getTotalLength():0,G=dp[e.arrowTypeStart]||0,Z=dp[e.arrowTypeEnd]||0;if(e.look==="neo"&&!S){let U=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?DL(V,G,Z):`0 ${G} ${V-G-Z} ${Z}`}; stroke-dashoffset: 0;`;$.attr("style",U+$.attr("style"))}}$.attr("data-edge",!0),$.attr("data-et","edge"),$.attr("data-id",e.id),$.attr("data-points",g),e.showPoints&&y.forEach(M=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",M.x).attr("cy",M.y)});let D="";(xt().flowchart.arrowMarkerAbsolute||xt().state.arrowMarkerAbsolute)&&(D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",e.arrowTypeStart),P.info("arrowTypeEnd",e.arrowTypeEnd),SL($,e,D,s,i,R);let A=Math.floor(h.length/2),B=h[A];ve.isLabelCoordinateInPath(B,$.attr("d"))||(u=!0);let L={};return u&&(L.updatedPath=h),L.originalPath=e.points,L},"insertEdge");function Q$(t,e){if(t.length<2)return"";let r="",i=t.length,a=1e-5;for(let n=0;n<i;n++){let s=t[n],o=t[n-1],c=t[n+1];if(n===0)r+=`M${s.x},${s.y}`;else if(n===i-1)r+=`L${s.x},${s.y}`;else{let h=s.x-o.x,u=s.y-o.y,d=c.x-s.x,p=c.y-s.y,f=Math.hypot(h,u),g=Math.hypot(d,p);if(f<a||g<a){r+=`L${s.x},${s.y}`;continue}let y=h/f,m=u/f,x=d/g,b=p/g,k=y*x+m*b,_=Math.max(-1,Math.min(1,k)),w=Math.acos(_);if(w<a||Math.abs(Math.PI-w)<a){r+=`L${s.x},${s.y}`;continue}let $=Math.min(e/Math.sin(w/2),f/2,g/2),T=s.x-y*$,O=s.y-m*$,R=s.x+x*$,I=s.y+b*$;r+=`L${T},${O}`,r+=`Q${s.x},${s.y} ${R},${I}`}}return r}l(Q$,"generateRoundedPath");function Qh(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}}l(Qh,"calculateDeltaAndAngle");function J$(t,e){let r=t.map(a=>({...a}));if(t.length>=2&&Yt[e.arrowTypeStart]){let a=Yt[e.arrowTypeStart],n=t[0],s=t[1],{angle:o}=Qh(n,s),c=a*Math.cos(o),h=a*Math.sin(o);r[0].x=n.x+c,r[0].y=n.y+h}let i=t.length;if(i>=2&&Yt[e.arrowTypeEnd]){let a=Yt[e.arrowTypeEnd],n=t[i-1],s=t[i-2],{angle:o}=Qh(s,n),c=a*Math.cos(o),h=a*Math.sin(o);r[i-1].x=n.x-c,r[i-1].y=n.y-h}return r}l(J$,"applyMarkerOffsetsToPoints");var IL=l((t,e,r,i)=>{e.forEach(a=>{JL[a](t,r,i)})},"insertMarkers"),PL=l((t,e,r)=>{P.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),RL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),NL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),zL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),qL=l((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)},"lollipop"),WL=l((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),jL=l((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),HL=l((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),UL=l((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"),YL=l((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"),VL=l((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 a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),GL=l((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"),XL=l((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 a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ZL=l((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"),QL=l((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"),JL={extension:PL,composition:RL,aggregation:NL,dependency:zL,lollipop:qL,point:WL,circle:jL,cross:HL,barb:UL,only_one:YL,zero_or_one:VL,one_or_more:GL,zero_or_more:XL,requirement_arrow:ZL,requirement_contains:QL},KL=IL,tF={common:Bn,getConfig:Vt,insertCluster:oL,insertEdge:OL,insertEdgeLabel:BL,insertMarkers:KL,insertNode:X$,interpolateToCurve:ju,labelHelper:st,log:P,positionEdgeLabel:AL},mn={},K$=l(t=>{for(let e of t)mn[e.name]=e},"registerLayoutLoaders"),eF=l(()=>{K$([{name:"dagre",loader:l(async()=>await gt(()=>import("./dagre-GNUAUHNH-DXQ162y-.js"),__vite__mapDeps([2,3,4,5,1])),"loader")},{name:"cose-bilkent",loader:l(async()=>await gt(()=>import("./cose-bilkent-PNC4W37J-DyN6PpA4.js"),__vite__mapDeps([6,7,1])),"loader")}])},"registerDefaultLayoutLoaders");eF();var OE=l(async(t,e)=>{if(!(t.layoutAlgorithm in mn))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=mn[t.layoutAlgorithm];return(await r.loader()).render(t,e,tF,{algorithm:r.algorithm})},"render"),IE=l((t="",{fallback:e="dagre"}={})=>{if(t in mn)return t;if(e in mn)return P.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),rF=Y2(Object.keys,Object),iF=rF,aF=Object.prototype,nF=aF.hasOwnProperty;function tw(t){if(!zs(t))return iF(t);var e=[];for(var r in Object(t))nF.call(t,r)&&r!="constructor"&&e.push(r);return e}l(tw,"baseKeys");var oF=tw,sF=Yr(Re,"DataView"),Jh=sF,lF=Yr(Re,"Promise"),Kh=lF,hF=Yr(Re,"Set"),tc=hF,cF=Yr(Re,"WeakMap"),ec=cF,Ip="[object Map]",uF="[object Object]",Pp="[object Promise]",Rp="[object Set]",Np="[object WeakMap]",zp="[object DataView]",dF=Ur(Jh),pF=Ur(dn),fF=Ur(Kh),gF=Ur(tc),yF=Ur(ec),Mr=ia;(Jh&&Mr(new Jh(new ArrayBuffer(1)))!=zp||dn&&Mr(new dn)!=Ip||Kh&&Mr(Kh.resolve())!=Pp||tc&&Mr(new tc)!=Rp||ec&&Mr(new ec)!=Np)&&(Mr=l(function(t){var e=ia(t),r=e==uF?t.constructor:void 0,i=r?Ur(r):"";if(i)switch(i){case dF:return zp;case pF:return Ip;case fF:return Pp;case gF:return Rp;case yF:return Np}return e},"getTag"));var mF=Mr,xF="[object Map]",bF="[object Set]",kF=Object.prototype,CF=kF.hasOwnProperty;function ew(t){if(t==null)return!0;if(qs(t)&&(ts(t)||typeof t=="string"||typeof t.splice=="function"||zu(t)||qu(t)||Ko(t)))return!t.length;var e=mF(t);if(e==xF||e==bF)return!t.size;if(zs(t))return!oF(t).length;for(var r in t)if(CF.call(t,r))return!1;return!0}l(ew,"isEmpty");var qp=ew,$F=l(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),wF=l(async()=>{let{diagram:t}=await gt(()=>import("./c4Diagram-BBK6TRR6-FZk4-nd8.js"),__vite__mapDeps([8,9,1]));return{id:"c4",diagram:t}},"loader"),vF={id:"c4",detector:$F,loader:wF},_F=vF,rw="flowchart",SF=l((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),TF=l(async()=>{let{diagram:t}=await gt(()=>import("./flowDiagram-IIOBCMXN-CYRKx13h.js"),__vite__mapDeps([10,11,9,12,13,1]));return{id:rw,diagram:t}},"loader"),MF={id:rw,detector:SF,loader:TF},BF=MF,iw="flowchart-v2",AF=l((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),LF=l(async()=>{let{diagram:t}=await gt(()=>import("./flowDiagram-IIOBCMXN-CYRKx13h.js"),__vite__mapDeps([10,11,9,12,13,1]));return{id:iw,diagram:t}},"loader"),FF={id:iw,detector:AF,loader:LF},EF=FF,DF=l(t=>/^\s*erDiagram/.test(t),"detector"),OF=l(async()=>{let{diagram:t}=await gt(()=>import("./erDiagram-L2NYR2MQ--3oSmcc2.js"),__vite__mapDeps([14,12,13,1]));return{id:"er",diagram:t}},"loader"),IF={id:"er",detector:DF,loader:OF},PF=IF,aw="gitGraph",RF=l(t=>/^\s*gitGraph/.test(t),"detector"),NF=l(async()=>{let{diagram:t}=await gt(()=>import("./gitGraphDiagram-FCDOK2W6-DtwLq5NW.js"),__vite__mapDeps([15,16,17,1,5,18]));return{id:aw,diagram:t}},"loader"),zF={id:aw,detector:RF,loader:NF},qF=zF,nw="gantt",WF=l(t=>/^\s*gantt/.test(t),"detector"),jF=l(async()=>{let{diagram:t}=await gt(()=>import("./ganttDiagram-CBGYKTO2-V9ASDzMX.js"),__vite__mapDeps([19,1]));return{id:nw,diagram:t}},"loader"),HF={id:nw,detector:WF,loader:jF},UF=HF,ow="info",YF=l(t=>/^\s*info/.test(t),"detector"),VF=l(async()=>{let{diagram:t}=await gt(()=>import("./infoDiagram-JC2SMEGH-olRUjSou.js"),__vite__mapDeps([20,17,1,5]));return{id:ow,diagram:t}},"loader"),GF={id:ow,detector:YF,loader:VF},XF=l(t=>/^\s*pie/.test(t),"detector"),ZF=l(async()=>{let{diagram:t}=await gt(()=>import("./pieDiagram-O4VNXU6G-DrxXmGzS.js"),__vite__mapDeps([21,16,17,1,5]));return{id:"pie",diagram:t}},"loader"),QF={id:"pie",detector:XF,loader:ZF},sw="quadrantChart",JF=l(t=>/^\s*quadrantChart/.test(t),"detector"),KF=l(async()=>{let{diagram:t}=await gt(()=>import("./quadrantDiagram-DYU4IJOS-Bg6H8a2k.js"),__vite__mapDeps([22,1]));return{id:sw,diagram:t}},"loader"),t4={id:sw,detector:JF,loader:KF},e4=t4,lw="xychart",r4=l(t=>/^\s*xychart(-beta)?/.test(t),"detector"),i4=l(async()=>{let{diagram:t}=await gt(()=>import("./xychartDiagram-TMDUDL2A-CsQ9VQk_.js"),__vite__mapDeps([23,1]));return{id:lw,diagram:t}},"loader"),a4={id:lw,detector:r4,loader:i4},n4=a4,hw="requirement",o4=l(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),s4=l(async()=>{let{diagram:t}=await gt(()=>import("./requirementDiagram-N2XL27SN-D0ML_frX.js"),__vite__mapDeps([24,12,13,1]));return{id:hw,diagram:t}},"loader"),l4={id:hw,detector:o4,loader:s4},h4=l4,cw="sequence",c4=l(t=>/^\s*sequenceDiagram/.test(t),"detector"),u4=l(async()=>{let{diagram:t}=await gt(()=>import("./sequenceDiagram-PYXOKC54-CiRRnoB5.js"),__vite__mapDeps([25,18,9,1]));return{id:cw,diagram:t}},"loader"),d4={id:cw,detector:c4,loader:u4},p4=d4,uw="class",f4=l((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),g4=l(async()=>{let{diagram:t}=await gt(()=>import("./classDiagram-JG6F6YBT-B47N4DC6.js"),__vite__mapDeps([26,27,11,9,12,13,1]));return{id:uw,diagram:t}},"loader"),y4={id:uw,detector:f4,loader:g4},m4=y4,dw="classDiagram",x4=l((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),b4=l(async()=>{let{diagram:t}=await gt(()=>import("./classDiagram-v2-CFK7UN3Z-B47N4DC6.js"),__vite__mapDeps([28,27,11,9,12,13,1]));return{id:dw,diagram:t}},"loader"),k4={id:dw,detector:x4,loader:b4},C4=k4,pw="state",$4=l((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),w4=l(async()=>{let{diagram:t}=await gt(()=>import("./stateDiagram-UFOXNHOX-DF6iuymG.js"),__vite__mapDeps([29,30,12,13,3,4,5,1]));return{id:pw,diagram:t}},"loader"),v4={id:pw,detector:$4,loader:w4},_4=v4,fw="stateDiagram",S4=l((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),T4=l(async()=>{let{diagram:t}=await gt(()=>import("./stateDiagram-v2-C774GKM7-NXQNeIBp.js"),__vite__mapDeps([31,30,12,13,1]));return{id:fw,diagram:t}},"loader"),M4={id:fw,detector:S4,loader:T4},B4=M4,gw="journey",A4=l(t=>/^\s*journey/.test(t),"detector"),L4=l(async()=>{let{diagram:t}=await gt(()=>import("./journeyDiagram-FZRSWBTQ-DuIFoGQv.js"),__vite__mapDeps([32,11,9,1]));return{id:gw,diagram:t}},"loader"),F4={id:gw,detector:A4,loader:L4},E4=F4,D4=l((t,e,r)=>{P.debug(`rendering svg for syntax error
`);let i=bT(e),a=i.append("g");i.attr("viewBox","0 0 2412 512"),mx(i,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"),yw={draw:D4},O4=yw,I4={db:{},renderer:yw,parser:{parse:l(()=>{},"parse")}},P4=I4,mw="flowchart-elk",R4=l((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),N4=l(async()=>{let{diagram:t}=await gt(()=>import("./flowDiagram-IIOBCMXN-CYRKx13h.js"),__vite__mapDeps([10,11,9,12,13,1]));return{id:mw,diagram:t}},"loader"),z4={id:mw,detector:R4,loader:N4},q4=z4,xw="timeline",W4=l(t=>/^\s*timeline/.test(t),"detector"),j4=l(async()=>{let{diagram:t}=await gt(()=>import("./timeline-definition-GC5UGDFR-BsXHSaaA.js"),__vite__mapDeps([33,1]));return{id:xw,diagram:t}},"loader"),H4={id:xw,detector:W4,loader:j4},U4=H4,bw="mindmap",Y4=l(t=>/^\s*mindmap/.test(t),"detector"),V4=l(async()=>{let{diagram:t}=await gt(()=>import("./mindmap-definition-QTQOGDLH-GhXRjx3h.js"),__vite__mapDeps([34,12,13,1]));return{id:bw,diagram:t}},"loader"),G4={id:bw,detector:Y4,loader:V4},X4=G4,kw="kanban",Z4=l(t=>/^\s*kanban/.test(t),"detector"),Q4=l(async()=>{let{diagram:t}=await gt(()=>import("./kanban-definition-ETIEC4YN-Bx3CknX6.js"),__vite__mapDeps([35,11,1]));return{id:kw,diagram:t}},"loader"),J4={id:kw,detector:Z4,loader:Q4},K4=J4,Cw="sankey",t6=l(t=>/^\s*sankey(-beta)?/.test(t),"detector"),e6=l(async()=>{let{diagram:t}=await gt(()=>import("./sankeyDiagram-HWP7ZNIN-BUY3YMp8.js"),__vite__mapDeps([36,1]));return{id:Cw,diagram:t}},"loader"),r6={id:Cw,detector:t6,loader:e6},i6=r6,$w="packet",a6=l(t=>/^\s*packet(-beta)?/.test(t),"detector"),n6=l(async()=>{let{diagram:t}=await gt(()=>import("./diagram-SUXTHJMA-h0U9qop-.js"),__vite__mapDeps([37,16,17,1,5]));return{id:$w,diagram:t}},"loader"),o6={id:$w,detector:a6,loader:n6},ww="radar",s6=l(t=>/^\s*radar-beta/.test(t),"detector"),l6=l(async()=>{let{diagram:t}=await gt(()=>import("./diagram-G7E7SVAT-Cb6uMcqw.js"),__vite__mapDeps([38,16,17,1,5]));return{id:ww,diagram:t}},"loader"),h6={id:ww,detector:s6,loader:l6},vw="block",c6=l(t=>/^\s*block(-beta)?/.test(t),"detector"),u6=l(async()=>{let{diagram:t}=await gt(()=>import("./blockDiagram-HG7WUIX4-pYMouvi2.js"),__vite__mapDeps([39,4,5,11,1]));return{id:vw,diagram:t}},"loader"),d6={id:vw,detector:c6,loader:u6},p6=d6,_w="architecture",f6=l(t=>/^\s*architecture/.test(t),"detector"),g6=l(async()=>{let{diagram:t}=await gt(()=>import("./architectureDiagram-EJXTDGMB-BixUofLv.js"),__vite__mapDeps([40,16,17,1,5,7]));return{id:_w,diagram:t}},"loader"),y6={id:_w,detector:f6,loader:g6},m6=y6,Sw="ishikawa",x6=l(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),b6=l(async()=>{let{diagram:t}=await gt(()=>import("./ishikawaDiagram-LCPTV24A-dqzGV9xc.js"),__vite__mapDeps([41,1]));return{id:Sw,diagram:t}},"loader"),k6={id:Sw,detector:x6,loader:b6},Tw="venn",C6=l(t=>/^\s*venn-beta/.test(t),"detector"),$6=l(async()=>{let{diagram:t}=await gt(()=>import("./vennDiagram-R4MEU4WM-Dvbyfwqt.js"),__vite__mapDeps([42,1]));return{id:Tw,diagram:t}},"loader"),w6={id:Tw,detector:C6,loader:$6},v6=w6,Mw="treemap",_6=l(t=>/^\s*treemap/.test(t),"detector"),S6=l(async()=>{let{diagram:t}=await gt(()=>import("./diagram-HOHITQNR-RHmJhdrA.js"),__vite__mapDeps([43,16,17,1,5,13]));return{id:Mw,diagram:t}},"loader"),T6={id:Mw,detector:_6,loader:S6},Wp=!1,Zs=l(()=>{Wp||(Wp=!0,Ho("error",P4,t=>t.toLowerCase().trim()==="error"),Ho("---",{db:{clear:l(()=>{},"clear")},styles:{},renderer:{draw:l(()=>{},"draw")},parser:{parse:l(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:l(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),lh(q4,X4,m6),lh(_F,K4,C4,m4,PF,UF,GF,QF,h4,p4,EF,BF,U4,qF,B4,_4,E4,e4,i6,o6,n4,p6,h6,k6,T6,v6))},"addDiagrams"),M6=l(async()=>{P.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(Rr).map(async([e,{detector:r,loader:i}])=>{if(i)try{gh(e)}catch{try{let{diagram:a,id:n}=await i();Ho(n,a,r)}catch(a){throw P.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Rr[e],a}}}))).filter(e=>e.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(let e of t)P.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Bw="comm",Aw="rule",Lw="decl",B6="@import",A6="@namespace",L6="@keyframes",F6="@layer",Fw=Math.abs,yd=String.fromCharCode;function md(t){return t.trim()}l(md,"trim");function qa(t,e,r){return t.replace(e,r)}l(qa,"replace");function Ew(t,e,r){return t.indexOf(e,r)}l(Ew,"indexof");function Er(t,e){return t.charCodeAt(e)|0}l(Er,"charat");function Wr(t,e,r){return t.slice(e,r)}l(Wr,"substr");function we(t){return t.length}l(we,"strlen");function Dw(t){return t.length}l(Dw,"sizeof");function Aa(t,e){return e.push(t),t}l(Aa,"append");var Qs=1,ta=1,Ow=0,ge=0,Lt=0,la="";function Js(t,e,r,i,a,n,s,o){return{value:t,root:e,parent:r,type:i,props:a,children:n,line:Qs,column:ta,length:s,return:"",siblings:o}}l(Js,"node");function Iw(){return Lt}l(Iw,"char");function Pw(){return Lt=ge>0?Er(la,--ge):0,ta--,Lt===10&&(ta=1,Qs--),Lt}l(Pw,"prev");function pe(){return Lt=ge<Ow?Er(la,ge++):0,ta++,Lt===10&&(ta=1,Qs++),Lt}l(pe,"next");function Ge(){return Er(la,ge)}l(Ge,"peek");function Wa(){return ge}l(Wa,"caret");function In(t,e){return Wr(la,t,e)}l(In,"slice");function ea(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}l(ea,"token");function Rw(t){return Qs=ta=1,Ow=we(la=t),ge=0,[]}l(Rw,"alloc");function Nw(t){return la="",t}l(Nw,"dealloc");function vo(t){return md(In(ge-1,us(t===91?t+2:t===40?t+1:t)))}l(vo,"delimit");function zw(t){for(;(Lt=Ge())&&Lt<33;)pe();return ea(t)>2||ea(Lt)>3?"":" "}l(zw,"whitespace");function qw(t,e){for(;--e&&pe()&&!(Lt<48||Lt>102||Lt>57&&Lt<65||Lt>70&&Lt<97););return In(t,Wa()+(e<6&&Ge()==32&&pe()==32))}l(qw,"escaping");function us(t){for(;pe();)switch(Lt){case t:return ge;case 34:case 39:t!==34&&t!==39&&us(Lt);break;case 40:t===41&&us(t);break;case 92:pe();break}return ge}l(us,"delimiter");function Ww(t,e){for(;pe()&&t+Lt!==57&&!(t+Lt===84&&Ge()===47););return"/*"+In(e,ge-1)+"*"+yd(t===47?t:pe())}l(Ww,"commenter");function jw(t){for(;!ea(Ge());)pe();return In(t,ge)}l(jw,"identifier");function Hw(t){return Nw(ja("",null,null,null,[""],t=Rw(t),0,[0],t))}l(Hw,"compile");function ja(t,e,r,i,a,n,s,o,c){for(var h=0,u=0,d=s,p=0,f=0,g=0,y=1,m=1,x=1,b=0,k="",_=a,w=n,$=i,T=k;m;)switch(g=b,b=pe()){case 40:if(g!=108&&Er(T,d-1)==58){Ew(T+=qa(vo(b),"&","&\f"),"&\f",Fw(h?o[h-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=vo(b);break;case 9:case 10:case 13:case 32:T+=zw(g);break;case 92:T+=qw(Wa()-1,7);continue;case 47:switch(Ge()){case 42:case 47:Aa(Uw(Ww(pe(),Wa()),e,r,c),c),(ea(g||1)==5||ea(Ge()||1)==5)&&we(T)&&Wr(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*y:o[h++]=we(T)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:x==-1&&(T=qa(T,/\f/g,"")),f>0&&(we(T)-d||y===0&&g===47)&&Aa(f>32?ic(T+";",i,r,d-1,c):ic(qa(T," ","")+";",i,r,d-2,c),c);break;case 59:T+=";";default:if(Aa($=rc(T,e,r,h,u,a,o,k,_=[],w=[],d,n),n),b===123)if(u===0)ja(T,e,$,$,_,n,d,o,w);else{switch(p){case 99:if(Er(T,3)===110)break;case 108:if(Er(T,2)===97)break;default:u=0;case 100:case 109:case 115:}u?ja(t,$,$,i&&Aa(rc(t,$,$,0,0,a,o,k,a,_=[],d,w),w),a,w,d,o,i?_:w):ja(T,$,$,$,[""],w,0,o,w)}}h=u=f=0,y=x=1,k=T="",d=s;break;case 58:d=1+we(T),f=g;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&Pw()==125)continue}switch(T+=yd(b),b*y){case 38:x=u>0?1:(T+="\f",-1);break;case 44:o[h++]=(we(T)-1)*x,x=1;break;case 64:Ge()===45&&(T+=vo(pe())),p=Ge(),u=d=we(k=T+=jw(Wa())),b++;break;case 45:g===45&&we(T)==2&&(y=0)}}return n}l(ja,"parse");function rc(t,e,r,i,a,n,s,o,c,h,u,d){for(var p=a-1,f=a===0?n:[""],g=Dw(f),y=0,m=0,x=0;y<i;++y)for(var b=0,k=Wr(t,p+1,p=Fw(m=s[y])),_=t;b<g;++b)(_=md(m>0?f[b]+" "+k:qa(k,/&\f/g,f[b])))&&(c[x++]=_);return Js(t,e,r,a===0?Aw:o,c,h,u,d)}l(rc,"ruleset");function Uw(t,e,r,i){return Js(t,e,r,Bw,yd(Iw()),Wr(t,2,-2),0,i)}l(Uw,"comment");function ic(t,e,r,i,a){return Js(t,e,r,Lw,Wr(t,0,i),Wr(t,i+1,-1),i,a)}l(ic,"declaration");function ds(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}l(ds,"serialize");function Yw(t,e,r,i){switch(t.type){case F6:if(t.children.length)break;case B6:case A6:case Lw:return t.return=t.return||t.value;case Bw:return"";case L6:return t.return=t.value+"{"+ds(t.children,i)+"}";case Aw:if(!we(t.value=t.props.join(",")))return""}return we(r=ds(t.children,i))?t.return=t.value+"{"+r+"}":""}l(Yw,"stringify");var E6="graphics-document document";function Vw(t,e){t.attr("role",E6),e!==""&&t.attr("aria-roledescription",e)}l(Vw,"setA11yDiagramInfo");function Gw(t,e,r,i){if(t.insert!==void 0){if(r){let a=`chart-desc-${i}`;t.attr("aria-describedby",a),t.insert("desc",":first-child").attr("id",a).text(r)}if(e){let a=`chart-title-${i}`;t.attr("aria-labelledby",a),t.insert("title",":first-child").attr("id",a).text(e)}}}l(Gw,"addSVGa11yTitleDescription");var Dr,ac=(Dr=class{constructor(e,r,i,a,n){this.type=e,this.text=r,this.db=i,this.parser=a,this.renderer=n}static async fromText(e,r={}){let i=Vt(),a=ku(e,i);e=jB(e)+`
`;try{gh(a)}catch{let h=E_(a);if(!h)throw new X1(`Diagram ${a} not found.`);let{id:u,diagram:d}=await h();Ho(u,d)}let{db:n,parser:s,renderer:o,init:c}=gh(a);return s.parser&&(s.parser.yy=n),n.clear?.(),c?.(i),r.title&&n.setDiagramTitle?.(r.title),await s.parse(e),new Dr(a,e,n,s,o)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},l(Dr,"Diagram"),Dr),jp=[],D6=l(()=>{jp.forEach(t=>{t()}),jp=[]},"attachFunctions"),O6=l(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Xw(t){let e=t.match(G1);if(!e)return{text:t,metadata:{}};let r=S3(e[1],{schema:_3})??{};r=typeof r=="object"&&!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}}l(Xw,"extractFrontMatter");var I6=l(t=>t.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(e,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),P6=l(t=>{let{text:e,metadata:r}=Xw(t),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:e}},"processFrontmatter"),R6=l(t=>{let e=ve.detectInit(t)??{},r=ve.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:AB(t),directive:e}},"processDirectives");function xd(t){let e=I6(t),r=P6(e),i=R6(r.text),a=Gu(r.config,i.directive);return t=O6(i.text),{code:t,title:r.title,config:a}}l(xd,"preprocessDiagram");function Zw(t){let e=new TextEncoder().encode(t),r=Array.from(e,i=>String.fromCodePoint(i)).join("");return btoa(r)}l(Zw,"toBase64");var N6=5e4,z6="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",q6="sandbox",W6="loose",j6="http://www.w3.org/2000/svg",H6="http://www.w3.org/1999/xlink",U6="http://www.w3.org/1999/xhtml",Y6="100%",V6="100%",G6="border:0;margin:0;",X6="margin:0",Z6="allow-top-navigation-by-user-activation allow-popups",Q6='The "iframe" tag is not supported by your browser.',J6=["foreignobject"],K6=["dominant-baseline"];function bd(t){let e=xd(t);return Wo(),wS(e.config??{}),e}l(bd,"processAndSetConfigs");async function Qw(t,e){Zs();try{let{code:r,config:i}=bd(t);return{diagramType:(await Kw(r)).type,config:i}}catch(r){if(e?.suppressErrors)return!1;throw r}}l(Qw,"parse");var Hp=l((t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),tE=l((t,e=new Map)=>{let r="";if(t.themeCSS!==void 0&&(r+=`
${t.themeCSS}`),t.fontFamily!==void 0&&(r+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let i=Zt(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(a=>{qp(a.styles)||i.forEach(n=>{r+=Hp(a.id,n,a.styles)}),qp(a.textStyles)||(r+=Hp(a.id,"tspan",(a?.textStyles||[]).map(n=>n.replace("color","fill"))))})}return r},"createCssStyles"),eE=l((t,e,r,i)=>{let a=tE(t,r),n=sT(e,a,t.themeVariables);return ds(Hw(`${i}{${n}}`),Yw)},"createUserStyles"),rE=l((t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=aa(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),iE=l((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":V6,i=Zw(`<body style="${X6}">${t}</body>`);return`<iframe style="width:${Y6};height:${r};${G6}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${Z6}">
${Q6}
</iframe>`},"putIntoIFrame"),Up=l((t,e,r,i,a)=>{let n=t.append("div");n.attr("id",r),i&&n.attr("style",i);let s=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns",j6);return a&&s.attr("xmlns:xlink",a),s.append("g"),t},"appendDivSvgG");function nc(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}l(nc,"sandboxedIframe");var aE=l((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),nE=l(async function(t,e,r){Zs();let i=bd(e);e=i.code;let a=Vt();P.debug(a),e.length>(a?.maxTextSize??N6)&&(e=z6);let n="#"+t,s="i"+t,o="#"+s,c="d"+t,h="#"+c,u=l(()=>{let D=ut(p?o:h).node();D&&"remove"in D&&D.remove()},"removeTempElements"),d=ut("body"),p=a.securityLevel===q6,f=a.securityLevel===W6,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let D=nc(ut(r),s);d=ut(D.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=ut(r);Up(d,t,c,`font-family: ${g}`,H6)}else{if(aE(document,t,c,s),p){let D=nc(ut("body"),s);d=ut(D.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=ut("body");Up(d,t,c)}let y,m;try{y=await ac.fromText(e,{title:i.title})}catch(D){if(a.suppressErrorRendering)throw u(),D;y=await ac.fromText("error"),m=D}let x=d.select(h).node(),b=y.type,k=x.firstChild,_=k.firstChild,w=y.renderer.getClasses?.(e,y),$=eE(a,b,w,n),T=document.createElement("style");T.innerHTML=$,k.insertBefore(T,_);try{await y.renderer.draw(e,t,"11.13.0",y)}catch(D){throw a.suppressErrorRendering?u():O4.draw(e,t,"11.13.0"),D}let O=d.select(`${h} svg`),R=y.db.getAccTitle?.(),I=y.db.getAccDescription?.();tv(b,O,R,I),d.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",U6);let S=d.select(h).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),S=rE(S,p,kr(a.arrowMarkerAbsolute)),p){let D=d.select(h+" svg").node();S=iE(S,D)}else f||(S=Qi.sanitize(S,{ADD_TAGS:J6,ADD_ATTR:K6,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(D6(),m)throw m;return u(),{diagramType:b,svg:S,bindFunctions:y.db.bindFunctions}},"render");function Jw(t={}){let e=Dt({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),CS(e),e?.theme&&e.theme in Xe?e.themeVariables=Xe[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Xe.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?kS(e):ix();lc(r.logLevel),Zs()}l(Jw,"initialize");var Kw=l((t,e={})=>{let{code:r}=xd(t);return ac.fromText(r,e)},"getDiagramFromText");function tv(t,e,r,i){Vw(e,t),Gw(e,r,i,e.attr("id"))}l(tv,"addA11yInfo");var jr=Object.freeze({render:nE,parse:Qw,getDiagramFromText:Kw,initialize:Jw,getConfig:Vt,setConfig:ax,getSiteConfig:ix,updateSiteConfig:$S,reset:l(()=>{Wo()},"reset"),globalReset:l(()=>{Wo(Zi)},"globalReset"),defaultConfig:Zi});lc(Vt().logLevel);Wo(Vt());var oE=l((t,e,r)=>{P.warn(t),Vu(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"),ev=l(async function(t={querySelector:".mermaid"}){try{await sE(t)}catch(e){if(Vu(e)&&P.error(e.str),er.parseError&&er.parseError(e),!t.suppressErrors)throw P.error("Use the suppressErrors option to suppress these errors"),e}},"run"),sE=l(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let i=jr.getConfig();P.debug(`${t?"":"No "}Callback function found`);let a;if(r)a=r;else if(e)a=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");P.debug(`Found ${a.length} diagrams`),i?.startOnLoad!==void 0&&(P.debug("Start On Load: "+i?.startOnLoad),jr.updateSiteConfig({startOnLoad:i?.startOnLoad}));let n=new ve.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),s,o=[];for(let c of Array.from(a)){if(P.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");let h=`mermaid-${n.next()}`;s=c.innerHTML,s=id(ve.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");let u=ve.detectInit(s);u&&P.debug("Detected early reinit: ",u);try{let{svg:d,bindFunctions:p}=await nv(h,s,c);c.innerHTML=d,t&&await t(h),p&&p(c)}catch(d){oE(d,o,er.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),rv=l(function(t){jr.initialize(t)},"initialize"),lE=l(async function(t,e,r){P.warn("mermaid.init is deprecated. Please use run instead."),t&&rv(t);let i={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await ev(i)},"init"),hE=l(async(t,{lazyLoad:e=!0}={})=>{Zs(),lh(...t),e===!1&&await M6()},"registerExternalDiagrams"),iv=l(function(){if(er.startOnLoad){let{startOnLoad:t}=jr.getConfig();t&&er.run().catch(e=>P.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",iv,!1);var cE=l(function(t){er.parseError=t},"setParseErrorHandler"),ps=[],_l=!1,av=l(async()=>{if(!_l){for(_l=!0;ps.length>0;){let t=ps.shift();if(t)try{await t()}catch(e){P.error("Error executing queue",e)}}_l=!1}},"executeQueue"),uE=l(async(t,e)=>new Promise((r,i)=>{let a=l(()=>new Promise((n,s)=>{jr.parse(t,e).then(o=>{n(o),r(o)},o=>{P.error("Error parsing",o),er.parseError?.(o),s(o),i(o)})}),"performCall");ps.push(a),av().catch(i)}),"parse"),nv=l((t,e,r)=>new Promise((i,a)=>{let n=l(()=>new Promise((s,o)=>{jr.render(t,e,r).then(c=>{s(c),i(c)},c=>{P.error("Error parsing",c),er.parseError?.(c),o(c),a(c)})}),"performCall");ps.push(n),av().catch(a)}),"render"),dE=l(()=>Object.keys(Rr).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),er={startOnLoad:!0,mermaidAPI:jr,parse:uE,render:nv,init:lE,run:ev,registerExternalDiagrams:hE,registerLayoutLoaders:K$,initialize:rv,parseError:void 0,contentLoaded:iv,setParseErrorHandler:cE,detectType:ku,registerIconPacks:gA,getRegisteredDiagramsMetadata:dE},pE=er;/*! Check if previously processed *//*!
* Wait for document loaded before starting the execution
*/const PE=Object.freeze(Object.defineProperty({__proto__:null,default:pE},Symbol.toStringTag,{value:"Module"}));export{lT as $,S3 as A,mF as B,kB as C,Dt as D,zu as E,UM as F,wE as G,t5 as H,NM as I,BE as J,pT as K,Gu as L,Ke as M,ts as N,oF as O,vk as P,Oa as Q,ME as R,RB as S,kk as T,mx as U,cT as V,Rk as W,dT as X,uT as Y,fT as Z,Z5 as _,Bn as a,yx as a$,GM as a0,VM as a1,j5 as a2,vp as a3,$B as a4,V2 as a5,Qo as a6,Ln as a7,ia as a8,tk as a9,a_ as aA,i_ as aB,Vi as aC,r_ as aD,e_ as aE,Eo as aF,wn as aG,Ic as aH,Oc as aI,pi as aJ,Fo as aK,Fv as aL,wv as aM,oc as aN,bT as aO,Ws as aP,y_ as aQ,Fc as aR,m_ as aS,pS as aT,u0 as aU,QA as aV,v0 as aW,on as aX,SE as aY,SB as aZ,ZS as a_,gk as aa,Ko as ab,qu as ac,CB as ad,Os as ae,bp as af,Pu as ag,s5 as ah,Ru as ai,X5 as aj,tc as ak,zs as al,Re as am,Nu as an,jM as ao,bB as ap,uB as aq,p_ as ar,Sv as as,_v as at,im as au,bE as av,Ev as aw,o0 as ax,Nc as ay,ks as az,Mn as b,sp as b0,Io as b1,DB as b2,vB as b3,FM as b4,Iu as b5,qp as b6,aT as b7,Tn as b8,X as b9,FE as bA,DE as bB,AE as bC,tt as bD,LE as bE,BL as bF,OL as bG,AL as bH,xE as bI,yE as bJ,mE as bK,PE as bL,at as ba,xx as bb,_E as bc,oL as bd,X$ as be,EE as bf,$E as bg,T3 as bh,Zt as bi,rr as bj,ya as bk,Xu as bl,aa as bm,zk as bn,Ik as bo,En as bp,gA as bq,fA as br,Q as bs,vE as bt,xy as bu,Lc as bv,t_ as bw,K as bx,Vk as by,KL as bz,IE as c,OE as d,ve as e,B3 as f,_3 as g,_L as h,ut as i,hT as j,Qi as k,$v as l,l as m,rx as n,Vt as o,P as p,qs as q,Yp as r,Me as s,yT as t,rB as u,Hr as v,OB as w,xt as x,XM as y,TE as z};