filecat 6.42.1 → 6.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 9572.304acc81bcceeb2ade2a.js.LICENSE.txt */
2
+ (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9572],{11356(t,e){"use strict";e.k=void 0;e.k=function(t,e){void 0===e&&(e={listUnicodeChar:""}),(e=e||{}).listUnicodeChar=!!e.hasOwnProperty("listUnicodeChar")&&e.listUnicodeChar,e.stripListLeaders=!e.hasOwnProperty("stripListLeaders")||e.stripListLeaders,e.gfm=!e.hasOwnProperty("gfm")||e.gfm,e.useImgAltText=!e.hasOwnProperty("useImgAltText")||e.useImgAltText,e.preserveLinks=!!e.hasOwnProperty("preserveLinks")&&e.preserveLinks;var r=t||"";r=r.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*$/gm,"");try{e.stripListLeaders&&(r=e.listUnicodeChar?r.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,e.listUnicodeChar+" $1"):r.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,"$1")),e.gfm&&(r=r.replace(/\n={2,}/g,"\n").replace(/~{3}.*\n/g,"").replace(/~~/g,"").replace(/`{3}.*\n/g,"")),e.preserveLinks&&(r=r.replace(/\[(.*?)\][\[\(](.*?)[\]\)]/g,"$1 ($2)")),r=r.replace(/<[^>]*>/g,"").replace(/^[=\-]{2,}\s*$/g,"").replace(/\[\^.+?\](\: .*?$)?/g,"").replace(/\s{0,2}\[.*?\]: .*?$/g,"").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g,e.useImgAltText?"$1":"").replace(/\[(.*?)\][\[\(].*?[\]\)]/g,"$1").replace(/^\s{0,3}>\s?/g,"").replace(/(^|\n)\s{0,3}>\s?/g,"\n\n").replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g,"").replace(/^(\n)?\s{0,}#{1,6}\s+| {0,}(\n)?\s{0,}#{0,} {0,}(\n)?\s{0,}$/gm,"$1$2$3").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,"$2").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,"$2").replace(/(`{3,})(.*?)\1/gm,"$2").replace(/`(.+?)`/g,"$1").replace(/\n{2,}/g,"\n\n")}catch(e){return console.error(e),t}return r}},74353(t){t.exports=function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",n="minute",a="hour",s="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},x={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(i,h),n=r-o<0,a=e.clone().add(i+(n?-1:1),h);return+(-(i+(r-o)/(n?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:s,D:u,h:a,m:n,s:o,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},C="en",b={};b[C]=y;var k="$isDayjsObject",w=function(t){return t instanceof B||!(!t||!t[k])},S=function t(e,r,i){var o;if(!e)return C;if("string"==typeof e){var n=e.toLowerCase();b[n]&&(o=n),r&&(b[n]=r,o=n);var a=e.split("-");if(!o&&a.length>1)return t(a[0])}else{var s=e.name;b[s]=e,o=s}return!i&&o&&(C=o),o||!i&&C},T=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new B(r)},v=x;v.l=S,v.i=w,v.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var B=function(){function y(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var o=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return v},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=T(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return T(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<T(t)},m.$g=function(t,e,r){return v.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,i=!!v.u(e)||e,c=v.p(t),p=function(t,e){var o=v.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?o:o.endOf(s)},g=function(t,e){return v.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,y=this.$M,m=this.$D,x="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,y):p(0,y+1);case l:var C=this.$locale().weekStart||0,b=(f<C?f+7:f)-C;return p(i?m-b:m+(6-b),y);case s:case u:return g(x+"Hours",0);case a:return g(x+"Minutes",1);case n:return g(x+"Seconds",2);case o:return g(x+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,l=v.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[s]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[a]=c+"Hours",r[n]=c+"Minutes",r[o]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===s?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[v.p(t)]()},m.add=function(i,c){var u,p=this;i=Number(i);var g=v.p(c),f=function(t){var e=T(p);return v.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===s)return f(1);if(g===l)return f(7);var y=(u={},u[n]=e,u[a]=r,u[o]=t,u)[g]||1,m=this.$d.getTime()+i*y;return v.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=v.z(this),n=this.$H,a=this.$m,s=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,o,n){return t&&(t[r]||t(e,i))||o[r].slice(0,n)},u=function(t){return v.s(n%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return v.s(e.$y,4,"0");case"M":return s+1;case"MM":return v.s(s+1,2,"0");case"MMM":return d(r.monthsShort,s,h,3);case"MMMM":return d(h,s);case"D":return e.$D;case"DD":return v.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(n);case"HH":return v.s(n,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(n,a,!0);case"A":return g(n,a,!1);case"m":return String(a);case"mm":return v.s(a,2,"0");case"s":return String(e.$s);case"ss":return v.s(e.$s,2,"0");case"SSS":return v.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,p){var g,f=this,y=v.p(u),m=T(i),x=(m.utcOffset()-this.utcOffset())*e,C=this-m,b=function(){return v.m(f,m)};switch(y){case d:g=b()/12;break;case h:g=b();break;case c:g=b()/3;break;case l:g=(C-x)/6048e5;break;case s:g=(C-x)/864e5;break;case a:g=C/r;break;case n:g=C/e;break;case o:g=C/t;break;default:g=C}return p?g:v.a(g)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return b[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=S(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return v.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),_=B.prototype;return T.prototype=_,[["$ms",i],["$s",o],["$m",n],["$H",a],["$W",s],["$M",h],["$y",d],["$D",u]].forEach(function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),T.extend=function(t,e){return t.$i||(t(e,B,T),t.$i=!0),T},T.locale=S,T.isDayjs=w,T.unix=function(t){return T(1e3*t)},T.en=b[C],T.Ls=b,T.p={},T}()},3234(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},62559(t,e,r){"use strict";e.J=function(t){if(!t)return i.BLANK_URL;var e,r=n(t.trim());do{e=(r=n(r=o(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var a=r;if(!a)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(a))return a;var s=a.trimStart(),l=s.match(i.urlSchemeRegex);if(!l)return a;var h=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(h))return i.BLANK_URL;var c=s.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return i.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c};var i=r(3234);function o(t){return t.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function n(t){try{return decodeURIComponent(t)}catch(e){return t}}},61057(t,e,r){"use strict";function i(t,e,r){if(t&&t.length){const[i,o]=e,n=Math.PI/180*r,a=Math.cos(n),s=Math.sin(n);for(const e of t){const[t,r]=e;e[0]=(t-i)*a-(r-o)*s+i,e[1]=(t-i)*s+(r-o)*a+o}}}function o(t,e){return t[0]===e[0]&&t[1]===e[1]}function n(t,e,r,n=1){const a=r,s=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,h=[0,0];if(a)for(const t of l)i(t,h,a);const c=function(t,e,r){const i=[];for(const e of t){const t=[...e];o(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const n=[];e=Math.max(e,.1);const a=[];for(const t of i)for(let e=0;e<t.length-1;e++){const r=t[e],i=t[e+1];if(r[1]!==i[1]){const t=Math.min(r[1],i[1]);a.push({ymin:t,ymax:Math.max(r[1],i[1]),x:t===r[1]?r[0]:i[0],islope:(i[0]-r[0])/(i[1]-r[1])})}}if(a.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!a.length)return n;let s=[],l=a[0].ymin,h=0;for(;s.length||a.length;){if(a.length){let t=-1;for(let e=0;e<a.length&&!(a[e].ymin>l);e++)t=e;a.splice(0,t+1).forEach(t=>{s.push({s:l,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=l)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||h%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const r=s[t].edge,i=s[e].edge;n.push([[Math.round(r.x),l],[Math.round(i.x),l]])}l+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),h++}return n}(l,s,n);if(a){for(const t of l)i(t,h,-a);!function(t,e,r){const o=[];t.forEach(t=>o.push(...t)),i(o,e,r)}(c,h,-a)}return c}function a(t,e){var r;const i=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,.1));let a=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(a=o),n(t,o,i,a||1)}r.d(e,{A:()=>ot});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=a(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class h extends s{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=a(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,n=[],s=.5*r*Math.cos(o),h=.5*r*Math.sin(o);for(const[t,e]of i)l([t,e])&&n.push([[t[0]-s,t[1]+h],[...e]],[[t[0]+s,t[1]-h],[...e]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class c extends s{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const r=a(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const n=i/4;for(const a of t){const t=l(a),s=t/i,h=Math.ceil(s)-1,c=t-h*i,d=(a[0][0]+a[1][0])/2-i/4,u=Math.min(a[0][1],a[1][1]);for(let t=0;t<h;t++){const a=u+c+t*i,s=d-n+2*Math.random()*n,l=a-n+2*Math.random()*n,h=this.helper.ellipse(s,l,o,o,e);r.push(...h.ops)}}return{type:"fillSketch",ops:r}}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const r=a(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach(t=>{const n=l(t),a=Math.floor(n/(r+i)),s=(n+i-a*(r+i))/2;let h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);const d=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let t=0;t<a;t++){const n=t*(r+i),a=n+r,l=[h[0]+n*Math.cos(d)+s*Math.cos(d),h[1]+n*Math.sin(d)+s*Math.sin(d)],c=[h[0]+a*Math.cos(d)+s*Math.cos(d),h[1]+a*Math.sin(d)+s*Math.sin(d)];o.push(...this.helper.doubleLineOps(l[0],l[1],c[0],c[1],e))}}),o}}class p{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,o=a(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const o=l(t),n=Math.round(o/(2*e));let a=t[0],s=t[1];a[0]>s[0]&&(a=t[1],s=t[0]);const h=Math.atan((s[1]-a[1])/(s[0]-a[0]));for(let t=0;t<n;t++){const o=2*t*e,n=2*(t+1)*e,s=Math.sqrt(2*Math.pow(e,2)),l=[a[0]+o*Math.cos(h),a[1]+o*Math.sin(h)],c=[a[0]+n*Math.cos(h),a[1]+n*Math.sin(h)],d=[l[0]+s*Math.cos(h+Math.PI/4),l[1]+s*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}}),i}}const g={};class f{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const y={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 m(t,e){return t.type===e}function x(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",o=0,n=r[o];for(;!m(n,2);){let a=0;const s=[];if("BOD"===i){if("M"!==n.text&&"m"!==n.text)return x("M0,0"+t);o++,a=y[n.text],i=n.text}else m(n,1)?a=y[i]:(o++,a=y[n.text],i=n.text);if(!(o+a<r.length))throw new Error("Path data ended short");for(let t=o;t<o+a;t++){const e=r[t];if(!m(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof y[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),o+=a,n=r[o],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function C(t){let e=0,r=0,i=0,o=0;const n=[];for(const{key:a,data:s}of t)switch(a){case"M":n.push({key:"M",data:[...s]}),[e,r]=s,[i,o]=s;break;case"m":e+=s[0],r+=s[1],n.push({key:"M",data:[e,r]}),i=e,o=r;break;case"L":n.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],n.push({key:"L",data:[e,r]});break;case"C":n.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map((t,i)=>i%2?t+r:t+e);n.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":n.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map((t,i)=>i%2?t+r:t+e);n.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":n.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":n.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map((t,i)=>i%2?t+r:t+e);n.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":n.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=o}return n}function b(t){const e=[];let r="",i=0,o=0,n=0,a=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[n,a]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,n=0;"C"===r||"S"===r?(t=i+(i-s),n=o+(o-l)):(t=i,n=o),e.push({key:"C",data:[t,n,...c]}),s=c[0],l=c[1],i=c[2],o=c[3];break}case"T":{const[t,n]=c;let a=0,h=0;"Q"===r||"T"===r?(a=i+(i-s),h=o+(o-l)):(a=i,h=o);const d=i+2*(a-i)/3,u=o+2*(h-o)/3,p=t+2*(a-t)/3,g=n+2*(h-n)/3;e.push({key:"C",data:[d,u,p,g,t,n]}),s=a,l=h,i=t,o=n;break}case"Q":{const[t,r,n,a]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,u=n+2*(t-n)/3,p=a+2*(r-a)/3;e.push({key:"C",data:[h,d,u,p,n,a]}),s=t,l=r,i=n,o=a;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),n=c[2],a=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,l,h,l,h]}),i=l,o=h):i===l&&o===h||(w(i,o,l,h,t,r,n,a,s).forEach(function(t){e.push({key:"C",data:t})}),i=l,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=n,o=a}r=h}return e}function k(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function w(t,e,r,i,o,n,a,s,l,h){const c=(d=a,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=k(t,e,-c),[r,i]=k(r,i,-c);const a=(t-r)/2,h=(e-i)/2;let d=a*a/(o*o)+h*h/(n*n);d>1&&(d=Math.sqrt(d),o*=d,n*=d);const u=o*o,m=n*n,x=u*m-u*h*h-m*a*a,C=u*h*h+m*a*a,b=(s===l?-1:1)*Math.sqrt(Math.abs(x/C));f=b*o*h/n+(t+r)/2,y=b*-n*a/o+(e+i)/2,p=Math.asin(parseFloat(((e-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,s=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=w(r=f+o*Math.cos(g),i=y+n*Math.sin(g),e,s,o,n,a,0,l,[g,t,f,y])}m=g-p;const x=Math.cos(p),C=Math.sin(p),b=Math.cos(g),S=Math.sin(g),T=Math.tan(m/4),v=4/3*o*T,B=4/3*n*T,_=[t,e],A=[t+v*C,e-B*x],L=[r+v*S,i-B*b],F=[r,i];if(A[0]=2*_[0]-A[0],A[1]=2*_[1]-A[1],h)return[A,L,F].concat(u);{u=[A,L,F].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=k(u[e][0],u[e][1],c),i=k(u[e+1][0],u[e+1][1],c),o=k(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],o[0],o[1]])}return t}}const S={randOffset:function(t,e){return D(t,e)},randOffsetWithRange:function(t,e,r){return I(t,e,r)},ellipse:function(t,e,r,i,o){return A(t,e,o,_(r,i,o)).opset},doubleLineOps:function(t,e,r,i,o){return q(t,e,r,i,o,!0)}};function T(t,e,r,i,o){return{type:"path",ops:q(t,e,r,i,o)}}function v(t,e,r){const i=(t||[]).length;if(i>2){const o=[];for(let e=0;e<i-1;e++)o.push(...q(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&o.push(...q(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:o}}return 2===i?T(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function B(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=z(r[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:z(r[0],1.5*(1+.22*e.roughness),$(e));for(let t=1;t<r.length;t++){const n=r[t];if(n.length){const t=z(n,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:z(n,1.5*(1+.22*e.roughness),$(e));for(const e of t)"move"!==e.op&&i.push(e);for(const t of r)"move"!==t.op&&o.push(t)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function _(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/o;let a=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return a+=D(a*l,r),s+=D(s*l,r),{increment:n,rx:a,ry:s}}function A(t,e,r,i){const[o,n]=K(i.increment,t,e,i.rx,i.ry,1,i.increment*I(.1,I(.4,1,r),r),r);let a=N(o,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[o]=K(i.increment,t,e,i.rx,i.ry,1.5,0,r),n=N(o,null,r);a=a.concat(n)}return{estimatedPoints:n,opset:{type:"path",ops:a}}}function L(t,e,r,i,o,n,a,s,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=D(.01*d,l),u+=D(.01*u,l);let p=o,g=n;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=P(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=P(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return a&&(s?m.push(...q(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...q(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function F(t,e){const r=b(C(x(t))),i=[];let o=[0,0],n=[0,0];for(const{key:t,data:a}of r)switch(t){case"M":n=[a[0],a[1]],o=[a[0],a[1]];break;case"L":i.push(...q(n[0],n[1],a[0],a[1],e)),n=[a[0],a[1]];break;case"C":{const[t,r,o,s,l,h]=a;i.push(...W(t,r,o,s,l,h,n,e)),n=[l,h];break}case"Z":i.push(...q(n[0],n[1],o[0],o[1],e)),n=[o[0],o[1]]}return{type:"path",ops:i}}function M(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+D(t,e),i[0][1]+D(t,e)]});for(let n=1;n<o;n++)r.push({op:"lineTo",data:[i[n][0]+D(t,e),i[n][1]+D(t,e)]})}}return{type:"fillPath",ops:r}}function E(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!g[r])switch(r){case"zigzag":g[r]||(g[r]=new h(e));break;case"cross-hatch":g[r]||(g[r]=new c(e));break;case"dots":g[r]||(g[r]=new d(e));break;case"dashed":g[r]||(g[r]=new u(e));break;case"zigzag-line":g[r]||(g[r]=new p(e));break;default:r="hachure",g[r]||(g[r]=new s(e))}return g[r]}(e,S).fillPolygons(t,e)}function $(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function O(t){return t.randomizer||(t.randomizer=new f(t.seed||0)),t.randomizer.next()}function I(t,e,r,i=1){return r.roughness*i*(O(r)*(e-t)+t)}function D(t,e,r=1){return I(-t,t,e,r)}function q(t,e,r,i,o,n=!1){const a=n?o.disableMultiStrokeFill:o.disableMultiStroke,s=R(t,e,r,i,o,!0,!1);if(a)return s;const l=R(t,e,r,i,o,!0,!0);return s.concat(l)}function R(t,e,r,i,o,n,a){const s=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const d=c/2,u=.2+.2*O(o);let p=o.bowing*o.maxRandomnessOffset*(i-e)/200,g=o.bowing*o.maxRandomnessOffset*(t-r)/200;p=D(p,o,h),g=D(g,o,h);const f=[],y=()=>D(d,o,h),m=()=>D(c,o,h),x=o.preserveVertices;return n&&(a?f.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):f.push({op:"move",data:[t+(x?0:D(c,o,h)),e+(x?0:D(c,o,h))]})),a?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(x?0:y()),i+(x?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(x?0:m()),i+(x?0:m())]}),f}function z(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+D(e,r),t[0][1]+D(e,r)]),i.push([t[0][0]+D(e,r),t[0][1]+D(e,r)]);for(let o=1;o<t.length;o++)i.push([t[o][0]+D(e,r),t[o][1]+D(e,r)]),o===t.length-1&&i.push([t[o][0]+D(e,r),t[o][1]+D(e,r)]);return N(i,null,r)}function N(t,e,r){const i=t.length,o=[];if(i>3){const n=[],a=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){const r=t[e];n[0]=[r[0],r[1]],n[1]=[r[0]+(a*t[e+1][0]-a*t[e-1][0])/6,r[1]+(a*t[e+1][1]-a*t[e-1][1])/6],n[2]=[t[e+1][0]+(a*t[e][0]-a*t[e+2][0])/6,t[e+1][1]+(a*t[e][1]-a*t[e+2][1])/6],n[3]=[t[e+1][0],t[e+1][1]],o.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}if(e&&2===e.length){const t=r.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+D(t,r),e[1]+D(t,r)]})}}else 3===i?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&o.push(...R(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return o}function K(t,e,r,i,o,n,a,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),r+o*Math.sin(-t)]);for(let n=0;n<=2*Math.PI;n+=t){const t=[e+i*Math.cos(n),r+o*Math.sin(n)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+o*Math.sin(0)]),h.push([e+i*Math.cos(t),r+o*Math.sin(t)])}else{const c=D(.5,s)-Math.PI/2;h.push([D(n,s)+e+.9*i*Math.cos(c-t),D(n,s)+r+.9*o*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let a=c;a<d;a+=t){const t=[D(n,s)+e+i*Math.cos(a),D(n,s)+r+o*Math.sin(a)];l.push(t),h.push(t)}h.push([D(n,s)+e+i*Math.cos(c+2*Math.PI+.5*a),D(n,s)+r+o*Math.sin(c+2*Math.PI+.5*a)]),h.push([D(n,s)+e+.98*i*Math.cos(c+a),D(n,s)+r+.98*o*Math.sin(c+a)]),h.push([D(n,s)+e+.9*i*Math.cos(c+.5*a),D(n,s)+r+.9*o*Math.sin(c+.5*a)])}return[h,l]}function P(t,e,r,i,o,n,a,s,l){const h=n+D(.1,l),c=[];c.push([D(s,l)+e+.9*i*Math.cos(h-t),D(s,l)+r+.9*o*Math.sin(h-t)]);for(let n=h;n<=a;n+=t)c.push([D(s,l)+e+i*Math.cos(n),D(s,l)+r+o*Math.sin(n)]);return c.push([e+i*Math.cos(a),r+o*Math.sin(a)]),c.push([e+i*Math.cos(a),r+o*Math.sin(a)]),N(c,null,l)}function W(t,e,r,i,o,n,a,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const d=s.disableMultiStroke?1:2,u=s.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(u?0:D(h[0],s)),a[1]+(u?0:D(h[0],s))]}),c=u?[o,n]:[o+D(h[p],s),n+D(h[p],s)],l.push({op:"bcurveTo",data:[t+D(h[p],s),e+D(h[p],s),r+D(h[p],s),i+D(h[p],s),c[0],c[1]]});return l}function j(t){return[...t]}function H(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(j(t[0]),j(t[1]),j(t[2]),j(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const o=[],n=1-e;i.push(j(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(n*r[t+1][0]-n*r[t-1][0])/6,e[1]+(n*r[t+1][1]-n*r[t-1][1])/6],o[2]=[r[t+1][0]+(n*r[t][0]-n*r[t+2][0])/6,r[t+1][1]+(n*r[t][1]-n*r[t+2][1])/6],o[3]=[r[t+1][0],r[t+1][1]],i.push(o[1],o[2],o[3])}}return i}function Y(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function U(t,e,r){const i=Y(e,r);if(0===i)return Y(t,e);let o=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return o=Math.max(0,Math.min(1,o)),Y(t,X(e,r,o))}function X(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function G(t,e,r,i){const o=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],o=t[e+2],n=t[e+3];let a=3*i[0]-2*r[0]-n[0];a*=a;let s=3*i[1]-2*r[1]-n[1];s*=s;let l=3*o[0]-2*n[0]-r[0];l*=l;let h=3*o[1]-2*n[1]-r[1];return h*=h,a<l&&(a=l),s<h&&(s=h),a+s}(t,e)<r){const r=t[e+0];o.length?(n=o[o.length-1],a=r,Math.sqrt(Y(n,a))>1&&o.push(r)):o.push(r),o.push(t[e+3])}else{const i=.5,n=t[e+0],a=t[e+1],s=t[e+2],l=t[e+3],h=X(n,a,i),c=X(a,s,i),d=X(s,l,i),u=X(h,c,i),p=X(c,d,i),g=X(u,p,i);G([n,h,u,g],0,r,o),G([g,p,d,l],0,r,o)}var n,a;return o}function V(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,i,o){const n=o||[],a=t[e],s=t[r-1];let l=0,h=1;for(let i=e+1;i<r-1;++i){const e=U(t[i],a,s);e>l&&(l=e,h=i)}return Math.sqrt(l)>i?(Z(t,e,h+1,i,n),Z(t,h,r,i,n)):(n.length||n.push(a),n.push(s)),n}function Q(t,e=.15,r){const i=[],o=(t.length-1)/3;for(let r=0;r<o;r++)G(t,3*r,e,i);return r&&r>0?Z(i,0,i.length,r):i}const J="none";class tt{constructor(t){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=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){const n=this._o(o);return this._d("line",[T(t,e,r,i,n)],n)}rectangle(t,e,r,i,o){const n=this._o(o),a=[],s=function(t,e,r,i,o){return function(t,e){return v(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],o)}(t,e,r,i,n);if(n.fill){const o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===n.fillStyle?a.push(M([o],n)):a.push(E([o],n))}return n.stroke!==J&&a.push(s),this._d("rectangle",a,n)}ellipse(t,e,r,i,o){const n=this._o(o),a=[],s=_(r,i,n),l=A(t,e,n,s);if(n.fill)if("solid"===n.fillStyle){const r=A(t,e,n,s).opset;r.type="fillPath",a.push(r)}else a.push(E([l.estimatedPoints],n));return n.stroke!==J&&a.push(l.opset),this._d("ellipse",a,n)}circle(t,e,r,i){const o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[v(t,!1,r)],r)}arc(t,e,r,i,o,n,a=!1,s){const l=this._o(s),h=[],c=L(t,e,r,i,o,n,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=L(t,e,r,i,o,n,!0,!1,a);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,o,n,a){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=D(.01*h,a),c+=D(.01*c,a);let d=o,u=n;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/a.curveStepCount,g=[];for(let t=d;t<=u;t+=p)g.push([s+h*Math.cos(t),l+c*Math.sin(t)]);return g.push([s+h*Math.cos(u),l+c*Math.sin(u)]),g.push([s,l]),E([g],a)}(t,e,r,i,o,n,l));return l.stroke!==J&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],o=B(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=B(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...Q(H([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(i),10,(1+r.roughness)/2))}e.length&&i.push(E([e],r))}return r.stroke!==J&&i.push(o),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],o=v(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(M([t],r)):i.push(E([t],r))),r.stroke!==J&&i.push(o),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&"transparent"!==r.fill&&r.fill!==J,n=r.stroke!==J,a=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=b(C(x(t))),o=[];let n=[],a=[0,0],s=[];const l=()=>{s.length>=4&&n.push(...Q(s,1)),s=[]},h=()=>{l(),n.length&&(o.push(n),n=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),a=[e[0],e[1]],n.push(a);break;case"L":l(),n.push([e[0],e[1]]);break;case"C":if(!s.length){const t=n.length?n[n.length-1]:a;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),n.push([a[0],a[1]])}if(h(),!r)return o;const c=[];for(const t of o){const e=V(t,r);e.length&&c.push(e)}return c}(t,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),l=F(t,r);if(o)if("solid"===r.fillStyle)if(1===s.length){const e=F(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(M(s,r));else i.push(E(s,r));return n&&(a?s.forEach(t=>{i.push(v(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":e={d:this.opsToPath(t),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const n of e)switch(n.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,n,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,n,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,n,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){const n=this.gen.line(t,e,r,i,o);return this.draw(n),n}rectangle(t,e,r,i,o){const n=this.gen.rectangle(t,e,r,i,o);return this.draw(n),n}ellipse(t,e,r,i,o){const n=this.gen.ellipse(t,e,r,i,o);return this.draw(n),n}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,n,a=!1,s){const l=this.gen.arc(t,e,r,i,o,n,a,s);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class it{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(rt,"g"),n=t.options.fixedDecimalPlaceDigits;for(const a of e){let e=null;switch(a.type){case"path":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(a,n)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(a,n)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,a,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(rt,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){const n=this.gen.line(t,e,r,i,o);return this.draw(n)}rectangle(t,e,r,i,o){const n=this.gen.rectangle(t,e,r,i,o);return this.draw(n)}ellipse(t,e,r,i,o){const n=this.gen.ellipse(t,e,r,i,o);return this.draw(n)}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,n,a=!1,s){const l=this.gen.arc(t,e,r,i,o,n,a,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var ot={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new it(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},59572(t,e,r){"use strict";r.r(e),r.d(e,{parseMermaidToExcalidraw:()=>Xo});class i{constructor({converter:t}){this.convert=(t,e)=>this.converter(t,{...e,fontSize:e.fontSize||20}),this.converter=t}}var o,n,a;!function(t){t.ROUND="round",t.STADIUM="stadium",t.DOUBLECIRCLE="doublecircle",t.CIRCLE="circle",t.DIAMOND="diamond",t.CYLINDER="cylinder"}(o||(o={})),function(t){t.COLOR="color"}(n||(n={})),function(t){t.FILL="fill",t.STROKE="stroke",t.STROKE_WIDTH="stroke-width",t.STROKE_DASHARRAY="stroke-dasharray"}(a||(a={}));var s=r(11356);const l={arrow_circle:{endArrowhead:"circle"},arrow_cross:{endArrowhead:"bar"},arrow_open:{endArrowhead:null,startArrowhead:null},double_arrow_circle:{endArrowhead:"circle",startArrowhead:"circle"},double_arrow_cross:{endArrowhead:"bar",startArrowhead:"bar"},double_arrow_point:{endArrowhead:"arrow",startArrowhead:"arrow"}},h=t=>{let e=t.text;return"markdown"===t.labelType&&(e=(0,s.k)(t.text)),c(e)},c=t=>t.replace(/\s?(fa|fab):[a-zA-Z0-9-]+/g,""),d=t=>{const e={};return Object.keys(t).forEach(r=>{switch(r){case a.FILL:e.backgroundColor=t[r],e.fillStyle="solid";break;case a.STROKE:e.strokeColor=t[r];break;case a.STROKE_WIDTH:e.strokeWidth=Number(t[r]?.split("px")[0]);break;case a.STROKE_DASHARRAY:e.strokeStyle="dashed"}}),e},u=t=>{const e={};return Object.keys(t).forEach(r=>{if(r===n.COLOR)e.strokeColor=t[r]}),e},p=(t,e)=>Math.max(20,Math.ceil(t.length*e*.62)),g=new i({converter:(t,e)=>{const r=[],i=e.fontSize,{getGroupIds:n,getParentId:a}=(t=>{const e={};t.subGraphs.map(r=>{r.nodeIds.forEach(i=>{e[r.id]={id:r.id,parent:null,isLeaf:!1},e[i]={id:i,parent:r.id,isLeaf:void 0!==t.vertices[i]}})});const r={};return[...Object.keys(t.vertices),...t.subGraphs.map(t=>t.id)].forEach(t=>{if(!e[t])return;let i=e[t];const o=[];for(i.isLeaf||o.push(`subgraph_group_${i.id}`);i.parent;)o.push(`subgraph_group_${i.parent}`),i=e[i.parent];r[t]=o}),{getGroupIds:t=>r[t]||[],getParentId:t=>e[t]?e[t].parent:null}})(t);return t.subGraphs.reverse().forEach(t=>{const e=n(t.id),o=h(t),a=p(o,i||16)+64,s=Math.max(t.width,a),l=t.x-(s-t.width)/2,c=d(t.containerStyle),g=u(t.labelStyle),f={id:t.id,type:"rectangle",groupIds:e,x:l,y:t.y,width:s,height:t.height,label:{groupIds:e,text:o,fontSize:i,verticalAlign:"top",...g},...c};r.push(f)}),Object.values(t.vertices).forEach(t=>{if(!t)return;const e=n(t.id),a=h(t),s=((t,e,r,i)=>{const n=i||20;if(t!==o.CYLINDER||!e||e.includes("\n"))return n;const a=Math.max(20,r-12);return p(e,n)<=a?n:Math.max(12,Math.floor(a/(.62*e.length)))})(t.type,a,t.width,i),l=d(t.containerStyle),c=u(t.labelStyle);let g={id:t.id,type:"rectangle",groupIds:e,x:t.x,y:t.y,width:t.width,height:t.height,strokeWidth:2,label:{groupIds:e,text:a,fontSize:s,...c},link:t.link||null,...l};switch(t.type){case o.STADIUM:case o.ROUND:g={...g,roundness:{type:3}};break;case o.DOUBLECIRCLE:{const i=5;e.push(`doublecircle_${t.id}}`);const o={type:"ellipse",groupIds:e,x:t.x+i,y:t.y+i,width:t.width-2*i,height:t.height-2*i,strokeWidth:2,roundness:{type:3},label:{groupIds:e,text:a,fontSize:s,...c}};g={...g,groupIds:e,type:"ellipse"},r.push(o);break}case o.CIRCLE:g.type="ellipse";break;case o.DIAMOND:g.type="diamond"}r.push(g)}),t.edges.forEach(t=>{let e=[];const o=a(t.start),s=a(t.end);o&&o===s&&(e=n(o));const{startX:c,startY:d,reflectionPoints:u}=t,p=u.map(t=>{return e=t.x-u[0].x,r=t.y-u[0].y,[e,r];var e,r}),g=(f=t.type||"arrow_point",l[f]);var f;const y=r.find(e=>e.id===t.start),m=r.find(e=>e.id===t.end);if(!y||!m)return;const x={id:`${t.start}_${t.end}`,type:"arrow",groupIds:e,x:c,y:d,strokeWidth:"thick"===t.stroke?4:2,strokeStyle:"dotted"===t.stroke?"dashed":void 0,points:p,...t.text?{label:{text:h(t),fontSize:i,groupIds:e}}:{},roundness:{type:2},...g,start:{id:y.id||""},end:{id:m.id||""}};r.push(x)}),{elements:r}}});let f=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_","");const y=new i({converter:t=>{const e=f(),{width:r,height:i}=t,o={type:"image",x:0,y:0,width:r,height:i,status:"saved",fileId:e};return{files:{[e]:{id:e,mimeType:t.mimeType,dataURL:t.dataURL}},elements:[o]}}}),m=(t,e)=>[t,e],x=t=>t.replace(/\\n/g,"\n"),C=t=>{const e={type:"line",x:t.startX,y:t.startY,points:[m(0,0),m(t.endX-t.startX,t.endY-t.startY)],width:t.endX-t.startX,height:t.endY-t.startY,strokeStyle:t.strokeStyle||"solid",strokeColor:t.strokeColor||"#000",strokeWidth:t.strokeWidth||1};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),t.id&&Object.assign(e,{id:t.id}),e},b=t=>{const e={type:"text",x:t.x,y:t.y,width:t.width,height:t.height,text:x(t.text)||"",fontSize:t.fontSize,verticalAlign:"top",strokeColor:t.color};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),t.id&&Object.assign(e,{id:t.id}),e},k=t=>{const e={text:x(t?.label?.text||""),fontSize:t?.label?.fontSize,textAlign:t.label?.textAlign,verticalAlign:t.label?.verticalAlign||"middle",strokeColor:t.label?.color||"#000",...t.groupId?{groupIds:[t.groupId]}:{}};let r={};"rectangle"===t.type&&"activation"===t.subtype&&(r={backgroundColor:"#e9ecef",fillStyle:"solid"});const i={id:t.id,type:t.type,x:t.x,y:t.y,width:t.width,height:t.height,label:e,strokeStyle:t?.strokeStyle,strokeWidth:t?.strokeWidth,strokeColor:t?.strokeColor,backgroundColor:t?.bgColor,fillStyle:"solid",...r};return t.groupId&&Object.assign(i,{groupIds:[t.groupId]}),i},w=t=>{const e={type:"arrow",x:t.startX,y:t.startY,points:t.points?.map(([t,e])=>m(t,e))||[m(0,0),m(t.endX-t.startX,t.endY-t.startY)],width:t.endX-t.startX,height:t.endY-t.startY,strokeStyle:t?.strokeStyle||"solid",endArrowhead:t?.endArrowhead||null,startArrowhead:t?.startArrowhead||null,label:{text:x(t?.label?.text||""),fontSize:16,textAlign:t?.label?.textAlign,verticalAlign:t?.label?.verticalAlign},roundness:{type:2},start:t.start,end:t.end};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),e},S=t=>{if(!t)return!0;const e=t.trim().toLowerCase();return"transparent"===e||"none"===e||"rgba(0,0,0,0)"===e||"rgba(0, 0, 0, 0)"===e},T=(t,e,r=!0)=>{const i=t,o=i.groupIds??[];if(o.includes(e)||(i.groupIds=[...o,e]),!r||!i.label)return;const n=i.label.groupIds??[];n.includes(e)||(i.label.groupIds=[...n,e])},v=new i({converter:t=>{const e=[],r=[];if(Object.values(t.nodes).forEach(t=>{t&&t.length&&t.forEach(t=>{let i;switch(t.type){case"line":i=C(t);break;case"rectangle":case"ellipse":i=k(t);break;case"text":i=b(t);break;default:throw`unknown type ${t.type}`}"rectangle"===t.type&&"activation"===t?.subtype?r.push(i):e.push(i)})}),Object.values(t.lines).forEach(t=>{t&&e.push(C(t))}),Object.values(t.arrows).forEach(t=>{t&&(e.push(w(t)),t.sequenceNumber&&e.push(k(t.sequenceNumber)))}),e.push(...r),t.loops){const{lines:r,texts:i,nodes:o}=t.loops;r.forEach(t=>{e.push(C(t))}),i.forEach(t=>{e.push(b(t))}),o.forEach(t=>{e.push(k(t))})}return t.groups&&t.groups.forEach(t=>{const{actorKeys:r,name:i}=t;let o=1/0,n=1/0,a=0,s=0;if(!r.length)return;const l=e.filter(t=>{if(t.id){const e=t.id.indexOf("-"),i=t.id.substring(0,e);return r.includes(i)}return!1});if(!l.length)return;if(l.forEach(t=>{void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height&&(o=Math.min(o,t.x),n=Math.min(n,t.y),a=Math.max(a,t.x+t.width),s=Math.max(s,t.y+t.height))}),!(Number.isFinite(o)&&Number.isFinite(n)&&Number.isFinite(a)&&Number.isFinite(s)))return;const h=o-10,c=n-10,d=a-o+20,u=s-n+20,p=f(),g=f(),y=k({type:"rectangle",x:h,y:c,width:d,height:u,bgColor:S(t.fill)?void 0:t.fill,strokeColor:"#1f1f1f",strokeWidth:1,id:p,groupId:g});if(e.unshift(y),e.forEach(t=>{t.id!==p&&void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height&&t.x>=o&&t.x+t.width<=a&&t.y>=n&&t.y+t.height<=s&&T(t,g)}),i){const t=b({type:"text",id:f(),text:i,x:h+4,y:c-24,width:(m=i,x=16,Math.max(20,Math.round(m.length*x*.6))),height:24,fontSize:16,color:"#1f1f1f",groupId:g});T(t,g,!1),e.push(t)}var m,x}),{elements:e}}}),B=new i({converter:t=>{const e=[];return t.nodes.forEach(t=>{t&&t.length&&t.forEach(t=>{let r;switch(t.type){case"line":r=C(t);break;case"rectangle":case"ellipse":r=k(t);break;case"text":r=b(t);break;default:throw`unknown type ${t.type}`}e.push(r)})}),Object.values(t.lines).forEach(t=>{t&&e.push(C(t))}),Object.values(t.arrows).forEach(t=>{if(!t)return;const r=w(t);e.push(r)}),Object.values(t.text).forEach(t=>{const r=b(t);e.push(r)}),Object.values(t.namespaces).forEach(r=>{const i=Object.keys(r.classes),o=[...i],n=[...t.lines,...t.arrows,...t.text];i.forEach(t=>{const e=n.filter(e=>e.metadata&&e.metadata.classId===t).map(t=>t.id);e.length&&o.push(...e)});const a={type:"frame",id:f(),name:r.id,children:o};e.push(a)}),{elements:e}}}),_=new i({converter:t=>{const e=[];return t.nodes.forEach(t=>{t&&t.length&&t.forEach(t=>{let r;switch(t.type){case"line":r=C(t);break;case"rectangle":case"ellipse":r=k(t);break;case"text":r=b(t);break;default:throw`unknown type ${t.type}`}e.push(r)})}),t.lines.forEach(t=>{e.push(C(t))}),t.arrows.forEach(t=>{e.push(w(t))}),t.text.forEach(t=>{e.push(b(t))}),{elements:e}}}),A=(t,e)=>[t,e],L="#000000",F=new Set(["choice","fork","join","stateStart","stateEnd","divider"]),M=t=>"stateEnd"===t.shape?[`state_end_group_${t.id}`]:void 0,E=t=>"rectWithTitle"===t.shape&&t.description.length?[t.text,...t.description].join("\n"):t.text;let $;const O=(t,e)=>{const r=(()=>{if(void 0!==$)return $;if("undefined"==typeof document)return $=null,$;try{$=document.createElement("canvas").getContext("2d")}catch{$=null}return $})();return r?(r.font=`${e}px Excalifont, sans-serif`,r.measureText(t).width):t.length*e*.6},I=(t,e,r)=>{if(O(t,e)<=r)return[t];const i=[];let o="";for(const n of t){const t=`${o}${n}`;o&&O(t,e)>r?(i.push(o),o=n):o=t}return o&&i.push(o),i},D=(t,e,r)=>{const i=t.map(t=>((t,e,r)=>{if(!t.trim())return t;if(O(t,e)<=r)return t;const i=t.split(/\s+/).filter(Boolean),o=[];let n="";for(const t of i){const i=I(t,e,r);for(const[t,a]of i.entries()){const i=n?`${n}${n&&0===t?" ":""}${a}`:a;O(i,e)<=r?n=i:(n&&o.push(n),n=a)}i.length}return o.push(n),o.join("\n")})(t,e,r)).join("\n"),o=i.split("\n"),n=Math.max(...o.map(t=>O(t,e)));return{width:n,height:o.length*e*1.25}},q=t=>{const e=E(t);if(!e||F.has(t.shape))return 16;const r=Math.max(1,t.width-10),i=Math.max(1,t.height-10),o=e.split("\n");if(o.length>1){const t=Math.max(...o.map(t=>O(t,16)));if(t<=r)return 16}return((t,e,r,i)=>{const o=t.split("\n");for(let t=16;t>=14;t-=1){const{height:i}=D(o,t,e);if(i<=r)return t}return i})(e,r,i,1===o.length?16:14)},R=t=>{const e=d(t.containerStyle),r=(t=>{if(F.has(t.shape))return;const e=E(t);return e?{text:e,fontSize:q(t),verticalAlign:"rectWithTitle"===t.shape||"roundedWithTitle"===t.shape?"top":"middle",...u(t.labelStyle)}:void 0})(t),i="choice"===t.shape?"diamond":"stateStart"===t.shape||"stateEnd"===t.shape?"ellipse":"rectangle",o="rect"===t.shape||"rectWithTitle"===t.shape||"roundedWithTitle"===t.shape,n="stateStart"===t.shape||"fork"===t.shape||"join"===t.shape,a=e.backgroundColor||e.strokeColor||L,s=e.strokeColor||e.backgroundColor||L;return{id:t.id,type:i,...M(t)?{groupIds:M(t)}:{},x:t.x,y:t.y,width:t.width,height:t.height,...r?{label:r}:{},...e,...o?{roundness:{type:3}}:{},...n?{backgroundColor:a,strokeColor:s,fillStyle:"solid"}:{}}},z=new i({converter:t=>{const e=[];return t.nodes.forEach(t=>{if(!t.isRenderable)return;const r=R(t);e.push(r);const i=(t=>{if(!t.dividerLine)return null;const e=d(t.containerStyle);return{id:`${t.id}__divider`,type:"line",x:t.dividerLine.startX,y:t.dividerLine.startY,width:t.dividerLine.endX-t.dividerLine.startX,height:t.dividerLine.endY-t.dividerLine.startY,points:[A(0,0),A(t.dividerLine.endX-t.dividerLine.startX,t.dividerLine.endY-t.dividerLine.startY)],strokeColor:e.strokeColor||"#000",strokeWidth:e.strokeWidth||1}})(t);i&&e.push(i),"stateEnd"===t.shape&&e.push((t=>{const e=d(t.containerStyle),r=Math.max(2,.32*Math.min(t.width,t.height)),i=t.endInnerColor||e.strokeColor||e.backgroundColor||L;return{id:`${t.id}__inner`,type:"ellipse",groupIds:M(t),x:t.x+r,y:t.y+r,width:Math.max(1,t.width-2*r),height:Math.max(1,t.height-2*r),backgroundColor:i,strokeColor:i,fillStyle:"solid",strokeWidth:1}})(t))}),t.edges.forEach(t=>{e.push((t=>{const e=t.reflectionPoints.map((t,e,r)=>{const i=r[0];return 0===e?A(0,0):A(t.x-i.x,t.y-i.y)});return{id:t.id,type:"arrow",x:t.startX,y:t.startY,width:t.endX-t.startX,height:t.endY-t.startY,points:e,strokeColor:t.strokeColor||"#000",strokeWidth:t.strokeWidth||2,strokeStyle:t.strokeStyle||"solid",endArrowhead:t.isNoteEdge?null:"triangle",roundness:{type:2},start:{id:t.start},end:{id:t.end},...t.text?{label:{text:t.text,fontSize:16}}:{}}})(t))}),{elements:e}}}),N=t=>{const e=(t=P(t)).replace(/#(\d+);/g,"&#$1;").replace(/#([a-z]+);/g,"&$1;"),r=document.createElement("textarea");return r.innerHTML=e,r.value},K=t=>{const e=t.getAttribute("transform"),r=e?.match(/translate\(([ \d.-]+),\s*([\d.-]+)\)/);let i=0,o=0;return r&&(i=Number(r[1]),o=Number(r[2])),{transformX:i,transformY:o}},P=function(t){return t.replace(/fl°°/g,"#").replace(/fl°/g,"&").replace(/¶ß/g,";")},W=(t,e=.5)=>{const r=[];return t.forEach(t=>{const i=r[r.length-1];if(!i)return void r.push(t);Math.hypot(t[0]-i[0],t[1]-i[1])<=e||r.push(t)}),r},j=t=>{const e=t.getAttribute("d");if(!e)return null;const r=Array.from(e.matchAll(/-?\d*\.?\d+(?:e[-+]?\d+)?/gi),t=>Number(t[0]));return r.length<4?null:{startX:r[0],startY:r[1],endX:r[r.length-2],endY:r[r.length-1]}},H=t=>{const e=t.getAttribute("data-points");if(!e){const e=j(t);return e?[{x:e.startX,y:e.startY},{x:e.endX,y:e.endY}]:[]}try{const t=atob(e),r=JSON.parse(t);return Array.isArray(r)?r.filter(t=>t&&"number"==typeof t.x&&"number"==typeof t.y&&Number.isFinite(t.x)&&Number.isFinite(t.y)):[]}catch{return[]}},Y=(t,e={x:0,y:0},r="LM")=>{if("path"!==t.tagName.toLowerCase())throw new Error(`Invalid input: Expected an HTMLElement of tag "path", got ${t.tagName}`);const i=t.getAttribute("d");if(!i)throw new Error('Path element does not contain a "d" attribute');const o=i.split(new RegExp(`(?=[${r}])`)),n=o[0].substring(1).split(",").map(t=>parseFloat(t)),a=o[o.length-1].substring(1).split(",").map(t=>parseFloat(t)),s=o.map(t=>{const e=t[0],r=t.substring(1).split(",").map(t=>parseFloat(t));return"C"===e?{x:r[4],y:r[5],command:e}:{x:r[0],y:r[1],command:e}}).filter((t,e,r)=>{if(0===e||e===r.length-1)return!0;if(t.x===r[e-1].x&&t.y===r[e-1].y)return!1;if(e===r.length-2&&"C"===t.command)return!1;if(e===r.length-2&&(r[e-1].x===t.x||r[e-1].y===t.y)){const e=r[r.length-1];return Math.hypot(e.x-t.x,e.y-t.y)>20}return t.x!==r[e-1].x||t.y!==r[e-1].y}).map(t=>({x:t.x+e.x,y:t.y+e.y}));return{startX:n[0]+e.x,startY:n[1]+e.y,endX:a[0]+e.x,endY:a[1]+e.y,reflectionPoints:s}},U=(t,e={})=>(t=>({...t,elements:t.elements.map(t=>{if(!("points"in t)||!Array.isArray(t.points))return t;const e=t.points;if(e.length<2)return t;const r=W(e);return r.length===e.length?t:{...t,points:r}})}))((()=>{switch(t.type){case"graphImage":return y.convert(t,e);case"flowchart":return g.convert(t,e);case"sequence":return v.convert(t,e);case"class":return B.convert(t,e);case"erd":return _.convert(t,e);case"state":return z.convert(t,e);default:throw new Error(`graphToExcalidraw: unknown graph type "${t.type}, only flowcharts are supported!"`)}})());var X=r(37851),G=r(81818),V=r(6923),Z=(r(1778),r(75999),r(23665),r(91865),r(3868),r(8969),r(24731)),Q=r(28342),J=r(68861),tt=r(31293),et=r(86827),rt=r(84146),it=r(51444),ot="comm",nt="rule",at="decl",st="@keyframes",lt="@layer",ht=Math.abs,ct=String.fromCharCode;Object.assign;function dt(t){return t.trim()}function ut(t,e,r){return t.replace(e,r)}function pt(t,e){return 0|t.charCodeAt(e)}function gt(t,e,r){return t.slice(e,r)}function ft(t){return t.length}function yt(t){return t.length}function mt(t,e){return e.push(t),t}function xt(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function Ct(t,e,r,i){switch(t.type){case lt:if(t.children.length)break;case"@import":case"@namespace":case at:return t.return=t.return||t.value;case ot:return"";case st:return t.return=t.value+"{"+xt(t.children,i)+"}";case nt:if(!ft(t.value=t.props.join(",")))return""}return ft(r=xt(t.children,i))?t.return=t.value+"{"+r+"}":""}var bt=1,kt=1,wt=0,St=0,Tt=0,vt="";function Bt(t,e,r,i,o,n,a,s){return{value:t,root:e,parent:r,type:i,props:o,children:n,line:bt,column:kt,length:a,return:"",siblings:s}}function _t(){return Tt=St>0?pt(vt,--St):0,kt--,10===Tt&&(kt=1,bt--),Tt}function At(){return Tt=St<wt?pt(vt,St++):0,kt++,10===Tt&&(kt=1,bt++),Tt}function Lt(){return pt(vt,St)}function Ft(){return St}function Mt(t,e){return gt(vt,t,e)}function Et(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $t(t){return bt=kt=1,wt=ft(vt=t),St=0,[]}function Ot(t){return vt="",t}function It(t){return dt(Mt(St-1,Rt(91===t?t+2:40===t?t+1:t)))}function Dt(t){for(;(Tt=Lt())&&Tt<33;)At();return Et(t)>2||Et(Tt)>3?"":" "}function qt(t,e){for(;--e&&At()&&!(Tt<48||Tt>102||Tt>57&&Tt<65||Tt>70&&Tt<97););return Mt(t,Ft()+(e<6&&32==Lt()&&32==At()))}function Rt(t){for(;At();)switch(Tt){case t:return St;case 34:case 39:34!==t&&39!==t&&Rt(Tt);break;case 40:41===t&&Rt(t);break;case 92:At()}return St}function zt(t,e){for(;At()&&t+Tt!==57&&(t+Tt!==84||47!==Lt()););return"/*"+Mt(e,St-1)+"*"+ct(47===t?t:At())}function Nt(t){for(;!Et(Lt());)At();return Mt(t,St)}function Kt(t){return Ot(Pt("",null,null,null,[""],t=$t(t),0,[0],t))}function Pt(t,e,r,i,o,n,a,s,l){for(var h=0,c=0,d=a,u=0,p=0,g=0,f=1,y=1,m=1,x=0,C=0,b="",k=o,w=n,S=i,T=b;y;)switch(g=C,C=At()){case 40:108!=g&&58==pt(T,d-1)?(x++,T+="("):T+=It(C);break;case 41:x--,T+=")";break;case 34:case 39:case 91:T+=It(C);break;case 9:case 10:case 13:case 32:if(x>0){T+=ct(C);break}T+=Dt(g);break;case 92:T+=qt(Ft()-1,7);continue;case 47:switch(Lt()){case 42:case 47:mt(jt(zt(At(),Ft()),e,r,l),l),5!=Et(g||1)&&5!=Et(Lt()||1)||!ft(T)||" "===gt(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*f:s[h++]=ft(T)*m;case 125*f:case 59:case 0:if(x>0&&C){T+=ct(C);break}switch(C){case 0:case 125:y=0;case 59+c:-1==m&&(T=ut(T,/\f/g,"")),p>0&&(ft(T)-d||0===f)&&mt(p>32?Ht(T+";",i,r,d-1,l):Ht(ut(T," ","")+";",i,r,d-2,l),l);break;case 59:T+=";";default:if(mt(S=Wt(T,e,r,h,c,o,s,b,k=[],w=[],d,n),n),123===C)if(0===c)Pt(T,e,S,S,k,n,d,s,w);else{switch(u){case 99:if(110===pt(T,3))break;case 108:if(97===pt(T,2))break;default:c=0;case 100:case 109:case 115:}c?Pt(t,S,S,i&&mt(Wt(t,S,S,0,0,o,s,b,o,k=[],d,w),w),o,w,d,s,i?k:w):Pt(T,S,S,S,[""],w,0,s,w)}}h=c=p=0,f=m=1,b=T="",d=a;break;case 58:d=1+ft(T),p=g;default:if(f<1)if(123==C)--f;else if(125==C&&0==f++&&125==_t())continue;switch(T+=ct(C),C*f){case 38:m=c>0?1:(T+="\f",-1);break;case 44:if(x>0)break;s[h++]=(ft(T)-1)*m,m=1;break;case 64:45===Lt()&&(T+=It(At())),u=Lt(),c=d=ft(b=T+=Nt(Ft())),C++;break;case 45:45===g&&2==ft(T)&&(f=0)}}return n}function Wt(t,e,r,i,o,n,a,s,l,h,c,d){for(var u=o-1,p=0===o?n:[""],g=yt(p),f=0,y=0,m=0;f<i;++f)for(var x=0,C=gt(t,u+1,u=ht(y=a[f])),b=t;x<g;++x)(b=dt(y>0?p[x]+" "+C:ut(C,/&\f/g,p[x])))&&(l[m++]=b);return Bt(t,e,r,0===o?nt:s,l,h,c,d)}function jt(t,e,r,i){return Bt(t,e,r,ot,ct(Tt),gt(t,2,-2),0,i)}function Ht(t,e,r,i,o){return Bt(t,e,r,at,gt(t,0,i),gt(t,i+1,-1),i,o)}var Yt=r(99418),Ut=r(32178),Xt=r(30622),Gt=r(14608);var Vt=r(19663);function Zt(t){if(null==t)return!0;if((0,Xt.X)(t))return!!("function"==typeof t.splice||"string"==typeof t||(0,Ut.P)(t)||(0,Vt.i)(t)||(0,Gt.N)(t))&&0===t.length;if("object"==typeof t||"function"==typeof t){if(t instanceof Map||t instanceof Set)return 0===t.size;const e=Object.keys(t);return function(t){const e=t?.constructor;return t===("function"==typeof e?e.prototype:Object.prototype)}(t)?0===e.filter(t=>"constructor"!==t).length:0===e.length}return!0}var Qt={id:"c4",detector:(0,et.K)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(2227).then(r.bind(r,52227));return{id:"c4",diagram:t}},"loader")},Jt="flowchart",te={id:Jt,detector:(0,et.K)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(2703),r.e(2579)]).then(r.bind(r,22579));return{id:Jt,diagram:t}},"loader")},ee="flowchart-v2",re={id:ee,detector:(0,et.K)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(2703),r.e(2579)]).then(r.bind(r,22579));return{id:ee,diagram:t}},"loader")},ie="swimlane",oe={id:ie,detector:(0,et.K)(t=>/^\s*swimlane-beta\b/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(2703),r.e(893)]).then(r.bind(r,80893));return{id:ie,diagram:t}},"loader")},ne={id:"er",detector:(0,et.K)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(1012).then(r.bind(r,11012));return{id:"er",diagram:t}},"loader")},ae="gitGraph",se={id:ae,detector:(0,et.K)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6202)]).then(r.bind(r,76202));return{id:ae,diagram:t}},"loader")},le="gantt",he={id:le,detector:(0,et.K)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(2018).then(r.bind(r,12018));return{id:le,diagram:t}},"loader")},ce="info",de={id:ce,detector:(0,et.K)(t=>/^\s*info/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(4754)]).then(r.bind(r,4754));return{id:ce,diagram:t}},"loader")},ue={id:"pie",detector:(0,et.K)(t=>/^\s*pie/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(1082)]).then(r.bind(r,51082));return{id:"pie",diagram:t}},"loader")},pe="quadrantChart",ge={id:pe,detector:(0,et.K)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(9725).then(r.bind(r,59725));return{id:pe,diagram:t}},"loader")},fe="xychart",ye={id:fe,detector:(0,et.K)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(9499).then(r.bind(r,89499));return{id:fe,diagram:t}},"loader")},me="requirement",xe={id:me,detector:(0,et.K)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(7632).then(r.bind(r,57632));return{id:me,diagram:t}},"loader")},Ce="sequence",be={id:Ce,detector:(0,et.K)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(4371).then(r.bind(r,64371));return{id:Ce,diagram:t}},"loader")},ke="class",we={id:ke,detector:(0,et.K)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(9786),r.e(6084)]).then(r.bind(r,16084));return{id:ke,diagram:t}},"loader")},Se="classDiagram",Te={id:Se,detector:(0,et.K)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(9786),r.e(5088)]).then(r.bind(r,5088));return{id:Se,diagram:t}},"loader")},ve="state",Be={id:ve,detector:(0,et.K)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(697),r.e(3263),r.e(5422),r.e(9756),r.e(4775)]).then(r.bind(r,24775));return{id:ve,diagram:t}},"loader")},_e="stateDiagram",Ae={id:_e,detector:(0,et.K)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(9756),r.e(1727)]).then(r.bind(r,11727));return{id:_e,diagram:t}},"loader")},Le="journey",Fe={id:Le,detector:(0,et.K)(t=>/^\s*journey/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(8256).then(r.bind(r,68256));return{id:Le,diagram:t}},"loader")},Me={draw:(0,et.K)((t,e,r)=>{tt.R.debug("rendering svg for syntax error\n");const i=(0,X.D)(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),(0,J.a$)(i,100,512,!0),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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")},Ee=Me,$e={db:{},renderer:Me,parser:{parse:(0,et.K)(()=>{},"parse")}},Oe="flowchart-elk",Ie={id:Oe,detector:(0,et.K)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(2703),r.e(2579)]).then(r.bind(r,22579));return{id:Oe,diagram:t}},"loader")},De="timeline",qe={id:De,detector:(0,et.K)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(8814).then(r.bind(r,28814));return{id:De,diagram:t}},"loader")},Re="mindmap",ze={id:Re,detector:(0,et.K)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(3813).then(r.bind(r,93813));return{id:Re,diagram:t}},"loader")},Ne="kanban",Ke={id:Ne,detector:(0,et.K)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(5061).then(r.bind(r,5061));return{id:Ne,diagram:t}},"loader")},Pe="sankey",We={id:Pe,detector:(0,et.K)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(2726).then(r.bind(r,62726));return{id:Pe,diagram:t}},"loader")},je="packet",He={id:je,detector:(0,et.K)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(5460)]).then(r.bind(r,55460));return{id:je,diagram:t}},"loader")},Ye="radar",Ue={id:Ye,detector:(0,et.K)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6085)]).then(r.bind(r,26085));return{id:Ye,diagram:t}},"loader")},Xe="block",Ge={id:Xe,detector:(0,et.K)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(697),r.e(7551)]).then(r.bind(r,37551));return{id:Xe,diagram:t}},"loader")},Ve="treeView",Ze={id:Ve,detector:(0,et.K)(t=>/^\s*treeView-beta/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(3106)]).then(r.bind(r,23106));return{id:Ve,diagram:t}},"loader")},Qe="architecture",Je={id:Qe,detector:(0,et.K)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(165),r.e(5181)]).then(r.bind(r,15181));return{id:Qe,diagram:t}},"loader")},tr="eventmodeling",er={id:tr,detector:(0,et.K)(t=>/^\s*eventmodeling/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(2640)]).then(r.bind(r,22640));return{id:tr,diagram:t}},"loader")},rr="ishikawa",ir={id:rr,detector:(0,et.K)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(4892).then(r.bind(r,84892));return{id:rr,diagram:t}},"loader")},or="venn",nr={id:or,detector:(0,et.K)(t=>/^\s*venn-beta/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(1218).then(r.bind(r,71218));return{id:or,diagram:t}},"loader")},ar="treemap",sr={id:ar,detector:(0,et.K)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6317)]).then(r.bind(r,76317));return{id:ar,diagram:t}},"loader")},lr="wardley",hr={id:lr,detector:(0,et.K)(t=>/^\s*wardley-beta/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(3084)]).then(r.bind(r,63084));return{id:lr,diagram:t}},"loader")},cr="cynefin",dr={id:cr,detector:(0,et.K)(t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(8888)]).then(r.bind(r,98888));return{id:cr,diagram:t}},"loader")},ur="railroad",pr={id:ur,detector:(0,et.K)(t=>/^\s*railroad-beta/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(4204),r.e(135)]).then(r.bind(r,20135));return{id:ur,diagram:t}},"loader")},gr="railroadEbnf",fr={id:gr,detector:(0,et.K)(t=>/^\s*railroad-ebnf-beta/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(4204),r.e(5945)]).then(r.bind(r,75945));return{id:gr,diagram:t}},"loader")},yr="railroadAbnf",mr={id:yr,detector:(0,et.K)(t=>/^\s*railroad-abnf-beta/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(4204),r.e(7111)]).then(r.bind(r,37111));return{id:yr,diagram:t}},"loader")},xr="railroadPeg",Cr={id:xr,detector:(0,et.K)(t=>/^\s*railroad-peg-beta/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(4204),r.e(636)]).then(r.bind(r,60636));return{id:xr,diagram:t}},"loader")},br=!1,kr=(0,et.K)(()=>{br||(br=!0,(0,J.Js)("error",$e,t=>"error"===t.toLowerCase().trim()),(0,J.Js)("---",{db:{clear:(0,et.K)(()=>{},"clear")},styles:{},renderer:{draw:(0,et.K)(()=>{},"draw")},parser:{parse:(0,et.K)(()=>{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:(0,et.K)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,J.Xd)(Ie,ze,Je),(0,J.Xd)(Qt,Ke,Te,we,ne,he,de,ue,xe,be,oe,re,te,qe,se,Ae,Be,Fe,ge,We,He,ye,Ge,er,Ze,Ue,ir,sr,pr,fr,mr,Cr,nr,hr,dr))},"addDiagrams"),wr=(0,et.K)(async()=>{tt.R.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(J.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,J.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,J.Js)(i,t,e)}catch(e){throw tt.R.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete J.mW[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){tt.R.error(`Failed to load ${t.length} external diagrams`);for(const e of t)tt.R.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function Sr(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function Tr(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,et.K)(Sr,"setA11yDiagramInfo"),(0,et.K)(Tr,"addSVGa11yTitleDescription");var vr=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{(0,et.K)(this,"Diagram")}static async fromText(e,r={}){const i=(0,J.zj)(),o=(0,J.Ch)(e,i);e=(0,Q.C4)(e)+"\n";try{(0,J.Gs)(o)}catch{const t=(0,J.J$)(o);if(!t)throw new J.C0(`Diagram ${o} not found.`);const{id:e,diagram:r}=await t();(0,J.Js)(e,r)}const{db:n,parser:a,renderer:s,init:l}=(0,J.Gs)(o);return a.parser&&(a.parser.yy=n),n.clear?.(),l?.(i),r.title&&n.setDiagramTitle?.(r.title),await a.parse(e),new t(o,e,n,a,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},Br=[],_r=(0,et.K)(()=>{Br.forEach(t=>{t()}),Br=[]},"attachFunctions"),Ar=(0,et.K)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Lr(t){const e=t.match(J.EJ);if(!e)return{text:t,metadata:{}};const r=e[1],i=r?e[2].split("\n").map(t=>t.startsWith(r)?t.slice(r.length):t).join("\n"):e[2];let o=(0,G.H)(i,{schema:G.r})??{};o="object"!=typeof o||Array.isArray(o)?{}:o;const n={};return o.displayMode&&(n.displayMode=o.displayMode.toString()),o.title&&(n.title=o.title.toString()),o.config&&(n.config=o.config),{text:t.slice(e[0].length),metadata:n}}(0,et.K)(Lr,"extractFrontMatter");var Fr=(0,et.K)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Mr=(0,et.K)(t=>{const{text:e,metadata:r}=Lr(t),{displayMode:i,title:o,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:o,config:n,text:e}},"processFrontmatter"),Er=(0,et.K)(t=>{const e=Q._K.detectInit(t)??{},r=Q._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,Q.vU)(t),directive:e}},"processDirectives");function $r(t){const e=Fr(t),r=Mr(e),i=Er(r.text),o=(0,Q.$t)(r.config,i.directive);return{code:t=Ar(i.text),title:r.title,config:o}}function Or(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,et.K)($r,"preprocessDiagram"),(0,et.K)(Or,"toBase64");var Ir=["foreignobject"],Dr=["dominant-baseline"];function qr(t){const e=$r(t);return(0,J.cL)(),(0,J.xA)(e.config??{}),e}async function Rr(t,e){kr();try{const{code:e,config:r}=qr(t);return{diagramType:(await Vr(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,et.K)(qr,"processAndSetConfigs"),(0,et.K)(Rr,"parse");var zr=(0,et.K)((t,e,r=[])=>`.${t} ${e} ${(0,J.Df)(`{ ${r.join(" !important; ")} !important; }`)}`,"cssImportantStyles"),Nr=(0,et.K)((t,e=new Map)=>{const r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const i=(0,J.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{Zt(t.styles)||i.forEach(e=>{r.insertRule(zr(t.id,e,t.styles),r.cssRules.length)}),Zt(t.textStyles)||r.insertRule(zr(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let i="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){const e=new CSSStyleSheet;e.replaceSync(t.themeCSS),i=(0,J.KG)(e)+"\n"}else i+=`${t.themeCSS}\n`;return i+(0,J.KG)(r)},"createCssStyles"),Kr=(0,et.K)((t,e)=>{return xt(Kt(`${t}{${e}}`),(i=yt(r=[(0,et.K)(function(e,r,i,o){if("rule"===e.type&&Array.isArray(e.props)){if(e.parent&&e.parent.type===st)return;e.props=e.props.map(e=>e.startsWith(t)?e:`${t} ${e}`)}else e.type.startsWith("@")&&(["@media","@supports",lt,"@scope","@container","@starting-style",st].includes(e.type)||(tt.R.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=ot))},"addNamespace"),Ct]),function(t,e,o,n){for(var a="",s=0;s<i;s++)a+=r[s](t,e,o,n)||"";return a}));var r,i},"compileCSS"),Pr=(0,et.K)((t,e,r,i)=>{const o=Nr(t,r),n=(0,J.tM)(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return Kr(i,n)},"createUserStyles"),Wr=(0,et.K)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,Q.Sm)(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),jr=(0,et.K)((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${Or(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),Hr=(0,et.K)((t,e,r,i,o)=>{const n=t.append("div");n.attr("id",r),i&&n.attr("style",i);const a=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&a.attr("xmlns:xlink",o),a.append("g"),t},"appendDivSvgG");function Yr(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,et.K)(Yr,"sandboxedIframe");var Ur=(0,et.K)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),Xr=(0,et.K)(async function(t,e,r){kr();const i=qr(e);e=i.code;const o=(0,J.zj)();tt.R.debug(o),e.length>(o?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const n=`#${t}`,a="i"+t,s="#"+a,l="d"+t,h="#"+l,c=(0,et.K)(()=>{const t=u?s:h,e=(0,it.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let d=(0,it.Ltv)(document.body);const u="sandbox"===o.securityLevel,p="loose"===o.securityLevel,g=o.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),u){const t=Yr((0,it.Ltv)(r),a);d=(0,it.Ltv)(t.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=(0,it.Ltv)(r);Hr(d,t,l,`font-family: ${g}`,"http://www.w3.org/1999/xlink")}else{if(Ur(document,t,l,a),u){const t=Yr((0,it.Ltv)(document.body),a);d=(0,it.Ltv)(t.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=(0,it.Ltv)("body");Hr(d,t,l)}let f,y;try{f=await vr.fromText(e,{title:i.title})}catch(t){if(o.suppressErrorRendering)throw c(),t;f=await vr.fromText("error"),y=t}const m=d.select(h).node(),x=f.type,C=m.firstChild,b=C.firstChild,k=f.renderer.getClasses?.(e,f),w=Pr(o,x,k,n),S=document.createElement("style");S.innerHTML=w,C.insertBefore(S,b);try{await f.renderer.draw(e,t,"11.16.0",f)}catch(r){throw o.suppressErrorRendering?c():Ee.draw(e,t,"11.16.0"),r}const T=d.select(`${h} svg`),v=f.db.getAccTitle?.(),B=f.db.getAccDescription?.();Zr(x,T,v,B),d.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let _=d.select(h).node().innerHTML;if(tt.R.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),_=Wr(_,u,(0,J._3)(o.arrowMarkerAbsolute)),u){const t=d.select(h+" svg").node();_=jr(_,t)}else p||(_=Yt.A.sanitize(_,{ADD_TAGS:Ir,ADD_ATTR:Dr,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(_r(),y)throw y;return c(),{diagramType:x,svg:_,bindFunctions:f.db.bindFunctions}},"render");function Gr(t={}){const e=(0,J.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,J.wZ)(e),e?.theme&&e.theme in J.H$?e.themeVariables=J.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=J.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,J.UU)(e):(0,J.Q2)();(0,tt.H)(r.logLevel),kr()}(0,et.K)(Gr,"initialize");var Vr=(0,et.K)((t,e={})=>{const{code:r}=$r(t);return vr.fromText(r,e)},"getDiagramFromText");function Zr(t,e,r,i){Sr(e,t),Tr(e,r,i,e.attr("id"))}(0,et.K)(Zr,"addA11yInfo");var Qr=Object.freeze({render:Xr,parse:Rr,getDiagramFromText:Vr,initialize:Gr,getConfig:J.zj,setConfig:J.Nk,getSiteConfig:J.Q2,updateSiteConfig:J.B6,reset:(0,et.K)(()=>{(0,J.cL)()},"reset"),globalReset:(0,et.K)(()=>{(0,J.cL)(J.sb)},"globalReset"),defaultConfig:J.sb});(0,tt.H)((0,J.zj)().logLevel),(0,J.cL)((0,J.zj)());var Jr=(0,et.K)((t,e,r)=>{tt.R.warn(t),(0,Q.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),ti=(0,et.K)(async function(t={querySelector:".mermaid"}){try{await ei(t)}catch(e){if((0,Q.dq)(e)&&tt.R.error(e.str),pi.parseError&&pi.parseError(e),!t.suppressErrors)throw tt.R.error("Use the suppressErrors option to suppress these errors"),e}},"run"),ei=(0,et.K)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Qr.getConfig();let o;if(tt.R.debug((t?"":"No ")+"Callback function found"),r)o=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}tt.R.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(tt.R.debug("Start On Load: "+i?.startOnLoad),Qr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const n=new Q._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const s=[];for(const e of Array.from(o)){if(tt.R.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${n.next()}`;a=e.innerHTML,a=(0,rt.T)(Q._K.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const i=Q._K.detectInit(a);i&&tt.R.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:o}=await di(r,a,e);e.innerHTML=i,t&&await t(r),o&&o(e)}catch(t){Jr(t,s,pi.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),ri=(0,et.K)(function(t){Qr.initialize(t)},"initialize"),ii=(0,et.K)(async function(t,e,r){tt.R.warn("mermaid.init is deprecated. Please use run instead."),t&&ri(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await ti(i)},"init"),oi=(0,et.K)(async(t,{lazyLoad:e=!0}={})=>{kr(),(0,J.Xd)(...t),!1===e&&await wr()},"registerExternalDiagrams"),ni=(0,et.K)(function(){if(pi.startOnLoad){const{startOnLoad:t}=Qr.getConfig();t&&pi.run().catch(t=>tt.R.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",ni,!1);var ai=(0,et.K)(function(t){pi.parseError=t},"setParseErrorHandler"),si=[],li=!1,hi=(0,et.K)(async()=>{if(!li){for(li=!0;si.length>0;){const t=si.shift();if(t)try{await t()}catch(t){tt.R.error("Error executing queue",t)}}li=!1}},"executeQueue"),ci=(0,et.K)(async(t,e)=>new Promise((r,i)=>{const o=(0,et.K)(()=>new Promise((o,n)=>{Qr.parse(t,e).then(t=>{o(t),r(t)},t=>{tt.R.error("Error parsing",t),pi.parseError?.(t),n(t),i(t)})}),"performCall");si.push(o),hi().catch(i)}),"parse"),di=(0,et.K)((t,e,r)=>new Promise((i,o)=>{const n=(0,et.K)(()=>new Promise((n,a)=>{Qr.render(t,e,r).then(t=>{n(t),i(t)},t=>{tt.R.error("Error parsing",t),pi.parseError?.(t),a(t),o(t)})}),"performCall");si.push(n),hi().catch(o)}),"render"),ui=(0,et.K)(()=>Object.keys(J.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),pi={startOnLoad:!0,mermaidAPI:Qr,parse:ci,render:di,init:ii,run:ti,registerExternalDiagrams:oi,registerLayoutLoaders:V.sO,initialize:ri,parseError:void 0,contentLoaded:ni,setParseErrorHandler:ai,detectType:J.Ch,registerIconPacks:Z.pC,getRegisteredDiagramsMetadata:ui},gi=pi;const fi={rect:"rectangle",circle:"ellipse"},yi={startOnLoad:!1,flowchart:{curve:"linear"},themeVariables:{fontSize:"20px"},maxEdges:500,maxTextSize:5e4},mi=t=>t.replace(/\s*!important\s*$/i,"").trim(),xi=(t,e)=>{let r=e;for(;r<t.length&&/\s/.test(t[r]);)r+=1;const i=r;for(;r<t.length&&/[a-z-]/i.test(t[r]);)r+=1;if(r===i)return!1;for(;r<t.length&&/\s/.test(t[r]);)r+=1;return":"===t[r]},Ci=t=>{const e=[];let r=0;for(;r<t.length;){for(;r<t.length&&/[\s;,]/.test(t[r]);)r+=1;if(r>=t.length)break;const i=r;for(;r<t.length&&":"!==t[r]&&";"!==t[r]&&","!==t[r];)r+=1;if(r>=t.length||":"!==t[r])break;const o=t.substring(i,r).trim().toLowerCase();r+=1;const n=r;let a=0,s=null;for(;r<t.length;){const e=t[r];if(s)e===s&&"\\"!==t[r-1]&&(s=null),r+=1;else if('"'!==e&&"'"!==e)if("("!==e)if(")"!==e){if(0===a){if(";"===e||","===e)break;if(/\s/.test(e)&&xi(t,r))break}r+=1}else a=Math.max(0,a-1),r+=1;else a+=1,r+=1;else s=e,r+=1}const l=mi(t.substring(n,r));o&&l&&e.push({property:o,value:l}),r<t.length&&(";"===t[r]||","===t[r])&&(r+=1)}return e},bi=t=>{const e=mi(t);if(!e)return!1;if("undefined"!=typeof CSS&&"function"==typeof CSS.supports)return CSS.supports("color",e);if("undefined"!=typeof document){const t=document.createElement("div");return t.style.color="",t.style.color=e,""!==t.style.color}return!1},ki=(t,e)=>{const r=t.getAttribute("style");return r&&Ci(r).find(t=>t.property===e)?.value||""},wi=(...t)=>{for(const e of t){const t=mi(e||"");if(bi(t))return t}},Si=(t,e)=>{const r=t.querySelector("text, foreignObject, div, span, p")||t,i=wi(r.getAttribute?.("fill"),ki(r,"fill"),r.style?.fill);if(i)return i;const o=wi(r.getAttribute?.("color"),ki(r,"color"),r.style?.color);if(o)return o;const n=wi(e);return n||void 0},Ti=(t,e,r)=>{switch(e){case a.FILL:case a.STROKE:bi(r)&&(t[e]=r);break;case a.STROKE_WIDTH:case a.STROKE_DASHARRAY:t[e]=r}},vi=(t,e,r)=>{e===n.COLOR&&bi(r)&&(t[n.COLOR]=r)},Bi=(t,e,r)=>{t&&Ci(t).forEach(({property:t,value:i})=>{Ti(e,t,i),vi(r,t,i)})},_i=(t,e)=>{t&&Ci(t).forEach(({property:t,value:r})=>{"fill"===t&&bi(r)?e[n.COLOR]=r:vi(e,t,r)})},Ai=(t,e)=>{if(!t)return;[[a.FILL,t.getAttribute("fill")],[a.STROKE,t.getAttribute("stroke")],[a.STROKE_WIDTH,t.getAttribute("stroke-width")],[a.STROKE_DASHARRAY,t.getAttribute("stroke-dasharray")]].forEach(([t,r])=>{const i=mi(r||"");i&&Ti(e,t,i)})},Li=(t,e)=>{if(!t)return;const r=t.getAttribute("fill")||t.getAttribute("color"),i=mi(r||"");bi(i)&&(e[n.COLOR]=i)},Fi=(t,e,r,i)=>{if(!(e instanceof Map))return;const o=e.get(t);o&&(o.styles?.forEach(t=>{Ci(t).forEach(({property:t,value:e})=>{Ti(r,t,e),vi(i,t,e)})}),o.textStyles?.forEach(t=>{Ci(t).forEach(({property:t,value:e})=>{vi(i,t,e)})}))},Mi=(t,e,r)=>{const i=e.querySelector(`[id*="${t.domId}"]`);if(!i)return;let o;"a"===i.parentElement?.tagName.toLowerCase()&&(o=i.parentElement.getAttribute("xlink:href"));const n=Ei(o?i.parentElement:i,e),a=i.getBBox(),s={width:a.width,height:a.height},l={},h={};t.classes&&r instanceof Map&&(Array.isArray(t.classes)?t.classes:[t.classes]).forEach(t=>{Fi(t,r,l,h)}),t.styles?.forEach(t=>{Bi(t,l,h)});const c=i.querySelector(".label-container");Bi(c?.getAttribute("style"),l,h),Ai(c,l);return Array.from(i.querySelectorAll(".label, .nodeLabel, .label text, .label tspan, .label span, .label div")).forEach(t=>{_i(t.getAttribute("style"),h),Li(t,h)}),{id:t.id,labelType:t.labelType,text:N(t.text||""),type:t.type,link:o||void 0,...n,...s,containerStyle:l,labelStyle:h}},Ei=(t,e)=>{if(!t)throw new Error("Element not found");let r=t.parentElement?.parentElement;const i=t.childNodes[0];let o={x:0,y:0};if(i){const{transformX:t,transformY:e}=K(i),r=i.getBBox();o={x:Number(i.getAttribute("x"))||t+r.x||0,y:Number(i.getAttribute("y"))||e+r.y||0}}const{transformX:n,transformY:a}=K(t),s={x:n+o.x,y:a+o.y};for(;r&&r.id!==e.id;){if("root"===r.classList.value&&r.hasAttribute("transform")){const{transformX:t,transformY:e}=K(r);s.x+=t,s.y+=e}r=r.parentElement}return s},$i=(t,e)=>{const r=t.getVertices(),i=t.getEdges(),o=t.getSubGraphs(),n=t.getClasses(),a={},s=n instanceof Map?n:{};r instanceof Map?r.forEach((t,r)=>{a[r]=Mi(t,e,s)}):"object"==typeof r&&null!==r&&Object.entries(r).forEach(([t,r])=>{a[t]=Mi(r,e,s)});const l=new Map,h=(Array.isArray(i)?i:[]).map(t=>{if(!e.querySelector(`[id*="${t.id}"]`))return null;const r=`${t.start}-${t.end}`,i=l.get(r)||0;return l.set(r,i+1),((t,e,r)=>{const i=r.querySelector(`[id*="${t.id}"]`);if(!i)throw new Error("Edge element not found");const o=Ei(i,r),n=Y(i,o);return t.length=void 0,{...t,...n,text:N(t.text)}})(t,0,e)}).filter(t=>null!==t&&t.reflectionPoints.length>1),c=(Array.isArray(o)?o:[]).map(t=>((t,e,r)=>{const i=t.nodes.map(t=>t.startsWith("flowchart-")?t.split("-")[1]:t),o=e.querySelector(`[id='${t.id}']`);if(!o)throw new Error("SubGraph element not found");const n=Ei(o,e),a=o.getBBox(),s={width:a.width,height:a.height},l={},h={},c=o.querySelector(":scope > rect, :scope > path, :scope > polygon, :scope > ellipse")||o.querySelector(".cluster > rect, .cluster > path, .cluster > polygon, .cluster > ellipse")||o.querySelector("rect, path, polygon, ellipse");Bi(o.getAttribute("style"),l,h),Bi(c?.getAttribute("style"),l,h),Ai(c,l);const d=o.querySelector(".cluster-label text, .cluster-label tspan")||o.querySelector("text");return _i(d?.getAttribute("style"),h),Li(d,h),Fi(t.id,r,l,h),t.classes?.forEach(t=>{Fi(t,r,l,h)}),{id:t.id,nodeIds:i,text:N(t.title),labelType:"text",...n,...s,containerStyle:l,labelStyle:h}})(t,e,s));return{type:"flowchart",subGraphs:c,vertices:a,edges:h}},Oi=(t,e,r,i,o)=>{const n={type:"arrow"};return n.startX=t,n.startY=e,n.endX=r,n.endY=i,Object.assign(n,{...o}),n},Ii=(t,e,r,i)=>({type:"text",x:t,y:e,text:r,width:i?.width||20,height:i?.height||20,fontSize:i?.fontSize||20,id:i?.id,color:i?.color,groupId:i?.groupId,metadata:i?.metadata}),Di=(t,e,r)=>{const i={},o=Number(t.getAttribute("x")),n=Number(t.getAttribute("y"));i.type="text",i.text=N(e),r?.id&&(i.id=r.id),r?.groupId&&(i.groupId=r.groupId);const a=t.getBBox();i.width=a.width,i.height=a.height,i.x=o-a.width/2,i.y=n;const s=parseInt(getComputedStyle(t).fontSize);return i.fontSize=s,i.color=Si(t),i},qi=(t,e,r={})=>{const i={};i.type=e;const{label:o,subtype:n,id:a,groupId:s}=r;i.id=a,s&&(i.groupId=s),o&&(i.label={text:N(o.text),fontSize:16,textAlign:o?.textAlign,verticalAlign:o?.verticalAlign});const l=t.getBBox();switch(i.x=l.x,i.y=l.y,i.width=l.width,i.height=l.height,i.subtype=n,n){case"highlight":const e=t.getAttribute("fill");e&&(i.bgColor=mi(e));break;case"note":i.strokeStyle="dashed"}return i},Ri=(t,e,r,i,o,n)=>{const a={};a.startX=e,a.startY=r,a.endX=i,n?.groupId&&(a.groupId=n.groupId),n?.id&&(a.id=n.id),a.endY=o;const s=t.getAttribute("stroke");return a.strokeColor=s?mi(s):null,a.strokeWidth=Number(t.getAttribute("stroke-width")),a.type="line",a},zi={0:"SOLID",1:"DOTTED",3:"SOLID_CROSS",4:"DOTTED_CROSS",5:"SOLID_OPEN",6:"DOTTED_OPEN",24:"SOLID_POINT",25:"DOTTED_POINT"},Ni=0,Ki=1,Pi=2,Wi=3,ji=4,Hi=5,Yi=6,Ui=24,Xi=25,Gi=27,Vi=t=>{let e;switch(t){case Ni:case Wi:case Hi:case Ui:e="solid";break;case Ki:case ji:case Yi:case Xi:e="dotted";break;default:e="solid"}return e},Zi=(t,e,r)=>{if(!t)throw"root node not found";const i=f(),o=Array.from(t.children),n=[];return o.forEach((t,o)=>{const a=`${r?.id}-${o}`;let s;switch(t.tagName){case"line":const r=Number(t.getAttribute("x1")),o=Number(t.getAttribute("y1")),n=Number(t.getAttribute("x2")),l=Number(t.getAttribute("y2"));s=Ri(t,r,o,n,l,{groupId:i,id:a});break;case"text":s=Di(t,e,{groupId:i,id:a});break;case"circle":s=qi(t,"ellipse",{label:t.textContent?{text:t.textContent}:void 0,groupId:i,id:a});default:s=qi(t,fi[t.tagName],{label:t.textContent?{text:t.textContent}:void 0,groupId:i,id:a})}n.push(s)}),n},Qi=(t,e)=>{const r=e.getAttribute("fill"),i=e.getAttribute("stroke"),o=e.getAttribute("stroke-width"),n=e.getAttribute("stroke-dasharray");r&&"none"!==r&&(t.bgColor=mi(r)),i&&"none"!==i&&(t.strokeColor=mi(i)),o&&(t.strokeWidth=Number(o)),n&&n.trim()&&(t.strokeStyle="dashed")},Ji=(t,e,r)=>{const i=[],o=Array.from(e.querySelectorAll('[class*="messageLine"]')),n=Object.keys(zi),a=t.filter(t=>n.includes(t.type.toString()));return o.forEach((t,e)=>{const o=a[e],n=zi[o.type],s=((t,e)=>{const r={};e?.label&&(r.label={text:N(e.label),fontSize:16});const i=t.tagName;if("line"===i)r.startX=Number(t.getAttribute("x1")),r.startY=Number(t.getAttribute("y1")),r.endX=Number(t.getAttribute("x2")),r.endY=Number(t.getAttribute("y2"));else if("path"===i){const e=t.getAttribute("d");if(!e)throw new Error('Path element does not contain a "d" attribute');const i=e.split(/(?=[LC])/),o=i[0].substring(1).split(",").map(t=>parseFloat(t)),n=[];i.forEach(t=>{const e=t.substring(1).trim().split(" ").map(t=>{const[e,r]=t.split(",");return[parseFloat(e)-o[0],parseFloat(r)-o[1]]});n.push(...e)});const a=n[n.length-1];r.startX=o[0],r.startY=o[1],r.endX=a[0],r.endY=a[1],r.points=n}if(e?.label){const t=10;r.startY=r.startY-t,r.endY=r.endY-t}const o=t.getAttribute("stroke"),n=(o&&"none"!==o?o:"")||getComputedStyle(t).stroke||"";return r.strokeColor=n?mi(n):null,r.strokeWidth=Number(t.getAttribute("stroke-width")),r.type="arrow",r.strokeStyle=e?.strokeStyle||"solid",r.startArrowhead=e?.startArrowhead||null,r.endArrowhead=e?.endArrowhead||null,r})(t,{label:o?.message,strokeStyle:Vi(o.type),endArrowhead:"SOLID_OPEN"===n||"DOTTED_OPEN"===n?null:"arrow"}),l=r[o.from],h=r[o.to];l?.topId&&h?.topId&&(s.start={type:l.bindType||"rectangle",id:l.topId},s.end={type:h.bindType||"rectangle",id:h.topId}),((t,e)=>{if(t.nextElementSibling?.classList.contains("sequenceNumber")){const r=t.nextElementSibling?.textContent;if(!r)throw new Error("sequence number not present");const i=30,o=i/2,n=10,a={type:"rectangle",x:e.startX-n,y:e.startY-o,label:{text:r,fontSize:14},bgColor:"#e9ecef",height:i,subtype:"sequence"};Object.assign(e,{sequenceNumber:a})}})(t,s),i.push(s)}),i},to=(t,e)=>{const r=t.db,i=[],o=r.getBoxes().map(t=>({...t,fill:mi(t.fill||"")})),n=(t=>{const e=Array.from(t.querySelectorAll(".rect")).filter(t=>"g"!==t.parentElement?.tagName),r=[];return e.forEach(t=>{const e=qi(t,"rectangle",{label:{text:""},subtype:"highlight"});r.push(e)}),r})(e),a=r.getActors(),{nodes:s,lines:l,actorMap:h}=((t,e)=>{const r=Array.from(e.querySelectorAll(".actor-top")),i=Array.from(e.querySelectorAll(".actor-bottom")),o=[],n=[],a={},s=t instanceof Map?Array.from(t.values()):Object.values(t),l=Array.from(e.querySelectorAll(".actor-line")),h=(t,e)=>{const r=t.name,i=l.find(t=>t.getAttribute("name")===r);if(i)return i;const o="participant"===t.type?e.parentElement?.previousElementSibling:e.previousElementSibling;return o?"line"===o.tagName?o:o.querySelector("line"):null};return s.forEach(t=>{const e=r.find(e=>e.getAttribute("name")===t.name),s=i.find(e=>e.getAttribute("name")===t.name);if(!e||!s)throw"root not found";const l=t.description;if("participant"===t.type){const r=qi(e,"rectangle",{id:`${t.name}-top`,label:{text:l},subtype:"actor"});if(Qi(r,e),!r)throw"Top Node element not found!";o.push([r]);const i=qi(s,"rectangle",{id:`${t.name}-bottom`,label:{text:l},subtype:"actor"});a[t.name]={topId:`${t.name}-top`,bottomId:`${t.name}-bottom`,bindType:"rectangle"},Qi(i,s),o.push([i]);const c=h(t,e);if("line"!==c?.tagName)throw"Line not found";const d=Number(c.getAttribute("x1"));if(!r.height)throw"Top node element height is null";const u=r.y+r.height,p=i.y,g=Number(c.getAttribute("x2")),f=Ri(c,d,u,g,p);n.push(f)}else if("actor"===t.type){const r=Zi(e,l,{id:`${t.name}-top`});o.push(r);const i=Zi(s,l,{id:`${t.name}-bottom`});o.push(i);const c=h(t,e);if("line"!==c?.tagName)throw"Line not found";const d=Number(c.getAttribute("x1")),u=Number(c.getAttribute("y1")),p=Number(c.getAttribute("x2")),g=i.find(t=>"ellipse"===t.type);if(g){const t=g.y,e=Ri(c,d,u,p,t);n.push(e)}const f=r.find(t=>"ellipse"===t.type),y=i.find(t=>"ellipse"===t.type);f?.id&&y?.id&&(a[t.name]={topId:f.id,bottomId:y.id,bindType:"ellipse"})}}),{nodes:o,lines:n,actorMap:a}})(a,e),c=r.getMessages(),d=Ji(c,e,h),u=((t,e)=>{const r=Array.from(e.querySelectorAll(".note")).map(t=>t.parentElement),i=t.filter(t=>t.type===Pi),o=[];return r.forEach((t,e)=>{if(!t)return;const r=t.firstChild,n=i[e].message,a=qi(r,"rectangle",{label:{text:n},subtype:"note"}),s=r.getAttribute("fill"),l=r.getAttribute("stroke"),h=r.getAttribute("stroke-width"),c=r.getAttribute("stroke-dasharray");s&&"none"!==s&&(a.bgColor=mi(s)),l&&"none"!==l&&(a.strokeColor=mi(l)),h&&(a.strokeWidth=Number(h)),c&&c.trim()&&(a.strokeStyle="dashed"),o.push(a)}),o})(c,e),p=(t=>{const e=Array.from(t.querySelectorAll("[class*=activation]")),r=[];return e.forEach(t=>{const e=qi(t,"rectangle",{label:{text:""},subtype:"activation"});(()=>{const r=t.getAttribute("fill"),i=t.getAttribute("stroke"),o=t.getAttribute("stroke-width"),n=t.getAttribute("stroke-dasharray");r&&"none"!==r&&(e.bgColor=mi(r)),i&&"none"!==i&&(e.strokeColor=mi(i)),o&&(e.strokeWidth=Number(o)),n&&n.trim()&&(e.strokeStyle="dashed")})(),r.push(e)}),r})(e),g=((t,e)=>{const r=Array.from(e.querySelectorAll(".loopLine")),i=[],o=[],n=[];r.forEach(t=>{const e=Number(t.getAttribute("x1")),r=Number(t.getAttribute("y1")),o=Number(t.getAttribute("x2")),n=Number(t.getAttribute("y2")),a=Ri(t,e,r,o,n);a.strokeStyle="dotted",a.strokeColor="#adb5bd",a.strokeWidth=2,i.push(a)});const a=Array.from(e.querySelectorAll(".loopText")),s=t.filter(t=>t.type===Gi).map(t=>t.message);a.forEach(t=>{const e=t.textContent||"",r=Di(t,e),i=e.match(/\[(.*?)\]/)?.[1]||"";s.includes(i)&&(r.x+=16),o.push(r)});const l=Array.from(e?.querySelectorAll(".labelBox")),h=Array.from(e?.querySelectorAll(".labelText"));return l.forEach((t,e)=>{const r=h[e]?.textContent||"",i=qi(t,"rectangle",{label:{text:r}});i.strokeColor="#adb5bd",i.bgColor="#e9ecef",i.width=void 0,n.push(i)}),{lines:i,texts:o,nodes:n}})(c,e);return i.push(n),i.push(...s),i.push(u),i.push(p),{type:"sequence",lines:l,arrows:d,nodes:i,loops:g,groups:o}},eo=0,ro=1,io=2,oo=0,no=1,ao=t=>{let e;switch(t){case eo:e="diamond_outline";break;case io:e="diamond";break;case ro:e="triangle_outline";break;case"none":e=null;break;default:e="arrow"}return e},so=(t,e)=>{let r=0,i=0,o=t;for(;o&&o!==e;){const{transformX:t,transformY:e}=K(o);r+=t,i+=e,o=o.parentElement}return{tx:r,ty:i}},lo=new Set(["triangle_outline","diamond","diamond_outline"]),ho=(t,e=.5)=>{if(t.length<=2)return[...t];const r=[t[0]];for(let i=1;i<t.length-1;i++){const o=r[r.length-1],n=t[i],a=t[i+1],s=a.x-o.x,l=a.y-o.y,h=Math.hypot(s,l);if(!h)continue;const c=Math.abs(s*(n.y-o.y)-l*(n.x-o.x))/h,d=((n.x-o.x)*s+(n.y-o.y)*l)/(h*h);c<=e&&d>=-e&&d<=1+e||r.push(n)}return r.push(t[t.length-1]),r},co=t=>{const e=W(H(t).map(t=>[t.x,t.y])).map(([t,e])=>({x:t,y:e})),r=j(t);return r&&e.length>=2&&(e[0]={x:r.startX,y:r.startY},e[e.length-1]={x:r.endX,y:r.endY}),ho(e)},uo=(t,e,r)=>{const i=t.x-e.x,o=t.y-e.y,n=Math.hypot(i,o);return n?{x:t.x+i/n*r,y:t.y+o/n*r}:t},po=t=>{const e=t.points?.map(([e,r])=>({x:t.startX+e,y:t.startY+r})).filter(t=>Number.isFinite(t.x)&&Number.isFinite(t.y));if(!e||e.length<2)return t;const r=[...e],i=!!t.startArrowhead&&lo.has(t.startArrowhead),o=!!t.endArrowhead&&lo.has(t.endArrowhead);if(!i&&!o)return t;if(i&&(r[0]=uo(r[0],r[1],16)),o){const t=r.length-1;r[t]=uo(r[t],r[t-1],16)}return((t,e)=>{const r=W(e.map(t=>[t.x,t.y])).map(([t,e])=>({x:t,y:e}));if(r.length<2)throw new Error("Arrow route must contain at least two points");const i=r[0],o=r[r.length-1];t.startX=i.x,t.startY=i.y,t.endX=o.x,t.endY=o.y,t.points=r.map(t=>[t.x-i.x,t.y-i.y])})(t,r),t},go=(t,e,r)=>{if(t.length<2)throw new Error(`Class diagram edge ${e?.id||"<unknown>"} is missing usable path points`);const i=t[0],o=t[t.length-1],n=Oi(i.x,i.y,o.x,o.y,{id:e?.getAttribute("data-id")||e?.id||void 0,...r,points:t.map(t=>[t.x-i.x,t.y-i.y])});return e&&((t,e)=>{const r=mi(t.getAttribute("stroke")||getComputedStyle(t).stroke||""),i=parseFloat(t.getAttribute("stroke-width")||getComputedStyle(t).strokeWidth||"1");bi(r)&&"none"!==r&&(e.strokeColor=r),Number.isFinite(i)&&i>0&&(e.strokeWidth=i)})(e,n),po(n)},fo=(t,e)=>go((t=>{const e=[];return t.forEach(t=>{co(t).forEach(t=>{const r=e[e.length-1];r&&r.x===t.x&&r.y===t.y||e.push(t)})}),ho(e)})(t),t[0],e),yo=(t,e)=>{const r=(t=>t.points?.map(([e,r])=>({x:t.startX+e,y:t.startY+r})).filter(t=>Number.isFinite(t.x)&&Number.isFinite(t.y))||[])(t);if(r.length<2)return null;const i="start"===e,o=i?r[0]:r[r.length-1],n=i?r[1]:r[r.length-2],a=n.x===o.x?i?-1:1:Math.sign(n.x-o.x),s=n.y===o.y?1:Math.sign(n.y-o.y);return{x:o.x+20*a,y:o.y+(s>=0?12:-28)}},mo=(t,e)=>{let r=t;for(;r&&r!==e;){if(r.classList.contains("annotation-group"))return"header";if(r.classList.contains("label-group"))return"header";if(r.classList.contains("members-group"))return"members";if(r.classList.contains("methods-group"))return"methods";r=r.parentElement}return"other"},xo=(t,e,r)=>{const i=[],o=[],n=[];return Object.values(t).forEach(t=>{const{domId:a,id:s}=t,l=f(),h=(t=>{const e={};return t?(t.forEach(t=>{Ci(t).forEach(({property:t,value:r})=>{t&&r&&(e[t]=mi(r))})}),e):e})(t.styles||t.cssStyles);let c;try{c=r?r(s):void 0}catch{c=void 0}const d=c&&e.querySelector(`#${c}`)||e.querySelector(`#${a}`)||e.querySelector(`[data-id='${s}']`)||(t=>{const r=new RegExp(`^classId-${t}(?:-|$)`);return Array.from(e.querySelectorAll("[id]")).filter(t=>r.test(t.id))[0]})(s);if(!d)throw Error(`DOM Node with id ${a} not found`);const u=d.querySelector("rect")||d,p=u.getBBox(),{tx:g,ty:y}=so(u,e),m={type:"rectangle",id:s,groupId:l,x:p.x+g,y:p.y+y,width:p.width,height:p.height,metadata:{classId:s}},x=u.getAttribute("fill"),C=u.getAttribute("stroke"),b=u.getAttribute("stroke-width"),k=u.getAttribute("stroke-dasharray"),w=getComputedStyle(u),S=mi(x||h.fill||(x?w.fill:"")),T=mi(C||h.stroke||(C?w.stroke:"")),v=b||h["stroke-width"]||(b?w.strokeWidth:""),B=k||h["stroke-dasharray"]||(k?"none"===w.strokeDasharray?"":w.strokeDasharray:""),_=t=>{if(!t)return!1;if(!bi(t))return!1;const e=t.toLowerCase();return!("none"===e||"transparent"===e||"rgba(0, 0, 0, 0)"===e||"black"===e||"#000"===e||"#000000"===e||"rgb(0, 0, 0)"===e||"rgba(0, 0, 0, 1)"===e)};_(S)?m.bgColor=S:m.bgColor=void 0,_(T)?m.strokeColor=T:m.strokeColor=void 0,m.strokeWidth=v?Number(v):void 0,B&&B.trim().length>0?m.strokeStyle="dashed":m.strokeStyle=void 0,i.push(m);[...Array.from(d.querySelectorAll("line")),...Array.from(d.querySelectorAll("g.divider path"))].forEach(t=>{const{tx:r,ty:i}=so(t,e);let n,a,h,c;if("line"===t.tagName.toLowerCase())n=Number(t.getAttribute("x1"))+r,a=Number(t.getAttribute("y1"))+i,h=Number(t.getAttribute("x2"))+r,c=Number(t.getAttribute("y2"))+i;else{const e=t.getBBox();n=e.x+r,h=e.x+e.width+r;const o=e.y+e.height/2+i;a=o,c=o}if(n===h&&a===c)return;const d=Ri(t,n,a,h,c,{groupId:l,id:f()});m.strokeColor?d.strokeColor=m.strokeColor:d.strokeColor=void 0,void 0!==m.strokeWidth?d.strokeWidth=m.strokeWidth:d.strokeWidth=void 0,m.strokeStyle?d.strokeStyle=m.strokeStyle:d.strokeStyle=void 0,d.metadata={classId:s},o.push(d)});const A=Array.from(d.querySelectorAll("text, foreignObject")),L=[];A.forEach(t=>{const r="foreignobject"===t.tagName.toLowerCase(),i=r?[]:Array.from(t.querySelectorAll("tspan")),o=i.length?i.map(t=>t.textContent?.trim()).filter(Boolean).join("\n"):t.textContent?.trim()||"";if(!o)return;const n=t.getBBox(),{ty:a}=so(t,e);let s=parseFloat(getComputedStyle(t).fontSize||"");if(r&&(!Number.isFinite(s)||!s)){const e=t.querySelector("div, span, p");e&&(s=parseFloat(getComputedStyle(e).fontSize||""))}(!Number.isFinite(s)||s<=0)&&(s=Math.max(12,.6*n.height)),s*=.9;const l=Si(t,h.color);L.push({section:mo(t,d),text:N(o),x:n.x,y:n.y+a,width:m&&m.width?Math.max(m.width-8,n.width):n.width,height:n.height,fontSize:s,color:l})});const F=L.filter(t=>"header"===t.section).sort((t,e)=>t.y-e.y||t.x-e.x);if(!m.label){const t=0===F.length&&1===L.length?L:F;t.length>0&&(m.label={text:t.map(t=>t.text).join("\n"),fontSize:Math.max(...t.map(t=>t.fontSize)),color:t.find(t=>t.color)?.color,verticalAlign:"top"})}L.filter(t=>F.length>0?"header"!==t.section:!(m.label&&1===L.length)).forEach(t=>{const e=Ii((m?.x||0)+4,t.y,t.text,{width:t.width,height:t.height,fontSize:t.fontSize,color:t.color,id:f(),groupId:l,metadata:{classId:s}});n.push(e)})}),{nodes:i,lines:o,text:n}},Co=(t,e,r,i)=>{const o=Array.from(r.querySelectorAll('.edgePaths path[data-edge="true"]:not([id^="edgeNote"]):not([id*="-cyclic-special-"])'));if(0===t.length)return{arrows:[],text:[]};const n=[],a=[];let s=0;return t.forEach(t=>{const{id1:l,id2:h,relation:c}=t,d=e.find(t=>t.id===l),u=e.find(t=>t.id===h);if(!d)throw new Error(`parseRelations: Cannot find node with id ${l}`);if(!u)throw new Error(`parseRelations: Cannot find node with id ${h}`);const p=(t=>{let e;switch(t){case oo:e="solid";break;case no:e="dotted";break;default:e="solid"}return e})(c.lineType),g=ao(c.type1),f=ao(c.type2);let y;if(l===h){const e=((t,e)=>[`${t}-cyclic-special-1`,`${t}-cyclic-special-mid`,`${t}-cyclic-special-2`].map(t=>e.querySelector(`path[id="${t}"][data-edge="true"]`)).filter(t=>null!==t))(l,r);if(!e.length)throw new Error(`parseRelations: Cannot find rendered SVG edge for relation ${l} -> ${h}`);y=fo(e,{strokeStyle:p,startArrowhead:g,endArrowhead:f,label:t.title?{text:t.title}:void 0,start:{type:"rectangle",id:d.id},end:{type:"rectangle",id:u.id}})}else{const e=o[s];if(!e)throw new Error(`parseRelations: Cannot find rendered SVG edge for relation ${l} -> ${h}`);s+=1,y=((t,e)=>{const r=co(t);return go([r[0],r[r.length-1]],t,e)})(e,{strokeStyle:p,startArrowhead:g,endArrowhead:f,label:t.title?{text:t.title}:void 0,start:{type:"rectangle",id:d.id},end:{type:"rectangle",id:u.id}})}n.push(y);const{relationTitle1:m,relationTitle2:x}=t,C=l===h,b=20,k=15,w=15;let S,T;if(m&&"none"!==m){if(C){const t=yo(y,"start");t&&(S=t.x,T=t.y)}else switch(i){case"TB":S=y.startX-b,y.endX<y.startX&&(S-=w),T=y.startY+k;break;case"BT":S=y.startX+b,y.endX>y.startX&&(S+=w),T=y.startY-k;break;case"LR":S=y.startX+b,T=y.startY+k,y.endY>y.startY&&(T+=w);break;case"RL":S=y.startX-b,T=y.startY-k,y.startY>y.endY&&(T-=w);break;default:S=y.startX-b,T=y.startY+k}S??=y.startX-b,T??=y.startY+k;const t=Ii(S,T,m,{fontSize:16});a.push(t)}if(x&&"none"!==x){if(C){const t=yo(y,"end");t&&(S=t.x,T=t.y)}else switch(i){case"TB":S=y.endX+b,y.endX<y.startX&&(S+=w),T=y.endY-k;break;case"BT":S=y.endX-b,y.endX>y.startX&&(S-=w),T=y.endY+k;break;case"LR":S=y.endX-b,T=y.endY-k,y.endY>y.startY&&(T-=w);break;case"RL":S=y.endX+b,T=y.endY+k,y.startY>y.endY&&(T+=w);break;default:S=y.endX+b,T=y.endY-k}S??=y.endX+b,T??=y.endY+k;const t=Ii(S,T,x,{fontSize:16});a.push(t)}}),{arrows:n,text:a}},bo=(t,e,r)=>{const i=[],o=[];return t.forEach((t,n)=>{const{id:a,text:s,class:l}=t,h=e.querySelector(`#${a}`);if(!h)throw new Error(`Node with id ${a} not found!`);const{transformX:c,transformY:d}=K(h),u=h.firstChild,p=qi(u,"rectangle",{id:a,subtype:"note",label:{text:s}});if(Object.assign(p,{x:p.x+c,y:p.y+d}),i.push(p),l){const t=r.find(t=>t.id===l);if(!t)throw new Error(`class node with id ${l} not found!`);const i=e.querySelector(`path[id="edgeNote${n+1}"][data-edge="true"]`);if(i)return void o.push(((t,e)=>fo([t],e))(i,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:p.id,type:"rectangle"},end:{id:t.id,type:"rectangle"}}));const a=p.x+(p.width||0)/2,s=p.y+(p.height||0),h=a,c=t.y,d=Oi(a,s,h,c,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:p.id,type:"rectangle"},end:{id:t.id,type:"rectangle"}});o.push(d)}}),{notes:i,connectors:o}},ko=(t,e)=>{let r=0,i=0,o=t;for(;o&&o!==e;){const{transformX:t,transformY:e}=K(o);r+=t,i+=e,o=o.parentElement}return{tx:r,ty:i}},wo=t=>{const e=t.querySelector("text, foreignObject, div, span, p")||t;let r=parseFloat(getComputedStyle(e).fontSize||"");return(!Number.isFinite(r)||r<=0)&&(r=Math.max(12,.75*t.getBBox().height)),r},So=(t,e,r)=>{const i=(t=>{const e=Array.from(t.querySelectorAll("tspan")),r=e.length?e.map(t=>t.textContent?.trim()).filter(Boolean).join("\n"):t.textContent?.trim()||"";return N(r)})(t);if(!i)return null;const o=t.getBBox(),{tx:n,ty:a}=ko(t,e);return{className:t.getAttribute("class")||"",text:i,x:o.x+n,y:o.y+a,width:o.width,height:o.height,fontSize:wo(t),color:Si(t,r)}},To=t=>{switch(t?.toLowerCase()){case"one":return"cardinality_one";case"many":return"cardinality_many";case"only_one":return"cardinality_exactly_one";case"one_or_more":return"cardinality_one_or_many";case"zero_or_one":return"cardinality_zero_or_one";case"zero_or_more":return"cardinality_zero_or_many";default:return null}},vo=t=>{switch(t){case"dotted":return"dotted";case"dashed":return"dashed";default:return"solid"}},Bo=(t,e)=>{const r=e.querySelector(`[id="${t.id}"]`);if(!r)throw new Error(`ER entity ${t.id} not found in rendered SVG`);const i=t.attributes.length?f():void 0,o=r.getBBox(),{tx:n,ty:a}=ko(r,e),s=(t=>{const e={};return t?(t.forEach(t=>{Ci(t).forEach(({property:t,value:r})=>{t&&r&&(e[t]=mi(r))})}),e):e})([...t.cssStyles||[],...t.cssCompiledStyles||[]]),l=mi(s.fill||""),h=mi(s.stroke||""),c=(t=>{if(null==t||""===t)return;const e="number"==typeof t?t:parseFloat(mi(t));return!Number.isFinite(e)||e<=0?void 0:e})(s["stroke-width"]),d=mi(s["stroke-dasharray"]||""),u=Array.from(r.querySelectorAll("g.label")).map(t=>So(t,e,s.color)).filter(t=>null!==t),p=u.find(t=>t.className.includes("name"))||u[0],g=u.filter(t=>t!==p),y=p?.text||N(t.alias||t.label||""),m={type:"rectangle",id:t.id,groupId:i,x:o.x+n,y:o.y+a,width:o.width,height:o.height,label:{text:y,fontSize:t.attributes.length?18:p?.fontSize||16,color:p?.color,textAlign:"center",verticalAlign:t.attributes.length?"top":"middle"},metadata:{entityId:t.id,entityLabel:t.label,entityAlias:t.alias}};bi(l)&&"none"!==l&&(m.bgColor=l),bi(h)&&"none"!==h&&(m.strokeColor=h),c&&Number.isFinite(c)&&c>0&&(m.strokeWidth=c),d&&"none"!==d&&(m.strokeStyle="dashed");const x=Array.from(r.querySelectorAll(".divider path, path.divider, line.divider")).map(r=>((t,e,r,i,o,n,a)=>{const{tx:s,ty:l}=ko(t,e);let h=0,c=0,d=0,u=0;if("line"===t.tagName.toLowerCase())h=Number(t.getAttribute("x1"))+s,c=Number(t.getAttribute("y1"))+l,d=Number(t.getAttribute("x2"))+s,u=Number(t.getAttribute("y2"))+l;else{const e=j(t);if(!e)return null;h=e.startX+s,c=e.startY+l,d=e.endX+s,u=e.endY+l}const p={type:"line",id:f(),groupId:r,startX:h,startY:c,endX:d,endY:u,metadata:{entityId:i}};return o&&bi(o)&&"none"!==o&&(p.strokeColor=o),void 0!==n&&(p.strokeWidth=n),a&&(p.strokeStyle=a),p})(r,e,i,t.id,m.strokeColor,m.strokeWidth,m.strokeStyle)).filter(t=>null!==t),C=g.map(e=>Ii(e.x,e.y,e.text,{id:f(),groupId:i,width:e.width,height:e.height,fontSize:18,color:e.color,metadata:{entityId:t.id}}));return{container:m,lines:x,text:C}},_o=(t,e)=>{const r=((t,e)=>{const r=e.querySelector(`path[id="${t.id}"][data-edge="true"]`);return r?[r]:t.start!==t.end?[]:[`${t.start}-cyclic-special-1`,`${t.start}-cyclic-special-mid`,`${t.start}-cyclic-special-2`].map(t=>e.querySelector(`path[id="${t}"][data-edge="true"]`)).filter(t=>null!==t)})(t,e);if(!r.length)throw new Error(`ER relationship ${t.id} not found in rendered SVG`);const i=(t=>{const e=[];return t.forEach(t=>{H(t).forEach(t=>{const r=e[e.length-1];r&&r.x===t.x&&r.y===t.y||e.push(t)})}),e})(r);if(i.length<2)throw new Error(`ER relationship ${t.id} is missing usable path points`);const o=i[0],n=i[i.length-1],a=r[0],s=mi(a.getAttribute("stroke")||getComputedStyle(a).stroke||""),l=Number(a.getAttribute("stroke-width")||getComputedStyle(a).strokeWidth||1),h=Oi(o.x,o.y,n.x,n.y,{id:t.id,label:t.label?{text:N(t.label),fontSize:16,textAlign:"center"}:void 0,strokeStyle:vo(t.pattern),startArrowhead:To(t.arrowTypeStart),endArrowhead:To(t.arrowTypeEnd),start:{type:"rectangle",id:t.start},end:{type:"rectangle",id:t.end},points:i.map(t=>[t.x-o.x,t.y-o.y])});return bi(s)&&"none"!==s&&(h.strokeColor=s),Number.isFinite(l)&&l>0&&(h.strokeWidth=l),h},Ao=t=>{const e=mi(t||"");return!!e&&("none"!==e&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgba(0,0,0,0)"!==e&&bi(e))},Lo=(t,e,r)=>{switch(e){case a.FILL:case a.STROKE:Ao(r)&&(t[e]=mi(r));break;case a.STROKE_WIDTH:case a.STROKE_DASHARRAY:mi(r)&&(t[e]=mi(r))}},Fo=(t,e,r)=>{e===n.COLOR&&Ao(r)&&(t[n.COLOR]=mi(r))},Mo=(t,e)=>{t&&Ci(t).forEach(({property:t,value:r})=>{t===a.FILL&&Ao(r)?e[n.COLOR]=mi(r):Fo(e,t,r)})},Eo=(t,e)=>{let r=0,i=0,o=t;for(;o&&o!==e;){const{transformX:t,transformY:e}=K(o);r+=t,i+=e,o=o.parentElement}return{tx:r,ty:i}},$o=(t,e)=>{const r=t.querySelector("line.divider");if(!r)return;const{tx:i,ty:o}=Eo(r,e);return{startX:Number(r.getAttribute("x1"))+i,startY:Number(r.getAttribute("y1"))+o,endX:Number(r.getAttribute("x2"))+i,endY:Number(r.getAttribute("y2"))+o}},Oo=t=>{const e=t.getBBox();return Math.abs(e.width*e.height)},Io=(t,e)=>{const r=t.getAttribute("style");if(!r)return;const i=Ci(r).find(t=>t.property===e);return i?mi(i.value):void 0},Do=(t,e)=>{const r=t.map(t=>({element:t,area:Oo(t)})).filter(({area:t})=>Number.isFinite(t)&&t>0);if(0===r.length)return null;return r.sort((t,r)=>"largest"===e?r.area-t.area:t.area-r.area)[0].element},qo=(t,e)=>{const r=Array.from(t.querySelectorAll("circle, ellipse, path"));return((t,e)=>{if(!t)return;if(!e.has(a.FILL)&&!e.has(a.STROKE))return;const r=mi(t.getAttribute("fill")||Io(t,a.FILL)||""),i=mi(t.getAttribute("stroke")||Io(t,a.STROKE)||"");return Ao(r)?r:Ao(i)?i:void 0})(Do(r,"smallest"),e)},Ro=t=>{const e=(t=>{if(t.length<2)return t;const e=t.slice(1),r=e.filter(t=>t.trim().length>0).reduce((t,e)=>{const r=e.match(/^\s*/)?.[0].length??0;return Math.min(t,r)},Number.POSITIVE_INFINITY);return!Number.isFinite(r)||r<=0?t.map(t=>t.trimEnd()):[t[0].trimEnd(),...e.map(t=>t.replace(new RegExp(`^\\s{0,${r}}`),"").trimEnd())]})(Array.isArray(t.label)?t.label.map(t=>N(t)):N(t.label||"").split("\n")).join("\n");return e},zo=t=>{if(!t.description)return[];return(Array.isArray(t.description)?t.description:[t.description]).map(t=>N(t)).filter(t=>t.length>0)},No=(t,e,r)=>{const i=r(t);if(!i)throw new Error(`State node element not found for "${t.id}"`);const o=((t,e)=>{switch(e){case"roundedWithTitle":case"rectWithTitle":return t.querySelector("rect.outer")||t.querySelector("rect")||t;case"divider":return t.querySelector("rect.divider")||t.querySelector("rect")||t;case"stateStart":case"stateEnd":return Do(Array.from(t.querySelectorAll("circle, ellipse, path")),"largest")||t;default:return t.querySelector("rect, path, circle, ellipse, polygon")||t}})(i,t.shape),s={},l={},h=[t.labelStyle,...t.cssCompiledStyles||[],...t.cssStyles||[]],c=(t=>{const e=new Set;return t.filter(Boolean).forEach(t=>{Ci(t||"").forEach(({property:t})=>{e.add(t)})}),e})(h);h.filter(Boolean).forEach(t=>{((t,e,r)=>{t&&Ci(t).forEach(({property:t,value:i})=>{Lo(e,t,i),Fo(r,t,i)})})(t,s,l)}),((t,e,r)=>{if(!t)return;[[a.FILL,t.getAttribute("fill")],[a.STROKE,t.getAttribute("stroke")],[a.STROKE_WIDTH,t.getAttribute("stroke-width")],[a.STROKE_DASHARRAY,t.getAttribute("stroke-dasharray")]].forEach(([t,i])=>{if(!r.has(t))return;if(e[t])return;const o=mi(i||"");o&&Lo(e,t,o)})})(o,s,c),((t,e,r)=>{if(!t)return;const i=[t,...Array.from(t.querySelectorAll("text, foreignObject, div, span, p"))];for(const t of i){if(e[n.COLOR])break;if((r.has(n.COLOR)||r.has(a.FILL))&&(Mo(t.getAttribute("style"),e),e[n.COLOR]))break;const i=mi(t.getAttribute("fill")||t.getAttribute("color")||"");(r.has(n.COLOR)||r.has(a.FILL))&&Ao(i)&&(e[n.COLOR]=i)}})(i,l,c);const d=((t,e)=>{const r=t.getBBox(),{tx:i,ty:o}=Eo(t,e);return{x:r.x+i,y:r.y+o,width:r.width,height:r.height}})(o,e);return{id:t.id,shape:t.shape,text:Ro(t),description:zo(t),x:d.x,y:d.y,width:d.width,height:d.height,parentId:t.parentId,position:t.position,containerStyle:s,labelStyle:l,dividerLine:"rectWithTitle"===t.shape?$o(i,e):void 0,endInnerColor:"stateEnd"===t.shape?qo(i,c):void 0,isRenderable:"noteGroup"!==t.shape}},Ko=(t,e)=>{const r=e.querySelector(`[id='${t.id}']`);if(!r)return null;const{tx:i,ty:o}=Eo(r,e),n=Y(r,{x:i,y:o},"MCL");if(n.reflectionPoints.length<2)return null;const s={};[t.style].filter(Boolean).forEach(t=>{Ci(t||"").forEach(({property:t,value:e})=>{((t,e)=>{switch(t){case a.STROKE:Ao(e)&&(s.strokeColor=mi(e));break;case a.STROKE_WIDTH:{const t=parseFloat(mi(e));Number.isFinite(t)&&t>0&&(s.strokeWidth=t);break}case a.STROKE_DASHARRAY:mi(e)&&(s.strokeStyle="dashed")}})(t,e)})});const l="none"===t.arrowhead||t.classes?.includes("note-edge");return{id:t.id,start:t.start,end:t.end,text:N(t.label||""),...n,strokeColor:s.strokeColor,strokeWidth:s.strokeWidth,strokeStyle:l?"dashed":s.strokeStyle,isNoteEdge:l}},Po=(t,e)=>{const{nodes:r,edges:i}=t.getData(),o=(t=>{const e=new Set,r=t=>(t&&e.add(t),t),i=t=>{const i=t.find(t=>!e.has(t));return r(i||null)};return e=>{const o=[`[id='${e.domId}']`,`[id='${e.id}']`,`[data-id='${e.id}']`];for(const e of o){const i=t.querySelector(e);if(i)return r(i)}switch(e.shape){case"divider":return i(Array.from(t.querySelectorAll("g.statediagram-cluster-alt")));case"stateStart":return i(Array.from(t.querySelectorAll("g.node.default")).filter(t=>t.querySelector("circle.state-start")));case"stateEnd":return i(Array.from(t.querySelectorAll("g.node.default")).filter(t=>!t.querySelector("circle.state-start")));default:return null}}})(e);return{type:"state",nodes:r.map(t=>No(t,e,o)),edges:i.map(t=>Ko(t,e)).filter(t=>null!==t)}};let Wo=Promise.resolve();let jo=null,Ho=0;const Yo=t=>{const e=t.querySelector("svg");if(!e)throw new Error("SVG element not found");const r=e.getBoundingClientRect(),i=r.width,o=r.height;e.setAttribute("width",`${i}`),e.setAttribute("height",`${o}`);const n=unescape(encodeURIComponent(e.outerHTML));return{type:"graphImage",mimeType:"image/svg+xml",dataURL:`data:image/svg+xml;base64,${btoa(n)}`,width:i,height:o}},Uo=async(t,e=yi)=>(t=>{const e=Wo.then(t,t);return Wo=e.then(()=>{},()=>{}),e})(async()=>{const r=e.themeVariables?.fontSize??yi.themeVariables.fontSize,i={...yi,...e,fontSize:r,themeVariables:{...yi.themeVariables,...e.themeVariables,fontSize:r}},o=(t=>JSON.stringify(t))(i);o!==jo&&(gi.initialize(i),jo=o);const n=await gi.mermaidAPI.getDiagramFromText((t=>{let e=t;return e=e.replace(/style.*:\S*#.*;/g,t=>t.substring(0,t.length-1)),e=e.replace(/classDef.*:\S*#.*;/g,t=>t.substring(0,t.length-1)),e=e.replace(/#\w+;/g,t=>{const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?`fl°°${e}¶ß`:`fl°${e}¶ß`}),e})(t)),a="mermaid-to-excalidraw-"+Ho++,s=document.createElement("div");s.setAttribute("style","opacity: 0; position: fixed; z-index: -1; left: -99999px; top: -99999px;");const l=`${a}-container`;s.id=l,document.getElementById(l)?.remove(),document.body.appendChild(s);try{const{svg:e}=await gi.render(a,t,s);let r;s.innerHTML=e;try{switch(n.type){case"flowchart-v2":case"graph":r=$i(n.db,s);break;case"sequence":r=to(n,s);break;case"class":case"classDiagram":r=((t,e)=>{const r=t.db,i=r.getDirection?.()||"TB",o=[],n=[],a=[],s=[],l=r.getNamespaces?.()||[],h=r.getClasses?.()||{},c=h instanceof Map?Object.fromEntries(h):h;if(c&&Object.keys(c).length){const t="function"==typeof r.lookUpDomId?r.lookUpDomId.bind(r):void 0,i=xo(c,e,t);o.push(i.nodes),n.push(...i.lines),a.push(...i.text),s.push(...i.nodes)}const d=r.getRelations?.()||[],{arrows:u,text:p}=Co(d,s,e,i),g=r.getNotes?.()||[],{notes:f,connectors:y}=bo(g,e,s);return o.push(f),u.push(...y),a.push(...p),{type:"class",nodes:o,lines:n,arrows:u,text:a,namespaces:l}})(n,s);break;case"er":r=((t,e)=>{const r=t.getData(),i=r.nodes,o=r.edges,n=[],a=[],s=[];i.forEach(t=>{const r=Bo(t,e);n.push(r.container),a.push(...r.lines),s.push(...r.text)});const l=o.map(t=>_o(t,e));return{type:"erd",nodes:[n],lines:a,arrows:l,text:s}})(n.db,s);break;case"state":case"stateDiagram":r=Po(n.db,s);break;default:r=Yo(s)}}catch(t){console.error("Error processing Mermaid diagram:",t),r=Yo(s)}return r}finally{s.remove()}}),Xo=async(t,e)=>{const r=e||{},i=parseInt(r.themeVariables?.fontSize??"")||20,o=await Uo(t,{...r,themeVariables:{...r.themeVariables}});return U(o,{fontSize:i})}},51444(t,e,r){"use strict";function i(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r<e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r<o||void 0===r&&o>=o)&&(r=o)}return r}function o(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r>o||void 0===r&&o>=o)&&(r=o)}return r}function n(t){return t}r.d(e,{JLW:()=>Xl,l78:()=>g,tlR:()=>p,qrM:()=>sh,Yu4:()=>hh,IA3:()=>dh,Wi0:()=>ph,PGM:()=>gh,OEq:()=>yh,y8u:()=>Ch,olC:()=>kh,IrU:()=>Sh,oDi:()=>Bh,Q7f:()=>Ah,cVp:()=>Fh,lUB:()=>Zl,Lx9:()=>Eh,nVG:()=>Nh,uxU:()=>Kh,Xf2:()=>jh,GZz:()=>Yh,UPb:()=>Xh,dyv:()=>Uh,GPZ:()=>xo,Sk5:()=>qo,bEH:()=>mn,n8j:()=>th,T9B:()=>i,jkA:()=>o,rLf:()=>ih,WH:()=>Bn,m4Y:()=>na,UMr:()=>vn,w7C:()=>Cl,zt:()=>kl,Ltv:()=>wl,UAC:()=>ba,DCK:()=>Qa,TUC:()=>La,Agd:()=>xa,t6C:()=>ga,wXd:()=>ya,ABi:()=>va,Ui6:()=>za,rGn:()=>Fa,ucG:()=>fa,YPH:()=>Ta,Mol:()=>Aa,PGu:()=>Ba,GuW:()=>_a,hkb:()=>Vo}),r.dn(n);var a=1e-6;function s(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function h(t){return e=>+t(e)}function c(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function d(){return!this.__axis}function u(t,e){var r=[],i=null,o=null,u=6,p=6,g=3,f="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,y=1===t||4===t?-1:1,m=4===t||2===t?"x":"y",x=1===t||3===t?s:l;function C(s){var l=i??(e.ticks?e.ticks.apply(e,r):e.domain()),C=o??(e.tickFormat?e.tickFormat.apply(e,r):n),b=Math.max(u,0)+g,k=e.range(),w=+k[0]+f,S=+k[k.length-1]+f,T=(e.bandwidth?c:h)(e.copy(),f),v=s.selection?s.selection():s,B=v.selectAll(".domain").data([null]),_=v.selectAll(".tick").data(l,e).order(),A=_.exit(),L=_.enter().append("g").attr("class","tick"),F=_.select("line"),M=_.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(L),F=F.merge(L.append("line").attr("stroke","currentColor").attr(m+"2",y*u)),M=M.merge(L.append("text").attr("fill","currentColor").attr(m,y*b).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),s!==v&&(B=B.transition(s),_=_.transition(s),F=F.transition(s),M=M.transition(s),A=A.transition(s).attr("opacity",a).attr("transform",function(t){return isFinite(t=T(t))?x(t+f):this.getAttribute("transform")}),L.attr("opacity",a).attr("transform",function(t){var e=this.parentNode.__axis;return x((e&&isFinite(e=e(t))?e:T(t))+f)})),A.remove(),B.attr("d",4===t||2===t?p?"M"+y*p+","+w+"H"+f+"V"+S+"H"+y*p:"M"+f+","+w+"V"+S:p?"M"+w+","+y*p+"V"+f+"H"+S+"V"+y*p:"M"+w+","+f+"H"+S),_.attr("opacity",1).attr("transform",function(t){return x(T(t)+f)}),F.attr(m+"2",y*u),M.attr(m,y*b).text(C),v.filter(d).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),v.each(function(){this.__axis=T})}return C.scale=function(t){return arguments.length?(e=t,C):e},C.ticks=function(){return r=Array.from(arguments),C},C.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),C):r.slice()},C.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),C):i&&i.slice()},C.tickFormat=function(t){return arguments.length?(o=t,C):o},C.tickSize=function(t){return arguments.length?(u=p=+t,C):u},C.tickSizeInner=function(t){return arguments.length?(u=+t,C):u},C.tickSizeOuter=function(t){return arguments.length?(p=+t,C):p},C.tickPadding=function(t){return arguments.length?(g=+t,C):g},C.offset=function(t){return arguments.length?(f=+t,C):f},C}function p(t){return u(1,t)}function g(t){return u(3,t)}function f(){}function y(t){return null==t?f:function(){return this.querySelector(t)}}function m(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var n,a,s=e[o],l=s.length,h=i[o]=new Array(l),c=0;c<l;++c)(n=s[c])&&(a=t.call(n,n.__data__,c,s))&&("__data__"in n&&(a.__data__=n.__data__),h[c]=a);return new ae(i,this._parents)}function x(){return[]}function C(t){return null==t?x:function(){return this.querySelectorAll(t)}}function b(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function k(t){t="function"==typeof t?b(t):C(t);for(var e=this._groups,r=e.length,i=[],o=[],n=0;n<r;++n)for(var a,s=e[n],l=s.length,h=0;h<l;++h)(a=s[h])&&(i.push(t.call(a,a.__data__,h,s)),o.push(a));return new ae(i,o)}function w(t){return function(){return this.matches(t)}}function S(t){return function(e){return e.matches(t)}}r.dn(y),r.dn(m),r.dn(C),r.dn(k),r.dn(w),r.dn(B);var T=Array.prototype.find;function v(){return this.firstElementChild}function B(t){return this.select(null==t?v:function(t){return function(){return T.call(this.children,t)}}("function"==typeof t?t:S(t)))}r.dn(L);var _=Array.prototype.filter;function A(){return Array.from(this.children)}function L(t){return this.selectAll(null==t?A:function(t){return function(){return _.call(this.children,t)}}("function"==typeof t?t:S(t)))}function F(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var n,a=e[o],s=a.length,l=i[o]=[],h=0;h<s;++h)(n=a[h])&&t.call(n,n.__data__,h,a)&&l.push(n);return new ae(i,this._parents)}function M(t){return new Array(t.length)}function E(){return new ae(this._enter||this._groups.map(M),this._parents)}function $(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function O(t){return function(){return t}}function I(t,e,r,i,o,n){for(var a,s=0,l=e.length,h=n.length;s<h;++s)(a=e[s])?(a.__data__=n[s],i[s]=a):r[s]=new $(t,n[s]);for(;s<l;++s)(a=e[s])&&(o[s]=a)}function D(t,e,r,i,o,n,a){var s,l,h,c=new Map,d=e.length,u=n.length,p=new Array(d);for(s=0;s<d;++s)(l=e[s])&&(p[s]=h=a.call(l,l.__data__,s,e)+"",c.has(h)?o[s]=l:c.set(h,l));for(s=0;s<u;++s)h=a.call(t,n[s],s,n)+"",(l=c.get(h))?(i[s]=l,l.__data__=n[s],c.delete(h)):r[s]=new $(t,n[s]);for(s=0;s<d;++s)(l=e[s])&&c.get(p[s])===l&&(o[s]=l)}function q(t){return t.__data__}function R(t,e){if(!arguments.length)return Array.from(this,q);var r=e?D:I,i=this._parents,o=this._groups;"function"!=typeof t&&(t=O(t));for(var n=o.length,a=new Array(n),s=new Array(n),l=new Array(n),h=0;h<n;++h){var c=i[h],d=o[h],u=d.length,p=z(t.call(c,c&&c.__data__,h,i)),g=p.length,f=s[h]=new Array(g),y=a[h]=new Array(g);r(c,d,f,y,l[h]=new Array(u),p,e);for(var m,x,C=0,b=0;C<g;++C)if(m=f[C]){for(C>=b&&(b=C+1);!(x=y[b])&&++b<g;);m._next=x||null}}return(a=new ae(a,i))._enter=s,a._exit=l,a}function z(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function N(){return new ae(this._exit||this._groups.map(M),this._parents)}function K(t,e,r){var i=this.enter(),o=this,n=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==r?n.remove():r(n),i&&o?i.merge(o).order():o}function P(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,o=r.length,n=i.length,a=Math.min(o,n),s=new Array(o),l=0;l<a;++l)for(var h,c=r[l],d=i[l],u=c.length,p=s[l]=new Array(u),g=0;g<u;++g)(h=c[g]||d[g])&&(p[g]=h);for(;l<o;++l)s[l]=r[l];return new ae(s,this._parents)}function W(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,o=t[e],n=o.length-1,a=o[n];--n>=0;)(i=o[n])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this}function j(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=H);for(var r=this._groups,i=r.length,o=new Array(i),n=0;n<i;++n){for(var a,s=r[n],l=s.length,h=o[n]=new Array(l),c=0;c<l;++c)(a=s[c])&&(h[c]=a);h.sort(e)}return new ae(o,this._parents).order()}function H(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Y(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function U(){return Array.from(this)}function X(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,n=i.length;o<n;++o){var a=i[o];if(a)return a}return null}function G(){let t=0;for(const e of this)++t;return t}function V(){return!this.node()}function Z(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var o,n=e[r],a=0,s=n.length;a<s;++a)(o=n[a])&&t.call(o,o.__data__,a,n);return this}r.dn(F),r.dn(M),r.dn(E),$.prototype={constructor:$,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},r.dn(O),r.dn(R),r.dn(N),r.dn(K),r.dn(P),r.dn(W),r.dn(j),r.dn(Y),r.dn(U),r.dn(X),r.dn(G),r.dn(V),r.dn(Z);var Q="http://www.w3.org/1999/xhtml";const J={svg:"http://www.w3.org/2000/svg",xhtml:Q,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tt(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),J.hasOwnProperty(e)?{space:J[e],local:t}:t}function et(t){return function(){this.removeAttribute(t)}}function rt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function it(t,e){return function(){this.setAttribute(t,e)}}function ot(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function nt(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function at(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function st(t,e){var r=tt(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?rt:et:"function"==typeof e?r.local?at:nt:r.local?ot:it)(r,e))}function lt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ht(t){return function(){this.style.removeProperty(t)}}function ct(t,e,r){return function(){this.style.setProperty(t,e,r)}}function dt(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function ut(t,e,r){return arguments.length>1?this.each((null==e?ht:"function"==typeof e?dt:ct)(t,e,r??"")):pt(this.node(),t)}function pt(t,e){return t.style.getPropertyValue(e)||lt(t).getComputedStyle(t,null).getPropertyValue(e)}function gt(t){return function(){delete this[t]}}function ft(t,e){return function(){this[t]=e}}function yt(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function mt(t,e){return arguments.length>1?this.each((null==e?gt:"function"==typeof e?yt:ft)(t,e)):this.node()[t]}function xt(t){return t.trim().split(/^|\s+/)}function Ct(t){return t.classList||new bt(t)}function bt(t){this._node=t,this._names=xt(t.getAttribute("class")||"")}function kt(t,e){for(var r=Ct(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function wt(t,e){for(var r=Ct(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function St(t){return function(){kt(this,t)}}function Tt(t){return function(){wt(this,t)}}function vt(t,e){return function(){(e.apply(this,arguments)?kt:wt)(this,t)}}function Bt(t,e){var r=xt(t+"");if(arguments.length<2){for(var i=Ct(this.node()),o=-1,n=r.length;++o<n;)if(!i.contains(r[o]))return!1;return!0}return this.each(("function"==typeof e?vt:e?St:Tt)(r,e))}function _t(){this.textContent=""}function At(t){return function(){this.textContent=t}}function Lt(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ft(t){return arguments.length?this.each(null==t?_t:("function"==typeof t?Lt:At)(t)):this.node().textContent}function Mt(){this.innerHTML=""}function Et(t){return function(){this.innerHTML=t}}function $t(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Ot(t){return arguments.length?this.each(null==t?Mt:("function"==typeof t?$t:Et)(t)):this.node().innerHTML}function It(){this.nextSibling&&this.parentNode.appendChild(this)}function Dt(){return this.each(It)}function qt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Rt(){return this.each(qt)}function zt(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Q&&e.documentElement.namespaceURI===Q?e.createElement(t):e.createElementNS(r,t)}}function Nt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Kt(t){var e=tt(t);return(e.local?Nt:zt)(e)}function Pt(t){var e="function"==typeof t?t:Kt(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Wt(){return null}function jt(t,e){var r="function"==typeof t?t:Kt(t),i=null==e?Wt:"function"==typeof e?e:y(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Ht(){var t=this.parentNode;t&&t.removeChild(this)}function Yt(){return this.each(Ht)}function Ut(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gt(t){return this.select(t?Xt:Ut)}function Vt(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Zt(t){return function(){var e=this.__on;if(e){for(var r,i=0,o=-1,n=e.length;i<n;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++o]=r:this.removeEventListener(r.type,r.listener,r.options);++o?e.length=o:delete this.__on}}}function Qt(t,e,r){return function(){var i,o=this.__on,n=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var a=0,s=o.length;a<s;++a)if((i=o[a]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=n,i.options=r),void(i.value=e);this.addEventListener(t.type,n,r),i={type:t.type,name:t.name,value:e,listener:n,options:r},o?o.push(i):this.__on=[i]}}function Jt(t,e,r){var i,o,n=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),a=n.length;if(!(arguments.length<2)){for(s=e?Qt:Zt,i=0;i<a;++i)this.each(s(n[i],e,r));return this}var s=this.node().__on;if(s)for(var l,h=0,c=s.length;h<c;++h)for(i=0,l=s[h];i<a;++i)if((o=n[i]).type===l.type&&o.name===l.name)return l.value}function te(t,e,r){var i=lt(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,r):(o=i.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function ee(t,e){return function(){return te(this,t,e)}}function re(t,e){return function(){return te(this,t,e.apply(this,arguments))}}function ie(t,e){return this.each(("function"==typeof e?re:ee)(t,e))}function*oe(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,o=t[e],n=0,a=o.length;n<a;++n)(i=o[n])&&(yield i)}r.dn(tt),r.dn(st),r.dn(lt),r.dn(ut),r.dn(mt),r.dn(Bt),bt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}},r.dn(Ft),r.dn(Ot),r.dn(Dt),r.dn(Rt),r.dn(Kt),r.dn(Pt),r.dn(jt),r.dn(Yt),r.dn(Gt),r.dn(Vt),r.dn(Jt),r.dn(ie),r.dn(oe);var ne=[null];function ae(t,e){this._groups=t,this._parents=e}function se(){return new ae([[document.documentElement]],ne)}ae.prototype=se.prototype={constructor:ae,select:m,selectAll:k,selectChild:B,selectChildren:L,filter:F,data:R,enter:E,exit:N,join:K,merge:P,selection:function(){return this},order:W,sort:j,call:Y,nodes:U,node:X,size:G,empty:V,each:Z,attr:st,style:ut,property:mt,classed:Bt,text:Ft,html:Ot,raise:Dt,lower:Rt,append:Pt,insert:jt,remove:Yt,clone:Gt,datum:Vt,on:Jt,dispatch:ie,[Symbol.iterator]:oe};const le=se;var he={value:()=>{}};function ce(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new de(i)}function de(t){this._=t}function ue(t,e){for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).name===e)return r.value}function pe(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=he,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}de.prototype=ce.prototype={constructor:de,on:function(t,e){var r,i,o=this._,n=(i=o,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),a=-1,s=n.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(r=(t=n[a]).type)o[r]=pe(o[r],t.name,e);else if(null==e)for(r in o)o[r]=pe(o[r],t.name,null);return this}for(;++a<s;)if((r=(t=n[a]).type)&&(r=ue(o[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new de(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,o=new Array(r),n=0;n<r;++n)o[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(n=0,r=(i=this._[t]).length;n<r;++n)i[n].value.apply(e,o)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,n=i.length;o<n;++o)i[o].value.apply(e,r)}};const ge=ce;var fe,ye,me=0,xe=0,Ce=0,be=0,ke=0,we=0,Se="object"==typeof performance&&performance.now?performance:Date,Te="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ve(){return ke||(Te(Be),ke=Se.now()+we)}function Be(){ke=0}function _e(){this._call=this._time=this._next=null}function Ae(t,e,r){var i=new _e;return i.restart(t,e,r),i}function Le(){ke=(be=Se.now())+we,me=xe=0;try{!function(){ve(),++me;for(var t,e=fe;e;)(t=ke-e._time)>=0&&e._call.call(void 0,t),e=e._next;--me}()}finally{me=0,function(){var t,e,r=fe,i=1/0;for(;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:fe=e);ye=t,Me(i)}(),ke=0}}function Fe(){var t=Se.now(),e=t-be;e>1e3&&(we-=e,be=t)}function Me(t){me||(xe&&(xe=clearTimeout(xe)),t-ke>24?(t<1/0&&(xe=setTimeout(Le,t-Se.now()-we)),Ce&&(Ce=clearInterval(Ce))):(Ce||(be=Se.now(),Ce=setInterval(Fe,1e3)),me=1,Te(Le)))}function Ee(t,e,r){var i=new _e;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}_e.prototype=Ae.prototype={constructor:_e,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?ve():+r)+(null==e?0:+e),this._next||ye===this||(ye?ye._next=this:fe=this,ye=this),this._call=t,this._time=r,Me()},stop:function(){this._call&&(this._call=null,this._time=1/0,Me())}},r.dn(Ee),r.dn(Ie);var $e=ge("start","end","cancel","interrupt"),Oe=[];function Ie(t,e,r,i,o,n){var a=t.__transition;if(a){if(r in a)return}else t.__transition={};!function(t,e,r){var i,o=t.__transition;function n(t){r.state=1,r.timer.restart(a,r.delay,r.time),r.delay<=t&&a(t-r.delay)}function a(n){var h,c,d,u;if(1!==r.state)return l();for(h in o)if((u=o[h]).name===r.name){if(3===u.state)return Ee(a);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[h]):+h<e&&(u.state=6,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete o[h])}if(Ee(function(){3===r.state&&(r.state=4,r.timer.restart(s,r.delay,r.time),s(n))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(d=r.tween.length),h=0,c=-1;h<d;++h)(u=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=u);i.length=c+1}}function s(e){for(var o=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(l),r.state=5,1),n=-1,a=i.length;++n<a;)i[n].call(t,o);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){for(var i in r.state=6,r.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=r,r.timer=Ae(n,0,r.time)}(t,r,{name:e,index:i,group:o,on:$e,tween:Oe,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:0})}function De(t,e){var r=Re(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function qe(t,e){var r=Re(t,e);if(r.state>3)throw new Error("too late; already running");return r}function Re(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function ze(t,e){var r,i,o,n=t.__transition,a=!0;if(n){for(o in e=null==e?null:e+"",n)(r=n[o]).name===e?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]):a=!1;a&&delete t.__transition}}function Ne(t){return this.each(function(){ze(this,t)})}function Ke(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}r.dn(ze),r.dn(Ne),r.dn(Ke),r.dn(He);var Pe,We=180/Math.PI,je={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function He(t,e,r,i,o,n){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:o,translateY:n,rotate:Math.atan2(e,t)*We,skewX:Math.atan(l)*We,scaleX:a,scaleY:s}}function Ye(t,e,r,i){function o(t){return t.length?t.pop()+" ":""}return function(n,a){var s=[],l=[];return n=t(n),a=t(a),function(t,i,o,n,a,s){if(t!==o||i!==n){var l=a.push("translate(",null,e,null,r);s.push({i:l-4,x:Ke(t,o)},{i:l-2,x:Ke(i,n)})}else(o||n)&&a.push("translate("+o+e+n+r)}(n.translateX,n.translateY,a.translateX,a.translateY,s,l),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(o(r)+"rotate(",null,i)-2,x:Ke(t,e)})):e&&r.push(o(r)+"rotate("+e+i)}(n.rotate,a.rotate,s,l),function(t,e,r,n){t!==e?n.push({i:r.push(o(r)+"skewX(",null,i)-2,x:Ke(t,e)}):e&&r.push(o(r)+"skewX("+e+i)}(n.skewX,a.skewX,s,l),function(t,e,r,i,n,a){if(t!==r||e!==i){var s=n.push(o(n)+"scale(",null,",",null,")");a.push({i:s-4,x:Ke(t,r)},{i:s-2,x:Ke(e,i)})}else 1===r&&1===i||n.push(o(n)+"scale("+r+","+i+")")}(n.scaleX,n.scaleY,a.scaleX,a.scaleY,s,l),n=a=null,function(t){for(var e,r=-1,i=l.length;++r<i;)s[(e=l[r]).i]=e.x(t);return s.join("")}}}var Ue=Ye(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?je:He(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),Xe=Ye(function(t){return null==t?je:(Pe||(Pe=document.createElementNS("http://www.w3.org/2000/svg","g")),Pe.setAttribute("transform",t),(t=Pe.transform.baseVal.consolidate())?He((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):je)},", ",")",")");function Ge(t,e){var r,i;return function(){var o=qe(this,t),n=o.tween;if(n!==r)for(var a=0,s=(i=r=n).length;a<s;++a)if(i[a].name===e){(i=i.slice()).splice(a,1);break}o.tween=i}}function Ve(t,e,r){var i,o;if("function"!=typeof r)throw new Error;return function(){var n=qe(this,t),a=n.tween;if(a!==i){o=(i=a).slice();for(var s={name:e,value:r},l=0,h=o.length;l<h;++l)if(o[l].name===e){o[l]=s;break}l===h&&o.push(s)}n.tween=o}}function Ze(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,o=Re(this.node(),r).tween,n=0,a=o.length;n<a;++n)if((i=o[n]).name===t)return i.value;return null}return this.each((null==e?Ge:Ve)(r,t,e))}function Qe(t,e,r){var i=t._id;return t.each(function(){var t=qe(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return Re(t,i).value[e]}}function Je(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function tr(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function er(){}r.dn(Ze),r.dn(Je);var rr=.7,ir=1/rr,or="\\s*([+-]?\\d+)\\s*",nr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ar="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sr=/^#([0-9a-f]{3,8})$/,lr=new RegExp(`^rgb\\(${or},${or},${or}\\)$`),hr=new RegExp(`^rgb\\(${ar},${ar},${ar}\\)$`),cr=new RegExp(`^rgba\\(${or},${or},${or},${nr}\\)$`),dr=new RegExp(`^rgba\\(${ar},${ar},${ar},${nr}\\)$`),ur=new RegExp(`^hsl\\(${nr},${ar},${ar}\\)$`),pr=new RegExp(`^hsla\\(${nr},${ar},${ar},${nr}\\)$`),gr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function fr(){return this.rgb().formatHex()}function yr(){return this.rgb().formatRgb()}function mr(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=sr.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?xr(e):3===r?new wr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Cr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Cr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=lr.exec(t))?new wr(e[1],e[2],e[3],1):(e=hr.exec(t))?new wr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=cr.exec(t))?Cr(e[1],e[2],e[3],e[4]):(e=dr.exec(t))?Cr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ur.exec(t))?Ar(e[1],e[2]/100,e[3]/100,1):(e=pr.exec(t))?Ar(e[1],e[2]/100,e[3]/100,e[4]):gr.hasOwnProperty(t)?xr(gr[t]):"transparent"===t?new wr(NaN,NaN,NaN,0):null}function xr(t){return new wr(t>>16&255,t>>8&255,255&t,1)}function Cr(t,e,r,i){return i<=0&&(t=e=r=NaN),new wr(t,e,r,i)}function br(t){return t instanceof er||(t=mr(t)),t?new wr((t=t.rgb()).r,t.g,t.b,t.opacity):new wr}function kr(t,e,r,i){return 1===arguments.length?br(t):new wr(t,e,r,i??1)}function wr(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Sr(){return`#${_r(this.r)}${_r(this.g)}${_r(this.b)}`}function Tr(){const t=vr(this.opacity);return`${1===t?"rgb(":"rgba("}${Br(this.r)}, ${Br(this.g)}, ${Br(this.b)}${1===t?")":`, ${t})`}`}function vr(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Br(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function _r(t){return((t=Br(t))<16?"0":"")+t.toString(16)}function Ar(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Fr(t,e,r,i)}function Lr(t){if(t instanceof Fr)return new Fr(t.h,t.s,t.l,t.opacity);if(t instanceof er||(t=mr(t)),!t)return new Fr;if(t instanceof Fr)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),n=Math.max(e,r,i),a=NaN,s=n-o,l=(n+o)/2;return s?(a=e===n?(r-i)/s+6*(r<i):r===n?(i-e)/s+2:(e-r)/s+4,s/=l<.5?n+o:2-n-o,a*=60):s=l>0&&l<1?0:a,new Fr(a,s,l,t.opacity)}function Fr(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Mr(t){return(t=(t||0)%360)<0?t+360:t}function Er(t){return Math.max(0,Math.min(1,t||0))}function $r(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function Or(t,e,r,i,o){var n=t*t,a=n*t;return((1-3*t+3*n-a)*e+(4-6*n+3*a)*r+(1+3*t+3*n-3*a)*i+a*o)/6}function Ir(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),o=t[i],n=t[i+1],a=i>0?t[i-1]:2*o-n,s=i<e-1?t[i+2]:2*n-o;return Or((r-i/e)*e,a,o,n,s)}}function Dr(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),o=t[(i+e-1)%e],n=t[i%e],a=t[(i+1)%e],s=t[(i+2)%e];return Or((r-i/e)*e,o,n,a,s)}}Je(er,mr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:fr,formatHex:fr,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Lr(this).formatHsl()},formatRgb:yr,toString:yr}),Je(wr,kr,tr(er,{brighter(t){return t=null==t?ir:Math.pow(ir,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?rr:Math.pow(rr,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new wr(Br(this.r),Br(this.g),Br(this.b),vr(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:Sr,formatHex:Sr,formatHex8:function(){return`#${_r(this.r)}${_r(this.g)}${_r(this.b)}${_r(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Tr,toString:Tr})),Je(Fr,function(t,e,r,i){return 1===arguments.length?Lr(t):new Fr(t,e,r,i??1)},tr(er,{brighter(t){return t=null==t?ir:Math.pow(ir,t),new Fr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?rr:Math.pow(rr,t),new Fr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,o=2*r-i;return new wr($r(t>=240?t-240:t+120,o,i),$r(t,o,i),$r(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new Fr(Mr(this.h),Er(this.s),Er(this.l),vr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=vr(this.opacity);return`${1===t?"hsl(":"hsla("}${Mr(this.h)}, ${100*Er(this.s)}%, ${100*Er(this.l)}%${1===t?")":`, ${t})`}`}})),r.dn(Ir),r.dn(Dr);const qr=t=>()=>t;function Rr(t,e){return function(r){return t+r*e}}function zr(t){return 1===(t=+t)?Nr:function(e,r){return r-e?function(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)}}(e,r,t):qr(isNaN(e)?r:e)}}function Nr(t,e){var r=e-t;return r?Rr(t,r):qr(isNaN(t)?e:t)}r.dn(qr);const Kr=function t(e){var r=zr(e);function i(t,e){var i=r((t=kr(t)).r,(e=kr(e)).r),o=r(t.g,e.g),n=r(t.b,e.b),a=Nr(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=n(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function Pr(t){return function(e){var r,i,o=e.length,n=new Array(o),a=new Array(o),s=new Array(o);for(r=0;r<o;++r)i=kr(e[r]),n[r]=i.r||0,a[r]=i.g||0,s[r]=i.b||0;return n=t(n),a=t(a),s=t(s),i.opacity=1,function(t){return i.r=n(t),i.g=a(t),i.b=s(t),i+""}}}Pr(Ir),Pr(Dr);r.dn(Hr);var Wr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jr=new RegExp(Wr.source,"g");function Hr(t,e){var r,i,o,n=Wr.lastIndex=jr.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(r=Wr.exec(t))&&(i=jr.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Ke(r,i)})),n=jr.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,i=0;i<e;++i)s[(r=l[i]).i]=r.x(t);return s.join("")})}function Yr(t,e){var r;return("number"==typeof e?Ke:e instanceof mr?Kr:(r=mr(e))?(e=r,Kr):Hr)(t,e)}function Ur(t){return function(){this.removeAttribute(t)}}function Xr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Gr(t,e,r){var i,o,n=r+"";return function(){var a=this.getAttribute(t);return a===n?null:a===i?o:o=e(i=a,r)}}function Vr(t,e,r){var i,o,n=r+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===n?null:a===i?o:o=e(i=a,r)}}function Zr(t,e,r){var i,o,n;return function(){var a,s,l=r(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===i&&s===o?n:(o=s,n=e(i=a,l));this.removeAttribute(t)}}function Qr(t,e,r){var i,o,n;return function(){var a,s,l=r(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===i&&s===o?n:(o=s,n=e(i=a,l));this.removeAttributeNS(t.space,t.local)}}function Jr(t,e){var r=tt(t),i="transform"===r?Xe:Yr;return this.attrTween(t,"function"==typeof e?(r.local?Qr:Zr)(r,i,Qe(this,"attr."+t,e)):null==e?(r.local?Xr:Ur)(r):(r.local?Vr:Gr)(r,i,e))}function ti(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,o)),r}return o._value=e,o}function ei(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,o)),r}return o._value=e,o}function ri(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=tt(t);return this.tween(r,(i.local?ti:ei)(i,e))}function ii(t,e){return function(){De(this,t).delay=+e.apply(this,arguments)}}function oi(t,e){return e=+e,function(){De(this,t).delay=e}}function ni(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ii:oi)(e,t)):Re(this.node(),e).delay}function ai(t,e){return function(){qe(this,t).duration=+e.apply(this,arguments)}}function si(t,e){return e=+e,function(){qe(this,t).duration=e}}function li(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ai:si)(e,t)):Re(this.node(),e).duration}function hi(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){qe(this,t).ease=e}}(e,t)):Re(this.node(),e).ease}function ci(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;qe(this,t).ease=r}}(this._id,t))}function di(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var n,a=e[o],s=a.length,l=i[o]=[],h=0;h<s;++h)(n=a[h])&&t.call(n,n.__data__,h,a)&&l.push(n);return new _i(i,this._parents,this._name,this._id)}function ui(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,o=r.length,n=Math.min(i,o),a=new Array(i),s=0;s<n;++s)for(var l,h=e[s],c=r[s],d=h.length,u=a[s]=new Array(d),p=0;p<d;++p)(l=h[p]||c[p])&&(u[p]=l);for(;s<i;++s)a[s]=e[s];return new _i(a,this._parents,this._name,this._id)}function pi(t,e){var r=this._id;return arguments.length<2?Re(this.node(),r).on.on(t):this.each(function(t,e,r){var i,o,n=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?De:qe;return function(){var a=n(this,t),s=a.on;s!==i&&(o=(i=s).copy()).on(e,r),a.on=o}}(r,t,e))}function gi(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))}function fi(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=y(t));for(var i=this._groups,o=i.length,n=new Array(o),a=0;a<o;++a)for(var s,l,h=i[a],c=h.length,d=n[a]=new Array(c),u=0;u<c;++u)(s=h[u])&&(l=t.call(s,s.__data__,u,h))&&("__data__"in s&&(l.__data__=s.__data__),d[u]=l,Ie(d[u],e,r,u,d,Re(s,r)));return new _i(n,this._parents,e,r)}function yi(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=C(t));for(var i=this._groups,o=i.length,n=[],a=[],s=0;s<o;++s)for(var l,h=i[s],c=h.length,d=0;d<c;++d)if(l=h[d]){for(var u,p=t.call(l,l.__data__,d,h),g=Re(l,r),f=0,y=p.length;f<y;++f)(u=p[f])&&Ie(u,e,r,f,p,g);n.push(p),a.push(l)}return new _i(n,a,e,r)}r.dn(Yr),r.dn(Jr),r.dn(ri),r.dn(ni),r.dn(li),r.dn(hi),r.dn(ci),r.dn(di),r.dn(ui),r.dn(pi),r.dn(gi),r.dn(fi),r.dn(yi),r.dn(xi);var mi=le.prototype.constructor;function xi(){return new mi(this._groups,this._parents)}function Ci(t){return function(){this.style.removeProperty(t)}}function bi(t,e,r){var i="transform"==(t+="")?Ue:Yr;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var n=pt(this,t),a=(this.style.removeProperty(t),pt(this,t));return n===a?null:n===r&&a===i?o:o=e(r=n,i=a)}}(t,i)).on("end.style."+t,Ci(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,n;return function(){var a=pt(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=pt(this,t)),a===l?null:a===i&&l===o?n:(o=l,n=e(i=a,s))}}(t,i,Qe(this,"style."+t,e))).each(function(t,e){var r,i,o,n,a="style."+e,s="end."+a;return function(){var l=qe(this,t),h=l.on,c=null==l.value[a]?n||(n=Ci(e)):void 0;h===r&&o===c||(i=(r=h).copy()).on(s,o=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,o,n=r+"";return function(){var a=pt(this,t);return a===n?null:a===i?o:o=e(i=a,r)}}(t,i,e),r).on("end.style."+t,null)}function ki(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,o;function n(){var n=e.apply(this,arguments);return n!==o&&(i=(o=n)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,n,r)),i}return n._value=e,n}(t,e,r??""))}function wi(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=e??""}}(Qe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))}function Si(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))}function Ti(){for(var t=this._name,e=this._id,r=Ai(),i=this._groups,o=i.length,n=0;n<o;++n)for(var a,s=i[n],l=s.length,h=0;h<l;++h)if(a=s[h]){var c=Re(a,e);Ie(a,t,r,h,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new _i(i,this._parents,t,r)}function vi(){var t,e,r=this,i=r._id,o=r.size();return new Promise(function(n,a){var s={value:a},l={value:function(){0===--o&&n()}};r.each(function(){var r=qe(this,i),o=r.on;o!==t&&((e=(t=o).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),r.on=e}),0===o&&n()})}r.dn(bi),r.dn(ki),r.dn(wi),r.dn(Si),r.dn(Ti),r.dn(vi);var Bi=0;function _i(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Ai(){return++Bi}var Li=le.prototype;_i.prototype=function(t){return le().transition(t)}.prototype={constructor:_i,select:fi,selectAll:yi,selectChild:Li.selectChild,selectChildren:Li.selectChildren,filter:di,merge:ui,selection:xi,transition:Ti,call:Li.call,nodes:Li.nodes,node:Li.node,size:Li.size,empty:Li.empty,each:Li.each,on:pi,attr:Jr,attrTween:ri,style:bi,styleTween:ki,text:wi,textTween:Si,remove:gi,tween:Ze,delay:ni,duration:li,ease:hi,easeVarying:ci,end:vi,[Symbol.iterator]:Li[Symbol.iterator]},r.dn(qi);var Fi,Mi,Ei,$i,Oi,Ii={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Di(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function qi(t){var e,r;t instanceof _i?(e=t._id,t=t._name):(e=Ai(),(r=Ii).time=ve(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,n=0;n<o;++n)for(var a,s=i[n],l=s.length,h=0;h<l;++h)(a=s[h])&&Ie(a,t,e,h,s,r||Di(a,e));return new _i(i,this._parents,t,e)}le.prototype.interrupt=Ne,le.prototype.transition=qi,r.dn(function(){return eo(Xi)});var Ri=null,zi=null,Ni=null;const{abs:Ki,max:Pi,min:Wi}=Math;function ji(t){return[+t[0],+t[1]]}function Hi(t){return[ji(t[0]),ji(t[1])]}var Yi={name:"x",handles:["w","e"].map(Vi),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ui={name:"y",handles:["n","s"].map(Vi),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Xi={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Vi),input:function(t){return null==t?null:Hi(t)},output:function(t){return t}},Gi=null;function Vi(t){return{type:t}}function Zi(t){return!t.ctrlKey&&!t.button}function Qi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Ji(){return navigator.maxTouchPoints||"ontouchstart"in this}function to(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function eo(t){var e,r=Qi,i=Zi,o=Ji,n=!0,a=(void 0)("start","brush","end"),s=6;function l(e){var r=e.property("__brush",f).selectAll(".overlay").data([Vi("overlay")]);r.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Gi.overlay).merge(r).each(function(){var t=to(this).extent;Mi(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([Vi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Gi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return Gi[t.type]}),e.each(h).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",u).filter(o).on("touchstart.brush",u).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(){var t=Mi(this),e=to(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,r){var i=t.__brush.emitter;return!i||r&&i.clean?new d(t,e,r):i}function d(t,e,r){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=r}function u(r){if((!e||r.touches)&&i.apply(this,arguments)){var o,a,s,l,d,u,p,g,f,y,m,x=this,C=r.target.__data__.type,b="selection"===(n&&r.metaKey?C="overlay":C)?null:n&&r.altKey?Ni:zi,k=t===Ui?null:null[C],w=t===Yi?null:null[C],S=to(x),T=S.extent,v=S.selection,B=T[0][0],_=T[0][1],A=T[1][0],L=T[1][1],F=0,M=0,E=k&&w&&n&&r.shiftKey,$=Array.from(r.touches||[r],t=>{const e=t.identifier;return(t=Fi(t,x)).point0=t.slice(),t.identifier=e,t});Ei(x);var O=c(x,arguments,!0).beforestart();if("overlay"===C){v&&(f=!0);const e=[$[0],$[1]||$[0]];S.selection=v=[[o=t===Ui?B:Wi(e[0][0],e[1][0]),s=t===Yi?_:Wi(e[0][1],e[1][1])],[d=t===Ui?A:Pi(e[0][0],e[1][0]),p=t===Yi?L:Pi(e[0][1],e[1][1])]],$.length>1&&z(r)}else o=v[0][0],s=v[0][1],d=v[1][0],p=v[1][1];a=o,l=s,u=d,g=p;var I=Mi(x).attr("pointer-events","none"),D=I.selectAll(".overlay").attr("cursor",Gi[C]);if(r.touches)O.moved=R,O.ended=N;else{var q=Mi(r.view).on("mousemove.brush",R,!0).on("mouseup.brush",N,!0);n&&q.on("keydown.brush",function(t){switch(t.keyCode){case 16:E=k&&w;break;case 18:b===zi&&(k&&(d=u-F*k,o=a+F*k),w&&(p=g-M*w,s=l+M*w),b=Ni,z(t));break;case 32:b!==zi&&b!==Ni||(k<0?d=u-F:k>0&&(o=a-F),w<0?p=g-M:w>0&&(s=l-M),b=Ri,D.attr("cursor",Gi.selection),z(t));break;default:return}Oi(t)},!0).on("keyup.brush",function(t){switch(t.keyCode){case 16:E&&(y=m=E=!1,z(t));break;case 18:b===Ni&&(k<0?d=u:k>0&&(o=a),w<0?p=g:w>0&&(s=l),b=zi,z(t));break;case 32:b===Ri&&(t.altKey?(k&&(d=u-F*k,o=a+F*k),w&&(p=g-M*w,s=l+M*w),b=Ni):(k<0?d=u:k>0&&(o=a),w<0?p=g:w>0&&(s=l),b=zi),D.attr("cursor",Gi[C]),z(t));break;default:return}Oi(t)},!0),(void 0)(r.view)}h.call(x),O.start(r,b.name)}function R(t){for(const e of t.changedTouches||[t])for(const t of $)t.identifier===e.identifier&&(t.cur=Fi(e,x));if(E&&!y&&!m&&1===$.length){const t=$[0];Ki(t.cur[0]-t[0])>Ki(t.cur[1]-t[1])?m=!0:y=!0}for(const t of $)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);f=!0,Oi(t),z(t)}function z(t){const e=$[0],r=e.point0;var i;switch(F=e[0]-r[0],M=e[1]-r[1],b){case Ri:case null:k&&(F=Pi(B-o,Wi(A-d,F)),a=o+F,u=d+F),w&&(M=Pi(_-s,Wi(L-p,M)),l=s+M,g=p+M);break;case zi:$[1]?(k&&(a=Pi(B,Wi(A,$[0][0])),u=Pi(B,Wi(A,$[1][0])),k=1),w&&(l=Pi(_,Wi(L,$[0][1])),g=Pi(_,Wi(L,$[1][1])),w=1)):(k<0?(F=Pi(B-o,Wi(A-o,F)),a=o+F,u=d):k>0&&(F=Pi(B-d,Wi(A-d,F)),a=o,u=d+F),w<0?(M=Pi(_-s,Wi(L-s,M)),l=s+M,g=p):w>0&&(M=Pi(_-p,Wi(L-p,M)),l=s,g=p+M));break;case Ni:k&&(a=Pi(B,Wi(A,o-F*k)),u=Pi(B,Wi(A,d+F*k))),w&&(l=Pi(_,Wi(L,s-M*w)),g=Pi(_,Wi(L,p+M*w)))}u<a&&(k*=-1,i=o,o=d,d=i,i=a,a=u,u=i,C in null&&D.attr("cursor",Gi[C=null[C]])),g<l&&(w*=-1,i=s,s=p,p=i,i=l,l=g,g=i,C in null&&D.attr("cursor",Gi[C=null[C]])),S.selection&&(v=S.selection),y&&(a=v[0][0],u=v[1][0]),m&&(l=v[0][1],g=v[1][1]),v[0][0]===a&&v[0][1]===l&&v[1][0]===u&&v[1][1]===g||(S.selection=[[a,l],[u,g]],h.call(x),O.brush(t,b.name))}function N(t){if((void 0)(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500)}else(void 0)(t.view,f),q.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);I.attr("pointer-events","all"),D.attr("cursor",Gi.overlay),S.selection&&(v=S.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(v)&&(S.selection=null,h.call(x)),O.end(t,b.name)}}function p(t){c(this,arguments).moved(t)}function g(t){c(this,arguments).ended(t)}function f(){var e=this.__brush||{selection:null};return e.extent=Hi(r.apply(this,arguments)),e.dim=t,e}return l.move=function(e,r,i){e.tween?e.on("start.brush",function(t){c(this,arguments).beforestart().start(t)}).on("interrupt.brush end.brush",function(t){c(this,arguments).end(t)}).tween("brush",function(){var e=this,i=e.__brush,o=c(e,arguments),n=i.selection,a=t.input("function"==typeof r?r.apply(this,arguments):r,i.extent),s=(void 0)(n,a);function l(t){i.selection=1===t&&null===a?null:s(t),h.call(e),o.brush()}return null!==n&&null!==a?l:l(1)}):e.each(function(){var e=this,o=arguments,n=e.__brush,a=t.input("function"==typeof r?r.apply(e,o):r,n.extent),s=c(e,o).beforestart();Ei(e),n.selection=null===a?null:a,h.call(e),s.start(i).brush(i).end(i)})},l.clear=function(t,e){l.move(t,null,e)},d.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0===--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,r,i){var o=Mi(this.that).datum();a.call(e,this.that,new(void 0)(e,{sourceEvent:r,target:l,selection:t.output(this.state.selection),mode:i,dispatch:a}),o)}},l.extent=function(t){return arguments.length?(r="function"==typeof t?t:$i(Hi(t)),l):r},l.filter=function(t){return arguments.length?(i="function"==typeof t?t:$i(!!t),l):i},l.touchable=function(t){return arguments.length?(o="function"==typeof t?t:$i(!!t),l):o},l.handleSize=function(t){return arguments.length?(s=+t,l):s},l.keyModifiers=function(t){return arguments.length?(n=!!t,l):n},l.on=function(){var t=a.on.apply(a,arguments);return t===a?l:t},l}function ro(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function io(t,e){if(!isFinite(t)||0===t)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function oo(t){return(t=io(Math.abs(t)))?t[1]:NaN}function no(t,e){return function(r,i){for(var o=r.length,n=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),n.push(r.substring(o-=s,o+s)),!((l+=s+1)>i));)s=t[a=(a+1)%t.length];return n.reverse().join(e)}}function ao(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}r.dn(ro),r.dn(oo),r.dn(no),r.dn(ao);var so,lo=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ho(t){if(!(e=lo.exec(t)))throw new Error("invalid format: "+t);var e;return new co({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function co(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function uo(t){t:for(var e,r=t.length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;default:if(!+t[i])break t;o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}function po(t,e){var r=io(t,e);if(!r)return so=void 0,t.toPrecision(e);var i=r[0],o=r[1],n=o-(so=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=i.length;return n===a?i:n>a?i+new Array(n-a+1).join("0"):n>0?i.slice(0,n)+"."+i.slice(n):"0."+new Array(1-n).join("0")+io(t,Math.max(0,e+n-1))[0]}function go(t,e){var r=io(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}ho.prototype=co.prototype,co.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},r.dn(uo),r.dn(po),r.dn(go);const fo={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:ro,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>go(100*t,e),r:go,s:po,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function yo(t){return t}r.dn(yo),r.dn(wo);var mo,xo,Co,bo=Array.prototype.map,ko=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wo(t){var e=void 0===t.grouping||void 0===t.thousands?yo:no(bo.call(t.grouping,Number),t.thousands+""),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",n=void 0===t.numerals?yo:ao(bo.call(t.numerals,String)),a=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t,h){var c=(t=ho(t)).fill,d=t.align,u=t.sign,p=t.symbol,g=t.zero,f=t.width,y=t.comma,m=t.precision,x=t.trim,C=t.type;"n"===C?(y=!0,C="g"):fo[C]||(void 0===m&&(m=12),x=!0,C="g"),(g||"0"===c&&"="===d)&&(g=!0,c="0",d="=");var b=(h&&void 0!==h.prefix?h.prefix:"")+("$"===p?r:"#"===p&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),k=("$"===p?i:/[%p]/.test(C)?a:"")+(h&&void 0!==h.suffix?h.suffix:""),w=fo[C],S=/[defgprs%]/.test(C);function T(t){var r,i,a,h=b,p=k;if("c"===C)p=w(t)+p,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),m),x&&(t=uo(t)),T&&0===+t&&"+"!==u&&(T=!1),h=(T?"("===u?u:s:"-"===u||"("===u?"":u)+h,p=("s"!==C||isNaN(t)||void 0===so?"":ko[8+so/3])+p+(T&&"("===u?")":""),S)for(r=-1,i=t.length;++r<i;)if(48>(a=t.charCodeAt(r))||a>57){p=(46===a?o+t.slice(r+1):t.slice(r))+p,t=t.slice(0,r);break}}y&&!g&&(t=e(t,1/0));var v=h.length+t.length+p.length,B=v<f?new Array(f-v+1).join(c):"";switch(y&&g&&(t=e(B+t,B.length?f-p.length:1/0),B=""),d){case"<":t=h+t+p+B;break;case"=":t=h+B+t+p;break;case"^":t=B.slice(0,v=B.length>>1)+h+t+p+B.slice(v);break;default:t=B+h+t+p}return n(t)}return m=void 0===m?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),T.toString=function(){return t+""},T}return{format:h,formatPrefix:function(t,e){var r=3*Math.max(-8,Math.min(8,Math.floor(oo(e)/3))),i=Math.pow(10,-r),o=h(((t=ho(t)).type="f",t),{suffix:ko[8+r/3]});return function(t){return o(i*t)}}}}function So(t){var e=0,r=t.children,i=r&&r.length;if(i)for(;--i>=0;)e+=r[i].value;else e=1;t.value=e}function To(){return this.eachAfter(So)}function vo(t,e){let r=-1;for(const i of this)t.call(e,i,++r,this);return this}function Bo(t,e){for(var r,i,o=this,n=[o],a=-1;o=n.pop();)if(t.call(e,o,++a,this),r=o.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function _o(t,e){for(var r,i,o,n=this,a=[n],s=[],l=-1;n=a.pop();)if(s.push(n),r=n.children)for(i=0,o=r.length;i<o;++i)a.push(r[i]);for(;n=s.pop();)t.call(e,n,++l,this);return this}function Ao(t,e){let r=-1;for(const i of this)if(t.call(e,i,++r,this))return i}function Lo(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,o=i&&i.length;--o>=0;)r+=i[o].value;e.value=r})}function Fo(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function Mo(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),o=null;t=r.pop(),e=i.pop();for(;t===e;)o=t,t=r.pop(),e=i.pop();return o}(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;t!==r;)i.splice(o,0,t),t=t.parent;return i}function Eo(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function $o(){return Array.from(this)}function Oo(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function Io(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function*Do(){var t,e,r,i,o=this,n=[o];do{for(t=n.reverse(),n=[];o=t.pop();)if(yield o,e=o.children)for(r=0,i=e.length;r<i;++r)n.push(e[r])}while(n.length)}function qo(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=zo)):void 0===e&&(e=Ro);for(var r,i,o,n,a,s=new Po(t),l=[s];r=l.pop();)if((o=e(r.data))&&(a=(o=Array.from(o)).length))for(r.children=o,n=a-1;n>=0;--n)l.push(i=o[n]=new Po(o[n])),i.parent=r,i.depth=r.depth+1;return s.eachBefore(Ko)}function Ro(t){return t.children}function zo(t){return Array.isArray(t)?t[1]:null}function No(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Ko(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Po(t){this.data=t,this.depth=this.height=0,this.parent=null}function Wo(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)}function jo(t,e,r,i,o){for(var n,a=t.children,s=-1,l=a.length,h=t.value&&(i-e)/t.value;++s<l;)(n=a[s]).y0=r,n.y1=o,n.x0=e,n.x1=e+=n.value*h}function Ho(t,e,r,i,o){for(var n,a=t.children,s=-1,l=a.length,h=t.value&&(o-r)/t.value;++s<l;)(n=a[s]).x0=e,n.x1=i,n.y0=r,n.y1=r+=n.value*h}mo=wo({thousands:",",grouping:[3],currency:["$",""]}),xo=mo.format,Co=mo.formatPrefix,r.dn(To),r.dn(vo),r.dn(Bo),r.dn(_o),r.dn(Ao),r.dn(Lo),r.dn(Fo),r.dn(Mo),r.dn(Eo),r.dn($o),r.dn(Oo),r.dn(Io),r.dn(Do),Po.prototype=qo.prototype={constructor:Po,count:To,each:vo,eachAfter:_o,eachBefore:Bo,find:Ao,sum:Lo,sort:Fo,path:Mo,ancestors:Eo,descendants:$o,leaves:Oo,links:Io,copy:function(){return qo(this).eachBefore(No)},[Symbol.iterator]:Do},r.dn(Wo),r.dn(jo),r.dn(Ho);const Yo=function t(e){function r(t,r,i,o,n){!function(t,e,r,i,o,n){for(var a,s,l,h,c,d,u,p,g,f,y,m=[],x=e.children,C=0,b=0,k=x.length,w=e.value;C<k;){l=o-r,h=n-i;do{c=x[b++].value}while(!c&&b<k);for(d=u=c,y=c*c*(f=Math.max(h/l,l/h)/(w*t)),g=Math.max(u/y,y/d);b<k;++b){if(c+=s=x[b].value,s<d&&(d=s),s>u&&(u=s),y=c*c*f,(p=Math.max(u/y,y/d))>g){c-=s;break}g=p}m.push(a={value:c,dice:l<h,children:x.slice(C,b)}),a.dice?jo(a,r,i,o,w?i+=h*c/w:n):Ho(a,r,i,w?r+=l*c/w:o,n),w-=c,C=b}}(e,t,r,i,o,n)}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}((1+Math.sqrt(5))/2);function Uo(t){if("function"!=typeof t)throw new Error;return t}function Xo(){return 0}function Go(t){return function(){return t}}function Vo(){var t=Yo,e=!1,r=1,i=1,o=[0],n=Xo,a=Xo,s=Xo,l=Xo,h=Xo;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=i,t.eachBefore(d),o=[0],e&&t.eachBefore(Wo),t}function d(e){var r=o[e.depth],i=e.x0+r,c=e.y0+r,d=e.x1-r,u=e.y1-r;d<i&&(i=d=(i+d)/2),u<c&&(c=u=(c+u)/2),e.x0=i,e.y0=c,e.x1=d,e.y1=u,e.children&&(r=o[e.depth+1]=n(e)/2,i+=h(e)-r,c+=a(e)-r,(d-=s(e)-r)<i&&(i=d=(i+d)/2),(u-=l(e)-r)<c&&(c=u=(c+u)/2),t(e,i,c,d,u))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(r=+t[0],i=+t[1],c):[r,i]},c.tile=function(e){return arguments.length?(t=Uo(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(n="function"==typeof t?t:Go(+t),c):n},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:Go(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Go(+t),c):s},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:Go(+t),c):l},c.paddingLeft=function(t){return arguments.length?(h="function"==typeof t?t:Go(+t),c):h},c}r.dn(Go),r.dn(Vo);const Zo=Math.PI/180,Qo=180/Math.PI,Jo=.96422,tn=.82521,en=4/29,rn=6/29,on=3*rn*rn,nn=rn*rn*rn;function an(t){if(t instanceof sn)return new sn(t.l,t.a,t.b,t.opacity);if(t instanceof gn)return fn(t);t instanceof wr||(t=br(t));var e,r,i=dn(t.r),o=dn(t.g),n=dn(t.b),a=ln((.2225045*i+.7168786*o+.0606169*n)/1);return i===o&&o===n?e=r=a:(e=ln((.4360747*i+.3850649*o+.1430804*n)/Jo),r=ln((.0139322*i+.0971045*o+.7141733*n)/tn)),new sn(116*a-16,500*(e-a),200*(a-r),t.opacity)}function sn(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function ln(t){return t>nn?Math.pow(t,1/3):t/on+en}function hn(t){return t>rn?t*t*t:on*(t-en)}function cn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function dn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function un(t){if(t instanceof gn)return new gn(t.h,t.c,t.l,t.opacity);if(t instanceof sn||(t=an(t)),0===t.a&&0===t.b)return new gn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Qo;return new gn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function pn(t,e,r,i){return 1===arguments.length?un(t):new gn(t,e,r,i??1)}function gn(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function fn(t){if(isNaN(t.h))return new sn(t.l,0,0,t.opacity);var e=t.h*Zo;return new sn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function yn(t){return function(e,r){var i=t((e=pn(e)).h,(r=pn(r)).h),o=Nr(e.c,r.c),n=Nr(e.l,r.l),a=Nr(e.opacity,r.opacity);return function(t){return e.h=i(t),e.c=o(t),e.l=n(t),e.opacity=a(t),e+""}}}Je(sn,function(t,e,r,i){return 1===arguments.length?an(t):new sn(t,e,r,i??1)},tr(er,{brighter(t){return new sn(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new sn(this.l-18*(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 new wr(cn(3.1338561*(e=Jo*hn(e))-1.6168667*(t=1*hn(t))-.4906146*(r=tn*hn(r))),cn(-.9787684*e+1.9161415*t+.033454*r),cn(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),Je(gn,pn,tr(er,{brighter(t){return new gn(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new gn(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return fn(this).rgb()}}));const mn=yn(function(t,e){var r=e-t;return r?Rr(t,r>180||r<-180?r-360*Math.round(r/360):r):qr(isNaN(t)?e:t)});yn(Nr);function xn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class Cn extends Map{constructor(t,e=Sn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(bn(this,t))}has(t){return super.has(bn(this,t))}set(t,e){return super.set(kn(this,t),e)}delete(t){return super.delete(wn(this,t))}}Set;function bn({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function kn({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function wn({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function Sn(t){return null!==t&&"object"==typeof t?t.valueOf():t}const Tn=Symbol("implicit");function vn(){var t=new Cn,e=[],r=[],i=Tn;function o(o){let n=t.get(o);if(void 0===n){if(i!==Tn)return i;t.set(o,n=e.push(o)-1)}return r[n%r.length]}return o.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new Cn;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return o},o.range=function(t){return arguments.length?(r=Array.from(t),o):r.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return vn(e,r).unknown(i)},xn.apply(o,arguments),o}function Bn(){var t,e,r=vn().unknown(void 0),i=r.domain,o=r.range,n=0,a=1,s=!1,l=0,h=0,c=.5;function d(){var r=i().length,d=a<n,u=d?a:n,p=d?n:a;t=(p-u)/Math.max(1,r-l+2*h),s&&(t=Math.floor(t)),u+=(p-u-t*(r-l))*c,e=t*(1-l),s&&(u=Math.round(u),e=Math.round(e));var g=function(t,e,r){t=+t,e=+e,r=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+r;for(var i=-1,o=0|Math.max(0,Math.ceil((e-t)/r)),n=new Array(o);++i<o;)n[i]=t+i*r;return n}(r).map(function(e){return u+t*e});return o(d?g.reverse():g)}return delete r.unknown,r.domain=function(t){return arguments.length?(i(t),d()):i()},r.range=function(t){return arguments.length?([n,a]=t,n=+n,a=+a,d()):[n,a]},r.rangeRound=function(t){return[n,a]=t,n=+n,a=+a,s=!0,d()},r.bandwidth=function(){return e},r.step=function(){return t},r.round=function(t){return arguments.length?(s=!!t,d()):s},r.padding=function(t){return arguments.length?(l=Math.min(1,h=+t),d()):l},r.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),d()):l},r.paddingOuter=function(t){return arguments.length?(h=+t,d()):h},r.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),d()):c},r.copy=function(){return Bn(i(),[n,a]).round(s).paddingInner(l).paddingOuter(h).align(c)},xn.apply(d(),arguments)}const _n=Math.sqrt(50),An=Math.sqrt(10),Ln=Math.sqrt(2);function Fn(t,e,r){const i=(e-t)/Math.max(0,r),o=Math.floor(Math.log10(i)),n=i/Math.pow(10,o),a=n>=_n?10:n>=An?5:n>=Ln?2:1;let s,l,h;return o<0?(h=Math.pow(10,-o)/a,s=Math.round(t*h),l=Math.round(e*h),s/h<t&&++s,l/h>e&&--l,h=-h):(h=Math.pow(10,o)*a,s=Math.round(t/h),l=Math.round(e/h),s*h<t&&++s,l*h>e&&--l),l<s&&.5<=r&&r<2?Fn(t,e,2*r):[s,l,h]}function Mn(t,e,r){return Fn(t=+t,e=+e,r=+r)[2]}function En(t,e,r){r=+r;const i=(e=+e)<(t=+t),o=i?Mn(e,t,r):Mn(t,e,r);return(i?-1:1)*(o<0?1/-o:o)}function $n(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function On(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function In(t){let e,r,i;function o(t,i,o=0,n=t.length){if(o<n){if(0!==e(i,i))return n;do{const e=o+n>>>1;r(t[e],i)<0?o=e+1:n=e}while(o<n)}return o}return 2!==t.length?(e=$n,r=(e,r)=>$n(t(e),r),i=(e,r)=>t(e)-r):(e=t===$n||t===On?t:Dn,r=t,i=t),{left:o,center:function(t,e,r=0,n=t.length){const a=o(t,e,r,n-1);return a>r&&i(t[a-1],e)>-i(t[a],e)?a-1:a},right:function(t,i,o=0,n=t.length){if(o<n){if(0!==e(i,i))return n;do{const e=o+n>>>1;r(t[e],i)<=0?o=e+1:n=e}while(o<n)}return o}}}function Dn(){return 0}const qn=In($n),Rn=qn.right,zn=(qn.left,In(function(t){return null===t?NaN:+t}).center,Rn);function Nn(t,e){var r,i=e?e.length:0,o=t?Math.min(i,t.length):0,n=new Array(o),a=new Array(i);for(r=0;r<o;++r)n[r]=jn(t[r],e[r]);for(;r<i;++r)a[r]=e[r];return function(t){for(r=0;r<o;++r)a[r]=n[r](t);return a}}function Kn(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function Pn(t,e){var r,i={},o={};for(r in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)r in t?i[r]=jn(t[r],e[r]):o[r]=e[r];return function(t){for(r in i)o[r]=i[r](t);return o}}function Wn(t,e){e||(e=[]);var r,i=t?Math.min(e.length,t.length):0,o=e.slice();return function(n){for(r=0;r<i;++r)o[r]=t[r]*(1-n)+e[r]*n;return o}}function jn(t,e){var r,i,o=typeof e;return null==e||"boolean"===o?qr(e):("number"===o?Ke:"string"===o?(r=mr(e))?(e=r,Kr):Hr:e instanceof mr?Kr:e instanceof Date?Kn:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?Nn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Pn:Ke:Wn))(t,e)}function Hn(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function Yn(t){return+t}r.dn(function(t,e){return((void 0)(e)?void 0:Nn)(t,e)}),r.dn(Kn),r.dn(Pn),r.dn(Wn),r.dn(jn),r.dn(Hn);var Un=[0,1];function Xn(t){return t}function Gn(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:(r=isNaN(e)?NaN:.5,function(){return r});var r}function Vn(t,e,r){var i=t[0],o=t[1],n=e[0],a=e[1];return o<i?(i=Gn(o,i),n=r(a,n)):(i=Gn(i,o),n=r(n,a)),function(t){return n(i(t))}}function Zn(t,e,r){var i=Math.min(t.length,e.length)-1,o=new Array(i),n=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)o[a]=Gn(t[a],t[a+1]),n[a]=r(e[a],e[a+1]);return function(e){var r=zn(t,e,1,i)-1;return n[r](o[r](e))}}function Qn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Jn(){var t,e,r,i,o,n,a=Un,s=Un,l=jn,h=Xn;function c(){var t,e,r,l=Math.min(a.length,s.length);return h!==Xn&&(t=a[0],e=a[l-1],t>e&&(r=t,t=e,e=r),h=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?Zn:Vn,o=n=null,d}function d(e){return null==e||isNaN(e=+e)?r:(o||(o=i(a.map(t),s,l)))(t(h(e)))}return d.invert=function(r){return h(e((n||(n=i(s,a.map(t),Ke)))(r)))},d.domain=function(t){return arguments.length?(a=Array.from(t,Yn),c()):a.slice()},d.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},d.rangeRound=function(t){return s=Array.from(t),l=Hn,c()},d.clamp=function(t){return arguments.length?(h=!!t||Xn,c()):h!==Xn},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(r=t,d):r},function(r,i){return t=r,e=i,c()}}function ta(){return Jn()(Xn,Xn)}function ea(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(oo(e)/3)))-oo(Math.abs(t)))}function ra(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,oo(e)-oo(t))+1}function ia(t){return Math.max(0,-oo(Math.abs(t)))}function oa(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[o,n,a]=i?Fn(e,t,r):Fn(t,e,r);if(!(n>=o))return[];const s=n-o+1,l=new Array(s);if(i)if(a<0)for(let t=0;t<s;++t)l[t]=(n-t)/-a;else for(let t=0;t<s;++t)l[t]=(n-t)*a;else if(a<0)for(let t=0;t<s;++t)l[t]=(o+t)/-a;else for(let t=0;t<s;++t)l[t]=(o+t)*a;return l}(r[0],r[r.length-1],t??10)},t.tickFormat=function(t,r){var i=e();return function(t,e,r,i){var o,n=En(t,e,r);switch((i=ho(i??",f")).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(o=ea(n,a))||(i.precision=o),Co(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=ra(n,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=ia(n))||(i.precision=o-2*("%"===i.type))}return xo(i)}(i[0],i[i.length-1],t??10,r)},t.nice=function(r){null==r&&(r=10);var i,o,n=e(),a=0,s=n.length-1,l=n[a],h=n[s],c=10;for(h<l&&(o=l,l=h,h=o,o=a,a=s,s=o);c-- >0;){if((o=Mn(l,h,r))===i)return n[a]=l,n[s]=h,e(n);if(o>0)l=Math.floor(l/o)*o,h=Math.ceil(h/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,h=Math.floor(h*o)/o}i=o}return t},t}function na(){var t=ta();return t.copy=function(){return Qn(t,na())},xn.apply(t,arguments),oa(t)}r.dn(ea),r.dn(ra),r.dn(ia);const aa=36e5,sa=864e5,la=6048e5,ha=2592e6,ca=31536e6,da=new Date,ua=new Date;function pa(t,e,r,i){function o(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return o.floor=e=>(t(e=new Date(+e)),e),o.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),o.round=t=>{const e=o(t),r=o.ceil(t);return t-e<r-t?e:r},o.offset=(t,r)=>(e(t=new Date(+t),null==r?1:Math.floor(r)),t),o.range=(r,i,n)=>{const a=[];if(r=o.ceil(r),n=null==n?1:Math.floor(n),!(r<i&&n>0))return a;let s;do{a.push(s=new Date(+r)),e(r,n),t(r)}while(s<r&&r<i);return a},o.filter=r=>pa(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}),r&&(o.count=(e,i)=>(da.setTime(+e),ua.setTime(+i),t(da),t(ua),Math.floor(r(da,ua))),o.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(i?e=>i(e)%t===0:e=>o.count(0,e)%t===0):o:null)),o}const ga=pa(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ga.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?pa(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):ga:null);ga.range;const fa=pa(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),ya=(fa.range,pa(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes())),ma=(ya.range,pa(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())),xa=(ma.range,pa(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+e*aa)},(t,e)=>(e-t)/aa,t=>t.getHours())),Ca=(xa.range,pa(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*aa)},(t,e)=>(e-t)/aa,t=>t.getUTCHours())),ba=(Ca.range,pa(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/sa,t=>t.getDate()-1)),ka=(ba.range,pa(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/sa,t=>t.getUTCDate()-1)),wa=(ka.range,pa(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/sa,t=>Math.floor(t/sa)));wa.range;function Sa(t){return pa(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/la)}const Ta=Sa(0),va=Sa(1),Ba=Sa(2),_a=Sa(3),Aa=Sa(4),La=Sa(5),Fa=Sa(6);Ta.range,va.range,Ba.range,_a.range,Aa.range,La.range,Fa.range;function Ma(t){return pa(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/la)}const Ea=Ma(0),$a=Ma(1),Oa=Ma(2),Ia=Ma(3),Da=Ma(4),qa=Ma(5),Ra=Ma(6),za=(Ea.range,$a.range,Oa.range,Ia.range,Da.range,qa.range,Ra.range,pa(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())),Na=(za.range,pa(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())),Ka=(Na.range,pa(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()));Ka.every=t=>isFinite(t=Math.floor(t))&&t>0?pa(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)}):null;Ka.range;const Pa=pa(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());Pa.every=t=>isFinite(t=Math.floor(t))&&t>0?pa(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)}):null;Pa.range;function Wa(t,e,r,i,o,n){const a=[[fa,1,1e3],[fa,5,5e3],[fa,15,15e3],[fa,30,3e4],[n,1,6e4],[n,5,3e5],[n,15,9e5],[n,30,18e5],[o,1,aa],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,sa],[i,2,1728e5],[r,1,la],[e,1,ha],[e,3,7776e6],[t,1,ca]];function s(e,r,i){const o=Math.abs(r-e)/i,n=In(([,,t])=>t).right(a,o);if(n===a.length)return t.every(En(e/ca,r/ca,i));if(0===n)return ga.every(Math.max(En(e,r,i),1));const[s,l]=a[o/a[n-1][2]<a[n][2]/o?n-1:n];return s.every(l)}return[function(t,e,r){const i=e<t;i&&([t,e]=[e,t]);const o=r&&"function"==typeof r.range?r:s(t,e,r),n=o?o.range(t,+e+1):[];return i?n.reverse():n},s]}const[ja,Ha]=Wa(Pa,Na,Ea,wa,Ca,ma),[Ya,Ua]=Wa(Ka,za,Ta,ba,xa,ya);function Xa(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Ga(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Va(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var Za,Qa,Ja={"-":"",_:" ",0:"0"},ts=/^\s*\d+/,es=/^%/,rs=/[\\^$*+?|[\]().{}]/g;function is(t,e,r){var i=t<0?"-":"",o=(i?-t:t)+"",n=o.length;return i+(n<r?new Array(r-n+1).join(e)+o:o)}function os(t){return t.replace(rs,"\\$&")}function ns(t){return new RegExp("^(?:"+t.map(os).join("|")+")","i")}function as(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function ss(t,e,r){var i=ts.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function ls(t,e,r){var i=ts.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function hs(t,e,r){var i=ts.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function cs(t,e,r){var i=ts.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function ds(t,e,r){var i=ts.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function us(t,e,r){var i=ts.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function ps(t,e,r){var i=ts.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function gs(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}function fs(t,e,r){var i=ts.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function ys(t,e,r){var i=ts.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function ms(t,e,r){var i=ts.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function xs(t,e,r){var i=ts.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function Cs(t,e,r){var i=ts.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function bs(t,e,r){var i=ts.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function ks(t,e,r){var i=ts.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function ws(t,e,r){var i=ts.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function Ss(t,e,r){var i=ts.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Ts(t,e,r){var i=es.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function vs(t,e,r){var i=ts.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Bs(t,e,r){var i=ts.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function _s(t,e){return is(t.getDate(),e,2)}function As(t,e){return is(t.getHours(),e,2)}function Ls(t,e){return is(t.getHours()%12||12,e,2)}function Fs(t,e){return is(1+ba.count(Ka(t),t),e,3)}function Ms(t,e){return is(t.getMilliseconds(),e,3)}function Es(t,e){return Ms(t,e)+"000"}function $s(t,e){return is(t.getMonth()+1,e,2)}function Os(t,e){return is(t.getMinutes(),e,2)}function Is(t,e){return is(t.getSeconds(),e,2)}function Ds(t){var e=t.getDay();return 0===e?7:e}function qs(t,e){return is(Ta.count(Ka(t)-1,t),e,2)}function Rs(t){var e=t.getDay();return e>=4||0===e?Aa(t):Aa.ceil(t)}function zs(t,e){return t=Rs(t),is(Aa.count(Ka(t),t)+(4===Ka(t).getDay()),e,2)}function Ns(t){return t.getDay()}function Ks(t,e){return is(va.count(Ka(t)-1,t),e,2)}function Ps(t,e){return is(t.getFullYear()%100,e,2)}function Ws(t,e){return is((t=Rs(t)).getFullYear()%100,e,2)}function js(t,e){return is(t.getFullYear()%1e4,e,4)}function Hs(t,e){var r=t.getDay();return is((t=r>=4||0===r?Aa(t):Aa.ceil(t)).getFullYear()%1e4,e,4)}function Ys(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+is(e/60|0,"0",2)+is(e%60,"0",2)}function Us(t,e){return is(t.getUTCDate(),e,2)}function Xs(t,e){return is(t.getUTCHours(),e,2)}function Gs(t,e){return is(t.getUTCHours()%12||12,e,2)}function Vs(t,e){return is(1+ka.count(Pa(t),t),e,3)}function Zs(t,e){return is(t.getUTCMilliseconds(),e,3)}function Qs(t,e){return Zs(t,e)+"000"}function Js(t,e){return is(t.getUTCMonth()+1,e,2)}function tl(t,e){return is(t.getUTCMinutes(),e,2)}function el(t,e){return is(t.getUTCSeconds(),e,2)}function rl(t){var e=t.getUTCDay();return 0===e?7:e}function il(t,e){return is(Ea.count(Pa(t)-1,t),e,2)}function ol(t){var e=t.getUTCDay();return e>=4||0===e?Da(t):Da.ceil(t)}function nl(t,e){return t=ol(t),is(Da.count(Pa(t),t)+(4===Pa(t).getUTCDay()),e,2)}function al(t){return t.getUTCDay()}function sl(t,e){return is($a.count(Pa(t)-1,t),e,2)}function ll(t,e){return is(t.getUTCFullYear()%100,e,2)}function hl(t,e){return is((t=ol(t)).getUTCFullYear()%100,e,2)}function cl(t,e){return is(t.getUTCFullYear()%1e4,e,4)}function dl(t,e){var r=t.getUTCDay();return is((t=r>=4||0===r?Da(t):Da.ceil(t)).getUTCFullYear()%1e4,e,4)}function ul(){return"+0000"}function pl(){return"%"}function gl(t){return+t}function fl(t){return Math.floor(+t/1e3)}function yl(t){return new Date(t)}function ml(t){return t instanceof Date?+t:+new Date(+t)}function xl(t,e,r,i,o,n,a,s,l,h){var c=ta(),d=c.invert,u=c.domain,p=h(".%L"),g=h(":%S"),f=h("%I:%M"),y=h("%I %p"),m=h("%a %d"),x=h("%b %d"),C=h("%B"),b=h("%Y");function k(t){return(l(t)<t?p:s(t)<t?g:a(t)<t?f:n(t)<t?y:i(t)<t?o(t)<t?m:x:r(t)<t?C:b)(t)}return c.invert=function(t){return new Date(d(t))},c.domain=function(t){return arguments.length?u(Array.from(t,ml)):u().map(yl)},c.ticks=function(e){var r=u();return t(r[0],r[r.length-1],e??10)},c.tickFormat=function(t,e){return null==e?k:h(e)},c.nice=function(t){var r=u();return t&&"function"==typeof t.range||(t=e(r[0],r[r.length-1],t??10)),t?u(function(t,e){var r,i=0,o=(t=t.slice()).length-1,n=t[i],a=t[o];return a<n&&(r=i,i=o,o=r,r=n,n=a,a=r),t[i]=e.floor(n),t[o]=e.ceil(a),t}(r,t)):c},c.copy=function(){return Qn(c,xl(t,e,r,i,o,n,a,s,l,h))},c}function Cl(){return xn.apply(xl(Ya,Ua,Ka,za,Ta,ba,xa,ya,fa,Qa).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bl(t){for(var e=t.length/6|0,r=new Array(e),i=0;i<e;)r[i]="#"+t.slice(6*i,6*++i);return r}!function(t){Za=function(t){var e=t.dateTime,r=t.date,i=t.time,o=t.periods,n=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,h=ns(o),c=as(o),d=ns(n),u=as(n),p=ns(a),g=as(a),f=ns(s),y=as(s),m=ns(l),x=as(l),C={a:function(t){return a[t.getDay()]},A:function(t){return n[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:_s,e:_s,f:Es,g:Ws,G:Hs,H:As,I:Ls,j:Fs,L:Ms,m:$s,M:Os,p:function(t){return o[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:gl,s:fl,S:Is,u:Ds,U:qs,V:zs,w:Ns,W:Ks,x:null,X:null,y:Ps,Y:js,Z:Ys,"%":pl},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return n[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Us,e:Us,f:Qs,g:hl,G:dl,H:Xs,I:Gs,j:Vs,L:Zs,m:Js,M:tl,p:function(t){return o[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:gl,s:fl,S:el,u:rl,U:il,V:nl,w:al,W:sl,x:null,X:null,y:ll,Y:cl,Z:ul,"%":pl},k={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=g.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=d.exec(e.slice(r));return i?(t.w=u.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=x.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=f.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return T(t,e,r,i)},d:ms,e:ms,f:Ss,g:ps,G:us,H:Cs,I:Cs,j:xs,L:ws,m:ys,M:bs,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:fs,Q:vs,s:Bs,S:ks,u:ls,U:hs,V:cs,w:ss,W:ds,x:function(t,e,i){return T(t,r,e,i)},X:function(t,e,r){return T(t,i,e,r)},y:ps,Y:us,Z:gs,"%":Ts};function w(t,e){return function(r){var i,o,n,a=[],s=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++s<h;)37===t.charCodeAt(s)&&(a.push(t.slice(l,s)),null!=(o=Ja[i=t.charAt(++s)])?i=t.charAt(++s):o="e"===i?" ":"0",(n=e[i])&&(i=n(r,o)),a.push(i),l=s+1);return a.push(t.slice(l,s)),a.join("")}}function S(t,e){return function(r){var i,o,n=Va(1900,void 0,1);if(T(n,t,r+="",0)!=r.length)return null;if("Q"in n)return new Date(n.Q);if("s"in n)return new Date(1e3*n.s+("L"in n?n.L:0));if(e&&!("Z"in n)&&(n.Z=0),"p"in n&&(n.H=n.H%12+12*n.p),void 0===n.m&&(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?(o=(i=Ga(Va(n.y,0,1))).getUTCDay(),i=o>4||0===o?$a.ceil(i):$a(i),i=ka.offset(i,7*(n.V-1)),n.y=i.getUTCFullYear(),n.m=i.getUTCMonth(),n.d=i.getUTCDate()+(n.w+6)%7):(o=(i=Xa(Va(n.y,0,1))).getDay(),i=o>4||0===o?va.ceil(i):va(i),i=ba.offset(i,7*(n.V-1)),n.y=i.getFullYear(),n.m=i.getMonth(),n.d=i.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),o="Z"in n?Ga(Va(n.y,0,1)).getUTCDay():Xa(Va(n.y,0,1)).getDay(),n.m=0,n.d="W"in n?(n.w+6)%7+7*n.W-(o+5)%7:n.w+7*n.U-(o+6)%7);return"Z"in n?(n.H+=n.Z/100|0,n.M+=n.Z%100,Ga(n)):Xa(n)}}function T(t,e,r,i){for(var o,n,a=0,s=e.length,l=r.length;a<s;){if(i>=l)return-1;if(37===(o=e.charCodeAt(a++))){if(o=e.charAt(a++),!(n=k[o in Ja?e.charAt(a++):o])||(i=n(t,r,i))<0)return-1}else if(o!=r.charCodeAt(i++))return-1}return i}return C.x=w(r,C),C.X=w(i,C),C.c=w(e,C),b.x=w(r,b),b.X=w(i,b),b.c=w(e,b),{format:function(t){var e=w(t+="",C);return e.toString=function(){return t},e},parse:function(t){var e=S(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=S(t+="",!0);return e.toString=function(){return t},e}}}(t),Qa=Za.format,Za.parse,Za.utcFormat,Za.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),r.dn(bl);const kl=bl("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function wl(t){return"string"==typeof t?new ae([[document.querySelector(t)]],[document.documentElement]):new ae([[t]],ne)}function Sl(t){return function(){return t}}r.dn(wl),r.dn(Sl);const Tl=Math.abs,vl=Math.atan2,Bl=Math.cos,_l=Math.max,Al=Math.min,Ll=Math.sin,Fl=Math.sqrt,Ml=Math.PI,El=Ml/2,$l=2*Ml;function Ol(t){return t>=1?El:t<=-1?-El:Math.asin(t)}const Il=Math.PI,Dl=2*Il,ql=1e-6,Rl=Dl-ql;function zl(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class Nl{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?zl:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return zl;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,o,n){this._append`C${+t},${+e},${+r},${+i},${this._x1=+o},${this._y1=+n}`}arcTo(t,e,r,i,o){if(t=+t,e=+e,r=+r,i=+i,(o=+o)<0)throw new Error(`negative radius: ${o}`);let n=this._x1,a=this._y1,s=r-t,l=i-e,h=n-t,c=a-e,d=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(d>ql)if(Math.abs(c*s-l*h)>ql&&o){let u=r-n,p=i-a,g=s*s+l*l,f=u*u+p*p,y=Math.sqrt(g),m=Math.sqrt(d),x=o*Math.tan((Il-Math.acos((g+d-f)/(2*y*m)))/2),C=x/m,b=x/y;Math.abs(C-1)>ql&&this._append`L${t+C*h},${e+C*c}`,this._append`A${o},${o},0,0,${+(c*u>h*p)},${this._x1=t+b*s},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,i,o,n){if(t=+t,e=+e,n=!!n,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),s=r*Math.sin(i),l=t+a,h=e+s,c=1^n,d=n?i-o:o-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>ql||Math.abs(this._y1-h)>ql)&&this._append`L${l},${h}`,r&&(d<0&&(d=d%Dl+Dl),d>Rl?this._append`A${r},${r},0,1,${c},${t-a},${e-s}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:d>ql&&this._append`A${r},${r},0,${+(d>=Il)},${c},${this._x1=t+r*Math.cos(o)},${this._y1=e+r*Math.sin(o)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Kl(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Nl(e)}function Pl(t){return t.innerRadius}function Wl(t){return t.outerRadius}function jl(t){return t.startAngle}function Hl(t){return t.endAngle}function Yl(t){return t&&t.padAngle}function Ul(t,e,r,i,o,n,a){var s=t-r,l=e-i,h=(a?n:-n)/Fl(s*s+l*l),c=h*l,d=-h*s,u=t+c,p=e+d,g=r+c,f=i+d,y=(u+g)/2,m=(p+f)/2,x=g-u,C=f-p,b=x*x+C*C,k=o-n,w=u*f-g*p,S=(C<0?-1:1)*Fl(_l(0,k*k*b-w*w)),T=(w*C-x*S)/b,v=(-w*x-C*S)/b,B=(w*C+x*S)/b,_=(-w*x+C*S)/b,A=T-y,L=v-m,F=B-y,M=_-m;return A*A+L*L>F*F+M*M&&(T=B,v=_),{cx:T,cy:v,x01:-c,y01:-d,x11:T*(o/k-1),y11:v*(o/k-1)}}function Xl(){var t=Pl,e=Wl,r=Sl(0),i=null,o=jl,n=Hl,a=Yl,s=null,l=Kl(h);function h(){var h,c,d,u=+t.apply(this,arguments),p=+e.apply(this,arguments),g=o.apply(this,arguments)-El,f=n.apply(this,arguments)-El,y=Tl(f-g),m=f>g;if(s||(s=h=l()),p<u&&(c=p,p=u,u=c),p>1e-12)if(y>$l-1e-12)s.moveTo(p*Bl(g),p*Ll(g)),s.arc(0,0,p,g,f,!m),u>1e-12&&(s.moveTo(u*Bl(f),u*Ll(f)),s.arc(0,0,u,f,g,m));else{var x,C,b=g,k=f,w=g,S=f,T=y,v=y,B=a.apply(this,arguments)/2,_=B>1e-12&&(i?+i.apply(this,arguments):Fl(u*u+p*p)),A=Al(Tl(p-u)/2,+r.apply(this,arguments)),L=A,F=A;if(_>1e-12){var M=Ol(_/u*Ll(B)),E=Ol(_/p*Ll(B));(T-=2*M)>1e-12?(w+=M*=m?1:-1,S-=M):(T=0,w=S=(g+f)/2),(v-=2*E)>1e-12?(b+=E*=m?1:-1,k-=E):(v=0,b=k=(g+f)/2)}var $=p*Bl(b),O=p*Ll(b),I=u*Bl(S),D=u*Ll(S);if(A>1e-12){var q,R=p*Bl(k),z=p*Ll(k),N=u*Bl(w),K=u*Ll(w);if(y<Ml)if(q=function(t,e,r,i,o,n,a,s){var l=r-t,h=i-e,c=a-o,d=s-n,u=d*l-c*h;if(!(u*u<1e-12))return[t+(u=(c*(e-n)-d*(t-o))/u)*l,e+u*h]}($,O,N,K,R,z,I,D)){var P=$-q[0],W=O-q[1],j=R-q[0],H=z-q[1],Y=1/Ll(((d=(P*j+W*H)/(Fl(P*P+W*W)*Fl(j*j+H*H)))>1?0:d<-1?Ml:Math.acos(d))/2),U=Fl(q[0]*q[0]+q[1]*q[1]);L=Al(A,(u-U)/(Y-1)),F=Al(A,(p-U)/(Y+1))}else L=F=0}v>1e-12?F>1e-12?(x=Ul(N,K,$,O,p,F,m),C=Ul(R,z,I,D,p,F,m),s.moveTo(x.cx+x.x01,x.cy+x.y01),F<A?s.arc(x.cx,x.cy,F,vl(x.y01,x.x01),vl(C.y01,C.x01),!m):(s.arc(x.cx,x.cy,F,vl(x.y01,x.x01),vl(x.y11,x.x11),!m),s.arc(0,0,p,vl(x.cy+x.y11,x.cx+x.x11),vl(C.cy+C.y11,C.cx+C.x11),!m),s.arc(C.cx,C.cy,F,vl(C.y11,C.x11),vl(C.y01,C.x01),!m))):(s.moveTo($,O),s.arc(0,0,p,b,k,!m)):s.moveTo($,O),u>1e-12&&T>1e-12?L>1e-12?(x=Ul(I,D,R,z,u,-L,m),C=Ul($,O,N,K,u,-L,m),s.lineTo(x.cx+x.x01,x.cy+x.y01),L<A?s.arc(x.cx,x.cy,L,vl(x.y01,x.x01),vl(C.y01,C.x01),!m):(s.arc(x.cx,x.cy,L,vl(x.y01,x.x01),vl(x.y11,x.x11),!m),s.arc(0,0,u,vl(x.cy+x.y11,x.cx+x.x11),vl(C.cy+C.y11,C.cx+C.x11),m),s.arc(C.cx,C.cy,L,vl(C.y11,C.x11),vl(C.y01,C.x01),!m))):s.arc(0,0,u,S,w,m):s.lineTo(I,D)}else s.moveTo(0,0);if(s.closePath(),h)return s=null,h+""||null}return h.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+o.apply(this,arguments)+ +n.apply(this,arguments))/2-Ml/2;return[Bl(i)*r,Ll(i)*r]},h.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Sl(+e),h):t},h.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Sl(+t),h):e},h.cornerRadius=function(t){return arguments.length?(r="function"==typeof t?t:Sl(+t),h):r},h.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Sl(+t),h):i},h.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:Sl(+t),h):o},h.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:Sl(+t),h):n},h.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Sl(+t),h):a},h.context=function(t){return arguments.length?(s=t??null,h):s},h}r.dn(Xl),r.dn(Gl);Array.prototype.slice;function Gl(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Vl(t){this._context=t}function Zl(t){return new Vl(t)}function Ql(t){return t[0]}function Jl(t){return t[1]}function th(t,e){var r=Sl(!0),i=null,o=Zl,n=null,a=Kl(s);function s(s){var l,h,c,d=(s=Gl(s)).length,u=!1;for(null==i&&(n=o(c=a())),l=0;l<=d;++l)!(l<d&&r(h=s[l],l,s))===u&&((u=!u)?n.lineStart():n.lineEnd()),u&&n.point(+t(h,l,s),+e(h,l,s));if(c)return n=null,c+""||null}return t="function"==typeof t?t:void 0===t?Ql:Sl(t),e="function"==typeof e?e:void 0===e?Jl:Sl(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:Sl(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Sl(+t),s):e},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:Sl(!!t),s):r},s.curve=function(t){return arguments.length?(o=t,null!=i&&(n=o(i)),s):o},s.context=function(t){return arguments.length?(null==t?i=n=null:n=o(i=t),s):i},s}function eh(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function rh(t){return t}function ih(){var t=rh,e=eh,r=null,i=Sl(0),o=Sl($l),n=Sl(0);function a(a){var s,l,h,c,d,u=(a=Gl(a)).length,p=0,g=new Array(u),f=new Array(u),y=+i.apply(this,arguments),m=Math.min($l,Math.max(-$l,o.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/u,n.apply(this,arguments)),C=x*(m<0?-1:1);for(s=0;s<u;++s)(d=f[g[s]=s]=+t(a[s],s,a))>0&&(p+=d);for(null!=e?g.sort(function(t,r){return e(f[t],f[r])}):null!=r&&g.sort(function(t,e){return r(a[t],a[e])}),s=0,h=p?(m-u*C)/p:0;s<u;++s,y=c)l=g[s],c=y+((d=f[l])>0?d*h:0)+C,f[l]={data:a[l],index:s,value:d,startAngle:y,endAngle:c,padAngle:x};return f}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Sl(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,r=null,a):e},a.sort=function(t){return arguments.length?(r=t,e=null,a):r},a.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Sl(+t),a):i},a.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Sl(+t),a):o},a.padAngle=function(t){return arguments.length?(n="function"==typeof t?t:Sl(+t),a):n},a}function oh(){}function nh(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)}function ah(t){this._context=t}function sh(t){return new ah(t)}function lh(t){this._context=t}function hh(t){return new lh(t)}function ch(t){this._context=t}function dh(t){return new ch(t)}r.dn(Zl),Vl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},r.dn(th),r.dn(eh),r.dn(rh),r.dn(ih),r.dn(oh),r.dn(sh),ah.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:nh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:nh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},r.dn(hh),lh.prototype={areaStart:oh,areaEnd:oh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:nh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},r.dn(dh),ch.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var 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:nh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class uh{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function ph(t){return new uh(t,!0)}function gh(t){return new uh(t,!1)}function fh(t,e){this._basis=new ah(t),this._beta=e}fh.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,o=t[0],n=e[0],a=t[r]-o,s=e[r]-n,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+i*a),this._beta*e[l]+(1-this._beta)*(n+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const yh=function t(e){function r(t){return 1===e?new ah(t):new fh(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function mh(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)}function xh(t,e){this._context=t,this._k=(1-e)/6}xh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:mh(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:mh(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ch=function t(e){function r(t){return new xh(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bh(t,e){this._context=t,this._k=(1-e)/6}bh.prototype={areaStart:oh,areaEnd:oh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:mh(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const kh=function t(e){function r(t){return new bh(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wh(t,e){this._context=t,this._k=(1-e)/6}wh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:mh(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Sh=function t(e){function r(t){return new wh(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Th(t,e,r){var i=t._x1,o=t._y1,n=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*h+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,o,n,a,t._x2,t._y2)}function vh(t,e){this._context=t,this._alpha=e}vh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var 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:Th(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Bh=function t(e){function r(t){return e?new vh(t,e):new xh(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function _h(t,e){this._context=t,this._alpha=e}_h.prototype={areaStart:oh,areaEnd:oh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var 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:Th(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ah=function t(e){function r(t){return e?new _h(t,e):new bh(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lh(t,e){this._context=t,this._alpha=e}Lh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var 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:Th(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Fh=function t(e){function r(t){return e?new Lh(t,e):new wh(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Mh(t){this._context=t}function Eh(t){return new Mh(t)}function $h(t){return t<0?-1:1}function Oh(t,e,r){var i=t._x1-t._x0,o=e-t._x1,n=(t._y1-t._y0)/(i||o<0&&-0),a=(r-t._y1)/(o||i<0&&-0),s=(n*o+a*i)/(i+o);return($h(n)+$h(a))*Math.min(Math.abs(n),Math.abs(a),.5*Math.abs(s))||0}function Ih(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Dh(t,e,r){var i=t._x0,o=t._y0,n=t._x1,a=t._y1,s=(n-i)/3;t._context.bezierCurveTo(i+s,o+s*e,n-s,a-s*r,n,a)}function qh(t){this._context=t}function Rh(t){this._context=new zh(t)}function zh(t){this._context=t}function Nh(t){return new qh(t)}function Kh(t){return new Rh(t)}function Ph(t){this._context=t}function Wh(t){var e,r,i=t.length-1,o=new Array(i),n=new Array(i),a=new Array(i);for(o[0]=0,n[0]=2,a[0]=t[0]+2*t[1],e=1;e<i-1;++e)o[e]=1,n[e]=4,a[e]=4*t[e]+2*t[e+1];for(o[i-1]=2,n[i-1]=7,a[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=o[e]/n[e-1],n[e]-=r,a[e]-=r*a[e-1];for(o[i-1]=a[i-1]/n[i-1],e=i-2;e>=0;--e)o[e]=(a[e]-o[e+1])/n[e];for(n[i-1]=(t[i]+o[i-1])/2,e=0;e<i-1;++e)n[e]=2*t[e+1]-o[e+1];return[o,n]}function jh(t){return new Ph(t)}function Hh(t,e){this._context=t,this._t=e}function Yh(t){return new Hh(t,.5)}function Uh(t){return new Hh(t,0)}function Xh(t){return new Hh(t,1)}function Gh(t,e,r){this.k=t,this.x=e,this.y=r}r.dn(Eh),Mh.prototype={areaStart:oh,areaEnd:oh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},qh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Dh(this,this._t0,Ih(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Dh(this,Ih(this,r=Oh(this,t,e)),r);break;default:Dh(this,this._t0,r=Oh(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Rh.prototype=Object.create(qh.prototype)).point=function(t,e){qh.prototype.point.call(this,e,t)},zh.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,o,n){this._context.bezierCurveTo(e,t,i,r,n,o)}},r.dn(jh),Ph.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=Wh(t),o=Wh(e),n=0,a=1;a<r;++n,++a)this._context.bezierCurveTo(i[0][n],o[0][n],i[1][n],o[1][n],t[a],e[a]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},r.dn(Yh),Hh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},Gh.prototype={constructor:Gh,scale:function(t){return 1===t?this:new Gh(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Gh(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Vh,Zh,Qh,Jh,tc,ec,rc,ic;new Gh(1,0,0);function oc(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function nc(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function ac(){return this.__zoom||tc}function sc(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function lc(){return navigator.maxTouchPoints||"ontouchstart"in this}function hc(t,e,r){var i=t.invertX(e[0][0])-r[0][0],o=t.invertX(e[1][0])-r[1][0],n=t.invertY(e[0][1])-r[0][1],a=t.invertY(e[1][1])-r[1][1];return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a))}Gh.prototype,r.dn(function(){var t,e,r,i=oc,o=nc,n=hc,a=sc,s=lc,l=[0,1/0],h=[[-1/0,-1/0],[1/0,1/0]],c=250,d=void 0,u=(void 0)("start","zoom","end"),p=0,g=10;function f(t){t.property("__zoom",ac).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",T).filter(s).on("touchstart.zoom",v).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",_).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new ec(e,t.x,t.y)}function m(t,e,r){var i=e[0]-r[0]*t.k,o=e[1]-r[1]*t.k;return i===t.x&&o===t.y?t:new ec(t.k,i,o)}function x(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function C(t,e,r,i){t.on("start.zoom",function(){b(this,arguments).event(i).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(i).end()}).tween("zoom",function(){var t=this,n=arguments,a=b(t,n).event(i),s=o.apply(t,n),l=null==r?x(s):"function"==typeof r?r.apply(t,n):r,h=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),c=t.__zoom,u="function"==typeof e?e.apply(t,n):e,p=d(c.invert(l).concat(h/c.k),u.invert(l).concat(h/u.k));return function(t){if(1===t)t=u;else{var e=p(t),r=h/e[2];t=new ec(r,l[0]-e[0]*r,l[1]-e[1]*r)}a.zoom(null,t)}})}function b(t,e,r){return!r&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=o.apply(t,e),this.taps=0}function w(t,...e){if(i.apply(this,arguments)){var r=b(this,e).event(t),o=this.__zoom,s=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,a.apply(this,arguments)))),c=Vh(t);if(r.wheel)r.mouse[0][0]===c[0]&&r.mouse[0][1]===c[1]||(r.mouse[1]=o.invert(r.mouse[0]=c)),clearTimeout(r.wheel);else{if(o.k===s)return;r.mouse=[c,o.invert(c)],Qh(this),r.start()}rc(t),r.wheel=setTimeout(function(){r.wheel=null,r.end()},150),r.zoom("mouse",n(m(y(o,s),r.mouse[0],r.mouse[1]),r.extent,h))}}function S(t,...e){if(!r&&i.apply(this,arguments)){var o=t.currentTarget,a=b(this,e,!0).event(t),s=Zh(t.view).on("mousemove.zoom",function(t){if(rc(t),!a.moved){var e=t.clientX-c,r=t.clientY-d;a.moved=e*e+r*r>p}a.event(t).zoom("mouse",n(m(a.that.__zoom,a.mouse[0]=Vh(t,o),a.mouse[1]),a.extent,h))},!0).on("mouseup.zoom",function(t){s.on("mousemove.zoom mouseup.zoom",null),(void 0)(t.view,a.moved),rc(t),a.event(t).end()},!0),l=Vh(t,o),c=t.clientX,d=t.clientY;(void 0)(t.view),ic(t),a.mouse=[l,this.__zoom.invert(l)],Qh(this),a.start()}}function T(t,...e){if(i.apply(this,arguments)){var r=this.__zoom,a=Vh(t.changedTouches?t.changedTouches[0]:t,this),s=r.invert(a),l=r.k*(t.shiftKey?.5:2),d=n(m(y(r,l),a,s),o.apply(this,e),h);rc(t),c>0?Zh(this).transition().duration(c).call(C,d,a,t):Zh(this).call(f.transform,d,a,t)}}function v(r,...o){if(i.apply(this,arguments)){var n,a,s,l,h=r.touches,c=h.length,d=b(this,o,r.changedTouches.length===c).event(r);for(ic(r),a=0;a<c;++a)s=h[a],l=[l=Vh(s,this),this.__zoom.invert(l),s.identifier],d.touch0?d.touch1||d.touch0[2]===l[2]||(d.touch1=l,d.taps=0):(d.touch0=l,n=!0,d.taps=1+!!t);t&&(t=clearTimeout(t)),n&&(d.taps<2&&(e=l[0],t=setTimeout(function(){t=null},500)),Qh(this),d.start())}}function B(t,...e){if(this.__zooming){var r,i,o,a,s=b(this,e).event(t),l=t.changedTouches,c=l.length;for(rc(t),r=0;r<c;++r)i=l[r],o=Vh(i,this),s.touch0&&s.touch0[2]===i.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===i.identifier&&(s.touch1[0]=o);if(i=s.that.__zoom,s.touch1){var d=s.touch0[0],u=s.touch0[1],p=s.touch1[0],g=s.touch1[1],f=(f=p[0]-d[0])*f+(f=p[1]-d[1])*f,x=(x=g[0]-u[0])*x+(x=g[1]-u[1])*x;i=y(i,Math.sqrt(f/x)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],a=[(u[0]+g[0])/2,(u[1]+g[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],a=s.touch0[1]}s.zoom("touch",n(m(i,o,a),s.extent,h))}}function _(t,...i){if(this.__zooming){var o,n,a=b(this,i).event(t),s=t.changedTouches,l=s.length;for(ic(t),r&&clearTimeout(r),r=setTimeout(function(){r=null},500),o=0;o<l;++o)n=s[o],a.touch0&&a.touch0[2]===n.identifier?delete a.touch0:a.touch1&&a.touch1[2]===n.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(n=Vh(n,this),Math.hypot(e[0]-n[0],e[1]-n[1])<g)){var h=Zh(this).on("dblclick.zoom");h&&h.apply(this,arguments)}}}return f.transform=function(t,e,r,i){var o=t.selection?t.selection():t;o.property("__zoom",ac),t!==o?C(t,e,r,i):o.interrupt().each(function(){b(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},f.scaleBy=function(t,e,r,i){f.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)},r,i)},f.scaleTo=function(t,e,r,i){f.transform(t,function(){var t=o.apply(this,arguments),i=this.__zoom,a=null==r?x(t):"function"==typeof r?r.apply(this,arguments):r,s=i.invert(a),l="function"==typeof e?e.apply(this,arguments):e;return n(m(y(i,l),a,s),t,h)},r,i)},f.translateBy=function(t,e,r,i){f.transform(t,function(){return n(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof r?r.apply(this,arguments):r),o.apply(this,arguments),h)},null,i)},f.translateTo=function(t,e,r,i,a){f.transform(t,function(){var t=o.apply(this,arguments),a=this.__zoom,s=null==i?x(t):"function"==typeof i?i.apply(this,arguments):i;return n(tc.translate(s[0],s[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof r?-r.apply(this,arguments):-r),t,h)},i,a)},k.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=Zh(this.that).datum();u.call(t,this.that,new(void 0)(t,{sourceEvent:this.sourceEvent,target:f,type:t,transform:this.that.__zoom,dispatch:u}),e)}},f.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Jh(+t),f):a},f.filter=function(t){return arguments.length?(i="function"==typeof t?t:Jh(!!t),f):i},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Jh(!!t),f):s},f.extent=function(t){return arguments.length?(o="function"==typeof t?t:Jh([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),f):o},f.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],f):[l[0],l[1]]},f.translateExtent=function(t){return arguments.length?(h[0][0]=+t[0][0],h[1][0]=+t[1][0],h[0][1]=+t[0][1],h[1][1]=+t[1][1],f):[[h[0][0],h[0][1]],[h[1][0],h[1][1]]]},f.constrain=function(t){return arguments.length?(n=t,f):n},f.duration=function(t){return arguments.length?(c=+t,f):c},f.interpolate=function(t){return arguments.length?(d=t,f):d},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,f):Math.sqrt(p)},f.tapDistance=function(t){return arguments.length?(g=+t,f):g},f})},99418(t,e,r){"use strict";function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,o,n,a,s=[],l=!0,h=!1;try{if(n=(r=r.call(t)).next,0===e);else for(;!(l=(i=n.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){h=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(h)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.d(e,{A:()=>kt});const n=Object.entries,a=Object.setPrototypeOf,s=Object.isFrozen,l=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor;let c=Object.freeze,d=Object.seal,u=Object.create,p="undefined"!=typeof Reflect&&Reflect,g=p.apply,f=p.construct;c||(c=function(t){return t}),d||(d=function(t){return t}),g||(g=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(e,i)}),f||(f=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)});const y=q(Array.prototype.forEach),m=q(Array.prototype.lastIndexOf),x=q(Array.prototype.pop),C=q(Array.prototype.push),b=q(Array.prototype.splice),k=Array.isArray,w=q(String.prototype.toLowerCase),S=q(String.prototype.toString),T=q(String.prototype.match),v=q(String.prototype.replace),B=q(String.prototype.indexOf),_=q(String.prototype.trim),A=q(Number.prototype.toString),L=q(Boolean.prototype.toString),F="undefined"==typeof BigInt?null:q(BigInt.prototype.toString),M="undefined"==typeof Symbol?null:q(Symbol.prototype.toString),E=q(Object.prototype.hasOwnProperty),$=q(Object.prototype.toString),O=q(RegExp.prototype.test),I=(D=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return f(D,e)});var D;function q(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return g(t,e,i)}}function R(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;if(a&&a(t,null),!k(e))return t;let i=e.length;for(;i--;){let o=e[i];if("string"==typeof o){const t=r(o);t!==o&&(s(e)||(e[i]=t),o=t)}t[o]=!0}return t}function z(t){for(let e=0;e<t.length;e++){E(t,e)||(t[e]=null)}return t}function N(t){const e=u(null);for(const i of n(t)){var r=o(i,2);const n=r[0],a=r[1];E(t,n)&&(k(a)?e[n]=z(a):a&&"object"==typeof a&&a.constructor===Object?e[n]=N(a):e[n]=a)}return e}function K(t,e){for(;null!==t;){const r=h(t,e);if(r){if(r.get)return q(r.get);if("function"==typeof r.value)return q(r.value)}t=l(t)}return function(){return null}}const P=c(["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"]),W=c(["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"]),j=c(["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"]),H=c(["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"]),Y=c(["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"]),U=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),X=c(["#text"]),G=c(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),V=c(["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","dominant-baseline","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-orientation","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"]),Z=c(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),Q=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),J=d(/{{[\w\W]*|^[\w\W]*}}/g),tt=d(/<%[\w\W]*|^[\w\W]*%>/g),et=d(/\${[\w\W]*/g),rt=d(/^data-[\-\w.\u00B7-\uFFFF]+$/),it=d(/^aria-[\-\w]+$/),ot=d(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nt=d(/^(?:\w+script|data):/i),at=d(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),st=d(/^html$/i),lt=d(/^[a-z][.\w]*(-[.\w]+)+$/i),ht=d(/<[/\w!]/g),ct=d(/<[/\w]/g),dt=d(/<\/no(script|embed|frames)/i),ut=d(/\/>/i),pt=1,gt=3,ft=7,yt=8,mt=9,xt=11,Ct=function(){return"undefined"==typeof window?null:window},bt=function(t,e,r,i){return E(t,e)&&k(t[e])?R(i.base?N(i.base):{},t[e],i.transform):r};var kt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ct();const r=e=>t(e);if(r.version="3.4.12",r.removed=[],!e||!e.document||e.document.nodeType!==mt||!e.Element)return r.isSupported=!1,r;let i=e.document;const o=i,a=o.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,l=e.Node,h=e.Element,p=e.NodeFilter,g=e.NamedNodeMap;void 0===g&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const f=e.DOMParser,D=e.trustedTypes,q=h.prototype,z=K(q,"cloneNode"),kt=K(q,"remove"),wt=K(q,"nextSibling"),St=K(q,"childNodes"),Tt=K(q,"parentNode"),vt=K(q,"shadowRoot"),Bt=K(q,"attributes"),_t=l&&l.prototype?K(l.prototype,"nodeType"):null,At=l&&l.prototype?K(l.prototype,"nodeName"):null;if("function"==typeof s){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let Lt,Ft,Mt="",Et=!1,$t=0;const Ot=function(){if($t>0)throw I('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},It=function(t){Ot(),$t++;try{return Lt.createHTML(t)}finally{$t--}},Dt=function(){return Et||(Ft=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(D,a),Et=!0),Ft},qt=i,Rt=qt.implementation,zt=qt.createNodeIterator,Nt=qt.createDocumentFragment,Kt=qt.getElementsByTagName,Pt=o.importNode;let Wt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof n&&"function"==typeof Tt&&Rt&&void 0!==Rt.createHTMLDocument;const jt=J,Ht=tt,Yt=et,Ut=rt,Xt=it,Gt=nt,Vt=at,Zt=lt;let Qt=ot,Jt=null;const te=R({},[...P,...W,...j,...Y,...X]);let ee=null;const re=R({},[...G,...V,...Z,...Q]);let ie=Object.seal(u(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}})),oe=null,ne=null;const ae=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let se=!0,le=!0,he=!1,ce=!0,de=!1,ue=!0,pe=!1,ge=!1,fe=null,ye=null,me=!1,xe=!1,Ce=!1,be=!1,ke=!0,we=!1;const Se="user-content-";let Te=!0,ve=!1,Be={},_e=null;const Ae=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Le=null;const Fe=R({},["audio","video","img","source","image","track"]);let Me=null;const Ee=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",Oe="http://www.w3.org/2000/svg",Ie="http://www.w3.org/1999/xhtml";let De=Ie,qe=!1,Re=null;const ze=R({},[$e,Oe,Ie],S),Ne=c(["mi","mo","mn","ms","mtext"]);let Ke=R({},Ne);const Pe=c(["annotation-xml"]);let We=R({},Pe);const je=R({},["title","style","font","a","script"]);let He=null;const Ye=["application/xhtml+xml","text/html"];let Ue=null,Xe=null;const Ge=i.createElement("form"),Ve=function(t){return t instanceof RegExp||t instanceof Function},Ze=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Xe&&Xe===t)return;t&&"object"==typeof t||(t={}),t=N(t),He=-1===Ye.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Ue="application/xhtml+xml"===He?S:w,Jt=bt(t,"ALLOWED_TAGS",te,{transform:Ue}),ee=bt(t,"ALLOWED_ATTR",re,{transform:Ue}),Re=bt(t,"ALLOWED_NAMESPACES",ze,{transform:S}),Me=bt(t,"ADD_URI_SAFE_ATTR",Ee,{transform:Ue,base:Ee}),Le=bt(t,"ADD_DATA_URI_TAGS",Fe,{transform:Ue,base:Fe}),_e=bt(t,"FORBID_CONTENTS",Ae,{transform:Ue}),oe=bt(t,"FORBID_TAGS",N({}),{transform:Ue}),ne=bt(t,"FORBID_ATTR",N({}),{transform:Ue}),Be=!!E(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?N(t.USE_PROFILES):t.USE_PROFILES),se=!1!==t.ALLOW_ARIA_ATTR,le=!1!==t.ALLOW_DATA_ATTR,he=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ce=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,de=t.SAFE_FOR_TEMPLATES||!1,ue=!1!==t.SAFE_FOR_XML,pe=t.WHOLE_DOCUMENT||!1,xe=t.RETURN_DOM||!1,Ce=t.RETURN_DOM_FRAGMENT||!1,be=t.RETURN_TRUSTED_TYPE||!1,me=t.FORCE_BODY||!1,ke=!1!==t.SANITIZE_DOM,we=t.SANITIZE_NAMED_PROPS||!1,Te=!1!==t.KEEP_CONTENT,ve=t.IN_PLACE||!1,Qt=function(t){try{return O(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:ot,De="string"==typeof t.NAMESPACE?t.NAMESPACE:Ie,Ke=E(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?N(t.MATHML_TEXT_INTEGRATION_POINTS):R({},Ne),We=E(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?N(t.HTML_INTEGRATION_POINTS):R({},Pe);const e=E(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?N(t.CUSTOM_ELEMENT_HANDLING):u(null);if(ie=u(null),E(e,"tagNameCheck")&&Ve(e.tagNameCheck)&&(ie.tagNameCheck=e.tagNameCheck),E(e,"attributeNameCheck")&&Ve(e.attributeNameCheck)&&(ie.attributeNameCheck=e.attributeNameCheck),E(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(ie.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),d(ie),de&&(le=!1),Ce&&(xe=!0),Be&&(Jt=R({},X),ee=u(null),!0===Be.html&&(R(Jt,P),R(ee,G)),!0===Be.svg&&(R(Jt,W),R(ee,V),R(ee,Q)),!0===Be.svgFilters&&(R(Jt,j),R(ee,V),R(ee,Q)),!0===Be.mathMl&&(R(Jt,Y),R(ee,Z),R(ee,Q))),ae.tagCheck=null,ae.attributeCheck=null,E(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?ae.tagCheck=t.ADD_TAGS:k(t.ADD_TAGS)&&(Jt===te&&(Jt=N(Jt)),R(Jt,t.ADD_TAGS,Ue))),E(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?ae.attributeCheck=t.ADD_ATTR:k(t.ADD_ATTR)&&(ee===re&&(ee=N(ee)),R(ee,t.ADD_ATTR,Ue))),E(t,"ADD_URI_SAFE_ATTR")&&k(t.ADD_URI_SAFE_ATTR)&&R(Me,t.ADD_URI_SAFE_ATTR,Ue),E(t,"FORBID_CONTENTS")&&k(t.FORBID_CONTENTS)&&(_e===Ae&&(_e=N(_e)),R(_e,t.FORBID_CONTENTS,Ue)),E(t,"ADD_FORBID_CONTENTS")&&k(t.ADD_FORBID_CONTENTS)&&(_e===Ae&&(_e=N(_e)),R(_e,t.ADD_FORBID_CONTENTS,Ue)),Te&&(Jt["#text"]=!0),pe&&R(Jt,["html","head","body"]),Jt.table&&(R(Jt,["tbody"]),delete oe.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw I('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw I('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=Lt;Lt=t.TRUSTED_TYPES_POLICY;try{Mt=It("")}catch(t){throw Lt=e,t}}else null===t.TRUSTED_TYPES_POLICY?(Lt=void 0,Mt=""):(void 0===Lt&&(Lt=Dt()),Lt&&"string"==typeof Mt&&(Mt=It("")));c&&c(t),Xe=t},Qe=R({},[...W,...j,...H]),Je=R({},[...Y,...U]),tr=function(t){let e=Tt(t);e&&e.tagName||(e={namespaceURI:De,tagName:"template"});const r=w(t.tagName),i=w(e.tagName);return!!Re[t.namespaceURI]&&(t.namespaceURI===Oe?function(t,e,r){return e.namespaceURI===Ie?"svg"===t:e.namespaceURI===$e?"svg"===t&&("annotation-xml"===r||Ke[r]):Boolean(Qe[t])}(r,e,i):t.namespaceURI===$e?function(t,e,r){return e.namespaceURI===Ie?"math"===t:e.namespaceURI===Oe?"math"===t&&We[r]:Boolean(Je[t])}(r,e,i):t.namespaceURI===Ie?function(t,e,r){return!(e.namespaceURI===Oe&&!We[r])&&!(e.namespaceURI===$e&&!Ke[r])&&!Je[t]&&(je[t]||!Qe[t])}(r,e,i):!("application/xhtml+xml"!==He||!Re[t.namespaceURI]))},er=function(t){C(r.removed,{element:t});try{Tt(t).removeChild(t)}catch(e){if(kt(t),!Tt(t))throw I("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},rr=function(t){nr(t);const e=St(t);if(e){const t=[];y(e,e=>{C(t,e)}),y(t,t=>{try{kt(t)}catch(t){}})}const r=Bt(t);if(r)for(let e=r.length-1;e>=0;--e){const i=r[e],o=i&&i.name;if("string"==typeof o)try{t.removeAttribute(o)}catch(t){}}},ir=function(t,e){try{C(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){C(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(xe||Ce)try{er(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},or=function(t){const e=Bt(t);if(e)for(let r=e.length-1;r>=0;--r){const i=e[r],o=i&&i.name;if("string"==typeof o&&!ee[Ue(o)])try{t.removeAttribute(o)}catch(t){}}},nr=function(t){const e=[t];for(;e.length>0;){const t=e.pop();(_t?_t(t):t.nodeType)===pt&&or(t);const r=St(t);if(r)for(let t=r.length-1;t>=0;--t)e.push(r[t])}},ar=function(t){let e=null,r=null;if(me)t="<remove></remove>"+t;else{const e=T(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===He&&De===Ie&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=Lt?It(t):t;if(De===Ie)try{e=(new f).parseFromString(o,He)}catch(t){}if(!e||!e.documentElement){e=Rt.createDocument(De,"template",null);try{e.documentElement.innerHTML=qe?Mt:o}catch(t){}}const n=e.body||e.documentElement;return t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),De===Ie?Kt.call(e,pe?"html":"body")[0]:pe?e.documentElement:n},sr=function(t){return zt.call(t.ownerDocument||t,t,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},lr=function(t){return t=v(t,jt," "),t=v(t,Ht," "),t=v(t,Yt," ")},hr=function(t){var e;t.normalize();const r=zt.call(t.ownerDocument||t,t,p.SHOW_TEXT|p.SHOW_COMMENT|p.SHOW_CDATA_SECTION|p.SHOW_PROCESSING_INSTRUCTION,null);let i=r.nextNode();for(;i;)i.data=lr(i.data),i=r.nextNode();const o=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");o&&y(o,t=>{dr(t.content)&&hr(t.content)})},cr=function(t){const e=At?At(t):null;return"string"==typeof e&&("form"===Ue(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==Bt(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==_t(t)||t.childNodes!==St(t)))},dr=function(t){if(!_t||"object"!=typeof t||null===t)return!1;try{return _t(t)===xt}catch(t){return!1}},ur=function(t){if(!_t||"object"!=typeof t||null===t)return!1;try{return"number"==typeof _t(t)}catch(t){return!1}};function pr(t,e,i){0!==t.length&&y(t,t=>{t.call(r,e,i,Xe)})}const gr=function(t,e){if(pr(Wt.beforeSanitizeElements,t,null),t!==e&&null===Tt(t))return!0;if(cr(t))return er(t),!0;const i=Ue(At?At(t):t.nodeName);if(pr(Wt.uponSanitizeElement,t,{tagName:i,allowedTags:Jt}),t!==e&&null===Tt(t))return!0;if(function(t,e){return!!(ue&&t.hasChildNodes()&&!ur(t.firstElementChild)&&O(ht,t.textContent)&&O(ht,t.innerHTML))||!(!ue||t.namespaceURI!==Ie||"style"!==e||!ur(t.firstElementChild))||t.nodeType===ft||!(!ue||t.nodeType!==yt||!O(ct,t.data))}(t,i))return er(t),!0;if(oe[i]||!(ae.tagCheck instanceof Function&&ae.tagCheck(i))&&!Jt[i]){const e=function(t,e){if(!oe[e]&&mr(e)){if(ie.tagNameCheck instanceof RegExp&&O(ie.tagNameCheck,e))return!1;if(ie.tagNameCheck instanceof Function&&ie.tagNameCheck(e))return!1}if(Te&&!_e[e]){const e=Tt(t),r=St(t);if(r&&e)for(let i=r.length-1;i>=0;--i){const o=ve?r[i]:z(r[i],!0);e.insertBefore(o,wt(t))}}return er(t),!0}(t,i);return!1===e&&pr(Wt.afterSanitizeElements,t,null),e}if((_t?_t(t):t.nodeType)===pt&&!tr(t))return er(t),!0;if(("noscript"===i||"noembed"===i||"noframes"===i)&&O(dt,t.innerHTML))return er(t),!0;if(de&&t.nodeType===gt){const e=lr(t.textContent);t.textContent!==e&&(C(r.removed,{element:t.cloneNode()}),t.textContent=e)}return pr(Wt.afterSanitizeElements,t,null),!1},fr=function(t,e,r){if(ne[e])return!1;if(ue&&"patchsrc"===e)return!1;if(ue&&"for"===e&&"label"!==t&&"output"!==t)return!1;if(ke&&("id"===e||"name"===e)&&(r in i||r in Ge))return!1;const o=ee[e]||ae.attributeCheck instanceof Function&&ae.attributeCheck(e,t);if(le&&O(Ut,e));else if(se&&O(Xt,e));else if(o)if(Me[e]);else if(O(Qt,v(r,Vt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==B(r,"data:")||!Le[t]){if(he&&!O(Gt,v(r,Vt,"")));else if(r)return!1}else;else if(!(mr(t)&&(ie.tagNameCheck instanceof RegExp&&O(ie.tagNameCheck,t)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(t))&&(ie.attributeNameCheck instanceof RegExp&&O(ie.attributeNameCheck,e)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(e,t))||"is"===e&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&O(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r))))return!1;return!0},yr=R({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),mr=function(t){return!yr[w(t)]&&O(Zt,t)},xr=function(t,e,r,i){if(Lt&&"object"==typeof D&&"function"==typeof D.getAttributeType&&!r)switch(D.getAttributeType(t,e)){case"TrustedHTML":return It(i);case"TrustedScriptURL":return function(t){Ot(),$t++;try{return Lt.createScriptURL(t)}finally{$t--}}(i)}return i},Cr=function(t,e,i,o){try{i?t.setAttributeNS(i,e,o):t.setAttribute(e,o),cr(t)?er(t):x(r.removed)}catch(r){ir(e,t)}},br=function(t){pr(Wt.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||cr(t))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee,forceKeepAttr:void 0};let i=e.length;const o=Ue(t.nodeName);for(;i--;){const n=e[i],a=n.name,s=n.namespaceURI,l=n.value,h=Ue(a),c=l;let d="value"===a?c:_(c);r.attrName=h,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,pr(Wt.uponSanitizeAttribute,t,r),d=r.attrValue,!we||"id"!==h&&"name"!==h||0===B(d,Se)||(ir(a,t),d=Se+d),ue&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)?ir(a,t):"attributename"===h&&T(d,"href")?ir(a,t):r.forceKeepAttr||(r.keepAttr&&(ce||!O(ut,d))?(de&&(d=lr(d)),fr(o,h,d)?(d=xr(o,h,s,d),d!==c&&Cr(t,a,s,d)):ir(a,t)):ir(a,t))}pr(Wt.afterSanitizeAttributes,t,null)},kr=function(t){let e=null;const r=sr(t);for(pr(Wt.beforeSanitizeShadowDOM,t,null);e=r.nextNode();){pr(Wt.uponSanitizeShadowNode,e,null),gr(e,t),br(e),dr(e.content)&&kr(e.content);if((_t?_t(e):e.nodeType)===pt){const t=vt(e);dr(t)&&(wr(t),kr(t))}}pr(Wt.afterSanitizeShadowDOM,t,null)},wr=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){kr(t.shadow);continue}const r=t.node,i=(_t?_t(r):r.nodeType)===pt,o=St(r);if(o)for(let t=o.length-1;t>=0;--t)e.push({node:o[t],shadow:null});if(i){const t=At?At(r):null;if("string"==typeof t&&"template"===Ue(t)){const t=r.content;dr(t)&&e.push({node:t,shadow:null})}}if(i){const t=vt(r);dr(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,a=null,s=null;if(qe=!t,qe&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ur(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return A(t);case"boolean":return L(t);case"bigint":return F?F(t):"0";case"symbol":return M?M(t):"Symbol()";case"undefined":default:return $(t);case"function":case"object":{if(null===t)return $(t);const e=t,r=K(e,"toString");if("function"==typeof r){const t=r(e);return"string"==typeof t?t:$(t)}return $(t)}}}(t)))throw I("dirty is not a string, aborting");if(!r.isSupported)return t;ge?(Jt=fe,ee=ye):Ze(e),(Wt.uponSanitizeElement.length>0||Wt.uponSanitizeAttribute.length>0)&&(Jt=N(Jt)),Wt.uponSanitizeAttribute.length>0&&(ee=N(ee)),r.removed=[];const l=ve&&"string"!=typeof t&&ur(t);if(l){!function(t){if(!ue)return;const e=[t];for(;e.length>0;){const t=e.pop(),r=_t?_t(t):t.nodeType;if(r===ft||r===yt&&O(ct,t.data)){try{kt(t)}catch(t){}continue}if(r===pt){const e=t,r=Ue(At?At(t):t.nodeName);try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&"label"!==r&&"output"!==r&&e.removeAttribute("for")}catch(t){}}const i=St(t);if(i)for(let t=i.length-1;t>=0;--t)e.push(i[t])}}(t);const e=At?At(t):t.nodeName;if("string"==typeof e){const r=Ue(e);if(!Jt[r]||oe[r])throw rr(t),I("root node is forbidden and cannot be sanitized in-place")}if(cr(t))throw rr(t),I("root node is clobbered and cannot be sanitized in-place");try{wr(t)}catch(e){throw rr(t),e}}else if(ur(t))i=ar("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),n.nodeType===pt&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n),wr(n);else{if(!xe&&!de&&!pe&&-1===t.indexOf("<"))return Lt&&be?It(t):t;if(i=ar(t),!i)return xe?null:be?Mt:""}i&&me&&er(i.firstChild);const h=l?t:i,c=sr(h);try{for(;a=c.nextNode();)gr(a,h),br(a),dr(a.content)&&kr(a.content)}catch(e){throw l&&(rr(t),y(r.removed,t=>{t.element&&nr(t.element)})),e}if(l)return y(r.removed,t=>{t.element&&nr(t.element)}),de&&hr(t),t;if(xe){if(de&&hr(i),Ce)for(s=Nt.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(ee.shadowroot||ee.shadowrootmode)&&(s=Pt.call(o,s,!0)),s}let d=pe?i.outerHTML:i.innerHTML;return pe&&Jt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&O(st,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),de&&(d=lr(d)),Lt&&be?It(d):d},r.setConfig=function(){Ze(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ge=!0,fe=Jt,ye=ee},r.clearConfig=function(){Xe=null,ge=!1,fe=null,ye=null,Lt=Ft,Mt=""},r.isValidAttribute=function(t,e,r){Xe||Ze({});const i=Ue(t),o=Ue(e);return fr(i,o,r)},r.addHook=function(t,e){"function"==typeof e&&E(Wt,t)&&C(Wt[t],e)},r.removeHook=function(t,e){if(E(Wt,t)){if(void 0!==e){const r=m(Wt[t],e);return-1===r?void 0:b(Wt[t],r,1)[0]}return x(Wt[t])}},r.removeHooks=function(t){E(Wt,t)&&(Wt[t]=[])},r.removeAllHooks=function(){Wt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},99125(t,e,r){"use strict";function i(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}r.d(e,{b:()=>i})},89826(t,e,r){"use strict";r.d(e,["$V",0,"[object Boolean]","Av",0,"[object RegExp]","GX",0,"[object Object]","ML",0,"[object Float64Array]","NA",0,"[object Set]","OG",0,"[object String]","Qb",0,"[object Uint8Array]","R_",0,"[object Arguments]","Uw",0,"[object Array]","VP",0,"[object Symbol]","XZ",0,"[object Int8Array]","ZR",0,"[object Uint32Array]","_u",0,"[object Int32Array]","cT",0,"[object ArrayBuffer]","i1",0,"[object Int16Array]","iq",0,"[object DataView]","kj",0,"[object Number]","pj",0,"[object Map]","q",0,"[object Uint8ClampedArray]","ri",0,"[object Float32Array]","vC",0,"[object Date]","x6",0,"[object Uint16Array]"])},14608(t,e,r){"use strict";r.d(e,{N:()=>o});var i=r(99125);function o(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===(0,i.b)(t)}},30622(t,e,r){"use strict";function i(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&t>=0}(t.length)}r.d(e,{X:()=>i})},19663(t,e,r){"use strict";r.d(e,{i:()=>o});var i=r(42796);function o(t){return(0,i.i)(t)}},32178(t,e,r){"use strict";r.d(e,{P:()=>o});const i="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof r.g&&r.g||function(){return this}();function o(t){return void 0!==i.Buffer&&i.Buffer.isBuffer(t)}},37110(t,e,r){"use strict";function i(t){return null==t||"object"!=typeof t&&"function"!=typeof t}r.d(e,{s:()=>i})},42796(t,e,r){"use strict";function i(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}r.d(e,{i:()=>i})},67266(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(86309),o=r(63122);const n=class{constructor(){this.type=o.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=o.Z.ALL}is(t){return this.type===t}};const a=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new n}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=o.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:o}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===o&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:o}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===o&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},51931(t,e,r){"use strict";r.d(e,{A:()=>f});var i=r(67266),o=r(63122);const n={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(n.re);if(!e)return;const r=e[1],o=parseInt(r,16),a=r.length,s=a%4==0,l=a>4,h=l?1:17,c=l?8:4,d=s?0:-1,u=l?255:15;return i.A.set({r:(o>>c*(d+3)&u)*h,g:(o>>c*(d+2)&u)*h,b:(o>>c*(d+1)&u)*h,a:s?(o&u)*h/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}${o.Y[Math.round(255*n)]}`:`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}`}},a=n;var s=r(86309);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,o,n,a,h,c]=r;return i.A.set({h:l._hue2deg(o),s:s.A.channel.clamp.s(parseFloat(n)),l:s.A.channel.clamp.l(parseFloat(a)),a:h?s.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%, ${o})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%)`}},h=l,c={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=c.colors[t];if(e)return a.parse(e)},stringify:t=>{const e=a.stringify(t);for(const t in c.colors)if(c.colors[t]===e)return t}},d=c,u={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(u.re);if(!r)return;const[,o,n,a,l,h,c,d,p]=r;return i.A.set({r:s.A.channel.clamp.r(n?2.55*parseFloat(o):parseFloat(o)),g:s.A.channel.clamp.g(l?2.55*parseFloat(a):parseFloat(a)),b:s.A.channel.clamp.b(c?2.55*parseFloat(h):parseFloat(h)),a:d?s.A.channel.clamp.a(p?parseFloat(d)/100:parseFloat(d)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)}, ${s.A.lang.round(o)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)})`}},p=u,g={format:{keyword:c,hex:a,rgb:u,rgba:u,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=a.parse(t)||p.parse(t)||h.parse(t)||d.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(o.Z.HSL)||void 0===t.data.r?h.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):a.stringify(t)},f=g},63122(t,e,r){"use strict";var i=r(86309);const o={};for(let t=0;t<=255;t++)o[t]=i.A.unit.dec2hex(t);r.d(e,["Y",0,o,"Z",0,{ALL:0,RGB:1,HSL:2}])},95635(t,e,r){"use strict";var i=r(86309),o=r(51931);const n=(t,e,r)=>{const n=o.A.parse(t),a=n[e],s=i.A.channel.clamp[e](a+r);return a!==s&&(n[e]=s),o.A.stringify(n)};r.d(e,["A",0,n])},8232(t,e,r){"use strict";var i=r(86309),o=r(51931);const n=(t,e)=>{const r=o.A.parse(t);for(const t in e)r[t]=i.A.channel.clamp[t](e[t]);return o.A.stringify(r)};r.d(e,["A",0,n])},75263(t,e,r){"use strict";var i=r(95635);const o=(t,e)=>(0,i.A)(t,"l",-e);r.d(e,["A",0,o])},5097(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(86309),o=r(51931);const n=t=>{const{r:e,g:r,b:n}=o.A.parse(t),a=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(n);return i.A.lang.round(a)},a=t=>n(t)>=.5,s=t=>!a(t)},78041(t,e,r){"use strict";var i=r(95635);const o=(t,e)=>(0,i.A)(t,"l",e);r.d(e,["A",0,o])},25582(t,e,r){"use strict";var i=r(86309),o=r(67266),n=r(51931),a=r(8232);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,a.A)(t,{a:e});const l=o.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(s)});return n.A.stringify(l)};r.d(e,["A",0,s])},86309(t,e,r){"use strict";r.d(e,{A:()=>o});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},o)=>{if(!e)return 2.55*r;t/=360,e/=100;const n=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-n;switch(o){case"r":return 255*i.hue2rgb(a,n,t+1/3);case"g":return 255*i.hue2rgb(a,n,t);case"b":return 255*i.hue2rgb(a,n,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),n=Math.min(t,e,r),a=(o+n)/2;if("l"===i)return 100*a;if(o===n)return 0;const s=o-n;if("s"===i)return 100*(a>.5?s/(2-o-n):s/(o+n));switch(o){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},o={channel:i,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},1778(t,e,r){"use strict";r.d(e,{IU:()=>k,Jo:()=>O,T_:()=>v,UQ:()=>b,g0:()=>at,jP:()=>S,lP:()=>C});var i=r(75999),o=r(23665),n=r(91865),a=r(3868),s=r(8969),l=r(28342),h=r(68861),c=r(31293),d=r(86827),u=r(51444),p=r(61057),g=(0,d.K)((t,e,r,i,o,n=!1,a)=>{e.arrowTypeStart&&m(t,"start",e.arrowTypeStart,r,i,o,n,a),e.arrowTypeEnd&&m(t,"end",e.arrowTypeEnd,r,i,o,n,a)},"addEdgeMarkers"),f={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},y=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],m=(0,d.K)((t,e,r,i,o,n,a=!1,s)=>{const l=f[r],h=l&&y.includes(l.type);if(!l)return void c.R.warn(`Unknown arrow type: ${r}`);const d=`${o}_${n}-${l.type}${"start"===e?"Start":"End"}${a&&h?"-margin":""}`;if(s&&""!==s.trim()){const r=`${d}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(d);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),l.fill&&t.setAttribute("fill",s)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${d})`)},"addEdgeMarker"),x=(0,d.K)(t=>"string"==typeof t?t:(0,h.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),C=new Map,b=new Map,k=(0,d.K)(()=>{C.clear(),b.clear()},"clear"),w=(0,d.K)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),S=(0,d.K)(async(t,e)=>{const r=(0,h.D7)();let a=(0,h.E)(r);const{labelStyles:l}=(0,o.GX)(e);e.labelStyle=l;const d=t.insert("g").attr("class","edgeLabel"),p=d.insert("g").attr("class","label").attr("data-id",e.id),g="markdown"===e.labelType,f=await(0,s.G)(t,e.label,{style:w(e.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:g,width:void 0},r);p.node().appendChild(f),c.R.info("abc82",e,e.labelType);let y,m=f.getBBox(),x=m;if(a){const t=f.children[0],e=(0,u.Ltv)(f);m=t.getBoundingClientRect(),x=m,e.attr("width",m.width),e.attr("height",m.height)}else{const t=(0,u.Ltv)(f).select("text").node();t&&"function"==typeof t.getBBox&&(x=t.getBBox())}if(p.attr("transform",(0,n.Wg)(x,a)),C.set(e.id,d),e.width=m.width,e.height=m.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,i.DA)(o,e.startLabelLeft,w(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,n.Wg)(l,a)),b.get(e.id)||b.set(e.id,{}),b.get(e.id).startLeft=r,T(y,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,i.DA)(o,e.startLabelRight,w(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,n.Wg)(l,a)),b.get(e.id)||b.set(e.id,{}),b.get(e.id).startRight=r,T(y,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,i.DA)(r,e.endLabelLeft,w(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,n.Wg)(l,a)),b.get(e.id)||b.set(e.id,{}),b.get(e.id).endLeft=r,T(y,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,i.DA)(r,e.endLabelRight,w(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,n.Wg)(l,a)),b.get(e.id)||b.set(e.id,{}),b.get(e.id).endRight=r,T(y,e.endLabelRight)}return f},"insertEdgeLabel");function T(t,e){(0,h.E)((0,h.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,d.K)(T,"setTerminalWidth");var v=(0,d.K)((t,e)=>{c.R.debug("Moving label abc88 ",t.id,t.label,C.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=(0,h.D7)(),{subGraphTitleTotalMargin:o}=(0,a.O)(i);if(t.label){const i=C.get(t.id);let n=t.x,a=t.y;if(r){const i=l._K.calcLabelPosition(r);c.R.debug("Moving label "+t.label+" from (",n,",",a,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(n=i.x,a=i.y)}i.attr("transform",`translate(${n}, ${a+o/2})`)}if(t.startLabelLeft){const e=b.get(t.id).startLeft;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){const e=b.get(t.id).startRight;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){const e=b.get(t.id).endLeft;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){const e=b.get(t.id).endRight;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),B=(0,d.K)((t,e)=>{if(!t?.isLabelEdge||!t?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(2!==e.length)return e;const[r,i]=e,o=Math.abs(i.x-r.x),n=Math.abs(i.y-r.y);return o<.001||n<.001?e:n>=o?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),_=(0,d.K)((t,e)=>{const r=t.x,i=t.y,o=Math.abs(e.x-r),n=Math.abs(e.y-i),a=t.width/2,s=t.height/2;return o>=a||n>=s},"outsideNode"),A=(0,d.K)((t,e,r)=>{c.R.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,o=t.y,n=Math.abs(i-r.x),a=t.width/2;let s=r.x<e.x?a-n:a+n;const l=t.height/2,h=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(o-e.y)*a>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-o:o-l-e.y;s=d*t/h;const i={x:r.x<e.x?r.x+s:r.x-d+s,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===s&&(i.x=e.x,i.y=e.y),0===d&&(i.x=e.x),0===h&&(i.y=e.y),c.R.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${d}, r ${s}`,i),i}{s=r.x<e.x?e.x-a-i:i-a-e.x;let t=h*s/d,o=r.x<e.x?r.x+d-s:r.x-d+s,n=r.y<e.y?r.y+t:r.y-t;return c.R.debug(`sides calc abc89, Q ${h}, q ${t}, R ${d}, r ${s}`,{_x:o,_y:n}),0===s&&(o=e.x,n=e.y),0===d&&(o=e.x),0===h&&(n=e.y),{x:o,y:n}}},"intersection"),L=(0,d.K)((t,e)=>{c.R.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(c.R.info("abc88 checking point",t,e),_(e,t)||o)c.R.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const n=A(e,i,t);c.R.debug("abc88 inside",t,i,n),c.R.debug("abc88 intersection",n,e);let a=!1;r.forEach(t=>{a=a||t.x===n.x&&t.y===n.y}),r.some(t=>t.x===n.x&&t.y===n.y)?c.R.warn("abc88 no intersect",n,r):r.push(n),o=!0}}),c.R.debug("returning points",r),r},"cutPathAtIntersect");function F(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const o=t[i-1],n=t[i],a=t[i+1];(o.x===n.x&&n.y===a.y&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-o.y)>5||o.y===n.y&&n.x===a.x&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5)&&(e.push(n),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,d.K)(F,"extractCornerPoints");var M=(0,d.K)(function(t,e,r){const i=e.x-t.x,o=e.y-t.y,n=r/Math.sqrt(i*i+o*o);return{x:e.x-n*i,y:e.y-n*o}},"findAdjacentPoint"),E=(0,d.K)(function(t){const{cornerPointPositions:e}=F(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],o=t[i+1],n=t[i],a=M(e,n,5),s=M(o,n,5),l=s.x-a.x,h=s.y-a.y;r.push(a);const d=2*Math.sqrt(2);let u={x:n.x,y:n.y};if(Math.abs(o.x-e.x)>10&&Math.abs(o.y-e.y)>=10){c.R.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));const t=5;u=n.x===a.x?{x:l<0?a.x-t+d:a.x+t-d,y:h<0?a.y-d:a.y+d}:{x:l<0?a.x-d:a.x+d,y:h<0?a.y-t+d:a.y+t-d}}else c.R.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));r.push(u,s)}else r.push(t[i]);return r},"fixCorners"),$=(0,d.K)((t,e,r)=>{const i=t-e-r,o=Math.floor(i/4);return`0 ${e} ${Array(o).fill("2 2").join(" ")} ${r}`},"generateDashArray"),O=(0,d.K)(function(t,e,r,i,a,s,d,f=!1){if(!d)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:y,layout:m}=(0,h.D7)();let C=e.points,b=!1;const k=a;var w=s;const S=[];for(const t in e.cssCompiledStyles)(0,o.KX)(t)||S.push(e.cssCompiledStyles[t]);if("swimlane"===m){if(w.intersect&&k.intersect&&Array.isArray(C)&&C.length>=2)if(2===C.length)C=[k.intersect(C[0]),w.intersect(C[1])];else{const t=C.slice(1,-1),e=t[0],r=t[t.length-1],i=.5,o=Math.abs(C[C.length-1].x-r.x)<i&&Math.abs(C[C.length-1].y-r.y)<i,n=k.intersect(e),a=o?r:w.intersect(r),s=Math.abs(a.x-r.x)<i&&Math.abs(a.y-r.y)<i?[]:[a];C=[...Math.abs(n.x-e.x)<i&&Math.abs(n.y-e.y)<i?[]:[n],...t,...s]}C=B(e,C)}else w.intersect&&k.intersect&&!f&&(C=C.slice(1,e.points.length-1),C.unshift(k.intersect(C[0])),C.push(w.intersect(C[C.length-1])));const T=btoa(JSON.stringify(C));e.toCluster&&(c.R.info("to cluster abc88",r.get(e.toCluster)),C=L(e.points,r.get(e.toCluster).node),b=!0),e.fromCluster&&(c.R.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(C,null,2)),C=L(C.reverse(),r.get(e.fromCluster).node).reverse(),b=!0);let v=C.filter(t=>!Number.isNaN(t.y));const _=x(e.curve);"rounded"!==_&&(v=E(v));let A=u.lUB;switch(_){case"linear":case"rounded":A=u.lUB;break;case"basis":default:A=u.qrM;break;case"cardinal":A=u.y8u;break;case"bumpX":A=u.Wi0;break;case"bumpY":A=u.PGM;break;case"catmullRom":A=u.oDi;break;case"monotoneX":A=u.nVG;break;case"monotoneY":A=u.uxU;break;case"natural":A=u.Xf2;break;case"step":A=u.GZz;break;case"stepAfter":A=u.UPb;break;case"stepBefore":A=u.dyv}const{x:F,y:M}=(0,n.RI)(e),O=(0,u.n8j)().x(F).y(M).curve(A);let D,R;switch(e.thickness){case"normal":default:D="edge-thickness-normal";break;case"thick":D="edge-thickness-thick";break;case"invisible":D="edge-thickness-invisible"}switch(e.pattern){case"solid":default:D+=" edge-pattern-solid";break;case"dotted":D+=" edge-pattern-dotted";break;case"dashed":D+=" edge-pattern-dashed"}let z="rounded"===_?I(q(v,e),5):O(v);const N=Array.isArray(e.style)?e.style:[e.style];let K=N.find(t=>t?.startsWith("stroke:")),P="";e.animate&&(P="edge-animation-fast"),e.animation&&(P="edge-animation-"+e.animation);let W=!1;if("handDrawn"===e.look){const r=p.A.svg(t);Object.assign([],v);const i=r.path(z,{roughness:.3,seed:y});D+=" transition",R=(0,u.Ltv)(i).select("path").attr("id",`${d}-${e.id}`).attr("class"," "+D+(e.classes?" "+e.classes:"")+(P?" "+P:"")).attr("style",N?N.reduce((t,e)=>t+";"+e,""):"");let o=R.attr("d");R.attr("d",o),t.node().appendChild(R.node())}else{const r=S.join(";"),i=N?N.reduce((t,e)=>t+e+";",""):"",o=(r?r+";"+i+";":i)+";"+(N?N.reduce((t,e)=>t+";"+e,""):"");R=t.append("path").attr("d",z).attr("id",`${d}-${e.id}`).attr("class"," "+D+(e.classes?" "+e.classes:"")+(P?" "+P:"")).attr("style",o),K=o.match(/stroke:([^;]+)/)?.[1],W=!0===e.animate||!!e.animation||r.includes("animation");const a=R.node(),s="function"==typeof a.getTotalLength?a.getTotalLength():0,l=n.Nq[e.arrowTypeStart]||0,h=n.Nq[e.arrowTypeEnd]||0;if("neo"===e.look&&!W){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?$(s,l,h):`0 ${l} ${s-l-h} ${h}`}; stroke-dashoffset: 0;`;R.attr("style",t+R.attr("style"))}}R.attr("data-edge",!0),R.attr("data-et","edge"),R.attr("data-id",e.id),R.attr("data-points",T),R.attr("data-look",(0,l.KL)(e.look)),e.showPoints&&v.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let j="";((0,h.D7)().flowchart.arrowMarkerAbsolute||(0,h.D7)().state.arrowMarkerAbsolute)&&(j=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,j=j.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),c.R.info("arrowTypeStart",e.arrowTypeStart),c.R.info("arrowTypeEnd",e.arrowTypeEnd);g(R,e,j,d,i,!W&&"neo"===e?.look,K);const H=C[Math.floor(C.length/2)];l._K.isLabelCoordinateInPath(H,R.attr("d"))||(b=!0);let Y={};return b&&(Y.updatedPath=C),Y.originalPath=e.points,Y},"insertEdge");function I(t,e){if(t.length<2)return"";let r="";const i=t.length,o=1e-5;for(let n=0;n<i;n++){const a=t[n],s=t[n-1],l=t[n+1];if(0===n)r+=`M${a.x},${a.y}`;else if(n===i-1)r+=`L${a.x},${a.y}`;else{const t=a.x-s.x,i=a.y-s.y,n=l.x-a.x,h=l.y-a.y,c=Math.hypot(t,i),d=Math.hypot(n,h);if(c<o||d<o){r+=`L${a.x},${a.y}`;continue}const u=t/c,p=i/c,g=n/d,f=h/d,y=u*g+p*f,m=Math.max(-1,Math.min(1,y)),x=Math.acos(m);if(x<o||Math.abs(Math.PI-x)<o){r+=`L${a.x},${a.y}`;continue}const C=Math.min(e/Math.sin(x/2),c/2,d/2),b=a.x-u*C,k=a.y-p*C,w=a.x+g*C,S=a.y+f*C;r+=`L${b},${k}`,r+=`Q${a.x},${a.y} ${w},${S}`}}return r}function D(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function q(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&n.hq[e.arrowTypeStart]){const i=n.hq[e.arrowTypeStart],o=t[0],a=t[1],{angle:s}=D(o,a),l=i*Math.cos(s),h=i*Math.sin(s);r[0].x=o.x+l,r[0].y=o.y+h}const i=t.length;if(i>=2&&n.hq[e.arrowTypeEnd]){const o=n.hq[e.arrowTypeEnd],a=t[i-1],s=t[i-2],{angle:l}=D(s,a),h=o*Math.cos(l),c=o*Math.sin(l);r[i-1].x=a.x-h,r[i-1].y=a.y-c}return r}(0,d.K)(I,"generateRoundedPath"),(0,d.K)(D,"calculateDeltaAndAngle"),(0,d.K)(q,"applyMarkerOffsetsToPoints");var R=(0,d.K)((t,e,r,i)=>{e.forEach(e=>{nt[e](t,r,i)})},"insertMarkers"),z=(0,d.K)((t,e,r)=>{c.R.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),N=(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),K=(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),P=(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),W=(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),j=(0,d.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),H=(0,d.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Y=(0,d.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),U=(0,d.K)((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"),X=(0,d.K)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{transitionColor:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${n}`)},"barbNeo"),G=(0,d.K)((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"),V=(0,d.K)((t,e,r)=>{const 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");const o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Z=(0,d.K)((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"),Q=(0,d.K)((t,e,r)=>{const 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");const o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),J=(0,d.K)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${n}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${n}`)},"only_one_neo"),tt=(0,d.K)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n,mainBkg:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");s.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),s.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${n}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${n}`)},"zero_or_one_neo"),et=(0,d.K)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${n}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${n}`)},"one_or_more_neo"),rt=(0,d.K)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n,mainBkg:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");s.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${n}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${n}`)},"zero_or_more_neo"),it=(0,d.K)((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\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),ot=(0,d.K)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${n}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),nt={extension:z,composition:N,aggregation:K,dependency:P,lollipop:W,point:j,circle:H,cross:Y,barb:U,barbNeo:X,only_one:G,zero_or_one:V,one_or_more:Z,zero_or_more:Q,only_one_neo:J,zero_or_one_neo:tt,one_or_more_neo:et,zero_or_more_neo:rt,requirement_arrow:it,requirement_contains:(0,d.K)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),requirement_arrow_neo:ot,requirement_contains_neo:(0,d.K)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o,a=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${n}`)},"requirement_contains_neo")},at=R},91865(t,e,r){"use strict";r.d(e,{Nq:()=>a,RI:()=>h,Wg:()=>o,hq:()=>n});var i=r(86827),o=(0,i.K)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),n={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},a={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function s(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=l(t),e=l(e);const[r,i]=[t.x,t.y],[o,n]=[e.x,e.y],a=o-r,s=n-i;return{angle:Math.atan(s/a),deltaX:a,deltaY:s}}(0,i.K)(s,"calculateDeltaAndAngle");var l=(0,i.K)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),h=(0,i.K)(t=>({x:(0,i.K)(function(e,r,i){let o=0;const a=l(i[0]).x<l(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(n,t.arrowTypeStart)){const{angle:e,deltaX:r}=s(i[0],i[1]);o=n[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){const{angle:e,deltaX:r}=s(i[i.length-1],i[i.length-2]);o=n[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const h=Math.abs(l(e).x-l(i[i.length-1]).x),c=Math.abs(l(e).y-l(i[i.length-1]).y),d=Math.abs(l(e).x-l(i[0]).x),u=Math.abs(l(e).y-l(i[0]).y),p=n[t.arrowTypeStart],g=n[t.arrowTypeEnd];if(h<g&&h>0&&c<g){let t=g+1-h;t*="right"===a?-1:1,o-=t}if(d<p&&d>0&&u<p){let t=p+1-d;t*="right"===a?-1:1,o+=t}return l(e).x+o},"x"),y:(0,i.K)(function(e,r,i){let o=0;const a=l(i[0]).y<l(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(n,t.arrowTypeStart)){const{angle:e,deltaY:r}=s(i[0],i[1]);o=n[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){const{angle:e,deltaY:r}=s(i[i.length-1],i[i.length-2]);o=n[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const h=Math.abs(l(e).y-l(i[i.length-1]).y),c=Math.abs(l(e).x-l(i[i.length-1]).x),d=Math.abs(l(e).y-l(i[0]).y),u=Math.abs(l(e).x-l(i[0]).x),p=n[t.arrowTypeStart],g=n[t.arrowTypeEnd];if(h<g&&h>0&&c<g){let t=g+1-h;t*="up"===a?-1:1,o-=t}if(d<p&&d>0&&u<p){let t=p+1-d;t*="up"===a?-1:1,o+=t}return l(e).y+o},"y")}),"getLineFunctionsWithOffset")},23665(t,e,r){"use strict";r.d(e,{Fr:()=>c,GX:()=>h,KX:()=>l,WW:()=>a,ue:()=>n});var i=r(68861),o=r(86827),n=(0,o.K)(t=>{const{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),a=(0,o.K)(t=>{const e=s([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),s=(0,o.K)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),l=(0,o.K)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),h=(0,o.K)(t=>{const{stylesArray:e}=a(t),r=[],i=[],o=[],n=[];return e.forEach(t=>{const e=t[0];l(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&n.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:n}},"styles2String"),c=(0,o.K)((t,e)=>{const{themeVariables:r,handDrawnSeed:o}=(0,i.D7)(),{nodeBorder:n,mainBkg:s}=r,{stylesMap:l}=a(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||n,seed:o,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:d(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),d=(0,o.K)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},6923(t,e,r){"use strict";r.d(e,{XX:()=>u,q7:()=>p,sO:()=>d});var i=r(1778),o=r(75999),n=r(28342),a=r(68861),s=r(31293),l=r(86827),h={common:a.Y2,getConfig:a.zj,insertCluster:o.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:o.on,interpolateToCurve:n.Ib,labelHelper:o.Zk,log:s.R,positionEdgeLabel:i.T_},c={},d=(0,l.K)(t=>{for(const e of t)c[e.name]=e},"registerLayoutLoaders");(0,l.K)(()=>{d([{name:"dagre",loader:(0,l.K)(async()=>await Promise.all([r.e(697),r.e(3263),r.e(5422),r.e(2204),r.e(7911)]).then(r.bind(r,17911)),"loader")},{name:"swimlane",loader:(0,l.K)(async()=>await Promise.all([r.e(697),r.e(3263),r.e(2204),r.e(6383)]).then(r.bind(r,16383)),"loader")},{name:"cose-bilkent",loader:(0,l.K)(async()=>await Promise.all([r.e(165),r.e(2180)]).then(r.bind(r,2180)),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,l.K)(async(t,e,r)=>{if(!(t.layoutAlgorithm in c))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const e of t.nodes){const r=e.domId||e.id;e.domId=`${t.diagramId}-${r}`}const i=c[t.layoutAlgorithm],o=await i.loader(),{theme:n,themeVariables:a}=t.config,{useGradient:s,gradientStart:l,gradientStop:d}=a,u=e.attr("id");if(e.append("defs").append("filter").attr("id",`${u}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(n?.includes("dark")?"#FFFFFF":"#000000")),e.append("defs").append("filter").attr("id",`${u}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(n?.includes("dark")?"#FFFFFF":"#000000")),s){const t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",d).attr("stop-opacity",1)}return o.render(t,e,h,{algorithm:i.algorithm},r)},"render"),p=(0,l.K)((t="",{fallback:e="dagre"}={})=>{if(t in c)return t;if(e in c)return s.R.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")},24731(t,e,r){"use strict";r.d(e,{WY:()=>A,dn:()=>_,pC:()=>v,Gc:()=>w});var i=r(68861),o=r(31293),n=r(86827);const a=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...s,...l}),c=Object.freeze({...h,body:"",hidden:!1});function d(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in c)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function u(t,e,r){const i=t.icons,o=t.aliases||Object.create(null);let n={};function a(t){n=d(i[t]||o[t],n)}return a(e),r.forEach(a),d(t,n)}function p(t,e){if(t.icons[e])return u(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return o[e]=[];if(!(e in o)){o[e]=null;const r=i[e]&&i[e].parent,n=r&&t(r);n&&(o[e]=[r].concat(n))}return o[e]}),o}(t,[e])[e];return r?u(t,e,r):null}const g=Object.freeze({width:null,height:null}),f=Object.freeze({...g,...l}),y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function x(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(y);if(null===i||!i.length)return t;const o=[];let n=i.shift(),a=m.test(n);for(;;){if(a){const t=parseFloat(n);isNaN(t)?o.push(n):o.push(Math.ceil(t*e*r)/r)}else o.push(n);if(n=i.shift(),void 0===n)return o.join("");a=!a}}const C=/\sid="(\S+)"/g,b=new Map;function k(t){const e=[];let r;for(;r=C.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=b.get(t)||0;return b.set(t,e+1),e?`${t}${e}`:t}(e),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}var w={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},S=new Map,T=new Map,v=(0,n.K)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(o.R.debug("Registering icon pack:",e.name),"loader"in e)T.set(e.name,e.loader);else{if(!("icons"in e))throw o.R.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');S.set(e.name,e.icons)}}},"registerIconPacks"),B=(0,n.K)(async(t,e)=>{const r=((t,e,r,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),r=o.pop(),n={provider:o.length>0?o[0]:i,prefix:r,name:t};return e&&!a(n)?null:n}const n=o[0],s=n.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!a(t)?null:t}if(r&&""===i){const t={provider:i,prefix:"",name:n};return e&&!a(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let n=S.get(i);if(!n){const t=T.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await t(),prefix:i},S.set(i,n)}catch(t){throw o.R.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=p(n,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),_=(0,n.K)(async t=>{try{return await B(t),!0}catch{return!1}},"isIconAvailable"),A=(0,n.K)(async(t,e,r)=>{let n;try{n=await B(t,e?.fallbackPrefix)}catch(t){o.R.error(t),n=w}const a=function(t,e){const r={...h,...t},i={...f,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let a,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):i&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=o.height/2+o.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:a=o.width/2+o.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(o.left!==o.top&&(a=o.left,o.left=o.top,o.top=a),o.width!==o.height&&(a=o.width,o.width=o.height,o.height=a)),e.length&&(n=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),n=t.indexOf("</"+e);if(-1===o||-1===n)break;const a=t.indexOf(">",n);if(-1===a)break;r+=t.slice(o+1,n).trim(),t=t.slice(0,i).trim()+t.slice(a+1)}return{defs:r,content:t}}(t);return o=i.defs,n=e+i.content+r,o?"<defs>"+o+"</defs>"+n:n;var o,n}(n,'<g transform="'+e.join(" ")+'">',"</g>"))});const a=i.width,s=i.height,l=o.width,c=o.height;let d,u;null===a?(u=null===s?"1em":"auto"===s?c:s,d=x(u,l/c)):(d="auto"===a?l:a,u=null===s?x(d,c/l):"auto"===s?c:s);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",d),g("height",u);const y=[o.left,o.top,l,c];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:n}}(n,e),s=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(k(a.body),{...a.attributes,...r});return(0,i.jZ)(s,(0,i.zj)())},"getIconSVG")},28342(t,e,r){"use strict";r.d(e,{pe:()=>L,PX:()=>ot,ru:()=>et,Un:()=>rt,$t:()=>ct,Sm:()=>pt,C4:()=>ut,$C:()=>X,rY:()=>gt,sM:()=>Y,KL:()=>ft,Ib:()=>D,dq:()=>st,I5:()=>ht,yT:()=>V,vU:()=>O,_K:()=>dt,bH:()=>J});var i=r(68861),o=r(31293),n=r(86827),a=r(62559),s=r(51444);function l(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");const r=function(...i){const o=e?e.apply(this,i):i[0],n=r.cache;if(n.has(o))return n.get(o);const a=t.apply(this,i);return r.cache=n.set(o,a)||n,a};return r.cache=new(l.Cache||Map),r}function h(){}l.Cache=Map;var c=r(37110),d=r(42796);function u(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var p=r(32178);function g(t){return"__proto__"===t}function f(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var y=r(99125),m=r(89826);function x(t,e,r,i=new Map,o=void 0){const n=o?.(t,e,r,i);if(void 0!==n)return n;if((0,c.s)(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){const e=new Array(t.length);i.set(t,e);for(let n=0;n<t.length;n++)e[n]=x(t[n],n,r,i,o);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;i.set(t,e);for(const[n,a]of t)e.set(n,x(a,n,r,i,o));return e}if(t instanceof Set){const e=new Set;i.set(t,e);for(const n of t)e.add(x(n,void 0,r,i,o));return e}if((0,p.P)(t))return t.subarray();if((0,d.i)(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);i.set(t,e);for(let n=0;n<t.length;n++)e[n]=x(t[n],n,r,i,o);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,e),C(e,t,r,i,o),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return i.set(t,e),C(e,t,r,i,o),e}if("undefined"!=typeof Blob&&t instanceof Blob){const e=new Blob([t],{type:t.type});return i.set(t,e),C(e,t,r,i,o),e}if(t instanceof Error){const e=structuredClone(t);return i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,C(e,t,r,i,o),e}if(t instanceof Boolean){const e=new Boolean(t.valueOf());return i.set(t,e),C(e,t,r,i,o),e}if(t instanceof Number){const e=new Number(t.valueOf());return i.set(t,e),C(e,t,r,i,o),e}if(t instanceof String){const e=new String(t.valueOf());return i.set(t,e),C(e,t,r,i,o),e}if("object"==typeof t&&function(t){switch((0,y.b)(t)){case m.R_:case m.Uw:case m.cT:case m.iq:case m.$V:case m.vC:case m.ri:case m.ML:case m.XZ:case m.i1:case m._u:case m.pj:case m.kj:case m.GX:case m.Av:case m.NA:case m.OG:case m.VP:case m.Qb:case m.q:case m.x6:case m.ZR:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return i.set(t,e),C(e,t,r,i,o),e}return t}function C(t,e,r=t,i,o){const n=[...Object.keys(e),...u(e)];for(let a=0;a<n.length;a++){const s=n[a],l=Object.getOwnPropertyDescriptor(t,s);(null==l||l.writable)&&(t[s]=x(e[s],s,r,i,o))}}function b(t,e){return function(t,e){return x(t,void 0,t,new Map,e)}(t,(r,i,o,n)=>{const a=e?.(r,i,o,n);if(void 0!==a)return a;if("object"==typeof t){if("[object Object]"===(0,y.b)(t)&&"function"!=typeof t.constructor){const e={};return n.set(t,e),C(e,t,o,n),e}switch(Object.prototype.toString.call(t)){case m.kj:case m.OG:case m.$V:{const e=new t.constructor(t?.valueOf());return C(e,t),e}case m.R_:{const e={};return C(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}function k(t){return b(t)}var w=r(14608);function S(t){return"object"==typeof t&&null!==t}var T=r(30622);function v(t){return S(t)&&(0,T.X)(t)}var B=r(19663);function _(t,e,r,i){if((0,c.s)(t)&&(t=Object(t)),null==e||"object"!=typeof e)return t;if(i.has(e))return function(t){if((0,c.s)(t))return t;if(Array.isArray(t)||(0,d.i)(t)||t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);const r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let e;return e=t instanceof AggregateError?new r(t.errors,t.message,{cause:t.cause}):new r(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}return"undefined"!=typeof File&&t instanceof File?new r([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):t}(i.get(e));if(i.set(e,t),Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]=e[t]??void 0}const o=[...Object.keys(e),...u(e)];for(let n=0;n<o.length;n++){const a=o[n];if(g(a))continue;let s=e[a],l=t[a];if((0,w.N)(s)&&(s={...s}),(0,w.N)(l)&&(l={...l}),(0,p.P)(s)&&(s=k(s)),Array.isArray(s))if(Array.isArray(l)){const t=[],e=Reflect.ownKeys(l);for(let r=0;r<e.length;r++){const i=e[r];t[i]=l[i]}l=t}else if(v(l)){const t=[];for(let e=0;e<l.length;e++)t[e]=l[e];l=t}else l=[];const h=r(l,s,a,t,e,i);void 0!==h?t[a]=h:Array.isArray(s)||S(l)&&S(s)&&(f(l)||f(s)||(0,B.i)(l)||(0,B.i)(s))?t[a]=_(l,s,r,i):null==l&&f(s)?t[a]=_({},s,r,i):null==l&&(0,B.i)(s)?t[a]=k(s):void 0!==l&&void 0===s||(t[a]=s)}return t}function A(t,...e){return function(t,...e){const r=e.slice(0,-1),i=e[e.length-1];let o=t;for(let t=0;t<r.length;t++)o=_(o,r[t],i,new Map);return o}(t,...e,h)}var L="​",F={curveBasis:s.qrM,curveBasisClosed:s.Yu4,curveBasisOpen:s.IA3,curveBumpX:s.Wi0,curveBumpY:s.PGM,curveBundle:s.OEq,curveCardinalClosed:s.olC,curveCardinalOpen:s.IrU,curveCardinal:s.y8u,curveCatmullRomClosed:s.Q7f,curveCatmullRomOpen:s.cVp,curveCatmullRom:s.oDi,curveLinear:s.lUB,curveLinearClosed:s.Lx9,curveMonotoneX:s.nVG,curveMonotoneY:s.uxU,curveNatural:s.Xf2,curveStep:s.GZz,curveStepAfter:s.UPb,curveStepBefore:s.dyv},M=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,E=(0,n.K)(function(t,e){const r=$(t,/(?:init\b)|(?:initialize\b)/);let o={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,i.$i)(t),o=(0,i.hH)(o,[...t])}else o=r.args;if(!o)return;let n=(0,i.Ch)(t,e);const a="config";return void 0!==o[a]&&("flowchart-v2"===n&&(n="flowchart"),o[n]=o[a],delete o[a]),o},"detectInit"),$=(0,n.K)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${M.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(r,"").replace(/'/gm,'"'),o.R.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const a=[];for(;null!==(n=i.DB.exec(t));)if(n.index===i.DB.lastIndex&&i.DB.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;a.push({type:t,args:e})}return 0===a.length?{type:t,args:null}:1===a.length?a[0]:a}catch(r){return o.R.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),O=(0,n.K)(function(t){return t.replace(i.DB,"")},"removeDirectives"),I=(0,n.K)(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function D(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return F[r]??e}function q(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,a.J)(r):r}(0,n.K)(D,"interpolateToCurve"),(0,n.K)(q,"formatUrl");var R=(0,n.K)((t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let a=window;for(let e=0;e<i;e++)if(a=a[r[e]],!a)return void o.R.error(`Function name: ${t} not found in window`);a[n](...e)},"runFunc");function z(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function N(t){let e,r=0;t.forEach(t=>{r+=z(t,e),e=t});return W(t,r/2)}function K(t){return 1===t.length?t[0]:N(t)}(0,n.K)(z,"distance"),(0,n.K)(N,"traverseEdge"),(0,n.K)(K,"calcLabelPosition");var P=(0,n.K)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),W=(0,n.K)((t,e)=>{let r,i=e;for(const e of t){if(r){const t=z(e,r);if(0===t)return r;if(t<i)i-=t;else{const o=i/t;if(o<=0)return r;if(o>=1)return{x:e.x,y:e.y};if(o>0&&o<1)return{x:P((1-o)*r.x+o*e.x,5),y:P((1-o)*r.y+o*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),j=(0,n.K)((t,e,r)=>{o.R.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=W(e,25),n=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(a)*n+(e[0].x+i.x)/2,s.y=-Math.cos(a)*n+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function H(t,e,r){const i=structuredClone(r);o.R.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const n=W(i,25+t),a=10+.5*t,s=Math.atan2(i[0].y-n.y,i[0].x-n.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*a+(i[0].x+n.x)/2,l.y=-Math.cos(s+Math.PI)*a+(i[0].y+n.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*a+(i[0].x+n.x)/2-5,l.y=-Math.cos(s-Math.PI)*a+(i[0].y+n.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*a+(i[0].x+n.x)/2-5,l.y=-Math.cos(s)*a+(i[0].y+n.y)/2-5):(l.x=Math.sin(s)*a+(i[0].x+n.x)/2,l.y=-Math.cos(s)*a+(i[0].y+n.y)/2),l}function Y(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,n.K)(H,"calcTerminalLabelPosition"),(0,n.K)(Y,"getStylesFromArray");var U=0,X=(0,n.K)(()=>(U++,"id-"+Math.random().toString(36).substr(2,12)+"-"+U),"generateId");function G(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}(0,n.K)(G,"makeRandomHex");var V=(0,n.K)(t=>G(t.length),"random"),Z=(0,n.K)(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"),Q=(0,n.K)(function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,o]=ht(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",o),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),void 0!==e.class&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),n},"drawSimpleText"),J=l((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),i.Y2.lineBreakRegex.test(t))return t;const o=t.split(" ").filter(Boolean),n=[];let a="";return o.forEach((t,i)=>{const s=rt(`${t} `,r),l=rt(a,r);if(s>e){const{hyphenatedStrings:i,remainingWord:o}=tt(t,e,"-",r);n.push(a,...i),a=o}else l+s>=e?(n.push(a),a=t):a=[a,t].filter(Boolean).join(" ");i+1===o.length&&n.push(a)}),n.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),tt=l((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],n=[];let a="";return o.forEach((t,s)=>{const l=`${a}${t}`;if(rt(l,i)>=e){const t=s+1,e=o.length===t,i=`${l}${r}`;n.push(e?l:i),a=""}else a=l}),{hyphenatedStrings:n,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function et(t,e){return ot(t,e).height}function rt(t,e){return ot(t,e).width}(0,n.K)(et,"calculateTextHeight"),(0,n.K)(rt,"calculateTextWidth");var it,ot=l((t,e)=>{const{fontSize:r=12,fontFamily:o="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,a]=ht(r),l=["sans-serif",o],h=t.split(i.Y2.lineBreakRegex),c=[],d=(0,s.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const u=d.append("svg");for(const t of l){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of h){const o=Z();o.text=i||L;const s=Q(u,o).style("font-size",a).style("font-weight",n).style("font-family",t),l=(s._groups||s)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}c.push(r)}u.remove();return c[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]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),nt=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.K)(this,"InitIDGenerator")}},at=(0,n.K)(function(t){return it=it||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),it.innerHTML=t,unescape(it.textContent)},"entityDecode");function st(t){return"str"in t}(0,n.K)(st,"isDetailedError");var lt=(0,n.K)((t,e,r,i)=>{if(!i)return;const o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),ht=(0,n.K)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function ct(t,e){return A({},t,e)}(0,n.K)(ct,"cleanAndMerge");var dt={assignWithDepth:i.hH,wrapLabel:J,calculateTextHeight:et,calculateTextWidth:rt,calculateTextDimensions:ot,cleanAndMerge:ct,detectInit:E,detectDirective:$,isSubstringInArray:I,interpolateToCurve:D,calcLabelPosition:K,calcCardinalityPosition:j,calcTerminalLabelPosition:H,formatUrl:q,getStylesFromArray:Y,generateId:X,random:V,runFunc:R,entityDecode:at,insertTitle:lt,isLabelCoordinateInPath:yt,parseFontSize:ht,InitIDGenerator:nt},ut=(0,n.K)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),pt=(0,n.K)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),gt=(0,n.K)((t,e,{counter:r=0,prefix:i,suffix:o},n)=>n||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function ft(t){return t??null}function yt(t,e){const r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}(0,n.K)(ft,"handleUndefinedAttr"),(0,n.K)(yt,"isLabelCoordinateInPath")},3868(t,e,r){"use strict";r.d(e,{O:()=>a,X:()=>s});var i=r(28342),o=r(68861),n=r(86827),a=(0,n.K)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins");async function s(t,e){const r=t.getElementsByTagName("img");if(!r||0===r.length)return;const a=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",a){const e=(0,o.D7)().fontSize?(0,o.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[n=o.UI.fontSize]=(0,i.I5)(e),a=n*r+"px";t.style.minWidth=a,t.style.maxWidth=a}else t.style.width="100%";e(t)}(0,n.K)(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}(0,n.K)(s,"configureLabelImages")},8969(t,e,r){"use strict";r.d(e,{W:()=>Rt,G:()=>Wt});var i=r(24731),o=r(28342),n=r(68861),a=r(31293),s=r(86827),l=r(51444);function h(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var c={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function d(t){c=t}var u={exec:()=>null};function p(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(f.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var g=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),f={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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},y=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,m=/(?:[*+-]|\d{1,9}[.)])/,x=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,C=p(x).replace(/bull/g,m).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(),b=p(x).replace(/bull/g,m).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(),k=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,w=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,S=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",w).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),T=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,m).getRegex(),v="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",B=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_=p("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",B).replace("tag",v).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),A=p(k).replace("hr",y).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",v).getRegex(),L={blockquote:p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",A).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:S,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:y,html:_,lheading:C,list:T,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:A,table:u,text:/^[^\n]+/},F=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",v).getRegex(),M={...L,lheading:b,table:F,paragraph:p(k).replace("hr",y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",F).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",v).getRegex()},E={...L,html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",B).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:u,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(k).replace("hr",y).replace("heading"," *#{1,6} *[^\n]").replace("lheading",C).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$=/^( {2,}|\\)\n(?!\s*$)/,O=/[\p{P}\p{S}]/u,I=/[\s\p{P}\p{S}]/u,D=/[^\s\p{P}\p{S}]/u,q=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,I).getRegex(),R=/(?!~)[\p{P}\p{S}]/u,z=p(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",g?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),N=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,K=p(N,"u").replace(/punct/g,O).getRegex(),P=p(N,"u").replace(/punct/g,R).getRegex(),W="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",j=p(W,"gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,I).replace(/punct/g,O).getRegex(),H=p(W,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,R).getRegex(),Y=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,I).replace(/punct/g,O).getRegex(),U=p(/\\(punct)/,"gu").replace(/punct/g,O).getRegex(),X=p(/^<(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(),G=p(B).replace("(?:--\x3e|$)","--\x3e").getRegex(),V=p("^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",G).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Q=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Z).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J=p(/^!?\[(label)\]\[(ref)\]/).replace("label",Z).replace("ref",w).getRegex(),tt=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",w).getRegex(),et=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,rt={_backpedal:u,anyPunctuation:U,autolink:X,blockSkip:z,br:$,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:u,emStrongLDelim:K,emStrongRDelimAst:j,emStrongRDelimUnd:Y,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Q,nolink:tt,punctuation:q,reflink:J,reflinkSearch:p("reflink|nolink(?!\\()","g").replace("reflink",J).replace("nolink",tt).getRegex(),tag:V,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:u},it={...rt,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",Z).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z).getRegex()},ot={...rt,emStrongRDelimAst:H,emStrongLDelim:P,url:p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",et).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:p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",et).getRegex()},nt={...ot,br:p($).replace("{2,}","*").getRegex(),text:p(ot.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},at={normal:L,gfm:M,pedantic:E},st={normal:rt,gfm:ot,breaks:nt,pedantic:it},lt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ht=t=>lt[t];function ct(t,e){if(e){if(f.escapeTest.test(t))return t.replace(f.escapeReplace,ht)}else if(f.escapeTestNoEncode.test(t))return t.replace(f.escapeReplaceNoEncode,ht);return t}function dt(t){try{t=encodeURI(t).replace(f.percentDecode,"%")}catch{return null}return t}function ut(t,e){let r=t.replace(f.findPipe,(t,e,r)=>{let i=!1,o=e;for(;--o>=0&&"\\"===r[o];)i=!i;return i?"|":" |"}).split(f.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(f.slashPipe,"|");return r}function pt(t,e,r){let i=t.length;if(0===i)return"";let o=0;for(;o<i;){let n=t.charAt(i-o-1);if(n!==e||r){if(n===e||!r)break;o++}else o++}return t.slice(0,i-o)}function gt(t,e,r,i,o){let n=e.href,a=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:n,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}var ft=class{options;rules;lexer;constructor(t){this.options=t||c}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:pt(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let o=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=o.length?t.slice(o.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=pt(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:pt(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=pt(e[0],"\n").split("\n"),r="",i="",o=[];for(;t.length>0;){let e,n=!1,a=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))a.push(t[e]),n=!0;else{if(n)break;a.push(t[e])}t=t.slice(e);let s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=h,0===t.length)break;let c=o.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let e=c,n=e.raw+"\n"+t.join("\n"),a=this.blockquote(n);o[o.length-1]=a,r=r.substring(0,r.length-e.raw.length)+a.raw,i=i.substring(0,i.length-e.text.length)+a.text;break}if("list"===c?.type){let e=c,n=e.raw+"\n"+t.join("\n"),a=this.list(n);o[o.length-1]=a,r=r.substring(0,r.length-c.raw.length)+a.raw,i=i.substring(0,i.length-e.raw.length)+a.raw,t=n.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let n=this.rules.other.listItemRegex(r),a=!1;for(;t;){let r=!1,i="",s="";if(!(e=n.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),n=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;t;){let u,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),u=h):u=h.replace(this.rules.other.tabCharGlobal," "),o.test(h)||n.test(h)||a.test(h)||e.test(h)||r.test(h))break;if(u.search(this.rules.other.nonSpaceChar)>=d||!h.trim())s+="\n"+u.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||n.test(l)||r.test(l))break;s+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=u.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(a=!0));let u,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(u="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:s,tokens:[]}),o.raw+=i}let s=o.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){let e=o.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=ut(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)this.rules.other.tableAlignRight.test(t)?n.align.push("right"):this.rules.other.tableAlignCenter.test(t)?n.align.push("center"):this.rules.other.tableAlignLeft.test(t)?n.align.push("left"):n.align.push(null);for(let t=0;t<r.length;t++)n.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:n.align[t]});for(let t of o)n.rows.push(ut(t,n.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]})));return n}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=pt(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[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}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),gt(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return gt(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,o,n=[...i[0]].length-1,a=n,s=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(o=[...r].length,i[3]||i[4]){a+=o;continue}if((i[5]||i[6])&&n%3&&!((n+o)%3)){s+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+s);let e=[...i[0]][0].length,l=t.slice(0,n+i.index+e+o);if(Math.min(n,o)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},yt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||c,this.options.tokenizer=this.options.tokenizer||new ft,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:f,block:at.normal,inline:st.normal};this.options.pedantic?(e.block=at.pedantic,e.inline=st.pedantic):this.options.gfm&&(e.block=at.gfm,this.options.breaks?e.inline=st.breaks:e.inline=st.gfm),this.tokenizer.rules=e}static get rules(){return{block:at,inline:st}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(f.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(f.tabCharGlobal," ").replace(f.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let n=e.at(-1);r&&"paragraph"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,o=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let n=!1,a="";for(;t;){let r;if(n||(a=""),n=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,a)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),n=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},mt=class{options;parser;constructor(t){this.options=t||c}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(f.notSpaceStart)?.[0],o=t.replace(f.endingNewline,"")+"\n";return i?'<pre><code class="language-'+ct(i)+'">'+(r?o:ct(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:ct(o,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e<t.items.length;e++){let r=t.items[e];i+=this.listitem(r)}let o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+o+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+ct(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let i="";for(let e=0;e<t.rows.length;e++){let o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ct(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),o=dt(t);if(null===o)return i;let n='<a href="'+(t=o)+'"';return e&&(n+=' title="'+ct(e)+'"'),n+=">"+i+"</a>",n}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=dt(t);if(null===o)return ct(r);let n=`<img src="${t=o}" alt="${r}"`;return e&&(n+=` title="${ct(e)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ct(t.text)}},xt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Ct=class t{options;renderer;textRenderer;constructor(t){this.options=t||c,this.options.renderer=this.options.renderer||new mt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new xt}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){r+=e||"";continue}}let n=o;switch(n.type){case"space":r+=this.renderer.space(n);continue;case"hr":r+=this.renderer.hr(n);continue;case"heading":r+=this.renderer.heading(n);continue;case"code":r+=this.renderer.code(n);continue;case"table":r+=this.renderer.table(n);continue;case"blockquote":r+=this.renderer.blockquote(n);continue;case"list":r+=this.renderer.list(n);continue;case"html":r+=this.renderer.html(n);continue;case"def":r+=this.renderer.def(n);continue;case"paragraph":r+=this.renderer.paragraph(n);continue;case"text":{let o=n,a=this.renderer.text(o);for(;i+1<t.length&&"text"===t[i+1].type;)o=t[++i],a+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):a;continue}default:{let t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}let n=o;switch(n.type){case"escape":case"text":r+=e.text(n);break;case"html":r+=e.html(n);break;case"link":r+=e.link(n);break;case"image":r+=e.image(n);break;case"strong":r+=e.strong(n);break;case"em":r+=e.em(n);break;case"codespan":r+=e.codespan(n);break;case"br":r+=e.br(n);break;case"del":r+=e.del(n);break;default:{let t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},bt=class{options;block;constructor(t){this.options=t||c}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?yt.lex:yt.lexInline}provideParser(){return this.block?Ct.parse:Ct.parseInline}},kt=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ct;Renderer=mt;TextRenderer=xt;Lexer=yt;Tokenizer=ft;Hooks=bt;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let t=i;for(let i of t.header)r=r.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let t of i)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=i;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let o=t[i].flat(1/0);r=r.concat(this.walkTokens(o,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new mt(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,o=t.renderer[i],n=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new ft(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,o=t.tokenizer[i],n=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new bt;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,o=t.hooks[i],n=e[i];bt.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&bt.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(e,t);return n.call(e,r)})();let i=o.call(e,t);return n.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(e,t);return!1===r&&(r=await n.apply(e,t)),r})();let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return yt.lex(t,e??this.defaults)}parser(t,e){return Ct.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},o={...this.defaults,...i},n=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)return n(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 e>"u"||null===e)return n(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let r=o.hooks?await o.hooks.preprocess(e):e,i=await(o.hooks?await o.hooks.provideLexer():t?yt.lex:yt.lexInline)(r,o),n=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(n,o.walkTokens));let a=await(o.hooks?await o.hooks.provideParser():t?Ct.parse:Ct.parseInline)(n,o);return o.hooks?await o.hooks.postprocess(a):a})().catch(n);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?yt.lex:yt.lexInline)(e,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():t?Ct.parse:Ct.parseInline)(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(t){return n(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+ct(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function wt(t,e){return kt.parse(t,e)}wt.options=wt.setOptions=function(t){return kt.setOptions(t),wt.defaults=kt.defaults,d(wt.defaults),wt},wt.getDefaults=h,wt.defaults=c,wt.use=function(...t){return kt.use(...t),wt.defaults=kt.defaults,d(wt.defaults),wt},wt.walkTokens=function(t,e){return kt.walkTokens(t,e)},wt.parseInline=kt.parseInline,wt.Parser=Ct,wt.parser=Ct.parse,wt.Renderer=mt,wt.TextRenderer=xt,wt.Lexer=yt,wt.lexer=yt.lex,wt.Tokenizer=ft,wt.Hooks=bt,wt.parse=wt;wt.options,wt.setOptions,wt.use,wt.walkTokens,wt.parseInline,Ct.parse,yt.lex;var St=r(84146);function Tt(t,{markdownAutoWrap:e}){const r=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n");return(0,St.T)(r)}function vt(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function Bt(t,e={}){const r=Tt(t,e),i=wt.lexer(r),o=[[]];let n=0;function a(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(n++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/&#39;/g,"'"))&&o[n].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{a(e,t.type)}):"html"===t.type&&o[n].push({content:t.text,type:"normal"})}return(0,s.K)(a,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{a(t)}):"html"===t.type?o[n].push({content:t.text,type:"normal"}):o[n].push({content:t.raw,type:"normal"})}),o}function _t(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function At(t,{markdownAutoWrap:e}={}){const r=wt.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.R.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,s.K)(i,"output"),r.map(i).join("")}function Lt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Ft(t,e){return Mt(t,[],Lt(e.content),e.type)}function Mt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[o,...n]=r,a=[...e,o];return t([{content:a.join(""),type:i}])?Mt(t,a,n,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Et(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return $t(t,e)}function $t(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());const n=t.shift()??{content:" ",type:"normal"},a=[...i];if(""!==o&&a.push({content:o,type:"normal"}),a.push(n),e(a))return $t(t,e,r,a);if(i.length>0)r.push(i),t.unshift(n);else if(n.content){const[i,o]=Ft(e,n);r.push([i]),o.content&&t.unshift(o)}return $t(t,e,r)}function Ot(t,e){e&&t.attr("style",e)}(0,s.K)(Tt,"preprocessMarkdown"),(0,s.K)(vt,"nonMarkdownToLines"),(0,s.K)(Bt,"markdownToLines"),(0,s.K)(_t,"nonMarkdownToHTML"),(0,s.K)(At,"markdownToHTML"),(0,s.K)(Lt,"splitTextToChars"),(0,s.K)(Ft,"splitWordToFitWidth"),(0,s.K)(Mt,"splitWordToFitWidthRecursion"),(0,s.K)(Et,"splitLineToFitWidth"),(0,s.K)($t,"splitLineToFitWidthRecursion"),(0,s.K)(Ot,"applyStyle");async function It(t,e,r,i,o=!1,a=(0,n.zj)()){const s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,16384)}px`),s.attr("height",`${Math.min(10*r,16384)}px`);const l=s.append("xhtml:div"),h=(0,n.Wi)(e.label)?await(0,n.dj)(e.label.replace(n.Y2.lineBreakRegex,"\n"),a):(0,n.jZ)(e.label,a),c=e.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(h),Ot(d,e.labelStyle),d.attr("class",`${c} ${i}`),Ot(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&l.attr("class","labelBkg");let u=l.node().getBoundingClientRect();return u.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),u=l.node().getBoundingClientRect()),s.node()}function Dt(t,e,r,i=!1){const o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function qt(t,e,r){const i=t.append("text"),o=Dt(i,1,e);Kt(o,r);const n=o.node().getComputedTextLength();return i.remove(),n}function Rt(t,e,r){const i=t.append("text"),o=Dt(i,1,e);Kt(o,[{content:r,type:"normal"}]);const n=o.node()?.getBoundingClientRect();return n&&i.remove(),n}function zt(t,e,r,i=!1,o=!1){const n=e.append("g"),a=n.insert("rect").attr("class","background").attr("style","stroke: none"),l=n.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let h=0;for(const e of r){const r=(0,s.K)(e=>qt(n,1.1,e)<=t,"checkWidth"),i=r(e)?[e]:Et(e,r);for(const t of i){Kt(Dt(l,h,1.1,o),t),h++}}if(i){const t=l.node().getBBox(),e=2;return a.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),n.node()}return l.node()}function Nt(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function Kt(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(Nt(e.content)):i.text(" "+Nt(e.content))})}async function Pt(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,o,a)=>(r.push((async()=>{const r=`${o}:${a}`;return await(0,i.dn)(r)?await(0,i.WY)(r,void 0,{class:"label-icon"}):`<i class='${(0,n.jZ)(t,e).replace(":"," ")}'></i>`})()),t));const o=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>o.shift()??"")}(0,s.K)(It,"addHtmlSpan"),(0,s.K)(Dt,"createTspan"),(0,s.K)(qt,"computeWidthOfText"),(0,s.K)(Rt,"computeDimensionOfText"),(0,s.K)(zt,"createFormattedText"),(0,s.K)(Nt,"decodeHTMLEntities"),(0,s.K)(Kt,"updateTextContentAndStyles"),(0,s.K)(Pt,"replaceIconSubstring");var Wt=(0,s.K)(async(t,e="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:h=!0,markdown:c=!0,isNode:d=!0,width:u=200,addSvgBackground:p=!1}={},g)=>{if(a.R.debug("XYZ createText",e,r,i,s,h,d,"addSvgBackground: ",p),h){const i=c?At(e,g):_t(e),a=await Pt((0,o.Sm)(i),g),l=e.replace(/\\\\/g,"\\"),h={isNode:d,label:(0,n.Wi)(e)?l:a,labelStyle:r.replace("fill:","color:")};return await It(t,h,u,s,p,g)}{const n=(0,o.Sm)(e.replace(/<br\s*\/?>/g,"<br/>")),a=zt(u,t,c?Bt(n.replace("<br>","<br/>"),g):vt(n),!!e&&p,!d);if(d){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,l.Ltv)(a).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,l.Ltv)(a).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,l.Ltv)(a).select("text").attr("style",e)}return i?(0,l.Ltv)(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,l.Ltv)(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a}},"createText")},37851(t,e,r){"use strict";r.d(e,{D:()=>a});var i=r(68861),o=r(86827),n=r(51444),a=(0,o.K)(t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,n.Ltv)("body");if("sandbox"===e){const e=(0,n.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,n.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},68861(t,e,r){"use strict";r.d(e,{C0:()=>wt,xA:()=>dt,hH:()=>m,Dl:()=>Vt,IU:()=>ge,Wt:()=>he,Y2:()=>Jt,a$:()=>re,KG:()=>ne,sb:()=>Q,ME:()=>ve,UI:()=>U,Ch:()=>Tt,mW:()=>St,DB:()=>bt,_3:()=>J,EJ:()=>Ct,m7:()=>xe,iN:()=>ye,zj:()=>ht,D7:()=>Se,Gs:()=>Me,J$:()=>_t,ab:()=>be,E:()=>xt,Q2:()=>st,P$:()=>B,ID:()=>Nt,TM:()=>mt,Wi:()=>Gt,H1:()=>At,QO:()=>Wt,Js:()=>Fe,Xd:()=>vt,dj:()=>Qt,cL:()=>ut,Df:()=>Z,$i:()=>V,jZ:()=>Ot,oB:()=>Be,wZ:()=>nt,EI:()=>me,SV:()=>fe,Nk:()=>lt,XV:()=>Te,ke:()=>Ce,UU:()=>ot,ot:()=>ie,mj:()=>_e,tM:()=>le,H$:()=>P,B6:()=>at});var i=r(31293),o=r(86827),n=r(51931),a=r(8232);const s=(t,e)=>{const r=n.A.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return(0,a.A)(t,i)};var l=r(25582);const h=(t,e,r=50)=>{const{r:i,g:o,b:a,a:s}=n.A.parse(t),{r:h,g:c,b:d,a:u}=n.A.parse(e),p=r/100,g=2*p-1,f=s-u,y=((g*f===-1?g:(g+f)/(1+g*f))+1)/2,m=1-y,x=i*y+h*m,C=o*y+c*m,b=a*y+d*m,k=s*p+u*(1-p);return(0,l.A)(x,C,b,k)},c=(t,e=100)=>{const r=n.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,h(r,t,e)};var d,u=r(75263),p=r(78041),g=r(5097),f=r(99418),y=(0,o.K)((t,e,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>y(t,e,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(o=>{"object"!=typeof e[o]||null===e[o]||void 0!==t[o]&&"object"!=typeof t[o]?(i||"object"!=typeof t[o]&&"object"!=typeof e[o])&&(t[o]=e[o]):(void 0===t[o]&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=y(t[o],e[o],{depth:r-1,clobber:i}))}),t)},"assignWithDepth"),m=y,x="#ffffff",C="#f2f2f2",b=(0,o.K)((t,e)=>s(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),k=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,p.A)(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||s(this.primaryColor,{h:64}),this.fillType3=this.fillType3||s(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||s(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||s(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||s(this.primaryColor,{h:128}),this.fillType7=this.fillType7||s(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||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-10}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||s(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??s(this.primaryColor,{l:-30}),this.venn2=this.venn2??s(this.secondaryColor,{l:-30}),this.venn3=this.venn3??s(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??s(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??s(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??s(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??s(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??s(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,dataLabelColor:this.xyChart?.dataLabelColor||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?(0,u.A)(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||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},w=(0,o.K)(t=>{const e=new k;return e.calculate(t),e},"getThemeVariables"),S=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=(0,u.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,u.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,l.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,l.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,p.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=(0,p.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,p.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,p.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=c(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=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(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||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.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 t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??(0,p.A)(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,dataLabelColor:this.xyChart?.dataLabelColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},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?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,p.A)(this.secondaryColor,20),this.git1=(0,p.A)(this.pie2||this.secondaryColor,20),this.git2=(0,p.A)(this.pie3||this.tertiaryColor,20),this.git3=(0,p.A)(this.pie4||s(this.primaryColor,{h:-30}),20),this.git4=(0,p.A)(this.pie5||s(this.primaryColor,{h:-60}),20),this.git5=(0,p.A)(this.pie6||s(this.primaryColor,{h:-90}),10),this.git6=(0,p.A)(this.pie7||s(this.primaryColor,{h:60}),10),this.git7=(0,p.A)(this.pie8||s(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||(0,p.A)("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||(0,p.A)("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||(0,p.A)("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||(0,p.A)("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||(0,p.A)(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||(0,p.A)(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,p.A)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,p.A)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},T=(0,o.K)(t=>{const e=new S;return e.calculate(t),e},"getThemeVariables"),v=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=s(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=(0,l.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||s(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||c(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||c(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,p.A)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,p.A)(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=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||s(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-30}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||s(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||s(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??s(this.primaryColor,{l:-30}),this.venn2=this.venn2??s(this.secondaryColor,{l:-30}),this.venn3=this.venn3??s(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??s(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??s(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??s(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??s(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??s(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||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||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,u.A)(c(this.git0),25),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},B=(0,o.K)(t=>{const e=new v;return e.calculate(t),e},"getThemeVariables"),_=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,p.A)("#cde498",10),this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.primaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=(0,u.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||s(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.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||(0,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,p.A)(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=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(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||s(this.primaryColor,{l:-30}),this.pie5=this.pie5||s(this.secondaryColor,{l:-30}),this.pie6=this.pie6||s(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||s(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??s(this.primaryColor,{l:-30}),this.venn2=this.venn2??s(this.secondaryColor,{l:-30}),this.venn3=this.venn3??s(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??s(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??s(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??s(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??s(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??s(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||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||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},A=(0,o.K)(t=>{const e=new _;return e.calculate(t),e},"getThemeVariables"),L=class{static{(0,o.K)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,p.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||(0,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=(0,p.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,p.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=(0,p.A)(this.contrast,30),this.sectionBkgColor2=(0,p.A)(this.contrast,30),this.taskBorderColor=(0,u.A)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,p.A)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,u.A)(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=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,dataLabelColor:this.xyChart?.dataLabelColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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=(0,u.A)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||s(this.primaryColor,{h:-30}),this.git4=this.pie5||s(this.primaryColor,{h:-60}),this.git5=this.pie6||s(this.primaryColor,{h:-90}),this.git6=this.pie7||s(this.primaryColor,{h:60}),this.git7=this.pie8||s(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},F=(0,o.K)(t=>{const e=new L;return e.calculate(t),e},"getThemeVariables"),M=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||s(t,{h:30}),this.cScale4=this.cScale4||s(t,{h:60}),this.cScale5=this.cScale5||s(t,{h:90}),this.cScale6=this.cScale6||s(t,{h:120}),this.cScale7=this.cScale7||s(t,{h:150}),this.cScale8=this.cScale8||s(t,{h:210,l:150}),this.cScale9=this.cScale9||s(t,{h:270}),this.cScale10=this.cScale10||s(t,{h:300}),this.cScale11=this.cScale11||s(t,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||s(t,{h:64}),this.fillType3=this.fillType3||s(e,{h:64}),this.fillType4=this.fillType4||s(t,{h:-64}),this.fillType5=this.fillType5||s(e,{h:-64}),this.fillType6=this.fillType6||s(t,{h:128}),this.fillType7=this.fillType7||s(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||s(t,{l:-10}),this.pie5=this.pie5||s(e,{l:-10}),this.pie6=this.pie6||s(r,{l:-10}),this.pie7=this.pie7||s(t,{h:60,l:-10}),this.pie8=this.pie8||s(t,{h:-60,l:-10}),this.pie9=this.pie9||s(t,{h:120,l:0}),this.pie10=this.pie10||s(t,{h:60,l:-20}),this.pie11=this.pie11||s(t,{h:-60,l:-20}),this.pie12=this.pie12||s(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||s(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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||t,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?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||s(t,{h:-30}),this.git4=this.git4||s(t,{h:-60}),this.git5=this.git5||s(t,{h:-90}),this.git6=this.git6||s(t,{h:60}),this.git7=this.git7||s(t,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},E=(0,o.K)(t=>{const e=new M;return e.calculate(t),e},"getThemeVariables"),$=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||s(this.primaryColor,{h:64}),this.fillType3=this.fillType3||s(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||s(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||s(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||s(this.primaryColor,{h:128}),this.fillType7=this.fillType7||s(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||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-10}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||s(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},O=(0,o.K)(t=>{const e=new $;return e.calculate(t),e},"getThemeVariables"),I=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=b("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=this.mainBkg;if(this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||s(t,{h:64}),this.fillType3=this.fillType3||s(e,{h:64}),this.fillType4=this.fillType4||s(t,{h:-64}),this.fillType5=this.fillType5||s(e,{h:-64}),this.fillType6=this.fillType6||s(t,{h:128}),this.fillType7=this.fillType7||s(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||s(t,{l:-10}),this.pie5=this.pie5||s(e,{l:-10}),this.pie6=this.pie6||s(r,{l:-10}),this.pie7=this.pie7||s(t,{h:60,l:-10}),this.pie8=this.pie8||s(t,{h:-60,l:-10}),this.pie9=this.pie9||s(t,{h:120,l:0}),this.pie10=this.pie10||s(t,{h:60,l:-20}),this.pie11=this.pie11||s(t,{h:-60,l:-20}),this.pie12=this.pie12||s(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||s(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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||t,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?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||s(t,{h:-30}),this.git4=this.git4||s(t,{h:-60}),this.git5=this.git5||s(t,{h:-90}),this.git6=this.git6||s(t,{h:60}),this.git7=this.git7||s(t,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},D=(0,o.K)(t=>{const e=new I;return e.calculate(t),e},"getThemeVariables"),q=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||s(this.primaryColor,{h:64}),this.fillType3=this.fillType3||s(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||s(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||s(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||s(this.primaryColor,{h:128}),this.fillType7=this.fillType7||s(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||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-10}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||s(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},R=(0,o.K)(t=>{const e=new q;return e.calculate(t),e},"getThemeVariables"),z=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||s(t,{h:64}),this.fillType3=this.fillType3||s(e,{h:64}),this.fillType4=this.fillType4||s(t,{h:-64}),this.fillType5=this.fillType5||s(e,{h:-64}),this.fillType6=this.fillType6||s(t,{h:128}),this.fillType7=this.fillType7||s(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||s(t,{l:-10}),this.pie5=this.pie5||s(e,{l:-10}),this.pie6=this.pie6||s(r,{l:-10}),this.pie7=this.pie7||s(t,{h:60,l:-10}),this.pie8=this.pie8||s(t,{h:-60,l:-10}),this.pie9=this.pie9||s(t,{h:120,l:0}),this.pie10=this.pie10||s(t,{h:60,l:-20}),this.pie11=this.pie11||s(t,{h:-60,l:-20}),this.pie12=this.pie12||s(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||s(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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||t,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?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||s(t,{h:-30}),this.git4=this.git4||s(t,{h:-60}),this.git5=this.git5||s(t,{h:-90}),this.git6=this.git6||s(t,{h:60}),this.git7=this.git7||s(t,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},N=(0,o.K)(t=>{const e=new z;return e.calculate(t),e},"getThemeVariables"),K=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=(0,u.A)(this["cScale"+t],75);const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||s(this.primaryColor,{h:64}),this.fillType3=this.fillType3||s(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||s(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||s(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||s(this.primaryColor,{h:128}),this.fillType7=this.fillType7||s(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||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-10}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||s(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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?(0,u.A)(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||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},P={base:{getThemeVariables:w},dark:{getThemeVariables:T},default:{getThemeVariables:B},forest:{getThemeVariables:A},neutral:{getThemeVariables:F},neo:{getThemeVariables:E},"neo-dark":{getThemeVariables:O},redux:{getThemeVariables:D},"redux-dark":{getThemeVariables:R},"redux-color":{getThemeVariables:N},"redux-dark-color":{getThemeVariables:(0,o.K)(t=>{const e=new K;return e.calculate(t),e},"getThemeVariables")}},W={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},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},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,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},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},j={...W,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:P.default.getThemeVariables(),sequence:{...W.sequence,messageFont:(0,o.K)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,o.K)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,o.K)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...W.gantt,tickInterval:void 0,useWidth:void 0},c4:{...W.c4,useWidth:void 0,personFont:(0,o.K)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...W.flowchart,inheritDir:!1},external_personFont:(0,o.K)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,o.K)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,o.K)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,o.K)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,o.K)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,o.K)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,o.K)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,o.K)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,o.K)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,o.K)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,o.K)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,o.K)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,o.K)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,o.K)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,o.K)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,o.K)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,o.K)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,o.K)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,o.K)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,o.K)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,o.K)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...W.pie,useWidth:984},xyChart:{...W.xyChart,useWidth:void 0},requirement:{...W.requirement,useWidth:void 0},packet:{...W.packet},eventmodeling:{...W.eventmodeling},treeView:{...W.treeView,useWidth:void 0},radar:{...W.radar},railroad:{...W.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...W.ishikawa},sankey:{...W.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...W.venn},cynefin:{...W.cynefin}},H=(0,o.K)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...H(t[i],"")]:[...r,e+i],[]),"keyify"),Y=new Set(H(j,"")),U=j,X={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},G=(0,o.K)((t,e)=>{for(const r of Object.keys(t)){const o=t[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||"string"!=typeof o||!e.test(o))&&(i.R.debug("sanitize deleting dictionary entry:",r,o),delete t[r])}},"sanitizeDictionaryConfig"),V=(0,o.K)(t=>{if(i.R.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>V(t));else{for(const e of Object.keys(t)){if(i.R.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Y.has(e)||null==t[e]){i.R.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){const r=X[e];r?G(t[e],r):(i.R.debug("sanitizing object",e),V(t[e]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const o of r)e.includes(o)&&(i.R.debug("sanitizing css option",e),t[e]=Z(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}i.R.debug("After sanitization",t)}},"sanitizeDirective"),Z=(0,o.K)(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),Q=Object.freeze(U),J=(0,o.K)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),tt=m({},Q),et=[],rt=m({},Q),it=(0,o.K)((t,e)=>{let r=m({},t),i={};for(const t of e)ct(t),i=m(i,t);if(r=m(r,i),i.theme&&i.theme in P){const t=m({},d),e=m(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in P&&(r.themeVariables=P[r.theme].getThemeVariables(e))}return yt(rt=r),rt},"updateCurrentConfig"),ot=(0,o.K)(t=>(tt=m({},Q),tt=m(tt,t),t.theme&&P[t.theme]&&(tt.themeVariables=P[t.theme].getThemeVariables(t.themeVariables)),it(tt,et),tt),"setSiteConfig"),nt=(0,o.K)(t=>{d=m({},t)},"saveConfigFromInitialize"),at=(0,o.K)(t=>(tt=m(tt,t),it(tt,et),tt),"updateSiteConfig"),st=(0,o.K)(()=>m({},tt),"getSiteConfig"),lt=(0,o.K)(t=>(yt(t),m(rt,t),ht()),"setConfig"),ht=(0,o.K)(()=>m({},rt),"getConfig"),ct=(0,o.K)(t=>{t&&(["secure",...tt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(i.R.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&ct(t[e])}))},"sanitize"),dt=(0,o.K)(t=>{V(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),et.push(t),it(tt,et)},"addDirective"),ut=(0,o.K)((t=tt)=>{it(t,et=[])},"reset"),pt={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."},gt={},ft=(0,o.K)(t=>{gt[t]||(i.R.warn(pt[t]),gt[t]=!0)},"issueWarning"),yt=(0,o.K)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ft("LAZY_LOAD_DEPRECATED")},"checkConfig"),mt=(0,o.K)(()=>{let t={};d&&(t=m(t,d));for(const e of et)t=m(t,e);return t},"getUserDefinedConfig"),xt=(0,o.K)(t=>(null!=t.flowchart?.htmlLabels&&ft("FLOWCHART_HTML_LABELS_DEPRECATED"),J(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Ct=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,bt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,kt=/\s*%%.*\n/gm,wt=class extends Error{static{(0,o.K)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},St={},Tt=(0,o.K)(function(t,e){t=t.replace(Ct,"").replace(bt,"").replace(kt,"\n");for(const[r,{detector:i}]of Object.entries(St)){if(i(t,e))return r}throw new wt(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),vt=(0,o.K)((...t)=>{for(const{id:e,detector:r,loader:i}of t)Bt(e,r,i)},"registerLazyLoadedDiagrams"),Bt=(0,o.K)((t,e,r)=>{St[t]&&i.R.warn(`Detector with key ${t} already exists. Overwriting.`),St[t]={detector:e,loader:r},i.R.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),_t=(0,o.K)(t=>St[t].loader,"getDiagramLoader"),At=/<br\s*\/?>/gi,Lt=(0,o.K)(t=>{if(!t)return[""];return zt(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Ft=(()=>{let t=!1;return()=>{t||(Mt(),t=!0)}})();function Mt(){const t="data-temp-href-target";f.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),f.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,o.K)(Mt,"setupDompurifyHooks");var Et=(0,o.K)(t=>{Ft();return f.A.sanitize(t)},"removeScript"),$t=(0,o.K)((t,e)=>{if(xt(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=Et(t):"loose"!==r&&(t=(t=(t=zt(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=Rt(t))}return t},"sanitizeMore"),Ot=(0,o.K)((t,e)=>t?t=e.dompurifyConfig?f.A.sanitize($t(t,e),e.dompurifyConfig).toString():f.A.sanitize($t(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),It=(0,o.K)((t,e)=>"string"==typeof t?Ot(t,e):t.flat().map(t=>Ot(t,e)),"sanitizeTextOrArray"),Dt=(0,o.K)(t=>At.test(t),"hasBreaks"),qt=(0,o.K)(t=>t.split(At),"splitBreaks"),Rt=(0,o.K)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),zt=(0,o.K)(t=>t.replace(At,"#br#"),"breakToPlaceholder"),Nt=(0,o.K)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Kt=(0,o.K)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Pt=(0,o.K)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),Wt=(0,o.K)(function(t){const e=t.split(/(,)/),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(","===i&&t>0&&t+1<e.length){const o=e[t-1],n=e[t+1];Ht(o,n)&&(i=o+","+n,t++,r.pop())}r.push(Yt(i))}return r.join("")},"parseGenericTypes"),jt=(0,o.K)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Ht=(0,o.K)((t,e)=>{const r=jt(t,"~"),i=jt(e,"~");return 1===r&&1===i},"shouldCombineSets"),Yt=(0,o.K)(t=>{const e=jt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),n=i.lastIndexOf("~");for(;-1!==o&&-1!==n&&o!==n;)i[o]="<",i[n]=">",o=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Ut=(0,o.K)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Xt=/\$\$(.*?)\$\$/g,Gt=(0,o.K)(t=>(t.match(Xt)?.length??0)>0,"hasKatex"),Vt=(0,o.K)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Qt(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Zt=(0,o.K)(async(t,e)=>{if(!Gt(t))return t;if(!(Ut()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Xt,"MathML is unsupported in this environment.");{const{default:i}=await r.e(2130).then(r.bind(r,99749)),o=e.forceLegacyMathML||!Ut()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(At).map(t=>Gt(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Xt,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:o}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Qt=(0,o.K)(async(t,e)=>Ot(await Zt(t,e),e),"renderKatexSanitized"),Jt={getRows:Lt,sanitizeText:Ot,sanitizeTextOrArray:It,hasBreaks:Dt,splitBreaks:qt,lineBreakRegex:At,removeScript:Et,getUrl:Nt,evaluate:J,getMax:Kt,getMin:Pt},te=(0,o.K)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),ee=(0,o.K)(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"),re=(0,o.K)(function(t,e,r,i){const o=ee(e,r,i);te(t,o)},"configureSvgSize"),ie=(0,o.K)(function(t,e,r,o){const n=e.node().getBBox(),a=n.width,s=n.height;i.R.info(`SVG bounds: ${a}x${s}`,n);let l=0,h=0;i.R.info(`Graph bounds: ${l}x${h}`,t),l=a+2*r,h=s+2*r,i.R.info(`Calculated bounds: ${l}x${h}`),re(e,h,l,o);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),oe={};function ne(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}(0,o.K)(ne,"cssStyleSheetToString");var ae=(0,o.K)((t,e,r,o)=>{let n="";return t in oe&&oe[t]?n=oe[t]({...r,svgId:o}):i.R.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${n}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n [data-look="neo"].swimlane.cluster rect {\n filter: none;\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),se=(0,o.K)((t,e)=>{void 0!==e&&(oe[t]=e)},"addStylesForDiagram"),le=ae,he={};(0,o.V)(he,{clear:()=>ge,getAccDescription:()=>xe,getAccTitle:()=>ye,getDiagramTitle:()=>be,setAccDescription:()=>me,setAccTitle:()=>fe,setDiagramTitle:()=>Ce});var ce="",de="",ue="",pe=(0,o.K)(t=>Ot(t,ht()),"sanitizeText"),ge=(0,o.K)(()=>{ce="",ue="",de=""},"clear"),fe=(0,o.K)(t=>{ce=pe(t).replace(/^\s+/g,"")},"setAccTitle"),ye=(0,o.K)(()=>ce,"getAccTitle"),me=(0,o.K)(t=>{ue=pe(t).replace(/\n\s+/g,"\n")},"setAccDescription"),xe=(0,o.K)(()=>ue,"getAccDescription"),Ce=(0,o.K)(t=>{de=pe(t)},"setDiagramTitle"),be=(0,o.K)(()=>de,"getDiagramTitle"),ke=i.R,we=i.H,Se=ht,Te=lt,ve=Q,Be=(0,o.K)(t=>Ot(t,Se()),"sanitizeText"),_e=ie,Ae=(0,o.K)(()=>he,"getCommonDb"),Le={},Fe=(0,o.K)((t,e,r)=>{Le[t]&&ke.warn(`Diagram with id ${t} already registered. Overwriting.`),Le[t]=e,r&&Bt(t,r),se(t,e.styles),e.injectUtils?.(ke,we,Se,Be,_e,Ae(),()=>{})},"registerDiagram"),Me=(0,o.K)(t=>{if(t in Le)return Le[t];throw new Ee(t)},"getDiagram"),Ee=class extends Error{static{(0,o.K)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},31293(t,e,r){"use strict";r.d(e,{H:()=>s,R:()=>a});var i=r(86827),o=r(74353),n={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},a={trace:(0,i.K)((...t)=>{},"trace"),debug:(0,i.K)((...t)=>{},"debug"),info:(0,i.K)((...t)=>{},"info"),warn:(0,i.K)((...t)=>{},"warn"),error:(0,i.K)((...t)=>{},"error"),fatal:(0,i.K)((...t)=>{},"fatal")},s=(0,i.K)(function(t="fatal"){let e=n.fatal;"string"==typeof t?t.toLowerCase()in n&&(e=n[t]):"number"==typeof t&&(e=t),a.trace=()=>{},a.debug=()=>{},a.info=()=>{},a.warn=()=>{},a.error=()=>{},a.fatal=()=>{},e<=n.fatal&&(a.fatal=console.error?console.error.bind(console,l("FATAL"),"color: orange"):console.log.bind(console,"",l("FATAL"))),e<=n.error&&(a.error=console.error?console.error.bind(console,l("ERROR"),"color: orange"):console.log.bind(console,"",l("ERROR"))),e<=n.warn&&(a.warn=console.warn?console.warn.bind(console,l("WARN"),"color: orange"):console.log.bind(console,"",l("WARN"))),e<=n.info&&(a.info=console.info?console.info.bind(console,l("INFO"),"color: lightblue"):console.log.bind(console,"",l("INFO"))),e<=n.debug&&(a.debug=console.debug?console.debug.bind(console,l("DEBUG"),"color: lightgreen"):console.log.bind(console,"",l("DEBUG"))),e<=n.trace&&(a.trace=console.debug?console.debug.bind(console,l("TRACE"),"color: lightgreen"):console.log.bind(console,"",l("TRACE")))},"setLogLevel"),l=(0,i.K)(t=>`%c${o().format("ss.SSS")} : ${t} : `,"format")},86827(t,e,r){"use strict";r.d(e,{K:()=>o,V:()=>n});var i=Object.defineProperty,o=(t,e)=>i(t,"name",{value:e,configurable:!0}),n=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})}},75999(t,e,r){"use strict";r.d(e,{DA:()=>w,IU:()=>E,U:()=>M,U7:()=>Oe,U_:()=>De,Zk:()=>p,aP:()=>Me,gh:()=>Ie,lC:()=>f,on:()=>$e});var i=r(23665),o=r(3868),n=r(8969),a=r(24731),s=r(28342),l=r(68861),h=r(31293),c=r(86827),d=r(51444),u=r(61057),p=(0,c.K)(async(t,e,r)=>{let i;const a=e.useHtmlLabels||(0,l._3)((0,l.D7)()?.htmlLabels);i=r||"node default";const h=t.insert("g").attr("class",i).attr("id",e.domId||e.id),c=h.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle));let u;u=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=!!e.icon||!!e.img,g="markdown"===e.labelType,f=await(0,n.G)(c,(0,l.jZ)((0,s.Sm)(u),(0,l.D7)()),{useHtmlLabels:a,width:e.width||(0,l.D7)().flowchart?.wrappingWidth,classes:g?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:p,markdown:g},(0,l.D7)());let y=f.getBBox();const m=(e?.padding??0)/2;if(a){const t=f.children[0],e=(0,d.Ltv)(f);await(0,o.X)(t,u),y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return a?c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):c.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:h,bbox:y,halfPadding:m,label:c}},"labelHelper"),g=(0,c.K)(async(t,e,r)=>{const i=r.useHtmlLabels??(0,l.E)((0,l.D7)()),o=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await(0,n.G)(o,(0,l.jZ)((0,s.Sm)(e),(0,l.D7)()),{useHtmlLabels:i,width:r.width||(0,l.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let h=a.getBBox();const c=r.padding/2;if((0,l.E)((0,l.D7)())){const t=a.children[0],e=(0,d.Ltv)(a);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return i?o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):o.attr("transform","translate(0, "+-h.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:t,bbox:h,halfPadding:c,label:o}},"insertLabel"),f=(0,c.K)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),y=(0,c.K)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function m(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function x(t,e,r,i,o,n){const a=[],s=r-t,l=i-e,h=s/n,c=2*Math.PI/h,d=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*s,i=d+o*Math.sin(c*(r-t));a.push({x:r,y:i})}return a}function C(t,e,r,i,o,n){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let o=0;o<i;o++){const i=s+o*l,n=t+r*Math.cos(i),h=e+r*Math.sin(i);a.push({x:-n,y:-h})}return a}function b(t){const e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const o=e.find(t=>"none"!==t.getAttribute("fill")),n=e.find(t=>"none"!==t.getAttribute("stroke")),a=(0,c.K)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(o){const t={fill:a(o,"fill"),"fill-opacity":a(o,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(n){const t={stroke:a(n,"stroke"),"stroke-width":a(n,"stroke-width")??"1","stroke-opacity":a(n,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(r),s}(0,c.K)(m,"createPathFromPoints"),(0,c.K)(x,"generateFullSineWavePoints"),(0,c.K)(C,"generateCirclePoints"),(0,c.K)(b,"mergePaths");var k=(0,c.K)((t,e)=>{var r,i,o=t.x,n=t.y,a=e.x-o,s=e.y-n,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(a)*h?(s<0&&(h=-h),r=0===s?0:h*a/s,i=h):(a<0&&(l=-l),r=l,i=0===a?0:l*s/a),{x:o+r,y:n+i}},"intersectRect"),w=(0,c.K)(async(t,e,r,i=!1,o=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);const s=(0,l.D7)(),h=(0,l.E)(s);return await(0,n.G)(t,a,{style:r,isTitle:i,useHtmlLabels:h,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},s)},"createLabel"),S=(0,c.K)((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,0,0,1,t+r,e+o,"V",e+i-o,"A",o,o,0,0,1,t+r-o,e+i,"H",t+o,"A",o,o,0,0,1,t,e+i-o,"V",e+o,"A",o,o,0,0,1,t+o,e,"Z"].join(" "),"createRoundedRectPathD"),T=(0,c.K)(async(t,e)=>{const r=(0,l.D7)(),{themeVariables:o,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:c}=o,p=c,{labelStyles:g,nodeStyles:f,borderStyles:y,backgroundStyles:m}=(0,i.GX)(e),x=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look),C=(0,l._3)(r.flowchart.htmlLabels),b="LR"===e.direction,w=x.insert("g").attr("class","cluster-label swimlane-label"),S=await(0,n.G)(w,e.label,{style:e.labelStyle,useHtmlLabels:C,isNode:!0,width:e.width});let T=S.getBBox();if(C){const t=S.children[0],e=(0,d.Ltv)(S);T=t.getBoundingClientRect(),e.attr("width",T.width),e.attr("height",T.height)}const v=e.padding??0,B=e.width<=T.width+v?T.width+v:e.width;e.width<=T.width+v?e.diff=(B-e.width)/2-v:e.diff=-v;const _=e.height,A=e.y-_/2,L=e.y+_/2,F=e.x-B/2,M=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:A+_/3,E=b?4:0,$=T.height+2*E;let O,I;if(b){const t=Math.max($,T.height+2*E),r=F+t,o=Math.max(0,B-t);if("handDrawn"===e.look){const n=u.A.svg(x),l=(0,i.Fr)(e,{roughness:.7,fill:s,stroke:p,fillWeight:3,seed:a}),h=(0,i.Fr)(e,{roughness:.7,fill:"none",stroke:p,seed:a}),c=n.rectangle(F,A,t,_,l);O=x.insert(()=>c,":first-child");const d=n.rectangle(r,A,o,_,h);I=x.insert(()=>d,":first-child"),O.select("path:nth-child(2)").attr("style",y.join(";")),O.select("path").attr("style",m.join(";").replace("fill","stroke"))}else O=x.insert("rect",":first-child"),I=x.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",f).attr("x",F).attr("y",A).attr("width",t).attr("height",_).attr("fill",s).attr("stroke",p),I.attr("class","swimlane-body").attr("style",f).attr("x",r).attr("y",A).attr("width",o).attr("height",_).attr("fill","none").attr("stroke",p);const n=F+t/2,l=e.y;w.attr("transform",`translate(${n}, ${l}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{const t=Math.max(0,M-A),r=Math.min($,t),o=A+r,n=Math.max(0,L-o),l=e.x-B/2;if("handDrawn"===e.look){const t=u.A.svg(x),h=(0,i.Fr)(e,{roughness:.7,fill:s,stroke:p,fillWeight:3,seed:a}),c=(0,i.Fr)(e,{roughness:.7,fill:"none",stroke:p,seed:a}),d=t.rectangle(l,A,B,r,h);O=x.insert(()=>d,":first-child");const g=t.rectangle(l,o,B,n,c);I=x.insert(()=>g,":first-child"),O.select("path:nth-child(2)").attr("style",y.join(";")),O.select("path").attr("style",m.join(";").replace("fill","stroke"))}else O=x.insert("rect",":first-child"),I=x.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",f).attr("x",l).attr("y",A).attr("width",B).attr("height",r).attr("fill",s).attr("stroke",p),I.attr("class","swimlane-body").attr("style",f).attr("x",l).attr("y",o).attr("width",B).attr("height",n).attr("fill","none").attr("stroke",p);const h=e.x-T.width/2,c=A+(r-T.height)/2;w.attr("transform",`translate(${h}, ${c})`)}if(h.R.trace("Swimlane data ",e,JSON.stringify(e)),g){const t=w.select("span");t&&t.attr("style",g)}return e.offsetX=0,e.width=B,e.height=_,e.offsetY=T.height-v/2,e.intersect=function(t){return k(e,t)},{cluster:x,labelBBox:T}},"swimlane"),v=(0,c.K)(async(t,e)=>{h.R.info("Creating subgraph rect for ",e.id,e);const r=(0,l.D7)(),{themeVariables:a,handDrawnSeed:s}=r,{clusterBkg:c,clusterBorder:p}=a,{labelStyles:g,nodeStyles:f,borderStyles:y,backgroundStyles:m}=(0,i.GX)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),C=(0,l.E)(r),b=x.insert("g").attr("class","cluster-label ");let T;T="markdown"===e.labelType?await(0,n.G)(b,e.label,{style:e.labelStyle,useHtmlLabels:C,isNode:!0,width:e.width}):await w(b,e.label,e.labelStyle||"",!1,!0);let v=T.getBBox();if((0,l.E)(r)){const t=T.children[0],e=(0,d.Ltv)(T);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}const B=e.width<=v.width+e.padding?v.width+e.padding:e.width;e.width<=v.width+e.padding?e.diff=(B-e.width)/2-e.padding:e.diff=-e.padding;const _=e.height,A=e.x-B/2,L=e.y-_/2;let F;if(h.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=u.A.svg(x),r=(0,i.Fr)(e,{roughness:.7,fill:c,stroke:p,fillWeight:3,seed:s}),o=t.path(S(A,L,B,_,0),r);F=x.insert(()=>(h.R.debug("Rough node insert CXC",o),o),":first-child"),F.select("path:nth-child(2)").attr("style",y.join(";")),F.select("path").attr("style",m.join(";").replace("fill","stroke"))}else F=x.insert("rect",":first-child"),F.attr("style",f).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",L).attr("width",B).attr("height",_);const{subGraphTitleTopMargin:M}=(0,o.O)(r);if(b.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+M})`),g){const t=b.select("span");t&&t.attr("style",g)}const E=F.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=v.height-e.padding/2,e.intersect=function(t){return k(e,t)},{cluster:x,labelBBox:v}},"rect"),B=(0,c.K)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),o=0*e.padding,n=o/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+o).attr("height",e.height+o).attr("fill","none");const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(t){return k(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),_=(0,c.K)(async(t,e)=>{const r=(0,l.D7)(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:n,compositeBackground:a,compositeTitleBackground:s,nodeBorder:h}=i,c=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),p=c.insert("g",":first-child"),g=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const y=await w(g,e.label,e.labelStyle,void 0,!0);let m=y.getBBox();if((0,l.E)(r)){const t=y.children[0],e=(0,d.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}const x=0*e.padding,C=x/2,b=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+x;e.width<=m.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height+x,v=e.height+x-m.height-6,B=e.x-b/2,_=e.y-T/2;e.width=b;const A=e.y-e.height/2-C+m.height+2;let L;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=u.A.svg(c),i=e.rx||e.ry?r.path(S(B,_,b,T,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:h,seed:o}):r.rectangle(B,_,b,T,{seed:o});L=c.insert(()=>i,":first-child");const l=r.rectangle(B,A,b,v,{fill:t?n:a,fillStyle:t?"hachure":"solid",stroke:h,seed:o});L=c.insert(()=>i,":first-child"),f=c.insert(()=>l)}else{L=p.insert("rect",":first-child");const t="outer";L.attr("class",t).attr("x",B).attr("y",_).attr("width",b).attr("height",T).attr("data-look",e.look),f.attr("class","inner").attr("x",B).attr("y",A).attr("width",b).attr("height",v)}g.attr("transform",`translate(${e.x-m.width/2}, ${_+1-((0,l.E)(r)?0:3)})`);const F=L.node().getBBox();return e.height=F.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return k(e,t)},{cluster:c,labelBBox:m}},"roundedWithTitle"),A=(0,c.K)(async(t,e)=>{h.R.info("Creating subgraph rect for ",e.id,e);const r=(0,l.D7)(),{themeVariables:a,handDrawnSeed:s}=r,{clusterBkg:c,clusterBorder:p}=a,{labelStyles:g,nodeStyles:f,borderStyles:y,backgroundStyles:m}=(0,i.GX)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),C=(0,l.E)(r),b=x.insert("g").attr("class","cluster-label "),w=await(0,n.G)(b,e.label,{style:e.labelStyle,useHtmlLabels:C,isNode:!0,width:e.width});let T=w.getBBox();if((0,l.E)(r)){const t=w.children[0],e=(0,d.Ltv)(w);T=t.getBoundingClientRect(),e.attr("width",T.width),e.attr("height",T.height)}const v=e.width<=T.width+e.padding?T.width+e.padding:e.width;e.width<=T.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;const B=e.height,_=e.x-v/2,A=e.y-B/2;let L;if(h.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=u.A.svg(x),r=(0,i.Fr)(e,{roughness:.7,fill:c,stroke:p,fillWeight:4,seed:s}),o=t.path(S(_,A,v,B,e.rx),r);L=x.insert(()=>(h.R.debug("Rough node insert CXC",o),o),":first-child"),L.select("path:nth-child(2)").attr("style",y.join(";")),L.select("path").attr("style",m.join(";").replace("fill","stroke"))}else L=x.insert("rect",":first-child"),L.attr("style",f).attr("rx",e.rx).attr("ry",e.ry).attr("x",_).attr("y",A).attr("width",v).attr("height",B);const{subGraphTitleTopMargin:F}=(0,o.O)(r);if(b.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+F})`),g){const t=b.select("span");t&&t.attr("style",g)}const M=L.node().getBBox();return e.offsetX=0,e.width=M.width,e.height=M.height,e.offsetY=T.height-e.padding/2,e.intersect=function(t){return k(e,t)},{cluster:x,labelBBox:T}},"kanbanSection"),L={rect:v,squareRect:v,roundedWithTitle:_,noteGroup:B,divider:(0,c.K)((t,e)=>{const r=(0,l.D7)(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:n}=i,a=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),s=a.insert("g",":first-child"),h=0*e.padding,c=e.width+h;e.diff=-e.padding;const d=e.height+h,p=e.x-c/2,g=e.y-d/2;let f;if(e.width=c,"handDrawn"===e.look){const t=u.A.svg(a).rectangle(p,g,c,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:o});f=a.insert(()=>t,":first-child")}else{f=s.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),f.attr("class",t).attr("x",p).attr("y",g).attr("width",c).attr("height",d).attr("data-look",e.look)}const y=f.node().getBBox();return e.height=y.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return k(e,t)},{cluster:a,labelBBox:{}}},"divider"),kanbanSection:A,swimlane:T},F=new Map,M=(0,c.K)(async(t,e)=>{const r=e.shape||"rect",i=await L[r](t,e);return F.set(e.id,i),i},"insertCluster"),E=(0,c.K)(()=>{F=new Map},"clear");function $(t,e){return t.intersect(e)}(0,c.K)($,"intersectNode");var O=$;function I(t,e,r,i){var o=t.x,n=t.y,a=o-i.x,s=n-i.y,l=Math.sqrt(e*e*s*s+r*r*a*a),h=Math.abs(e*r*a/l);i.x<o&&(h=-h);var c=Math.abs(e*r*s/l);return i.y<n&&(c=-c),{x:o+h,y:n+c}}(0,c.K)(I,"intersectEllipse");var D=I;function q(t,e,r){return D(t,e,e,r)}(0,c.K)(q,"intersectCircle");var R=q;function z(t,e,r,i){{const o=e.y-t.y,n=t.x-e.x,a=e.x*t.y-t.x*e.y,s=o*r.x+n*r.y+a,l=o*i.x+n*i.y+a,h=1e-6;if(0!==s&&0!==l&&N(s,l))return;const c=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,p=c*t.x+d*t.y+u,g=c*e.x+d*e.y+u;if(Math.abs(p)<h&&Math.abs(g)<h&&N(p,g))return;const f=o*d-c*n;if(0===f)return;const y=Math.abs(f/2);let m=n*u-d*a;const x=m<0?(m-y)/f:(m+y)/f;m=c*a-o*u;return{x,y:m<0?(m-y)/f:(m+y)/f}}}function N(t,e){return t*e>0}(0,c.K)(z,"intersectLine"),(0,c.K)(N,"sameSign");var K=z;function P(t,e,r){let i=t.x,o=t.y,n=[],a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){a=Math.min(a,t.x),s=Math.min(s,t.y)}):(a=Math.min(a,e.x),s=Math.min(s,e.y));let l=i-t.width/2-a,h=o-t.height/2-s;for(let i=0;i<e.length;i++){let o=e[i],a=e[i<e.length-1?i+1:0],s=K(t,r,{x:l+o.x,y:h+o.y},{x:l+a.x,y:h+a.y});s&&n.push(s)}return n.length?(n.length>1&&n.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,n=Math.sqrt(i*i+o*o),a=e.x-r.x,s=e.y-r.y,l=Math.sqrt(a*a+s*s);return n<l?-1:n===l?0:1}),n[0]):t}(0,c.K)(P,"intersectPolygon");var W={node:O,circle:R,ellipse:D,polygon:P,rect:k};function j(t,e){const{labelStyles:r}=(0,i.GX)(e);e.labelStyle=r;const o=y(e);let n=o;o||(n="anchor");const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),{cssStyles:l}=e,c=u.A.svg(a),d=(0,i.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const p=c.circle(0,0,2,d),g=a.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",(0,s.KL)(l)),f(e,g),e.intersect=function(t){return h.R.info("Circle intersect",e,1,t),W.circle(e,1,t)},a}function H(t,e,r,i,o,n,a){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/o,d=(i-e)/2/n,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=s+p*n*Math.sin(h)*(a?-1:1),f=l-p*o*Math.cos(h)*(a?-1:1),y=Math.atan2((e-f)/n,(t-g)/o);let m=Math.atan2((i-f)/n,(r-g)/o)-y;a&&m<0&&(m+=2*Math.PI),!a&&m>0&&(m-=2*Math.PI);const x=[];for(let t=0;t<20;t++){const e=y+t/19*m,r=g+o*Math.cos(e),i=f+n*Math.sin(e);x.push({x:r,y:i})}return x}function Y(t,e,r){const[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function U(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n,l=(0,c.K)(t=>t+s,"calcTotalHeight"),h=(0,c.K)(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:d,bbox:g}=await p(t,e,y(e)),x=l(e?.height?e?.height:g.height),[C,b]=h(x),k=Y(x,C,b),w=(e?.width?e?.width:g.width)+2*a+k-k,S=x,{cssStyles:T}=e,v=[{x:w/2,y:-S/2},{x:-w/2,y:-S/2},...H(-w/2,-S/2,-w/2,S/2,C,b,!1),{x:w/2,y:S/2},...H(w/2,S/2,w/2,-S/2,C,b,!0)],B=u.A.svg(d),_=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const A=m(v),L=B.path(A,_),F=d.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),T&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",T),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(${C/2}, 0)`),f(e,F),e.intersect=function(t){return W.polygon(e,v,t)},d}function X(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,c.K)(j,"anchor"),(0,c.K)(H,"generateArcPoints"),(0,c.K)(Y,"calculateArcSagitta"),(0,c.K)(U,"bowTieRect"),(0,c.K)(X,"insertPolygonShape");async function G(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?28:n,s="neo"===e.look?24:n,{shapeSvg:l,bbox:h}=await p(t,e,y(e)),c=(e?.width??h.width)+("neo"===e.look?2*a:a+12),d=(e?.height??h.height)+("neo"===e.look?2*s:s),g=-d,x=[{x:12,y:g},{x:c,y:g},{x:c,y:0},{x:0,y:0},{x:0,y:g+12},{x:12,y:g}];let C;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=u.A.svg(l),r=(0,i.Fr)(e,{}),o=m(x),n=t.path(o,r);C=l.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),b&&C.attr("style",b)}else C=X(l,c,d,x);return o&&C.attr("style",o),f(e,C),e.intersect=function(t){return W.polygon(e,x,t)},l}function V(t,e){const{nodeStyles:r}=(0,i.GX)(e);e.label="";const o=t.insert("g").attr("class",y(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=u.A.svg(o),h=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=m(s),d=l.path(c,h),p=o.insert(()=>d,":first-child");return n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return W.polygon(e,s,t)},o}async function Z(t,e,r){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:a,bbox:l,halfPadding:c}=await p(t,e,y(e)),d=r?.padding??c,g="neo"===e.look?l.width/2+32:l.width/2+d;let m;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=u.A.svg(a),r=(0,i.Fr)(e,{}),o=t.circle(0,0,2*g,r);m=a.insert(()=>o,":first-child"),m.attr("class","basic label-container").attr("style",(0,s.KL)(x))}else m=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",g).attr("cx",0).attr("cy",0);return f(e,m),e.calcIntersect=function(t,e){const r=t.width/2;return W.circle(t,r,e)},e.intersect=function(t){return h.R.info("Circle intersect",e,g,t),W.circle(e,g,t)},a}function Q(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function J(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r,e.label="";const n=t.insert("g").attr("class",y(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,l=u.A.svg(n),c=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=l.circle(0,0,2*a,c),p=Q(a),g=l.path(p,c),m=n.insert(()=>d,":first-child");return m.insert(()=>g),m.attr("class","outer-path"),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",o),f(e,m),e.intersect=function(t){h.R.info("crossedCircle intersect",e,{radius:a,point:t});return W.circle(e,a,t)},n}function tt(t,e,r,i=100,o=0,n=180){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let o=0;o<i;o++){const i=s+o*l,n=t+r*Math.cos(i),h=e+r*Math.sin(i);a.push({x:-n,y:-h})}return a}async function et(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await p(t,e,y(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=a.width+l,d=a.height+h,g=Math.max(5,.1*d),{cssStyles:x}=e,C=[...tt(c/2,-d/2,g,30,-90,0),{x:-c/2-g,y:g},...tt(c/2+2*g,-g,g,20,-180,-270),...tt(c/2+2*g,g,g,20,-90,-180),{x:-c/2-g,y:-d/2},...tt(c/2,d/2,g,20,0,90)],b=[{x:c/2,y:-d/2-g},{x:-c/2,y:-d/2-g},...tt(c/2,-d/2,g,20,-90,0),{x:-c/2-g,y:-g},...tt(c/2+.1*c,-g,g,20,-180,-270),...tt(c/2+.1*c,g,g,20,-90,-180),{x:-c/2-g,y:d/2},...tt(c/2,d/2,g,20,0,90),{x:-c/2,y:d/2+g},{x:c/2,y:d/2+g}],k=u.A.svg(n),w=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=m(C).replace("Z",""),T=k.path(S,w),v=m(b),B=k.path(v,{...w}),_=n.insert("g",":first-child");return _.insert(()=>B,":first-child").attr("stroke-opacity",0),_.insert(()=>T,":first-child"),_.attr("class","text"),x&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",x),o&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",o),_.attr("transform",`translate(${g}, 0)`),s.attr("transform",`translate(${-c/2+g-(a.x-(a.left??0))},${-d/2+(e.padding??0)/2-(a.y-(a.top??0))})`),f(e,_),e.intersect=function(t){return W.polygon(e,b,t)},n}function rt(t,e,r,i=100,o=0,n=180){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let o=0;o<i;o++){const i=s+o*l,n=t+r*Math.cos(i),h=e+r*Math.sin(i);a.push({x:n,y:h})}return a}async function it(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await p(t,e,y(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=a.width+("neo"===e.look?2*l:l),d=a.height+("neo"===e.look?2*h:h),g=Math.max(5,.1*d),{cssStyles:x}=e,C=[...rt(c/2,-d/2,g,20,-90,0),{x:c/2+g,y:-g},...rt(c/2+2*g,-g,g,20,-180,-270),...rt(c/2+2*g,g,g,20,-90,-180),{x:c/2+g,y:d/2},...rt(c/2,d/2,g,20,0,90)],b=[{x:-c/2,y:-d/2-g},{x:c/2,y:-d/2-g},...rt(c/2,-d/2,g,20,-90,0),{x:c/2+g,y:-g},...rt(c/2+2*g,-g,g,20,-180,-270),...rt(c/2+2*g,g,g,20,-90,-180),{x:c/2+g,y:d/2},...rt(c/2,d/2,g,20,0,90),{x:c/2,y:d/2+g},{x:-c/2,y:d/2+g}],k=u.A.svg(n),w=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=m(C).replace("Z",""),T=k.path(S,w),v=m(b),B=k.path(v,{...w}),_=n.insert("g",":first-child");return _.insert(()=>B,":first-child").attr("stroke-opacity",0),_.insert(()=>T,":first-child"),_.attr("class","text"),x&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",x),o&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",o),_.attr("transform",`translate(${-g}, 0)`),s.attr("transform",`translate(${-c/2+(e.padding??0)/2-(a.x-(a.left??0))},${-d/2+(e.padding??0)/2-(a.y-(a.top??0))})`),f(e,_),e.intersect=function(t){return W.polygon(e,b,t)},n}function ot(t,e,r,i=100,o=0,n=180){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let o=0;o<i;o++){const i=s+o*l,n=t+r*Math.cos(i),h=e+r*Math.sin(i);a.push({x:-n,y:-h})}return a}async function nt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await p(t,e,y(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=a.width+("neo"===e.look?2*l:l),d=a.height+("neo"===e.look?2*h:h),g=Math.max(5,.1*d),{cssStyles:x}=e,C=[...ot(c/2,-d/2,g,30,-90,0),{x:-c/2-g,y:g},...ot(c/2+2*g,-g,g,20,-180,-270),...ot(c/2+2*g,g,g,20,-90,-180),{x:-c/2-g,y:-d/2},...ot(c/2,d/2,g,20,0,90)],b=[...ot(-c/2+g+g/2,-d/2,g,20,-90,-180),{x:c/2-g/2,y:g},...ot(-c/2-g/2,-g,g,20,0,90),...ot(-c/2-g/2,g,g,20,-90,0),{x:c/2-g/2,y:-g},...ot(-c/2+g+g/2,d/2,g,30,-180,-270)],k=[{x:c/2,y:-d/2-g},{x:-c/2,y:-d/2-g},...ot(c/2,-d/2,g,20,-90,0),{x:-c/2-g,y:-g},...ot(c/2+2*g,-g,g,20,-180,-270),...ot(c/2+2*g,g,g,20,-90,-180),{x:-c/2-g,y:d/2},...ot(c/2,d/2,g,20,0,90),{x:-c/2,y:d/2+g},{x:c/2-g-g/2,y:d/2+g},...ot(-c/2+g+g/2,-d/2,g,20,-90,-180),{x:c/2-g/2,y:g},...ot(-c/2-g/2,-g,g,20,0,90),...ot(-c/2-g/2,g,g,20,-90,0),{x:c/2-g/2,y:-g},...ot(-c/2+g+g/2,d/2,g,30,-180,-270)],w=u.A.svg(n),S=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=m(C).replace("Z",""),v=w.path(T,S),B=m(b).replace("Z",""),_=w.path(B,S),A=m(k),L=w.path(A,{...S}),F=n.insert("g",":first-child");return F.insert(()=>L,":first-child").attr("stroke-opacity",0),F.insert(()=>v,":first-child"),F.insert(()=>_,":first-child"),F.attr("class","text"),x&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",x),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(${g-g/4}, 0)`),s.attr("transform",`translate(${-c/2+(e.padding??0)/2-(a.x-(a.left??0))},${-d/2+(e.padding??0)/2-(a.y-(a.top??0))})`),f(e,F),e.intersect=function(t){return W.polygon(e,k,t)},n}async function at(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n,{shapeSvg:l,bbox:h}=await p(t,e,y(e)),c=Math.max(20,1.25*(h.width+2*a),e?.width??0),d=Math.max(5,h.height+2*s,e?.height??0),g=d/2,{cssStyles:x}=e,b=u.A.svg(l),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=c-g,S=d/4,T=[{x:w,y:0},{x:S,y:0},{x:0,y:d/2},{x:S,y:d},{x:w,y:d},...C(-w,-d/2,g,50,270,90)],v=m(T),B=b.path(v,k),_=l.insert(()=>B,":first-child");return _.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",x),o&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",o),_.attr("transform",`translate(${-c/2}, ${-d/2})`),f(e,_),e.intersect=function(t){return W.polygon(e,T,t)},l}(0,c.K)(G,"card"),(0,c.K)(V,"choice"),(0,c.K)(Z,"circle"),(0,c.K)(Q,"createLine"),(0,c.K)(J,"crossedCircle"),(0,c.K)(tt,"generateCirclePoints"),(0,c.K)(et,"curlyBraceLeft"),(0,c.K)(rt,"generateCirclePoints"),(0,c.K)(it,"curlyBraceRight"),(0,c.K)(ot,"generateCirclePoints"),(0,c.K)(nt,"curlyBraces"),(0,c.K)(at,"curvedTrapezoid");var st=(0,c.K)((t,e,r,i,o,n)=>[`M${t},${e+n}`,`a${o},${n} 0,0,0 ${r},0`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),lt=(0,c.K)((t,e,r,i,o,n)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),ht=(0,c.K)((t,e,r,i,o,n)=>[`M${t-r/2},${-i/2}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function ct(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?24:n,l="neo"===e.look?24:n;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-l,e.width<8&&(e.width=8);const r=t/2/(2.5+t/50);e.height=(e.height??0)-a-3*r,e.height<8&&(e.height=8)}const{shapeSvg:h,bbox:c,label:d}=await p(t,e,y(e)),g=(e.width?e.width:c.width)+l,m=g/2,x=m/(2.5+g/50),C=(e.height?e.height:c.height)+a+x;let b;const{cssStyles:k}=e;if("handDrawn"===e.look){const t=u.A.svg(h),r=lt(0,0,g,C,m,x),o=ht(0,x,g,C,m,x),n=(0,i.Fr)(e,{}),a=t.path(r,n),s=t.path(o,(0,i.Fr)(e,{fill:"none"}));b=h.insert(()=>s,":first-child"),b=h.insert(()=>a,":first-child"),b.attr("class","basic label-container"),k&&b.attr("style",k)}else{const t=st(0,0,g,C,m,x);b=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(k)).attr("style",o)}return b.attr("label-offset-y",x),b.attr("transform",`translate(${-g/2}, ${-(C/2+x)})`),f(e,b),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-c.height/2+(e.padding??0)/1.5-(c.y-(c.top??0))})`),e.intersect=function(t){const r=W.rect(e,t),i=r.x-(e.x??0);if(0!=m&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-x)){let o=x*x*(1-i*i/(m*m));o>0&&(o=Math.sqrt(o)),o=x-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},h}async function dt(t,e,r){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:a,bbox:l}=await p(t,e,y(e)),h=Math.max(l.width+2*r.labelPaddingX,e?.width||0),c=Math.max(l.height+2*r.labelPaddingY,e?.height||0),d=-h/2,g=-c/2;let m,{rx:x,ry:C}=e;const{cssStyles:b}=e;if(r?.rx&&r.ry&&(x=r.rx,C=r.ry),"handDrawn"===e.look){const t=u.A.svg(a),r=(0,i.Fr)(e,{}),o=x||C?t.path(S(d,g,h,c,x||0),r):t.rectangle(d,g,h,c,r);m=a.insert(()=>o,":first-child"),m.attr("class","basic label-container").attr("style",(0,s.KL)(b))}else m=a.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",n).attr("rx",(0,s.KL)(x)).attr("ry",(0,s.KL)(C)).attr("x",d).attr("y",g).attr("width",h).attr("height",c);return f(e,m),e.calcIntersect=function(t,e){return W.rect(t,e)},e.intersect=function(t){return W.rect(e,t)},a}async function ut(t,e){const{cssClasses:r,labelPaddingX:o,labelPaddingY:n,padding:a,width:s,height:l}=e,h={rx:0,ry:0,classes:r??"",labelPaddingX:o??2*(a??0),labelPaddingY:n??a??0},c=await dt(t,e,h);if("handDrawn"===e.look){const t=u.A.svg(c),r=(0,i.Fr)(e,{}),o=c.select(".basic.label-container > path:nth-child(2)"),n=o.node();if(!n)return c;let a=null;return n instanceof SVGGraphicsElement?(a=n.getBBox(),c.insert(()=>t.line(a.x,a.y,a.x+a.width,a.y,r),".basic.label-container g.label"),c.insert(()=>t.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,r),".basic.label-container g.label"),o.remove(),c):c}const d=c.select(".basic.label-container"),p=(Number(d.attr("width"))||s)??0,g=(Number(d.attr("height"))||l)??0;return p>0&&g>0&&d.attr("stroke-dasharray",`${p} ${g}`),c}async function pt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:l,label:h}=await p(t,e,y(e)),c=l.width+n,d=l.height+a,g=.2*d,m=-c/2,x=-d/2-g/2,{cssStyles:C}=e,b=u.A.svg(s),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:m,y:x+g},{x:-m,y:x+g},{x:-m,y:-x},{x:m,y:-x},{x:m,y:x},{x:-m,y:x},{x:-m,y:x+g}],S=b.polygon(w.map(t=>[t.x,t.y]),k),T=s.insert(()=>S,":first-child");return T.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",C),o&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",o),h.attr("transform",`translate(${m+(e.padding??0)/2-(l.x-(l.left??0))}, ${x+g+(e.padding??0)/2-(l.y-(l.top??0))})`),f(e,T),e.intersect=function(t){return W.rect(e,t)},s}async function gt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e),n="neo"===e.look?12:5;e.labelStyle=r;const a=e.padding??0,l="neo"===e.look?16:a,{shapeSvg:c,bbox:d}=await p(t,e,y(e)),g=(e?.width?e?.width/2:d.width/2)+(l??0),m=g-n;let x;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=u.A.svg(c),r=(0,i.Fr)(e,{roughness:.2,strokeWidth:2.5}),o=(0,i.Fr)(e,{roughness:.2,strokeWidth:1.5}),n=t.circle(0,0,2*g,r),a=t.circle(0,0,2*m,o);x=c.insert("g",":first-child"),x.attr("class",(0,s.KL)(e.cssClasses)).attr("style",(0,s.KL)(C)),x.node()?.appendChild(n),x.node()?.appendChild(a)}else{x=c.insert("g",":first-child");const t=x.insert("circle",":first-child"),e=x.insert("circle");x.attr("class","basic label-container").attr("style",o),t.attr("class","outer-circle").attr("style",o).attr("r",g).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",o).attr("r",m).attr("cx",0).attr("cy",0)}return f(e,x),e.intersect=function(t){return h.R.info("DoubleCircle intersect",e,g,t),W.circle(e,g,t)},c}function ft(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.label="",e.labelStyle=o;const a=t.insert("g").attr("class",y(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,l=u.A.svg(a),{nodeBorder:c}=r,d=(0,i.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const p=l.circle(0,0,14,d),g=a.insert(()=>p,":first-child");return g.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),f(e,g),e.intersect=function(t){h.R.info("filledCircle intersect",e,{radius:7,point:t});return W.circle(e,7,t)},a}(0,c.K)(ct,"cylinder"),(0,c.K)(dt,"drawRect"),(0,c.K)(ut,"datastore"),(0,c.K)(pt,"dividedRectangle"),(0,c.K)(gt,"doublecircle"),(0,c.K)(ft,"filledCircle");async function yt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?2*n:n;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-a-a/2,e.width<10&&(e.width=10));const{shapeSvg:s,bbox:l,label:c}=await p(t,e,y(e)),d=(e?.width?e?.width:l.width)+(a??0),g=e?.height?e?.height:d+l.height,x=[{x:0,y:-g},{x:g,y:-g},{x:g/2,y:0}],{cssStyles:C}=e,b=u.A.svg(s),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=m(x),S=b.path(w,k),T=s.insert(()=>S,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return C&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",C),o&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",o),e.width=d,e.height=g,f(e,T),c.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-g/2+(e.padding??0)/2+(l.y-(l.top??0))})`),e.intersect=function(t){return h.R.info("Triangle intersect",e,x,t),W.polygon(e,x,t)},s}function mt(t,e,{dir:r,config:{state:o,themeVariables:n}}){const{nodeStyles:a}=(0,i.GX)(e);e.label="";const s=t.insert("g").attr("class",y(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let h=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(h=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));const d=-1*h/2,p=-1*c/2,g=u.A.svg(s),m=(0,i.Fr)(e,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const x=g.rectangle(d,p,h,c,m),C=s.insert(()=>x,":first-child");l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),a&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",a),f(e,C);const b=o?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return W.rect(e,t)},s}async function xt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*n,e.width<15&&(e.width=15));const{shapeSvg:s,bbox:l}=await p(t,e,y(e)),c=(e?.width?e?.width:Math.max(15,l.width))+2*n,d=(e?.height?e?.height:Math.max(10,l.height))+2*a,g=d/2,{cssStyles:x}=e,b=u.A.svg(s),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:-c/2,y:-d/2},{x:c/2-g,y:-d/2},...C(-c/2+g,0,g,50,90,270),{x:c/2-g,y:d/2},{x:-c/2,y:d/2}],S=m(w),T=b.path(S,k),v=s.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),o&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",o),f(e,v),e.intersect=function(t){h.R.info("Pill intersect",e,{radius:g,point:t});return W.polygon(e,w,t)},s}(0,c.K)(yt,"flippedTriangle"),(0,c.K)(mt,"forkJoin"),(0,c.K)(xt,"halfRoundedRectangle");var Ct=(0,c.K)((t,e,r,i,o)=>[`M${t+o},${e}`,`L${t+r-o},${e}`,`L${t+r},${e-i/2}`,`L${t+r-o},${e-i}`,`L${t+o},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function bt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e),n="neo"===e.look?3.5:4;e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?70:a,l="neo"===e.look?32:a;if(e.width||e.height){const t=(e.height??0)/n;e.width=(e?.width??0)-2*t-l,e.height=(e.height??0)-s}const{shapeSvg:h,bbox:c}=await p(t,e,y(e)),d=(e?.height?e?.height:c.height)+s,g=d/n,m=(e?.width?e?.width:c.width)+2*g+l,x=[{x:g,y:0},{x:m-g,y:0},{x:m,y:-d/2},{x:m-g,y:-d},{x:g,y:-d},{x:0,y:-d/2}];let C;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=u.A.svg(h),r=(0,i.Fr)(e,{}),o=Ct(0,0,m,d,g),n=t.path(o,r);C=h.insert(()=>n,":first-child").attr("transform",`translate(${-m/2}, ${d/2})`),b&&C.attr("style",b)}else C=X(h,m,d,x);return o&&C.attr("style",o),e.width=m,e.height=d,f(e,C),e.intersect=function(t){return W.polygon(e,x,t)},h}async function kt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:n}=await p(t,e,y(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:l}=e,c=u.A.svg(n),d=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const g=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],x=m(g),C=c.path(x,d),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),b.attr("transform",`translate(${-a/2}, ${-s/2})`),f(e,b),e.intersect=function(t){h.R.info("Pill intersect",e,{points:g});return W.polygon(e,g,t)},n}async function wt(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:n}=(0,i.GX)(e);e.labelStyle=n;const s=e.assetHeight??48,l=e.assetWidth??48,c=Math.max(s,l),d=o?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:g,bbox:y,label:m}=await p(t,e,"icon-shape default"),x="t"===e.pos,C=c,b=c,{nodeBorder:k}=r,{stylesMap:w}=(0,i.WW)(e),S=-b/2,T=-C/2,v=e.label?8:0,B=u.A.svg(g),_=(0,i.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const A=B.rectangle(S,T,b,C,_),L=Math.max(b,y.width),F=C+y.height+v,M=B.rectangle(-L/2,-F/2,L,F,{..._,fill:"transparent",stroke:"none"}),E=g.insert(()=>A,":first-child"),$=g.insert(()=>M);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,n=r.x,s=r.y;t.attr("transform",`translate(${-i/2-n},${x?y.height/2+v/2-o/2-s:-y.height/2-v/2-o/2-s})`),t.attr("style",`color: ${w.get("stroke")??k};`)}return m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-F/2:F/2-y.height})`),E.attr("transform",`translate(0,${x?y.height/2+v/2:-y.height/2-v/2})`),f(e,$),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return W.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=x?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+v},{x:r+b/2,y:i-o/2+y.height+v},{x:r+b/2,y:i+o/2},{x:r-b/2,y:i+o/2},{x:r-b/2,y:i-o/2+y.height+v},{x:r-y.width/2,y:i-o/2+y.height+v}]:[{x:r-b/2,y:i-o/2},{x:r+b/2,y:i-o/2},{x:r+b/2,y:i-o/2+C},{x:r+y.width/2,y:i-o/2+C},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+C},{x:r-b/2,y:i-o/2+C}];return W.polygon(e,n,t)},g}async function St(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:n}=(0,i.GX)(e);e.labelStyle=n;const s=e.assetHeight??48,l=e.assetWidth??48,c=Math.max(s,l),d=o?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:g,bbox:y,label:m}=await p(t,e,"icon-shape default"),x=e.label?8:0,C="t"===e.pos,{nodeBorder:b,mainBkg:k}=r,{stylesMap:w}=(0,i.WW)(e),S=u.A.svg(g),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const v=w.get("fill");T.stroke=v??k;const B=g.append("g");e.icon&&B.html(`<g>${await(0,a.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const _=B.node().getBBox(),A=_.width,L=_.height,F=_.x,M=_.y,E=Math.max(A,L)*Math.SQRT2+40,$=S.circle(0,0,E,T),O=Math.max(E,y.width),I=E+y.height+x,D=S.rectangle(-O/2,-I/2,O,I,{...T,fill:"transparent",stroke:"none"}),q=g.insert(()=>$,":first-child"),R=g.insert(()=>D);return B.attr("transform",`translate(${-A/2-F},${C?y.height/2+x/2-L/2-M:-y.height/2-x/2-L/2-M})`),B.attr("style",`color: ${w.get("stroke")??b};`),m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${C?-I/2:I/2-y.height})`),q.attr("transform",`translate(0,${C?y.height/2+x/2:-y.height/2-x/2})`),f(e,R),e.intersect=function(t){h.R.info("iconSquare intersect",e,t);return W.rect(e,t)},g}async function Tt(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:n}=(0,i.GX)(e);e.labelStyle=n;const s=e.assetHeight??48,l=e.assetWidth??48,c=Math.max(s,l),d=o?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:g,bbox:y,halfPadding:m,label:x}=await p(t,e,"icon-shape default"),C="t"===e.pos,b=c+2*m,k=c+2*m,{nodeBorder:w,mainBkg:T}=r,{stylesMap:v}=(0,i.WW)(e),B=-k/2,_=-b/2,A=e.label?8:0,L=u.A.svg(g),F=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const M=v.get("fill");F.stroke=M??T;const E=L.path(S(B,_,k,b,5),F),$=Math.max(k,y.width),O=b+y.height+A,I=L.rectangle(-$/2,-O/2,$,O,{...F,fill:"transparent",stroke:"none"}),D=g.insert(()=>E,":first-child").attr("class","icon-shape2"),q=g.insert(()=>I);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,n=r.x,s=r.y;t.attr("transform",`translate(${-i/2-n},${C?y.height/2+A/2-o/2-s:-y.height/2-A/2-o/2-s})`),t.attr("style",`color: ${v.get("stroke")??w};`)}return x.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${C?-O/2:O/2-y.height})`),D.attr("transform",`translate(0,${C?y.height/2+A/2:-y.height/2-A/2})`),f(e,q),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return W.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=C?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+A},{x:r+k/2,y:i-o/2+y.height+A},{x:r+k/2,y:i+o/2},{x:r-k/2,y:i+o/2},{x:r-k/2,y:i-o/2+y.height+A},{x:r-y.width/2,y:i-o/2+y.height+A}]:[{x:r-k/2,y:i-o/2},{x:r+k/2,y:i-o/2},{x:r+k/2,y:i-o/2+b},{x:r+y.width/2,y:i-o/2+b},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+b},{x:r-k/2,y:i-o/2+b}];return W.polygon(e,n,t)},g}async function vt(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:n}=(0,i.GX)(e);e.labelStyle=n;const s=e.assetHeight??48,l=e.assetWidth??48,c=Math.max(s,l),d=o?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:g,bbox:y,halfPadding:m,label:x}=await p(t,e,"icon-shape default"),C="t"===e.pos,b=c+2*m,k=c+2*m,{nodeBorder:w,mainBkg:T}=r,{stylesMap:v}=(0,i.WW)(e),B=-k/2,_=-b/2,A=e.label?8:0,L=u.A.svg(g),F=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const M=v.get("fill");F.stroke=M??T;const E=L.path(S(B,_,k,b,.1),F),$=Math.max(k,y.width),O=b+y.height+A,I=L.rectangle(-$/2,-O/2,$,O,{...F,fill:"transparent",stroke:"none"}),D=g.insert(()=>E,":first-child"),q=g.insert(()=>I);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,n=r.x,s=r.y;t.attr("transform",`translate(${-i/2-n},${C?y.height/2+A/2-o/2-s:-y.height/2-A/2-o/2-s})`),t.attr("style",`color: ${v.get("stroke")??w};`)}return x.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${C?-O/2:O/2-y.height})`),D.attr("transform",`translate(0,${C?y.height/2+A/2:-y.height/2-A/2})`),f(e,q),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return W.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=C?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+A},{x:r+k/2,y:i-o/2+y.height+A},{x:r+k/2,y:i+o/2},{x:r-k/2,y:i+o/2},{x:r-k/2,y:i-o/2+y.height+A},{x:r-y.width/2,y:i-o/2+y.height+A}]:[{x:r-k/2,y:i-o/2},{x:r+k/2,y:i-o/2},{x:r+k/2,y:i-o/2+b},{x:r+y.width/2,y:i-o/2+b},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+b},{x:r-k/2,y:i-o/2+b}];return W.polygon(e,n,t)},g}async function Bt(t,e,{config:{flowchart:r}}){const o=new Image;o.src=e?.img??"",await o.decode();const n=Number(o.naturalWidth.toString().replace("px","")),a=Number(o.naturalHeight.toString().replace("px",""));e.imageAspectRatio=n/a;const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const l=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const c=Math.max(e.label?l??0:0,e?.assetWidth??n),d="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:c,g="on"===e.constraint?d/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(d,l??0);const{shapeSvg:y,bbox:m,label:x}=await p(t,e,"image-shape default"),C="t"===e.pos,b=-d/2,k=-g/2,w=e.label?8:0,S=u.A.svg(y),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const v=S.rectangle(b,k,d,g,T),B=Math.max(d,m.width),_=g+m.height+w,A=S.rectangle(-B/2,-_/2,B,_,{...T,fill:"none",stroke:"none"}),L=y.insert(()=>v,":first-child"),F=y.insert(()=>A);if(e.img){const t=y.append("image");t.attr("href",e.img),t.attr("width",d),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-d/2},${C?_/2-g:-_/2})`)}return x.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${C?-g/2-m.height/2-w/2:g/2-m.height/2+w/2})`),L.attr("transform",`translate(0,${C?m.height/2+w/2:-m.height/2-w/2})`),f(e,F),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return W.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=C?[{x:r-m.width/2,y:i-o/2},{x:r+m.width/2,y:i-o/2},{x:r+m.width/2,y:i-o/2+m.height+w},{x:r+d/2,y:i-o/2+m.height+w},{x:r+d/2,y:i+o/2},{x:r-d/2,y:i+o/2},{x:r-d/2,y:i-o/2+m.height+w},{x:r-m.width/2,y:i-o/2+m.height+w}]:[{x:r-d/2,y:i-o/2},{x:r+d/2,y:i-o/2},{x:r+d/2,y:i-o/2+g},{x:r+m.width/2,y:i-o/2+g},{x:r+m.width/2/2,y:i+o/2},{x:r-m.width/2,y:i+o/2},{x:r-m.width/2,y:i-o/2+g},{x:r-d/2,y:i-o/2+g}];return W.polygon(e,n,t)},y}async function _t(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a=n,s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await p(t,e,y(e)),c=Math.max(h.width+2*(s??0),e?.width??0),d=Math.max(h.height+2*(a??0),e?.height??0),g=[{x:0,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:-3*d/6,y:-d}];let x;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=u.A.svg(l),r=(0,i.Fr)(e,{}),o=m(g),n=t.path(o,r);x=l.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),C&&x.attr("style",C)}else x=X(l,c,d,g);return o&&x.attr("style",o),e.width=c,e.height=d,f(e,x),e.intersect=function(t){return W.polygon(e,g,t)},l}async function At(t,e){const{shapeSvg:r,bbox:i,label:o}=await p(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),f(e,n),e.intersect=function(t){return W.rect(e,t)},r}async function Lt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a=n,s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await p(t,e,y(e)),c=(e?.height??h.height)+a,d=(e?.width??h.width)+s,g=[{x:0,y:0},{x:d+3*c/6,y:0},{x:d,y:-c},{x:-3*c/6,y:-c}];let x;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=u.A.svg(l),r=(0,i.Fr)(e,{}),o=m(g),n=t.path(o,r);x=l.insert(()=>n,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),C&&x.attr("style",C)}else x=X(l,d,c,g);return o&&x.attr("style",o),e.width=d,e.height=c,f(e,x),e.intersect=function(t){return W.polygon(e,g,t)},l}async function Ft(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a=n,s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await p(t,e,y(e)),c=(e?.height??h.height)+a,d=(e?.width??h.width)+s,g=[{x:-3*c/6,y:0},{x:d,y:0},{x:d+3*c/6,y:-c},{x:0,y:-c}];let x;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=u.A.svg(l),r=(0,i.Fr)(e,{}),o=m(g),n=t.path(o,r);x=l.insert(()=>n,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),C&&x.attr("style",C)}else x=X(l,d,c,g);return o&&x.attr("style",o),e.width=d,e.height=c,f(e,x),e.intersect=function(t){return W.polygon(e,g,t)},l}function Mt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.label="",e.labelStyle=r;const n=t.insert("g").attr("class",y(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),l=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:l+3.5},{x:s-14,y:l+3.5},{x:0,y:2*l},{x:s,y:l-3.5},{x:14,y:l-3.5}],d=u.A.svg(n),p=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=m(c),x=d.path(g,p),C=n.insert(()=>x,":first-child");return C.attr("class","outer-path"),a&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",a),o&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",o),C.attr("transform",`translate(-${s/2},${-l})`),f(e,C),e.intersect=function(t){h.R.info("lightningBolt intersect",e,t);return W.polygon(e,c,t)},n}(0,c.K)(bt,"hexagon"),(0,c.K)(kt,"hourglass"),(0,c.K)(wt,"icon"),(0,c.K)(St,"iconCircle"),(0,c.K)(Tt,"iconRounded"),(0,c.K)(vt,"iconSquare"),(0,c.K)(Bt,"imageSquare"),(0,c.K)(_t,"inv_trapezoid"),(0,c.K)(At,"labelRect"),(0,c.K)(Lt,"lean_left"),(0,c.K)(Ft,"lean_right"),(0,c.K)(Mt,"lightningBolt");var Et=(0,c.K)((t,e,r,i,o,n,a)=>[`M${t},${e+n}`,`a${o},${n} 0,0,0 ${r},0`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+a}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),$t=(0,c.K)((t,e,r,i,o,n,a)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+a}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Ot=(0,c.K)((t,e,r,i,o,n)=>[`M${t-r/2},${-i/2}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function It(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,l="neo"===e.look?24:n;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-a,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-l-3*r,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:c,label:d}=await p(t,e,y(e)),g=(e?.width?e?.width:c.width)+2*a,m=g/2,x=m/(2.5+g/50),C=(e?.height?e?.height:c.height)+x+2*l,b=.1*C;let k;const{cssStyles:w}=e;if("handDrawn"===e.look){const t=u.A.svg(h),r=$t(0,0,g,C,m,x,b),o=Ot(0,x,g,C,m,x),n=(0,i.Fr)(e,{}),a=t.path(r,n),s=t.path(o,n);h.insert(()=>s,":first-child").attr("class","line"),k=h.insert(()=>a,":first-child"),k.attr("class","basic label-container"),w&&k.attr("style",w)}else{const t=Et(0,0,g,C,m,x,b);k=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(w)).attr("style",o)}return k.attr("label-offset-y",x),k.attr("transform",`translate(${-g/2}, ${-(C/2+x)})`),f(e,k),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-c.height/2+x-(c.y-(c.top??0))})`),e.intersect=function(t){const r=W.rect(e,t),i=r.x-(e.x??0);if(0!=m&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-x)){let o=x*x*(1-i*i/(m*m));o>0&&(o=Math.sqrt(o)),o=x-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},h}async function Dt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}const{shapeSvg:l,bbox:h,label:c}=await p(t,e,y(e)),d=(e?.width?e?.width:h.width)+2*(a??0),g=(e?.height?e?.height:h.height)+2*(s??0),m="neo"===e.look?g/4:g/8,C=g+m,{cssStyles:b}=e,k=u.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-d/2-d/2*.1,y:-C/2},{x:-d/2-d/2*.1,y:C/2},...x(-d/2-d/2*.1,C/2,d/2+d/2*.1,C/2,m,.8),{x:d/2+d/2*.1,y:-C/2},{x:-d/2-d/2*.1,y:-C/2},{x:-d/2,y:-C/2},{x:-d/2,y:C/2*1.1},{x:-d/2,y:-C/2}],T=k.polygon(S.map(t=>[t.x,t.y]),w),v=l.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",b),o&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",o),v.attr("transform",`translate(0,${-m/2})`),c.attr("transform",`translate(${-d/2+(e.padding??0)+d/2*.1/2-(h.x-(h.left??0))},${-g/2+(e.padding??0)-m/2-(h.y-(h.top??0))})`),f(e,v),e.intersect=function(t){return W.polygon(e,S,t)},l}async function qt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n,l="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-2*l,10),e.height=Math.max((e?.height??0)-2*s-2*l,10));const{shapeSvg:h,bbox:c,label:d}=await p(t,e,y(e)),g=(e?.width?e?.width:c.width)+2*a+2*l-2*l,x=(e?.height?e?.height:c.height)+2*s+2*l-2*l,C=-g/2,k=-x/2,{cssStyles:w}=e,S=u.A.svg(h),T=(0,i.Fr)(e,{}),v=[{x:C-l,y:k+l},{x:C-l,y:k+x+l},{x:C+g-l,y:k+x+l},{x:C+g-l,y:k+x},{x:C+g,y:k+x},{x:C+g,y:k+x-l},{x:C+g+l,y:k+x-l},{x:C+g+l,y:k-l},{x:C+l,y:k-l},{x:C+l,y:k},{x:C,y:k},{x:C,y:k+l}],B=[{x:C,y:k+l},{x:C+g-l,y:k+l},{x:C+g-l,y:k+x},{x:C+g,y:k+x},{x:C+g,y:k},{x:C,y:k}];"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const _=m(v);let A=S.path(_,T);const L=m(B);let F=S.path(L,T);"handDrawn"!==e.look&&(A=b(A),F=b(F));const M=h.insert("g",":first-child");return M.insert(()=>A),M.insert(()=>F),M.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",w),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),d.attr("transform",`translate(${-c.width/2-l-(c.x-(c.left??0))}, ${-c.height/2+l-(c.y-(c.top??0))})`),f(e,M),e.intersect=function(t){return W.polygon(e,v,t)},h}async function Rt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await p(t,e,y(e)),l=e.padding??0,h="neo"===e.look?16:l,c="neo"===e.look?12:l;let d=!0;(e.width||e.height)&&(d=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*c);const g=Math.max(a.width,e?.width??0)+2*h,C=Math.max(a.height,e?.height??0)+3*c,b="neo"===e.look?C/4:C/8,k=C+(d?b/2:-b/2),w=-g/2,S=-k/2,T=10,{cssStyles:v}=e,B=x(w-T,S+k+T,w+g-T,S+k+T,b,.8),_=B?.[B.length-1],A=[{x:w-T,y:S+T},{x:w-T,y:S+k+T},...B,{x:w+g-T,y:_.y-T},{x:w+g,y:_.y-T},{x:w+g,y:_.y-20},{x:w+g+T,y:_.y-20},{x:w+g+T,y:S-T},{x:w+T,y:S-T},{x:w+T,y:S},{x:w,y:S},{x:w,y:S+T}],L=[{x:w,y:S+T},{x:w+g-T,y:S+T},{x:w+g-T,y:_.y-T},{x:w+g,y:_.y-T},{x:w+g,y:S},{x:w,y:S}],F=u.A.svg(n),M=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");const E=m(A),$=F.path(E,M),O=m(L),I=F.path(O,M),D=n.insert(()=>$,":first-child");return D.insert(()=>I),D.attr("class","basic label-container outer-path"),v&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",v),o&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",o),D.attr("transform",`translate(0,${-b/2})`),s.attr("transform",`translate(${-a.width/2-T-(a.x-(a.left??0))}, ${-a.height/2+T-b/2-(a.y-(a.top??0))})`),f(e,D),e.intersect=function(t){return W.polygon(e,A,t)},n}async function zt(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;e.useHtmlLabels||(0,l.E)((0,l.zj)())||(e.centerLabel=!0);const{shapeSvg:a,bbox:s,label:h}=await p(t,e,y(e)),c=Math.max(s.width+2*(e.padding??0),e?.width??0),d=Math.max(s.height+2*(e.padding??0),e?.height??0),g=-c/2,m=-d/2,{cssStyles:x}=e,C=u.A.svg(a),b=(0,i.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=C.rectangle(g,m,c,d,b),w=a.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),x&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),h.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),f(e,w),e.intersect=function(t){return W.rect(e,t)},a}(0,c.K)(It,"linedCylinder"),(0,c.K)(Dt,"linedWaveEdgedRect"),(0,c.K)(qt,"multiRect"),(0,c.K)(Rt,"multiWaveEdgedRectangle"),(0,c.K)(zt,"note");var Nt=(0,c.K)((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 Kt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await p(t,e,y(e)),s=a.width+(e.padding??0)+(a.height+(e.padding??0)),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=u.A.svg(n),r=(0,i.Fr)(e,{}),o=Nt(0,0,s),a=t.path(o,r);h=n.insert(()=>a,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),c&&h.attr("style",c)}else h=X(n,s,s,l),h.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return o&&h.attr("style",o),f(e,h),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=W.polygon(t,i,e);return{x:o.x-.5,y:o.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function Pt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?21:n??0,s="neo"===e.look?12:n??0,{shapeSvg:l,bbox:h,label:c}=await p(t,e,y(e)),d=-((e?.width??h.width)+("neo"===e.look?2*a:a))/2,g=-((e?.height??h.height)+("neo"===e.look?2*s:s))/2,x=g/2,C=[{x:d+x,y:g},{x:d,y:0},{x:d+x,y:-g},{x:-d,y:-g},{x:-d,y:g}],{cssStyles:b}=e,k=u.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=m(C),T=k.path(S,w),v=l.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",b),o&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",o),v.attr("transform",`translate(${-x/2},0)`),c.attr("transform",`translate(${-x/2-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),f(e,v),e.intersect=function(t){return W.polygon(e,C,t)},l}async function Wt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);let n;e.labelStyle=r,n=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g"),c=a.insert("g").attr("class","label").attr("style",o),p=e.description,g=e.label,y=await w(c,g,e.labelStyle,!0,!0);let m={width:0,height:0};if((0,l.E)((0,l.D7)())){const t=y.children[0],e=(0,d.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}h.R.info("Text 2",p);const x=p||[],C=y.getBBox(),b=await w(c,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),k=b.children[0],T=(0,d.Ltv)(b);m=k.getBoundingClientRect(),T.attr("width",m.width),T.attr("height",m.height);const v=(e.padding||0)/2;(0,d.Ltv)(b).attr("transform","translate( "+(m.width>C.width?0:(C.width-m.width)/2)+", "+(C.height+v+5)+")"),(0,d.Ltv)(y).attr("transform","translate( "+(m.width<C.width?0:-(C.width-m.width)/2)+", 0)"),m=c.node().getBBox(),c.attr("transform","translate("+-m.width/2+", "+(-m.height/2-v+3)+")");const B=m.width+(e.padding||0),_=m.height+(e.padding||0),A=-m.width/2-v,L=-m.height/2-v;let F,M;if("handDrawn"===e.look){const t=u.A.svg(a),r=(0,i.Fr)(e,{}),o=t.path(S(A,L,B,_,e.rx||0),r),n=t.line(-m.width/2-v,-m.height/2-v+C.height+v,m.width/2+v,-m.height/2-v+C.height+v,r);M=a.insert(()=>(h.R.debug("Rough node insert CXC",o),n),":first-child"),F=a.insert(()=>(h.R.debug("Rough node insert CXC",o),o),":first-child")}else F=s.insert("rect",":first-child"),M=s.insert("line"),F.attr("class","outer title-state").attr("style",o).attr("x",-m.width/2-v).attr("y",-m.height/2-v).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),M.attr("class","divider").attr("x1",-m.width/2-v).attr("x2",m.width/2+v).attr("y1",-m.height/2-v+C.height+v).attr("y2",-m.height/2-v+C.height+v);return f(e,F),e.intersect=function(t){return W.rect(e,t)},a}async function jt(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return dt(t,e,{rx:i,ry:i,classes:"",labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}(0,c.K)(Kt,"question"),(0,c.K)(Pt,"rect_left_inv_arrow"),(0,c.K)(Wt,"rectWithTitle"),(0,c.K)(jt,"roundedRect");async function Ht(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0,{shapeSvg:l,bbox:h,label:c}=await p(t,e,y(e)),d=(e?.width??h.width)+2*n+("neo"===e.look?8:16),g=(e?.height??h.height)+2*a,m=d-8,x=g,C=8-d/2,b=-g/2,{cssStyles:k}=e,w=u.A.svg(l),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=[{x:C,y:b},{x:C+m,y:b},{x:C+m,y:b+x},{x:C-8,y:b+x},{x:C-8,y:b},{x:C,y:b},{x:C,y:b+x}],v=w.polygon(T.map(t=>[t.x,t.y]),S),B=l.insert(()=>v,":first-child");return B.attr("class","basic label-container outer-path").attr("style",(0,s.KL)(k)),o&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),k&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),c.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),f(e,B),e.intersect=function(t){return W.rect(e,t)},l}async function Yt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));const{shapeSvg:l,bbox:h,label:c}=await p(t,e,y(e)),d=(e?.width?e?.width:h.width)+2*a,g=1.5*((e?.height?e?.height:h.height)+2*s)/1.5,x=-d/2,C=-g/2,{cssStyles:b}=e,k=u.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=[{x,y:C},{x,y:C+g},{x:x+d,y:C+g},{x:x+d,y:C-g/2}],T=m(S),v=k.path(T,w),B=l.insert(()=>v,":first-child");return B.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",b),o&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",o),B.attr("transform",`translate(0, ${g/4})`),c.attr("transform",`translate(${-d/2+(e.padding??0)-(h.x-(h.left??0))}, ${-g/4+(e.padding??0)-(h.y-(h.top??0))})`),f(e,B),e.intersect=function(t){return W.polygon(e,S,t)},l}async function Ut(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r;return dt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??i,labelPaddingY:o})}async function Xt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?20:n,s="neo"===e.look?12:n,{shapeSvg:l,bbox:h}=await p(t,e,y(e)),c=h.height+("neo"===e.look?2*s:s),d=h.width+c/4+("neo"===e.look?2*a:a),g=c/2,{cssStyles:x}=e,b=u.A.svg(l),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:-d/2+g,y:-c/2},{x:d/2-g,y:-c/2},...C(-d/2+g,0,g,50,90,270),{x:d/2-g,y:c/2},...C(d/2-g,0,g,50,270,450)],S=m(w),T=b.path(S,k),v=l.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),o&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",o),f(e,v),e.intersect=function(t){return W.polygon(e,w,t)},l}async function Gt(t,e){return dt(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"})}function Vt(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{cssStyles:a}=e,{lineColor:s,stateBorder:l,nodeBorder:h,nodeShadow:c}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const d=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),p=u.A.svg(d),g=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=p.circle(0,0,e.width,{...g,stroke:s,strokeWidth:2}),m=l??h,x=5*(e.width??0)/14,C=p.circle(0,0,x,{...g,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),b=d.insert(()=>y,":first-child");if(b.insert(()=>C),"handDrawn"!==e.look&&b.attr("class","outer-path"),a&&b.selectAll("path").attr("style",a),n&&b.selectAll("path").attr("style",n),e.width<25&&c&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${r})`)}return f(e,b),e.intersect=function(t){return W.circle(e,(e.width??0)/2,t)},d}function Zt(t,e,{config:{themeVariables:r}}){const{lineColor:o,nodeShadow:n}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if("handDrawn"===e.look){const t=u.A.svg(a).circle(0,0,e.width,(0,i.ue)(o));s=a.insert(()=>t),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${r})`)}return f(e,s),e.intersect=function(t){return W.circle(e,(e.width??7)/2,t)},a}(0,c.K)(Ht,"shadedProcess"),(0,c.K)(Yt,"slopedRect"),(0,c.K)(Ut,"squareRect"),(0,c.K)(Xt,"stadium"),(0,c.K)(Gt,"state"),(0,c.K)(Vt,"stateEnd"),(0,c.K)(Zt,"stateStart");async function Qt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e?.padding??8,a="neo"===e.look?28:n,l="neo"===e.look?12:n,{shapeSvg:h,bbox:c}=await p(t,e,y(e)),d=(e?.width??c.width)+16+a,g=(e?.height??c.height)+l,m=d-16,x=g,C=-d/2,b=-g/2,k=[{x:0,y:0},{x:m,y:0},{x:m,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:m+8,y:0},{x:m+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if("handDrawn"===e.look){const t=u.A.svg(h),r=(0,i.Fr)(e,{}),o=t.rectangle(C,b,m+16,x,r),n=t.line(C+8,b,C+8,b+x,r),a=t.line(C+8+m,b,C+8+m,b+x,r);h.insert(()=>n,":first-child"),h.insert(()=>a,":first-child");const l=h.insert(()=>o,":first-child"),{cssStyles:c}=e;l.attr("class","basic label-container").attr("style",(0,s.KL)(c)),f(e,l)}else{const t=X(h,m,x,k);o&&t.attr("style",o),f(e,t)}return e.intersect=function(t){return W.polygon(e,k,t)},h}(0,c.K)(Qt,"subroutine");async function Jt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*a-.2*(e.height+2*s),10));const{shapeSvg:l,bbox:h}=await p(t,e,y(e)),c=(e?.height?e?.height:h.height)+2*s,d=.2*c,g=.2*c,x=(e?.width?e?.width:h.width)+2*a+d-d,C=c,b=-x/2,k=-C/2,{cssStyles:w}=e,S=u.A.svg(l),T=(0,i.Fr)(e,{}),v=[{x:b-d/2,y:k},{x:b+x+d/2,y:k},{x:b+x+d/2,y:k+C},{x:b-d/2,y:k+C}],B=[{x:b+x-d/2,y:k+C},{x:b+x+d/2,y:k+C},{x:b+x+d/2,y:k+C-g}];"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const _=m(v),A=S.path(_,T),L=m(B),F=S.path(L,{...T,fillStyle:"solid"}),M=l.insert(()=>F,":first-child");return M.insert(()=>A,":first-child"),M.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",w),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),f(e,M),e.intersect=function(t){return W.polygon(e,v,t)},l}async function te(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await p(t,e,y(e)),l=Math.max(a.width+2*(e.padding??0),e?.width??0),h=Math.max(a.height+2*(e.padding??0),e?.height??0),c=h/8,d=.2*l,g=.2*h,C=h+c,{cssStyles:b}=e,k=u.A.svg(n),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-l/2-l/2*.1,y:C/2},...x(-l/2-l/2*.1,C/2,l/2+l/2*.1,C/2,c,.8),{x:l/2+l/2*.1,y:-C/2},{x:-l/2-l/2*.1,y:-C/2}],T=-l/2+l/2*.1,v=-C/2-.4*g,B=[{x:T+l-d,y:1.3*(v+h)},{x:T+l,y:v+h-g},{x:T+l,y:.9*(v+h)},...x(T+l,1.25*(v+h),T+l-d,1.3*(v+h),.02*-h,.5)],_=m(S),A=k.path(_,w),L=m(B),F=k.path(L,{...w,fillStyle:"solid"}),M=n.insert(()=>F,":first-child");return M.insert(()=>A,":first-child"),M.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",b),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),M.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))},${-h/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),f(e,M),e.intersect=function(t){return W.polygon(e,S,t)},n}async function ee(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await p(t,e,y(e)),s=Math.max(a.width+(e.padding??0),e?.width||0),l=Math.max(a.height+(e.padding??0),e?.height||0),h=-s/2,c=-l/2,d=n.insert("rect",":first-child");return d.attr("class","text").attr("style",o).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",s).attr("height",l),f(e,d),e.intersect=function(t){return W.rect(e,t)},n}(0,c.K)(Jt,"taggedRect"),(0,c.K)(te,"taggedWaveEdgedRectangle"),(0,c.K)(ee,"text");var re=(0,c.K)((t,e,r,i,o,n)=>`M${t},${e}\n a${o},${n} 0,0,1 0,${-i}\n l${r},0\n a${o},${n} 0,0,1 0,${i}\n M${r},${-i}\n a${o},${n} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),ie=(0,c.K)((t,e,r,i,o,n)=>[`M${t},${e}`,`M${t+r},${e}`,`a${o},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),oe=(0,c.K)((t,e,r,i,o,n)=>[`M${t+r/2},${-i/2}`,`a${o},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function ne(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?12:n/2;if(e.width||e.height){const t=e.height??0;e.height=(e.height??0)-a,e.height<5&&(e.height=5);const r=t/2/(2.5+t/50);e.width=(e.width??0)-a-3*r,e.width<10&&(e.width=10)}const{shapeSvg:l,bbox:h,label:c}=await p(t,e,y(e)),d=(e.height?e.height:h.height)+a,g=d/2,m=g/(2.5+d/50),x=(e.width?e.width:h.width)+m+a,{cssStyles:C}=e;let b;if("handDrawn"===e.look){const t=u.A.svg(l),r=ie(0,0,x,d,m,g),o=oe(0,0,x,d,m,g),n=t.path(r,(0,i.Fr)(e,{})),a=t.path(o,(0,i.Fr)(e,{fill:"none"}));b=l.insert(()=>a,":first-child"),b=l.insert(()=>n,":first-child"),b.attr("class","basic label-container"),C&&b.attr("style",C)}else{const t=re(0,0,x,d,m,g);b=l.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)(C)).attr("style",o),b.attr("class","basic label-container outer-path"),C&&b.selectAll("path").attr("style",C),o&&b.selectAll("path").attr("style",o)}return b.attr("label-offset-x",m),b.attr("transform",`translate(${-x/2}, ${d/2} )`),c.attr("transform",`translate(${-h.width/2-m-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),f(e,b),e.intersect=function(t){const r=W.rect(e,t),i=r.y-(e.y??0);if(0!=g&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-m)){let o=m*m*(1-i*i/(g*g));0!=o&&(o=Math.sqrt(Math.abs(o))),o=m-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},l}async function ae(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a=(e.look,n),s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await p(t,e,y(e)),c=(e?.height??h.height)+a,d=(e?.width??h.width)+s,g=[{x:-3*c/6,y:0},{x:d+3*c/6,y:0},{x:d,y:-c},{x:0,y:-c}];let x;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=u.A.svg(l),r=(0,i.Fr)(e,{}),o=m(g),n=t.path(o,r);x=l.insert(()=>n,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),C&&x.attr("style",C)}else x=X(l,d,c,g);return o&&x.attr("style",o),e.width=d,e.height=c,f(e,x),e.intersect=function(t){return W.polygon(e,g,t)},l}async function se(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:l,bbox:h}=await p(t,e,y(e)),c=(e?.width?e?.width:h.width)+2*a,d=(e?.height?e?.height:h.height)+2*s,{cssStyles:g}=e,x=u.A.svg(l),C=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const b=[{x:-c/2*.8,y:-d/2},{x:c/2*.8,y:-d/2},{x:c/2,y:-d/2*.6},{x:c/2,y:d/2},{x:-c/2,y:d/2},{x:-c/2,y:-d/2*.6}],k=m(b),w=x.path(k,C),S=l.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",g),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),f(e,S),e.intersect=function(t){return W.polygon(e,b,t)},l}(0,c.K)(ne,"tiltedCylinder"),(0,c.K)(ae,"trapezoid"),(0,c.K)(se,"trapezoidalPentagon");async function le(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?2*n:n;(e.width||e.height)&&(e.width=((e?.width??0)-a)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:s,bbox:c,label:d}=await p(t,e,y(e)),g=(0,l._3)((0,l.D7)().flowchart?.htmlLabels),x=(e?.width?e?.width:c.width)+a,C=e?.height?e?.height:x+c.height,b=[{x:0,y:0},{x:C,y:0},{x:C/2,y:-C}],{cssStyles:k}=e,w=u.A.svg(s),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=m(b),v=w.path(T,S),B=s.insert(()=>v,":first-child").attr("transform",`translate(${-C/2}, ${C/2})`).attr("class","outer-path");return k&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",k),o&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",o),e.width=x,e.height=C,f(e,B),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${C/2-(c.height+(e.padding??0)/(g?2:1)-(c.y-(c.top??0)))})`),e.intersect=function(t){return h.R.info("Triangle intersect",e,b,t),W.polygon(e,b,t)},s}async function he(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;let l=!0;(e.width||e.height)&&(l=!1,e.width=(e?.width??0)-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:c,label:d}=await p(t,e,y(e)),g=(e?.width?e?.width:c.width)+2*(a??0),C=(e?.height?e?.height:c.height)+2*(s??0),b="neo"===e.look?C/4:C/8,k=C+(l?b:-b),{cssStyles:w}=e,S=14-g,T=S>0?S/2:0,v=u.A.svg(h),B=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const _=[{x:-g/2-T,y:k/2},...x(-g/2-T,k/2,g/2+T,k/2,b,.8),{x:g/2+T,y:-k/2},{x:-g/2-T,y:-k/2}],A=m(_),L=v.path(A,B),F=h.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",w),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(0,${-b/2})`),d.attr("transform",`translate(${-g/2+(e.padding??0)-(c.x-(c.left??0))},${-C/2+(e.padding??0)-b-(c.y-(c.top??0))})`),f(e,F),e.intersect=function(t){return W.polygon(e,_,t)},h}async function ce(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?20:n;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-t*(20/9)),e.width=e.width-2*a}const{shapeSvg:l,bbox:h}=await p(t,e,y(e)),c=(e?.width?e?.width:h.width)+2*a,d=(e?.height?e?.height:h.height)+s,g=d/8,C=d+2*g,{cssStyles:b}=e,k=u.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-c/2,y:C/2},...x(-c/2,C/2,c/2,C/2,g,1),{x:c/2,y:-C/2},...x(c/2,-C/2,-c/2,-C/2,g,-1)],T=m(S),v=k.path(T,w),B=l.insert(()=>v,":first-child");return B.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",b),o&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),f(e,B),e.intersect=function(t){return W.polygon(e,S,t)},l}(0,c.K)(le,"triangle"),(0,c.K)(he,"waveEdgedRectangle"),(0,c.K)(ce,"waveRectangle");var de=10;async function ue(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-de,10),e.height=Math.max((e?.height??0)-2*a-de,10));const{shapeSvg:s,bbox:l,label:h}=await p(t,e,y(e)),c=(e?.width?e?.width:l.width)+2*n+de,d=(e?.height?e?.height:l.height)+2*a+de,g=c-de,m=d-de,x=-g/2,C=-m/2,{cssStyles:b}=e,k=u.A.svg(s),w=(0,i.Fr)(e,{}),S=[{x:x-de,y:C-de},{x:x-de,y:C+m},{x:x+g,y:C+m},{x:x+g,y:C-de}],T=`M${x-de},${C-de} L${x+g},${C-de} L${x+g},${C+m} L${x-de},${C+m} L${x-de},${C-de}\n M${x-de},${C} L${x+g},${C}\n M${x},${C-de} L${x},${C+m}`;"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const v=k.path(T,w),B=s.insert(()=>v,":first-child");return B.attr("transform","translate(5, 5)"),B.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",b),o&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),h.attr("transform",`translate(${-l.width/2+5-(l.x-(l.left??0))}, ${-l.height/2+5-(l.y-(l.top??0))})`),f(e,B),e.intersect=function(t){return W.polygon(e,S,t)},s}(0,c.K)(ue,"windowPane");var pe=new Set(["redux-color","redux-dark-color"]),ge=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function fe(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:o,themeVariables:n}=(0,l.zj)(),{rowEven:a,rowOdd:h,nodeBorder:c,borderColorArray:p}=n;if("handDrawn"===e.look){const{themeVariables:r}=(0,l.zj)(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await fe(t,o)}const g=(0,l.zj)();e.useHtmlLabels=g.htmlLabels;let m=g.er?.diagramPadding??10,x=g.er?.entityPadding??6;const{cssStyles:C}=e,{labelStyles:b,nodeStyles:k}=(0,i.GX)(e);if(0===r.attributes.length&&e.label){const i={rx:0,ry:0,labelPaddingX:m,labelPaddingY:1.5*m,classes:""};(0,s.Un)(e.label,g)+2*i.labelPaddingX<g.er.minEntityWidth&&(e.width=g.er.minEntityWidth);const n=await dt(t,e,i);if(null!=o&&pe.has(o)){const t=r.colorIndex??0;n.attr("data-color-id","color-"+t%p.length)}if(!(0,l._3)(g.htmlLabels)){const t=n.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return n}g.htmlLabels||(m*=1.25,x*=1.25);let w=y(e);w||(w="node default");const S=t.insert("g").attr("class",w).attr("id",e.domId||e.id),T=await ye(S,e.label??"",g,0,0,["name"],b);T.height+=x;let v=0;const B=[],_=[];let A=0,L=0,F=0,M=0,E=!0,$=!0;for(const t of r.attributes){const e=await ye(S,t.type,g,0,v,["attribute-type"],b);A=Math.max(A,e.width+m);const r=await ye(S,t.name,g,0,v,["attribute-name"],b);L=Math.max(L,r.width+m);const i=await ye(S,t.keys.join(),g,0,v,["attribute-keys"],b);F=Math.max(F,i.width+m);const o=await ye(S,t.comment,g,0,v,["attribute-comment"],b);M=Math.max(M,o.width+m);const n=Math.max(e.height,r.height,i.height,o.height)+x;_.push({yOffset:v,rowHeight:n}),v+=n}let O=4;F<=m&&(E=!1,F=0,O--),M<=m&&($=!1,M=0,O--);const I=S.node().getBBox();if(T.width+2*m-(A+L+F+M)>0){const t=T.width+2*m-(A+L+F+M);A+=t/O,L+=t/O,F>0&&(F+=t/O),M>0&&(M+=t/O)}const D=A+L+F+M,q=u.A.svg(S),R=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(R.roughness=0,R.fillStyle="solid");let z=0;_.length>0&&(z=_.reduce((t,e)=>t+(e?.rowHeight??0),0));const N=Math.max(I.width+2*m,e?.width||0,D),K=Math.max((z??0)+T.height,e?.height||0),P=-N/2,j=-K/2;if(S.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=(0,d.Ltv)(r[e]),o=i.attr("transform");let n=0,a=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(n=parseFloat(t[1]),a=parseFloat(t[2]),i.attr("class").includes("attribute-name")?n+=A:i.attr("class").includes("attribute-keys")?n+=A+L:i.attr("class").includes("attribute-comment")&&(n+=A+L+F))}i.attr("transform",`translate(${P+m/2+n}, ${a+j+T.height+x/2})`)}),S.select(".name").attr("transform","translate("+-T.width/2+", "+(j+x/2)+")"),null!=o&&pe.has(o)){const t=r.colorIndex??0;S.attr("data-color-id","color-"+t%p.length)}const H=q.rectangle(P,j,N,K,R),Y=S.insert(()=>H,":first-child").attr("class","outer-path").attr("style",C.join(""));B.push(0);for(const[t,e]of _.entries()){const r=(t+1)%2==0&&0!==e.yOffset,i=q.rectangle(P,T.height+j+e?.yOffset,N,e?.rowHeight,{...R,fill:r?a:h,stroke:c});S.insert(()=>i,"g.label").attr("style",C.join("")).attr("class","row-rect-"+(r?"even":"odd"))}const U=1e-4;let X=me(P,T.height+j,N+P,T.height+j,U),G=q.polygon(X.map(t=>[t.x,t.y]),R);if(S.insert(()=>G).attr("class","divider"),X=me(A+P,T.height+j,A+P,K+j,U),G=q.polygon(X.map(t=>[t.x,t.y]),R),S.insert(()=>G).attr("class","divider"),E){const t=A+L+P;X=me(t,T.height+j,t,K+j,U),G=q.polygon(X.map(t=>[t.x,t.y]),R),S.insert(()=>G).attr("class","divider")}if($){const t=A+L+F+P;X=me(t,T.height+j,t,K+j,U),G=q.polygon(X.map(t=>[t.x,t.y]),R),S.insert(()=>G).attr("class","divider")}for(const t of B){const e=T.height+j+t;X=me(P,e,N+P,e,U),G=q.polygon(X.map(t=>[t.x,t.y]),R),S.insert(()=>G).attr("class","divider")}if(f(e,Y),k&&"handDrawn"!==e.look)if(null!=o&&ge.has(o))S.selectAll("path").attr("style",k);else{const t=k.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");S.selectAll("path").attr("style",e??""),S.selectAll(".row-rect-even path").attr("style",k)}return e.intersect=function(t){return W.rect(e,t)},S}async function ye(t,e,r,i=0,o=0,a=[],h=""){const c=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",h);e!==(0,l.QO)(e)&&(e=(e=(0,l.QO)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const u=c.node().appendChild(await(0,n.G)(c,e,{width:(0,s.Un)(e,r)+100,style:h,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let t=u.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let p=u.getBBox();if((0,l._3)(r.htmlLabels)){const t=u.children[0];t.style.textAlign="start";const e=(0,d.Ltv)(u);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}function me(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function xe(t,e,r,i,o=r.class.padding??12){const n=i?0:3,a=t.insert("g").attr("class",y(e)).attr("id",e.domId||e.id);let s=null,l=null,h=null,c=null,d=0,u=0,p=0;if(s=a.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await Ce(s,{text:`«${t}»`},0);d=s.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Ce(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();u=g.height,h=a.insert("g").attr("class","members-group text");let f=0;for(const t of e.members){f+=await Ce(h,t,f,[t.parseClassifier()])+n}p=h.node().getBBox().height,p<=0&&(p=o/2),c=a.insert("g").attr("class","methods-group text");let m=0;for(const t of e.methods){m+=await Ce(c,t,m,[t.parseClassifier()])+n}let x=a.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${d})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*o})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(p?p+4*o:2*o)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}async function Ce(t,e,r,i=[]){const o=t.insert("g").attr("class","label").attr("style",i.join("; ")),a=(0,l.zj)();let h="useHtmlLabels"in e?e.useHtmlLabels:(0,l._3)(a.htmlLabels)??!0,u="";u="text"in e?e.text:e.label,!h&&u.startsWith("\\")&&(u=u.substring(1)),(0,l.Wi)(u)&&(h=!0);const p=await(0,n.G)(o,(0,l.oB)((0,s.Sm)(u)),{width:(0,s.Un)(u,a)+50,classes:"markdown-node-label",useHtmlLabels:h},a);let g,f=1;if(h){const t=p.children[0],e=(0,d.Ltv)(p);f=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(f+=t.innerHTML.split("<mrow>").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===u.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,c.K)(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}else{i.includes("font-weight: bolder")&&(0,d.Ltv)(p).selectAll("tspan").attr("font-weight",""),f=p.children.length;const t=p.children[0];if(""===p.textContent||p.textContent.includes("&gt")){t.textContent=u[0]+u.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim();" "===u[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),g=p.getBBox()}return o.attr("transform","translate(0,"+(-g.height/(2*f)+r)+")"),g.height}async function be(t,e){const r=(0,l.D7)(),{themeVariables:o}=r,{useGradient:n}=o,a=r.class.padding??12,s=a,h=e.useHtmlLabels??(0,l._3)(r.htmlLabels)??!0,c=e;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];const{shapeSvg:p,bbox:g}=await xe(t,e,r,h,s),{labelStyles:y,nodeStyles:m}=(0,i.GX)(e);e.labelStyle=y,e.cssStyles=c.styles||"";const x=c.styles?.join(";")||m||"";e.cssStyles||(e.cssStyles=x.replaceAll("!important","").split(";"));const C=0===c.members.length&&0===c.methods.length&&!r.class?.hideEmptyMembersBox,b=u.A.svg(p),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=Math.max(e.width??0,g.width);let S=Math.max(e.height??0,g.height);const T=(e.height??0)>g.height;0===c.members.length&&0===c.methods.length?S+=s:c.members.length>0&&0===c.methods.length&&(S+=2*s);const v=-w/2,B=-S/2;let _=C?2*a:0===c.members.length&&0===c.methods.length?-a:0;T&&(_=2*a);const A=b.rectangle(v-a,B-a-(C?a:0===c.members.length&&0===c.methods.length?-a/2:0),w+2*a,S+2*a+_,k),L=p.insert(()=>A,":first-child");L.attr("class","basic label-container outer-path");const F=L.node().getBBox(),M=p.select(".annotation-group").node().getBBox().height-(C?a/2:0)||0,E=p.select(".label-group").node().getBBox().height-(C?a/2:0)||0,$=p.select(".members-group").node().getBBox().height-(C?a/2:0)||0,O=(M+E+B+a-(B-a-(C?a:0===c.members.length&&0===c.methods.length?-a/2:0)))/2;if(p.selectAll(".text").each((t,e,i)=>{const o=(0,d.Ltv)(i[e]),n=o.attr("transform");let l=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(l=parseFloat(t[2]))}let u=l+B+a-(C?a:0===c.members.length&&0===c.methods.length?-a/2:0);if(o.attr("class").includes("methods-group")){const t=Math.max($,s/2);u=T?Math.max(O,M+E+t+B+2*s+a)+2*s:M+E+t+B+4*s+a}0===c.members.length&&0===c.methods.length&&r.class?.hideEmptyMembersBox&&(u=c.annotations.length>0?l-s:l),h||(u-=4);let g=v;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(g=-o.node()?.getBBox().width/2||0,p.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(g=0)})),o.attr("transform",`translate(${g}, ${u})`)}),c.members.length>0||c.methods.length>0||C){const t=M+E+B+a,r=b.line(F.x,t,F.x+F.width,t+.001,k);p.insert(()=>r).attr("class","divider"+("neo"!==e.look||n?"":" neo-line")).attr("style",x)}if(C||c.members.length>0||c.methods.length>0){const t=M+E+$+B+2*s+a,r=b.line(F.x,T?Math.max(O,t):t,F.x+F.width,(T?Math.max(O,t):t)+.001,k);p.insert(()=>r).attr("class","divider"+("neo"!==e.look||n?"":" neo-line")).attr("style",x)}if("handDrawn"!==c.look&&p.selectAll("path").attr("style",x),L.select(":nth-child(2)").attr("style",x),p.selectAll(".divider").select("path").attr("style",x),e.labelStyle?p.selectAll("span").attr("style",e.labelStyle):p.selectAll("span").attr("style",x),!h){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(x);if(e){const t=e[0].replace("color","fill");p.selectAll("tspan").attr("style",t)}else if(y){const e=t.exec(y);if(e){const t=e[0].replace("color","fill");p.selectAll("tspan").attr("style",t)}}}return f(e,L),e.intersect=function(t){return W.rect(e,t)},p}async function ke(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e,a=e,s="verifyMethod"in e,h=y(e),{themeVariables:c}=(0,l.D7)(),{borderColorArray:p,requirementEdgeLabelBackground:g}=c,m=t.insert("g").attr("class",h).attr("id",e.domId??e.id);let x;x=s?await we(m,`&lt;&lt;${n.type}&gt;&gt;`,0,e.labelStyle):await we(m,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let C=x;const b=await we(m,n.name,C,e.labelStyle+"; font-weight: bold;");if(C+=b+20,s){C+=await we(m,""+(n.requirementId?`ID: ${n.requirementId}`:""),C,e.labelStyle);C+=await we(m,""+(n.text?`Text: ${n.text}`:""),C,e.labelStyle);C+=await we(m,""+(n.risk?`Risk: ${n.risk}`:""),C,e.labelStyle),await we(m,""+(n.verifyMethod?`Verification: ${n.verifyMethod}`:""),C,e.labelStyle)}else{C+=await we(m,""+(a.type?`Type: ${a.type}`:""),C,e.labelStyle),await we(m,""+(a.docRef?`Doc Ref: ${a.docRef}`:""),C,e.labelStyle)}const k=(m.node()?.getBBox().width??200)+20,w=(m.node()?.getBBox().height??200)+20,S=-k/2,T=-w/2,v=u.A.svg(m),B=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const _=v.rectangle(S,T,k,w,B),A=m.insert(()=>_,":first-child");if(A.attr("class","basic label-container outer-path").attr("style",o),p?.length){const t=e.colorIndex??0;m.attr("data-color-id","color-"+t%p.length)}if(m.selectAll(".label").each((t,e,r)=>{const i=(0,d.Ltv)(r[e]),o=i.attr("transform");let n=0,a=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(n=parseFloat(t[1]),a=parseFloat(t[2]))}const s=a-w/2;let l=S+10;0!==e&&1!==e||(l=n),i.attr("transform",`translate(${l}, ${s+20})`)}),C>x+b+20){const t=T+x+b+20;let r;if("neo"===e.look){const e=.001,i=[[S,t],[S+k,t],[S+k,t+e],[S,t+e]];r=v.polygon(i,B)}else r=v.line(S,t,S+k,t,B);m.insert(()=>r).attr("class","divider")}return f(e,A),e.intersect=function(t){return W.rect(e,t)},o&&"handDrawn"!==e.look&&(g||p?.length)&&m.selectAll("path").attr("style",o),m}async function we(t,e,r,i=""){if(""===e)return 0;const o=t.insert("g").attr("class","label").attr("style",i),a=(0,l.D7)(),h=a.htmlLabels??!0,c=await(0,n.G)(o,(0,l.oB)((0,s.Sm)(e)),{width:(0,s.Un)(e,a)+50,classes:"markdown-node-label",useHtmlLabels:h,style:i},a);let u;if(h){const t=c.children[0],e=(0,d.Ltv)(c);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}else{const t=c.children[0];for(const e of t.children)i&&e.setAttribute("style",i);u=c.getBBox(),u.height+=6}return o.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}(0,c.K)(fe,"erBox"),(0,c.K)(ye,"addText"),(0,c.K)(me,"lineToPolygon"),(0,c.K)(xe,"textHelper"),(0,c.K)(Ce,"addText"),(0,c.K)(be,"classBox"),(0,c.K)(ke,"requirementBox"),(0,c.K)(we,"addText");var Se=(0,c.K)(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 Te(t,e,{config:r}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:h}=await p(t,e,y(e)),c=e.padding||10;let d,m="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(m=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),d=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank"));const x={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let C,b;({label:C,bbox:b}=d?await g(d,"ticket"in e&&e.ticket||"",x):await g(s,"ticket"in e&&e.ticket||"",x));const{label:k,bbox:w}=await g(s,"assigned"in e&&e.assigned||"",x);e.width=a;const T=e?.width||0,v=Math.max(b.height,w.height)/2,B=Math.max(l.height+20,e?.height||0)+v,_=-T/2,A=-B/2;let L;h.attr("transform","translate("+(c-T/2)+", "+(-v-l.height/2)+")"),C.attr("transform","translate("+(c-T/2)+", "+(-v+l.height/2)+")"),k.attr("transform","translate("+(c+T/2-w.width-20)+", "+(-v+l.height/2)+")");const{rx:F,ry:M}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=u.A.svg(s),r=(0,i.Fr)(e,{}),o=F||M?t.path(S(_,A,T,B,F||0),r):t.rectangle(_,A,T,B,r);L=s.insert(()=>o,":first-child"),L.attr("class","basic label-container").attr("style",E||null)}else{L=s.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",n).attr("rx",F??5).attr("ry",M??5).attr("x",_).attr("y",A).attr("width",T).attr("height",B);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=_+2,i=A+Math.floor((F??0)/2),o=A+B-Math.floor((F??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",Se(t))}}return f(e,L),e.height=B,e.intersect=function(t){return W.rect(e,t)},s}async function ve(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:l,label:c}=await p(t,e,y(e)),d=a.width+10*l,g=a.height+8*l,m=.15*d,{cssStyles:x}=e,C=a.width+20,b=a.height+20,k=Math.max(d,C),w=Math.max(g,b);let S;c.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);const T=`M0 0 \n a${m},${m} 1 0,0 ${.25*k},${-1*w*.1}\n a${m},${m} 1 0,0 ${.25*k},0\n a${m},${m} 1 0,0 ${.25*k},0\n a${m},${m} 1 0,0 ${.25*k},${.1*w}\n\n a${m},${m} 1 0,0 ${.15*k},${.33*w}\n a${.8*m},${.8*m} 1 0,0 0,${.34*w}\n a${m},${m} 1 0,0 ${-1*k*.15},${.33*w}\n\n a${m},${m} 1 0,0 ${-1*k*.25},${.15*w}\n a${m},${m} 1 0,0 ${-1*k*.25},0\n a${m},${m} 1 0,0 ${-1*k*.25},0\n a${m},${m} 1 0,0 ${-1*k*.25},${-1*w*.15}\n\n a${m},${m} 1 0,0 ${-1*k*.1},${-1*w*.33}\n a${.8*m},${.8*m} 1 0,0 0,${-1*w*.34}\n a${m},${m} 1 0,0 ${.1*k},${-1*w*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=u.A.svg(n),r=(0,i.Fr)(e,{}),o=t.path(T,r);S=n.insert(()=>o,":first-child"),S.attr("class","basic label-container").attr("style",(0,s.KL)(x))}else S=n.insert("path",":first-child").attr("class","basic label-container").attr("style",o).attr("d",T);return S.attr("transform",`translate(${-k/2}, ${-w/2})`),f(e,S),e.calcIntersect=function(t,e){return W.rect(t,e)},e.intersect=function(t){return h.R.info("Bang intersect",e,t),W.rect(e,t)},n}async function Be(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:l,label:c}=await p(t,e,y(e)),d=a.width+2*l,g=a.height+2*l,m=.15*d,x=.25*d,C=.35*d,b=.2*d,{cssStyles:k}=e;let w;const S=`M0 0 \n a${m},${m} 0 0,1 ${.25*d},${-1*d*.1}\n a${C},${C} 1 0,1 ${.4*d},${-1*d*.1}\n a${x},${x} 1 0,1 ${.35*d},${.2*d}\n\n a${m},${m} 1 0,1 ${.15*d},${.35*g}\n a${b},${b} 1 0,1 ${-1*d*.15},${.65*g}\n\n a${x},${m} 1 0,1 ${-1*d*.25},${.15*d}\n a${C},${C} 1 0,1 ${-1*d*.5},0\n a${m},${m} 1 0,1 ${-1*d*.25},${-1*d*.15}\n\n a${m},${m} 1 0,1 ${-1*d*.1},${-1*g*.35}\n a${b},${b} 1 0,1 ${.1*d},${-1*g*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=u.A.svg(n),r=(0,i.Fr)(e,{}),o=t.path(S,r);w=n.insert(()=>o,":first-child"),w.attr("class","basic label-container").attr("style",(0,s.KL)(k))}else w=n.insert("path",":first-child").attr("class","basic label-container").attr("style",o).attr("d",S);return c.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),w.attr("transform",`translate(${-d/2}, ${-g/2})`),f(e,w),e.calcIntersect=function(t,e){return W.rect(t,e)},e.intersect=function(t){return h.R.info("Cloud intersect",e,t),W.rect(e,t)},n}async function _e(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:l}=await p(t,e,y(e)),h=a.width+8*s,c=a.height+2*s,d="neo"===e.look?`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-5}\n H${-h/2}\n Z\n `:`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${-(h-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const u=n.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",o).attr("d",d);return n.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>l.node()),f(e,u),e.calcIntersect=function(t,e){return W.rect(t,e)},e.intersect=function(t){return W.rect(e,t)},n}async function Ae(t,e){return Z(t,e,{padding:e.padding??0})}(0,c.K)(Te,"kanbanItem"),(0,c.K)(ve,"bang"),(0,c.K)(Be,"cloud"),(0,c.K)(_e,"defaultMindmapNode"),(0,c.K)(Ae,"mindmapCircle");var Le=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Ut},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:jt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Xt},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Qt},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ct},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ut},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Z},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ve},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Be},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Kt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:bt},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Ft},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Lt},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ae},{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:_t},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:gt},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ee},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:G},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ht},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Zt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Vt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:mt},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:kt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:et},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:it},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:nt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Mt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:he},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:xt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ne},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:It},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:at},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:pt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:le},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ue},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ft},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:se},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:yt},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Yt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Rt},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:qt},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:U},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:J},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:te},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Jt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ce},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Pt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Dt}],Fe=(0,c.K)(()=>{const t={state:Gt,choice:V,note:zt,rectWithTitle:Wt,labelRect:At,iconSquare:vt,iconCircle:St,icon:wt,iconRounded:Tt,imageSquare:Bt,anchor:j,kanbanItem:Te,mindmapCircle:Ae,defaultMindmapNode:_e,classBox:be,erBox:fe,requirementBox:ke},e=[...Object.entries(t),...Le.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function Me(t){return t in Fe}(0,c.K)(Me,"isValidShape");var Ee=new Map;async function $e(t,e,r){let i,o;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const n=e.shape?Fe[e.shape]:void 0;if(!n)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let a;"sandbox"===r.config.securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a??null),o=await n(i,e,r)}else o=await n(t,e,r),i=o;return i.attr("data-look",(0,s.KL)(e.look)),e.tooltip&&o.attr("title",e.tooltip),Ee.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}(0,c.K)($e,"insertNode");var Oe=(0,c.K)((t,e)=>{Ee.set(e.id,t)},"setNodeElem"),Ie=(0,c.K)(()=>{Ee.clear()},"clear"),De=(0,c.K)(t=>{const e=Ee.get(t.id);h.R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},81818(t,e,r){"use strict";r.d(e,{H:()=>ir,r:()=>rr});var i=r(86827);function o(t){return null==t}function n(t){return"object"==typeof t&&null!==t}function a(t){return Array.isArray(t)?t:o(t)?[]:[t]}function s(t,e){var r,i,o,n;if(e)for(r=0,i=(n=Object.keys(e)).length;r<i;r+=1)t[o=n[r]]=e[o];return t}function l(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function h(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}(0,i.K)(o,"isNothing"),(0,i.K)(n,"isObject"),(0,i.K)(a,"toArray"),(0,i.K)(s,"extend"),(0,i.K)(l,"repeat"),(0,i.K)(h,"isNegativeZero");var c={isNothing:o,isObject:n,toArray:a,repeat:l,isNegativeZero:h,extend:s};function d(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+="\n\n"+t.mark.snippet),i+" "+r):i}function u(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=d(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(0,i.K)(d,"formatError"),(0,i.K)(u,"YAMLException$1"),u.prototype=Object.create(Error.prototype),u.prototype.constructor=u,u.prototype.toString=(0,i.K)(function(t){return this.name+": "+d(this,t)},"toString");var p=u;function g(t,e,r,i,o){var n="",a="",s=Math.floor(o/2)-1;return i-e>s&&(e=i-s+(n=" ... ").length),r-i>s&&(r=i+s-(a=" ...").length),{str:n+t.slice(e,r).replace(/\t/g,"→")+a,pos:i-e+n.length}}function f(t,e){return c.repeat(" ",e-t.length)+t}function y(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,o=[0],n=[],a=-1;r=i.exec(t.buffer);)n.push(r.index),o.push(r.index+r[0].length),t.position<=r.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var s,l,h="",d=Math.min(t.line+e.linesAfter,n.length).toString().length,u=e.maxLength-(e.indent+d+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=g(t.buffer,o[a-s],n[a-s],t.position-(o[a]-o[a-s]),u),h=c.repeat(" ",e.indent)+f((t.line-s+1).toString(),d)+" | "+l.str+"\n"+h;for(l=g(t.buffer,o[a],n[a],t.position,u),h+=c.repeat(" ",e.indent)+f((t.line+1).toString(),d)+" | "+l.str+"\n",h+=c.repeat("-",e.indent+d+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=n.length);s++)l=g(t.buffer,o[a+s],n[a+s],t.position-(o[a]-o[a+s]),u),h+=c.repeat(" ",e.indent)+f((t.line+s+1).toString(),d)+" | "+l.str+"\n";return h.replace(/\n$/,"")}(0,i.K)(g,"getLine"),(0,i.K)(f,"padStart"),(0,i.K)(y,"makeSnippet");var m=y,x=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],C=["scalar","sequence","mapping"];function b(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function k(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===x.indexOf(e))throw new p('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=b(e.styleAliases||null),-1===C.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,i.K)(b,"compileStyleAliases"),(0,i.K)(k,"Type$1");var w=k;function S(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function T(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,i.K)(o,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(o);return r}function v(t){return this.extend(t)}(0,i.K)(S,"compileList"),(0,i.K)(T,"compileMap"),(0,i.K)(v,"Schema$1"),v.prototype.extend=(0,i.K)(function(t){var e=[],r=[];if(t instanceof w)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new p("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof w))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new p("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new p("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof w))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(v.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=S(i,"implicit"),i.compiledExplicit=S(i,"explicit"),i.compiledTypeMap=T(i.compiledImplicit,i.compiledExplicit),i},"extend");var B=new v({explicit:[new w("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,i.K)(function(t){return null!==t?t:""},"construct")}),new w("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,i.K)(function(t){return null!==t?t:[]},"construct")}),new w("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,i.K)(function(t){return null!==t?t:{}},"construct")})]});function _(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function A(){return null}function L(t){return null===t}(0,i.K)(_,"resolveYamlNull"),(0,i.K)(A,"constructYamlNull"),(0,i.K)(L,"isNull");var F=new w("tag:yaml.org,2002:null",{kind:"scalar",resolve:_,construct:A,predicate:L,represent:{canonical:(0,i.K)(function(){return"~"},"canonical"),lowercase:(0,i.K)(function(){return"null"},"lowercase"),uppercase:(0,i.K)(function(){return"NULL"},"uppercase"),camelcase:(0,i.K)(function(){return"Null"},"camelcase"),empty:(0,i.K)(function(){return""},"empty")},defaultStyle:"lowercase"});function M(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function E(t){return"true"===t||"True"===t||"TRUE"===t}function $(t){return"[object Boolean]"===Object.prototype.toString.call(t)}(0,i.K)(M,"resolveYamlBoolean"),(0,i.K)(E,"constructYamlBoolean"),(0,i.K)($,"isBoolean");var O=new w("tag:yaml.org,2002:bool",{kind:"scalar",resolve:M,construct:E,predicate:$,represent:{lowercase:(0,i.K)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,i.K)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,i.K)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function I(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function D(t){return 48<=t&&t<=55}function q(t){return 48<=t&&t<=57}function R(t){if(null===t)return!1;var e,r=t.length,i=0,o=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;o=!0}return o&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!I(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!D(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!q(t.charCodeAt(i)))return!1;o=!0}return!(!o||"_"===e)}function z(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function N(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!c.isNegativeZero(t)}(0,i.K)(I,"isHexCode"),(0,i.K)(D,"isOctCode"),(0,i.K)(q,"isDecCode"),(0,i.K)(R,"resolveYamlInteger"),(0,i.K)(z,"constructYamlInteger"),(0,i.K)(N,"isInteger");var K=new w("tag:yaml.org,2002:int",{kind:"scalar",resolve:R,construct:z,predicate:N,represent:{binary:(0,i.K)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,i.K)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,i.K)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,i.K)(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"]}}),P=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function W(t){return null!==t&&!(!P.test(t)||"_"===t[t.length-1])}function j(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.K)(W,"resolveYamlFloat"),(0,i.K)(j,"constructYamlFloat");var H=/^[-+]?[0-9]+e/;function Y(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(c.isNegativeZero(t))return"-0.0";return r=t.toString(10),H.test(r)?r.replace("e",".e"):r}function U(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||c.isNegativeZero(t))}(0,i.K)(Y,"representYamlFloat"),(0,i.K)(U,"isFloat");var X=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:W,construct:j,predicate:U,represent:Y,defaultStyle:"lowercase"}),G=B.extend({implicit:[F,O,K,X]}),V=G,Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=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 J(t){return null!==t&&(null!==Z.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,i,o,n,a,s,l,h=0,c=null;if(null===(e=Z.exec(t))&&(e=Q.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,i,o));if(n=+e[4],a=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,o,n,a,s,h)),c&&l.setTime(l.getTime()-c),l}function et(t){return t.toISOString()}(0,i.K)(J,"resolveYamlTimestamp"),(0,i.K)(tt,"constructYamlTimestamp"),(0,i.K)(et,"representYamlTimestamp");var rt=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function it(t){return"<<"===t||null===t}(0,i.K)(it,"resolveYamlMerge");var ot=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:it}),nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function at(t){if(null===t)return!1;var e,r,i=0,o=t.length,n=nt;for(r=0;r<o;r++)if(!((e=n.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function st(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,n=nt,a=0,s=[];for(e=0;e<o;e++)e%4==0&&e&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|n.indexOf(i.charAt(e));return 0===(r=o%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)}function lt(t){var e,r,i="",o=0,n=t.length,a=nt;for(e=0;e<n;e++)e%3==0&&e&&(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]),o=(o<<8)+t[e];return 0===(r=n%3)?(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]):2===r?(i+=a[o>>10&63],i+=a[o>>4&63],i+=a[o<<2&63],i+=a[64]):1===r&&(i+=a[o>>2&63],i+=a[o<<4&63],i+=a[64],i+=a[64]),i}function ht(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,i.K)(at,"resolveYamlBinary"),(0,i.K)(st,"constructYamlBinary"),(0,i.K)(lt,"representYamlBinary"),(0,i.K)(ht,"isBinary");var ct=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:at,construct:st,predicate:ht,represent:lt}),dt=Object.prototype.hasOwnProperty,ut=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,i,o,n,a=[],s=t;for(e=0,r=s.length;e<r;e+=1){if(i=s[e],n=!1,"[object Object]"!==ut.call(i))return!1;for(o in i)if(dt.call(i,o)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0}function gt(t){return null!==t?t:[]}(0,i.K)(pt,"resolveYamlOmap"),(0,i.K)(gt,"constructYamlOmap");var ft=new w("tag:yaml.org,2002:omap",{kind:"sequence",resolve:pt,construct:gt}),yt=Object.prototype.toString;function mt(t){if(null===t)return!0;var e,r,i,o,n,a=t;for(n=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(i=a[e],"[object Object]"!==yt.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;n[e]=[o[0],i[o[0]]]}return!0}function xt(t){if(null===t)return[];var e,r,i,o,n,a=t;for(n=new Array(a.length),e=0,r=a.length;e<r;e+=1)i=a[e],o=Object.keys(i),n[e]=[o[0],i[o[0]]];return n}(0,i.K)(mt,"resolveYamlPairs"),(0,i.K)(xt,"constructYamlPairs");var Ct=new w("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:mt,construct:xt}),bt=Object.prototype.hasOwnProperty;function kt(t){if(null===t)return!0;var e,r=t;for(e in r)if(bt.call(r,e)&&null!==r[e])return!1;return!0}function wt(t){return null!==t?t:{}}(0,i.K)(kt,"resolveYamlSet"),(0,i.K)(wt,"constructYamlSet");var St=new w("tag:yaml.org,2002:set",{kind:"mapping",resolve:kt,construct:wt}),Tt=V.extend({implicit:[rt,ot],explicit:[ct,ft,Ct,St]}),vt=Object.prototype.hasOwnProperty,Bt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_t=/[\x85\u2028\u2029]/,At=/[,\[\]\{\}]/,Lt=/^(?:!|!!|![a-z\-]+!)$/i,Ft=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Mt(t){return Object.prototype.toString.call(t)}function Et(t){return 10===t||13===t}function $t(t){return 9===t||32===t}function Ot(t){return 9===t||32===t||10===t||13===t}function It(t){return 44===t||91===t||93===t||123===t||125===t}function Dt(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function qt(t){return 120===t?2:117===t?4:85===t?8:0}function Rt(t){return 48<=t&&t<=57?t-48:-1}function zt(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function Nt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function Kt(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,i.K)(Mt,"_class"),(0,i.K)(Et,"is_EOL"),(0,i.K)($t,"is_WHITE_SPACE"),(0,i.K)(Ot,"is_WS_OR_EOL"),(0,i.K)(It,"is_FLOW_INDICATOR"),(0,i.K)(Dt,"fromHexCode"),(0,i.K)(qt,"escapedHexLen"),(0,i.K)(Rt,"fromDecimalCode"),(0,i.K)(zt,"simpleEscapeSequence"),(0,i.K)(Nt,"charFromCodepoint"),(0,i.K)(Kt,"setProperty");var Pt,Wt=new Array(256),jt=new Array(256);for(Pt=0;Pt<256;Pt++)Wt[Pt]=zt(Pt)?1:0,jt[Pt]=zt(Pt);function Ht(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Tt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Yt(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=m(r),new p(e,r)}function Ut(t,e){throw Yt(t,e)}function Xt(t,e){t.onWarning&&t.onWarning.call(null,Yt(t,e))}(0,i.K)(Ht,"State$1"),(0,i.K)(Yt,"generateError"),(0,i.K)(Ut,"throwError"),(0,i.K)(Xt,"throwWarning");var Gt={YAML:(0,i.K)(function(t,e,r){var i,o,n;null!==t.version&&Ut(t,"duplication of %YAML directive"),1!==r.length&&Ut(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Ut(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),n=parseInt(i[2],10),1!==o&&Ut(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,1!==n&&2!==n&&Xt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,i.K)(function(t,e,r){var i,o;2!==r.length&&Ut(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Lt.test(i)||Ut(t,"ill-formed tag handle (first argument) of the TAG directive"),vt.call(t.tagMap,i)&&Ut(t,'there is a previously declared suffix for "'+i+'" tag handle'),Ft.test(o)||Ut(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(e){Ut(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o},"handleTagDirective")};function Vt(t,e,r,i){var o,n,a,s;if(e<r){if(s=t.input.slice(e,r),i)for(o=0,n=s.length;o<n;o+=1)9===(a=s.charCodeAt(o))||32<=a&&a<=1114111||Ut(t,"expected valid JSON character");else Bt.test(s)&&Ut(t,"the stream contains non-printable characters");t.result+=s}}function Zt(t,e,r,i){var o,n,a,s;for(c.isObject(r)||Ut(t,"cannot merge mappings; the provided source object is unacceptable"),a=0,s=(o=Object.keys(r)).length;a<s;a+=1)n=o[a],vt.call(e,n)||(Kt(e,n,r[n]),i[n]=!0)}function Qt(t,e,r,i,o,n,a,s,l){var h,c;if(Array.isArray(o))for(h=0,c=(o=Array.prototype.slice.call(o)).length;h<c;h+=1)Array.isArray(o[h])&&Ut(t,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===Mt(o[h])&&(o[h]="[object Object]");if("object"==typeof o&&"[object Object]"===Mt(o)&&(o="[object Object]"),o=String(o),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(n))for(h=0,c=n.length;h<c;h+=1)Zt(t,e,n[h],r);else Zt(t,e,n,r);else t.json||vt.call(r,o)||!vt.call(e,o)||(t.line=a||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,Ut(t,"duplicated mapping key")),Kt(e,o,n),delete r[o];return e}function Jt(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Ut(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function te(t,e,r){for(var i=0,o=t.input.charCodeAt(t.position);0!==o;){for(;$t(o);)9===o&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&35===o)do{o=t.input.charCodeAt(++t.position)}while(10!==o&&13!==o&&0!==o);if(!Et(o))break;for(Jt(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&Xt(t,"deficient indentation"),i}function ee(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!Ot(e)))}function re(t,e){1===e?t.result+=" ":e>1&&(t.result+=c.repeat("\n",e-1))}function ie(t,e,r){var i,o,n,a,s,l,h,c,d=t.kind,u=t.result;if(Ot(c=t.input.charCodeAt(t.position))||It(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(Ot(i=t.input.charCodeAt(t.position+1))||r&&It(i)))return!1;for(t.kind="scalar",t.result="",o=n=t.position,a=!1;0!==c;){if(58===c){if(Ot(i=t.input.charCodeAt(t.position+1))||r&&It(i))break}else if(35===c){if(Ot(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&ee(t)||r&&It(c))break;if(Et(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,te(t,!1,-1),t.lineIndent>=e){a=!0,c=t.input.charCodeAt(t.position);continue}t.position=n,t.line=s,t.lineStart=l,t.lineIndent=h;break}}a&&(Vt(t,o,n,!1),re(t,t.line-s),o=n=t.position,a=!1),$t(c)||(n=t.position+1),c=t.input.charCodeAt(++t.position)}return Vt(t,o,n,!1),!!t.result||(t.kind=d,t.result=u,!1)}function oe(t,e){var r,i,o;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Vt(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,o=t.position}else Et(r)?(Vt(t,i,o,!0),re(t,te(t,!1,e)),i=o=t.position):t.position===t.lineStart&&ee(t)?Ut(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);Ut(t,"unexpected end of the stream within a single quoted scalar")}function ne(t,e){var r,i,o,n,a,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Vt(t,r,t.position,!0),t.position++,!0;if(92===s){if(Vt(t,r,t.position,!0),Et(s=t.input.charCodeAt(++t.position)))te(t,!1,e);else if(s<256&&Wt[s])t.result+=jt[s],t.position++;else if((a=qt(s))>0){for(o=a,n=0;o>0;o--)(a=Dt(s=t.input.charCodeAt(++t.position)))>=0?n=(n<<4)+a:Ut(t,"expected hexadecimal character");t.result+=Nt(n),t.position++}else Ut(t,"unknown escape sequence");r=i=t.position}else Et(s)?(Vt(t,r,i,!0),re(t,te(t,!1,e)),r=i=t.position):t.position===t.lineStart&&ee(t)?Ut(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Ut(t,"unexpected end of the stream within a double quoted scalar")}function ae(t,e){var r,i,o,n,a,s,l,h,c,d,u,p,g=!0,f=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))a=93,h=!1,n=[];else{if(123!==p)return!1;a=125,h=!0,n={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(++t.position);0!==p;){if(te(t,!0,e),(p=t.input.charCodeAt(t.position))===a)return t.position++,t.tag=f,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=n,!0;g?44===p&&Ut(t,"expected the node content, but found ','"):Ut(t,"missed comma between flow collection entries"),u=null,s=l=!1,63===p&&Ot(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,te(t,!0,e)),r=t.line,i=t.lineStart,o=t.position,pe(t,e,1,!1,!0),d=t.tag,c=t.result,te(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),te(t,!0,e),pe(t,e,1,!1,!0),u=t.result),h?Qt(t,n,m,d,c,u,r,i,o):s?n.push(Qt(t,null,m,d,c,u,r,i,o)):n.push(c),te(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}Ut(t,"unexpected end of the stream within a flow collection")}function se(t,e){var r,i,o,n,a=1,s=!1,l=!1,h=e,d=0,u=!1;if(124===(n=t.input.charCodeAt(t.position)))i=!1;else{if(62!==n)return!1;i=!0}for(t.kind="scalar",t.result="";0!==n;)if(43===(n=t.input.charCodeAt(++t.position))||45===n)1===a?a=43===n?3:2:Ut(t,"repeat of a chomping mode identifier");else{if(!((o=Rt(n))>=0))break;0===o?Ut(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Ut(t,"repeat of an indentation width identifier"):(h=e+o-1,l=!0)}if($t(n)){do{n=t.input.charCodeAt(++t.position)}while($t(n));if(35===n)do{n=t.input.charCodeAt(++t.position)}while(!Et(n)&&0!==n)}for(;0!==n;){for(Jt(t),t.lineIndent=0,n=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),Et(n))d++;else{if(t.lineIndent<h){3===a?t.result+=c.repeat("\n",s?1+d:d):1===a&&s&&(t.result+="\n");break}for(i?$t(n)?(u=!0,t.result+=c.repeat("\n",s?1+d:d)):u?(u=!1,t.result+=c.repeat("\n",d+1)):0===d?s&&(t.result+=" "):t.result+=c.repeat("\n",d):t.result+=c.repeat("\n",s?1+d:d),s=!0,l=!0,d=0,r=t.position;!Et(n)&&0!==n;)n=t.input.charCodeAt(++t.position);Vt(t,r,t.position,!1)}}return!0}function le(t,e){var r,i,o=t.tag,n=t.anchor,a=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Ut(t,"tab characters must not be used in indentation")),45===i)&&Ot(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,te(t,!0,-1)&&t.lineIndent<=e)a.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,pe(t,e,3,!1,!0),a.push(t.result),te(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)Ut(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=o,t.anchor=n,t.kind="sequence",t.result=a,!0)}function he(t,e,r){var i,o,n,a,s,l,h,c=t.tag,d=t.anchor,u={},p=Object.create(null),g=null,f=null,y=null,m=!1,x=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),h=t.input.charCodeAt(t.position);0!==h;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Ut(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),n=t.line,63!==h&&58!==h||!Ot(i)){if(a=t.line,s=t.lineStart,l=t.position,!pe(t,r,2,!1,!0))break;if(t.line===n){for(h=t.input.charCodeAt(t.position);$t(h);)h=t.input.charCodeAt(++t.position);if(58===h)Ot(h=t.input.charCodeAt(++t.position))||Ut(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Qt(t,u,p,g,f,null,a,s,l),g=f=y=null),x=!0,m=!1,o=!1,g=t.tag,f=t.result;else{if(!x)return t.tag=c,t.anchor=d,!0;Ut(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return t.tag=c,t.anchor=d,!0;Ut(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(Qt(t,u,p,g,f,null,a,s,l),g=f=y=null),x=!0,m=!0,o=!0):m?(m=!1,o=!0):Ut(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===n||t.lineIndent>e)&&(m&&(a=t.line,s=t.lineStart,l=t.position),pe(t,e,4,!0,o)&&(m?f=t.result:y=t.result),m||(Qt(t,u,p,g,f,y,a,s,l),g=f=y=null),te(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&0!==h)Ut(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&Qt(t,u,p,g,f,null,a,s,l),x&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),x}function ce(t){var e,r,i,o,n=!1,a=!1;if(33!==(o=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Ut(t,"duplication of a tag property"),60===(o=t.input.charCodeAt(++t.position))?(n=!0,o=t.input.charCodeAt(++t.position)):33===o?(a=!0,r="!!",o=t.input.charCodeAt(++t.position)):r="!",e=t.position,n){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&62!==o);t.position<t.length?(i=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):Ut(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!Ot(o);)33===o&&(a?Ut(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Lt.test(r)||Ut(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),At.test(i)&&Ut(t,"tag suffix cannot contain flow indicator characters")}i&&!Ft.test(i)&&Ut(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(e){Ut(t,"tag name is malformed: "+i)}return n?t.tag=i:vt.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:Ut(t,'undeclared tag handle "'+r+'"'),!0}function de(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Ut(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Ot(r)&&!It(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Ut(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function ue(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Ot(i)&&!It(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Ut(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),vt.call(t.anchorMap,r)||Ut(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],te(t,!0,-1),!0}function pe(t,e,r,i,o){var n,a,s,l,h,c,d,u,p,g=1,f=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=a=s=4===r||3===r,i&&te(t,!0,-1)&&(f=!0,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)),1===g)for(;ce(t)||de(t);)te(t,!0,-1)?(f=!0,s=n,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)):s=!1;if(s&&(s=f||o),1!==g&&4!==r||(u=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===g?s&&(le(t,p)||he(t,p,u))||ae(t,u)?y=!0:(a&&se(t,u)||oe(t,u)||ne(t,u)?y=!0:ue(t)?(y=!0,null===t.tag&&null===t.anchor||Ut(t,"alias node should not have any properties")):ie(t,u,1===r)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===g&&(y=s&&le(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Ut(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(vt.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){d=c[l];break}d||Ut(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&Ut(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Ut(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function ge(t){var e,r,i,o,n=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(o=t.input.charCodeAt(t.position))&&(te(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(a=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!Ot(o);)o=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&Ut(t,"directive name must not be less than one character in length");0!==o;){for(;$t(o);)o=t.input.charCodeAt(++t.position);if(35===o){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&!Et(o));break}if(Et(o))break;for(e=t.position;0!==o&&!Ot(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==o&&Jt(t),vt.call(Gt,r)?Gt[r](t,r,i):Xt(t,'unknown document directive "'+r+'"')}te(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,te(t,!0,-1)):a&&Ut(t,"directives end mark is expected"),pe(t,t.lineIndent-1,4,!1,!0),te(t,!0,-1),t.checkLineBreaks&&_t.test(t.input.slice(n,t.position))&&Xt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ee(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,te(t,!0,-1)):t.position<t.length-1&&Ut(t,"end of the stream or a document separator is expected")}function fe(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new Ht(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,Ut(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ge(r);return r.documents}function ye(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=fe(t,r);if("function"!=typeof e)return i;for(var o=0,n=i.length;o<n;o+=1)e(i[o])}function me(t,e){var r=fe(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new p("expected a single document in the stream, but found more")}}(0,i.K)(Vt,"captureSegment"),(0,i.K)(Zt,"mergeMappings"),(0,i.K)(Qt,"storeMappingPair"),(0,i.K)(Jt,"readLineBreak"),(0,i.K)(te,"skipSeparationSpace"),(0,i.K)(ee,"testDocumentSeparator"),(0,i.K)(re,"writeFoldedLines"),(0,i.K)(ie,"readPlainScalar"),(0,i.K)(oe,"readSingleQuotedScalar"),(0,i.K)(ne,"readDoubleQuotedScalar"),(0,i.K)(ae,"readFlowCollection"),(0,i.K)(se,"readBlockScalar"),(0,i.K)(le,"readBlockSequence"),(0,i.K)(he,"readBlockMapping"),(0,i.K)(ce,"readTagProperty"),(0,i.K)(de,"readAnchorProperty"),(0,i.K)(ue,"readAlias"),(0,i.K)(pe,"composeNode"),(0,i.K)(ge,"readDocument"),(0,i.K)(fe,"loadDocuments"),(0,i.K)(ye,"loadAll$1"),(0,i.K)(me,"load$1");var xe={loadAll:ye,load:me},Ce=Object.prototype.toString,be=Object.prototype.hasOwnProperty,ke=65279,we={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Se=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Te=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ve(t,e){var r,i,o,n,a,s,l;if(null===e)return{};for(r={},o=0,n=(i=Object.keys(e)).length;o<n;o+=1)a=i[o],s=String(e[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(l=t.compiledTypeMap.fallback[a])&&be.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[a]=s;return r}function Be(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))throw new p("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+c.repeat("0",i-e.length)+e}(0,i.K)(ve,"compileStyleMap"),(0,i.K)(Be,"encodeHex");function _e(t){this.schema=t.schema||Tt,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=c.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=ve(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?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ae(t,e){for(var r,i=c.repeat(" ",e),o=0,n=-1,a="",s=t.length;o<s;)-1===(n=t.indexOf("\n",o))?(r=t.slice(o),o=s):(r=t.slice(o,n+1),o=n+1),r.length&&"\n"!==r&&(a+=i),a+=r;return a}function Le(t,e){return"\n"+c.repeat(" ",t.indent*e)}function Fe(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function Me(t){return 32===t||9===t}function Ee(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==ke||65536<=t&&t<=1114111}function $e(t){return Ee(t)&&t!==ke&&13!==t&&10!==t}function Oe(t,e,r){var i=$e(t),o=i&&!Me(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!o)||$e(e)&&!Me(e)&&35===t||58===e&&o}function Ie(t){return Ee(t)&&t!==ke&&!Me(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function De(t){return!Me(t)&&58!==t}function qe(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function Re(t){return/^\n* /.test(t)}(0,i.K)(_e,"State"),(0,i.K)(Ae,"indentString"),(0,i.K)(Le,"generateNextLine"),(0,i.K)(Fe,"testImplicitResolving"),(0,i.K)(Me,"isWhitespace"),(0,i.K)(Ee,"isPrintable"),(0,i.K)($e,"isNsCharOrWhitespace"),(0,i.K)(Oe,"isPlainSafe"),(0,i.K)(Ie,"isPlainSafeFirst"),(0,i.K)(De,"isPlainSafeLast"),(0,i.K)(qe,"codePointAt"),(0,i.K)(Re,"needIndentIndicator");function ze(t,e,r,i,o,n,a,s){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=Ie(qe(t,0))&&De(qe(t,t.length-1));if(e||a)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!Ee(h=qe(t,l)))return 5;f=f&&Oe(h,c,s),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=qe(t,l)))d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!Ee(h))return 5;f=f&&Oe(h,c,s),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&Re(t)?5:a?2===n?5:2:u?4:3:!f||a||o(t)?2===n?5:2:1}function Ne(t,e,r,o,n){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Se.indexOf(e)||Te.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=o||t.flowLevel>-1&&r>=t.flowLevel;function h(e){return Fe(t,e)}switch((0,i.K)(h,"testAmbiguity"),ze(e,l,t.indent,s,h,t.quotingType,t.forceQuotes&&!o,n)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Ke(e,t.indent)+Pe(Ae(e,a));case 4:return">"+Ke(e,t.indent)+Pe(Ae(We(e,s),a));case 5:return'"'+He(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function Ke(t,e){var r=Re(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function Pe(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function We(t,e){for(var r,i,o,n=/(\n+)([^\n]*)/g,a=(r=-1!==(r=t.indexOf("\n"))?r:t.length,n.lastIndex=r,je(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];o=n.exec(t);){var l=o[1],h=o[2];i=" "===h[0],a+=l+(s||i||""===h?"":"\n")+je(h,e),s=i}return a}function je(t,e){if(""===t||" "===t[0])return t;for(var r,i,o=/ [^ ]/g,n=0,a=0,s=0,l="";r=o.exec(t);)(s=r.index)-n>e&&(i=a>n?a:s,l+="\n"+t.slice(n,i),n=i+1),a=s;return l+="\n",t.length-n>e&&a>n?l+=t.slice(n,a)+"\n"+t.slice(a+1):l+=t.slice(n),l.slice(1)}function He(t){for(var e,r="",i=0,o=0;o<t.length;i>=65536?o+=2:o++)i=qe(t,o),!(e=we[i])&&Ee(i)?(r+=t[o],i>=65536&&(r+=t[o+1])):r+=e||Be(i);return r}function Ye(t,e,r){var i,o,n,a="",s=t.tag;for(i=0,o=r.length;i<o;i+=1)n=r[i],t.replacer&&(n=t.replacer.call(r,String(i),n)),(Ze(t,e,n,!1,!1)||void 0===n&&Ze(t,e,null,!1,!1))&&(""!==a&&(a+=","+(t.condenseFlow?"":" ")),a+=t.dump);t.tag=s,t.dump="["+a+"]"}function Ue(t,e,r,i){var o,n,a,s="",l=t.tag;for(o=0,n=r.length;o<n;o+=1)a=r[o],t.replacer&&(a=t.replacer.call(r,String(o),a)),(Ze(t,e+1,a,!0,!0,!1,!0)||void 0===a&&Ze(t,e+1,null,!0,!0,!1,!0))&&(i&&""===s||(s+=Le(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function Xe(t,e,r){var i,o,n,a,s,l="",h=t.tag,c=Object.keys(r);for(i=0,o=c.length;i<o;i+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),a=r[n=c[i]],t.replacer&&(a=t.replacer.call(r,n,a)),Ze(t,e,n,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ze(t,e,a,!1,!1)&&(l+=s+=t.dump));t.tag=h,t.dump="{"+l+"}"}function Ge(t,e,r,i){var o,n,a,s,l,h,c="",d=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(o=0,n=u.length;o<n;o+=1)h="",i&&""===c||(h+=Le(t,e)),s=r[a=u[o]],t.replacer&&(s=t.replacer.call(r,a,s)),Ze(t,e+1,a,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Le(t,e)),Ze(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=d,t.dump=c||"{}"}function Ve(t,e,r){var i,o,n,a,s,l;for(n=0,a=(o=r?t.explicitTypes:t.implicitTypes).length;n<a;n+=1)if(((s=o[n]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(r?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===Ce.call(s.represent))i=s.represent(e,l);else{if(!be.call(s.represent,l))throw new p("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function Ze(t,e,r,i,o,n,a){t.tag=null,t.dump=r,Ve(t,r,!1)||Ve(t,r,!0);var s,l=Ce.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(o=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(u&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(Ge(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(Xe(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?Ue(t,e-1,t.dump,o):Ue(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(Ye(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Ne(t,t.dump,e,n,h)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Qe(t,e){var r,i,o=[],n=[];for(Je(t,o,n),r=0,i=n.length;r<i;r+=1)e.duplicates.push(o[n[r]]);e.usedDuplicates=new Array(i)}function Je(t,e,r){var i,o,n;if(null!==t&&"object"==typeof t)if(-1!==(o=e.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(e.push(t),Array.isArray(t))for(o=0,n=t.length;o<n;o+=1)Je(t[o],e,r);else for(o=0,n=(i=Object.keys(t)).length;o<n;o+=1)Je(t[i[o]],e,r)}function tr(t,e){var r=new _e(e=e||{});r.noRefs||Qe(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ze(r,0,i,!0,!0)?r.dump+"\n":""}(0,i.K)(ze,"chooseScalarStyle"),(0,i.K)(Ne,"writeScalar"),(0,i.K)(Ke,"blockHeader"),(0,i.K)(Pe,"dropEndingNewline"),(0,i.K)(We,"foldString"),(0,i.K)(je,"foldLine"),(0,i.K)(He,"escapeString"),(0,i.K)(Ye,"writeFlowSequence"),(0,i.K)(Ue,"writeBlockSequence"),(0,i.K)(Xe,"writeFlowMapping"),(0,i.K)(Ge,"writeBlockMapping"),(0,i.K)(Ve,"detectType"),(0,i.K)(Ze,"writeNode"),(0,i.K)(Qe,"getDuplicateReferences"),(0,i.K)(Je,"inspectNode"),(0,i.K)(tr,"dump$1");function er(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.")}}(0,i.K)(er,"renamed");var rr=G,ir=xe.load;er("safeLoad","load"),er("safeLoadAll","loadAll"),er("safeDump","dump")},84146(t,e,r){"use strict";function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(o.length){var n=new RegExp("\n[\t ]{".concat(Math.min.apply(Math,o),"}"),"g");i=i.map(function(t){return t.replace(n,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return e.forEach(function(t,e){var r=a.match(/(?:^|\n)( *)$/),o=r?r[1]:"",n=t;"string"==typeof t&&t.includes("\n")&&(n=String(t).split("\n").map(function(t,e){return 0===e?t:"".concat(o).concat(t)}).join("\n")),a+=n+i[e+1]}),a}r.d(e,{T:()=>i})}}]);