213 lines
517 KiB
JavaScript
Generated
213 lines
517 KiB
JavaScript
Generated
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-vendor-7kCcHxQn.js","assets/ui-vendor-DaJTMqwy.js","assets/react-vendor-CgPb4pW_.js","assets/feature-graph-D68hhnYC.js","assets/graph-vendor-BC3frDkq.js","assets/utils-vendor-elCzPYZl.js","assets/feature-graph-BipNuM18.css","assets/dagre-FFZHY6LT-ByNd4rXI.js","assets/graph-C9TLhZpq.js","assets/_baseUniq-DHoNBBvA.js","assets/layout-CSejuzzT.js","assets/_basePickBy-enj1kD1i.js","assets/clone-DMtoZDWc.js","assets/c4Diagram-6F6E4RAY-B6hTg9H8.js","assets/chunk-67H74DCK-Bze2qmzX.js","assets/flowDiagram-PKI6S5ZS-Ry-v0Q5g.js","assets/chunk-E2GYISFI-DBdOi329.js","assets/chunk-BFAMUDN2-DUbWdDRU.js","assets/chunk-SKB7J2MH-CncvyOyo.js","assets/erDiagram-R3QVA2FD-Pi_9scwm.js","assets/gitGraphDiagram-GW3U2K7C-tvjpfBbf.js","assets/chunk-353BL4L5-Dc2iugoC.js","assets/chunk-AACKK3MU-Bulquadc.js","assets/treemap-6Y5VK53G-DD2bKuQl.js","assets/ganttDiagram-EK5VF46D-Bxc01I9z.js","assets/infoDiagram-XT3IWWJI-BuuxTqr8.js","assets/pieDiagram-NIOCPIFQ-CwcVShaD.js","assets/quadrantDiagram-2OG54O6I-C2wGvonb.js","assets/xychartDiagram-H2YORKM3-DP9uyfob.js","assets/requirementDiagram-SO3GGRV7-DBB4gQhP.js","assets/sequenceDiagram-ZIKVLSP4-oO1T3_CU.js","assets/classDiagram-BGRH5UQR-B1ZwhQup.js","assets/chunk-QEP2MXWD-iMxqHW1H.js","assets/classDiagram-v2-O24JOBDK-B1ZwhQup.js","assets/stateDiagram-XX37X6EN-CH0H6nhR.js","assets/chunk-6OLS64BW-DUM-o2FJ.js","assets/stateDiagram-v2-GD6S3NHB-CxRIz5En.js","assets/journeyDiagram-EWQZEKCU-yZAKQsFS.js","assets/timeline-definition-RI47OAVP-wbT62k2j.js","assets/mindmap-definition-CZNETY7S-CrKQy-YF.js","assets/cytoscape.esm-DjuLyO2d.js","assets/kanban-definition-ILFWEQ3N-zK-xSLMv.js","assets/sankeyDiagram-4UZDY2LN-CYCZYo1y.js","assets/diagram-5UYTHUR4-BI5BPMV3.js","assets/diagram-ZTM2IBQH-DdeCcMoF.js","assets/blockDiagram-PHRCVELO-BX1-QuFh.js","assets/architectureDiagram-NQ2NVSRB-C5lQ6TdU.js","assets/diagram-3EMPZRKU-CJIrRTbX.js"])))=>i.map(i=>d[i]);
|
||
var Jy=Object.defineProperty;var tx=(t,e,r)=>e in t?Jy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var kt=(t,e,r)=>tx(t,typeof e!="symbol"?e+"":e,r);import{a2 as wt}from"./feature-graph-D68hhnYC.js";import{g as ex}from"./react-vendor-CgPb4pW_.js";var sa={exports:{}},rx=sa.exports,ah;function ix(){return ah||(ah=1,function(t,e){(function(r,i){t.exports=i()})(rx,function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",c="hour",l="day",h="week",u="month",f="quarter",d="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var F=["th","st","nd","rd"],B=M%100;return"["+M+(F[(B-20)%10]||F[B]||F[0])+"]"}},C=function(M,F,B){var $=String(M);return!$||$.length>=F?M:""+Array(F+1-$.length).join(B)+M},v={s:C,z:function(M){var F=-M.utcOffset(),B=Math.abs(F),$=Math.floor(B/60),E=B%60;return(F<=0?"+":"-")+C($,2,"0")+":"+C(E,2,"0")},m:function M(F,B){if(F.date()<B.date())return-M(B,F);var $=12*(B.year()-F.year())+(B.month()-F.month()),E=F.clone().add($,u),q=B-E<0,j=F.clone().add($+(q?-1:1),u);return+(-($+(B-E)/(q?E-j:j-E))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:u,y:d,w:h,d:l,D:p,h:c,m:s,s:o,ms:a,Q:f}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},w="en",_={};_[w]=b;var k="$isDayjsObject",O=function(M){return M instanceof R||!(!M||!M[k])},N=function M(F,B,$){var E;if(!F)return w;if(typeof F=="string"){var q=F.toLowerCase();_[q]&&(E=q),B&&(_[q]=B,E=q);var j=F.split("-");if(!E&&j.length>1)return M(j[0])}else{var U=F.name;_[U]=F,E=U}return!$&&E&&(w=E),E||!$&&w},D=function(M,F){if(O(M))return M.clone();var B=typeof F=="object"?F:{};return B.date=M,B.args=arguments,new R(B)},T=v;T.l=N,T.i=O,T.w=function(M,F){return D(M,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var R=function(){function M(B){this.$L=N(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[k]=!0}var F=M.prototype;return F.parse=function(B){this.$d=function($){var E=$.date,q=$.utc;if(E===null)return new Date(NaN);if(T.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var j=E.match(y);if(j){var U=j[2]-1||0,pt=(j[7]||"0").substring(0,3);return q?new Date(Date.UTC(j[1],U,j[3]||1,j[4]||0,j[5]||0,j[6]||0,pt)):new Date(j[1],U,j[3]||1,j[4]||0,j[5]||0,j[6]||0,pt)}}return new Date(E)}(B),this.init()},F.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},F.$utils=function(){return T},F.isValid=function(){return this.$d.toString()!==m},F.isSame=function(B,$){var E=D(B);return this.startOf($)<=E&&E<=this.endOf($)},F.isAfter=function(B,$){return D(B)<this.startOf($)},F.isBefore=function(B,$){return this.endOf($)<D(B)},F.$g=function(B,$,E){return T.u(B)?this[$]:this.set(E,B)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(B,$){var E=this,q=!!T.u($)||$,j=T.p(B),U=function(z,Y){var et=T.w(E.$u?Date.UTC(E.$y,Y,z):new Date(E.$y,Y,z),E);return q?et:et.endOf(l)},pt=function(z,Y){return T.w(E.toDate()[z].apply(E.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(Y)),E)},ht=this.$W,vt=this.$M,nt=this.$D,lt="set"+(this.$u?"UTC":"");switch(j){case d:return q?U(1,0):U(31,11);case u:return q?U(1,vt):U(0,vt+1);case h:var ut=this.$locale().weekStart||0,Ct=(ht<ut?ht+7:ht)-ut;return U(q?nt-Ct:nt+(6-Ct),vt);case l:case p:return pt(lt+"Hours",0);case c:return pt(lt+"Minutes",1);case s:return pt(lt+"Seconds",2);case o:return pt(lt+"Milliseconds",3);default:return this.clone()}},F.endOf=function(B){return this.startOf(B,!1)},F.$set=function(B,$){var E,q=T.p(B),j="set"+(this.$u?"UTC":""),U=(E={},E[l]=j+"Date",E[p]=j+"Date",E[u]=j+"Month",E[d]=j+"FullYear",E[c]=j+"Hours",E[s]=j+"Minutes",E[o]=j+"Seconds",E[a]=j+"Milliseconds",E)[q],pt=q===l?this.$D+($-this.$W):$;if(q===u||q===d){var ht=this.clone().set(p,1);ht.$d[U](pt),ht.init(),this.$d=ht.set(p,Math.min(this.$D,ht.daysInMonth())).$d}else U&&this.$d[U](pt);return this.init(),this},F.set=function(B,$){return this.clone().$set(B,$)},F.get=function(B){return this[T.p(B)]()},F.add=function(B,$){var E,q=this;B=Number(B);var j=T.p($),U=function(vt){var nt=D(q);return T.w(nt.date(nt.date()+Math.round(vt*B)),q)};if(j===u)return this.set(u,this.$M+B);if(j===d)return this.set(d,this.$y+B);if(j===l)return U(1);if(j===h)return U(7);var pt=(E={},E[s]=i,E[c]=n,E[o]=r,E)[j]||1,ht=this.$d.getTime()+B*pt;return T.w(ht,this)},F.subtract=function(B,$){return this.add(-1*B,$)},F.format=function(B){var $=this,E=this.$locale();if(!this.isValid())return E.invalidDate||m;var q=B||"YYYY-MM-DDTHH:mm:ssZ",j=T.z(this),U=this.$H,pt=this.$m,ht=this.$M,vt=E.weekdays,nt=E.months,lt=E.meridiem,ut=function(Y,et,P,St){return Y&&(Y[et]||Y($,q))||P[et].slice(0,St)},Ct=function(Y){return T.s(U%12||12,Y,"0")},z=lt||function(Y,et,P){var St=Y<12?"AM":"PM";return P?St.toLowerCase():St};return q.replace(x,function(Y,et){return et||function(P){switch(P){case"YY":return String($.$y).slice(-2);case"YYYY":return T.s($.$y,4,"0");case"M":return ht+1;case"MM":return T.s(ht+1,2,"0");case"MMM":return ut(E.monthsShort,ht,nt,3);case"MMMM":return ut(nt,ht);case"D":return $.$D;case"DD":return T.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ut(E.weekdaysMin,$.$W,vt,2);case"ddd":return ut(E.weekdaysShort,$.$W,vt,3);case"dddd":return vt[$.$W];case"H":return String(U);case"HH":return T.s(U,2,"0");case"h":return Ct(1);case"hh":return Ct(2);case"a":return z(U,pt,!0);case"A":return z(U,pt,!1);case"m":return String(pt);case"mm":return T.s(pt,2,"0");case"s":return String($.$s);case"ss":return T.s($.$s,2,"0");case"SSS":return T.s($.$ms,3,"0");case"Z":return j}return null}(Y)||j.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(B,$,E){var q,j=this,U=T.p($),pt=D(B),ht=(pt.utcOffset()-this.utcOffset())*i,vt=this-pt,nt=function(){return T.m(j,pt)};switch(U){case d:q=nt()/12;break;case u:q=nt();break;case f:q=nt()/3;break;case h:q=(vt-ht)/6048e5;break;case l:q=(vt-ht)/864e5;break;case c:q=vt/n;break;case s:q=vt/i;break;case o:q=vt/r;break;default:q=vt}return E?q:T.a(q)},F.daysInMonth=function(){return this.endOf(u).$D},F.$locale=function(){return _[this.$L]},F.locale=function(B,$){if(!B)return this.$L;var E=this.clone(),q=N(B,$,!0);return q&&(E.$L=q),E},F.clone=function(){return T.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},M}(),L=R.prototype;return D.prototype=L,[["$ms",a],["$s",o],["$m",s],["$H",c],["$W",l],["$M",u],["$y",d],["$D",p]].forEach(function(M){L[M[1]]=function(F){return this.$g(F,M[0],M[1])}}),D.extend=function(M,F){return M.$i||(M(F,R,D),M.$i=!0),D},D.locale=N,D.isDayjs=O,D.unix=function(M){return D(1e3*M)},D.en=_[w],D.Ls=_,D.p={},D})}(sa)),sa.exports}var nx=ix();const ax=ex(nx),oa={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+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const n=r<.5?r*(1+e):r+e-r*e,a=2*r-n;switch(i){case"r":return oa.hue2rgb(a,n,t+1/3)*255;case"g":return oa.hue2rgb(a,n,t)*255;case"b":return oa.hue2rgb(a,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),a=Math.min(t,e,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,c=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return c*100;switch(n){case t:return((e-r)/s+(e<r?6:0))*60;case e:return((r-t)/s+2)*60;case r:return((t-e)/s+4)*60;default:return-1}}},sx={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},ox={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},ot={channel:oa,lang:sx,unit:ox},sr={};for(let t=0;t<=255;t++)sr[t]=ot.unit.dec2hex(t);const Gt={ALL:0,RGB:1,HSL:2};class lx{constructor(){this.type=Gt.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Gt.ALL}is(e){return this.type===e}}class cx{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new lx}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Gt.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:i,l:n}=e;r===void 0&&(e.h=ot.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=ot.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=ot.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:i,b:n}=e;r===void 0&&(e.r=ot.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=ot.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=ot.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Gt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Gt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Gt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Gt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Gt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Gt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const ms=new cx({r:0,g:0,b:0,a:0},"transparent"),ii={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(ii.re);if(!e)return;const r=e[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,c=o?8:4,l=a?0:-1,h=o?255:15;return ms.set({r:(i>>c*(l+3)&h)*s,g:(i>>c*(l+2)&h)*s,b:(i>>c*(l+1)&h)*s,a:a?(i&h)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${sr[Math.round(e)]}${sr[Math.round(r)]}${sr[Math.round(i)]}${sr[Math.round(n*255)]}`:`#${sr[Math.round(e)]}${sr[Math.round(r)]}${sr[Math.round(i)]}`}},Cr={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(Cr.hueRe);if(e){const[,r,i]=e;switch(i){case"grad":return ot.channel.clamp.h(parseFloat(r)*.9);case"rad":return ot.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ot.channel.clamp.h(parseFloat(r)*360)}}return ot.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(Cr.re);if(!r)return;const[,i,n,a,o,s]=r;return ms.set({h:Cr._hue2deg(i),s:ot.channel.clamp.s(parseFloat(n)),l:ot.channel.clamp.l(parseFloat(a)),a:o?ot.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${ot.lang.round(e)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%, ${n})`:`hsl(${ot.lang.round(e)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%)`}},hn={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=hn.colors[t];if(e)return ii.parse(e)},stringify:t=>{const e=ii.stringify(t);for(const r in hn.colors)if(hn.colors[r]===e)return r}},rn={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(e!==114&&e!==82)return;const r=t.match(rn.re);if(!r)return;const[,i,n,a,o,s,c,l,h]=r;return ms.set({r:ot.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ot.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:ot.channel.clamp.b(c?parseFloat(s)*2.55:parseFloat(s)),a:l?ot.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${ot.lang.round(e)}, ${ot.lang.round(r)}, ${ot.lang.round(i)}, ${ot.lang.round(n)})`:`rgb(${ot.lang.round(e)}, ${ot.lang.round(r)}, ${ot.lang.round(i)})`}},ke={format:{keyword:hn,hex:ii,rgb:rn,rgba:rn,hsl:Cr,hsla:Cr},parse:t=>{if(typeof t!="string")return t;const e=ii.parse(t)||rn.parse(t)||Cr.parse(t)||hn.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Gt.HSL)||t.data.r===void 0?Cr.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?rn.stringify(t):ii.stringify(t)},sf=(t,e)=>{const r=ke.parse(t);for(const i in e)r[i]=ot.channel.clamp[i](e[i]);return ke.stringify(r)},un=(t,e,r=0,i=1)=>{if(typeof t!="number")return sf(t,{a:e});const n=ms.set({r:ot.channel.clamp.r(t),g:ot.channel.clamp.g(e),b:ot.channel.clamp.b(r),a:ot.channel.clamp.a(i)});return ke.stringify(n)},j3=(t,e)=>ot.lang.round(ke.parse(t)[e]),hx=t=>{const{r:e,g:r,b:i}=ke.parse(t),n=.2126*ot.channel.toLinear(e)+.7152*ot.channel.toLinear(r)+.0722*ot.channel.toLinear(i);return ot.lang.round(n)},ux=t=>hx(t)>=.5,Ln=t=>!ux(t),of=(t,e,r)=>{const i=ke.parse(t),n=i[e],a=ot.channel.clamp[e](n+r);return n!==a&&(i[e]=a),ke.stringify(i)},G=(t,e)=>of(t,"l",e),it=(t,e)=>of(t,"l",-e),A=(t,e)=>{const r=ke.parse(t),i={};for(const n in e)e[n]&&(i[n]=r[n]+e[n]);return sf(t,i)},fx=(t,e,r=50)=>{const{r:i,g:n,b:a,a:o}=ke.parse(t),{r:s,g:c,b:l,a:h}=ke.parse(e),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+s*y,b=n*m+c*y,C=a*m+l*y,v=o*u+h*(1-u);return un(x,b,C,v)},H=(t,e=100)=>{const r=ke.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,fx(r,t,e)};/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:lf,setPrototypeOf:sh,isFrozen:dx,getPrototypeOf:px,getOwnPropertyDescriptor:gx}=Object;let{freeze:ie,seal:ye,create:cf}=Object,{apply:$o,construct:Do}=typeof Reflect<"u"&&Reflect;ie||(ie=function(e){return e});ye||(ye=function(e){return e});$o||($o=function(e,r,i){return e.apply(r,i)});Do||(Do=function(e,r){return new e(...r)});const Yn=ne(Array.prototype.forEach),mx=ne(Array.prototype.lastIndexOf),oh=ne(Array.prototype.pop),Pi=ne(Array.prototype.push),yx=ne(Array.prototype.splice),la=ne(String.prototype.toLowerCase),to=ne(String.prototype.toString),lh=ne(String.prototype.match),Ni=ne(String.prototype.replace),xx=ne(String.prototype.indexOf),bx=ne(String.prototype.trim),be=ne(Object.prototype.hasOwnProperty),Qt=ne(RegExp.prototype.test),zi=_x(TypeError);function ne(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return $o(t,e,i)}}function _x(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return Do(t,r)}}function dt(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:la;sh&&sh(t,null);let i=e.length;for(;i--;){let n=e[i];if(typeof n=="string"){const a=r(n);a!==n&&(dx(e)||(e[i]=a),n=a)}t[n]=!0}return t}function Cx(t){for(let e=0;e<t.length;e++)be(t,e)||(t[e]=null);return t}function He(t){const e=cf(null);for(const[r,i]of lf(t))be(t,r)&&(Array.isArray(i)?e[r]=Cx(i):i&&typeof i=="object"&&i.constructor===Object?e[r]=He(i):e[r]=i);return e}function Wi(t,e){for(;t!==null;){const i=gx(t,e);if(i){if(i.get)return ne(i.get);if(typeof i.value=="function")return ne(i.value)}t=px(t)}function r(){return null}return r}const ch=ie(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),eo=ie(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ro=ie(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),wx=ie(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),io=ie(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vx=ie(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hh=ie(["#text"]),uh=ie(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),no=ie(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fh=ie(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gn=ie(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),kx=ye(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Sx=ye(/<%[\w\W]*|[\w\W]*%>/gm),Tx=ye(/\$\{[\w\W]*/gm),Mx=ye(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ax=ye(/^aria-[\-\w]+$/),hf=ye(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Lx=ye(/^(?:\w+script|data):/i),Bx=ye(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),uf=ye(/^html$/i),Ex=ye(/^[a-z][.\w]*(-[.\w]+)+$/i);var dh=Object.freeze({__proto__:null,ARIA_ATTR:Ax,ATTR_WHITESPACE:Bx,CUSTOM_ELEMENT:Ex,DATA_ATTR:Mx,DOCTYPE_NAME:uf,ERB_EXPR:Sx,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:Lx,MUSTACHE_EXPR:kx,TMPLIT_EXPR:Tx});const qi={element:1,text:3,progressingInstruction:7,comment:8,document:9},Fx=function(){return typeof window>"u"?null:window},$x=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return e.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},ph=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ff(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fx();const e=rt=>ff(rt);if(e.version="3.2.6",e.removed=[],!t||!t.document||t.document.nodeType!==qi.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=t,p=c.prototype,m=Wi(p,"cloneNode"),y=Wi(p,"remove"),x=Wi(p,"nextSibling"),b=Wi(p,"childNodes"),C=Wi(p,"parentNode");if(typeof o=="function"){const rt=r.createElement("template");rt.content&&rt.content.ownerDocument&&(r=rt.content.ownerDocument)}let v,w="";const{implementation:_,createNodeIterator:k,createDocumentFragment:O,getElementsByTagName:N}=r,{importNode:D}=i;let T=ph();e.isSupported=typeof lf=="function"&&typeof C=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:R,ERB_EXPR:L,TMPLIT_EXPR:M,DATA_ATTR:F,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:E,CUSTOM_ELEMENT:q}=dh;let{IS_ALLOWED_URI:j}=dh,U=null;const pt=dt({},[...ch,...eo,...ro,...io,...hh]);let ht=null;const vt=dt({},[...uh,...no,...fh,...Gn]);let nt=Object.seal(cf(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}})),lt=null,ut=null,Ct=!0,z=!0,Y=!1,et=!0,P=!1,St=!0,ft=!1,Nt=!1,zt=!1,ae=!1,gr=!1,Wn=!1,Wc=!0,qc=!1;const jy="user-content-";let Gs=!0,Oi=!1,Ur={},jr=null;const Hc=dt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Uc=null;const jc=dt({},["audio","video","img","source","image","track"]);let Vs=null;const Yc=dt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qn="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Pe="http://www.w3.org/1999/xhtml";let Yr=Pe,Xs=!1,Zs=null;const Yy=dt({},[qn,Hn,Pe],to);let Un=dt({},["mi","mo","mn","ms","mtext"]),jn=dt({},["annotation-xml"]);const Gy=dt({},["title","style","font","a","script"]);let Ri=null;const Vy=["application/xhtml+xml","text/html"],Xy="text/html";let It=null,Gr=null;const Zy=r.createElement("form"),Gc=function(S){return S instanceof RegExp||S instanceof Function},Ks=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Gr&&Gr===S)){if((!S||typeof S!="object")&&(S={}),S=He(S),Ri=Vy.indexOf(S.PARSER_MEDIA_TYPE)===-1?Xy:S.PARSER_MEDIA_TYPE,It=Ri==="application/xhtml+xml"?to:la,U=be(S,"ALLOWED_TAGS")?dt({},S.ALLOWED_TAGS,It):pt,ht=be(S,"ALLOWED_ATTR")?dt({},S.ALLOWED_ATTR,It):vt,Zs=be(S,"ALLOWED_NAMESPACES")?dt({},S.ALLOWED_NAMESPACES,to):Yy,Vs=be(S,"ADD_URI_SAFE_ATTR")?dt(He(Yc),S.ADD_URI_SAFE_ATTR,It):Yc,Uc=be(S,"ADD_DATA_URI_TAGS")?dt(He(jc),S.ADD_DATA_URI_TAGS,It):jc,jr=be(S,"FORBID_CONTENTS")?dt({},S.FORBID_CONTENTS,It):Hc,lt=be(S,"FORBID_TAGS")?dt({},S.FORBID_TAGS,It):He({}),ut=be(S,"FORBID_ATTR")?dt({},S.FORBID_ATTR,It):He({}),Ur=be(S,"USE_PROFILES")?S.USE_PROFILES:!1,Ct=S.ALLOW_ARIA_ATTR!==!1,z=S.ALLOW_DATA_ATTR!==!1,Y=S.ALLOW_UNKNOWN_PROTOCOLS||!1,et=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=S.SAFE_FOR_TEMPLATES||!1,St=S.SAFE_FOR_XML!==!1,ft=S.WHOLE_DOCUMENT||!1,ae=S.RETURN_DOM||!1,gr=S.RETURN_DOM_FRAGMENT||!1,Wn=S.RETURN_TRUSTED_TYPE||!1,zt=S.FORCE_BODY||!1,Wc=S.SANITIZE_DOM!==!1,qc=S.SANITIZE_NAMED_PROPS||!1,Gs=S.KEEP_CONTENT!==!1,Oi=S.IN_PLACE||!1,j=S.ALLOWED_URI_REGEXP||hf,Yr=S.NAMESPACE||Pe,Un=S.MATHML_TEXT_INTEGRATION_POINTS||Un,jn=S.HTML_INTEGRATION_POINTS||jn,nt=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&Gc(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nt.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&Gc(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nt.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nt.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(z=!1),gr&&(ae=!0),Ur&&(U=dt({},hh),ht=[],Ur.html===!0&&(dt(U,ch),dt(ht,uh)),Ur.svg===!0&&(dt(U,eo),dt(ht,no),dt(ht,Gn)),Ur.svgFilters===!0&&(dt(U,ro),dt(ht,no),dt(ht,Gn)),Ur.mathMl===!0&&(dt(U,io),dt(ht,fh),dt(ht,Gn))),S.ADD_TAGS&&(U===pt&&(U=He(U)),dt(U,S.ADD_TAGS,It)),S.ADD_ATTR&&(ht===vt&&(ht=He(ht)),dt(ht,S.ADD_ATTR,It)),S.ADD_URI_SAFE_ATTR&&dt(Vs,S.ADD_URI_SAFE_ATTR,It),S.FORBID_CONTENTS&&(jr===Hc&&(jr=He(jr)),dt(jr,S.FORBID_CONTENTS,It)),Gs&&(U["#text"]=!0),ft&&dt(U,["html","head","body"]),U.table&&(dt(U,["tbody"]),delete lt.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw zi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=S.TRUSTED_TYPES_POLICY,w=v.createHTML("")}else v===void 0&&(v=$x(d,n)),v!==null&&typeof w=="string"&&(w=v.createHTML(""));ie&&ie(S),Gr=S}},Vc=dt({},[...eo,...ro,...wx]),Xc=dt({},[...io,...vx]),Ky=function(S){let W=C(S);(!W||!W.tagName)&&(W={namespaceURI:Yr,tagName:"template"});const Z=la(S.tagName),Mt=la(W.tagName);return Zs[S.namespaceURI]?S.namespaceURI===Hn?W.namespaceURI===Pe?Z==="svg":W.namespaceURI===qn?Z==="svg"&&(Mt==="annotation-xml"||Un[Mt]):!!Vc[Z]:S.namespaceURI===qn?W.namespaceURI===Pe?Z==="math":W.namespaceURI===Hn?Z==="math"&&jn[Mt]:!!Xc[Z]:S.namespaceURI===Pe?W.namespaceURI===Hn&&!jn[Mt]||W.namespaceURI===qn&&!Un[Mt]?!1:!Xc[Z]&&(Gy[Z]||!Vc[Z]):!!(Ri==="application/xhtml+xml"&&Zs[S.namespaceURI]):!1},Te=function(S){Pi(e.removed,{element:S});try{C(S).removeChild(S)}catch{y(S)}},Vr=function(S,W){try{Pi(e.removed,{attribute:W.getAttributeNode(S),from:W})}catch{Pi(e.removed,{attribute:null,from:W})}if(W.removeAttribute(S),S==="is")if(ae||gr)try{Te(W)}catch{}else try{W.setAttribute(S,"")}catch{}},Zc=function(S){let W=null,Z=null;if(zt)S="<remove></remove>"+S;else{const Ft=lh(S,/^[\r\n\t ]+/);Z=Ft&&Ft[0]}Ri==="application/xhtml+xml"&&Yr===Pe&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Mt=v?v.createHTML(S):S;if(Yr===Pe)try{W=new f().parseFromString(Mt,Ri)}catch{}if(!W||!W.documentElement){W=_.createDocument(Yr,"template",null);try{W.documentElement.innerHTML=Xs?w:Mt}catch{}}const Ut=W.body||W.documentElement;return S&&Z&&Ut.insertBefore(r.createTextNode(Z),Ut.childNodes[0]||null),Yr===Pe?N.call(W,ft?"html":"body")[0]:ft?W.documentElement:Ut},Kc=function(S){return k.call(S.ownerDocument||S,S,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Qs=function(S){return S instanceof u&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof h)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},Qc=function(S){return typeof s=="function"&&S instanceof s};function Ne(rt,S,W){Yn(rt,Z=>{Z.call(e,S,W,Gr)})}const Jc=function(S){let W=null;if(Ne(T.beforeSanitizeElements,S,null),Qs(S))return Te(S),!0;const Z=It(S.nodeName);if(Ne(T.uponSanitizeElement,S,{tagName:Z,allowedTags:U}),St&&S.hasChildNodes()&&!Qc(S.firstElementChild)&&Qt(/<[/\w!]/g,S.innerHTML)&&Qt(/<[/\w!]/g,S.textContent)||S.nodeType===qi.progressingInstruction||St&&S.nodeType===qi.comment&&Qt(/<[/\w]/g,S.data))return Te(S),!0;if(!U[Z]||lt[Z]){if(!lt[Z]&&eh(Z)&&(nt.tagNameCheck instanceof RegExp&&Qt(nt.tagNameCheck,Z)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(Z)))return!1;if(Gs&&!jr[Z]){const Mt=C(S)||S.parentNode,Ut=b(S)||S.childNodes;if(Ut&&Mt){const Ft=Ut.length;for(let se=Ft-1;se>=0;--se){const ze=m(Ut[se],!0);ze.__removalCount=(S.__removalCount||0)+1,Mt.insertBefore(ze,x(S))}}}return Te(S),!0}return S instanceof c&&!Ky(S)||(Z==="noscript"||Z==="noembed"||Z==="noframes")&&Qt(/<\/no(script|embed|frames)/i,S.innerHTML)?(Te(S),!0):(P&&S.nodeType===qi.text&&(W=S.textContent,Yn([R,L,M],Mt=>{W=Ni(W,Mt," ")}),S.textContent!==W&&(Pi(e.removed,{element:S.cloneNode()}),S.textContent=W)),Ne(T.afterSanitizeElements,S,null),!1)},th=function(S,W,Z){if(Wc&&(W==="id"||W==="name")&&(Z in r||Z in Zy))return!1;if(!(z&&!ut[W]&&Qt(F,W))){if(!(Ct&&Qt(B,W))){if(!ht[W]||ut[W]){if(!(eh(S)&&(nt.tagNameCheck instanceof RegExp&&Qt(nt.tagNameCheck,S)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(S))&&(nt.attributeNameCheck instanceof RegExp&&Qt(nt.attributeNameCheck,W)||nt.attributeNameCheck instanceof Function&&nt.attributeNameCheck(W))||W==="is"&&nt.allowCustomizedBuiltInElements&&(nt.tagNameCheck instanceof RegExp&&Qt(nt.tagNameCheck,Z)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(Z))))return!1}else if(!Vs[W]){if(!Qt(j,Ni(Z,E,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&S!=="script"&&xx(Z,"data:")===0&&Uc[S])){if(!(Y&&!Qt($,Ni(Z,E,"")))){if(Z)return!1}}}}}}return!0},eh=function(S){return S!=="annotation-xml"&&lh(S,q)},rh=function(S){Ne(T.beforeSanitizeAttributes,S,null);const{attributes:W}=S;if(!W||Qs(S))return;const Z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ht,forceKeepAttr:void 0};let Mt=W.length;for(;Mt--;){const Ut=W[Mt],{name:Ft,namespaceURI:se,value:ze}=Ut,Ii=It(Ft),Js=ze;let jt=Ft==="value"?Js:bx(Js);if(Z.attrName=Ii,Z.attrValue=jt,Z.keepAttr=!0,Z.forceKeepAttr=void 0,Ne(T.uponSanitizeAttribute,S,Z),jt=Z.attrValue,qc&&(Ii==="id"||Ii==="name")&&(Vr(Ft,S),jt=jy+jt),St&&Qt(/((--!?|])>)|<\/(style|title)/i,jt)){Vr(Ft,S);continue}if(Z.forceKeepAttr)continue;if(!Z.keepAttr){Vr(Ft,S);continue}if(!et&&Qt(/\/>/i,jt)){Vr(Ft,S);continue}P&&Yn([R,L,M],nh=>{jt=Ni(jt,nh," ")});const ih=It(S.nodeName);if(!th(ih,Ii,jt)){Vr(Ft,S);continue}if(v&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!se)switch(d.getAttributeType(ih,Ii)){case"TrustedHTML":{jt=v.createHTML(jt);break}case"TrustedScriptURL":{jt=v.createScriptURL(jt);break}}if(jt!==Js)try{se?S.setAttributeNS(se,Ft,jt):S.setAttribute(Ft,jt),Qs(S)?Te(S):oh(e.removed)}catch{Vr(Ft,S)}}Ne(T.afterSanitizeAttributes,S,null)},Qy=function rt(S){let W=null;const Z=Kc(S);for(Ne(T.beforeSanitizeShadowDOM,S,null);W=Z.nextNode();)Ne(T.uponSanitizeShadowNode,W,null),Jc(W),rh(W),W.content instanceof a&&rt(W.content);Ne(T.afterSanitizeShadowDOM,S,null)};return e.sanitize=function(rt){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,Z=null,Mt=null,Ut=null;if(Xs=!rt,Xs&&(rt="<!-->"),typeof rt!="string"&&!Qc(rt))if(typeof rt.toString=="function"){if(rt=rt.toString(),typeof rt!="string")throw zi("dirty is not a string, aborting")}else throw zi("toString is not a function");if(!e.isSupported)return rt;if(Nt||Ks(S),e.removed=[],typeof rt=="string"&&(Oi=!1),Oi){if(rt.nodeName){const ze=It(rt.nodeName);if(!U[ze]||lt[ze])throw zi("root node is forbidden and cannot be sanitized in-place")}}else if(rt instanceof s)W=Zc("<!---->"),Z=W.ownerDocument.importNode(rt,!0),Z.nodeType===qi.element&&Z.nodeName==="BODY"||Z.nodeName==="HTML"?W=Z:W.appendChild(Z);else{if(!ae&&!P&&!ft&&rt.indexOf("<")===-1)return v&&Wn?v.createHTML(rt):rt;if(W=Zc(rt),!W)return ae?null:Wn?w:""}W&&zt&&Te(W.firstChild);const Ft=Kc(Oi?rt:W);for(;Mt=Ft.nextNode();)Jc(Mt),rh(Mt),Mt.content instanceof a&&Qy(Mt.content);if(Oi)return rt;if(ae){if(gr)for(Ut=O.call(W.ownerDocument);W.firstChild;)Ut.appendChild(W.firstChild);else Ut=W;return(ht.shadowroot||ht.shadowrootmode)&&(Ut=D.call(i,Ut,!0)),Ut}let se=ft?W.outerHTML:W.innerHTML;return ft&&U["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&Qt(uf,W.ownerDocument.doctype.name)&&(se="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
|
||
`+se),P&&Yn([R,L,M],ze=>{se=Ni(se,ze," ")}),v&&Wn?v.createHTML(se):se},e.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ks(rt),Nt=!0},e.clearConfig=function(){Gr=null,Nt=!1},e.isValidAttribute=function(rt,S,W){Gr||Ks({});const Z=It(rt),Mt=It(S);return th(Z,Mt,W)},e.addHook=function(rt,S){typeof S=="function"&&Pi(T[rt],S)},e.removeHook=function(rt,S){if(S!==void 0){const W=mx(T[rt],S);return W===-1?void 0:yx(T[rt],W,1)[0]}return oh(T[rt])},e.removeHooks=function(rt){T[rt]=[]},e.removeAllHooks=function(){T=ph()},e}var gi=ff(),df=Object.defineProperty,g=(t,e)=>df(t,"name",{value:e,configurable:!0}),Dx=(t,e)=>{for(var r in e)df(t,r,{get:e[r],enumerable:!0})},We={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},I={trace:g((...t)=>{},"trace"),debug:g((...t)=>{},"debug"),info:g((...t)=>{},"info"),warn:g((...t)=>{},"warn"),error:g((...t)=>{},"error"),fatal:g((...t)=>{},"fatal")},Ol=g(function(t="fatal"){let e=We.fatal;typeof t=="string"?t.toLowerCase()in We&&(e=We[t]):typeof t=="number"&&(e=t),I.trace=()=>{},I.debug=()=>{},I.info=()=>{},I.warn=()=>{},I.error=()=>{},I.fatal=()=>{},e<=We.fatal&&(I.fatal=console.error?console.error.bind(console,pe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",pe("FATAL"))),e<=We.error&&(I.error=console.error?console.error.bind(console,pe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",pe("ERROR"))),e<=We.warn&&(I.warn=console.warn?console.warn.bind(console,pe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",pe("WARN"))),e<=We.info&&(I.info=console.info?console.info.bind(console,pe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",pe("INFO"))),e<=We.debug&&(I.debug=console.debug?console.debug.bind(console,pe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("DEBUG"))),e<=We.trace&&(I.trace=console.debug?console.debug.bind(console,pe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("TRACE")))},"setLogLevel"),pe=g(t=>`%c${ax().format("ss.SSS")} : ${t} : `,"format"),pf=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,fn=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ox=/\s*%%.*\n/gm,oi,gf=(oi=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},g(oi,"UnknownDiagramError"),oi),mi={},Rl=g(function(t,e){t=t.replace(pf,"").replace(fn,"").replace(Ox,`
|
||
`);for(const[r,{detector:i}]of Object.entries(mi))if(i(t,e))return r;throw new gf(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),Oo=g((...t)=>{for(const{id:e,detector:r,loader:i}of t)mf(e,r,i)},"registerLazyLoadedDiagrams"),mf=g((t,e,r)=>{mi[t]&&I.warn(`Detector with key ${t} already exists. Overwriting.`),mi[t]={detector:e,loader:r},I.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),Rx=g(t=>mi[t].loader,"getDiagramLoader"),Ro=g((t,e,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>Ro(t,a,n)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=Ro(t[a],e[a],{depth:r-1,clobber:i})):(i||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),Ht=Ro,ys="#ffffff",xs="#f2f2f2",Jt=g((t,e)=>e?A(t,{s:-40,l:10}):A(t,{s:-40,l:-10}),"mkBorder"),li,Ix=(li=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,n,a,o,s,c,l,h,u,f,d,p,m,y,x,b,C,v,w,_;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||A(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||A(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||H(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||H(this.tertiaryColor),this.lineColor=this.lineColor||H(this.background),this.arrowheadColor=this.arrowheadColor||H(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?it(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||it(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||H(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||G(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||it(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||it(this.mainBkg,10)):(this.rowOdd=this.rowOdd||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||G(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||A(this.primaryColor,{h:30}),this.cScale4=this.cScale4||A(this.primaryColor,{h:60}),this.cScale5=this.cScale5||A(this.primaryColor,{h:90}),this.cScale6=this.cScale6||A(this.primaryColor,{h:120}),this.cScale7=this.cScale7||A(this.primaryColor,{h:150}),this.cScale8=this.cScale8||A(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||A(this.primaryColor,{h:270}),this.cScale10=this.cScale10||A(this.primaryColor,{h:300}),this.cScale11=this.cScale11||A(this.primaryColor,{h:330}),this.darkMode)for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=it(this["cScale"+k],75);else for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=it(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||H(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||G(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||it(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||A(this.mainBkg,{h:180,s:-15,l:e*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||A(this.mainBkg,{h:180,s:-15,l:e*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||A(this.primaryColor,{h:64}),this.fillType3=this.fillType3||A(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||A(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||A(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||A(this.primaryColor,{h:128}),this.fillType7=this.fillType7||A(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||A(this.primaryColor,{l:-10}),this.pie5=this.pie5||A(this.secondaryColor,{l:-10}),this.pie6=this.pie6||A(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||A(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||A(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||A(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||A(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||A(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||A(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.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||A(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||A(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||A(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||A(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||A(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||A(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ln(this.quadrant1Fill)?G(this.quadrant1Fill):it(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:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((C=this.xyChart)==null?void 0:C.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((v=this.xyChart)==null?void 0:v.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.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?it(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||A(this.primaryColor,{h:-30}),this.git4=this.git4||A(this.primaryColor,{h:-60}),this.git5=this.git5||A(this.primaryColor,{h:-90}),this.git6=this.git6||A(this.primaryColor,{h:60}),this.git7=this.git7||A(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(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||ys,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xs}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},g(li,"Theme"),li),Px=g(t=>{const e=new Ix;return e.calculate(t),e},"getThemeVariables"),ci,Nx=(ci=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=G(this.primaryColor,16),this.tertiaryColor=A(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.background),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=G(H("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=un(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=it("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=it(this.sectionBkgColor,10),this.taskBorderColor=un(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=un(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||G(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||it(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,r,i,n,a,o,s,c,l,h,u,f,d,p,m,y,x,b,C,v,w;this.secondBkg=G(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=G(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=G(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.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=A(this.primaryColor,{h:64}),this.fillType3=A(this.secondaryColor,{h:64}),this.fillType4=A(this.primaryColor,{h:-64}),this.fillType5=A(this.secondaryColor,{h:-64}),this.fillType6=A(this.primaryColor,{h:128}),this.fillType7=A(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||A(this.primaryColor,{h:30}),this.cScale4=this.cScale4||A(this.primaryColor,{h:60}),this.cScale5=this.cScale5||A(this.primaryColor,{h:90}),this.cScale6=this.cScale6||A(this.primaryColor,{h:120}),this.cScale7=this.cScale7||A(this.primaryColor,{h:150}),this.cScale8=this.cScale8||A(this.primaryColor,{h:210}),this.cScale9=this.cScale9||A(this.primaryColor,{h:270}),this.cScale10=this.cScale10||A(this.primaryColor,{h:300}),this.cScale11=this.cScale11||A(this.primaryColor,{h:330});for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||H(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScalePeer"+_]=this["cScalePeer"+_]||G(this["cScale"+_],10);for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||A(this.mainBkg,{h:30,s:-30,l:-(-10+_*4)}),this["surfacePeer"+_]=this["surfacePeer"+_]||A(this.mainBkg,{h:30,s:-30,l:-(-7+_*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||A(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||A(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||A(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||A(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||A(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||A(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ln(this.quadrant1Fill)?G(this.quadrant1Fill):it(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.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:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((d=this.radar)==null?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:((p=this.radar)==null?void 0:p.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((C=this.radar)==null?void 0:C.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((w=this.radar)==null?void 0:w.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?it(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=G(this.secondaryColor,20),this.git1=G(this.pie2||this.secondaryColor,20),this.git2=G(this.pie3||this.tertiaryColor,20),this.git3=G(this.pie4||A(this.primaryColor,{h:-30}),20),this.git4=G(this.pie5||A(this.primaryColor,{h:-60}),20),this.git5=G(this.pie6||A(this.primaryColor,{h:-90}),10),this.git6=G(this.pie7||A(this.primaryColor,{h:60}),10),this.git7=G(this.pie8||A(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||G(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||G(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},g(ci,"Theme"),ci),zx=g(t=>{const e=new Nx;return e.calculate(t),e},"getThemeVariables"),hi,Wx=(hi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=A(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=A(this.primaryColor,{h:-160}),this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=un(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var e,r,i,n,a,o,s,c,l,h,u,f,d,p,m,y,x,b,C,v,w;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||A(this.primaryColor,{h:30}),this.cScale4=this.cScale4||A(this.primaryColor,{h:60}),this.cScale5=this.cScale5||A(this.primaryColor,{h:90}),this.cScale6=this.cScale6||A(this.primaryColor,{h:120}),this.cScale7=this.cScale7||A(this.primaryColor,{h:150}),this.cScale8=this.cScale8||A(this.primaryColor,{h:210}),this.cScale9=this.cScale9||A(this.primaryColor,{h:270}),this.cScale10=this.cScale10||A(this.primaryColor,{h:300}),this.cScale11=this.cScale11||A(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||it(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||it(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=it(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||it(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||A(this["cScale"+_],{h:180});for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||A(this.mainBkg,{h:30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||A(this.mainBkg,{h:30,l:-(7+_*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||H(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||H(this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||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=G(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||G(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||G(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=A(this.primaryColor,{h:64}),this.fillType3=A(this.secondaryColor,{h:64}),this.fillType4=A(this.primaryColor,{h:-64}),this.fillType5=A(this.secondaryColor,{h:-64}),this.fillType6=A(this.primaryColor,{h:128}),this.fillType7=A(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||A(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||A(this.primaryColor,{l:-10}),this.pie5=this.pie5||A(this.secondaryColor,{l:-30}),this.pie6=this.pie6||A(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||A(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||A(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||A(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||A(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||A(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||A(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||A(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||A(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||A(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||A(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||A(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||A(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ln(this.quadrant1Fill)?G(this.quadrant1Fill):it(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:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((d=this.xyChart)==null?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((p=this.xyChart)==null?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((C=this.xyChart)==null?void 0:C.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((w=this.xyChart)==null?void 0:w.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||A(this.primaryColor,{h:-30}),this.git4=this.git4||A(this.primaryColor,{h:-60}),this.git5=this.git5||A(this.primaryColor,{h:-90}),this.git6=this.git6||A(this.primaryColor,{h:60}),this.git7=this.git7||A(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||it(H(this.git0),25),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ys,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xs}calculate(e){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},g(hi,"Theme"),hi),qx=g(t=>{const e=new Wx;return e.calculate(t),e},"getThemeVariables"),ui,Hx=(ui=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=G("#cde498",10),this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.primaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,r,i,n,a,o,s,c,l,h,u,f,d,p,m,y,x,b,C,v,w;this.actorBorder=it(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||A(this.primaryColor,{h:30}),this.cScale4=this.cScale4||A(this.primaryColor,{h:60}),this.cScale5=this.cScale5||A(this.primaryColor,{h:90}),this.cScale6=this.cScale6||A(this.primaryColor,{h:120}),this.cScale7=this.cScale7||A(this.primaryColor,{h:150}),this.cScale8=this.cScale8||A(this.primaryColor,{h:210}),this.cScale9=this.cScale9||A(this.primaryColor,{h:270}),this.cScale10=this.cScale10||A(this.primaryColor,{h:300}),this.cScale11=this.cScale11||A(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||it(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||it(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=it(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||it(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||A(this["cScale"+_],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||A(this.mainBkg,{h:30,s:-30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||A(this.mainBkg,{h:30,s:-30,l:-(8+_*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||G(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=A(this.primaryColor,{h:64}),this.fillType3=A(this.secondaryColor,{h:64}),this.fillType4=A(this.primaryColor,{h:-64}),this.fillType5=A(this.secondaryColor,{h:-64}),this.fillType6=A(this.primaryColor,{h:128}),this.fillType7=A(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||A(this.primaryColor,{l:-30}),this.pie5=this.pie5||A(this.secondaryColor,{l:-30}),this.pie6=this.pie6||A(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||A(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||A(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||A(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||A(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||A(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||A(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||A(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||A(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||A(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||A(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||A(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||A(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ln(this.quadrant1Fill)?G(this.quadrant1Fill):it(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:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((d=this.xyChart)==null?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((p=this.xyChart)==null?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((C=this.xyChart)==null?void 0:C.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((w=this.xyChart)==null?void 0:w.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||A(this.primaryColor,{h:-30}),this.git4=this.git4||A(this.primaryColor,{h:-60}),this.git5=this.git5||A(this.primaryColor,{h:-90}),this.git6=this.git6||A(this.primaryColor,{h:60}),this.git7=this.git7||A(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ys,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xs}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},g(ui,"Theme"),ui),Ux=g(t=>{const e=new Hx;return e.calculate(t),e},"getThemeVariables"),fi,jx=(fi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=G(this.contrast,55),this.background="#ffffff",this.tertiaryColor=A(this.primaryColor,{h:-160}),this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,r,i,n,a,o,s,c,l,h,u,f,d,p,m,y,x,b,C,v,w;this.secondBkg=G(this.contrast,55),this.border2=this.contrast,this.actorBorder=G(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||H(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||G(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||it(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||A(this.mainBkg,{l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||A(this.mainBkg,{l:-(8+_*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=G(this.contrast,30),this.sectionBkgColor2=G(this.contrast,30),this.taskBorderColor=it(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=G(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=it(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=A(this.primaryColor,{h:64}),this.fillType3=A(this.secondaryColor,{h:64}),this.fillType4=A(this.primaryColor,{h:-64}),this.fillType5=A(this.secondaryColor,{h:-64}),this.fillType6=A(this.primaryColor,{h:128}),this.fillType7=A(this.secondaryColor,{h:128});for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];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",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||A(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||A(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||A(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||A(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||A(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||A(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ln(this.quadrant1Fill)?G(this.quadrant1Fill):it(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((d=this.radar)==null?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:((p=this.radar)==null?void 0:p.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((C=this.radar)==null?void 0:C.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((w=this.radar)==null?void 0:w.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=it(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||A(this.primaryColor,{h:-30}),this.git4=this.pie5||A(this.primaryColor,{h:-60}),this.git5=this.pie6||A(this.primaryColor,{h:-90}),this.git6=this.pie7||A(this.primaryColor,{h:60}),this.git7=this.pie8||A(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ys,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xs}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},g(fi,"Theme"),fi),Yx=g(t=>{const e=new jx;return e.calculate(t),e},"getThemeVariables"),Ke={base:{getThemeVariables:Px},dark:{getThemeVariables:zx},default:{getThemeVariables:qx},forest:{getThemeVariables:Ux},neutral:{getThemeVariables:Yx}},Me={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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},yf={...Me,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Ke.default.getThemeVariables(),sequence:{...Me.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Me.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Me.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Me.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Me.pie,useWidth:984},xyChart:{...Me.xyChart,useWidth:void 0},requirement:{...Me.requirement,useWidth:void 0},packet:{...Me.packet},radar:{...Me.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},xf=g((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...xf(t[i],"")]:[...r,e+i],[]),"keyify"),Gx=new Set(xf(yf,"")),bf=yf,Sa=g(t=>{if(I.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Sa(e));return}for(const e of Object.keys(t)){if(I.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Gx.has(e)||t[e]==null){I.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){I.debug("sanitizing object",e),Sa(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(I.debug("sanitizing css option",e),t[e]=Vx(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}I.debug("After sanitization",t)}},"sanitizeDirective"),Vx=g(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"),yi=Object.freeze(bf),le=Ht({},yi),_f,xi=[],dn=Ht({},yi),bs=g((t,e)=>{let r=Ht({},t),i={};for(const n of e)vf(n),i=Ht(i,n);if(r=Ht(r,i),i.theme&&i.theme in Ke){const n=Ht({},_f),a=Ht(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ke&&(r.themeVariables=Ke[r.theme].getThemeVariables(a))}return dn=r,kf(dn),dn},"updateCurrentConfig"),Xx=g(t=>(le=Ht({},yi),le=Ht(le,t),t.theme&&Ke[t.theme]&&(le.themeVariables=Ke[t.theme].getThemeVariables(t.themeVariables)),bs(le,xi),le),"setSiteConfig"),Zx=g(t=>{_f=Ht({},t)},"saveConfigFromInitialize"),Kx=g(t=>(le=Ht(le,t),bs(le,xi),le),"updateSiteConfig"),Cf=g(()=>Ht({},le),"getSiteConfig"),wf=g(t=>(kf(t),Ht(dn,t),he()),"setConfig"),he=g(()=>Ht({},dn),"getConfig"),vf=g(t=>{t&&(["secure",...le.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(I.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&vf(t[e])}))},"sanitize"),Qx=g(t=>{var e;Sa(t),t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),xi.push(t),bs(le,xi)},"addDirective"),Ta=g((t=le)=>{xi=[],bs(t,xi)},"reset"),Jx={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},gh={},tb=g(t=>{gh[t]||(I.warn(Jx[t]),gh[t]=!0)},"issueWarning"),kf=g(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&tb("LAZY_LOAD_DEPRECATED")},"checkConfig"),Bn=/<br\s*\/?>/gi,eb=g(t=>t?Mf(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),rb=(()=>{let t=!1;return()=>{t||(Sf(),t=!0)}})();function Sf(){const t="data-temp-href-target";gi.addHook("beforeSanitizeAttributes",e=>{e instanceof Element&&e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),gi.addHook("afterSanitizeAttributes",e=>{e instanceof Element&&e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}g(Sf,"setupDompurifyHooks");var Tf=g(t=>(rb(),gi.sanitize(t)),"removeScript"),mh=g((t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=e.securityLevel;i==="antiscript"||i==="strict"?t=Tf(t):i!=="loose"&&(t=Mf(t),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(/=/g,"="),t=sb(t))}return t},"sanitizeMore"),Ar=g((t,e)=>t&&(e.dompurifyConfig?t=gi.sanitize(mh(t,e),e.dompurifyConfig).toString():t=gi.sanitize(mh(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),ib=g((t,e)=>typeof t=="string"?Ar(t,e):t.flat().map(r=>Ar(r,e)),"sanitizeTextOrArray"),nb=g(t=>Bn.test(t),"hasBreaks"),ab=g(t=>t.split(Bn),"splitBreaks"),sb=g(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Mf=g(t=>t.replace(Bn,"#br#"),"breakToPlaceholder"),Af=g(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Ot=g(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),ob=g(function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),lb=g(function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),yh=g(function(t){const e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let n=e[i];if(n===","&&i>0&&i+1<e.length){const a=e[i-1],o=e[i+1];cb(a,o)&&(n=a+","+o,i++,r.pop())}r.push(hb(n))}return r.join("")},"parseGenericTypes"),Io=g((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),cb=g((t,e)=>{const r=Io(t,"~"),i=Io(e,"~");return r===1&&i===1},"shouldCombineSets"),hb=g(t=>{const e=Io(t,"~");let r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),xh=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Po=/\$\$(.*)\$\$/g,bi=g(t=>{var e;return(((e=t.match(Po))==null?void 0:e.length)??0)>0},"hasKatex"),Y3=g(async(t,e)=>{t=await Il(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),Il=g(async(t,e)=>{if(!bi(t))return t;if(!(xh()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Po,"MathML is unsupported in this environment.");{const{default:r}=await wt(async()=>{const{default:n}=await import("./markdown-vendor-7kCcHxQn.js").then(a=>a.g);return{default:n}},__vite__mapDeps([0,1,2,3,4,5,6])),i=e.forceLegacyMathML||!xh()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Bn).map(n=>bi(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Po,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatex"),Li={getRows:eb,sanitizeText:Ar,sanitizeTextOrArray:ib,hasBreaks:nb,splitBreaks:ab,lineBreakRegex:Bn,removeScript:Tf,getUrl:Af,evaluate:Ot,getMax:ob,getMin:lb},ub=g(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),fb=g(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"),Lf=g(function(t,e,r,i){const n=fb(e,r,i);ub(t,n)},"configureSvgSize"),db=g(function(t,e,r,i){const n=e.node().getBBox(),a=n.width,o=n.height;I.info(`SVG bounds: ${a}x${o}`,n);let s=0,c=0;I.info(`Graph bounds: ${s}x${c}`,t),s=a+r*2,c=o+r*2,I.info(`Calculated bounds: ${s}x${c}`),Lf(e,c,s,i);const l=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",l)},"setupGraphViewbox"),ca={},pb=g((t,e,r)=>{let i="";return t in ca&&ca[t]?i=ca[t](r):I.warn(`No theme found for ${t}`),` & {
|
||
font-family: ${r.fontFamily};
|
||
font-size: ${r.fontSize};
|
||
fill: ${r.textColor}
|
||
}
|
||
@keyframes edge-animation-frame {
|
||
from {
|
||
stroke-dashoffset: 0;
|
||
}
|
||
}
|
||
@keyframes dash {
|
||
to {
|
||
stroke-dashoffset: 0;
|
||
}
|
||
}
|
||
& .edge-animation-slow {
|
||
stroke-dasharray: 9,5 !important;
|
||
stroke-dashoffset: 900;
|
||
animation: dash 50s linear infinite;
|
||
stroke-linecap: round;
|
||
}
|
||
& .edge-animation-fast {
|
||
stroke-dasharray: 9,5 !important;
|
||
stroke-dashoffset: 900;
|
||
animation: dash 20s linear infinite;
|
||
stroke-linecap: round;
|
||
}
|
||
/* Classes common for multiple diagrams */
|
||
|
||
& .error-icon {
|
||
fill: ${r.errorBkgColor};
|
||
}
|
||
& .error-text {
|
||
fill: ${r.errorTextColor};
|
||
stroke: ${r.errorTextColor};
|
||
}
|
||
|
||
& .edge-thickness-normal {
|
||
stroke-width: 1px;
|
||
}
|
||
& .edge-thickness-thick {
|
||
stroke-width: 3.5px
|
||
}
|
||
& .edge-pattern-solid {
|
||
stroke-dasharray: 0;
|
||
}
|
||
& .edge-thickness-invisible {
|
||
stroke-width: 0;
|
||
fill: none;
|
||
}
|
||
& .edge-pattern-dashed{
|
||
stroke-dasharray: 3;
|
||
}
|
||
.edge-pattern-dotted {
|
||
stroke-dasharray: 2;
|
||
}
|
||
|
||
& .marker {
|
||
fill: ${r.lineColor};
|
||
stroke: ${r.lineColor};
|
||
}
|
||
& .marker.cross {
|
||
stroke: ${r.lineColor};
|
||
}
|
||
|
||
& svg {
|
||
font-family: ${r.fontFamily};
|
||
font-size: ${r.fontSize};
|
||
}
|
||
& p {
|
||
margin: 0
|
||
}
|
||
|
||
${i}
|
||
|
||
${e}
|
||
`},"getStyles"),gb=g((t,e)=>{e!==void 0&&(ca[t]=e)},"addStylesForDiagram"),mb=pb,Bf={};Dx(Bf,{clear:()=>yb,getAccDescription:()=>Cb,getAccTitle:()=>bb,getDiagramTitle:()=>vb,setAccDescription:()=>_b,setAccTitle:()=>xb,setDiagramTitle:()=>wb});var Pl="",Nl="",zl="",Wl=g(t=>Ar(t,he()),"sanitizeText"),yb=g(()=>{Pl="",zl="",Nl=""},"clear"),xb=g(t=>{Pl=Wl(t).replace(/^\s+/g,"")},"setAccTitle"),bb=g(()=>Pl,"getAccTitle"),_b=g(t=>{zl=Wl(t).replace(/\n\s+/g,`
|
||
`)},"setAccDescription"),Cb=g(()=>zl,"getAccDescription"),wb=g(t=>{Nl=Wl(t)},"setDiagramTitle"),vb=g(()=>Nl,"getDiagramTitle"),bh=I,kb=Ol,xt=he,G3=wf,V3=yi,_s=g(t=>Ar(t,xt()),"sanitizeText"),Sb=db,Tb=g(()=>Bf,"getCommonDb"),Ma={},Aa=g((t,e,r)=>{var i;Ma[t]&&bh.warn(`Diagram with id ${t} already registered. Overwriting.`),Ma[t]=e,r&&mf(t,r),gb(t,e.styles),(i=e.injectUtils)==null||i.call(e,bh,kb,xt,_s,Sb,Tb(),()=>{})},"registerDiagram"),No=g(t=>{if(t in Ma)return Ma[t];throw new Mb(t)},"getDiagram"),di,Mb=(di=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},g(di,"DiagramNotFoundError"),di);function ql(t){return typeof t>"u"||t===null}g(ql,"isNothing");function Ef(t){return typeof t=="object"&&t!==null}g(Ef,"isObject");function Ff(t){return Array.isArray(t)?t:ql(t)?[]:[t]}g(Ff,"toArray");function $f(t,e){var r,i,n,a;if(e)for(a=Object.keys(e),r=0,i=a.length;r<i;r+=1)n=a[r],t[n]=e[n];return t}g($f,"extend");function Df(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}g(Df,"repeat");function Of(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}g(Of,"isNegativeZero");var Ab=ql,Lb=Ef,Bb=Ff,Eb=Df,Fb=Of,$b=$f,Dt={isNothing:Ab,isObject:Lb,toArray:Bb,repeat:Eb,isNegativeZero:Fb,extend:$b};function Hl(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
|
||
|
||
`+t.mark.snippet),i+" "+r):i}g(Hl,"formatError");function _i(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Hl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(_i,"YAMLException$1");_i.prototype=Object.create(Error.prototype);_i.prototype.constructor=_i;_i.prototype.toString=g(function(e){return this.name+": "+Hl(this,e)},"toString");var ce=_i;function ha(t,e,r,i,n){var a="",o="",s=Math.floor(n/2)-1;return i-e>s&&(a=" ... ",e=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+o,pos:i-e+a.length}}g(ha,"getLine");function ua(t,e){return Dt.repeat(" ",e-t.length)+t}g(ua,"padStart");function Rf(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,o=-1;a=r.exec(t.buffer);)n.push(a.index),i.push(a.index+a[0].length),t.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",c,l,h=Math.min(t.line+e.linesAfter,n.length).toString().length,u=e.maxLength-(e.indent+h+3);for(c=1;c<=e.linesBefore&&!(o-c<0);c++)l=ha(t.buffer,i[o-c],n[o-c],t.position-(i[o]-i[o-c]),u),s=Dt.repeat(" ",e.indent)+ua((t.line-c+1).toString(),h)+" | "+l.str+`
|
||
`+s;for(l=ha(t.buffer,i[o],n[o],t.position,u),s+=Dt.repeat(" ",e.indent)+ua((t.line+1).toString(),h)+" | "+l.str+`
|
||
`,s+=Dt.repeat("-",e.indent+h+3+l.pos)+`^
|
||
`,c=1;c<=e.linesAfter&&!(o+c>=n.length);c++)l=ha(t.buffer,i[o+c],n[o+c],t.position-(i[o]-i[o+c]),u),s+=Dt.repeat(" ",e.indent)+ua((t.line+c+1).toString(),h)+" | "+l.str+`
|
||
`;return s.replace(/\n$/,"")}g(Rf,"makeSnippet");var Db=Rf,Ob=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Rb=["scalar","sequence","mapping"];function If(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}g(If,"compileStyleAliases");function Pf(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(Ob.indexOf(r)===-1)throw new ce('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=If(e.styleAliases||null),Rb.indexOf(this.kind)===-1)throw new ce('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}g(Pf,"Type$1");var Zt=Pf;function zo(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}g(zo,"compileList");function Nf(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(g(i,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}g(Nf,"compileMap");function La(t){return this.extend(t)}g(La,"Schema$1");La.prototype.extend=g(function(e){var r=[],i=[];if(e instanceof Zt)i.push(e);else if(Array.isArray(e))i=i.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit));else throw new ce("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Zt))throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new ce("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new ce("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Zt))throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(La.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=zo(n,"implicit"),n.compiledExplicit=zo(n,"explicit"),n.compiledTypeMap=Nf(n.compiledImplicit,n.compiledExplicit),n},"extend");var Ib=La,Pb=new Zt("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(t){return t!==null?t:""},"construct")}),Nb=new Zt("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(t){return t!==null?t:[]},"construct")}),zb=new Zt("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(t){return t!==null?t:{}},"construct")}),Wb=new Ib({explicit:[Pb,Nb,zb]});function zf(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}g(zf,"resolveYamlNull");function Wf(){return null}g(Wf,"constructYamlNull");function qf(t){return t===null}g(qf,"isNull");var qb=new Zt("tag:yaml.org,2002:null",{kind:"scalar",resolve:zf,construct:Wf,predicate:qf,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function Hf(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}g(Hf,"resolveYamlBoolean");function Uf(t){return t==="true"||t==="True"||t==="TRUE"}g(Uf,"constructYamlBoolean");function jf(t){return Object.prototype.toString.call(t)==="[object Boolean]"}g(jf,"isBoolean");var Hb=new Zt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Hf,construct:Uf,predicate:jf,represent:{lowercase:g(function(t){return t?"true":"false"},"lowercase"),uppercase:g(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Yf(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}g(Yf,"isHexCode");function Gf(t){return 48<=t&&t<=55}g(Gf,"isOctCode");function Vf(t){return 48<=t&&t<=57}g(Vf,"isDecCode");function Xf(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!Yf(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!Gf(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!Vf(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}g(Xf,"resolveYamlInteger");function Zf(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}g(Zf,"constructYamlInteger");function Kf(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Dt.isNegativeZero(t)}g(Kf,"isInteger");var Ub=new Zt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Xf,construct:Zf,predicate:Kf,represent:{binary:g(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:g(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:g(function(t){return t.toString(10)},"decimal"),hexadecimal:g(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"]}}),jb=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Qf(t){return!(t===null||!jb.test(t)||t[t.length-1]==="_")}g(Qf,"resolveYamlFloat");function Jf(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}g(Jf,"constructYamlFloat");var Yb=/^[-+]?[0-9]+e/;function td(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(Dt.isNegativeZero(t))return"-0.0";return r=t.toString(10),Yb.test(r)?r.replace("e",".e"):r}g(td,"representYamlFloat");function ed(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Dt.isNegativeZero(t))}g(ed,"isFloat");var Gb=new Zt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Qf,construct:Jf,predicate:ed,represent:td,defaultStyle:"lowercase"}),rd=Wb.extend({implicit:[qb,Hb,Ub,Gb]}),Vb=rd,id=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),nd=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 ad(t){return t===null?!1:id.exec(t)!==null||nd.exec(t)!==null}g(ad,"resolveYamlTimestamp");function sd(t){var e,r,i,n,a,o,s,c=0,l=null,h,u,f;if(e=id.exec(t),e===null&&(e=nd.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(a=+e[4],o=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=+e[10],u=+(e[11]||0),l=(h*60+u)*6e4,e[9]==="-"&&(l=-l)),f=new Date(Date.UTC(r,i,n,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}g(sd,"constructYamlTimestamp");function od(t){return t.toISOString()}g(od,"representYamlTimestamp");var Xb=new Zt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ad,construct:sd,instanceOf:Date,represent:od});function ld(t){return t==="<<"||t===null}g(ld,"resolveYamlMerge");var Zb=new Zt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ld}),Ul=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`;function cd(t){if(t===null)return!1;var e,r,i=0,n=t.length,a=Ul;for(r=0;r<n;r++)if(e=a.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}g(cd,"resolveYamlBinary");function hd(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,a=Ul,o=0,s=[];for(e=0;e<n;e++)e%4===0&&e&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(e));return r=n%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}g(hd,"constructYamlBinary");function ud(t){var e="",r=0,i,n,a=t.length,o=Ul;for(i=0;i<a;i++)i%3===0&&i&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[i];return n=a%3,n===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):n===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):n===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}g(ud,"representYamlBinary");function fd(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}g(fd,"isBinary");var Kb=new Zt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:cd,construct:hd,predicate:fd,represent:ud}),Qb=Object.prototype.hasOwnProperty,Jb=Object.prototype.toString;function dd(t){if(t===null)return!0;var e=[],r,i,n,a,o,s=t;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],o=!1,Jb.call(n)!=="[object Object]")return!1;for(a in n)if(Qb.call(n,a))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(a)===-1)e.push(a);else return!1}return!0}g(dd,"resolveYamlOmap");function pd(t){return t!==null?t:[]}g(pd,"constructYamlOmap");var t1=new Zt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:dd,construct:pd}),e1=Object.prototype.toString;function gd(t){if(t===null)return!0;var e,r,i,n,a,o=t;for(a=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],e1.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[e]=[n[0],i[n[0]]]}return!0}g(gd,"resolveYamlPairs");function md(t){if(t===null)return[];var e,r,i,n,a,o=t;for(a=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],n=Object.keys(i),a[e]=[n[0],i[n[0]]];return a}g(md,"constructYamlPairs");var r1=new Zt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:gd,construct:md}),i1=Object.prototype.hasOwnProperty;function yd(t){if(t===null)return!0;var e,r=t;for(e in r)if(i1.call(r,e)&&r[e]!==null)return!1;return!0}g(yd,"resolveYamlSet");function xd(t){return t!==null?t:{}}g(xd,"constructYamlSet");var n1=new Zt("tag:yaml.org,2002:set",{kind:"mapping",resolve:yd,construct:xd}),bd=Vb.extend({implicit:[Xb,Zb],explicit:[Kb,t1,r1,n1]}),cr=Object.prototype.hasOwnProperty,Ba=1,_d=2,Cd=3,Ea=4,ao=1,a1=2,_h=3,s1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o1=/[\x85\u2028\u2029]/,l1=/[,\[\]\{\}]/,wd=/^(?:!|!!|![a-z\-]+!)$/i,vd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Wo(t){return Object.prototype.toString.call(t)}g(Wo,"_class");function we(t){return t===10||t===13}g(we,"is_EOL");function lr(t){return t===9||t===32}g(lr,"is_WHITE_SPACE");function te(t){return t===9||t===32||t===10||t===13}g(te,"is_WS_OR_EOL");function wr(t){return t===44||t===91||t===93||t===123||t===125}g(wr,"is_FLOW_INDICATOR");function kd(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}g(kd,"fromHexCode");function Sd(t){return t===120?2:t===117?4:t===85?8:0}g(Sd,"escapedHexLen");function Td(t){return 48<=t&&t<=57?t-48:-1}g(Td,"fromDecimalCode");function qo(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
||
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}g(qo,"simpleEscapeSequence");function Md(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}g(Md,"charFromCodepoint");var Ad=new Array(256),Ld=new Array(256);for(mr=0;mr<256;mr++)Ad[mr]=qo(mr)?1:0,Ld[mr]=qo(mr);var mr;function Bd(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||bd,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=[]}g(Bd,"State$1");function jl(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=Db(r),new ce(e,r)}g(jl,"generateError");function tt(t,e){throw jl(t,e)}g(tt,"throwError");function yn(t,e){t.onWarning&&t.onWarning.call(null,jl(t,e))}g(yn,"throwWarning");var Ch={YAML:g(function(e,r,i){var n,a,o;e.version!==null&&tt(e,"duplication of %YAML directive"),i.length!==1&&tt(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&tt(e,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&tt(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&yn(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(e,r,i){var n,a;i.length!==2&&tt(e,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],wd.test(n)||tt(e,"ill-formed tag handle (first argument) of the TAG directive"),cr.call(e.tagMap,n)&&tt(e,'there is a previously declared suffix for "'+n+'" tag handle'),vd.test(a)||tt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{tt(e,"tag prefix is malformed: "+a)}e.tagMap[n]=a},"handleTagDirective")};function Qe(t,e,r,i){var n,a,o,s;if(e<r){if(s=t.input.slice(e,r),i)for(n=0,a=s.length;n<a;n+=1)o=s.charCodeAt(n),o===9||32<=o&&o<=1114111||tt(t,"expected valid JSON character");else s1.test(s)&&tt(t,"the stream contains non-printable characters");t.result+=s}}g(Qe,"captureSegment");function Ho(t,e,r,i){var n,a,o,s;for(Dt.isObject(r)||tt(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,s=n.length;o<s;o+=1)a=n[o],cr.call(e,a)||(e[a]=r[a],i[a]=!0)}g(Ho,"mergeMappings");function vr(t,e,r,i,n,a,o,s,c){var l,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,h=n.length;l<h;l+=1)Array.isArray(n[l])&&tt(t,"nested arrays are not supported inside keys"),typeof n=="object"&&Wo(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&Wo(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(l=0,h=a.length;l<h;l+=1)Ho(t,e,a[l],r);else Ho(t,e,a,r);else!t.json&&!cr.call(r,n)&&cr.call(e,n)&&(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=c||t.position,tt(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[n]=a,delete r[n];return e}g(vr,"storeMappingPair");function Cs(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):tt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}g(Cs,"readLineBreak");function Bt(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;lr(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(we(n))for(Cs(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&yn(t,"deficient indentation"),i}g(Bt,"skipSeparationSpace");function En(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||te(r)))}g(En,"testDocumentSeparator");function ws(t,e){e===1?t.result+=" ":e>1&&(t.result+=Dt.repeat(`
|
||
`,e-1))}g(ws,"writeFoldedLines");function Ed(t,e,r){var i,n,a,o,s,c,l,h,u=t.kind,f=t.result,d;if(d=t.input.charCodeAt(t.position),te(d)||wr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=t.input.charCodeAt(t.position+1),te(n)||r&&wr(n)))return!1;for(t.kind="scalar",t.result="",a=o=t.position,s=!1;d!==0;){if(d===58){if(n=t.input.charCodeAt(t.position+1),te(n)||r&&wr(n))break}else if(d===35){if(i=t.input.charCodeAt(t.position-1),te(i))break}else{if(t.position===t.lineStart&&En(t)||r&&wr(d))break;if(we(d))if(c=t.line,l=t.lineStart,h=t.lineIndent,Bt(t,!1,-1),t.lineIndent>=e){s=!0,d=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=c,t.lineStart=l,t.lineIndent=h;break}}s&&(Qe(t,a,o,!1),ws(t,t.line-c),a=o=t.position,s=!1),lr(d)||(o=t.position+1),d=t.input.charCodeAt(++t.position)}return Qe(t,a,o,!1),t.result?!0:(t.kind=u,t.result=f,!1)}g(Ed,"readPlainScalar");function Fd(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Qe(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else we(r)?(Qe(t,i,n,!0),ws(t,Bt(t,!1,e)),i=n=t.position):t.position===t.lineStart&&En(t)?tt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);tt(t,"unexpected end of the stream within a single quoted scalar")}g(Fd,"readSingleQuotedScalar");function $d(t,e){var r,i,n,a,o,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return Qe(t,r,t.position,!0),t.position++,!0;if(s===92){if(Qe(t,r,t.position,!0),s=t.input.charCodeAt(++t.position),we(s))Bt(t,!1,e);else if(s<256&&Ad[s])t.result+=Ld[s],t.position++;else if((o=Sd(s))>0){for(n=o,a=0;n>0;n--)s=t.input.charCodeAt(++t.position),(o=kd(s))>=0?a=(a<<4)+o:tt(t,"expected hexadecimal character");t.result+=Md(a),t.position++}else tt(t,"unknown escape sequence");r=i=t.position}else we(s)?(Qe(t,r,i,!0),ws(t,Bt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&En(t)?tt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}tt(t,"unexpected end of the stream within a double quoted scalar")}g($d,"readDoubleQuotedScalar");function Dd(t,e){var r=!0,i,n,a,o=t.tag,s,c=t.anchor,l,h,u,f,d,p=Object.create(null),m,y,x,b;if(b=t.input.charCodeAt(t.position),b===91)h=93,d=!1,s=[];else if(b===123)h=125,d=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),b=t.input.charCodeAt(++t.position);b!==0;){if(Bt(t,!0,e),b=t.input.charCodeAt(t.position),b===h)return t.position++,t.tag=o,t.anchor=c,t.kind=d?"mapping":"sequence",t.result=s,!0;r?b===44&&tt(t,"expected the node content, but found ','"):tt(t,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(l=t.input.charCodeAt(t.position+1),te(l)&&(u=f=!0,t.position++,Bt(t,!0,e))),i=t.line,n=t.lineStart,a=t.position,Lr(t,e,Ba,!1,!0),y=t.tag,m=t.result,Bt(t,!0,e),b=t.input.charCodeAt(t.position),(f||t.line===i)&&b===58&&(u=!0,b=t.input.charCodeAt(++t.position),Bt(t,!0,e),Lr(t,e,Ba,!1,!0),x=t.result),d?vr(t,s,p,y,m,x,i,n,a):u?s.push(vr(t,null,p,y,m,x,i,n,a)):s.push(m),Bt(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}tt(t,"unexpected end of the stream within a flow collection")}g(Dd,"readFlowCollection");function Od(t,e){var r,i,n=ao,a=!1,o=!1,s=e,c=0,l=!1,h,u;if(u=t.input.charCodeAt(t.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(t.kind="scalar",t.result="";u!==0;)if(u=t.input.charCodeAt(++t.position),u===43||u===45)ao===n?n=u===43?_h:a1:tt(t,"repeat of a chomping mode identifier");else if((h=Td(u))>=0)h===0?tt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?tt(t,"repeat of an indentation width identifier"):(s=e+h-1,o=!0);else break;if(lr(u)){do u=t.input.charCodeAt(++t.position);while(lr(u));if(u===35)do u=t.input.charCodeAt(++t.position);while(!we(u)&&u!==0)}for(;u!==0;){for(Cs(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!o||t.lineIndent<s)&&u===32;)t.lineIndent++,u=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>s&&(s=t.lineIndent),we(u)){c++;continue}if(t.lineIndent<s){n===_h?t.result+=Dt.repeat(`
|
||
`,a?1+c:c):n===ao&&a&&(t.result+=`
|
||
`);break}for(i?lr(u)?(l=!0,t.result+=Dt.repeat(`
|
||
`,a?1+c:c)):l?(l=!1,t.result+=Dt.repeat(`
|
||
`,c+1)):c===0?a&&(t.result+=" "):t.result+=Dt.repeat(`
|
||
`,c):t.result+=Dt.repeat(`
|
||
`,a?1+c:c),a=!0,o=!0,c=0,r=t.position;!we(u)&&u!==0;)u=t.input.charCodeAt(++t.position);Qe(t,r,t.position,!1)}return!0}g(Od,"readBlockScalar");function Uo(t,e){var r,i=t.tag,n=t.anchor,a=[],o,s=!1,c;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),c=t.input.charCodeAt(t.position);c!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,tt(t,"tab characters must not be used in indentation")),!(c!==45||(o=t.input.charCodeAt(t.position+1),!te(o))));){if(s=!0,t.position++,Bt(t,!0,-1)&&t.lineIndent<=e){a.push(null),c=t.input.charCodeAt(t.position);continue}if(r=t.line,Lr(t,e,Cd,!1,!0),a.push(t.result),Bt(t,!0,-1),c=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&c!==0)tt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return s?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=a,!0):!1}g(Uo,"readBlockSequence");function Rd(t,e,r){var i,n,a,o,s,c,l=t.tag,h=t.anchor,u={},f=Object.create(null),d=null,p=null,m=null,y=!1,x=!1,b;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=u),b=t.input.charCodeAt(t.position);b!==0;){if(!y&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,tt(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,(b===63||b===58)&&te(i))b===63?(y&&(vr(t,u,f,d,p,null,o,s,c),d=p=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):tt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,b=i;else{if(o=t.line,s=t.lineStart,c=t.position,!Lr(t,r,_d,!1,!0))break;if(t.line===a){for(b=t.input.charCodeAt(t.position);lr(b);)b=t.input.charCodeAt(++t.position);if(b===58)b=t.input.charCodeAt(++t.position),te(b)||tt(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(vr(t,u,f,d,p,null,o,s,c),d=p=m=null),x=!0,y=!1,n=!1,d=t.tag,p=t.result;else if(x)tt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=l,t.anchor=h,!0}else if(x)tt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=l,t.anchor=h,!0}if((t.line===a||t.lineIndent>e)&&(y&&(o=t.line,s=t.lineStart,c=t.position),Lr(t,e,Ea,!0,n)&&(y?p=t.result:m=t.result),y||(vr(t,u,f,d,p,m,o,s,c),d=p=m=null),Bt(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)tt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&vr(t,u,f,d,p,null,o,s,c),x&&(t.tag=l,t.anchor=h,t.kind="mapping",t.result=u),x}g(Rd,"readBlockMapping");function Id(t){var e,r=!1,i=!1,n,a,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&tt(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(i=!0,n="!!",o=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(a=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):tt(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!te(o);)o===33&&(i?tt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),wd.test(n)||tt(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);a=t.input.slice(e,t.position),l1.test(a)&&tt(t,"tag suffix cannot contain flow indicator characters")}a&&!vd.test(a)&&tt(t,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{tt(t,"tag name is malformed: "+a)}return r?t.tag=a:cr.call(t.tagMap,n)?t.tag=t.tagMap[n]+a:n==="!"?t.tag="!"+a:n==="!!"?t.tag="tag:yaml.org,2002:"+a:tt(t,'undeclared tag handle "'+n+'"'),!0}g(Id,"readTagProperty");function Pd(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&tt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!te(r)&&!wr(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&tt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}g(Pd,"readAnchorProperty");function Nd(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!te(i)&&!wr(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&tt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),cr.call(t.anchorMap,r)||tt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Bt(t,!0,-1),!0}g(Nd,"readAlias");function Lr(t,e,r,i,n){var a,o,s,c=1,l=!1,h=!1,u,f,d,p,m,y;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=o=s=Ea===r||Cd===r,i&&Bt(t,!0,-1)&&(l=!0,t.lineIndent>e?c=1:t.lineIndent===e?c=0:t.lineIndent<e&&(c=-1)),c===1)for(;Id(t)||Pd(t);)Bt(t,!0,-1)?(l=!0,s=a,t.lineIndent>e?c=1:t.lineIndent===e?c=0:t.lineIndent<e&&(c=-1)):s=!1;if(s&&(s=l||n),(c===1||Ea===r)&&(Ba===r||_d===r?m=e:m=e+1,y=t.position-t.lineStart,c===1?s&&(Uo(t,y)||Rd(t,y,m))||Dd(t,m)?h=!0:(o&&Od(t,m)||Fd(t,m)||$d(t,m)?h=!0:Nd(t)?(h=!0,(t.tag!==null||t.anchor!==null)&&tt(t,"alias node should not have any properties")):Ed(t,m,Ba===r)&&(h=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):c===0&&(h=s&&Uo(t,y))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&tt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),u=0,f=t.implicitTypes.length;u<f;u+=1)if(p=t.implicitTypes[u],p.resolve(t.result)){t.result=p.construct(t.result),t.tag=p.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(cr.call(t.typeMap[t.kind||"fallback"],t.tag))p=t.typeMap[t.kind||"fallback"][t.tag];else for(p=null,d=t.typeMap.multi[t.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(t.tag.slice(0,d[u].tag.length)===d[u].tag){p=d[u];break}p||tt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&p.kind!==t.kind&&tt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result,t.tag)?(t.result=p.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):tt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}g(Lr,"composeNode");function zd(t){var e=t.position,r,i,n,a=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(Bt(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(a=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!te(o);)o=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&tt(t,"directive name must not be less than one character in length");o!==0;){for(;lr(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!we(o));break}if(we(o))break;for(r=t.position;o!==0&&!te(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}o!==0&&Cs(t),cr.call(Ch,i)?Ch[i](t,i,n):yn(t,'unknown document directive "'+i+'"')}if(Bt(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Bt(t,!0,-1)):a&&tt(t,"directives end mark is expected"),Lr(t,t.lineIndent-1,Ea,!1,!0),Bt(t,!0,-1),t.checkLineBreaks&&o1.test(t.input.slice(e,t.position))&&yn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&En(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Bt(t,!0,-1));return}if(t.position<t.length-1)tt(t,"end of the stream or a document separator is expected");else return}g(zd,"readDocument");function Yl(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
||
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new Bd(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,tt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)zd(r);return r.documents}g(Yl,"loadDocuments");function c1(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var i=Yl(t,r);if(typeof e!="function")return i;for(var n=0,a=i.length;n<a;n+=1)e(i[n])}g(c1,"loadAll$1");function Wd(t,e){var r=Yl(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new ce("expected a single document in the stream, but found more")}}g(Wd,"load$1");var h1=Wd,u1={load:h1},qd=Object.prototype.toString,Hd=Object.prototype.hasOwnProperty,Gl=65279,f1=9,xn=10,d1=13,p1=32,g1=33,m1=34,jo=35,y1=37,x1=38,b1=39,_1=42,Ud=44,C1=45,Fa=58,w1=61,v1=62,k1=63,S1=64,jd=91,Yd=93,T1=96,Gd=123,M1=124,Vd=125,Kt={};Kt[0]="\\0";Kt[7]="\\a";Kt[8]="\\b";Kt[9]="\\t";Kt[10]="\\n";Kt[11]="\\v";Kt[12]="\\f";Kt[13]="\\r";Kt[27]="\\e";Kt[34]='\\"';Kt[92]="\\\\";Kt[133]="\\N";Kt[160]="\\_";Kt[8232]="\\L";Kt[8233]="\\P";var A1=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],L1=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Xd(t,e){var r,i,n,a,o,s,c;if(e===null)return{};for(r={},i=Object.keys(e),n=0,a=i.length;n<a;n+=1)o=i[n],s=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=t.compiledTypeMap.fallback[o],c&&Hd.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[o]=s;return r}g(Xd,"compileStyleMap");function Zd(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else if(t<=4294967295)r="U",i=8;else throw new ce("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Dt.repeat("0",i-e.length)+e}g(Zd,"encodeHex");var B1=1,bn=2;function Kd(t){this.schema=t.schema||bd,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Dt.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Xd(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==='"'?bn:B1,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(Kd,"State");function Yo(t,e){for(var r=Dt.repeat(" ",e),i=0,n=-1,a="",o,s=t.length;i<s;)n=t.indexOf(`
|
||
`,i),n===-1?(o=t.slice(i),i=s):(o=t.slice(i,n+1),i=n+1),o.length&&o!==`
|
||
`&&(a+=r),a+=o;return a}g(Yo,"indentString");function $a(t,e){return`
|
||
`+Dt.repeat(" ",t.indent*e)}g($a,"generateNextLine");function Qd(t,e){var r,i,n;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(n=t.implicitTypes[r],n.resolve(e))return!0;return!1}g(Qd,"testImplicitResolving");function _n(t){return t===p1||t===f1}g(_n,"isWhitespace");function Ci(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==Gl||65536<=t&&t<=1114111}g(Ci,"isPrintable");function Go(t){return Ci(t)&&t!==Gl&&t!==d1&&t!==xn}g(Go,"isNsCharOrWhitespace");function Vo(t,e,r){var i=Go(t),n=i&&!_n(t);return(r?i:i&&t!==Ud&&t!==jd&&t!==Yd&&t!==Gd&&t!==Vd)&&t!==jo&&!(e===Fa&&!n)||Go(e)&&!_n(e)&&t===jo||e===Fa&&n}g(Vo,"isPlainSafe");function Jd(t){return Ci(t)&&t!==Gl&&!_n(t)&&t!==C1&&t!==k1&&t!==Fa&&t!==Ud&&t!==jd&&t!==Yd&&t!==Gd&&t!==Vd&&t!==jo&&t!==x1&&t!==_1&&t!==g1&&t!==M1&&t!==w1&&t!==v1&&t!==b1&&t!==m1&&t!==y1&&t!==S1&&t!==T1}g(Jd,"isPlainSafeFirst");function tp(t){return!_n(t)&&t!==Fa}g(tp,"isPlainSafeLast");function Jr(t,e){var r=t.charCodeAt(e),i;return r>=55296&&r<=56319&&e+1<t.length&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(Jr,"codePointAt");function Vl(t){var e=/^\n* /;return e.test(t)}g(Vl,"needIndentIndicator");var ep=1,Xo=2,rp=3,ip=4,Kr=5;function np(t,e,r,i,n,a,o,s){var c,l=0,h=null,u=!1,f=!1,d=i!==-1,p=-1,m=Jd(Jr(t,0))&&tp(Jr(t,t.length-1));if(e||o)for(c=0;c<t.length;l>=65536?c+=2:c++){if(l=Jr(t,c),!Ci(l))return Kr;m=m&&Vo(l,h,s),h=l}else{for(c=0;c<t.length;l>=65536?c+=2:c++){if(l=Jr(t,c),l===xn)u=!0,d&&(f=f||c-p-1>i&&t[p+1]!==" ",p=c);else if(!Ci(l))return Kr;m=m&&Vo(l,h,s),h=l}f=f||d&&c-p-1>i&&t[p+1]!==" "}return!u&&!f?m&&!o&&!n(t)?ep:a===bn?Kr:Xo:r>9&&Vl(t)?Kr:o?a===bn?Kr:Xo:f?ip:rp}g(np,"chooseScalarStyle");function ap(t,e,r,i,n){t.dump=function(){if(e.length===0)return t.quotingType===bn?'""':"''";if(!t.noCompatMode&&(A1.indexOf(e)!==-1||L1.test(e)))return t.quotingType===bn?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),s=i||t.flowLevel>-1&&r>=t.flowLevel;function c(l){return Qd(t,l)}switch(g(c,"testAmbiguity"),np(e,s,t.indent,o,c,t.quotingType,t.forceQuotes&&!i,n)){case ep:return e;case Xo:return"'"+e.replace(/'/g,"''")+"'";case rp:return"|"+Zo(e,t.indent)+Ko(Yo(e,a));case ip:return">"+Zo(e,t.indent)+Ko(Yo(sp(e,o),a));case Kr:return'"'+op(e)+'"';default:throw new ce("impossible error: invalid scalar style")}}()}g(ap,"writeScalar");function Zo(t,e){var r=Vl(t)?String(e):"",i=t[t.length-1]===`
|
||
`,n=i&&(t[t.length-2]===`
|
||
`||t===`
|
||
`),a=n?"+":i?"":"-";return r+a+`
|
||
`}g(Zo,"blockHeader");function Ko(t){return t[t.length-1]===`
|
||
`?t.slice(0,-1):t}g(Ko,"dropEndingNewline");function sp(t,e){for(var r=/(\n+)([^\n]*)/g,i=function(){var l=t.indexOf(`
|
||
`);return l=l!==-1?l:t.length,r.lastIndex=l,Qo(t.slice(0,l),e)}(),n=t[0]===`
|
||
`||t[0]===" ",a,o;o=r.exec(t);){var s=o[1],c=o[2];a=c[0]===" ",i+=s+(!n&&!a&&c!==""?`
|
||
`:"")+Qo(c,e),n=a}return i}g(sp,"foldString");function Qo(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,c="";i=r.exec(t);)s=i.index,s-n>e&&(a=o>n?o:s,c+=`
|
||
`+t.slice(n,a),n=a+1),o=s;return c+=`
|
||
`,t.length-n>e&&o>n?c+=t.slice(n,o)+`
|
||
`+t.slice(o+1):c+=t.slice(n),c.slice(1)}g(Qo,"foldLine");function op(t){for(var e="",r=0,i,n=0;n<t.length;r>=65536?n+=2:n++)r=Jr(t,n),i=Kt[r],!i&&Ci(r)?(e+=t[n],r>=65536&&(e+=t[n+1])):e+=i||Zd(r);return e}g(op,"escapeString");function lp(t,e,r){var i="",n=t.tag,a,o,s;for(a=0,o=r.length;a<o;a+=1)s=r[a],t.replacer&&(s=t.replacer.call(r,String(a),s)),(Oe(t,e,s,!1,!1)||typeof s>"u"&&Oe(t,e,null,!1,!1))&&(i!==""&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=n,t.dump="["+i+"]"}g(lp,"writeFlowSequence");function Jo(t,e,r,i){var n="",a=t.tag,o,s,c;for(o=0,s=r.length;o<s;o+=1)c=r[o],t.replacer&&(c=t.replacer.call(r,String(o),c)),(Oe(t,e+1,c,!0,!0,!1,!0)||typeof c>"u"&&Oe(t,e+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=$a(t,e)),t.dump&&xn===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=a,t.dump=n||"[]"}g(Jo,"writeBlockSequence");function cp(t,e,r){var i="",n=t.tag,a=Object.keys(r),o,s,c,l,h;for(o=0,s=a.length;o<s;o+=1)h="",i!==""&&(h+=", "),t.condenseFlow&&(h+='"'),c=a[o],l=r[c],t.replacer&&(l=t.replacer.call(r,c,l)),Oe(t,e,c,!1,!1)&&(t.dump.length>1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Oe(t,e,l,!1,!1)&&(h+=t.dump,i+=h));t.tag=n,t.dump="{"+i+"}"}g(cp,"writeFlowMapping");function hp(t,e,r,i){var n="",a=t.tag,o=Object.keys(r),s,c,l,h,u,f;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new ce("sortKeys must be a boolean or a function");for(s=0,c=o.length;s<c;s+=1)f="",(!i||n!=="")&&(f+=$a(t,e)),l=o[s],h=r[l],t.replacer&&(h=t.replacer.call(r,l,h)),Oe(t,e+1,l,!0,!0,!0)&&(u=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,u&&(t.dump&&xn===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,u&&(f+=$a(t,e)),Oe(t,e+1,h,!0,u)&&(t.dump&&xn===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,n+=f));t.tag=a,t.dump=n||"{}"}g(hp,"writeBlockMapping");function tl(t,e,r){var i,n,a,o,s,c;for(n=r?t.explicitTypes:t.implicitTypes,a=0,o=n.length;a<o;a+=1)if(s=n[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof e=="object"&&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(c=t.styleMap[s.tag]||s.defaultStyle,qd.call(s.represent)==="[object Function]")i=s.represent(e,c);else if(Hd.call(s.represent,c))i=s.represent[c](e,c);else throw new ce("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');t.dump=i}return!0}return!1}g(tl,"detectType");function Oe(t,e,r,i,n,a,o){t.tag=null,t.dump=r,tl(t,r,!1)||tl(t,r,!0);var s=qd.call(t.dump),c=i,l;i&&(i=t.flowLevel<0||t.flowLevel>e);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=t.duplicates.indexOf(r),f=u!==-1),(t.tag!==null&&t.tag!=="?"||f||t.indent!==2&&e>0)&&(n=!1),f&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(h&&f&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(t.dump).length!==0?(hp(t,e,t.dump,n),f&&(t.dump="&ref_"+u+t.dump)):(cp(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(s==="[object Array]")i&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?Jo(t,e-1,t.dump,n):Jo(t,e,t.dump,n),f&&(t.dump="&ref_"+u+t.dump)):(lp(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(s==="[object String]")t.tag!=="?"&&ap(t,t.dump,e,a,c);else{if(s==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new ce("unacceptable kind of an object to dump "+s)}t.tag!==null&&t.tag!=="?"&&(l=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",t.dump=l+" "+t.dump)}return!0}g(Oe,"writeNode");function up(t,e){var r=[],i=[],n,a;for(Da(t,r,i),n=0,a=i.length;n<a;n+=1)e.duplicates.push(r[i[n]]);e.usedDuplicates=new Array(a)}g(up,"getDuplicateReferences");function Da(t,e,r){var i,n,a;if(t!==null&&typeof t=="object")if(n=e.indexOf(t),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(e.push(t),Array.isArray(t))for(n=0,a=t.length;n<a;n+=1)Da(t[n],e,r);else for(i=Object.keys(t),n=0,a=i.length;n<a;n+=1)Da(t[i[n]],e,r)}g(Da,"inspectNode");function E1(t,e){e=e||{};var r=new Kd(e);r.noRefs||up(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Oe(r,0,i,!0,!0)?r.dump+`
|
||
`:""}g(E1,"dump$1");function F1(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.")}}g(F1,"renamed");var $1=rd,D1=u1.load;/*! Bundled license information:
|
||
|
||
js-yaml/dist/js-yaml.mjs:
|
||
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
||
*/var ge={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function nn(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=At(t),e=At(e);const[r,i]=[t.x,t.y],[n,a]=[e.x,e.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}g(nn,"calculateDeltaAndAngle");var At=g(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),O1=g(t=>({x:g(function(e,r,i){let n=0;const a=At(i[0]).x<At(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(ge,t.arrowTypeStart)){const{angle:d,deltaX:p}=nn(i[0],i[1]);n=ge[t.arrowTypeStart]*Math.cos(d)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ge,t.arrowTypeEnd)){const{angle:d,deltaX:p}=nn(i[i.length-1],i[i.length-2]);n=ge[t.arrowTypeEnd]*Math.cos(d)*(p>=0?1:-1)}const o=Math.abs(At(e).x-At(i[i.length-1]).x),s=Math.abs(At(e).y-At(i[i.length-1]).y),c=Math.abs(At(e).x-At(i[0]).x),l=Math.abs(At(e).y-At(i[0]).y),h=ge[t.arrowTypeStart],u=ge[t.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=a==="right"?-1:1,n-=d}if(c<h&&c>0&&l<h){let d=h+f-c;d*=a==="right"?-1:1,n+=d}return At(e).x+n},"x"),y:g(function(e,r,i){let n=0;const a=At(i[0]).y<At(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(ge,t.arrowTypeStart)){const{angle:d,deltaY:p}=nn(i[0],i[1]);n=ge[t.arrowTypeStart]*Math.abs(Math.sin(d))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ge,t.arrowTypeEnd)){const{angle:d,deltaY:p}=nn(i[i.length-1],i[i.length-2]);n=ge[t.arrowTypeEnd]*Math.abs(Math.sin(d))*(p>=0?1:-1)}const o=Math.abs(At(e).y-At(i[i.length-1]).y),s=Math.abs(At(e).x-At(i[i.length-1]).x),c=Math.abs(At(e).y-At(i[0]).y),l=Math.abs(At(e).x-At(i[0]).x),h=ge[t.arrowTypeStart],u=ge[t.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=a==="up"?-1:1,n-=d}if(c<h&&c>0&&l<h){let d=h+f-c;d*=a==="up"?-1:1,n+=d}return At(e).y+n},"y")}),"getLineFunctionsWithOffset"),Xl=g(({flowchart:t})=>{var n,a;const e=((n=t==null?void 0:t.subGraphTitleMargin)==null?void 0:n.top)??0,r=((a=t==null?void 0:t.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),R1=g(t=>{const{handDrawnSeed:e}=xt();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),Bi=g(t=>{const e=I1([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),I1=g(t=>{const e=new Map;return t.forEach(r=>{const[i,n]=r.split(":");e.set(i.trim(),n==null?void 0:n.trim())}),e},"styles2Map"),fp=g(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),J=g(t=>{const{stylesArray:e}=Bi(t),r=[],i=[],n=[],a=[];return e.forEach(o=>{const s=o[0];fp(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&n.push(o.join(":")+" !important"),s==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:a}},"styles2String"),K=g((t,e)=>{var c;const{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=Bi(t);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:((c=o.get("stroke-width"))==null?void 0:c.replace("px",""))||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides"),Hi={},$t={},wh;function P1(){return wh||(wh=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.BLANK_URL=$t.relativeFirstCharacters=$t.whitespaceEscapeCharsRegex=$t.urlSchemeRegex=$t.ctrlCharactersRegex=$t.htmlCtrlEntityRegex=$t.htmlEntitiesRegex=$t.invalidProtocolRegex=void 0,$t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,$t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,$t.htmlCtrlEntityRegex=/&(newline|tab);/gi,$t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,$t.urlSchemeRegex=/^.+(:|:)/gim,$t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,$t.relativeFirstCharacters=[".","/"],$t.BLANK_URL="about:blank"),$t}var vh;function N1(){if(vh)return Hi;vh=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.sanitizeUrl=void 0;var t=P1();function e(o){return t.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var s=o.replace(t.ctrlCharactersRegex,"");return s.replace(t.htmlEntitiesRegex,function(c,l){return String.fromCharCode(l)})}function i(o){return URL.canParse(o)}function n(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return t.BLANK_URL;var s,c=n(o.trim());do c=r(c).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim(),c=n(c),s=c.match(t.ctrlCharactersRegex)||c.match(t.htmlEntitiesRegex)||c.match(t.htmlCtrlEntityRegex)||c.match(t.whitespaceEscapeCharsRegex);while(s&&s.length>0);var l=c;if(!l)return t.BLANK_URL;if(e(l))return l;var h=l.trimStart(),u=h.match(t.urlSchemeRegex);if(!u)return l;var f=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(f))return t.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return t.BLANK_URL;var p=new URL(d);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return d}return Hi.sanitizeUrl=a,Hi}var z1=N1();function fa(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function W1(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Zl(t){let e,r,i;t.length!==2?(e=fa,r=(s,c)=>fa(t(s),c),i=(s,c)=>t(s)-c):(e=t===fa||t===W1?t:q1,r=t,i=t);function n(s,c,l=0,h=s.length){if(l<h){if(e(c,c)!==0)return h;do{const u=l+h>>>1;r(s[u],c)<0?l=u+1:h=u}while(l<h)}return l}function a(s,c,l=0,h=s.length){if(l<h){if(e(c,c)!==0)return h;do{const u=l+h>>>1;r(s[u],c)<=0?l=u+1:h=u}while(l<h)}return l}function o(s,c,l=0,h=s.length){const u=n(s,c,l,h-1);return u>l&&i(s[u-1],c)>-i(s[u],c)?u-1:u}return{left:n,center:o,right:a}}function q1(){return 0}function H1(t){return t===null?NaN:+t}const U1=Zl(fa),j1=U1.right;Zl(H1).center;class kh extends Map{constructor(e,r=V1){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[i,n]of e)this.set(i,n)}get(e){return super.get(Sh(this,e))}has(e){return super.has(Sh(this,e))}set(e,r){return super.set(Y1(this,e),r)}delete(e){return super.delete(G1(this,e))}}function Sh({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function Y1({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function G1({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function V1(t){return t!==null&&typeof t=="object"?t.valueOf():t}const X1=Math.sqrt(50),Z1=Math.sqrt(10),K1=Math.sqrt(2);function Oa(t,e,r){const i=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),o=a>=X1?10:a>=Z1?5:a>=K1?2:1;let s,c,l;return n<0?(l=Math.pow(10,-n)/o,s=Math.round(t*l),c=Math.round(e*l),s/l<t&&++s,c/l>e&&--c,l=-l):(l=Math.pow(10,n)*o,s=Math.round(t/l),c=Math.round(e/l),s*l<t&&++s,c*l>e&&--c),c<s&&.5<=r&&r<2?Oa(t,e,r*2):[s,c,l]}function Q1(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const i=e<t,[n,a,o]=i?Oa(e,t,r):Oa(t,e,r);if(!(a>=n))return[];const s=a-n+1,c=new Array(s);if(i)if(o<0)for(let l=0;l<s;++l)c[l]=(a-l)/-o;else for(let l=0;l<s;++l)c[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)c[l]=(n+l)/-o;else for(let l=0;l<s;++l)c[l]=(n+l)*o;return c}function el(t,e,r){return e=+e,t=+t,r=+r,Oa(t,e,r)[2]}function rl(t,e,r){e=+e,t=+t,r=+r;const i=e<t,n=i?el(e,t,r):el(t,e,r);return(i?-1:1)*(n<0?1/-n:n)}function X3(t,e){let r;if(e===void 0)for(const i of t)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function Z3(t,e){let r;if(e===void 0)for(const i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function J1(t,e,r){t=+t,e=+e,r=(n=arguments.length)<2?(e=t,t=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(n);++i<n;)a[i]=t+i*r;return a}function t2(t){return t}var da=1,so=2,il=3,Vn=4,Th=1e-6;function e2(t){return"translate("+t+",0)"}function r2(t){return"translate(0,"+t+")"}function i2(t){return e=>+t(e)}function n2(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function a2(){return!this.__axis}function dp(t,e){var r=[],i=null,n=null,a=6,o=6,s=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=t===da||t===Vn?-1:1,h=t===Vn||t===so?"x":"y",u=t===da||t===il?e2:r2;function f(d){var p=i??(e.ticks?e.ticks.apply(e,r):e.domain()),m=n??(e.tickFormat?e.tickFormat.apply(e,r):t2),y=Math.max(a,0)+s,x=e.range(),b=+x[0]+c,C=+x[x.length-1]+c,v=(e.bandwidth?n2:i2)(e.copy(),c),w=d.selection?d.selection():d,_=w.selectAll(".domain").data([null]),k=w.selectAll(".tick").data(p,e).order(),O=k.exit(),N=k.enter().append("g").attr("class","tick"),D=k.select("line"),T=k.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(N),D=D.merge(N.append("line").attr("stroke","currentColor").attr(h+"2",l*a)),T=T.merge(N.append("text").attr("fill","currentColor").attr(h,l*y).attr("dy",t===da?"0em":t===il?"0.71em":"0.32em")),d!==w&&(_=_.transition(d),k=k.transition(d),D=D.transition(d),T=T.transition(d),O=O.transition(d).attr("opacity",Th).attr("transform",function(R){return isFinite(R=v(R))?u(R+c):this.getAttribute("transform")}),N.attr("opacity",Th).attr("transform",function(R){var L=this.parentNode.__axis;return u((L&&isFinite(L=L(R))?L:v(R))+c)})),O.remove(),_.attr("d",t===Vn||t===so?o?"M"+l*o+","+b+"H"+c+"V"+C+"H"+l*o:"M"+c+","+b+"V"+C:o?"M"+b+","+l*o+"V"+c+"H"+C+"V"+l*o:"M"+b+","+c+"H"+C),k.attr("opacity",1).attr("transform",function(R){return u(v(R)+c)}),D.attr(h+"2",l*a),T.attr(h,l*y).text(m),w.filter(a2).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===so?"start":t===Vn?"end":"middle"),w.each(function(){this.__axis=v})}return f.scale=function(d){return arguments.length?(e=d,f):e},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(r=d==null?[]:Array.from(d),f):r.slice()},f.tickValues=function(d){return arguments.length?(i=d==null?null:Array.from(d),f):i&&i.slice()},f.tickFormat=function(d){return arguments.length?(n=d,f):n},f.tickSize=function(d){return arguments.length?(a=o=+d,f):a},f.tickSizeInner=function(d){return arguments.length?(a=+d,f):a},f.tickSizeOuter=function(d){return arguments.length?(o=+d,f):o},f.tickPadding=function(d){return arguments.length?(s=+d,f):s},f.offset=function(d){return arguments.length?(c=+d,f):c},f}function K3(t){return dp(da,t)}function Q3(t){return dp(il,t)}var s2={value:()=>{}};function pp(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new pa(r)}function pa(t){this._=t}function o2(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}pa.prototype=pp.prototype={constructor:pa,on:function(t,e){var r=this._,i=o2(t+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(t=i[a]).type)&&(n=l2(r[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Mh(r[n],t.name,e);else if(e==null)for(n in r)r[n]=Mh(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new pa(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],i=0,n=a.length;i<n;++i)a[i].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,a=i.length;n<a;++n)i[n].value.apply(e,r)}};function l2(t,e){for(var r=0,i=t.length,n;r<i;++r)if((n=t[r]).name===e)return n.value}function Mh(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=s2,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var nl="http://www.w3.org/1999/xhtml";const Ah={svg:"http://www.w3.org/2000/svg",xhtml:nl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vs(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Ah.hasOwnProperty(e)?{space:Ah[e],local:t}:t}function c2(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===nl&&e.documentElement.namespaceURI===nl?e.createElement(t):e.createElementNS(r,t)}}function h2(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function gp(t){var e=vs(t);return(e.local?h2:c2)(e)}function u2(){}function Kl(t){return t==null?u2:function(){return this.querySelector(t)}}function f2(t){typeof t!="function"&&(t=Kl(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a=e[n],o=a.length,s=i[n]=new Array(o),c,l,h=0;h<o;++h)(c=a[h])&&(l=t.call(c,c.__data__,h,a))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new de(i,this._parents)}function d2(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function p2(){return[]}function mp(t){return t==null?p2:function(){return this.querySelectorAll(t)}}function g2(t){return function(){return d2(t.apply(this,arguments))}}function m2(t){typeof t=="function"?t=g2(t):t=mp(t);for(var e=this._groups,r=e.length,i=[],n=[],a=0;a<r;++a)for(var o=e[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(i.push(t.call(c,c.__data__,l,o)),n.push(c));return new de(i,n)}function yp(t){return function(){return this.matches(t)}}function xp(t){return function(e){return e.matches(t)}}var y2=Array.prototype.find;function x2(t){return function(){return y2.call(this.children,t)}}function b2(){return this.firstElementChild}function _2(t){return this.select(t==null?b2:x2(typeof t=="function"?t:xp(t)))}var C2=Array.prototype.filter;function w2(){return Array.from(this.children)}function v2(t){return function(){return C2.call(this.children,t)}}function k2(t){return this.selectAll(t==null?w2:v2(typeof t=="function"?t:xp(t)))}function S2(t){typeof t!="function"&&(t=yp(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a=e[n],o=a.length,s=i[n]=[],c,l=0;l<o;++l)(c=a[l])&&t.call(c,c.__data__,l,a)&&s.push(c);return new de(i,this._parents)}function bp(t){return new Array(t.length)}function T2(){return new de(this._enter||this._groups.map(bp),this._parents)}function Ra(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ra.prototype={constructor:Ra,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)}};function M2(t){return function(){return t}}function A2(t,e,r,i,n,a){for(var o=0,s,c=e.length,l=a.length;o<l;++o)(s=e[o])?(s.__data__=a[o],i[o]=s):r[o]=new Ra(t,a[o]);for(;o<c;++o)(s=e[o])&&(n[o]=s)}function L2(t,e,r,i,n,a,o){var s,c,l=new Map,h=e.length,u=a.length,f=new Array(h),d;for(s=0;s<h;++s)(c=e[s])&&(f[s]=d=o.call(c,c.__data__,s,e)+"",l.has(d)?n[s]=c:l.set(d,c));for(s=0;s<u;++s)d=o.call(t,a[s],s,a)+"",(c=l.get(d))?(i[s]=c,c.__data__=a[s],l.delete(d)):r[s]=new Ra(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l.get(f[s])===c&&(n[s]=c)}function B2(t){return t.__data__}function E2(t,e){if(!arguments.length)return Array.from(this,B2);var r=e?L2:A2,i=this._parents,n=this._groups;typeof t!="function"&&(t=M2(t));for(var a=n.length,o=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var h=i[l],u=n[l],f=u.length,d=F2(t.call(h,h&&h.__data__,l,i)),p=d.length,m=s[l]=new Array(p),y=o[l]=new Array(p),x=c[l]=new Array(f);r(h,u,m,y,x,d,e);for(var b=0,C=0,v,w;b<p;++b)if(v=m[b]){for(b>=C&&(C=b+1);!(w=y[C])&&++C<p;);v._next=w||null}}return o=new de(o,i),o._enter=s,o._exit=c,o}function F2(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function $2(){return new de(this._exit||this._groups.map(bp),this._parents)}function D2(t,e,r){var i=this.enter(),n=this,a=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function O2(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,a=i.length,o=Math.min(n,a),s=new Array(n),c=0;c<o;++c)for(var l=r[c],h=i[c],u=l.length,f=s[c]=new Array(u),d,p=0;p<u;++p)(d=l[p]||h[p])&&(f[p]=d);for(;c<n;++c)s[c]=r[c];return new de(s,this._parents)}function R2(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],n=i.length-1,a=i[n],o;--n>=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function I2(t){t||(t=P2);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var o=r[a],s=o.length,c=n[a]=new Array(s),l,h=0;h<s;++h)(l=o[h])&&(c[h]=l);c.sort(e)}return new de(n,this._parents).order()}function P2(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function N2(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function z2(){return Array.from(this)}function W2(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,a=i.length;n<a;++n){var o=i[n];if(o)return o}return null}function q2(){let t=0;for(const e of this)++t;return t}function H2(){return!this.node()}function U2(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n=e[r],a=0,o=n.length,s;a<o;++a)(s=n[a])&&t.call(s,s.__data__,a,n);return this}function j2(t){return function(){this.removeAttribute(t)}}function Y2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function G2(t,e){return function(){this.setAttribute(t,e)}}function V2(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function X2(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function Z2(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function K2(t,e){var r=vs(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?Y2:j2:typeof e=="function"?r.local?Z2:X2:r.local?V2:G2)(r,e))}function _p(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Q2(t){return function(){this.style.removeProperty(t)}}function J2(t,e,r){return function(){this.style.setProperty(t,e,r)}}function t_(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function e_(t,e,r){return arguments.length>1?this.each((e==null?Q2:typeof e=="function"?t_:J2)(t,e,r??"")):wi(this.node(),t)}function wi(t,e){return t.style.getPropertyValue(e)||_p(t).getComputedStyle(t,null).getPropertyValue(e)}function r_(t){return function(){delete this[t]}}function i_(t,e){return function(){this[t]=e}}function n_(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function a_(t,e){return arguments.length>1?this.each((e==null?r_:typeof e=="function"?n_:i_)(t,e)):this.node()[t]}function Cp(t){return t.trim().split(/^|\s+/)}function Ql(t){return t.classList||new wp(t)}function wp(t){this._node=t,this._names=Cp(t.getAttribute("class")||"")}wp.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function vp(t,e){for(var r=Ql(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function kp(t,e){for(var r=Ql(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function s_(t){return function(){vp(this,t)}}function o_(t){return function(){kp(this,t)}}function l_(t,e){return function(){(e.apply(this,arguments)?vp:kp)(this,t)}}function c_(t,e){var r=Cp(t+"");if(arguments.length<2){for(var i=Ql(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof e=="function"?l_:e?s_:o_)(r,e))}function h_(){this.textContent=""}function u_(t){return function(){this.textContent=t}}function f_(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function d_(t){return arguments.length?this.each(t==null?h_:(typeof t=="function"?f_:u_)(t)):this.node().textContent}function p_(){this.innerHTML=""}function g_(t){return function(){this.innerHTML=t}}function m_(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function y_(t){return arguments.length?this.each(t==null?p_:(typeof t=="function"?m_:g_)(t)):this.node().innerHTML}function x_(){this.nextSibling&&this.parentNode.appendChild(this)}function b_(){return this.each(x_)}function __(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function C_(){return this.each(__)}function w_(t){var e=typeof t=="function"?t:gp(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function v_(){return null}function k_(t,e){var r=typeof t=="function"?t:gp(t),i=e==null?v_:typeof e=="function"?e:Kl(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function S_(){var t=this.parentNode;t&&t.removeChild(this)}function T_(){return this.each(S_)}function M_(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function A_(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function L_(t){return this.select(t?A_:M_)}function B_(t){return arguments.length?this.property("__data__",t):this.node().__data__}function E_(t){return function(e){t.call(this,e,this.__data__)}}function F_(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function $_(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,n=e.length,a;r<n;++r)a=e[r],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++i]=a;++i?e.length=i:delete this.__on}}}function D_(t,e,r){return function(){var i=this.__on,n,a=E_(e);if(i){for(var o=0,s=i.length;o<s;++o)if((n=i[o]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=e;return}}this.addEventListener(t.type,a,r),n={type:t.type,name:t.name,value:e,listener:a,options:r},i?i.push(n):this.__on=[n]}}function O_(t,e,r){var i=F_(t+""),n,a=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,h;c<l;++c)for(n=0,h=s[c];n<a;++n)if((o=i[n]).type===h.type&&o.name===h.name)return h.value}return}for(s=e?D_:$_,n=0;n<a;++n)this.each(s(i[n],e,r));return this}function Sp(t,e,r){var i=_p(t),n=i.CustomEvent;typeof n=="function"?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function R_(t,e){return function(){return Sp(this,t,e)}}function I_(t,e){return function(){return Sp(this,t,e.apply(this,arguments))}}function P_(t,e){return this.each((typeof e=="function"?I_:R_)(t,e))}function*N_(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,a=i.length,o;n<a;++n)(o=i[n])&&(yield o)}var Tp=[null];function de(t,e){this._groups=t,this._parents=e}function Fn(){return new de([[document.documentElement]],Tp)}function z_(){return this}de.prototype=Fn.prototype={constructor:de,select:f2,selectAll:m2,selectChild:_2,selectChildren:k2,filter:S2,data:E2,enter:T2,exit:$2,join:D2,merge:O2,selection:z_,order:R2,sort:I2,call:N2,nodes:z2,node:W2,size:q2,empty:H2,each:U2,attr:K2,style:e_,property:a_,classed:c_,text:d_,html:y_,raise:b_,lower:C_,append:w_,insert:k_,remove:T_,clone:L_,datum:B_,on:O_,dispatch:P_,[Symbol.iterator]:N_};function gt(t){return typeof t=="string"?new de([[document.querySelector(t)]],[document.documentElement]):new de([[t]],Tp)}function $n(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function ks(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function Rr(){}var Cn=.7,Ia=1/Cn,ni="\\s*([+-]?\\d+)\\s*",wn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",$e="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W_=/^#([0-9a-f]{3,8})$/,q_=new RegExp(`^rgb\\(${ni},${ni},${ni}\\)$`),H_=new RegExp(`^rgb\\(${$e},${$e},${$e}\\)$`),U_=new RegExp(`^rgba\\(${ni},${ni},${ni},${wn}\\)$`),j_=new RegExp(`^rgba\\(${$e},${$e},${$e},${wn}\\)$`),Y_=new RegExp(`^hsl\\(${wn},${$e},${$e}\\)$`),G_=new RegExp(`^hsla\\(${wn},${$e},${$e},${wn}\\)$`),Lh={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};$n(Rr,Br,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Bh,formatHex:Bh,formatHex8:V_,formatHsl:X_,formatRgb:Eh,toString:Eh});function Bh(){return this.rgb().formatHex()}function V_(){return this.rgb().formatHex8()}function X_(){return Ap(this).formatHsl()}function Eh(){return this.rgb().formatRgb()}function Br(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=W_.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?Fh(e):r===3?new Xt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Xn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Xn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=q_.exec(t))?new Xt(e[1],e[2],e[3],1):(e=H_.exec(t))?new Xt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=U_.exec(t))?Xn(e[1],e[2],e[3],e[4]):(e=j_.exec(t))?Xn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Y_.exec(t))?Oh(e[1],e[2]/100,e[3]/100,1):(e=G_.exec(t))?Oh(e[1],e[2]/100,e[3]/100,e[4]):Lh.hasOwnProperty(t)?Fh(Lh[t]):t==="transparent"?new Xt(NaN,NaN,NaN,0):null}function Fh(t){return new Xt(t>>16&255,t>>8&255,t&255,1)}function Xn(t,e,r,i){return i<=0&&(t=e=r=NaN),new Xt(t,e,r,i)}function Mp(t){return t instanceof Rr||(t=Br(t)),t?(t=t.rgb(),new Xt(t.r,t.g,t.b,t.opacity)):new Xt}function al(t,e,r,i){return arguments.length===1?Mp(t):new Xt(t,e,r,i??1)}function Xt(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}$n(Xt,al,ks(Rr,{brighter(t){return t=t==null?Ia:Math.pow(Ia,t),new Xt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,t),new Xt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Xt(Tr(this.r),Tr(this.g),Tr(this.b),Pa(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:$h,formatHex:$h,formatHex8:Z_,formatRgb:Dh,toString:Dh}));function $h(){return`#${kr(this.r)}${kr(this.g)}${kr(this.b)}`}function Z_(){return`#${kr(this.r)}${kr(this.g)}${kr(this.b)}${kr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Dh(){const t=Pa(this.opacity);return`${t===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${t===1?")":`, ${t})`}`}function Pa(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Tr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function kr(t){return t=Tr(t),(t<16?"0":"")+t.toString(16)}function Oh(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Ce(t,e,r,i)}function Ap(t){if(t instanceof Ce)return new Ce(t.h,t.s,t.l,t.opacity);if(t instanceof Rr||(t=Br(t)),!t)return new Ce;if(t instanceof Ce)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),a=Math.max(e,r,i),o=NaN,s=a-n,c=(a+n)/2;return s?(e===a?o=(r-i)/s+(r<i)*6:r===a?o=(i-e)/s+2:o=(e-r)/s+4,s/=c<.5?a+n:2-a-n,o*=60):s=c>0&&c<1?0:o,new Ce(o,s,c,t.opacity)}function K_(t,e,r,i){return arguments.length===1?Ap(t):new Ce(t,e,r,i??1)}function Ce(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}$n(Ce,K_,ks(Rr,{brighter(t){return t=t==null?Ia:Math.pow(Ia,t),new Ce(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,t),new Ce(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new Xt(oo(t>=240?t-240:t+120,n,i),oo(t,n,i),oo(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new Ce(Rh(this.h),Zn(this.s),Zn(this.l),Pa(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=Pa(this.opacity);return`${t===1?"hsl(":"hsla("}${Rh(this.h)}, ${Zn(this.s)*100}%, ${Zn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Rh(t){return t=(t||0)%360,t<0?t+360:t}function Zn(t){return Math.max(0,Math.min(1,t||0))}function oo(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const Q_=Math.PI/180,J_=180/Math.PI,Na=18,Lp=.96422,Bp=1,Ep=.82521,Fp=4/29,ai=6/29,$p=3*ai*ai,tC=ai*ai*ai;function Dp(t){if(t instanceof De)return new De(t.l,t.a,t.b,t.opacity);if(t instanceof Ye)return Op(t);t instanceof Xt||(t=Mp(t));var e=uo(t.r),r=uo(t.g),i=uo(t.b),n=lo((.2225045*e+.7168786*r+.0606169*i)/Bp),a,o;return e===r&&r===i?a=o=n:(a=lo((.4360747*e+.3850649*r+.1430804*i)/Lp),o=lo((.0139322*e+.0971045*r+.7141733*i)/Ep)),new De(116*n-16,500*(a-n),200*(n-o),t.opacity)}function eC(t,e,r,i){return arguments.length===1?Dp(t):new De(t,e,r,i??1)}function De(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}$n(De,eC,ks(Rr,{brighter(t){return new De(this.l+Na*(t??1),this.a,this.b,this.opacity)},darker(t){return new De(this.l-Na*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=Lp*co(e),t=Bp*co(t),r=Ep*co(r),new Xt(ho(3.1338561*e-1.6168667*t-.4906146*r),ho(-.9787684*e+1.9161415*t+.033454*r),ho(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function lo(t){return t>tC?Math.pow(t,1/3):t/$p+Fp}function co(t){return t>ai?t*t*t:$p*(t-Fp)}function ho(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function uo(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function rC(t){if(t instanceof Ye)return new Ye(t.h,t.c,t.l,t.opacity);if(t instanceof De||(t=Dp(t)),t.a===0&&t.b===0)return new Ye(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*J_;return new Ye(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function sl(t,e,r,i){return arguments.length===1?rC(t):new Ye(t,e,r,i??1)}function Ye(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function Op(t){if(isNaN(t.h))return new De(t.l,0,0,t.opacity);var e=t.h*Q_;return new De(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}$n(Ye,sl,ks(Rr,{brighter(t){return new Ye(this.h,this.c,this.l+Na*(t??1),this.opacity)},darker(t){return new Ye(this.h,this.c,this.l-Na*(t??1),this.opacity)},rgb(){return Op(this).rgb()}}));const Ss=t=>()=>t;function Rp(t,e){return function(r){return t+r*e}}function iC(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)}}function nC(t,e){var r=e-t;return r?Rp(t,r>180||r<-180?r-360*Math.round(r/360):r):Ss(isNaN(t)?e:t)}function aC(t){return(t=+t)==1?pn:function(e,r){return r-e?iC(e,r,t):Ss(isNaN(e)?r:e)}}function pn(t,e){var r=e-t;return r?Rp(t,r):Ss(isNaN(t)?e:t)}const za=function t(e){var r=aC(e);function i(n,a){var o=r((n=al(n)).r,(a=al(a)).r),s=r(n.g,a.g),c=r(n.b,a.b),l=pn(n.opacity,a.opacity);return function(h){return n.r=o(h),n.g=s(h),n.b=c(h),n.opacity=l(h),n+""}}return i.gamma=t,i}(1);function sC(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,i=e.slice(),n;return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function oC(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function lC(t,e){var r=e?e.length:0,i=t?Math.min(r,t.length):0,n=new Array(i),a=new Array(r),o;for(o=0;o<i;++o)n[o]=Jl(t[o],e[o]);for(;o<r;++o)a[o]=e[o];return function(s){for(o=0;o<i;++o)a[o]=n[o](s);return a}}function cC(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function _e(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function hC(t,e){var r={},i={},n;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(n in e)n in t?r[n]=Jl(t[n],e[n]):i[n]=e[n];return function(a){for(n in r)i[n]=r[n](a);return i}}var ol=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fo=new RegExp(ol.source,"g");function uC(t){return function(){return t}}function fC(t){return function(e){return t(e)+""}}function Ip(t,e){var r=ol.lastIndex=fo.lastIndex=0,i,n,a,o=-1,s=[],c=[];for(t=t+"",e=e+"";(i=ol.exec(t))&&(n=fo.exec(e));)(a=n.index)>r&&(a=e.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,c.push({i:o,x:_e(i,n)})),r=fo.lastIndex;return r<e.length&&(a=e.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?fC(c[0].x):uC(e):(e=c.length,function(l){for(var h=0,u;h<e;++h)s[(u=c[h]).i]=u.x(l);return s.join("")})}function Jl(t,e){var r=typeof e,i;return e==null||r==="boolean"?Ss(e):(r==="number"?_e:r==="string"?(i=Br(e))?(e=i,za):Ip:e instanceof Br?za:e instanceof Date?cC:oC(e)?sC:Array.isArray(e)?lC:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?hC:_e)(t,e)}function dC(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var Ih=180/Math.PI,ll={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Pp(t,e,r,i,n,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*r+e*i)&&(r-=t*c,i-=e*c),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,c/=s),t*i<e*r&&(t=-t,e=-e,c=-c,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(e,t)*Ih,skewX:Math.atan(c)*Ih,scaleX:o,scaleY:s}}var Kn;function pC(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ll:Pp(e.a,e.b,e.c,e.d,e.e,e.f)}function gC(t){return t==null||(Kn||(Kn=document.createElementNS("http://www.w3.org/2000/svg","g")),Kn.setAttribute("transform",t),!(t=Kn.transform.baseVal.consolidate()))?ll:(t=t.matrix,Pp(t.a,t.b,t.c,t.d,t.e,t.f))}function Np(t,e,r,i){function n(l){return l.length?l.pop()+" ":""}function a(l,h,u,f,d,p){if(l!==u||h!==f){var m=d.push("translate(",null,e,null,r);p.push({i:m-4,x:_e(l,u)},{i:m-2,x:_e(h,f)})}else(u||f)&&d.push("translate("+u+e+f+r)}function o(l,h,u,f){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:_e(l,h)})):h&&u.push(n(u)+"rotate("+h+i)}function s(l,h,u,f){l!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:_e(l,h)}):h&&u.push(n(u)+"skewX("+h+i)}function c(l,h,u,f,d,p){if(l!==u||h!==f){var m=d.push(n(d)+"scale(",null,",",null,")");p.push({i:m-4,x:_e(l,u)},{i:m-2,x:_e(h,f)})}else(u!==1||f!==1)&&d.push(n(d)+"scale("+u+","+f+")")}return function(l,h){var u=[],f=[];return l=t(l),h=t(h),a(l.translateX,l.translateY,h.translateX,h.translateY,u,f),o(l.rotate,h.rotate,u,f),s(l.skewX,h.skewX,u,f),c(l.scaleX,l.scaleY,h.scaleX,h.scaleY,u,f),l=h=null,function(d){for(var p=-1,m=f.length,y;++p<m;)u[(y=f[p]).i]=y.x(d);return u.join("")}}}var mC=Np(pC,"px, ","px)","deg)"),yC=Np(gC,", ",")",")");function xC(t){return function(e,r){var i=t((e=sl(e)).h,(r=sl(r)).h),n=pn(e.c,r.c),a=pn(e.l,r.l),o=pn(e.opacity,r.opacity);return function(s){return e.h=i(s),e.c=n(s),e.l=a(s),e.opacity=o(s),e+""}}}const J3=xC(nC);var vi=0,an=0,Ui=0,zp=1e3,Wa,sn,qa=0,Er=0,Ts=0,vn=typeof performance=="object"&&performance.now?performance:Date,Wp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function tc(){return Er||(Wp(bC),Er=vn.now()+Ts)}function bC(){Er=0}function Ha(){this._call=this._time=this._next=null}Ha.prototype=qp.prototype={constructor:Ha,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?tc():+r)+(e==null?0:+e),!this._next&&sn!==this&&(sn?sn._next=this:Wa=this,sn=this),this._call=t,this._time=r,cl()},stop:function(){this._call&&(this._call=null,this._time=1/0,cl())}};function qp(t,e,r){var i=new Ha;return i.restart(t,e,r),i}function _C(){tc(),++vi;for(var t=Wa,e;t;)(e=Er-t._time)>=0&&t._call.call(void 0,e),t=t._next;--vi}function Ph(){Er=(qa=vn.now())+Ts,vi=an=0;try{_C()}finally{vi=0,wC(),Er=0}}function CC(){var t=vn.now(),e=t-qa;e>zp&&(Ts-=e,qa=t)}function wC(){for(var t,e=Wa,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Wa=r);sn=t,cl(i)}function cl(t){if(!vi){an&&(an=clearTimeout(an));var e=t-Er;e>24?(t<1/0&&(an=setTimeout(Ph,t-vn.now()-Ts)),Ui&&(Ui=clearInterval(Ui))):(Ui||(qa=vn.now(),Ui=setInterval(CC,zp)),vi=1,Wp(Ph))}}function Nh(t,e,r){var i=new Ha;return e=e==null?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,r),i}var vC=pp("start","end","cancel","interrupt"),kC=[],Hp=0,zh=1,hl=2,ga=3,Wh=4,ul=5,ma=6;function Ms(t,e,r,i,n,a){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;SC(t,r,{name:e,index:i,group:n,on:vC,tween:kC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Hp})}function ec(t,e){var r=Se(t,e);if(r.state>Hp)throw new Error("too late; already scheduled");return r}function Re(t,e){var r=Se(t,e);if(r.state>ga)throw new Error("too late; already running");return r}function Se(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function SC(t,e,r){var i=t.__transition,n;i[e]=r,r.timer=qp(a,0,r.time);function a(l){r.state=zh,r.timer.restart(o,r.delay,r.time),r.delay<=l&&o(l-r.delay)}function o(l){var h,u,f,d;if(r.state!==zh)return c();for(h in i)if(d=i[h],d.name===r.name){if(d.state===ga)return Nh(o);d.state===Wh?(d.state=ma,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+h<e&&(d.state=ma,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[h])}if(Nh(function(){r.state===ga&&(r.state=Wh,r.timer.restart(s,r.delay,r.time),s(l))}),r.state=hl,r.on.call("start",t,t.__data__,r.index,r.group),r.state===hl){for(r.state=ga,n=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(n[++u]=d);n.length=u+1}}function s(l){for(var h=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(c),r.state=ul,1),u=-1,f=n.length;++u<f;)n[u].call(t,h);r.state===ul&&(r.on.call("end",t,t.__data__,r.index,r.group),c())}function c(){r.state=ma,r.timer.stop(),delete i[e];for(var l in i)return;delete t.__transition}}function TC(t,e){var r=t.__transition,i,n,a=!0,o;if(r){e=e==null?null:e+"";for(o in r){if((i=r[o]).name!==e){a=!1;continue}n=i.state>hl&&i.state<ul,i.state=ma,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[o]}a&&delete t.__transition}}function MC(t){return this.each(function(){TC(this,t)})}function AC(t,e){var r,i;return function(){var n=Re(this,t),a=n.tween;if(a!==r){i=r=a;for(var o=0,s=i.length;o<s;++o)if(i[o].name===e){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function LC(t,e,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=Re(this,t),o=a.tween;if(o!==i){n=(i=o).slice();for(var s={name:e,value:r},c=0,l=n.length;c<l;++c)if(n[c].name===e){n[c]=s;break}c===l&&n.push(s)}a.tween=n}}function BC(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=Se(this.node(),r).tween,n=0,a=i.length,o;n<a;++n)if((o=i[n]).name===t)return o.value;return null}return this.each((e==null?AC:LC)(r,t,e))}function rc(t,e,r){var i=t._id;return t.each(function(){var n=Re(this,i);(n.value||(n.value={}))[e]=r.apply(this,arguments)}),function(n){return Se(n,i).value[e]}}function Up(t,e){var r;return(typeof e=="number"?_e:e instanceof Br?za:(r=Br(e))?(e=r,za):Ip)(t,e)}function EC(t){return function(){this.removeAttribute(t)}}function FC(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $C(t,e,r){var i,n=r+"",a;return function(){var o=this.getAttribute(t);return o===n?null:o===i?a:a=e(i=o,r)}}function DC(t,e,r){var i,n=r+"",a;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===i?a:a=e(i=o,r)}}function OC(t,e,r){var i,n,a;return function(){var o,s=r(this),c;return s==null?void this.removeAttribute(t):(o=this.getAttribute(t),c=s+"",o===c?null:o===i&&c===n?a:(n=c,a=e(i=o,s)))}}function RC(t,e,r){var i,n,a;return function(){var o,s=r(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),c=s+"",o===c?null:o===i&&c===n?a:(n=c,a=e(i=o,s)))}}function IC(t,e){var r=vs(t),i=r==="transform"?yC:Up;return this.attrTween(t,typeof e=="function"?(r.local?RC:OC)(r,i,rc(this,"attr."+t,e)):e==null?(r.local?FC:EC)(r):(r.local?DC:$C)(r,i,e))}function PC(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function NC(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function zC(t,e){var r,i;function n(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&NC(t,a)),r}return n._value=e,n}function WC(t,e){var r,i;function n(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&PC(t,a)),r}return n._value=e,n}function qC(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var i=vs(t);return this.tween(r,(i.local?zC:WC)(i,e))}function HC(t,e){return function(){ec(this,t).delay=+e.apply(this,arguments)}}function UC(t,e){return e=+e,function(){ec(this,t).delay=e}}function jC(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?HC:UC)(e,t)):Se(this.node(),e).delay}function YC(t,e){return function(){Re(this,t).duration=+e.apply(this,arguments)}}function GC(t,e){return e=+e,function(){Re(this,t).duration=e}}function VC(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?YC:GC)(e,t)):Se(this.node(),e).duration}function XC(t,e){if(typeof e!="function")throw new Error;return function(){Re(this,t).ease=e}}function ZC(t){var e=this._id;return arguments.length?this.each(XC(e,t)):Se(this.node(),e).ease}function KC(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Re(this,t).ease=r}}function QC(t){if(typeof t!="function")throw new Error;return this.each(KC(this._id,t))}function JC(t){typeof t!="function"&&(t=yp(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a=e[n],o=a.length,s=i[n]=[],c,l=0;l<o;++l)(c=a[l])&&t.call(c,c.__data__,l,a)&&s.push(c);return new Je(i,this._parents,this._name,this._id)}function tw(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,a=Math.min(i,n),o=new Array(i),s=0;s<a;++s)for(var c=e[s],l=r[s],h=c.length,u=o[s]=new Array(h),f,d=0;d<h;++d)(f=c[d]||l[d])&&(u[d]=f);for(;s<i;++s)o[s]=e[s];return new Je(o,this._parents,this._name,this._id)}function ew(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function rw(t,e,r){var i,n,a=ew(e)?ec:Re;return function(){var o=a(this,t),s=o.on;s!==i&&(n=(i=s).copy()).on(e,r),o.on=n}}function iw(t,e){var r=this._id;return arguments.length<2?Se(this.node(),r).on.on(t):this.each(rw(r,t,e))}function nw(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function aw(){return this.on("end.remove",nw(this._id))}function sw(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Kl(t));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o)for(var s=i[o],c=s.length,l=a[o]=new Array(c),h,u,f=0;f<c;++f)(h=s[f])&&(u=t.call(h,h.__data__,f,s))&&("__data__"in h&&(u.__data__=h.__data__),l[f]=u,Ms(l[f],e,r,f,l,Se(h,r)));return new Je(a,this._parents,e,r)}function ow(t){var e=this._name,r=this._id;typeof t!="function"&&(t=mp(t));for(var i=this._groups,n=i.length,a=[],o=[],s=0;s<n;++s)for(var c=i[s],l=c.length,h,u=0;u<l;++u)if(h=c[u]){for(var f=t.call(h,h.__data__,u,c),d,p=Se(h,r),m=0,y=f.length;m<y;++m)(d=f[m])&&Ms(d,e,r,m,f,p);a.push(f),o.push(h)}return new Je(a,o,e,r)}var lw=Fn.prototype.constructor;function cw(){return new lw(this._groups,this._parents)}function hw(t,e){var r,i,n;return function(){var a=wi(this,t),o=(this.style.removeProperty(t),wi(this,t));return a===o?null:a===r&&o===i?n:n=e(r=a,i=o)}}function jp(t){return function(){this.style.removeProperty(t)}}function uw(t,e,r){var i,n=r+"",a;return function(){var o=wi(this,t);return o===n?null:o===i?a:a=e(i=o,r)}}function fw(t,e,r){var i,n,a;return function(){var o=wi(this,t),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(t),wi(this,t))),o===c?null:o===i&&c===n?a:(n=c,a=e(i=o,s))}}function dw(t,e){var r,i,n,a="style."+e,o="end."+a,s;return function(){var c=Re(this,t),l=c.on,h=c.value[a]==null?s||(s=jp(e)):void 0;(l!==r||n!==h)&&(i=(r=l).copy()).on(o,n=h),c.on=i}}function pw(t,e,r){var i=(t+="")=="transform"?mC:Up;return e==null?this.styleTween(t,hw(t,i)).on("end.style."+t,jp(t)):typeof e=="function"?this.styleTween(t,fw(t,i,rc(this,"style."+t,e))).each(dw(this._id,t)):this.styleTween(t,uw(t,i,e),r).on("end.style."+t,null)}function gw(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function mw(t,e,r){var i,n;function a(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&gw(t,o,r)),i}return a._value=e,a}function yw(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,mw(t,e,r??""))}function xw(t){return function(){this.textContent=t}}function bw(t){return function(){var e=t(this);this.textContent=e??""}}function _w(t){return this.tween("text",typeof t=="function"?bw(rc(this,"text",t)):xw(t==null?"":t+""))}function Cw(t){return function(e){this.textContent=t.call(this,e)}}function ww(t){var e,r;function i(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&Cw(n)),e}return i._value=t,i}function vw(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,ww(t))}function kw(){for(var t=this._name,e=this._id,r=Yp(),i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var h=Se(c,e);Ms(c,t,r,l,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Je(i,this._parents,t,r)}function Sw(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--n===0&&a()}};r.each(function(){var l=Re(this,i),h=l.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),l.on=e}),n===0&&a()})}var Tw=0;function Je(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Yp(){return++Tw}var qe=Fn.prototype;Je.prototype={constructor:Je,select:sw,selectAll:ow,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:JC,merge:tw,selection:cw,transition:kw,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:iw,attr:IC,attrTween:qC,style:pw,styleTween:yw,text:_w,textTween:vw,remove:aw,tween:BC,delay:jC,duration:VC,ease:ZC,easeVarying:QC,end:Sw,[Symbol.iterator]:qe[Symbol.iterator]};function Mw(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Aw={time:null,delay:0,duration:250,ease:Mw};function Lw(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 Bw(t){var e,r;t instanceof Je?(e=t._id,t=t._name):(e=Yp(),(r=Aw).time=tc(),t=t==null?null:t+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Ms(c,t,e,l,o,r||Lw(c,e));return new Je(i,this._parents,t,e)}Fn.prototype.interrupt=MC;Fn.prototype.transition=Bw;const fl=Math.PI,dl=2*fl,xr=1e-6,Ew=dl-xr;function Gp(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function Fw(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Gp;const r=10**e;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class $w{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Gp:Fw(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,i,n){this._append`Q${+e},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(e,r,i,n,a,o){this._append`C${+e},${+r},${+i},${+n},${this._x1=+a},${this._y1=+o}`}arcTo(e,r,i,n,a){if(e=+e,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=i-e,l=n-r,h=o-e,u=s-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(f>xr)if(!(Math.abs(u*c-l*h)>xr)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let d=i-o,p=n-s,m=c*c+l*l,y=d*d+p*p,x=Math.sqrt(m),b=Math.sqrt(f),C=a*Math.tan((fl-Math.acos((m+f-y)/(2*x*b)))/2),v=C/b,w=C/x;Math.abs(v-1)>xr&&this._append`L${e+v*h},${r+v*u}`,this._append`A${a},${a},0,0,${+(u*d>h*p)},${this._x1=e+w*c},${this._y1=r+w*l}`}}arc(e,r,i,n,a,o){if(e=+e,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),c=i*Math.sin(n),l=e+s,h=r+c,u=1^o,f=o?n-a:a-n;this._x1===null?this._append`M${l},${h}`:(Math.abs(this._x1-l)>xr||Math.abs(this._y1-h)>xr)&&this._append`L${l},${h}`,i&&(f<0&&(f=f%dl+dl),f>Ew?this._append`A${i},${i},0,1,${u},${e-s},${r-c}A${i},${i},0,1,${u},${this._x1=l},${this._y1=h}`:f>xr&&this._append`A${i},${i},0,${+(f>=fl)},${u},${this._x1=e+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(e,r,i,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Dw(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ua(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function ki(t){return t=Ua(Math.abs(t)),t?t[1]:NaN}function Ow(t,e){return function(r,i){for(var n=r.length,a=[],o=0,s=t[0],c=0;n>0&&s>0&&(c+s+1>i&&(s=Math.max(1,i-c)),a.push(r.substring(n-=s,n+s)),!((c+=s+1)>i));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function Rw(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var Iw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ja(t){if(!(e=Iw.exec(t)))throw new Error("invalid format: "+t);var e;return new ic({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]})}ja.prototype=ic.prototype;function ic(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}ic.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Pw(t){t:for(var e=t.length,r=1,i=-1,n;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(n+1):t}var Vp;function Nw(t,e){var r=Ua(t,e);if(!r)return t+"";var i=r[0],n=r[1],a=n-(Vp=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Ua(t,Math.max(0,e+a-1))[0]}function qh(t,e){var r=Ua(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}const Hh={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Dw,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)=>qh(t*100,e),r:qh,s:Nw,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Uh(t){return t}var jh=Array.prototype.map,Yh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zw(t){var e=t.grouping===void 0||t.thousands===void 0?Uh:Ow(jh.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",n=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?Uh:Rw(jh.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function l(u){u=ja(u);var f=u.fill,d=u.align,p=u.sign,m=u.symbol,y=u.zero,x=u.width,b=u.comma,C=u.precision,v=u.trim,w=u.type;w==="n"?(b=!0,w="g"):Hh[w]||(C===void 0&&(C=12),v=!0,w="g"),(y||f==="0"&&d==="=")&&(y=!0,f="0",d="=");var _=m==="$"?r:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k=m==="$"?i:/[%p]/.test(w)?o:"",O=Hh[w],N=/[defgprs%]/.test(w);C=C===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function D(T){var R=_,L=k,M,F,B;if(w==="c")L=O(T)+L,T="";else{T=+T;var $=T<0||1/T<0;if(T=isNaN(T)?c:O(Math.abs(T),C),v&&(T=Pw(T)),$&&+T==0&&p!=="+"&&($=!1),R=($?p==="("?p:s:p==="-"||p==="("?"":p)+R,L=(w==="s"?Yh[8+Vp/3]:"")+L+($&&p==="("?")":""),N){for(M=-1,F=T.length;++M<F;)if(B=T.charCodeAt(M),48>B||B>57){L=(B===46?n+T.slice(M+1):T.slice(M))+L,T=T.slice(0,M);break}}}b&&!y&&(T=e(T,1/0));var E=R.length+T.length+L.length,q=E<x?new Array(x-E+1).join(f):"";switch(b&&y&&(T=e(q+T,q.length?x-L.length:1/0),q=""),d){case"<":T=R+T+L+q;break;case"=":T=R+q+T+L;break;case"^":T=q.slice(0,E=q.length>>1)+R+T+L+q.slice(E);break;default:T=q+R+T+L;break}return a(T)}return D.toString=function(){return u+""},D}function h(u,f){var d=l((u=ja(u),u.type="f",u)),p=Math.max(-8,Math.min(8,Math.floor(ki(f)/3)))*3,m=Math.pow(10,-p),y=Yh[8+p/3];return function(x){return d(m*x)+y}}return{format:l,formatPrefix:h}}var Qn,Xp,Zp;Ww({thousands:",",grouping:[3],currency:["$",""]});function Ww(t){return Qn=zw(t),Xp=Qn.format,Zp=Qn.formatPrefix,Qn}function qw(t){return Math.max(0,-ki(Math.abs(t)))}function Hw(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ki(e)/3)))*3-ki(Math.abs(t)))}function Uw(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ki(e)-ki(t))+1}function jw(t){var e=0,r=t.children,i=r&&r.length;if(!i)e=1;else for(;--i>=0;)e+=r[i].value;t.value=e}function Yw(){return this.eachAfter(jw)}function Gw(t,e){let r=-1;for(const i of this)t.call(e,i,++r,this);return this}function Vw(t,e){for(var r=this,i=[r],n,a,o=-1;r=i.pop();)if(t.call(e,r,++o,this),n=r.children)for(a=n.length-1;a>=0;--a)i.push(n[a]);return this}function Xw(t,e){for(var r=this,i=[r],n=[],a,o,s,c=-1;r=i.pop();)if(n.push(r),a=r.children)for(o=0,s=a.length;o<s;++o)i.push(a[o]);for(;r=n.pop();)t.call(e,r,++c,this);return this}function Zw(t,e){let r=-1;for(const i of this)if(t.call(e,i,++r,this))return i}function Kw(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,n=i&&i.length;--n>=0;)r+=i[n].value;e.value=r})}function Qw(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function Jw(t){for(var e=this,r=tv(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var n=i.length;t!==r;)i.splice(n,0,t),t=t.parent;return i}function tv(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),n=null;for(t=r.pop(),e=i.pop();t===e;)n=t,t=r.pop(),e=i.pop();return n}function ev(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function rv(){return Array.from(this)}function iv(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function nv(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function*av(){var t=this,e,r=[t],i,n,a;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,i=t.children)for(n=0,a=i.length;n<a;++n)r.push(i[n]);while(r.length)}function Kp(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=lv)):e===void 0&&(e=ov);for(var r=new Ya(t),i,n=[r],a,o,s,c;i=n.pop();)if((o=e(i.data))&&(c=(o=Array.from(o)).length))for(i.children=o,s=c-1;s>=0;--s)n.push(a=o[s]=new Ya(o[s])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(hv)}function sv(){return Kp(this).eachBefore(cv)}function ov(t){return t.children}function lv(t){return Array.isArray(t)?t[1]:null}function cv(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function hv(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Ya(t){this.data=t,this.depth=this.height=0,this.parent=null}Ya.prototype=Kp.prototype={constructor:Ya,count:Yw,each:Gw,eachAfter:Xw,eachBefore:Vw,find:Zw,sum:Kw,sort:Qw,path:Jw,ancestors:ev,descendants:rv,leaves:iv,links:nv,copy:sv,[Symbol.iterator]:av};function uv(t){if(typeof t!="function")throw new Error;return t}function ji(){return 0}function Yi(t){return function(){return t}}function fv(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 dv(t,e,r,i,n){for(var a=t.children,o,s=-1,c=a.length,l=t.value&&(i-e)/t.value;++s<c;)o=a[s],o.y0=r,o.y1=n,o.x0=e,o.x1=e+=o.value*l}function pv(t,e,r,i,n){for(var a=t.children,o,s=-1,c=a.length,l=t.value&&(n-r)/t.value;++s<c;)o=a[s],o.x0=e,o.x1=i,o.y0=r,o.y1=r+=o.value*l}var gv=(1+Math.sqrt(5))/2;function mv(t,e,r,i,n,a){for(var o=[],s=e.children,c,l,h=0,u=0,f=s.length,d,p,m=e.value,y,x,b,C,v,w,_;h<f;){d=n-r,p=a-i;do y=s[u++].value;while(!y&&u<f);for(x=b=y,w=Math.max(p/d,d/p)/(m*t),_=y*y*w,v=Math.max(b/_,_/x);u<f;++u){if(y+=l=s[u].value,l<x&&(x=l),l>b&&(b=l),_=y*y*w,C=Math.max(b/_,_/x),C>v){y-=l;break}v=C}o.push(c={value:y,dice:d<p,children:s.slice(h,u)}),c.dice?dv(c,r,i,n,m?i+=p*y/m:a):pv(c,r,i,m?r+=d*y/m:n,a),m-=y,h=u}return o}const yv=function t(e){function r(i,n,a,o,s){mv(e,i,n,a,o,s)}return r.ratio=function(i){return t((i=+i)>1?i:1)},r}(gv);function t$(){var t=yv,e=!1,r=1,i=1,n=[0],a=ji,o=ji,s=ji,c=ji,l=ji;function h(f){return f.x0=f.y0=0,f.x1=r,f.y1=i,f.eachBefore(u),n=[0],e&&f.eachBefore(fv),f}function u(f){var d=n[f.depth],p=f.x0+d,m=f.y0+d,y=f.x1-d,x=f.y1-d;y<p&&(p=y=(p+y)/2),x<m&&(m=x=(m+x)/2),f.x0=p,f.y0=m,f.x1=y,f.y1=x,f.children&&(d=n[f.depth+1]=a(f)/2,p+=l(f)-d,m+=o(f)-d,y-=s(f)-d,x-=c(f)-d,y<p&&(p=y=(p+y)/2),x<m&&(m=x=(m+x)/2),t(f,p,m,y,x))}return h.round=function(f){return arguments.length?(e=!!f,h):e},h.size=function(f){return arguments.length?(r=+f[0],i=+f[1],h):[r,i]},h.tile=function(f){return arguments.length?(t=uv(f),h):t},h.padding=function(f){return arguments.length?h.paddingInner(f).paddingOuter(f):h.paddingInner()},h.paddingInner=function(f){return arguments.length?(a=typeof f=="function"?f:Yi(+f),h):a},h.paddingOuter=function(f){return arguments.length?h.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):h.paddingTop()},h.paddingTop=function(f){return arguments.length?(o=typeof f=="function"?f:Yi(+f),h):o},h.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Yi(+f),h):s},h.paddingBottom=function(f){return arguments.length?(c=typeof f=="function"?f:Yi(+f),h):c},h.paddingLeft=function(f){return arguments.length?(l=typeof f=="function"?f:Yi(+f),h):l},h}function As(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Gh=Symbol("implicit");function Qp(){var t=new kh,e=[],r=[],i=Gh;function n(a){let o=t.get(a);if(o===void 0){if(i!==Gh)return i;t.set(a,o=e.push(a)-1)}return r[o%r.length]}return n.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new kh;for(const o of a)t.has(o)||t.set(o,e.push(o)-1);return n},n.range=function(a){return arguments.length?(r=Array.from(a),n):r.slice()},n.unknown=function(a){return arguments.length?(i=a,n):i},n.copy=function(){return Qp(e,r).unknown(i)},As.apply(n,arguments),n}function xv(){var t=Qp().unknown(void 0),e=t.domain,r=t.range,i=0,n=1,a,o,s=!1,c=0,l=0,h=.5;delete t.unknown;function u(){var f=e().length,d=n<i,p=d?n:i,m=d?i:n;a=(m-p)/Math.max(1,f-c+l*2),s&&(a=Math.floor(a)),p+=(m-p-a*(f-c))*h,o=a*(1-c),s&&(p=Math.round(p),o=Math.round(o));var y=J1(f).map(function(x){return p+a*x});return r(d?y.reverse():y)}return t.domain=function(f){return arguments.length?(e(f),u()):e()},t.range=function(f){return arguments.length?([i,n]=f,i=+i,n=+n,u()):[i,n]},t.rangeRound=function(f){return[i,n]=f,i=+i,n=+n,s=!0,u()},t.bandwidth=function(){return o},t.step=function(){return a},t.round=function(f){return arguments.length?(s=!!f,u()):s},t.padding=function(f){return arguments.length?(c=Math.min(1,l=+f),u()):c},t.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),u()):c},t.paddingOuter=function(f){return arguments.length?(l=+f,u()):l},t.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),u()):h},t.copy=function(){return xv(e(),[i,n]).round(s).paddingInner(c).paddingOuter(l).align(h)},As.apply(u(),arguments)}function bv(t){return function(){return t}}function _v(t){return+t}var Vh=[0,1];function ti(t){return t}function pl(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:bv(isNaN(e)?NaN:.5)}function Cv(t,e){var r;return t>e&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function wv(t,e,r){var i=t[0],n=t[1],a=e[0],o=e[1];return n<i?(i=pl(n,i),a=r(o,a)):(i=pl(i,n),a=r(a,o)),function(s){return a(i(s))}}function vv(t,e,r){var i=Math.min(t.length,e.length)-1,n=new Array(i),a=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)n[o]=pl(t[o],t[o+1]),a[o]=r(e[o],e[o+1]);return function(s){var c=j1(t,s,1,i)-1;return a[c](n[c](s))}}function Jp(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function kv(){var t=Vh,e=Vh,r=Jl,i,n,a,o=ti,s,c,l;function h(){var f=Math.min(t.length,e.length);return o!==ti&&(o=Cv(t[0],t[f-1])),s=f>2?vv:wv,c=l=null,u}function u(f){return f==null||isNaN(f=+f)?a:(c||(c=s(t.map(i),e,r)))(i(o(f)))}return u.invert=function(f){return o(n((l||(l=s(e,t.map(i),_e)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,_v),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),r=dC,h()},u.clamp=function(f){return arguments.length?(o=f?!0:ti,h()):o!==ti},u.interpolate=function(f){return arguments.length?(r=f,h()):r},u.unknown=function(f){return arguments.length?(a=f,u):a},function(f,d){return i=f,n=d,h()}}function tg(){return kv()(ti,ti)}function Sv(t,e,r,i){var n=rl(t,e,r),a;switch(i=ja(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(a=Hw(n,o))&&(i.precision=a),Zp(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Uw(n,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=qw(n))&&(i.precision=a-(i.type==="%")*2);break}}return Xp(i)}function Tv(t){var e=t.domain;return t.ticks=function(r){var i=e();return Q1(i[0],i[i.length-1],r??10)},t.tickFormat=function(r,i){var n=e();return Sv(n[0],n[n.length-1],r??10,i)},t.nice=function(r){r==null&&(r=10);var i=e(),n=0,a=i.length-1,o=i[n],s=i[a],c,l,h=10;for(s<o&&(l=o,o=s,s=l,l=n,n=a,a=l);h-- >0;){if(l=el(o,s,r),l===c)return i[n]=o,i[a]=s,e(i);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return t},t}function Mv(){var t=tg();return t.copy=function(){return Jp(t,Mv())},As.apply(t,arguments),Tv(t)}function Av(t,e){t=t.slice();var r=0,i=t.length-1,n=t[r],a=t[i],o;return a<n&&(o=r,r=i,i=o,o=n,n=a,a=o),t[r]=e.floor(n),t[i]=e.ceil(a),t}const po=new Date,go=new Date;function Rt(t,e,r,i){function n(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return n.floor=a=>(t(a=new Date(+a)),a),n.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),n.round=a=>{const o=n(a),s=n.ceil(a);return a-o<s-a?o:s},n.offset=(a,o)=>(e(a=new Date(+a),o==null?1:Math.floor(o)),a),n.range=(a,o,s)=>{const c=[];if(a=n.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;let l;do c.push(l=new Date(+a)),e(a,s),t(a);while(l<a&&a<o);return c},n.filter=a=>Rt(o=>{if(o>=o)for(;t(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;e(o,-1),!a(o););else for(;--s>=0;)for(;e(o,1),!a(o););}),r&&(n.count=(a,o)=>(po.setTime(+a),go.setTime(+o),t(po),t(go),Math.floor(r(po,go))),n.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?n.filter(i?o=>i(o)%a===0:o=>n.count(0,o)%a===0):n)),n}const Ga=Rt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ga.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Rt(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Ga);Ga.range;const Ge=1e3,me=Ge*60,Ve=me*60,tr=Ve*24,nc=tr*7,Xh=tr*30,mo=tr*365,ei=Rt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Ge)},(t,e)=>(e-t)/Ge,t=>t.getUTCSeconds());ei.range;const ac=Rt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ge)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getMinutes());ac.range;const Lv=Rt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getUTCMinutes());Lv.range;const sc=Rt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ge-t.getMinutes()*me)},(t,e)=>{t.setTime(+t+e*Ve)},(t,e)=>(e-t)/Ve,t=>t.getHours());sc.range;const Bv=Rt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Ve)},(t,e)=>(e-t)/Ve,t=>t.getUTCHours());Bv.range;const Dn=Rt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*me)/tr,t=>t.getDate()-1);Dn.range;const oc=Rt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/tr,t=>t.getUTCDate()-1);oc.range;const Ev=Rt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/tr,t=>Math.floor(t/tr));Ev.range;function Ir(t){return Rt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*me)/nc)}const Ls=Ir(0),Va=Ir(1),Fv=Ir(2),$v=Ir(3),Si=Ir(4),Dv=Ir(5),Ov=Ir(6);Ls.range;Va.range;Fv.range;$v.range;Si.range;Dv.range;Ov.range;function Pr(t){return Rt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/nc)}const eg=Pr(0),Xa=Pr(1),Rv=Pr(2),Iv=Pr(3),Ti=Pr(4),Pv=Pr(5),Nv=Pr(6);eg.range;Xa.range;Rv.range;Iv.range;Ti.range;Pv.range;Nv.range;const lc=Rt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());lc.range;const zv=Rt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());zv.range;const er=Rt(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());er.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Rt(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)});er.range;const Fr=Rt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Fr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Rt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});Fr.range;function Wv(t,e,r,i,n,a){const o=[[ei,1,Ge],[ei,5,5*Ge],[ei,15,15*Ge],[ei,30,30*Ge],[a,1,me],[a,5,5*me],[a,15,15*me],[a,30,30*me],[n,1,Ve],[n,3,3*Ve],[n,6,6*Ve],[n,12,12*Ve],[i,1,tr],[i,2,2*tr],[r,1,nc],[e,1,Xh],[e,3,3*Xh],[t,1,mo]];function s(l,h,u){const f=h<l;f&&([l,h]=[h,l]);const d=u&&typeof u.range=="function"?u:c(l,h,u),p=d?d.range(l,+h+1):[];return f?p.reverse():p}function c(l,h,u){const f=Math.abs(h-l)/u,d=Zl(([,,y])=>y).right(o,f);if(d===o.length)return t.every(rl(l/mo,h/mo,u));if(d===0)return Ga.every(Math.max(rl(l,h,u),1));const[p,m]=o[f/o[d-1][2]<o[d][2]/f?d-1:d];return p.every(m)}return[s,c]}const[qv,Hv]=Wv(er,lc,Ls,Dn,sc,ac);function yo(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 xo(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 Gi(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Uv(t){var e=t.dateTime,r=t.date,i=t.time,n=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,l=Vi(n),h=Xi(n),u=Vi(a),f=Xi(a),d=Vi(o),p=Xi(o),m=Vi(s),y=Xi(s),x=Vi(c),b=Xi(c),C={a:$,A:E,b:q,B:j,c:null,d:eu,e:eu,f:dk,g:vk,G:Sk,H:hk,I:uk,j:fk,L:rg,m:pk,M:gk,p:U,q:pt,Q:nu,s:au,S:mk,u:yk,U:xk,V:bk,w:_k,W:Ck,x:null,X:null,y:wk,Y:kk,Z:Tk,"%":iu},v={a:ht,A:vt,b:nt,B:lt,c:null,d:ru,e:ru,f:Bk,g:zk,G:qk,H:Mk,I:Ak,j:Lk,L:ng,m:Ek,M:Fk,p:ut,q:Ct,Q:nu,s:au,S:$k,u:Dk,U:Ok,V:Rk,w:Ik,W:Pk,x:null,X:null,y:Nk,Y:Wk,Z:Hk,"%":iu},w={a:D,A:T,b:R,B:L,c:M,d:Jh,e:Jh,f:sk,g:Qh,G:Kh,H:tu,I:tu,j:rk,L:ak,m:ek,M:ik,p:N,q:tk,Q:lk,s:ck,S:nk,u:Xv,U:Zv,V:Kv,w:Vv,W:Qv,x:F,X:B,y:Qh,Y:Kh,Z:Jv,"%":ok};C.x=_(r,C),C.X=_(i,C),C.c=_(e,C),v.x=_(r,v),v.X=_(i,v),v.c=_(e,v);function _(z,Y){return function(et){var P=[],St=-1,ft=0,Nt=z.length,zt,ae,gr;for(et instanceof Date||(et=new Date(+et));++St<Nt;)z.charCodeAt(St)===37&&(P.push(z.slice(ft,St)),(ae=Zh[zt=z.charAt(++St)])!=null?zt=z.charAt(++St):ae=zt==="e"?" ":"0",(gr=Y[zt])&&(zt=gr(et,ae)),P.push(zt),ft=St+1);return P.push(z.slice(ft,St)),P.join("")}}function k(z,Y){return function(et){var P=Gi(1900,void 0,1),St=O(P,z,et+="",0),ft,Nt;if(St!=et.length)return null;if("Q"in P)return new Date(P.Q);if("s"in P)return new Date(P.s*1e3+("L"in P?P.L:0));if(Y&&!("Z"in P)&&(P.Z=0),"p"in P&&(P.H=P.H%12+P.p*12),P.m===void 0&&(P.m="q"in P?P.q:0),"V"in P){if(P.V<1||P.V>53)return null;"w"in P||(P.w=1),"Z"in P?(ft=xo(Gi(P.y,0,1)),Nt=ft.getUTCDay(),ft=Nt>4||Nt===0?Xa.ceil(ft):Xa(ft),ft=oc.offset(ft,(P.V-1)*7),P.y=ft.getUTCFullYear(),P.m=ft.getUTCMonth(),P.d=ft.getUTCDate()+(P.w+6)%7):(ft=yo(Gi(P.y,0,1)),Nt=ft.getDay(),ft=Nt>4||Nt===0?Va.ceil(ft):Va(ft),ft=Dn.offset(ft,(P.V-1)*7),P.y=ft.getFullYear(),P.m=ft.getMonth(),P.d=ft.getDate()+(P.w+6)%7)}else("W"in P||"U"in P)&&("w"in P||(P.w="u"in P?P.u%7:"W"in P?1:0),Nt="Z"in P?xo(Gi(P.y,0,1)).getUTCDay():yo(Gi(P.y,0,1)).getDay(),P.m=0,P.d="W"in P?(P.w+6)%7+P.W*7-(Nt+5)%7:P.w+P.U*7-(Nt+6)%7);return"Z"in P?(P.H+=P.Z/100|0,P.M+=P.Z%100,xo(P)):yo(P)}}function O(z,Y,et,P){for(var St=0,ft=Y.length,Nt=et.length,zt,ae;St<ft;){if(P>=Nt)return-1;if(zt=Y.charCodeAt(St++),zt===37){if(zt=Y.charAt(St++),ae=w[zt in Zh?Y.charAt(St++):zt],!ae||(P=ae(z,et,P))<0)return-1}else if(zt!=et.charCodeAt(P++))return-1}return P}function N(z,Y,et){var P=l.exec(Y.slice(et));return P?(z.p=h.get(P[0].toLowerCase()),et+P[0].length):-1}function D(z,Y,et){var P=d.exec(Y.slice(et));return P?(z.w=p.get(P[0].toLowerCase()),et+P[0].length):-1}function T(z,Y,et){var P=u.exec(Y.slice(et));return P?(z.w=f.get(P[0].toLowerCase()),et+P[0].length):-1}function R(z,Y,et){var P=x.exec(Y.slice(et));return P?(z.m=b.get(P[0].toLowerCase()),et+P[0].length):-1}function L(z,Y,et){var P=m.exec(Y.slice(et));return P?(z.m=y.get(P[0].toLowerCase()),et+P[0].length):-1}function M(z,Y,et){return O(z,e,Y,et)}function F(z,Y,et){return O(z,r,Y,et)}function B(z,Y,et){return O(z,i,Y,et)}function $(z){return o[z.getDay()]}function E(z){return a[z.getDay()]}function q(z){return c[z.getMonth()]}function j(z){return s[z.getMonth()]}function U(z){return n[+(z.getHours()>=12)]}function pt(z){return 1+~~(z.getMonth()/3)}function ht(z){return o[z.getUTCDay()]}function vt(z){return a[z.getUTCDay()]}function nt(z){return c[z.getUTCMonth()]}function lt(z){return s[z.getUTCMonth()]}function ut(z){return n[+(z.getUTCHours()>=12)]}function Ct(z){return 1+~~(z.getUTCMonth()/3)}return{format:function(z){var Y=_(z+="",C);return Y.toString=function(){return z},Y},parse:function(z){var Y=k(z+="",!1);return Y.toString=function(){return z},Y},utcFormat:function(z){var Y=_(z+="",v);return Y.toString=function(){return z},Y},utcParse:function(z){var Y=k(z+="",!0);return Y.toString=function(){return z},Y}}}var Zh={"-":"",_:" ",0:"0"},Pt=/^\s*\d+/,jv=/^%/,Yv=/[\\^$*+?|[\]().{}]/g;function yt(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",a=n.length;return i+(a<r?new Array(r-a+1).join(e)+n:n)}function Gv(t){return t.replace(Yv,"\\$&")}function Vi(t){return new RegExp("^(?:"+t.map(Gv).join("|")+")","i")}function Xi(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function Vv(t,e,r){var i=Pt.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function Xv(t,e,r){var i=Pt.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function Zv(t,e,r){var i=Pt.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function Kv(t,e,r){var i=Pt.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function Qv(t,e,r){var i=Pt.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function Kh(t,e,r){var i=Pt.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function Qh(t,e,r){var i=Pt.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function Jv(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 tk(t,e,r){var i=Pt.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function ek(t,e,r){var i=Pt.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function Jh(t,e,r){var i=Pt.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function rk(t,e,r){var i=Pt.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function tu(t,e,r){var i=Pt.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function ik(t,e,r){var i=Pt.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function nk(t,e,r){var i=Pt.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function ak(t,e,r){var i=Pt.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function sk(t,e,r){var i=Pt.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function ok(t,e,r){var i=jv.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function lk(t,e,r){var i=Pt.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function ck(t,e,r){var i=Pt.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function eu(t,e){return yt(t.getDate(),e,2)}function hk(t,e){return yt(t.getHours(),e,2)}function uk(t,e){return yt(t.getHours()%12||12,e,2)}function fk(t,e){return yt(1+Dn.count(er(t),t),e,3)}function rg(t,e){return yt(t.getMilliseconds(),e,3)}function dk(t,e){return rg(t,e)+"000"}function pk(t,e){return yt(t.getMonth()+1,e,2)}function gk(t,e){return yt(t.getMinutes(),e,2)}function mk(t,e){return yt(t.getSeconds(),e,2)}function yk(t){var e=t.getDay();return e===0?7:e}function xk(t,e){return yt(Ls.count(er(t)-1,t),e,2)}function ig(t){var e=t.getDay();return e>=4||e===0?Si(t):Si.ceil(t)}function bk(t,e){return t=ig(t),yt(Si.count(er(t),t)+(er(t).getDay()===4),e,2)}function _k(t){return t.getDay()}function Ck(t,e){return yt(Va.count(er(t)-1,t),e,2)}function wk(t,e){return yt(t.getFullYear()%100,e,2)}function vk(t,e){return t=ig(t),yt(t.getFullYear()%100,e,2)}function kk(t,e){return yt(t.getFullYear()%1e4,e,4)}function Sk(t,e){var r=t.getDay();return t=r>=4||r===0?Si(t):Si.ceil(t),yt(t.getFullYear()%1e4,e,4)}function Tk(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+yt(e/60|0,"0",2)+yt(e%60,"0",2)}function ru(t,e){return yt(t.getUTCDate(),e,2)}function Mk(t,e){return yt(t.getUTCHours(),e,2)}function Ak(t,e){return yt(t.getUTCHours()%12||12,e,2)}function Lk(t,e){return yt(1+oc.count(Fr(t),t),e,3)}function ng(t,e){return yt(t.getUTCMilliseconds(),e,3)}function Bk(t,e){return ng(t,e)+"000"}function Ek(t,e){return yt(t.getUTCMonth()+1,e,2)}function Fk(t,e){return yt(t.getUTCMinutes(),e,2)}function $k(t,e){return yt(t.getUTCSeconds(),e,2)}function Dk(t){var e=t.getUTCDay();return e===0?7:e}function Ok(t,e){return yt(eg.count(Fr(t)-1,t),e,2)}function ag(t){var e=t.getUTCDay();return e>=4||e===0?Ti(t):Ti.ceil(t)}function Rk(t,e){return t=ag(t),yt(Ti.count(Fr(t),t)+(Fr(t).getUTCDay()===4),e,2)}function Ik(t){return t.getUTCDay()}function Pk(t,e){return yt(Xa.count(Fr(t)-1,t),e,2)}function Nk(t,e){return yt(t.getUTCFullYear()%100,e,2)}function zk(t,e){return t=ag(t),yt(t.getUTCFullYear()%100,e,2)}function Wk(t,e){return yt(t.getUTCFullYear()%1e4,e,4)}function qk(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Ti(t):Ti.ceil(t),yt(t.getUTCFullYear()%1e4,e,4)}function Hk(){return"+0000"}function iu(){return"%"}function nu(t){return+t}function au(t){return Math.floor(+t/1e3)}var Xr,sg;Uk({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Uk(t){return Xr=Uv(t),sg=Xr.format,Xr.parse,Xr.utcFormat,Xr.utcParse,Xr}function jk(t){return new Date(t)}function Yk(t){return t instanceof Date?+t:+new Date(+t)}function og(t,e,r,i,n,a,o,s,c,l){var h=tg(),u=h.invert,f=h.domain,d=l(".%L"),p=l(":%S"),m=l("%I:%M"),y=l("%I %p"),x=l("%a %d"),b=l("%b %d"),C=l("%B"),v=l("%Y");function w(_){return(c(_)<_?d:s(_)<_?p:o(_)<_?m:a(_)<_?y:i(_)<_?n(_)<_?x:b:r(_)<_?C:v)(_)}return h.invert=function(_){return new Date(u(_))},h.domain=function(_){return arguments.length?f(Array.from(_,Yk)):f().map(jk)},h.ticks=function(_){var k=f();return t(k[0],k[k.length-1],_??10)},h.tickFormat=function(_,k){return k==null?w:l(k)},h.nice=function(_){var k=f();return(!_||typeof _.range!="function")&&(_=e(k[0],k[k.length-1],_??10)),_?f(Av(k,_)):h},h.copy=function(){return Jp(h,og(t,e,r,i,n,a,o,s,c,l))},h}function e$(){return As.apply(og(qv,Hv,er,lc,Ls,Dn,sc,ac,ei,sg).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Gk(t){for(var e=t.length/6|0,r=new Array(e),i=0;i<e;)r[i]="#"+t.slice(i*6,++i*6);return r}const r$=Gk("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Lt(t){return function(){return t}}const su=Math.abs,Yt=Math.atan2,yr=Math.cos,Vk=Math.max,bo=Math.min,Ae=Math.sin,ri=Math.sqrt,Vt=1e-12,kn=Math.PI,Za=kn/2,ya=2*kn;function Xk(t){return t>1?0:t<-1?kn:Math.acos(t)}function ou(t){return t>=1?Za:t<=-1?-Za:Math.asin(t)}function lg(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new $w(e)}function Zk(t){return t.innerRadius}function Kk(t){return t.outerRadius}function Qk(t){return t.startAngle}function Jk(t){return t.endAngle}function tS(t){return t&&t.padAngle}function eS(t,e,r,i,n,a,o,s){var c=r-t,l=i-e,h=o-n,u=s-a,f=u*c-h*l;if(!(f*f<Vt))return f=(h*(e-a)-u*(t-n))/f,[t+f*c,e+f*l]}function Jn(t,e,r,i,n,a,o){var s=t-r,c=e-i,l=(o?a:-a)/ri(s*s+c*c),h=l*c,u=-l*s,f=t+h,d=e+u,p=r+h,m=i+u,y=(f+p)/2,x=(d+m)/2,b=p-f,C=m-d,v=b*b+C*C,w=n-a,_=f*m-p*d,k=(C<0?-1:1)*ri(Vk(0,w*w*v-_*_)),O=(_*C-b*k)/v,N=(-_*b-C*k)/v,D=(_*C+b*k)/v,T=(-_*b+C*k)/v,R=O-y,L=N-x,M=D-y,F=T-x;return R*R+L*L>M*M+F*F&&(O=D,N=T),{cx:O,cy:N,x01:-h,y01:-u,x11:O*(n/w-1),y11:N*(n/w-1)}}function i$(){var t=Zk,e=Kk,r=Lt(0),i=null,n=Qk,a=Jk,o=tS,s=null,c=lg(l);function l(){var h,u,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=n.apply(this,arguments)-Za,m=a.apply(this,arguments)-Za,y=su(m-p),x=m>p;if(s||(s=h=c()),d<f&&(u=d,d=f,f=u),!(d>Vt))s.moveTo(0,0);else if(y>ya-Vt)s.moveTo(d*yr(p),d*Ae(p)),s.arc(0,0,d,p,m,!x),f>Vt&&(s.moveTo(f*yr(m),f*Ae(m)),s.arc(0,0,f,m,p,x));else{var b=p,C=m,v=p,w=m,_=y,k=y,O=o.apply(this,arguments)/2,N=O>Vt&&(i?+i.apply(this,arguments):ri(f*f+d*d)),D=bo(su(d-f)/2,+r.apply(this,arguments)),T=D,R=D,L,M;if(N>Vt){var F=ou(N/f*Ae(O)),B=ou(N/d*Ae(O));(_-=F*2)>Vt?(F*=x?1:-1,v+=F,w-=F):(_=0,v=w=(p+m)/2),(k-=B*2)>Vt?(B*=x?1:-1,b+=B,C-=B):(k=0,b=C=(p+m)/2)}var $=d*yr(b),E=d*Ae(b),q=f*yr(w),j=f*Ae(w);if(D>Vt){var U=d*yr(C),pt=d*Ae(C),ht=f*yr(v),vt=f*Ae(v),nt;if(y<kn)if(nt=eS($,E,ht,vt,U,pt,q,j)){var lt=$-nt[0],ut=E-nt[1],Ct=U-nt[0],z=pt-nt[1],Y=1/Ae(Xk((lt*Ct+ut*z)/(ri(lt*lt+ut*ut)*ri(Ct*Ct+z*z)))/2),et=ri(nt[0]*nt[0]+nt[1]*nt[1]);T=bo(D,(f-et)/(Y-1)),R=bo(D,(d-et)/(Y+1))}else T=R=0}k>Vt?R>Vt?(L=Jn(ht,vt,$,E,d,R,x),M=Jn(U,pt,q,j,d,R,x),s.moveTo(L.cx+L.x01,L.cy+L.y01),R<D?s.arc(L.cx,L.cy,R,Yt(L.y01,L.x01),Yt(M.y01,M.x01),!x):(s.arc(L.cx,L.cy,R,Yt(L.y01,L.x01),Yt(L.y11,L.x11),!x),s.arc(0,0,d,Yt(L.cy+L.y11,L.cx+L.x11),Yt(M.cy+M.y11,M.cx+M.x11),!x),s.arc(M.cx,M.cy,R,Yt(M.y11,M.x11),Yt(M.y01,M.x01),!x))):(s.moveTo($,E),s.arc(0,0,d,b,C,!x)):s.moveTo($,E),!(f>Vt)||!(_>Vt)?s.lineTo(q,j):T>Vt?(L=Jn(q,j,U,pt,f,-T,x),M=Jn($,E,ht,vt,f,-T,x),s.lineTo(L.cx+L.x01,L.cy+L.y01),T<D?s.arc(L.cx,L.cy,T,Yt(L.y01,L.x01),Yt(M.y01,M.x01),!x):(s.arc(L.cx,L.cy,T,Yt(L.y01,L.x01),Yt(L.y11,L.x11),!x),s.arc(0,0,f,Yt(L.cy+L.y11,L.cx+L.x11),Yt(M.cy+M.y11,M.cx+M.x11),x),s.arc(M.cx,M.cy,T,Yt(M.y11,M.x11),Yt(M.y01,M.x01),!x))):s.arc(0,0,f,w,v,x)}if(s.closePath(),h)return s=null,h+""||null}return l.centroid=function(){var h=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,u=(+n.apply(this,arguments)+ +a.apply(this,arguments))/2-kn/2;return[yr(u)*h,Ae(u)*h]},l.innerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:Lt(+h),l):t},l.outerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:Lt(+h),l):e},l.cornerRadius=function(h){return arguments.length?(r=typeof h=="function"?h:Lt(+h),l):r},l.padRadius=function(h){return arguments.length?(i=h==null?null:typeof h=="function"?h:Lt(+h),l):i},l.startAngle=function(h){return arguments.length?(n=typeof h=="function"?h:Lt(+h),l):n},l.endAngle=function(h){return arguments.length?(a=typeof h=="function"?h:Lt(+h),l):a},l.padAngle=function(h){return arguments.length?(o=typeof h=="function"?h:Lt(+h),l):o},l.context=function(h){return arguments.length?(s=h??null,l):s},l}function cg(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function hg(t){this._context=t}hg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function Ka(t){return new hg(t)}function rS(t){return t[0]}function iS(t){return t[1]}function nS(t,e){var r=Lt(!0),i=null,n=Ka,a=null,o=lg(s);t=typeof t=="function"?t:t===void 0?rS:Lt(t),e=typeof e=="function"?e:e===void 0?iS:Lt(e);function s(c){var l,h=(c=cg(c)).length,u,f=!1,d;for(i==null&&(a=n(d=o())),l=0;l<=h;++l)!(l<h&&r(u=c[l],l,c))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(u,l,c),+e(u,l,c));if(d)return a=null,d+""||null}return s.x=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),s):t},s.y=function(c){return arguments.length?(e=typeof c=="function"?c:Lt(+c),s):e},s.defined=function(c){return arguments.length?(r=typeof c=="function"?c:Lt(!!c),s):r},s.curve=function(c){return arguments.length?(n=c,i!=null&&(a=n(i)),s):n},s.context=function(c){return arguments.length?(c==null?i=a=null:a=n(i=c),s):i},s}function aS(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function sS(t){return t}function n$(){var t=sS,e=aS,r=null,i=Lt(0),n=Lt(ya),a=Lt(0);function o(s){var c,l=(s=cg(s)).length,h,u,f=0,d=new Array(l),p=new Array(l),m=+i.apply(this,arguments),y=Math.min(ya,Math.max(-ya,n.apply(this,arguments)-m)),x,b=Math.min(Math.abs(y)/l,a.apply(this,arguments)),C=b*(y<0?-1:1),v;for(c=0;c<l;++c)(v=p[d[c]=c]=+t(s[c],c,s))>0&&(f+=v);for(e!=null?d.sort(function(w,_){return e(p[w],p[_])}):r!=null&&d.sort(function(w,_){return r(s[w],s[_])}),c=0,u=f?(y-l*C)/f:0;c<l;++c,m=x)h=d[c],v=p[h],x=m+(v>0?v*u:0)+C,p[h]={data:s[h],index:c,value:v,startAngle:m,endAngle:x,padAngle:b};return p}return o.value=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),o):t},o.sortValues=function(s){return arguments.length?(e=s,r=null,o):e},o.sort=function(s){return arguments.length?(r=s,e=null,o):r},o.startAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Lt(+s),o):i},o.endAngle=function(s){return arguments.length?(n=typeof s=="function"?s:Lt(+s),o):n},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:Lt(+s),o):a},o}class ug{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function fg(t){return new ug(t,!0)}function dg(t){return new ug(t,!1)}function hr(){}function Qa(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 Bs(t){this._context=t}Bs.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:Qa(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},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:Qa(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function xa(t){return new Bs(t)}function pg(t){this._context=t}pg.prototype={areaStart:hr,areaEnd:hr,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);break}}},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:Qa(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function oS(t){return new pg(t)}function gg(t){this._context=t}gg.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||this._line!==0&&this._point===3)&&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:Qa(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function lS(t){return new gg(t)}function mg(t,e){this._basis=new Bs(t),this._beta=e}mg.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=t[0],n=e[0],a=t[r]-i,o=e[r]-n,s=-1,c;++s<=r;)c=s/r,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+c*a),this._beta*e[s]+(1-this._beta)*(n+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const cS=function t(e){function r(i){return e===1?new Bs(i):new mg(i,e)}return r.beta=function(i){return t(+i)},r}(.85);function Ja(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 cc(t,e){this._context=t,this._k=(1-e)/6}cc.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:Ja(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:Ja(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const yg=function t(e){function r(i){return new cc(i,e)}return r.tension=function(i){return t(+i)},r}(0);function hc(t,e){this._context=t,this._k=(1-e)/6}hc.prototype={areaStart:hr,areaEnd:hr,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);break}}},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:Ja(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const hS=function t(e){function r(i){return new hc(i,e)}return r.tension=function(i){return t(+i)},r}(0);function uc(t,e){this._context=t,this._k=(1-e)/6}uc.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||this._line!==0&&this._point===3)&&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:Ja(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const uS=function t(e){function r(i){return new uc(i,e)}return r.tension=function(i){return t(+i)},r}(0);function fc(t,e,r){var i=t._x1,n=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Vt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Vt){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*l+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(i,n,a,o,t._x2,t._y2)}function xg(t,e){this._context=t,this._alpha=e}xg.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);break}(this._line||this._line!==0&&this._point===1)&&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:fc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const bg=function t(e){function r(i){return e?new xg(i,e):new cc(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function _g(t,e){this._context=t,this._alpha=e}_g.prototype={areaStart:hr,areaEnd:hr,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);break}}},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:fc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const fS=function t(e){function r(i){return e?new _g(i,e):new hc(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Cg(t,e){this._context=t,this._alpha=e}Cg.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||this._line!==0&&this._point===3)&&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:fc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const dS=function t(e){function r(i){return e?new Cg(i,e):new uc(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function wg(t){this._context=t}wg.prototype={areaStart:hr,areaEnd:hr,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))}};function pS(t){return new wg(t)}function lu(t){return t<0?-1:1}function cu(t,e,r){var i=t._x1-t._x0,n=e-t._x1,a=(t._y1-t._y0)/(i||n<0&&-0),o=(r-t._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(lu(a)+lu(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function hu(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function _o(t,e,r){var i=t._x0,n=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,n+s*e,a-s,o-s*r,a,o)}function ts(t){this._context=t}ts.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:_o(this,this._t0,hu(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,_o(this,hu(this,r=cu(this,t,e)),r);break;default:_o(this,this._t0,r=cu(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function vg(t){this._context=new kg(t)}(vg.prototype=Object.create(ts.prototype)).point=function(t,e){ts.prototype.point.call(this,e,t)};function kg(t){this._context=t}kg.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,n,a){this._context.bezierCurveTo(e,t,i,r,a,n)}};function Sg(t){return new ts(t)}function Tg(t){return new vg(t)}function Mg(t){this._context=t}Mg.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]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=uu(t),n=uu(e),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],t[o],e[o]);(this._line||this._line!==0&&r===1)&&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)}};function uu(t){var e,r=t.length-1,i,n=new Array(r),a=new Array(r),o=new Array(r);for(n[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=n[e]/a[e-1],a[e]-=i,o[e]-=i*o[e-1];for(n[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)n[e]=(o[e]-n[e+1])/a[e];for(a[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-n[e+1];return[n,a]}function Ag(t){return new Mg(t)}function Es(t,e){this._context=t,this._t=e}Es.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},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)}break}}this._x=t,this._y=e}};function Lg(t){return new Es(t,.5)}function Bg(t){return new Es(t,0)}function Eg(t){return new Es(t,1)}function on(t,e,r){this.k=t,this.x=e,this.y=r}on.prototype={constructor:on,scale:function(t){return t===1?this:new on(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new on(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+")"}};on.prototype;var Fg=typeof global=="object"&&global&&global.Object===Object&&global,gS=typeof self=="object"&&self&&self.Object===Object&&self,Ie=Fg||gS||Function("return this")(),es=Ie.Symbol,$g=Object.prototype,mS=$g.hasOwnProperty,yS=$g.toString,Zi=es?es.toStringTag:void 0;function xS(t){var e=mS.call(t,Zi),r=t[Zi];try{t[Zi]=void 0;var i=!0}catch{}var n=yS.call(t);return i&&(e?t[Zi]=r:delete t[Zi]),n}var bS=Object.prototype,_S=bS.toString;function CS(t){return _S.call(t)}var wS="[object Null]",vS="[object Undefined]",fu=es?es.toStringTag:void 0;function Ei(t){return t==null?t===void 0?vS:wS:fu&&fu in Object(t)?xS(t):CS(t)}function Nr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var kS="[object AsyncFunction]",SS="[object Function]",TS="[object GeneratorFunction]",MS="[object Proxy]";function dc(t){if(!Nr(t))return!1;var e=Ei(t);return e==SS||e==TS||e==kS||e==MS}var Co=Ie["__core-js_shared__"],du=function(){var t=/[^.]+$/.exec(Co&&Co.keys&&Co.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function AS(t){return!!du&&du in t}var LS=Function.prototype,BS=LS.toString;function zr(t){if(t!=null){try{return BS.call(t)}catch{}try{return t+""}catch{}}return""}var ES=/[\\^$.*+?()[\]{}|]/g,FS=/^\[object .+?Constructor\]$/,$S=Function.prototype,DS=Object.prototype,OS=$S.toString,RS=DS.hasOwnProperty,IS=RegExp("^"+OS.call(RS).replace(ES,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function PS(t){if(!Nr(t)||AS(t))return!1;var e=dc(t)?IS:FS;return e.test(zr(t))}function NS(t,e){return t==null?void 0:t[e]}function Wr(t,e){var r=NS(t,e);return PS(r)?r:void 0}var Sn=Wr(Object,"create");function zS(){this.__data__=Sn?Sn(null):{},this.size=0}function WS(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var qS="__lodash_hash_undefined__",HS=Object.prototype,US=HS.hasOwnProperty;function jS(t){var e=this.__data__;if(Sn){var r=e[t];return r===qS?void 0:r}return US.call(e,t)?e[t]:void 0}var YS=Object.prototype,GS=YS.hasOwnProperty;function VS(t){var e=this.__data__;return Sn?e[t]!==void 0:GS.call(e,t)}var XS="__lodash_hash_undefined__";function ZS(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Sn&&e===void 0?XS:e,this}function $r(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}$r.prototype.clear=zS;$r.prototype.delete=WS;$r.prototype.get=jS;$r.prototype.has=VS;$r.prototype.set=ZS;function KS(){this.__data__=[],this.size=0}function Fs(t,e){return t===e||t!==t&&e!==e}function $s(t,e){for(var r=t.length;r--;)if(Fs(t[r][0],e))return r;return-1}var QS=Array.prototype,JS=QS.splice;function tT(t){var e=this.__data__,r=$s(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():JS.call(e,r,1),--this.size,!0}function eT(t){var e=this.__data__,r=$s(e,t);return r<0?void 0:e[r][1]}function rT(t){return $s(this.__data__,t)>-1}function iT(t,e){var r=this.__data__,i=$s(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function ir(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}ir.prototype.clear=KS;ir.prototype.delete=tT;ir.prototype.get=eT;ir.prototype.has=rT;ir.prototype.set=iT;var Tn=Wr(Ie,"Map");function nT(){this.size=0,this.__data__={hash:new $r,map:new(Tn||ir),string:new $r}}function aT(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Ds(t,e){var r=t.__data__;return aT(e)?r[typeof e=="string"?"string":"hash"]:r.map}function sT(t){var e=Ds(this,t).delete(t);return this.size-=e?1:0,e}function oT(t){return Ds(this,t).get(t)}function lT(t){return Ds(this,t).has(t)}function cT(t,e){var r=Ds(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}function dr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}dr.prototype.clear=nT;dr.prototype.delete=sT;dr.prototype.get=oT;dr.prototype.has=lT;dr.prototype.set=cT;var hT="Expected a function";function On(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(hT);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=t.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(On.Cache||dr),r}On.Cache=dr;function uT(){this.__data__=new ir,this.size=0}function fT(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function dT(t){return this.__data__.get(t)}function pT(t){return this.__data__.has(t)}var gT=200;function mT(t,e){var r=this.__data__;if(r instanceof ir){var i=r.__data__;if(!Tn||i.length<gT-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new dr(i)}return r.set(t,e),this.size=r.size,this}function Fi(t){var e=this.__data__=new ir(t);this.size=e.size}Fi.prototype.clear=uT;Fi.prototype.delete=fT;Fi.prototype.get=dT;Fi.prototype.has=pT;Fi.prototype.set=mT;var rs=function(){try{var t=Wr(Object,"defineProperty");return t({},"",{}),t}catch{}}();function pc(t,e,r){e=="__proto__"&&rs?rs(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function gl(t,e,r){(r!==void 0&&!Fs(t[e],r)||r===void 0&&!(e in t))&&pc(t,e,r)}function yT(t){return function(e,r,i){for(var n=-1,a=Object(e),o=i(e),s=o.length;s--;){var c=o[++n];if(r(a[c],c,a)===!1)break}return e}}var xT=yT(),Dg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pu=Dg&&typeof module=="object"&&module&&!module.nodeType&&module,bT=pu&&pu.exports===Dg,gu=bT?Ie.Buffer:void 0,mu=gu?gu.allocUnsafe:void 0;function _T(t,e){if(e)return t.slice();var r=t.length,i=mu?mu(r):new t.constructor(r);return t.copy(i),i}var yu=Ie.Uint8Array;function CT(t){var e=new t.constructor(t.byteLength);return new yu(e).set(new yu(t)),e}function wT(t,e){var r=e?CT(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function vT(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}var xu=Object.create,kT=function(){function t(){}return function(e){if(!Nr(e))return{};if(xu)return xu(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function Og(t,e){return function(r){return t(e(r))}}var Rg=Og(Object.getPrototypeOf,Object),ST=Object.prototype;function Os(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||ST;return t===r}function TT(t){return typeof t.constructor=="function"&&!Os(t)?kT(Rg(t)):{}}function Rn(t){return t!=null&&typeof t=="object"}var MT="[object Arguments]";function bu(t){return Rn(t)&&Ei(t)==MT}var Ig=Object.prototype,AT=Ig.hasOwnProperty,LT=Ig.propertyIsEnumerable,is=bu(function(){return arguments}())?bu:function(t){return Rn(t)&&AT.call(t,"callee")&&!LT.call(t,"callee")},ns=Array.isArray,BT=9007199254740991;function Pg(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=BT}function Rs(t){return t!=null&&Pg(t.length)&&!dc(t)}function ET(t){return Rn(t)&&Rs(t)}function FT(){return!1}var Ng=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_u=Ng&&typeof module=="object"&&module&&!module.nodeType&&module,$T=_u&&_u.exports===Ng,Cu=$T?Ie.Buffer:void 0,DT=Cu?Cu.isBuffer:void 0,gc=DT||FT,OT="[object Object]",RT=Function.prototype,IT=Object.prototype,zg=RT.toString,PT=IT.hasOwnProperty,NT=zg.call(Object);function zT(t){if(!Rn(t)||Ei(t)!=OT)return!1;var e=Rg(t);if(e===null)return!0;var r=PT.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&zg.call(r)==NT}var WT="[object Arguments]",qT="[object Array]",HT="[object Boolean]",UT="[object Date]",jT="[object Error]",YT="[object Function]",GT="[object Map]",VT="[object Number]",XT="[object Object]",ZT="[object RegExp]",KT="[object Set]",QT="[object String]",JT="[object WeakMap]",tM="[object ArrayBuffer]",eM="[object DataView]",rM="[object Float32Array]",iM="[object Float64Array]",nM="[object Int8Array]",aM="[object Int16Array]",sM="[object Int32Array]",oM="[object Uint8Array]",lM="[object Uint8ClampedArray]",cM="[object Uint16Array]",hM="[object Uint32Array]",Tt={};Tt[rM]=Tt[iM]=Tt[nM]=Tt[aM]=Tt[sM]=Tt[oM]=Tt[lM]=Tt[cM]=Tt[hM]=!0;Tt[WT]=Tt[qT]=Tt[tM]=Tt[HT]=Tt[eM]=Tt[UT]=Tt[jT]=Tt[YT]=Tt[GT]=Tt[VT]=Tt[XT]=Tt[ZT]=Tt[KT]=Tt[QT]=Tt[JT]=!1;function uM(t){return Rn(t)&&Pg(t.length)&&!!Tt[Ei(t)]}function fM(t){return function(e){return t(e)}}var Wg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,gn=Wg&&typeof module=="object"&&module&&!module.nodeType&&module,dM=gn&&gn.exports===Wg,wo=dM&&Fg.process,wu=function(){try{var t=gn&&gn.require&&gn.require("util").types;return t||wo&&wo.binding&&wo.binding("util")}catch{}}(),vu=wu&&wu.isTypedArray,mc=vu?fM(vu):uM;function ml(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var pM=Object.prototype,gM=pM.hasOwnProperty;function mM(t,e,r){var i=t[e];(!(gM.call(t,e)&&Fs(i,r))||r===void 0&&!(e in t))&&pc(t,e,r)}function yM(t,e,r,i){var n=!r;r||(r={});for(var a=-1,o=e.length;++a<o;){var s=e[a],c=void 0;c===void 0&&(c=t[s]),n?pc(r,s,c):mM(r,s,c)}return r}function xM(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var bM=9007199254740991,_M=/^(?:0|[1-9]\d*)$/;function qg(t,e){var r=typeof t;return e=e??bM,!!e&&(r=="number"||r!="symbol"&&_M.test(t))&&t>-1&&t%1==0&&t<e}var CM=Object.prototype,wM=CM.hasOwnProperty;function vM(t,e){var r=ns(t),i=!r&&is(t),n=!r&&!i&&gc(t),a=!r&&!i&&!n&&mc(t),o=r||i||n||a,s=o?xM(t.length,String):[],c=s.length;for(var l in t)(e||wM.call(t,l))&&!(o&&(l=="length"||n&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||qg(l,c)))&&s.push(l);return s}function kM(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var SM=Object.prototype,TM=SM.hasOwnProperty;function MM(t){if(!Nr(t))return kM(t);var e=Os(t),r=[];for(var i in t)i=="constructor"&&(e||!TM.call(t,i))||r.push(i);return r}function Hg(t){return Rs(t)?vM(t,!0):MM(t)}function AM(t){return yM(t,Hg(t))}function LM(t,e,r,i,n,a,o){var s=ml(t,r),c=ml(e,r),l=o.get(c);if(l){gl(t,r,l);return}var h=a?a(s,c,r+"",t,e,o):void 0,u=h===void 0;if(u){var f=ns(c),d=!f&&gc(c),p=!f&&!d&&mc(c);h=c,f||d||p?ns(s)?h=s:ET(s)?h=vT(s):d?(u=!1,h=_T(c,!0)):p?(u=!1,h=wT(c,!0)):h=[]:zT(c)||is(c)?(h=s,is(s)?h=AM(s):(!Nr(s)||dc(s))&&(h=TT(c))):u=!1}u&&(o.set(c,h),n(h,c,i,a,o),o.delete(c)),gl(t,r,h)}function Ug(t,e,r,i,n){t!==e&&xT(e,function(a,o){if(n||(n=new Fi),Nr(a))LM(t,e,o,r,Ug,i,n);else{var s=i?i(ml(t,o),a,o+"",t,e,n):void 0;s===void 0&&(s=a),gl(t,o,s)}},Hg)}function jg(t){return t}function BM(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var ku=Math.max;function EM(t,e,r){return e=ku(e===void 0?t.length-1:e,0),function(){for(var i=arguments,n=-1,a=ku(i.length-e,0),o=Array(a);++n<a;)o[n]=i[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=i[n];return s[e]=r(o),BM(t,this,s)}}function FM(t){return function(){return t}}var $M=rs?function(t,e){return rs(t,"toString",{configurable:!0,enumerable:!1,value:FM(e),writable:!0})}:jg,DM=800,OM=16,RM=Date.now;function IM(t){var e=0,r=0;return function(){var i=RM(),n=OM-(i-r);if(r=i,n>0){if(++e>=DM)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var PM=IM($M);function NM(t,e){return PM(EM(t,e,jg),t+"")}function zM(t,e,r){if(!Nr(r))return!1;var i=typeof e;return(i=="number"?Rs(r)&&qg(e,r.length):i=="string"&&e in r)?Fs(r[e],t):!1}function WM(t){return NM(function(e,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,o&&zM(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),e=Object(e);++i<n;){var s=r[i];s&&t(e,s,i,a)}return e})}var qM=WM(function(t,e,r){Ug(t,e,r)}),HM="",UM={curveBasis:xa,curveBasisClosed:oS,curveBasisOpen:lS,curveBumpX:fg,curveBumpY:dg,curveBundle:cS,curveCardinalClosed:hS,curveCardinalOpen:uS,curveCardinal:yg,curveCatmullRomClosed:fS,curveCatmullRomOpen:dS,curveCatmullRom:bg,curveLinear:Ka,curveLinearClosed:pS,curveMonotoneX:Sg,curveMonotoneY:Tg,curveNatural:Ag,curveStep:Lg,curveStepAfter:Eg,curveStepBefore:Bg},jM=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,YM=g(function(t,e){const r=Yg(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);Sa(o),i=Ht(i,[...o])}else i=r.args;if(!i)return;let n=Rl(t,e);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Yg=g(function(t,e=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${jM.source})(?=[}][%]{2}).*
|
||
`,"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),I.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let a;const o=[];for(;(a=fn.exec(t))!==null;)if(a.index===fn.lastIndex&&fn.lastIndex++,a&&!e||e&&((r=a[1])!=null&&r.match(e))||e&&((i=a[2])!=null&&i.match(e))){const s=a[1]?a[1]:a[2],c=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:s,args:c})}return o.length===0?{type:t,args:null}:o.length===1?o[0]:o}catch(n){return I.error(`ERROR: ${n.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),GM=g(function(t){return t.replace(fn,"")},"removeDirectives"),VM=g(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function yc(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return UM[r]??e}g(yc,"interpolateToCurve");function Gg(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?z1.sanitizeUrl(r):r}g(Gg,"formatUrl");var XM=g((t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){I.error(`Function name: ${t} not found in window`);return}a[n](...e)},"runFunc");function xc(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}g(xc,"distance");function Vg(t){let e,r=0;t.forEach(n=>{r+=xc(n,e),e=n});const i=r/2;return bc(t,i)}g(Vg,"traverseEdge");function Xg(t){return t.length===1?t[0]:Vg(t)}g(Xg,"calcLabelPosition");var Su=g((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),bc=g((t,e)=>{let r,i=e;for(const n of t){if(r){const a=xc(n,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:Su((1-o)*r.x+o*n.x,5),y:Su((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),ZM=g((t,e,r)=>{I.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=bc(e,25),a=t?10:5,o=Math.atan2(e[0].y-n.y,e[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+n.x)/2,s.y=-Math.cos(o)*a+(e[0].y+n.y)/2,s},"calcCardinalityPosition");function Zg(t,e,r){const i=structuredClone(r);I.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();const n=25+t,a=bc(i,n),o=10+t*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return e==="start_left"?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):e==="end_right"?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):e==="end_left"?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}g(Zg,"calcTerminalLabelPosition");function Kg(t){let e="",r="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}g(Kg,"getStylesFromArray");var Tu=0,KM=g(()=>(Tu++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Tu),"generateId");function Qg(t){let e="";const r="0123456789abcdef",i=r.length;for(let n=0;n<t;n++)e+=r.charAt(Math.floor(Math.random()*i));return e}g(Qg,"makeRandomHex");var QM=g(t=>Qg(t.length),"random"),JM=g(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"),tA=g(function(t,e){const r=e.text.replace(Li.lineBreakRegex," "),[,i]=Is(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",i),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),n},"drawSimpleText"),eA=On((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Li.lineBreakRegex.test(t)))return t;const i=t.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const c=rr(`${o} `,r),l=rr(a,r);if(c>e){const{hyphenatedStrings:f,remainingWord:d}=rA(o,e,"-",r);n.push(a,...f),a=d}else l+c>=e?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),rA=On((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],a=[];let o="";return n.forEach((s,c)=>{const l=`${o}${s}`;if(rr(l,i)>=e){const u=c+1,f=n.length===u,d=`${l}${r}`;a.push(f?l:d),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Jg(t,e){return _c(t,e).height}g(Jg,"calculateTextHeight");function rr(t,e){return _c(t,e).width}g(rr,"calculateTextWidth");var _c=On((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,a]=Is(r),o=["sans-serif",i],s=t.split(Li.lineBreakRegex),c=[],l=gt("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const h=l.append("svg");for(const f of o){let d=0;const p={width:0,height:0,lineHeight:0};for(const m of s){const y=JM();y.text=m||HM;const x=tA(h,y).style("font-size",a).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,b.width)),d=Math.round(b.height),p.height+=d,p.lineHeight=Math.round(Math.max(p.lineHeight,d))}c.push(p)}h.remove();const u=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[u]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),pi,iA=(pi=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},g(pi,"InitIDGenerator"),pi),ta,nA=g(function(t){return ta=ta||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ta.innerHTML=t,unescape(ta.textContent)},"entityDecode");function Cc(t){return"str"in t}g(Cc,"isDetailedError");var aA=g((t,e,r,i)=>{var a;if(!i)return;const n=(a=t.node())==null?void 0:a.getBBox();n&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Is=g(t=>{if(typeof t=="number")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 wc(t,e){return qM({},t,e)}g(wc,"cleanAndMerge");var Fe={assignWithDepth:Ht,wrapLabel:eA,calculateTextHeight:Jg,calculateTextWidth:rr,calculateTextDimensions:_c,cleanAndMerge:wc,detectInit:YM,detectDirective:Yg,isSubstringInArray:VM,interpolateToCurve:yc,calcLabelPosition:Xg,calcCardinalityPosition:ZM,calcTerminalLabelPosition:Zg,formatUrl:Gg,getStylesFromArray:Kg,generateId:KM,random:QM,runFunc:XM,entityDecode:nA,insertTitle:aA,parseFontSize:Is,InitIDGenerator:iA},sA=g(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},"encodeEntities"),qr=g(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),a$=g((t,e,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`,"getEdgeId");function re(t){return t??null}g(re,"handleUndefinedAttr");const oA=Object.freeze({left:0,top:0,width:16,height:16}),as=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tm=Object.freeze({...oA,...as}),lA=Object.freeze({...tm,body:"",hidden:!1}),cA=Object.freeze({width:null,height:null}),hA=Object.freeze({...cA,...as}),uA=(t,e,r,i="")=>{const n=t.split(":");if(t.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),c=n.pop(),l={provider:n.length>0?n[0]:i,prefix:c,name:s};return vo(l)?l:null}const a=n[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return vo(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return vo(s,r)?s:null}return null},vo=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function fA(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}function Mu(t,e){const r=fA(t,e);for(const i in lA)i in as?i in t&&!(i in r)&&(r[i]=as[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function dA(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const s=i[o]&&i[o].parent,c=s&&a(s);c&&(n[o]=[s].concat(c))}return n[o]}return(e||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Au(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let a={};function o(s){a=Mu(i[s]||n[s],a)}return o(e),r.forEach(o),Mu(t,a)}function pA(t,e){if(t.icons[e])return Au(t,e,[]);const r=dA(t,[e])[e];return r?Au(t,e,r):null}const gA=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mA=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Lu(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const i=t.split(gA);if(i===null||!i.length)return t;const n=[];let a=i.shift(),o=mA.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*e*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function yA(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const n=t.indexOf(">",i),a=t.indexOf("</"+e);if(n===-1||a===-1)break;const o=t.indexOf(">",a);if(o===-1)break;r+=t.slice(n+1,a).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}function xA(t,e){return t?"<defs>"+t+"</defs>"+e:e}function bA(t,e,r){const i=yA(t);return xA(i.defs,e+i.content+r)}const _A=t=>t==="unset"||t==="undefined"||t==="none";function CA(t,e){const r={...tm,...t},i={...hA,...e},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let C=m.rotate;x?b?C+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let v;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:v=n.height/2+n.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:v=n.width/2+n.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}C%2===1&&(n.left!==n.top&&(v=n.left,n.left=n.top,n.top=v),n.width!==n.height&&(v=n.width,n.width=n.height,n.height=v)),y.length&&(a=bA(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,c=n.width,l=n.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?l:s,h=Lu(u,c/l)):(h=o==="auto"?c:o,u=s===null?Lu(h,l/c):s==="auto"?l:s);const f={},d=(m,y)=>{_A(y)||(f[m]=y.toString())};d("width",h),d("height",u);const p=[n.left,n.top,c,l];return f.viewBox=p.join(" "),{attributes:f,viewBox:p,body:a}}const wA=/\sid="(\S+)"/g,vA="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let kA=0;function SA(t,e=vA){const r=[];let i;for(;i=wA.exec(t);)r.push(i[1]);if(!r.length)return t;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof e=="function"?e(a):e+(kA++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),t=t.replace(new RegExp(n,"g"),""),t}function TA(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}function vc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Hr=vc();function em(t){Hr=t}var mn={exec:()=>null};function _t(t,e=""){let r=typeof t=="string"?t:t.source;const i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(ee.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,e)};return i}var ee={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\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")},MA=/^(?:[ \t]*(?:\n|$))+/,AA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,LA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,In=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,BA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kc=/(?:[*+-]|\d{1,9}[.)])/,rm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,im=_t(rm).replace(/bull/g,kc).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(),EA=_t(rm).replace(/bull/g,kc).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(),Sc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,FA=/^[^\n]+/,Tc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,$A=_t(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Tc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),DA=_t(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,kc).getRegex(),Ps="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",Mc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,OA=_t("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Mc).replace("tag",Ps).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nm=_t(Sc).replace("hr",In).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",Ps).getRegex(),RA=_t(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nm).getRegex(),Ac={blockquote:RA,code:AA,def:$A,fences:LA,heading:BA,hr:In,html:OA,lheading:im,list:DA,newline:MA,paragraph:nm,table:mn,text:FA},Bu=_t("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",In).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ps).getRegex(),IA={...Ac,lheading:EA,table:Bu,paragraph:_t(Sc).replace("hr",In).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bu).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",Ps).getRegex()},PA={...Ac,html:_t(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Mc).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:mn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_t(Sc).replace("hr",In).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",im).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},NA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zA=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,am=/^( {2,}|\\)\n(?!\s*$)/,WA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ns=/[\p{P}\p{S}]/u,Lc=/[\s\p{P}\p{S}]/u,sm=/[^\s\p{P}\p{S}]/u,qA=_t(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Lc).getRegex(),om=/(?!~)[\p{P}\p{S}]/u,HA=/(?!~)[\s\p{P}\p{S}]/u,UA=/(?:[^\s\p{P}\p{S}]|~)/u,jA=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,lm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,YA=_t(lm,"u").replace(/punct/g,Ns).getRegex(),GA=_t(lm,"u").replace(/punct/g,om).getRegex(),cm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",VA=_t(cm,"gu").replace(/notPunctSpace/g,sm).replace(/punctSpace/g,Lc).replace(/punct/g,Ns).getRegex(),XA=_t(cm,"gu").replace(/notPunctSpace/g,UA).replace(/punctSpace/g,HA).replace(/punct/g,om).getRegex(),ZA=_t("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,sm).replace(/punctSpace/g,Lc).replace(/punct/g,Ns).getRegex(),KA=_t(/\\(punct)/,"gu").replace(/punct/g,Ns).getRegex(),QA=_t(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),JA=_t(Mc).replace("(?:-->|$)","-->").getRegex(),tL=_t("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",JA).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ss=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,eL=_t(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ss).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hm=_t(/^!?\[(label)\]\[(ref)\]/).replace("label",ss).replace("ref",Tc).getRegex(),um=_t(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tc).getRegex(),rL=_t("reflink|nolink(?!\\()","g").replace("reflink",hm).replace("nolink",um).getRegex(),Bc={_backpedal:mn,anyPunctuation:KA,autolink:QA,blockSkip:jA,br:am,code:zA,del:mn,emStrongLDelim:YA,emStrongRDelimAst:VA,emStrongRDelimUnd:ZA,escape:NA,link:eL,nolink:um,punctuation:qA,reflink:hm,reflinkSearch:rL,tag:tL,text:WA,url:mn},iL={...Bc,link:_t(/^!?\[(label)\]\((.*?)\)/).replace("label",ss).getRegex(),reflink:_t(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ss).getRegex()},yl={...Bc,emStrongRDelimAst:XA,emStrongLDelim:GA,url:_t(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},nL={...yl,br:_t(am).replace("{2,}","*").getRegex(),text:_t(yl.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ea={normal:Ac,gfm:IA,pedantic:PA},Ki={normal:Bc,gfm:yl,breaks:nL,pedantic:iL},aL={"&":"&","<":"<",">":">",'"':""","'":"'"},Eu=t=>aL[t];function Le(t,e){if(e){if(ee.escapeTest.test(t))return t.replace(ee.escapeReplace,Eu)}else if(ee.escapeTestNoEncode.test(t))return t.replace(ee.escapeReplaceNoEncode,Eu);return t}function Fu(t){try{t=encodeURI(t).replace(ee.percentDecode,"%")}catch{return null}return t}function $u(t,e){var a;const r=t.replace(ee.findPipe,(o,s,c)=>{let l=!1,h=s;for(;--h>=0&&c[h]==="\\";)l=!l;return l?"|":" |"}),i=r.split(ee.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(ee.slashPipe,"|");return i}function Qi(t,e,r){const i=t.length;if(i===0)return"";let n=0;for(;n<i&&t.charAt(i-n-1)===e;)n++;return t.slice(0,i-n)}function sL(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}function Du(t,e,r,i,n){const a=e.href,o=e.title||null,s=t[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;const c={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,c}function oL(t,e,r){const i=t.match(r.other.indentCodeCompensation);if(i===null)return e;const n=i[1];return e.split(`
|
||
`).map(a=>{const o=a.match(r.other.beginningSpace);if(o===null)return a;const[s]=o;return s.length>=n.length?a.slice(n.length):a}).join(`
|
||
`)}var os=class{constructor(t){kt(this,"options");kt(this,"rules");kt(this,"lexer");this.options=t||Hr}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Qi(r,`
|
||
`)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const r=e[0],i=oL(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){const i=Qi(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Qi(e[0],`
|
||
`)}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let r=Qi(e[0],`
|
||
`).split(`
|
||
`),i="",n="";const a=[];for(;r.length>0;){let o=!1;const s=[];let c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))s.push(r[c]),o=!0;else if(!o)s.push(r[c]);else break;r=r.slice(c);const l=s.join(`
|
||
`),h=l.replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
||
${l}`:l,n=n?`${n}
|
||
${h}`:h;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=u,r.length===0)break;const f=a.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){const d=f,p=d.raw+`
|
||
`+r.join(`
|
||
`),m=this.blockquote(p);a[a.length-1]=m,i=i.substring(0,i.length-d.raw.length)+m.raw,n=n.substring(0,n.length-d.text.length)+m.text;break}else if((f==null?void 0:f.type)==="list"){const d=f,p=d.raw+`
|
||
`+r.join(`
|
||
`),m=this.list(p);a[a.length-1]=m,i=i.substring(0,i.length-f.raw.length)+m.raw,n=n.substring(0,n.length-d.raw.length)+m.raw,r=p.substring(a.at(-1).raw.length).split(`
|
||
`);continue}}return{type:"blockquote",raw:i,tokens:a,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const i=r.length>1,n={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:"[*+-]");const a=this.rules.other.listItemRegex(r);let o=!1;for(;t;){let c=!1,l="",h="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;l=e[0],t=t.substring(l.length);let u=e[2].split(`
|
||
`,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),f=t.split(`
|
||
`,1)[0],d=!u.trim(),p=0;if(this.options.pedantic?(p=2,h=u.trimStart()):d?p=e[1].length+1:(p=e[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,h=u.slice(p),p+=e[1].length),d&&this.rules.other.blankLine.test(f)&&(l+=f+`
|
||
`,t=t.substring(f.length+1),c=!0),!c){const x=this.rules.other.nextBulletRegex(p),b=this.rules.other.hrRegex(p),C=this.rules.other.fencesBeginRegex(p),v=this.rules.other.headingBeginRegex(p),w=this.rules.other.htmlBeginRegex(p);for(;t;){const _=t.split(`
|
||
`,1)[0];let k;if(f=_,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),k=f):k=f.replace(this.rules.other.tabCharGlobal," "),C.test(f)||v.test(f)||w.test(f)||x.test(f)||b.test(f))break;if(k.search(this.rules.other.nonSpaceChar)>=p||!f.trim())h+=`
|
||
`+k.slice(p);else{if(d||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(u)||v.test(u)||b.test(u))break;h+=`
|
||
`+f}!d&&!f.trim()&&(d=!0),l+=_+`
|
||
`,t=t.substring(_.length+1),u=k.slice(p)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(o=!0));let m=null,y;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(y=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:l,task:!!m,checked:y,loose:!1,text:h,tokens:[]}),n.raw+=l}const s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c=0;c<n.items.length;c++)if(this.lexer.state.top=!1,n.items[c].tokens=this.lexer.blockTokens(n.items[c].text,[]),!n.loose){const l=n.items[c].tokens.filter(u=>u.type==="space"),h=l.length>0&&l.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=h}if(n.loose)for(let c=0;c<n.items.length;c++)n.items[c].loose=!0;return n}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:i,title:n}}}table(t){var o;const e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const r=$u(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(o=e[3])!=null&&o.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const s of i)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<r.length;s++)a.header.push({text:r[s],tokens:this.lexer.inline(r[s]),header:!0,align:a.align[s]});for(const s of n)a.rows.push($u(s,a.header.length).map((c,l)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[l]})));return a}}lheading(t){const 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){const e=this.rules.block.paragraph.exec(t);if(e){const r=e[1].charAt(e[1].length-1)===`
|
||
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){const 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){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const 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){const e=this.rules.inline.link.exec(t);if(e){const r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=Qi(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=sL(e[2],"()");if(a===-2)return;if(a>-1){const s=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let i=e[2],n="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],n=a[3])}else n=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),Du(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.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))){const i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[i.toLowerCase()];if(!n){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Du(r,n,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))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const a=[...i[0]].length-1;let o,s,c=a,l=0;const h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*t.length+a);(i=h.exec(e))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(s=[...o].length,i[3]||i[4]){c+=s;continue}else if((i[5]||i[6])&&a%3&&!((a+s)%3)){l+=s;continue}if(c-=s,c>0)continue;s=Math.min(s,s+c+l);const u=[...i[0]][0].length,f=t.slice(0,a+i.index+u+s);if(Math.min(a,s)%2){const p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}const d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const 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){const e=this.rules.inline.autolink.exec(t);if(e){let r,i;return e[2]==="@"?(r=e[1],i="mailto:"+r):(r=e[1],i=r),{type:"link",raw:e[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let i,n;if(e[2]==="@")i=e[0],n="mailto:"+i;else{let a;do a=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(a!==e[0]);i=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},Xe=class xl{constructor(e){kt(this,"tokens");kt(this,"options");kt(this,"state");kt(this,"tokenizer");kt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Hr,this.options.tokenizer=this.options.tokenizer||new os,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:ee,block:ea.normal,inline:Ki.normal};this.options.pedantic?(r.block=ea.pedantic,r.inline=Ki.pedantic):this.options.gfm&&(r.block=ea.gfm,this.options.breaks?r.inline=Ki.breaks:r.inline=Ki.gfm),this.tokenizer.rules=r}static get rules(){return{block:ea,inline:Ki}}static lex(e,r){return new xl(r).lex(e)}static lexInline(e,r){return new xl(r).inlineTokens(e)}lex(e){e=e.replace(ee.carriageReturn,`
|
||
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],i=!1){var n,a,o;for(this.options.pedantic&&(e=e.replace(ee.tabCharGlobal," ").replace(ee.spaceLine,""));e;){let s;if((a=(n=this.options.extensions)==null?void 0:n.block)!=null&&a.some(l=>(s=l.call({lexer:this},e,r))?(e=e.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);const l=r.at(-1);s.raw.length===1&&l!==void 0?l.raw+=`
|
||
`:r.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);const l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=`
|
||
`+s.raw,l.text+=`
|
||
`+s.text,this.inlineQueue.at(-1).src=l.text):r.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);const l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=`
|
||
`+s.raw,l.text+=`
|
||
`+s.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),r.push(s);continue}let c=e;if((o=this.options.extensions)!=null&&o.startBlock){let l=1/0;const h=e.slice(1);let u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(c=e.substring(0,l+1))}if(this.state.top&&(s=this.tokenizer.paragraph(c))){const l=r.at(-1);i&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=`
|
||
`+s.raw,l.text+=`
|
||
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(s),i=c.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);const l=r.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=`
|
||
`+s.raw,l.text+=`
|
||
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(s);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var s,c,l;let i=e,n=null;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,o="";for(;e;){a||(o=""),a=!1;let h;if((c=(s=this.options.extensions)==null?void 0:s.inline)!=null&&c.some(f=>(h=f.call({lexer:this},e,r))?(e=e.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);const f=r.at(-1);h.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=h.raw,f.text+=h.text):r.push(h);continue}if(h=this.tokenizer.emStrong(e,i,o)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),r.push(h);continue}let u=e;if((l=this.options.extensions)!=null&&l.startInline){let f=1/0;const d=e.slice(1);let p;this.options.extensions.startInline.forEach(m=>{p=m.call({lexer:this},d),typeof p=="number"&&p>=0&&(f=Math.min(f,p))}),f<1/0&&f>=0&&(u=e.substring(0,f+1))}if(h=this.tokenizer.inlineText(u)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(o=h.raw.slice(-1)),a=!0;const f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=h.raw,f.text+=h.text):r.push(h);continue}if(e){const f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},ls=class{constructor(t){kt(this,"options");kt(this,"parser");this.options=t||Hr}space(t){return""}code({text:t,lang:e,escaped:r}){var a;const i=(a=(e||"").match(ee.notSpaceStart))==null?void 0:a[0],n=t.replace(ee.endingNewline,"")+`
|
||
`;return i?'<pre><code class="language-'+Le(i)+'">'+(r?n:Le(n,!0))+`</code></pre>
|
||
`:"<pre><code>"+(r?n:Le(n,!0))+`</code></pre>
|
||
`}blockquote({tokens:t}){return`<blockquote>
|
||
${this.parser.parse(t)}</blockquote>
|
||
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
||
`}hr(t){return`<hr>
|
||
`}list(t){const e=t.ordered,r=t.start;let i="";for(let o=0;o<t.items.length;o++){const s=t.items[o];i+=this.listitem(s)}const n=e?"ol":"ul",a=e&&r!==1?' start="'+r+'"':"";return"<"+n+a+`>
|
||
`+i+"</"+n+`>
|
||
`}listitem(t){var r;let e="";if(t.task){const i=this.checkbox({checked:!!t.checked});t.loose?((r=t.tokens[0])==null?void 0:r.type)==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Le(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
|
||
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
||
`}table(t){let e="",r="";for(let n=0;n<t.header.length;n++)r+=this.tablecell(t.header[n]);e+=this.tablerow({text:r});let i="";for(let n=0;n<t.rows.length;n++){const a=t.rows[n];r="";for(let o=0;o<a.length;o++)r+=this.tablecell(a[o]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
||
<thead>
|
||
`+e+`</thead>
|
||
`+i+`</table>
|
||
`}tablerow({text:t}){return`<tr>
|
||
${t}</tr>
|
||
`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
|
||
`}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>${Le(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){const i=this.parser.parseInline(r),n=Fu(t);if(n===null)return i;t=n;let a='<a href="'+t+'"';return e&&(a+=' title="'+Le(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));const n=Fu(t);if(n===null)return Le(r);t=n;let a=`<img src="${t}" alt="${r}"`;return e&&(a+=` title="${Le(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Le(t.text)}},Ec=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""}},Ze=class bl{constructor(e){kt(this,"options");kt(this,"renderer");kt(this,"textRenderer");this.options=e||Hr,this.options.renderer=this.options.renderer||new ls,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ec}static parse(e,r){return new bl(r).parse(e)}static parseInline(e,r){return new bl(r).parseInline(e)}parse(e,r=!0){var n,a;let i="";for(let o=0;o<e.length;o++){const s=e[o];if((a=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&a[s.type]){const l=s,h=this.options.extensions.renderers[l.type].call({parser:this},l);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){i+=h||"";continue}}const c=s;switch(c.type){case"space":{i+=this.renderer.space(c);continue}case"hr":{i+=this.renderer.hr(c);continue}case"heading":{i+=this.renderer.heading(c);continue}case"code":{i+=this.renderer.code(c);continue}case"table":{i+=this.renderer.table(c);continue}case"blockquote":{i+=this.renderer.blockquote(c);continue}case"list":{i+=this.renderer.list(c);continue}case"html":{i+=this.renderer.html(c);continue}case"paragraph":{i+=this.renderer.paragraph(c);continue}case"text":{let l=c,h=this.renderer.text(l);for(;o+1<e.length&&e[o+1].type==="text";)l=e[++o],h+=`
|
||
`+this.renderer.text(l);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{const l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}parseInline(e,r=this.renderer){var n,a;let i="";for(let o=0;o<e.length;o++){const s=e[o];if((a=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&a[s.type]){const l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=l||"";continue}}const c=s;switch(c.type){case"escape":{i+=r.text(c);break}case"html":{i+=r.html(c);break}case"link":{i+=r.link(c);break}case"image":{i+=r.image(c);break}case"strong":{i+=r.strong(c);break}case"em":{i+=r.em(c);break}case"codespan":{i+=r.codespan(c);break}case"br":{i+=r.br(c);break}case"del":{i+=r.del(c);break}case"text":{i+=r.text(c);break}default:{const l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},Fo,ba=(Fo=class{constructor(t){kt(this,"options");kt(this,"block");this.options=t||Hr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Xe.lex:Xe.lexInline}provideParser(){return this.block?Ze.parse:Ze.parseInline}},kt(Fo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Fo),lL=class{constructor(...t){kt(this,"defaults",vc());kt(this,"options",this.setOptions);kt(this,"parse",this.parseMarkdown(!0));kt(this,"parseInline",this.parseMarkdown(!1));kt(this,"Parser",Ze);kt(this,"Renderer",ls);kt(this,"TextRenderer",Ec);kt(this,"Lexer",Xe);kt(this,"Tokenizer",os);kt(this,"Hooks",ba);this.use(...t)}walkTokens(t,e){var i,n;let r=[];for(const a of t)switch(r=r.concat(e.call(this,a)),a.type){case"table":{const o=a;for(const s of o.header)r=r.concat(this.walkTokens(s.tokens,e));for(const s of o.rows)for(const c of s)r=r.concat(this.walkTokens(c.tokens,e));break}case"list":{const o=a;r=r.concat(this.walkTokens(o.items,e));break}default:{const o=a;(n=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&n[o.type]?this.defaults.extensions.childTokens[o.type].forEach(s=>{const c=o[s].flat(1/0);r=r.concat(this.walkTokens(c,e))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,e)))}}return r}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const a=e.renderers[n.name];a?e.renderers[n.name]=function(...o){let s=n.renderer.apply(this,o);return s===!1&&(s=a.apply(this,o)),s}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=e[n.level];a?a.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),i.extensions=e),r.renderer){const n=this.defaults.renderer||new ls(this.defaults);for(const a in r.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const o=a,s=r.renderer[o],c=n[o];n[o]=(...l)=>{let h=s.apply(n,l);return h===!1&&(h=c.apply(n,l)),h||""}}i.renderer=n}if(r.tokenizer){const n=this.defaults.tokenizer||new os(this.defaults);for(const a in r.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const o=a,s=r.tokenizer[o],c=n[o];n[o]=(...l)=>{let h=s.apply(n,l);return h===!1&&(h=c.apply(n,l)),h}}i.tokenizer=n}if(r.hooks){const n=this.defaults.hooks||new ba;for(const a in r.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const o=a,s=r.hooks[o],c=n[o];ba.passThroughHooks.has(a)?n[o]=l=>{if(this.defaults.async)return Promise.resolve(s.call(n,l)).then(u=>c.call(n,u));const h=s.call(n,l);return c.call(n,h)}:n[o]=(...l)=>{let h=s.apply(n,l);return h===!1&&(h=c.apply(n,l)),h}}i.hooks=n}if(r.walkTokens){const n=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(o){let s=[];return s.push(a.call(this,o)),n&&(s=s.concat(n.call(this,o))),s}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Xe.lex(t,e??this.defaults)}parser(t,e){return Ze.parse(t,e??this.defaults)}parseMarkdown(t){return(r,i)=>{const n={...i},a={...this.defaults,...n},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);const s=a.hooks?a.hooks.provideLexer():t?Xe.lex:Xe.lexInline,c=a.hooks?a.hooks.provideParser():t?Ze.parse:Ze.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(l=>s(l,a)).then(l=>a.hooks?a.hooks.processAllTokens(l):l).then(l=>a.walkTokens?Promise.all(this.walkTokens(l,a.walkTokens)).then(()=>l):l).then(l=>c(l,a)).then(l=>a.hooks?a.hooks.postprocess(l):l).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let l=s(r,a);a.hooks&&(l=a.hooks.processAllTokens(l)),a.walkTokens&&this.walkTokens(l,a.walkTokens);let h=c(l,a);return a.hooks&&(h=a.hooks.postprocess(h)),h}catch(l){return o(l)}}}onError(t,e){return r=>{if(r.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+Le(r.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(r);throw r}}},Dr=new lL;function bt(t,e){return Dr.parse(t,e)}bt.options=bt.setOptions=function(t){return Dr.setOptions(t),bt.defaults=Dr.defaults,em(bt.defaults),bt};bt.getDefaults=vc;bt.defaults=Hr;bt.use=function(...t){return Dr.use(...t),bt.defaults=Dr.defaults,em(bt.defaults),bt};bt.walkTokens=function(t,e){return Dr.walkTokens(t,e)};bt.parseInline=Dr.parseInline;bt.Parser=Ze;bt.parser=Ze.parse;bt.Renderer=ls;bt.TextRenderer=Ec;bt.Lexer=Xe;bt.lexer=Xe.lex;bt.Tokenizer=os;bt.Hooks=ba;bt.parse=bt;bt.options;bt.setOptions;bt.use;bt.walkTokens;bt.parseInline;Ze.parse;Xe.lex;function fm(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(s,c){var l=c.match(/\n([\t ]+|(?!\s).)/g);return l?s.concat(l.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):s},[]);if(n.length){var a=new RegExp(`
|
||
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(s){return s.replace(a,`
|
||
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return e.forEach(function(s,c){var l=o.match(/(?:^|\n)( *)$/),h=l?l[1]:"",u=s;typeof s=="string"&&s.includes(`
|
||
`)&&(u=String(s).split(`
|
||
`).map(function(f,d){return d===0?f:""+h+f}).join(`
|
||
`)),o+=u+i[c+1]}),o}var cL={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},_l=new Map,dm=new Map,hL=g(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(I.debug("Registering icon pack:",e.name),"loader"in e)dm.set(e.name,e.loader);else if("icons"in e)_l.set(e.name,e.icons);else throw I.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),pm=g(async(t,e)=>{const r=uA(t,!0,e!==void 0);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=_l.get(i);if(!n){const o=dm.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},_l.set(i,n)}catch(s){throw I.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=pA(n,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),uL=g(async t=>{try{return await pm(t),!0}catch{return!1}},"isIconAvailable"),Pn=g(async(t,e,r)=>{let i;try{i=await pm(t,e==null?void 0:e.fallbackPrefix)}catch(o){I.error(o),i=cL}const n=CA(i,e);return TA(SA(n.body),{...n.attributes,...r})},"getIconSVG");function gm(t,{markdownAutoWrap:e}){const i=t.replace(/<br\/>/g,`
|
||
`).replace(/\n{2,}/g,`
|
||
`),n=fm(i);return e===!1?n.replace(/ /g," "):n}g(gm,"preprocessMarkdown");function mm(t,e={}){const r=gm(t,e),i=bt.lexer(r),n=[[]];let a=0;function o(s,c="normal"){s.type==="text"?s.text.split(`
|
||
`).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&n[a].push({content:f,type:c})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(l=>{o(l,s.type)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}return g(o,"processNode"),i.forEach(s=>{var c;s.type==="paragraph"?(c=s.tokens)==null||c.forEach(l=>{o(l)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}),n}g(mm,"markdownToLines");function ym(t,{markdownAutoWrap:e}={}){const r=bt.lexer(t);function i(n){var a,o,s;return n.type==="text"?e===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g," "):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${(a=n.tokens)==null?void 0:a.map(i).join("")}</strong>`:n.type==="em"?`<em>${(o=n.tokens)==null?void 0:o.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${(s=n.tokens)==null?void 0:s.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:`Unsupported markdown: ${n.type}`}return g(i,"output"),r.map(i).join("")}g(ym,"markdownToHTML");function xm(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}g(xm,"splitTextToChars");function bm(t,e){const r=xm(e.content);return Fc(t,[],r,e.type)}g(bm,"splitWordToFitWidth");function Fc(t,e,r,i){if(r.length===0)return[{content:e.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...e,n];return t([{content:o.join(""),type:i}])?Fc(t,o,a,i):(e.length===0&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}g(Fc,"splitWordToFitWidthRecursion");function _m(t,e){if(t.some(({content:r})=>r.includes(`
|
||
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return cs(t,e)}g(_m,"splitLineToFitWidth");function cs(t,e,r=[],i=[]){if(t.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";t[0].content===" "&&(n=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),e(o))return cs(t,e,r,o);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[s,c]=bm(e,a);r.push([s]),c.content&&t.unshift(c)}return cs(t,e,r)}g(cs,"splitLineToFitWidthRecursion");function Cl(t,e){e&&t.attr("style",e)}g(Cl,"applyStyle");async function Cm(t,e,r,i,n=!1){const a=t.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);const o=a.append("xhtml:div");let s=e.label;e.label&&bi(e.label)&&(s=await Il(e.label.replace(Li.lineBreakRegex,`
|
||
`),xt()));const c=e.isNode?"nodeLabel":"edgeLabel",l=o.append("span");l.html(s),Cl(l,e.labelStyle),l.attr("class",`${c} ${i}`),Cl(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let h=o.node().getBoundingClientRect();return h.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),h=o.node().getBoundingClientRect()),a.node()}g(Cm,"addHtmlSpan");function zs(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}g(zs,"createTspan");function wm(t,e,r){const i=t.append("text"),n=zs(i,1,e);Ws(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}g(wm,"computeWidthOfText");function fL(t,e,r){var o;const i=t.append("text"),n=zs(i,1,e);Ws(n,[{content:r,type:"normal"}]);const a=(o=n.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}g(fL,"computeDimensionOfText");function vm(t,e,r,i=!1){const a=e.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let c=0;for(const l of r){const h=g(f=>wm(a,1.1,f)<=t,"checkWidth"),u=h(l)?[l]:_m(l,h);for(const f of u){const d=zs(s,c,1.1);Ws(d,f),c++}}if(i){const l=s.node().getBBox(),h=2;return o.attr("x",l.x-h).attr("y",l.y-h).attr("width",l.width+2*h).attr("height",l.height+2*h),a.node()}else return s.node()}g(vm,"createFormattedText");function Ws(t,e){t.text(""),e.forEach((r,i)=>{const n=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}g(Ws,"updateTextContentAndStyles");async function km(t){const e=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,n,a)=>(e.push((async()=>{const o=`${n}:${a}`;return await uL(o)?await Pn(o,void 0,{class:"label-icon"}):`<i class='${_s(i).replace(":"," ")}'></i>`})()),i));const r=await Promise.all(e);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??"")}g(km,"replaceIconSubstring");var pr=g(async(t,e="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:c=!1}={},l)=>{if(I.debug("XYZ createText",e,r,i,n,a,o,"addSvgBackground: ",c),a){const h=ym(e,l),u=await km(qr(h)),f=e.replace(/\\\\/g,"\\"),d={isNode:o,label:bi(e)?f:u,labelStyle:r.replace("fill:","color:")};return await Cm(t,d,s,n,c)}else{const h=e.replace(/<br\s*\/?>/g,"<br/>"),u=mm(h.replace("<br>","<br/>"),l),f=vm(s,t,u,e?c:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");gt(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");gt(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");gt(f).select("text").attr("style",p)}return f}},"createText");function ko(t,e,r){if(t&&t.length){const[i,n]=e,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const c of t){const[l,h]=c;c[0]=(l-i)*o-(h-n)*s+i,c[1]=(l-i)*s+(h-n)*o+n}}}function dL(t,e){return t[0]===e[0]&&t[1]===e[1]}function pL(t,e,r,i=1){const n=r,a=Math.max(e,.1),o=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,s=[0,0];if(n)for(const l of o)ko(l,s,n);const c=function(l,h,u){const f=[];for(const b of l){const C=[...b];dL(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&f.push(C)}const d=[];h=Math.max(h,.1);const p=[];for(const b of f)for(let C=0;C<b.length-1;C++){const v=b[C],w=b[C+1];if(v[1]!==w[1]){const _=Math.min(v[1],w[1]);p.push({ymin:_,ymax:Math.max(v[1],w[1]),x:_===v[1]?v[0]:w[0],islope:(w[0]-v[0])/(w[1]-v[1])})}}if(p.sort((b,C)=>b.ymin<C.ymin?-1:b.ymin>C.ymin?1:b.x<C.x?-1:b.x>C.x?1:b.ymax===C.ymax?0:(b.ymax-C.ymax)/Math.abs(b.ymax-C.ymax)),!p.length)return d;let m=[],y=p[0].ymin,x=0;for(;m.length||p.length;){if(p.length){let b=-1;for(let C=0;C<p.length&&!(p[C].ymin>y);C++)b=C;p.splice(0,b+1).forEach(C=>{m.push({s:y,edge:C})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,C)=>b.edge.x===C.edge.x?0:(b.edge.x-C.edge.x)/Math.abs(b.edge.x-C.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const C=b+1;if(C>=m.length)break;const v=m[b].edge,w=m[C].edge;d.push([[Math.round(v.x),y],[Math.round(w.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return d}(o,a,i);if(n){for(const l of o)ko(l,s,-n);(function(l,h,u){const f=[];l.forEach(d=>f.push(...d)),ko(f,h,u)})(c,s,-n)}return c}function Nn(t,e){var r;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),pL(t,n,i,a||1)}class $c{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const i=Nn(e,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(e,r){const i=[];for(const n of e)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function qs(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 gL extends $c{fillPolygons(e,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Nn(e,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(a),c=.5*i*Math.sin(a);for(const[l,h]of n)qs([l,h])&&o.push([[l[0]-s,l[1]+c],[...h]],[[l[0]+s,l[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class mL extends $c{fillPolygons(e,r){const i=this._fillPolygons(e,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,n);return i.ops=i.ops.concat(a.ops),i}}class yL{constructor(e){this.helper=e}fillPolygons(e,r){const i=Nn(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(e,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=n/4;for(const s of e){const c=qs(s),l=c/n,h=Math.ceil(l)-1,u=c-h*n,f=(s[0][0]+s[1][0])/2-n/4,d=Math.min(s[0][1],s[1][1]);for(let p=0;p<h;p++){const m=d+u+p*n,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class xL{constructor(e){this.helper=e}fillPolygons(e,r){const i=Nn(e,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(e,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return e.forEach(o=>{const s=qs(o),c=Math.floor(s/(i+n)),l=(s+n-c*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<c;d++){const p=d*(i+n),m=p+i,y=[h[0]+p*Math.cos(f)+l*Math.cos(f),h[1]+p*Math.sin(f)+l*Math.sin(f)],x=[h[0]+m*Math.cos(f)+l*Math.cos(f),h[1]+m*Math.sin(f)+l*Math.sin(f)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}}),a}}class bL{constructor(e){this.helper=e}fillPolygons(e,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=Nn(e,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(e,r,i){const n=[];return e.forEach(a=>{const o=qs(a),s=Math.round(o/(2*r));let c=a[0],l=a[1];c[0]>l[0]&&(c=a[1],l=a[0]);const h=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let u=0;u<s;u++){const f=2*u*r,d=2*(u+1)*r,p=Math.sqrt(2*Math.pow(r,2)),m=[c[0]+f*Math.cos(h),c[1]+f*Math.sin(h)],y=[c[0]+d*Math.cos(h),c[1]+d*Math.sin(h)],x=[m[0]+p*Math.cos(h+Math.PI/4),m[1]+p*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}}),n}}const oe={};class _L{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const CL=0,So=1,Ou=2,ra={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 To(t,e){return t.type===e}function Dc(t){const e=[],r=function(o){const s=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))s[s.length]={type:CL,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];s[s.length]={type:So,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Ou,text:""},s}(t);let i="BOD",n=0,a=r[n];for(;!To(a,Ou);){let o=0;const s=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return Dc("M0,0"+t);n++,o=ra[a.text],i=a.text}else To(a,So)?o=ra[i]:(n++,o=ra[a.text],i=a.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let c=n;c<n+o;c++){const l=r[c];if(!To(l,So))throw new Error("Param not a number: "+i+","+l.text);s[s.length]=+l.text}if(typeof ra[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:s};e.push(c),n+=o,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return e}function Sm(t){let e=0,r=0,i=0,n=0;const a=[];for(const{key:o,data:s}of t)switch(o){case"M":a.push({key:"M",data:[...s]}),[e,r]=s,[i,n]=s;break;case"m":e+=s[0],r+=s[1],a.push({key:"M",data:[e,r]}),i=e,n=r;break;case"L":a.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const c=s.map((l,h)=>h%2?l+r:l+e);a.push({key:"C",data:c}),e=c[4],r=c[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const c=s.map((l,h)=>h%2?l+r:l+e);a.push({key:"Q",data:c}),e=c[2],r=c[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const c=s.map((l,h)=>h%2?l+r:l+e);a.push({key:"S",data:c}),e=c[2],r=c[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=n}return a}function Tm(t){const e=[];let r="",i=0,n=0,a=0,o=0,s=0,c=0;for(const{key:l,data:h}of t){switch(l){case"M":e.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":e.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],c=h[3];break;case"L":e.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],e.push({key:"L",data:[i,n]});break;case"V":n=h[0],e.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=n+(n-c)):(u=i,f=n),e.push({key:"C",data:[u,f,...h]}),s=h[0],c=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let d=0,p=0;r==="Q"||r==="T"?(d=i+(i-s),p=n+(n-c)):(d=i,p=n);const m=i+2*(d-i)/3,y=n+2*(p-n)/3,x=u+2*(d-u)/3,b=f+2*(p-f)/3;e.push({key:"C",data:[m,y,x,b,u,f]}),s=d,c=p,i=u,n=f;break}case"Q":{const[u,f,d,p]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=d+2*(u-d)/3,b=p+2*(f-p)/3;e.push({key:"C",data:[m,y,x,b,d,p]}),s=u,c=f,i=d,n=p;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],p=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(e.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(Mm(i,n,y,x,u,f,d,p,m).forEach(function(b){e.push({key:"C",data:b})}),i=y,n=x);break}case"Z":e.push({key:"Z",data:[]}),i=a,n=o}r=l}return e}function Ji(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Mm(t,e,r,i,n,a,o,s,c,l){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,p=0,m=0,y=0;if(l)[d,p,m,y]=l;else{[t,e]=Ji(t,e,-h),[r,i]=Ji(r,i,-h);const L=(t-r)/2,M=(e-i)/2;let F=L*L/(n*n)+M*M/(a*a);F>1&&(F=Math.sqrt(F),n*=F,a*=F);const B=n*n,$=a*a,E=B*$-B*M*M-$*L*L,q=B*M*M+$*L*L,j=(s===c?-1:1)*Math.sqrt(Math.abs(E/q));m=j*n*M/a+(t+r)/2,y=j*-a*L/n+(e+i)/2,d=Math.asin(parseFloat(((e-y)/a).toFixed(9))),p=Math.asin(parseFloat(((i-y)/a).toFixed(9))),t<m&&(d=Math.PI-d),r<m&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),c&&d>p&&(d-=2*Math.PI),!c&&p>d&&(p-=2*Math.PI)}let x=p-d;if(Math.abs(x)>120*Math.PI/180){const L=p,M=r,F=i;p=c&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=Mm(r=m+n*Math.cos(p),i=y+a*Math.sin(p),M,F,n,a,o,0,c,[p,L,m,y])}x=p-d;const b=Math.cos(d),C=Math.sin(d),v=Math.cos(p),w=Math.sin(p),_=Math.tan(x/4),k=4/3*n*_,O=4/3*a*_,N=[t,e],D=[t+k*C,e-O*b],T=[r+k*w,i-O*v],R=[r,i];if(D[0]=2*N[0]-D[0],D[1]=2*N[1]-D[1],l)return[D,T,R].concat(f);{f=[D,T,R].concat(f);const L=[];for(let M=0;M<f.length;M+=3){const F=Ji(f[M][0],f[M][1],h),B=Ji(f[M+1][0],f[M+1][1],h),$=Ji(f[M+2][0],f[M+2][1],h);L.push([F[0],F[1],B[0],B[1],$[0],$[1]])}return L}}const wL={randOffset:function(t,e){return at(t,e)},randOffsetWithRange:function(t,e,r){return hs(t,e,r)},ellipse:function(t,e,r,i,n){const a=Lm(r,i,n);return wl(t,e,n,a).opset},doubleLineOps:function(t,e,r,i,n){return ur(t,e,r,i,n,!0)}};function Am(t,e,r,i,n){return{type:"path",ops:ur(t,e,r,i,n)}}function _a(t,e,r){const i=(t||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...ur(t[a][0],t[a][1],t[a+1][0],t[a+1][1],r));return e&&n.push(...ur(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:n}}return i===2?Am(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function vL(t,e,r,i,n){return function(a,o){return _a(a,!0,o)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],n)}function Ru(t,e){if(t.length){const r=typeof t[0][0]=="number"?[t]:t,i=ia(r[0],1*(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:ia(r[0],1.5*(1+.22*e.roughness),Nu(e));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const s=ia(o,1*(1+.2*e.roughness),e),c=e.disableMultiStroke?[]:ia(o,1.5*(1+.22*e.roughness),Nu(e));for(const l of s)l.op!=="move"&&i.push(l);for(const l of c)l.op!=="move"&&n.push(l)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function Lm(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let o=Math.abs(t/2),s=Math.abs(e/2);const c=1-r.curveFitting;return o+=at(o*c,r),s+=at(s*c,r),{increment:a,rx:o,ry:s}}function wl(t,e,r,i){const[n,a]=zu(i.increment,t,e,i.rx,i.ry,1,i.increment*hs(.1,hs(.4,1,r),r),r);let o=us(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=zu(i.increment,t,e,i.rx,i.ry,1.5,0,r),c=us(s,null,r);o=o.concat(c)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Iu(t,e,r,i,n,a,o,s,c){const l=t,h=e;let u=Math.abs(r/2),f=Math.abs(i/2);u+=at(.01*u,c),f+=at(.01*f,c);let d=n,p=a;for(;d<0;)d+=2*Math.PI,p+=2*Math.PI;p-d>2*Math.PI&&(d=0,p=2*Math.PI);const m=2*Math.PI/c.curveStepCount,y=Math.min(m/2,(p-d)/2),x=Wu(y,l,h,u,f,d,p,1,c);if(!c.disableMultiStroke){const b=Wu(y,l,h,u,f,d,p,1.5,c);x.push(...b)}return o&&(s?x.push(...ur(l,h,l+u*Math.cos(d),h+f*Math.sin(d),c),...ur(l,h,l+u*Math.cos(p),h+f*Math.sin(p),c)):x.push({op:"lineTo",data:[l,h]},{op:"lineTo",data:[l+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function Pu(t,e){const r=Tm(Sm(Dc(t))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...ur(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[c,l,h,u,f,d]=s;i.push(...kL(c,l,h,u,f,d,a,e)),a=[f,d];break}case"Z":i.push(...ur(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Mo(t,e){const r=[];for(const i of t)if(i.length){const n=e.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+at(n,e),i[0][1]+at(n,e)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+at(n,e),i[o][1]+at(n,e)]})}}return{type:"fillPath",ops:r}}function Zr(t,e){return function(r,i){let n=r.fillStyle||"hachure";if(!oe[n])switch(n){case"zigzag":oe[n]||(oe[n]=new gL(i));break;case"cross-hatch":oe[n]||(oe[n]=new mL(i));break;case"dots":oe[n]||(oe[n]=new yL(i));break;case"dashed":oe[n]||(oe[n]=new xL(i));break;case"zigzag-line":oe[n]||(oe[n]=new bL(i));break;default:n="hachure",oe[n]||(oe[n]=new $c(i))}return oe[n]}(e,wL).fillPolygons(t,e)}function Nu(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Bm(t){return t.randomizer||(t.randomizer=new _L(t.seed||0)),t.randomizer.next()}function hs(t,e,r,i=1){return r.roughness*i*(Bm(r)*(e-t)+t)}function at(t,e,r=1){return hs(-t,t,e,r)}function ur(t,e,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=vl(t,e,r,i,n,!0,!1);if(o)return s;const c=vl(t,e,r,i,n,!0,!0);return s.concat(c)}function vl(t,e,r,i,n,a,o){const s=Math.pow(t-r,2)+Math.pow(e-i,2),c=Math.sqrt(s);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=c/10);const u=h/2,f=.2+.2*Bm(n);let d=n.bowing*n.maxRandomnessOffset*(i-e)/200,p=n.bowing*n.maxRandomnessOffset*(t-r)/200;d=at(d,n,l),p=at(p,n,l);const m=[],y=()=>at(u,n,l),x=()=>at(h,n,l),b=n.preserveVertices;return o?m.push({op:"move",data:[t+(b?0:y()),e+(b?0:y())]}):m.push({op:"move",data:[t+(b?0:at(h,n,l)),e+(b?0:at(h,n,l))]}),o?m.push({op:"bcurveTo",data:[d+t+(r-t)*f+y(),p+e+(i-e)*f+y(),d+t+2*(r-t)*f+y(),p+e+2*(i-e)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+t+(r-t)*f+x(),p+e+(i-e)*f+x(),d+t+2*(r-t)*f+x(),p+e+2*(i-e)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function ia(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+at(e,r),t[0][1]+at(e,r)]),i.push([t[0][0]+at(e,r),t[0][1]+at(e,r)]);for(let n=1;n<t.length;n++)i.push([t[n][0]+at(e,r),t[n][1]+at(e,r)]),n===t.length-1&&i.push([t[n][0]+at(e,r),t[n][1]+at(e,r)]);return us(i,null,r)}function us(t,e,r){const i=t.length,n=[];if(i>3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let s=1;s+2<i;s++){const c=t[s];a[0]=[c[0],c[1]],a[1]=[c[0]+(o*t[s+1][0]-o*t[s-1][0])/6,c[1]+(o*t[s+1][1]-o*t[s-1][1])/6],a[2]=[t[s+1][0]+(o*t[s][0]-o*t[s+2][0])/6,t[s+1][1]+(o*t[s][1]-o*t[s+2][1])/6],a[3]=[t[s+1][0],t[s+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):i===2&&n.push(...vl(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return n}function zu(t,e,r,i,n,a,o,s){const c=[],l=[];if(s.roughness===0){t/=4,l.push([e+i*Math.cos(-t),r+n*Math.sin(-t)]);for(let h=0;h<=2*Math.PI;h+=t){const u=[e+i*Math.cos(h),r+n*Math.sin(h)];c.push(u),l.push(u)}l.push([e+i*Math.cos(0),r+n*Math.sin(0)]),l.push([e+i*Math.cos(t),r+n*Math.sin(t)])}else{const h=at(.5,s)-Math.PI/2;l.push([at(a,s)+e+.9*i*Math.cos(h-t),at(a,s)+r+.9*n*Math.sin(h-t)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=t){const d=[at(a,s)+e+i*Math.cos(f),at(a,s)+r+n*Math.sin(f)];c.push(d),l.push(d)}l.push([at(a,s)+e+i*Math.cos(h+2*Math.PI+.5*o),at(a,s)+r+n*Math.sin(h+2*Math.PI+.5*o)]),l.push([at(a,s)+e+.98*i*Math.cos(h+o),at(a,s)+r+.98*n*Math.sin(h+o)]),l.push([at(a,s)+e+.9*i*Math.cos(h+.5*o),at(a,s)+r+.9*n*Math.sin(h+.5*o)])}return[l,c]}function Wu(t,e,r,i,n,a,o,s,c){const l=a+at(.1,c),h=[];h.push([at(s,c)+e+.9*i*Math.cos(l-t),at(s,c)+r+.9*n*Math.sin(l-t)]);for(let u=l;u<=o;u+=t)h.push([at(s,c)+e+i*Math.cos(u),at(s,c)+r+n*Math.sin(u)]);return h.push([e+i*Math.cos(o),r+n*Math.sin(o)]),h.push([e+i*Math.cos(o),r+n*Math.sin(o)]),us(h,null,c)}function kL(t,e,r,i,n,a,o,s){const c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let d=0;d<u;d++)d===0?c.push({op:"move",data:[o[0],o[1]]}):c.push({op:"move",data:[o[0]+(f?0:at(l[0],s)),o[1]+(f?0:at(l[0],s))]}),h=f?[n,a]:[n+at(l[d],s),a+at(l[d],s)],c.push({op:"bcurveTo",data:[t+at(l[d],s),e+at(l[d],s),r+at(l[d],s),i+at(l[d],s),h[0],h[1]]});return c}function tn(t){return[...t]}function qu(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(tn(t[0]),tn(t[1]),tn(t[2]),tn(t[2]));else{const n=[];n.push(t[0],t[0]);for(let s=1;s<t.length;s++)n.push(t[s]),s===t.length-1&&n.push(t[s]);const a=[],o=1-e;i.push(tn(n[0]));for(let s=1;s+2<n.length;s++){const c=n[s];a[0]=[c[0],c[1]],a[1]=[c[0]+(o*n[s+1][0]-o*n[s-1][0])/6,c[1]+(o*n[s+1][1]-o*n[s-1][1])/6],a[2]=[n[s+1][0]+(o*n[s][0]-o*n[s+2][0])/6,n[s+1][1]+(o*n[s][1]-o*n[s+2][1])/6],a[3]=[n[s+1][0],n[s+1][1]],i.push(a[1],a[2],a[3])}}return i}function Ca(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function SL(t,e,r){const i=Ca(e,r);if(i===0)return Ca(t,e);let n=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return n=Math.max(0,Math.min(1,n)),Ca(t,br(e,r,n))}function br(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function kl(t,e,r,i){const n=i||[];if(function(s,c){const l=s[c+0],h=s[c+1],u=s[c+2],f=s[c+3];let d=3*h[0]-2*l[0]-f[0];d*=d;let p=3*h[1]-2*l[1]-f[1];p*=p;let m=3*u[0]-2*f[0]-l[0];m*=m;let y=3*u[1]-2*f[1]-l[1];return y*=y,d<m&&(d=m),p<y&&(p=y),d+p}(t,e)<r){const s=t[e+0];n.length?(a=n[n.length-1],o=s,Math.sqrt(Ca(a,o))>1&&n.push(s)):n.push(s),n.push(t[e+3])}else{const c=t[e+0],l=t[e+1],h=t[e+2],u=t[e+3],f=br(c,l,.5),d=br(l,h,.5),p=br(h,u,.5),m=br(f,d,.5),y=br(d,p,.5),x=br(m,y,.5);kl([c,f,m,x],0,r,n),kl([x,y,p,u],0,r,n)}var a,o;return n}function TL(t,e){return fs(t,0,t.length,e)}function fs(t,e,r,i,n){const a=n||[],o=t[e],s=t[r-1];let c=0,l=1;for(let h=e+1;h<r-1;++h){const u=SL(t[h],o,s);u>c&&(c=u,l=h)}return Math.sqrt(c)>i?(fs(t,e,l+1,i,a),fs(t,l,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Ao(t,e=.15,r){const i=[],n=(t.length-1)/3;for(let a=0;a<n;a++)kl(t,3*a,e,i);return r&&r>0?fs(i,0,i.length,r):i}const ue="none";class ds{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,i){return{shape:e,sets:r||[],options:i||this.defaultOptions}}line(e,r,i,n,a){const o=this._o(a);return this._d("line",[Am(e,r,i,n,o)],o)}rectangle(e,r,i,n,a){const o=this._o(a),s=[],c=vL(e,r,i,n,o);if(o.fill){const l=[[e,r],[e+i,r],[e+i,r+n],[e,r+n]];o.fillStyle==="solid"?s.push(Mo([l],o)):s.push(Zr([l],o))}return o.stroke!==ue&&s.push(c),this._d("rectangle",s,o)}ellipse(e,r,i,n,a){const o=this._o(a),s=[],c=Lm(i,n,o),l=wl(e,r,o,c);if(o.fill)if(o.fillStyle==="solid"){const h=wl(e,r,o,c).opset;h.type="fillPath",s.push(h)}else s.push(Zr([l.estimatedPoints],o));return o.stroke!==ue&&s.push(l.opset),this._d("ellipse",s,o)}circle(e,r,i,n){const a=this.ellipse(e,r,i,i,n);return a.shape="circle",a}linearPath(e,r){const i=this._o(r);return this._d("linearPath",[_a(e,!1,i)],i)}arc(e,r,i,n,a,o,s=!1,c){const l=this._o(c),h=[],u=Iu(e,r,i,n,a,o,s,!0,l);if(s&&l.fill)if(l.fillStyle==="solid"){const f=Object.assign({},l);f.disableMultiStroke=!0;const d=Iu(e,r,i,n,a,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,p,m,y,x,b){const C=f,v=d;let w=Math.abs(p/2),_=Math.abs(m/2);w+=at(.01*w,b),_+=at(.01*_,b);let k=y,O=x;for(;k<0;)k+=2*Math.PI,O+=2*Math.PI;O-k>2*Math.PI&&(k=0,O=2*Math.PI);const N=(O-k)/b.curveStepCount,D=[];for(let T=k;T<=O;T+=N)D.push([C+w*Math.cos(T),v+_*Math.sin(T)]);return D.push([C+w*Math.cos(O),v+_*Math.sin(O)]),D.push([C,v]),Zr([D],b)}(e,r,i,n,a,o,l));return l.stroke!==ue&&h.push(u),this._d("arc",h,l)}curve(e,r){const i=this._o(r),n=[],a=Ru(e,i);if(i.fill&&i.fill!==ue)if(i.fillStyle==="solid"){const o=Ru(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=e;if(s.length){const c=typeof s[0][0]=="number"?[s]:s;for(const l of c)l.length<3?o.push(...l):l.length===3?o.push(...Ao(qu([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):o.push(...Ao(qu(l),10,(1+i.roughness)/2))}o.length&&n.push(Zr([o],i))}return i.stroke!==ue&&n.push(a),this._d("curve",n,i)}polygon(e,r){const i=this._o(r),n=[],a=_a(e,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Mo([e],i)):n.push(Zr([e],i))),i.stroke!==ue&&n.push(a),this._d("polygon",n,i)}path(e,r){const i=this._o(r),n=[];if(!e)return this._d("path",n,i);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ue,o=i.stroke!==ue,s=!!(i.simplification&&i.simplification<1),c=function(h,u,f){const d=Tm(Sm(Dc(h))),p=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Ao(x,u)),x=[]},C=()=>{b(),m.length&&(p.push(m),m=[])};for(const{key:w,data:_}of d)switch(w){case"M":C(),y=[_[0],_[1]],m.push(y);break;case"L":b(),m.push([_[0],_[1]]);break;case"C":if(!x.length){const k=m.length?m[m.length-1]:y;x.push([k[0],k[1]])}x.push([_[0],_[1]]),x.push([_[2],_[3]]),x.push([_[4],_[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(C(),!f)return p;const v=[];for(const w of p){const _=TL(w,f);_.length&&v.push(_)}return v}(e,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),l=Pu(e,i);if(a)if(i.fillStyle==="solid")if(c.length===1){const h=Pu(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(Mo(c,i));else n.push(Zr(c,i));return o&&(s?c.forEach(h=>{n.push(_a(h,!1,i))}):n.push(l)),this._d("path",n,i)}opsToPath(e,r){let i="";for(const n of e.ops){const a=typeof r=="number"&&r>=0?n.data.map(o=>+o.toFixed(r)):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(e){const r=e.sets||[],i=e.options||this.defaultOptions,n=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ue};break;case"fillPath":o={d:this.opsToPath(a),stroke:ue,strokeWidth:0,fill:i.fill||ue};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(e,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||ue,strokeWidth:i,fill:ue}}_mergedShape(e){return e.filter((r,i)=>i===0||r.op!=="move")}}class ML{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new ds(r)}draw(e){const r=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const s=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(e,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),e.save(),i.fillLineDash&&e.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(e.lineDashOffset=i.fillLineDashOffset),e.strokeStyle=i.fill||"",e.lineWidth=n,this._drawToContext(e,r,i.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,i,n="nonzero"){e.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(s=>+s.toFixed(i)):a.data;switch(a.op){case"move":e.moveTo(o[0],o[1]);break;case"bcurveTo":e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":e.lineTo(o[0],o[1])}}r.type==="fillPath"?e.fill(n):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,i,n,a){const o=this.gen.line(e,r,i,n,a);return this.draw(o),o}rectangle(e,r,i,n,a){const o=this.gen.rectangle(e,r,i,n,a);return this.draw(o),o}ellipse(e,r,i,n,a){const o=this.gen.ellipse(e,r,i,n,a);return this.draw(o),o}circle(e,r,i,n){const a=this.gen.circle(e,r,i,n);return this.draw(a),a}linearPath(e,r){const i=this.gen.linearPath(e,r);return this.draw(i),i}polygon(e,r){const i=this.gen.polygon(e,r);return this.draw(i),i}arc(e,r,i,n,a,o,s=!1,c){const l=this.gen.arc(e,r,i,n,a,o,s,c);return this.draw(l),l}curve(e,r){const i=this.gen.curve(e,r);return this.draw(i),i}path(e,r){const i=this.gen.path(e,r);return this.draw(i),i}}const na="http://www.w3.org/2000/svg";class AL{constructor(e,r){this.svg=e,this.gen=new ds(r)}draw(e){const r=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(na,"g"),o=e.options.fixedDecimalPlaceDigits;for(const s of r){let c=null;switch(s.type){case"path":c=n.createElementNS(na,"path"),c.setAttribute("d",this.opsToPath(s,o)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=n.createElementNS(na,"path"),c.setAttribute("d",this.opsToPath(s,o)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(n,s,i)}c&&a.appendChild(c)}return a}fillSketch(e,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=e.createElementNS(na,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,i,n,a){const o=this.gen.line(e,r,i,n,a);return this.draw(o)}rectangle(e,r,i,n,a){const o=this.gen.rectangle(e,r,i,n,a);return this.draw(o)}ellipse(e,r,i,n,a){const o=this.gen.ellipse(e,r,i,n,a);return this.draw(o)}circle(e,r,i,n){const a=this.gen.circle(e,r,i,n);return this.draw(a)}linearPath(e,r){const i=this.gen.linearPath(e,r);return this.draw(i)}polygon(e,r){const i=this.gen.polygon(e,r);return this.draw(i)}arc(e,r,i,n,a,o,s=!1,c){const l=this.gen.arc(e,r,i,n,a,o,s,c);return this.draw(l)}curve(e,r){const i=this.gen.curve(e,r);return this.draw(i)}path(e,r){const i=this.gen.path(e,r);return this.draw(i)}}var X={canvas:(t,e)=>new ML(t,e),svg:(t,e)=>new AL(t,e),generator:t=>new ds(t),newSeed:()=>ds.newSeed()},ct=g(async(t,e,r)=>{var u,f;let i;const n=e.useHtmlLabels||Ot((u=xt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",re(e.labelStyle));let s;e.label===void 0?s="":s=typeof e.label=="string"?e.label:e.label[0];const c=await pr(o,Ar(qr(s),xt()),{useHtmlLabels:n,width:e.width||((f=xt().flowchart)==null?void 0:f.wrappingWidth),cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let l=c.getBBox();const h=((e==null?void 0:e.padding)??0)/2;if(n){const d=c.children[0],p=gt(c),m=d.getElementsByTagName("img");if(m){const y=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(x=>new Promise(b=>{function C(){if(x.style.display="flex",x.style.flexDirection="column",y){const v=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[_=bf.fontSize]=Is(v),k=_*w+"px";x.style.minWidth=k,x.style.maxWidth=k}else x.style.width="100%";b(x)}g(C,"setupImage"),setTimeout(()=>{x.complete&&C()}),x.addEventListener("error",C),x.addEventListener("load",C)})))}l=d.getBoundingClientRect(),p.attr("width",l.width),p.attr("height",l.height)}return n?o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):o.attr("transform","translate(0, "+-l.height/2+")"),e.centerLabel&&o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:l,halfPadding:h,label:o}},"labelHelper"),Lo=g(async(t,e,r)=>{var c,l,h,u,f,d;const i=r.useHtmlLabels||Ot((l=(c=xt())==null?void 0:c.flowchart)==null?void 0:l.htmlLabels),n=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await pr(n,Ar(qr(e),xt()),{useHtmlLabels:i,width:r.width||((u=(h=xt())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(Ot((d=(f=xt())==null?void 0:f.flowchart)==null?void 0:d.htmlLabels)){const p=a.children[0],m=gt(a);o=p.getBoundingClientRect(),m.attr("width",o.width),m.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:o,halfPadding:s,label:n}},"insertLabel"),Q=g((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),st=g((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function mt(t){const e=t.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}g(mt,"createPathFromPoints");function fr(t,e,r,i,n,a){const o=[],c=r-t,l=i-e,h=c/a,u=2*Math.PI/h,f=e+l/2;for(let d=0;d<=50;d++){const p=d/50,m=t+p*c,y=f+n*Math.sin(u*(m-t));o.push({x:m,y})}return o}g(fr,"generateFullSineWavePoints");function Oc(t,e,r,i,n,a){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=t+r*Math.cos(f),p=e+r*Math.sin(f);o.push({x:-d,y:-p})}return o}g(Oc,"generateCirclePoints");var LL=g((t,e)=>{var r=t.x,i=t.y,n=e.x-r,a=e.y-i,o=t.width/2,s=t.height/2,c,l;return Math.abs(a)*o>Math.abs(n)*s?(a<0&&(s=-s),c=a===0?0:s*n/a,l=s):(n<0&&(o=-o),c=o,l=n===0?0:o*a/n),{x:r+c,y:i+l}},"intersectRect"),$i=LL;function Em(t,e){e&&t.attr("style",e)}g(Em,"applyStyle");async function Fm(t){const e=gt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let i=t.label;t.label&&bi(t.label)&&(i=await Il(t.label.replace(Li.lineBreakRegex,`
|
||
`),xt()));const n=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+n+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),Em(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}g(Fm,"addHtmlLabel");var BL=g(async(t,e,r,i)=>{let n=t||"";if(typeof n=="object"&&(n=n[0]),Ot(xt().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),I.info("vertexText"+n);const a={isNode:i,label:qr(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:e&&e.replace("fill:","color:")};return await Fm(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?o=n:o=[];for(const s of o){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=s.trim(),a.appendChild(c)}return a}},"createLabel"),Sr=BL,nr=g((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),$m=g(async(t,e)=>{I.info("Creating subgraph rect for ",e.id,e);const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:h}=J(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),f=Ot(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),p=await pr(d,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0});let m=p.getBBox();if(Ot(r.flowchart.htmlLabels)){const k=p.children[0],O=gt(p);m=k.getBoundingClientRect(),O.attr("width",m.width),O.attr("height",m.height)}const y=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const x=e.height,b=e.x-y/2,C=e.y-x/2;I.trace("Data ",e,JSON.stringify(e));let v;if(e.look==="handDrawn"){const k=X.svg(u),O=K(e,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),N=k.path(nr(b,C,y,x,0),O);v=u.insert(()=>(I.debug("Rough node insert CXC",N),N),":first-child"),v.select("path:nth-child(2)").attr("style",l.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",c).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=Xl(r);if(d.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+w})`),s){const k=d.select("span");k&&k.attr("style",s)}const _=v.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=m.height-e.padding/2,e.intersect=function(k){return $i(e,k)},{cluster:u,labelBBox:m}},"rect"),EL=g((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,a=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(s){return $i(e,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),FL=g(async(t,e)=>{const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:c}=i,l=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=l.insert("g",":first-child"),u=l.insert("g").attr("class","cluster-label");let f=l.append("rect");const d=u.node().appendChild(await Sr(e.label,e.labelStyle,void 0,!0));let p=d.getBBox();if(Ot(r.flowchart.htmlLabels)){const N=d.children[0],D=gt(d);p=N.getBoundingClientRect(),D.attr("width",p.width),D.attr("height",p.height)}const m=0*e.padding,y=m/2,x=(e.width<=p.width+e.padding?p.width+e.padding:e.width)+m;e.width<=p.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height+m,C=e.height+m-p.height-6,v=e.x-x/2,w=e.y-b/2;e.width=x;const _=e.y-e.height/2-y+p.height+2;let k;if(e.look==="handDrawn"){const N=e.cssClasses.includes("statediagram-cluster-alt"),D=X.svg(l),T=e.rx||e.ry?D.path(nr(v,w,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:c,seed:n}):D.rectangle(v,w,x,b,{seed:n});k=l.insert(()=>T,":first-child");const R=D.rectangle(v,_,x,C,{fill:N?a:o,fillStyle:N?"hachure":"solid",stroke:c,seed:n});k=l.insert(()=>T,":first-child"),f=l.insert(()=>R)}else k=h.insert("rect",":first-child"),k.attr("class","outer").attr("x",v).attr("y",w).attr("width",x).attr("height",b).attr("data-look",e.look),f.attr("class","inner").attr("x",v).attr("y",_).attr("width",x).attr("height",C);u.attr("transform",`translate(${e.x-p.width/2}, ${w+1-(Ot(r.flowchart.htmlLabels)?0:3)})`);const O=k.node().getBBox();return e.height=O.height,e.offsetX=0,e.offsetY=p.height-e.padding/2,e.labelBBox=p,e.intersect=function(N){return $i(e,N)},{cluster:l,labelBBox:p}},"roundedWithTitle"),$L=g(async(t,e)=>{I.info("Creating subgraph rect for ",e.id,e);const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:h}=J(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),f=Ot(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),p=await pr(d,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0,width:e.width});let m=p.getBBox();if(Ot(r.flowchart.htmlLabels)){const k=p.children[0],O=gt(p);m=k.getBoundingClientRect(),O.attr("width",m.width),O.attr("height",m.height)}const y=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const x=e.height,b=e.x-y/2,C=e.y-x/2;I.trace("Data ",e,JSON.stringify(e));let v;if(e.look==="handDrawn"){const k=X.svg(u),O=K(e,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),N=k.path(nr(b,C,y,x,e.rx),O);v=u.insert(()=>(I.debug("Rough node insert CXC",N),N),":first-child"),v.select("path:nth-child(2)").attr("style",l.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",c).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=Xl(r);if(d.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+w})`),s){const k=d.select("span");k&&k.attr("style",s)}const _=v.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=m.height-e.padding/2,e.intersect=function(k){return $i(e,k)},{cluster:u,labelBBox:m}},"kanbanSection"),DL=g((t,e)=>{const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),s=o.insert("g",":first-child"),c=0*e.padding,l=e.width+c;e.diff=-e.padding;const h=e.height+c,u=e.x-l/2,f=e.y-h/2;e.width=l;let d;if(e.look==="handDrawn"){const y=X.svg(o).rectangle(u,f,l,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});d=o.insert(()=>y,":first-child")}else d=s.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",l).attr("height",h).attr("data-look",e.look);const p=d.node().getBBox();return e.height=p.height,e.offsetX=0,e.offsetY=0,e.intersect=function(m){return $i(e,m)},{cluster:o,labelBBox:{}}},"divider"),OL=$m,RL={rect:$m,squareRect:OL,roundedWithTitle:FL,noteGroup:EL,divider:DL,kanbanSection:$L},Dm=new Map,IL=g(async(t,e)=>{const r=e.shape||"rect",i=await RL[r](t,e);return Dm.set(e.id,i),i},"insertCluster"),s$=g(()=>{Dm=new Map},"clear");function Om(t,e){return t.intersect(e)}g(Om,"intersectNode");var PL=Om;function Rm(t,e,r,i){var n=t.x,a=t.y,o=n-i.x,s=a-i.y,c=Math.sqrt(e*e*s*s+r*r*o*o),l=Math.abs(e*r*o/c);i.x<n&&(l=-l);var h=Math.abs(e*r*s/c);return i.y<a&&(h=-h),{x:n+l,y:a+h}}g(Rm,"intersectEllipse");var Im=Rm;function Pm(t,e,r){return Im(t,e,e,r)}g(Pm,"intersectCircle");var NL=Pm;function Nm(t,e,r,i){var n,a,o,s,c,l,h,u,f,d,p,m,y,x,b;if(n=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=n*r.x+o*r.y+c,d=n*i.x+o*i.y+c,!(f!==0&&d!==0&&Sl(f,d))&&(a=i.y-r.y,s=r.x-i.x,l=i.x*r.y-r.x*i.y,h=a*t.x+s*t.y+l,u=a*e.x+s*e.y+l,!(h!==0&&u!==0&&Sl(h,u))&&(p=n*s-a*o,p!==0)))return m=Math.abs(p/2),y=o*l-s*c,x=y<0?(y-m)/p:(y+m)/p,y=a*c-n*l,b=y<0?(y-m)/p:(y+m)/p,{x,y:b}}g(Nm,"intersectLine");function Sl(t,e){return t*e>0}g(Sl,"sameSign");var zL=Nm;function zm(t,e,r){let i=t.x,n=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));let c=i-t.width/2-o,l=n-t.height/2-s;for(let h=0;h<e.length;h++){let u=e[h],f=e[h<e.length-1?h+1:0],d=zL(t,r,{x:c+u.x,y:l+u.y},{x:c+f.x,y:l+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,p=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return p<x?-1:p===x?0:1}),a[0]):t}g(zm,"intersectPolygon");var WL=zm,V={node:PL,circle:NL,ellipse:Im,polygon:WL,rect:$i};function Wm(t,e){const{labelStyles:r}=J(e);e.labelStyle=r;const i=st(e);let n=i;i||(n="anchor");const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=1,{cssStyles:s}=e,c=X.svg(a),l=K(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(l.roughness=0);const h=c.circle(0,0,o*2,l),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",re(s)),Q(e,u),e.intersect=function(f){return I.info("Circle intersect",e,o,f),V.circle(e,o,f)},a}g(Wm,"anchor");function Tl(t,e,r,i,n,a,o){const c=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),u=(r-t)/2,f=(i-e)/2,d=u/n,p=f/a,m=Math.sqrt(d**2+p**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=c+y*a*Math.sin(h)*(o?-1:1),b=l-y*n*Math.cos(h)*(o?-1:1),C=Math.atan2((e-b)/a,(t-x)/n);let w=Math.atan2((i-b)/a,(r-x)/n)-C;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const _=[];for(let k=0;k<20;k++){const O=k/19,N=C+O*w,D=x+n*Math.cos(N),T=b+a*Math.sin(N);_.push({x:D,y:T})}return _}g(Tl,"generateArcPoints");async function qm(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=a.width+e.padding+20,s=a.height+e.padding,c=s/2,l=c/(2.5+s/50),{cssStyles:h}=e,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Tl(-o/2,-s/2,-o/2,s/2,l,c,!1),{x:o/2,y:s/2},...Tl(o/2,s/2,o/2,-s/2,l,c,!0)],f=X.svg(n),d=K(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=mt(u),m=f.path(p,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${l/2}, 0)`),Q(e,y),e.intersect=function(x){return V.polygon(e,u,x)},n}g(qm,"bowTieRect");function ar(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}g(ar,"insertPolygonShape");async function Hm(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=a.height+e.padding,s=12,c=a.width+e.padding+s,l=0,h=c,u=-o,f=0,d=[{x:l+s,y:u},{x:h,y:u},{x:h,y:f},{x:l,y:f},{x:l,y:u+s},{x:l+s,y:u}];let p;const{cssStyles:m}=e;if(e.look==="handDrawn"){const y=X.svg(n),x=K(e,{}),b=mt(d),C=y.path(b,x);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${o/2})`),m&&p.attr("style",m)}else p=ar(n,c,o,d);return i&&p.attr("style",i),Q(e,p),e.intersect=function(y){return V.polygon(e,d,y)},n}g(Hm,"card");function Um(t,e){const{nodeStyles:r}=J(e);e.label="";const i=t.insert("g").attr("class",st(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,a=Math.max(28,e.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=X.svg(i),c=K(e,{});e.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=mt(o),h=s.path(l,c),u=i.insert(()=>h,":first-child");return n&&e.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&e.look!=="handDrawn"&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(f){return V.polygon(e,o,f)},i}g(Um,"choice");async function jm(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await ct(t,e,st(e)),s=a.width/2+o;let c;const{cssStyles:l}=e;if(e.look==="handDrawn"){const h=X.svg(n),u=K(e,{}),f=h.circle(0,0,s*2,u);c=n.insert(()=>f,":first-child"),c.attr("class","basic label-container").attr("style",re(l))}else c=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return Q(e,c),e.intersect=function(h){return I.info("Circle intersect",e,s,h),V.circle(e,s,h)},n}g(jm,"circle");function Ym(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=t*2,n={x:i/2*e,y:i/2*r},a={x:-(i/2)*e,y:i/2*r},o={x:-(i/2)*e,y:-(i/2)*r},s={x:i/2*e,y:-(i/2)*r};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
||
M ${n.x},${n.y} L ${o.x},${o.y}`}g(Ym,"createLine");function Gm(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r,e.label="";const n=t.insert("g").attr("class",st(e)).attr("id",e.domId??e.id),a=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:o}=e,s=X.svg(n),c=K(e,{});e.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=s.circle(0,0,a*2,c),h=Ym(a),u=s.path(h,c),f=n.insert(()=>l,":first-child");return f.insert(()=>u),o&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Q(e,f),e.intersect=function(d){return I.info("crossedCircle intersect",e,{radius:a,point:d}),V.circle(e,a,d)},n}g(Gm,"crossedCircle");function Ue(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=t+r*Math.cos(f),p=e+r*Math.sin(f);o.push({x:-d,y:-p})}return o}g(Ue,"generateCirclePoints");async function Vm(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=a.width+(e.padding??0),c=a.height+(e.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=e,u=[...Ue(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...Ue(s/2+l*2,-l,l,20,-180,-270),...Ue(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...Ue(s/2,c/2,l,20,0,90)],f=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...Ue(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...Ue(s/2+s*.1,-l,l,20,-180,-270),...Ue(s/2+s*.1,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...Ue(s/2,c/2,l,20,0,90),{x:-s/2,y:c/2+l},{x:s/2,y:c/2+l}],d=X.svg(n),p=K(e,{fill:"none"});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=mt(u).replace("Z",""),x=d.path(y,p),b=mt(f),C=d.path(b,{...p}),v=n.insert("g",":first-child");return v.insert(()=>C,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${l}, 0)`),o.attr("transform",`translate(${-s/2+l-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Q(e,v),e.intersect=function(w){return V.polygon(e,f,w)},n}g(Vm,"curlyBraceLeft");function je(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=t+r*Math.cos(f),p=e+r*Math.sin(f);o.push({x:d,y:p})}return o}g(je,"generateCirclePoints");async function Xm(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=a.width+(e.padding??0),c=a.height+(e.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=e,u=[...je(s/2,-c/2,l,20,-90,0),{x:s/2+l,y:-l},...je(s/2+l*2,-l,l,20,-180,-270),...je(s/2+l*2,l,l,20,-90,-180),{x:s/2+l,y:c/2},...je(s/2,c/2,l,20,0,90)],f=[{x:-s/2,y:-c/2-l},{x:s/2,y:-c/2-l},...je(s/2,-c/2,l,20,-90,0),{x:s/2+l,y:-l},...je(s/2+l*2,-l,l,20,-180,-270),...je(s/2+l*2,l,l,20,-90,-180),{x:s/2+l,y:c/2},...je(s/2,c/2,l,20,0,90),{x:s/2,y:c/2+l},{x:-s/2,y:c/2+l}],d=X.svg(n),p=K(e,{fill:"none"});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=mt(u).replace("Z",""),x=d.path(y,p),b=mt(f),C=d.path(b,{...p}),v=n.insert("g",":first-child");return v.insert(()=>C,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-l}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Q(e,v),e.intersect=function(w){return V.polygon(e,f,w)},n}g(Xm,"curlyBraceRight");function Wt(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=t+r*Math.cos(f),p=e+r*Math.sin(f);o.push({x:-d,y:-p})}return o}g(Wt,"generateCirclePoints");async function Zm(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=a.width+(e.padding??0),c=a.height+(e.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=e,u=[...Wt(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...Wt(s/2+l*2,-l,l,20,-180,-270),...Wt(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...Wt(s/2,c/2,l,20,0,90)],f=[...Wt(-s/2+l+l/2,-c/2,l,20,-90,-180),{x:s/2-l/2,y:l},...Wt(-s/2-l/2,-l,l,20,0,90),...Wt(-s/2-l/2,l,l,20,-90,0),{x:s/2-l/2,y:-l},...Wt(-s/2+l+l/2,c/2,l,30,-180,-270)],d=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...Wt(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...Wt(s/2+l*2,-l,l,20,-180,-270),...Wt(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...Wt(s/2,c/2,l,20,0,90),{x:-s/2,y:c/2+l},{x:s/2-l-l/2,y:c/2+l},...Wt(-s/2+l+l/2,-c/2,l,20,-90,-180),{x:s/2-l/2,y:l},...Wt(-s/2-l/2,-l,l,20,0,90),...Wt(-s/2-l/2,l,l,20,-90,0),{x:s/2-l/2,y:-l},...Wt(-s/2+l+l/2,c/2,l,30,-180,-270)],p=X.svg(n),m=K(e,{fill:"none"});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=mt(u).replace("Z",""),b=p.path(x,m),v=mt(f).replace("Z",""),w=p.path(v,m),_=mt(d),k=p.path(_,{...m}),O=n.insert("g",":first-child");return O.insert(()=>k,":first-child").attr("stroke-opacity",0),O.insert(()=>b,":first-child"),O.insert(()=>w,":first-child"),O.attr("class","text"),h&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",h),i&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(${l-l/4}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Q(e,O),e.intersect=function(N){return V.polygon(e,d,N)},n}g(Zm,"curlyBraces");async function Km(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=80,s=20,c=Math.max(o,(a.width+(e.padding??0)*2)*1.25,(e==null?void 0:e.width)??0),l=Math.max(s,a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=l/2,{cssStyles:u}=e,f=X.svg(n),d=K(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=c,m=l,y=p-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Oc(-y,-m/2,h,50,270,90)],C=mt(b),v=f.path(C,d),w=n.insert(()=>v,":first-child");return w.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",u),i&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-c/2}, ${-l/2})`),Q(e,w),e.intersect=function(_){return V.polygon(e,b,_)},n}g(Km,"curvedTrapezoid");var qL=g((t,e,r,i,n,a)=>[`M${t},${e+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),HL=g((t,e,r,i,n,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),UL=g((t,e,r,i,n,a)=>[`M${t-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Qm(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Math.max(a.width+e.padding,e.width??0),c=s/2,l=c/(2.5+s/50),h=Math.max(a.height+l+e.padding,e.height??0);let u;const{cssStyles:f}=e;if(e.look==="handDrawn"){const d=X.svg(n),p=HL(0,0,s,h,c,l),m=UL(0,l,s,h,c,l),y=d.path(p,K(e,{})),x=d.path(m,K(e,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=qL(0,0,s,h,c,l);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",re(f)).attr("style",i)}return u.attr("label-offset-y",l),u.attr("transform",`translate(${-s/2}, ${-(h/2+l)})`),Q(e,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(d){const p=V.rect(e,d),m=p.x-(e.x??0);if(c!=0&&(Math.abs(m)<(e.width??0)/2||Math.abs(m)==(e.width??0)/2&&Math.abs(p.y-(e.y??0))>(e.height??0)/2-l)){let y=l*l*(1-m*m/(c*c));y>0&&(y=Math.sqrt(y)),y=l-y,d.y-(e.y??0)>0&&(y=-y),p.y+=y}return p},n}g(Qm,"cylinder");async function Jm(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=a.width+e.padding,c=a.height+e.padding,l=c*.2,h=-s/2,u=-c/2-l/2,{cssStyles:f}=e,d=X.svg(n),p=K(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:h,y:u+l},{x:-h,y:u+l},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+l}],y=d.polygon(m.map(b=>[b.x,b.y]),p),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(e.padding??0)/2-(a.x-(a.left??0))}, ${u+l+(e.padding??0)/2-(a.y-(a.top??0))})`),Q(e,x),e.intersect=function(b){return V.rect(e,b)},n}g(Jm,"dividedRectangle");async function t0(t,e){var f,d;const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await ct(t,e,st(e)),c=a.width/2+o+5,l=a.width/2+o;let h;const{cssStyles:u}=e;if(e.look==="handDrawn"){const p=X.svg(n),m=K(e,{roughness:.2,strokeWidth:2.5}),y=K(e,{roughness:.2,strokeWidth:1.5}),x=p.circle(0,0,c*2,m),b=p.circle(0,0,l*2,y);h=n.insert("g",":first-child"),h.attr("class",re(e.cssClasses)).attr("style",re(u)),(f=h.node())==null||f.appendChild(x),(d=h.node())==null||d.appendChild(b)}else{h=n.insert("g",":first-child");const p=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",i),p.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return Q(e,h),e.intersect=function(p){return I.info("DoubleCircle intersect",e,c,p),V.circle(e,c,p)},n}g(t0,"doublecircle");function e0(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=J(e);e.label="",e.labelStyle=i;const a=t.insert("g").attr("class",st(e)).attr("id",e.domId??e.id),o=7,{cssStyles:s}=e,c=X.svg(a),{nodeBorder:l}=r,h=K(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);const u=c.circle(0,0,o*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${l} !important;`),s&&s.length>0&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",n),Q(e,f),e.intersect=function(d){return I.info("filledCircle intersect",e,{radius:o,point:d}),V.circle(e,o,d)},a}g(e0,"filledCircle");async function r0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=a.width+(e.padding??0),c=s+a.height,l=s+a.height,h=[{x:0,y:-c},{x:l,y:-c},{x:l/2,y:0}],{cssStyles:u}=e,f=X.svg(n),d=K(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=mt(h),m=f.path(p,d),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return u&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),e.width=s,e.height=c,Q(e,y),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-c/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(x){return I.info("Triangle intersect",e,h,x),V.polygon(e,h,x)},n}g(r0,"flippedTriangle");function i0(t,e,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=J(e);e.label="";const o=t.insert("g").attr("class",st(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let c=Math.max(70,(e==null?void 0:e.width)??0),l=Math.max(10,(e==null?void 0:e.height)??0);r==="LR"&&(c=Math.max(10,(e==null?void 0:e.width)??0),l=Math.max(70,(e==null?void 0:e.height)??0));const h=-1*c/2,u=-1*l/2,f=X.svg(o),d=K(e,{stroke:n.lineColor,fill:n.lineColor});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=f.rectangle(h,u,c,l,d),m=o.insert(()=>p,":first-child");s&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Q(e,m);const y=(i==null?void 0:i.padding)??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(x){return V.rect(e,x)},o}g(i0,"forkJoin");async function n0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await ct(t,e,st(e)),c=Math.max(n,s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a,s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=l/2,{cssStyles:u}=e,f=X.svg(o),d=K(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-c/2,y:-l/2},{x:c/2-h,y:-l/2},...Oc(-c/2+h,0,h,50,90,270),{x:c/2-h,y:l/2},{x:-c/2,y:l/2}],m=mt(p),y=f.path(m,d),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Q(e,x),e.intersect=function(b){return I.info("Pill intersect",e,{radius:h,point:b}),V.polygon(e,p,b)},o}g(n0,"halfRoundedRectangle");var jL=g((t,e,r,i,n)=>[`M${t+n},${e}`,`L${t+r-n},${e}`,`L${t+r},${e-i/2}`,`L${t+r-n},${e-i}`,`L${t+n},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function a0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=4,s=a.height+e.padding,c=s/o,l=a.width+2*c+e.padding,h=[{x:c,y:0},{x:l-c,y:0},{x:l,y:-s/2},{x:l-c,y:-s},{x:c,y:-s},{x:0,y:-s/2}];let u;const{cssStyles:f}=e;if(e.look==="handDrawn"){const d=X.svg(n),p=K(e,{}),m=jL(0,0,l,s,c),y=d.path(m,p);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),f&&u.attr("style",f)}else u=ar(n,l,s,h);return i&&u.attr("style",i),e.width=l,e.height=s,Q(e,u),e.intersect=function(d){return V.polygon(e,h,d)},n}g(a0,"hexagon");async function s0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.label="",e.labelStyle=r;const{shapeSvg:n}=await ct(t,e,st(e)),a=Math.max(30,(e==null?void 0:e.width)??0),o=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:s}=e,c=X.svg(n),l=K(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=mt(h),f=c.path(u,l),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container"),s&&e.look!=="handDrawn"&&d.selectChildren("path").attr("style",s),i&&e.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),Q(e,d),e.intersect=function(p){return I.info("Pill intersect",e,{points:h}),V.polygon(e,h,p)},n}g(s0,"hourglass");async function o0(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=J(e);e.labelStyle=n;const a=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;e.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,label:u}=await ct(t,e,"icon-shape default"),f=e.pos==="t",d=s,p=s,{nodeBorder:m}=r,{stylesMap:y}=Bi(e),x=-p/2,b=-d/2,C=e.label?8:0,v=X.svg(l),w=K(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=v.rectangle(x,b,p,d,w),k=Math.max(p,h.width),O=d+h.height+C,N=v.rectangle(-k/2,-O/2,k,O,{...w,fill:"transparent",stroke:"none"}),D=l.insert(()=>_,":first-child"),T=l.insert(()=>N);if(e.icon){const R=l.append("g");R.html(`<g>${await Pn(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const L=R.node().getBBox(),M=L.width,F=L.height,B=L.x,$=L.y;R.attr("transform",`translate(${-M/2-B},${f?h.height/2+C/2-F/2-$:-h.height/2-C/2-F/2-$})`),R.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-O/2:O/2-h.height})`),D.attr("transform",`translate(0,${f?h.height/2+C/2:-h.height/2-C/2})`),Q(e,T),e.intersect=function(R){if(I.info("iconSquare intersect",e,R),!e.label)return V.rect(e,R);const L=e.x??0,M=e.y??0,F=e.height??0;let B=[];return f?B=[{x:L-h.width/2,y:M-F/2},{x:L+h.width/2,y:M-F/2},{x:L+h.width/2,y:M-F/2+h.height+C},{x:L+p/2,y:M-F/2+h.height+C},{x:L+p/2,y:M+F/2},{x:L-p/2,y:M+F/2},{x:L-p/2,y:M-F/2+h.height+C},{x:L-h.width/2,y:M-F/2+h.height+C}]:B=[{x:L-p/2,y:M-F/2},{x:L+p/2,y:M-F/2},{x:L+p/2,y:M-F/2+d},{x:L+h.width/2,y:M-F/2+d},{x:L+h.width/2/2,y:M+F/2},{x:L-h.width/2,y:M+F/2},{x:L-h.width/2,y:M-F/2+d},{x:L-p/2,y:M-F/2+d}],V.polygon(e,B,R)},l}g(o0,"icon");async function l0(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=J(e);e.labelStyle=n;const a=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;e.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,label:u}=await ct(t,e,"icon-shape default"),f=20,d=e.label?8:0,p=e.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Bi(e),b=X.svg(l),C=K(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=x.get("fill");C.stroke=v??y;const w=l.append("g");e.icon&&w.html(`<g>${await Pn(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const _=w.node().getBBox(),k=_.width,O=_.height,N=_.x,D=_.y,T=Math.max(k,O)*Math.SQRT2+f*2,R=b.circle(0,0,T,C),L=Math.max(T,h.width),M=T+h.height+d,F=b.rectangle(-L/2,-M/2,L,M,{...C,fill:"transparent",stroke:"none"}),B=l.insert(()=>R,":first-child"),$=l.insert(()=>F);return w.attr("transform",`translate(${-k/2-N},${p?h.height/2+d/2-O/2-D:-h.height/2-d/2-O/2-D})`),w.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-M/2:M/2-h.height})`),B.attr("transform",`translate(0,${p?h.height/2+d/2:-h.height/2-d/2})`),Q(e,$),e.intersect=function(E){return I.info("iconSquare intersect",e,E),V.rect(e,E)},l}g(l0,"iconCircle");async function c0(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=J(e);e.labelStyle=n;const a=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;e.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await ct(t,e,"icon-shape default"),d=e.pos==="t",p=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Bi(e),C=-m/2,v=-p/2,w=e.label?8:0,_=X.svg(l),k=K(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const O=b.get("fill");k.stroke=O??x;const N=_.path(nr(C,v,m,p,5),k),D=Math.max(m,h.width),T=p+h.height+w,R=_.rectangle(-D/2,-T/2,D,T,{...k,fill:"transparent",stroke:"none"}),L=l.insert(()=>N,":first-child").attr("class","icon-shape2"),M=l.insert(()=>R);if(e.icon){const F=l.append("g");F.html(`<g>${await Pn(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const B=F.node().getBBox(),$=B.width,E=B.height,q=B.x,j=B.y;F.attr("transform",`translate(${-$/2-q},${d?h.height/2+w/2-E/2-j:-h.height/2-w/2-E/2-j})`),F.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-T/2:T/2-h.height})`),L.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Q(e,M),e.intersect=function(F){if(I.info("iconSquare intersect",e,F),!e.label)return V.rect(e,F);const B=e.x??0,$=e.y??0,E=e.height??0;let q=[];return d?q=[{x:B-h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2+h.height+w},{x:B+m/2,y:$-E/2+h.height+w},{x:B+m/2,y:$+E/2},{x:B-m/2,y:$+E/2},{x:B-m/2,y:$-E/2+h.height+w},{x:B-h.width/2,y:$-E/2+h.height+w}]:q=[{x:B-m/2,y:$-E/2},{x:B+m/2,y:$-E/2},{x:B+m/2,y:$-E/2+p},{x:B+h.width/2,y:$-E/2+p},{x:B+h.width/2/2,y:$+E/2},{x:B-h.width/2,y:$+E/2},{x:B-h.width/2,y:$-E/2+p},{x:B-m/2,y:$-E/2+p}],V.polygon(e,q,F)},l}g(c0,"iconRounded");async function h0(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=J(e);e.labelStyle=n;const a=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;e.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await ct(t,e,"icon-shape default"),d=e.pos==="t",p=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Bi(e),C=-m/2,v=-p/2,w=e.label?8:0,_=X.svg(l),k=K(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const O=b.get("fill");k.stroke=O??x;const N=_.path(nr(C,v,m,p,.1),k),D=Math.max(m,h.width),T=p+h.height+w,R=_.rectangle(-D/2,-T/2,D,T,{...k,fill:"transparent",stroke:"none"}),L=l.insert(()=>N,":first-child"),M=l.insert(()=>R);if(e.icon){const F=l.append("g");F.html(`<g>${await Pn(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const B=F.node().getBBox(),$=B.width,E=B.height,q=B.x,j=B.y;F.attr("transform",`translate(${-$/2-q},${d?h.height/2+w/2-E/2-j:-h.height/2-w/2-E/2-j})`),F.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-T/2:T/2-h.height})`),L.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Q(e,M),e.intersect=function(F){if(I.info("iconSquare intersect",e,F),!e.label)return V.rect(e,F);const B=e.x??0,$=e.y??0,E=e.height??0;let q=[];return d?q=[{x:B-h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2+h.height+w},{x:B+m/2,y:$-E/2+h.height+w},{x:B+m/2,y:$+E/2},{x:B-m/2,y:$+E/2},{x:B-m/2,y:$-E/2+h.height+w},{x:B-h.width/2,y:$-E/2+h.height+w}]:q=[{x:B-m/2,y:$-E/2},{x:B+m/2,y:$-E/2},{x:B+m/2,y:$-E/2+p},{x:B+h.width/2,y:$-E/2+p},{x:B+h.width/2/2,y:$+E/2},{x:B-h.width/2,y:$+E/2},{x:B-h.width/2,y:$-E/2+p},{x:B-m/2,y:$-E/2+p}],V.polygon(e,q,F)},l}g(h0,"iconSquare");async function u0(t,e,{config:{flowchart:r}}){const i=new Image;i.src=(e==null?void 0:e.img)??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=n/a;const{labelStyles:o}=J(e);e.labelStyle=o;const s=r==null?void 0:r.wrappingWidth;e.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(e.label?s??0:0,(e==null?void 0:e.assetWidth)??n),l=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:c,h=e.constraint==="on"?l/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??a;e.width=Math.max(l,s??0);const{shapeSvg:u,bbox:f,label:d}=await ct(t,e,"image-shape default"),p=e.pos==="t",m=-l/2,y=-h/2,x=e.label?8:0,b=X.svg(u),C=K(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=b.rectangle(m,y,l,h,C),w=Math.max(l,f.width),_=h+f.height+x,k=b.rectangle(-w/2,-_/2,w,_,{...C,fill:"none",stroke:"none"}),O=u.insert(()=>v,":first-child"),N=u.insert(()=>k);if(e.img){const D=u.append("image");D.attr("href",e.img),D.attr("width",l),D.attr("height",h),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-l/2},${p?_/2-h:-_/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),O.attr("transform",`translate(0,${p?f.height/2+x/2:-f.height/2-x/2})`),Q(e,N),e.intersect=function(D){if(I.info("iconSquare intersect",e,D),!e.label)return V.rect(e,D);const T=e.x??0,R=e.y??0,L=e.height??0;let M=[];return p?M=[{x:T-f.width/2,y:R-L/2},{x:T+f.width/2,y:R-L/2},{x:T+f.width/2,y:R-L/2+f.height+x},{x:T+l/2,y:R-L/2+f.height+x},{x:T+l/2,y:R+L/2},{x:T-l/2,y:R+L/2},{x:T-l/2,y:R-L/2+f.height+x},{x:T-f.width/2,y:R-L/2+f.height+x}]:M=[{x:T-l/2,y:R-L/2},{x:T+l/2,y:R-L/2},{x:T+l/2,y:R-L/2+h},{x:T+f.width/2,y:R-L/2+h},{x:T+f.width/2/2,y:R+L/2},{x:T-f.width/2,y:R+L/2},{x:T-f.width/2,y:R-L/2+h},{x:T-l/2,y:R-L/2+h}],V.polygon(e,M,D)},u}g(u0,"imageSquare");async function f0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),s=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let l;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=X.svg(n),f=K(e,{}),d=mt(c),p=u.path(d,f);l=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=ar(n,o,s,c);return i&&l.attr("style",i),e.width=o,e.height=s,Q(e,l),e.intersect=function(u){return V.polygon(e,c,u)},n}g(f0,"inv_trapezoid");async function zn(t,e,r){const{labelStyles:i,nodeStyles:n}=J(e);e.labelStyle=i;const{shapeSvg:a,bbox:o}=await ct(t,e,st(e)),s=Math.max(o.width+r.labelPaddingX*2,(e==null?void 0:e.width)||0),c=Math.max(o.height+r.labelPaddingY*2,(e==null?void 0:e.height)||0),l=-s/2,h=-c/2;let u,{rx:f,ry:d}=e;const{cssStyles:p}=e;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),e.look==="handDrawn"){const m=X.svg(a),y=K(e,{}),x=f||d?m.path(nr(l,h,s,c,f||0),y):m.rectangle(l,h,s,c,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",re(p))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",re(f)).attr("ry",re(d)).attr("x",l).attr("y",h).attr("width",s).attr("height",c);return Q(e,u),e.intersect=function(m){return V.rect(e,m)},a}g(zn,"drawRect");async function d0(t,e){const{shapeSvg:r,bbox:i,label:n}=await ct(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Q(e,a),e.intersect=function(c){return V.rect(e,c)},r}g(d0,"labelRect");async function p0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=Math.max(a.width+(e.padding??0),(e==null?void 0:e.width)??0),s=Math.max(a.height+(e.padding??0),(e==null?void 0:e.height)??0),c=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let l;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=X.svg(n),f=K(e,{}),d=mt(c),p=u.path(d,f);l=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=ar(n,o,s,c);return i&&l.attr("style",i),e.width=o,e.height=s,Q(e,l),e.intersect=function(u){return V.polygon(e,c,u)},n}g(p0,"lean_left");async function g0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=Math.max(a.width+(e.padding??0),(e==null?void 0:e.width)??0),s=Math.max(a.height+(e.padding??0),(e==null?void 0:e.height)??0),c=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let l;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=X.svg(n),f=K(e,{}),d=mt(c),p=u.path(d,f);l=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=ar(n,o,s,c);return i&&l.attr("style",i),e.width=o,e.height=s,Q(e,l),e.intersect=function(u){return V.polygon(e,c,u)},n}g(g0,"lean_right");function m0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.label="",e.labelStyle=r;const n=t.insert("g").attr("class",st(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(35,(e==null?void 0:e.width)??0),s=Math.max(35,(e==null?void 0:e.height)??0),c=7,l=[{x:o,y:0},{x:0,y:s+c/2},{x:o-2*c,y:s+c/2},{x:0,y:2*s},{x:o,y:s-c/2},{x:2*c,y:s-c/2}],h=X.svg(n),u=K(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=mt(l),d=h.path(f,u),p=n.insert(()=>d,":first-child");return a&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",a),i&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${o/2},${-s})`),Q(e,p),e.intersect=function(m){return I.info("lightningBolt intersect",e,m),V.polygon(e,l,m)},n}g(m0,"lightningBolt");var YL=g((t,e,r,i,n,a,o)=>[`M${t},${e+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${t},${e+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),GL=g((t,e,r,i,n,a,o)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${t},${e+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),VL=g((t,e,r,i,n,a)=>[`M${t-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function y0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Math.max(a.width+(e.padding??0),e.width??0),c=s/2,l=c/(2.5+s/50),h=Math.max(a.height+l+(e.padding??0),e.height??0),u=h*.1;let f;const{cssStyles:d}=e;if(e.look==="handDrawn"){const p=X.svg(n),m=GL(0,0,s,h,c,l,u),y=VL(0,l,s,h,c,l),x=K(e,{}),b=p.path(m,x),C=p.path(y,x);n.insert(()=>C,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const p=YL(0,0,s,h,c,l,u);f=n.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",re(d)).attr("style",i)}return f.attr("label-offset-y",l),f.attr("transform",`translate(${-s/2}, ${-(h/2+l)})`),Q(e,f),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+l-(a.y-(a.top??0))})`),e.intersect=function(p){const m=V.rect(e,p),y=m.x-(e.x??0);if(c!=0&&(Math.abs(y)<(e.width??0)/2||Math.abs(y)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-l)){let x=l*l*(1-y*y/(c*c));x>0&&(x=Math.sqrt(x)),x=l-x,p.y-(e.y??0)>0&&(x=-x),m.y+=x}return m},n}g(y0,"linedCylinder");async function x0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=c/4,h=c+l,{cssStyles:u}=e,f=X.svg(n),d=K(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...fr(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,l,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2},{x:-s/2,y:-h/2},{x:-s/2,y:h/2*1.1},{x:-s/2,y:-h/2}],m=f.polygon(p.map(x=>[x.x,x.y]),d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)-l/2-(a.y-(a.top??0))})`),Q(e,y),e.intersect=function(x){return V.polygon(e,p,x)},n}g(x0,"linedWaveEdgedRect");async function b0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=5,h=-s/2,u=-c/2,{cssStyles:f}=e,d=X.svg(n),p=K(e,{}),m=[{x:h-l,y:u+l},{x:h-l,y:u+c+l},{x:h+s-l,y:u+c+l},{x:h+s-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u+c-l},{x:h+s+l,y:u+c-l},{x:h+s+l,y:u-l},{x:h+l,y:u-l},{x:h+l,y:u},{x:h,y:u},{x:h,y:u+l}],y=[{x:h,y:u+l},{x:h+s-l,y:u+l},{x:h+s-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u},{x:h,y:u}];e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const x=mt(m),b=d.path(x,p),C=mt(y),v=d.path(C,{...p,fill:"none"}),w=n.insert(()=>v,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)-l-(a.x-(a.left??0))}, ${-(a.height/2)+l-(a.y-(a.top??0))})`),Q(e,w),e.intersect=function(_){return V.polygon(e,m,_)},n}g(b0,"multiRect");async function _0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=c/4,h=c+l,u=-s/2,f=-h/2,d=5,{cssStyles:p}=e,m=fr(u-d,f+h+d,u+s-d,f+h+d,l,.8),y=m==null?void 0:m[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:y.y-2*d},{x:u+s+d,y:y.y-2*d},{x:u+s+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+s-d,y:f+d},{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:f},{x:u,y:f}],C=X.svg(n),v=K(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=mt(x),_=C.path(w,v),k=mt(b),O=C.path(k,v),N=n.insert(()=>_,":first-child");return N.insert(()=>O),N.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-(a.width/2)-d-(a.x-(a.left??0))}, ${-(a.height/2)+d-l/2-(a.y-(a.top??0))})`),Q(e,N),e.intersect=function(D){return V.polygon(e,x,D)},n}g(_0,"multiWaveEdgedRectangle");async function C0(t,e,{config:{themeVariables:r}}){var x;const{labelStyles:i,nodeStyles:n}=J(e);e.labelStyle=i,e.useHtmlLabels||((x=he().flowchart)==null?void 0:x.htmlLabels)!==!1||(e.centerLabel=!0);const{shapeSvg:o,bbox:s}=await ct(t,e,st(e)),c=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=-c/2,u=-l/2,{cssStyles:f}=e,d=X.svg(o),p=K(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=d.rectangle(h,u,c,l,p),y=o.insert(()=>m,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),Q(e,y),e.intersect=function(b){return V.rect(e,b)},o}g(C0,"note");var XL=g((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 w0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=a.width+e.padding,s=a.height+e.padding,c=o+s,l=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];let h;const{cssStyles:u}=e;if(e.look==="handDrawn"){const f=X.svg(n),d=K(e,{}),p=XL(0,0,c),m=f.path(p,d);h=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`),u&&h.attr("style",u)}else h=ar(n,c,c,l);return i&&h.attr("style",i),Q(e,h),e.intersect=function(f){return I.debug(`APA12 Intersect called SPLIT
|
||
point:`,f,`
|
||
node:
|
||
`,e,`
|
||
res:`,V.polygon(e,l,f)),V.polygon(e,l,f)},n}g(w0,"question");async function v0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Math.max(a.width+(e.padding??0),(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0),(e==null?void 0:e.height)??0),l=-s/2,h=-c/2,u=h/2,f=[{x:l+u,y:h},{x:l,y:0},{x:l+u,y:-h},{x:-l,y:-h},{x:-l,y:h}],{cssStyles:d}=e,p=X.svg(n),m=K(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=mt(f),x=p.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(e,b),e.intersect=function(C){return V.polygon(e,f,C)},n}g(v0,"rect_left_inv_arrow");async function k0(t,e){var O,N;const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;let n;e.cssClasses?n="node "+e.cssClasses:n="node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),c=e.description,l=e.label,h=s.node().appendChild(await Sr(l,e.labelStyle,!0,!0));let u={width:0,height:0};if(Ot((N=(O=xt())==null?void 0:O.flowchart)==null?void 0:N.htmlLabels)){const D=h.children[0],T=gt(h);u=D.getBoundingClientRect(),T.attr("width",u.width),T.attr("height",u.height)}I.info("Text 2",c);const f=c||[],d=h.getBBox(),p=s.node().appendChild(await Sr(f.join?f.join("<br/>"):f,e.labelStyle,!0,!0)),m=p.children[0],y=gt(p);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(e.padding||0)/2;gt(p).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),gt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(e.padding||0),C=u.height+(e.padding||0),v=-u.width/2-x,w=-u.height/2-x;let _,k;if(e.look==="handDrawn"){const D=X.svg(a),T=K(e,{}),R=D.path(nr(v,w,b,C,e.rx||0),T),L=D.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,T);k=a.insert(()=>(I.debug("Rough node insert CXC",R),L),":first-child"),_=a.insert(()=>(I.debug("Rough node insert CXC",R),R),":first-child")}else _=o.insert("rect",":first-child"),k=o.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(e.padding||0)).attr("height",u.height+(e.padding||0)),k.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return Q(e,_),e.intersect=function(D){return V.rect(e,D)},a}g(k0,"rectWithTitle");async function S0(t,e){const r={rx:5,ry:5,labelPaddingX:((e==null?void 0:e.padding)||0)*1,labelPaddingY:((e==null?void 0:e.padding)||0)*1};return zn(t,e,r)}g(S0,"roundedRect");async function T0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=(e==null?void 0:e.padding)??0,c=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:f}=e,d=X.svg(n),p=K(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:h,y:u},{x:h+c+8,y:u},{x:h+c+8,y:u+l},{x:h-8,y:u+l},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+l}],y=d.polygon(m.map(b=>[b.x,b.y]),p),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",re(f)),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-c/2+4+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-(a.y-(a.top??0))})`),Q(e,x),e.intersect=function(b){return V.rect(e,b)},n}g(T0,"shadedProcess");async function M0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=-s/2,h=-c/2,{cssStyles:u}=e,f=X.svg(n),d=K(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:l,y:h},{x:l,y:h+c},{x:l+s,y:h+c},{x:l+s,y:h-c/2}],m=mt(p),y=f.path(m,d),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${c/4})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))}, ${-c/4+(e.padding??0)-(a.y-(a.top??0))})`),Q(e,x),e.intersect=function(b){return V.polygon(e,p,b)},n}g(M0,"slopedRect");async function A0(t,e){const r={rx:0,ry:0,labelPaddingX:((e==null?void 0:e.padding)||0)*2,labelPaddingY:((e==null?void 0:e.padding)||0)*1};return zn(t,e,r)}g(A0,"squareRect");async function L0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=a.height+e.padding,s=a.width+o/4+e.padding;let c;const{cssStyles:l}=e;if(e.look==="handDrawn"){const h=X.svg(n),u=K(e,{}),f=nr(-s/2,-o/2,s,o,o/2),d=h.path(f,u);c=n.insert(()=>d,":first-child"),c.attr("class","basic label-container").attr("style",re(l))}else c=n.insert("rect",":first-child"),c.attr("class","basic label-container").attr("style",i).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return Q(e,c),e.intersect=function(h){return V.rect(e,h)},n}g(L0,"stadium");async function B0(t,e){return zn(t,e,{rx:5,ry:5})}g(B0,"state");function E0(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=J(e);e.labelStyle=i;const{cssStyles:a}=e,{lineColor:o,stateBorder:s,nodeBorder:c}=r,l=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=X.svg(l),u=K(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=s??c,p=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>f,":first-child");return m.insert(()=>p),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),Q(e,m),e.intersect=function(y){return V.circle(e,7,y)},l}g(E0,"stateEnd");function F0(t,e,{config:{themeVariables:r}}){const{lineColor:i}=r,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a;if(e.look==="handDrawn"){const s=X.svg(n).circle(0,0,14,R1(i));a=n.insert(()=>s),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Q(e,a),e.intersect=function(o){return V.circle(e,7,o)},n}g(F0,"stateStart");async function $0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=((e==null?void 0:e.padding)||0)/2,s=a.width+e.padding,c=a.height+e.padding,l=-a.width/2-o,h=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(e.look==="handDrawn"){const f=X.svg(n),d=K(e,{}),p=f.rectangle(l-8,h,s+16,c,d),m=f.line(l,h,l,h+c,d),y=f.line(l+s,h,l+s,h+c,d);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>p,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",re(b)),Q(e,x)}else{const f=ar(n,s,c,u);i&&f.attr("style",i),Q(e,f)}return e.intersect=function(f){return V.polygon(e,u,f)},n}g($0,"subroutine");async function D0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),s=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=-o/2,l=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=e,d=X.svg(n),p=K(e,{}),m=[{x:c-h/2,y:l},{x:c+o+h/2,y:l},{x:c+o+h/2,y:l+s},{x:c-h/2,y:l+s}],y=[{x:c+o-h/2,y:l+s},{x:c+o+h/2,y:l+s},{x:c+o+h/2,y:l+s-u}];e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const x=mt(m),b=d.path(x,p),C=mt(y),v=d.path(C,{...p,fillStyle:"solid"}),w=n.insert(()=>v,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),Q(e,w),e.intersect=function(_){return V.polygon(e,m,_)},n}g(D0,"taggedRect");async function O0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=c/4,h=.2*s,u=.2*c,f=c+l,{cssStyles:d}=e,p=X.svg(n),m=K(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...fr(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],x=-s/2+s/2*.1,b=-f/2-u*.4,C=[{x:x+s-h,y:(b+c)*1.4},{x:x+s,y:b+c-u},{x:x+s,y:(b+c)*.9},...fr(x+s,(b+c)*1.3,x+s-h,(b+c)*1.5,-c*.03,.5)],v=mt(y),w=p.path(v,m),_=mt(C),k=p.path(_,{...m,fillStyle:"solid"}),O=n.insert(()=>k,":first-child");return O.insert(()=>w,":first-child"),O.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))},${-c/2+(e.padding??0)-l/2-(a.y-(a.top??0))})`),Q(e,O),e.intersect=function(N){return V.polygon(e,y,N)},n}g(O0,"taggedWaveEdgedRectangle");async function R0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=Math.max(a.width+e.padding,(e==null?void 0:e.width)||0),s=Math.max(a.height+e.padding,(e==null?void 0:e.height)||0),c=-o/2,l=-s/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",l).attr("width",o).attr("height",s),Q(e,h),e.intersect=function(u){return V.rect(e,u)},n}g(R0,"text");var ZL=g((t,e,r,i,n,a)=>`M${t},${e}
|
||
a${n},${a} 0,0,1 0,${-i}
|
||
l${r},0
|
||
a${n},${a} 0,0,1 0,${i}
|
||
M${r},${-i}
|
||
a${n},${a} 0,0,0 0,${i}
|
||
l${-r},0`,"createCylinderPathD"),KL=g((t,e,r,i,n,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),QL=g((t,e,r,i,n,a)=>[`M${t+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function I0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await ct(t,e,st(e)),c=e.look==="neo"?s*2:s,l=a.height+c,h=l/2,u=h/(2.5+l/50),f=a.width+u+c,{cssStyles:d}=e;let p;if(e.look==="handDrawn"){const m=X.svg(n),y=KL(0,0,f,l,u,h),x=QL(0,0,f,l,u,h),b=m.path(y,K(e,{})),C=m.path(x,K(e,{fill:"none"}));p=n.insert(()=>C,":first-child"),p=n.insert(()=>b,":first-child"),p.attr("class","basic label-container"),d&&p.attr("style",d)}else{const m=ZL(0,0,f,l,u,h);p=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",re(d)).attr("style",i),p.attr("class","basic label-container"),d&&p.selectAll("path").attr("style",d),i&&p.selectAll("path").attr("style",i)}return p.attr("label-offset-x",u),p.attr("transform",`translate(${-f/2}, ${l/2} )`),o.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(e,p),e.intersect=function(m){const y=V.rect(e,m),x=y.y-(e.y??0);if(h!=0&&(Math.abs(x)<(e.height??0)/2||Math.abs(x)==(e.height??0)/2&&Math.abs(y.x-(e.x??0))>(e.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(e.x??0)>0&&(b=-b),y.x+=b}return y},n}g(I0,"tiltedCylinder");async function P0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=a.width+e.padding,s=a.height+e.padding,c=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let l;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=X.svg(n),f=K(e,{}),d=mt(c),p=u.path(d,f);l=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=ar(n,o,s,c);return i&&l.attr("style",i),e.width=o,e.height=s,Q(e,l),e.intersect=function(u){return V.polygon(e,c,u)},n}g(P0,"trapezoid");async function N0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=60,s=20,c=Math.max(o,a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(s,a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),{cssStyles:h}=e,u=X.svg(n),f=K(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-c/2*.8,y:-l/2},{x:c/2*.8,y:-l/2},{x:c/2,y:-l/2*.6},{x:c/2,y:l/2},{x:-c/2,y:l/2},{x:-c/2,y:-l/2*.6}],p=mt(d),m=u.path(p,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Q(e,y),e.intersect=function(x){return V.polygon(e,d,x)},n}g(N0,"trapezoidalPentagon");async function z0(t,e){var b;const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Ot((b=xt().flowchart)==null?void 0:b.htmlLabels),c=a.width+(e.padding??0),l=c+a.height,h=c+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-l}],{cssStyles:f}=e,d=X.svg(n),p=K(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=mt(u),y=d.path(m,p),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),e.width=c,e.height=l,Q(e,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${l/2-(a.height+(e.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(C){return I.info("Triangle intersect",e,u,C),V.polygon(e,u,C)},n}g(z0,"triangle");async function W0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=c/8,h=c+l,{cssStyles:u}=e,d=70-s,p=d>0?d/2:0,m=X.svg(n),y=K(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-p,y:h/2},...fr(-s/2-p,h/2,s/2+p,h/2,l,.8),{x:s/2+p,y:-h/2},{x:-s/2-p,y:-h/2}],b=mt(x),C=m.path(b,y),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))},${-c/2+(e.padding??0)-l-(a.y-(a.top??0))})`),Q(e,v),e.intersect=function(w){return V.polygon(e,x,w)},n}g(W0,"waveEdgedRectangle");async function q0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(t,e,st(e)),o=100,s=50,c=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=c/l;let u=c,f=l;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,s);const d=Math.min(f*.2,f/4),p=f+d*2,{cssStyles:m}=e,y=X.svg(n),x=K(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:p/2},...fr(-u/2,p/2,u/2,p/2,d,1),{x:u/2,y:-p/2},...fr(u/2,-p/2,-u/2,-p/2,d,-1)],C=mt(b),v=y.path(C,x),w=n.insert(()=>v,":first-child");return w.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),Q(e,w),e.intersect=function(_){return V.polygon(e,b,_)},n}g(q0,"waveRectangle");async function H0(t,e){const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(t,e,st(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=5,h=-s/2,u=-c/2,{cssStyles:f}=e,d=X.svg(n),p=K(e,{}),m=[{x:h-l,y:u-l},{x:h-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u-l}],y=`M${h-l},${u-l} L${h+s},${u-l} L${h+s},${u+c} L${h-l},${u+c} L${h-l},${u-l}
|
||
M${h-l},${u} L${h+s},${u}
|
||
M${h},${u-l} L${h},${u+c}`;e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const x=d.path(y,p),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${l/2}, ${l/2})`),b.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)+l/2-(a.x-(a.left??0))}, ${-(a.height/2)+l/2-(a.y-(a.top??0))})`),Q(e,b),e.intersect=function(C){return V.polygon(e,m,C)},n}g(H0,"windowPane");async function Rc(t,e){var pt,ht,vt,nt;const r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){const{themeVariables:lt}=he(),{background:ut}=lt,Ct={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ut}`]};await Rc(t,Ct)}const i=he();e.useHtmlLabels=i.htmlLabels;let n=((pt=i.er)==null?void 0:pt.diagramPadding)??10,a=((ht=i.er)==null?void 0:ht.entityPadding)??6;const{cssStyles:o}=e,{labelStyles:s,nodeStyles:c}=J(e);if(r.attributes.length===0&&e.label){const lt={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};rr(e.label,i)+lt.labelPaddingX*2<i.er.minEntityWidth&&(e.width=i.er.minEntityWidth);const ut=await zn(t,e,lt);if(!Ot(i.htmlLabels)){const Ct=ut.select("text"),z=(vt=Ct.node())==null?void 0:vt.getBBox();Ct.attr("transform",`translate(${-z.width/2}, 0)`)}return ut}i.htmlLabels||(n*=1.25,a*=1.25);let l=st(e);l||(l="node default");const h=t.insert("g").attr("class",l).attr("id",e.domId||e.id),u=await Qr(h,e.label??"",i,0,0,["name"],s);u.height+=a;let f=0;const d=[],p=[];let m=0,y=0,x=0,b=0,C=!0,v=!0;for(const lt of r.attributes){const ut=await Qr(h,lt.type,i,0,f,["attribute-type"],s);m=Math.max(m,ut.width+n);const Ct=await Qr(h,lt.name,i,0,f,["attribute-name"],s);y=Math.max(y,Ct.width+n);const z=await Qr(h,lt.keys.join(),i,0,f,["attribute-keys"],s);x=Math.max(x,z.width+n);const Y=await Qr(h,lt.comment,i,0,f,["attribute-comment"],s);b=Math.max(b,Y.width+n);const et=Math.max(ut.height,Ct.height,z.height,Y.height)+a;p.push({yOffset:f,rowHeight:et}),f+=et}let w=4;x<=n&&(C=!1,x=0,w--),b<=n&&(v=!1,b=0,w--);const _=h.node().getBBox();if(u.width+n*2-(m+y+x+b)>0){const lt=u.width+n*2-(m+y+x+b);m+=lt/w,y+=lt/w,x>0&&(x+=lt/w),b>0&&(b+=lt/w)}const k=m+y+x+b,O=X.svg(h),N=K(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");let D=0;p.length>0&&(D=p.reduce((lt,ut)=>lt+((ut==null?void 0:ut.rowHeight)??0),0));const T=Math.max(_.width+n*2,(e==null?void 0:e.width)||0,k),R=Math.max((D??0)+u.height,(e==null?void 0:e.height)||0),L=-T/2,M=-R/2;h.selectAll("g:not(:first-child)").each((lt,ut,Ct)=>{const z=gt(Ct[ut]),Y=z.attr("transform");let et=0,P=0;if(Y){const ft=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Y);ft&&(et=parseFloat(ft[1]),P=parseFloat(ft[2]),z.attr("class").includes("attribute-name")?et+=m:z.attr("class").includes("attribute-keys")?et+=m+y:z.attr("class").includes("attribute-comment")&&(et+=m+y+x))}z.attr("transform",`translate(${L+n/2+et}, ${P+M+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(M+a/2)+")");const F=O.rectangle(L,M,T,R,N),B=h.insert(()=>F,":first-child").attr("style",o.join("")),{themeVariables:$}=he(),{rowEven:E,rowOdd:q,nodeBorder:j}=$;d.push(0);for(const[lt,ut]of p.entries()){const z=(lt+1)%2===0&&ut.yOffset!==0,Y=O.rectangle(L,u.height+M+(ut==null?void 0:ut.yOffset),T,ut==null?void 0:ut.rowHeight,{...N,fill:z?E:q,stroke:j});h.insert(()=>Y,"g.label").attr("style",o.join("")).attr("class",`row-rect-${z?"even":"odd"}`)}let U=O.line(L,u.height+M,T+L,u.height+M,N);h.insert(()=>U).attr("class","divider"),U=O.line(m+L,u.height+M,m+L,R+M,N),h.insert(()=>U).attr("class","divider"),C&&(U=O.line(m+y+L,u.height+M,m+y+L,R+M,N),h.insert(()=>U).attr("class","divider")),v&&(U=O.line(m+y+x+L,u.height+M,m+y+x+L,R+M,N),h.insert(()=>U).attr("class","divider"));for(const lt of d)U=O.line(L,u.height+M+lt,T+L,u.height+M+lt,N),h.insert(()=>U).attr("class","divider");if(Q(e,B),c&&e.look!=="handDrawn"){const lt=c.split(";"),ut=(nt=lt==null?void 0:lt.filter(Ct=>Ct.includes("stroke")))==null?void 0:nt.map(Ct=>`${Ct}`).join("; ");h.selectAll("path").attr("style",ut??""),h.selectAll(".row-rect-even path").attr("style",c)}return e.intersect=function(lt){return V.rect(e,lt)},h}g(Rc,"erBox");async function Qr(t,e,r,i=0,n=0,a=[],o=""){const s=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);e!==yh(e)&&(e=yh(e),e=e.replaceAll("<","<").replaceAll(">",">"));const c=s.node().appendChild(await pr(s,e,{width:rr(e,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let h=c.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let l=c.getBBox();if(Ot(r.htmlLabels)){const h=c.children[0];h.style.textAlign="start";const u=gt(c);l=h.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}return l}g(Qr,"addText");async function U0(t,e,r,i,n=r.class.padding??12){const a=i?0:3,o=t.insert("g").attr("class",st(e)).attr("id",e.domId||e.id);let s=null,c=null,l=null,h=null,u=0,f=0,d=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const b=e.annotations[0];await ln(s,{text:`«${b}»`},0),u=s.node().getBBox().height}c=o.insert("g").attr("class","label-group text"),await ln(c,e,0,["font-weight: bolder"]);const p=c.node().getBBox();f=p.height,l=o.insert("g").attr("class","members-group text");let m=0;for(const b of e.members){const C=await ln(l,b,m,[b.parseClassifier()]);m+=C+a}d=l.node().getBBox().height,d<=0&&(d=n/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of e.methods){const C=await ln(h,b,y,[b.parseClassifier()]);y+=C+a}let x=o.node().getBBox();if(s!==null){const b=s.node().getBBox();s.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-p.width/2}, ${u})`),x=o.node().getBBox(),l.attr("transform",`translate(0, ${u+f+n*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+n*4:n*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}g(U0,"textHelper");async function ln(t,e,r,i=[]){const n=t.insert("g").attr("class","label").attr("style",i.join("; ")),a=he();let o="useHtmlLabels"in e?e.useHtmlLabels:Ot(a.htmlLabels)??!0,s="";"text"in e?s=e.text:s=e.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),bi(s)&&(o=!0);const c=await pr(n,_s(qr(s)),{width:rr(s,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let l,h=1;if(o){const u=c.children[0],f=gt(c);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const p=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){var b;if(m.style.display="flex",m.style.flexDirection="column",p){const C=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(C,10)*5+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";y(m)}g(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}l=u.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}else{i.includes("font-weight: bolder")&>(c).selectAll("tspan").attr("font-weight",""),h=c.children.length;const u=c.children[0];(c.textContent===""||c.textContent.includes(">"))&&(u.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),s[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),l=c.getBBox()}return n.attr("transform","translate(0,"+(-l.height/(2*h)+r)+")"),l.height}g(ln,"addText");async function j0(t,e){var N,D;const r=xt(),i=r.class.padding??12,n=i,a=e.useHtmlLabels??Ot(r.htmlLabels)??!0,o=e;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:c}=await U0(t,e,r,a,n),{labelStyles:l,nodeStyles:h}=J(e);e.labelStyle=l,e.cssStyles=o.styles||"";const u=((N=o.styles)==null?void 0:N.join(";"))||h||"";e.cssStyles||(e.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!((D=r.class)!=null&&D.hideEmptyMembersBox),d=X.svg(s),p=K(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=c.width;let y=c.height;o.members.length===0&&o.methods.length===0?y+=n:o.members.length>0&&o.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,C=d.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),p),v=s.insert(()=>C,":first-child");v.attr("class","basic label-container");const w=v.node().getBBox();s.selectAll(".text").each((T,R,L)=>{var q;const M=gt(L[R]),F=M.attr("transform");let B=0;if(F){const U=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(F);U&&(B=parseFloat(U[2]))}let $=B+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||($-=4);let E=x;(M.attr("class").includes("label-group")||M.attr("class").includes("annotation-group"))&&(E=-((q=M.node())==null?void 0:q.getBBox().width)/2||0,s.selectAll("text").each(function(j,U,pt){window.getComputedStyle(pt[U]).textAnchor==="middle"&&(E=0)})),M.attr("transform",`translate(${E}, ${$})`)});const _=s.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,k=s.select(".label-group").node().getBBox().height-(f?i/2:0)||0,O=s.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const T=d.line(w.x,_+k+b+i,w.x+w.width,_+k+b+i,p);s.insert(()=>T).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const T=d.line(w.x,_+k+O+b+n*2+i,w.x+w.width,_+k+O+b+i+n*2,p);s.insert(()=>T).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),e.labelStyle?s.selectAll("span").attr("style",e.labelStyle):s.selectAll("span").attr("style",u),!a){const T=RegExp(/color\s*:\s*([^;]*)/),R=T.exec(u);if(R){const L=R[0].replace("color","fill");s.selectAll("tspan").attr("style",L)}else if(l){const L=T.exec(l);if(L){const M=L[0].replace("color","fill");s.selectAll("tspan").attr("style",M)}}}return Q(e,v),e.intersect=function(T){return V.rect(e,T)},s}g(j0,"classBox");async function Y0(t,e){var _,k;const{labelStyles:r,nodeStyles:i}=J(e);e.labelStyle=r;const n=e,a=e,o=20,s=20,c="verifyMethod"in e,l=st(e),h=t.insert("g").attr("class",l).attr("id",e.domId??e.id);let u;c?u=await Be(h,`<<${n.type}>>`,0,e.labelStyle):u=await Be(h,"<<Element>>",0,e.labelStyle);let f=u;const d=await Be(h,n.name,f,e.labelStyle+"; font-weight: bold;");if(f+=d+s,c){const O=await Be(h,`${n.requirementId?`id: ${n.requirementId}`:""}`,f,e.labelStyle);f+=O;const N=await Be(h,`${n.text?`Text: ${n.text}`:""}`,f,e.labelStyle);f+=N;const D=await Be(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,e.labelStyle);f+=D,await Be(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,e.labelStyle)}else{const O=await Be(h,`${a.type?`Type: ${a.type}`:""}`,f,e.labelStyle);f+=O,await Be(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,e.labelStyle)}const p=(((_=h.node())==null?void 0:_.getBBox().width)??200)+o,m=(((k=h.node())==null?void 0:k.getBBox().height)??200)+o,y=-p/2,x=-m/2,b=X.svg(h),C=K(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=b.rectangle(y,x,p,m,C),w=h.insert(()=>v,":first-child");if(w.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((O,N,D)=>{const T=gt(D[N]),R=T.attr("transform");let L=0,M=0;if(R){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);E&&(L=parseFloat(E[1]),M=parseFloat(E[2]))}const F=M-m/2;let B=y+o/2;(N===0||N===1)&&(B=L),T.attr("transform",`translate(${B}, ${F+o})`)}),f>u+d+s){const O=b.line(y,x+u+d+s,y+p,x+u+d+s,C);h.insert(()=>O).attr("style",i)}return Q(e,w),e.intersect=function(O){return V.rect(e,O)},h}g(Y0,"requirementBox");async function Be(t,e,r,i=""){if(e==="")return 0;const n=t.insert("g").attr("class","label").attr("style",i),a=xt(),o=a.htmlLabels??!0,s=await pr(n,_s(qr(e)),{width:rr(e,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let c;if(o){const l=s.children[0],h=gt(s);c=l.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const l=s.children[0];for(const h of l.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);c=s.getBBox(),c.height+=6}return n.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}g(Be,"addText");var JL=g(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 G0(t,e,{config:r}){var R,L;const{labelStyles:i,nodeStyles:n}=J(e);e.labelStyle=i||"";const a=10,o=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:c,label:l}=await ct(t,e,st(e)),h=e.padding||10;let u="",f;"ticket"in e&&e.ticket&&((R=r==null?void 0:r.kanban)!=null&&R.ticketBaseUrl)&&(u=(L=r==null?void 0:r.kanban)==null?void 0:L.ticketBaseUrl.replace("#TICKET#",e.ticket),f=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let p,m;f?{label:p,bbox:m}=await Lo(f,"ticket"in e&&e.ticket||"",d):{label:p,bbox:m}=await Lo(s,"ticket"in e&&e.ticket||"",d);const{label:y,bbox:x}=await Lo(s,"assigned"in e&&e.assigned||"",d);e.width=o;const b=10,C=(e==null?void 0:e.width)||0,v=Math.max(m.height,x.height)/2,w=Math.max(c.height+b*2,(e==null?void 0:e.height)||0)+v,_=-C/2,k=-w/2;l.attr("transform","translate("+(h-C/2)+", "+(-v-c.height/2)+")"),p.attr("transform","translate("+(h-C/2)+", "+(-v+c.height/2)+")"),y.attr("transform","translate("+(h+C/2-x.width-2*a)+", "+(-v+c.height/2)+")");let O;const{rx:N,ry:D}=e,{cssStyles:T}=e;if(e.look==="handDrawn"){const M=X.svg(s),F=K(e,{}),B=N||D?M.path(nr(_,k,C,w,N||0),F):M.rectangle(_,k,C,w,F);O=s.insert(()=>B,":first-child"),O.attr("class","basic label-container").attr("style",T||null)}else{O=s.insert("rect",":first-child"),O.attr("class","basic label-container __APA__").attr("style",n).attr("rx",N??5).attr("ry",D??5).attr("x",_).attr("y",k).attr("width",C).attr("height",w);const M="priority"in e&&e.priority;if(M){const F=s.append("line"),B=_+2,$=k+Math.floor((N??0)/2),E=k+w-Math.floor((N??0)/2);F.attr("x1",B).attr("y1",$).attr("x2",B).attr("y2",E).attr("stroke-width","4").attr("stroke",JL(M))}}return Q(e,O),e.height=w,e.intersect=function(M){return V.rect(e,M)},s}g(G0,"kanbanItem");var tB=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:A0},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:S0},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:L0},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:$0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Qm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:jm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:w0},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:a0},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:g0},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:p0},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:P0},{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:f0},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:t0},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:R0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Hm},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:T0},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:F0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:E0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:i0},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:s0},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Vm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Xm},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Zm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:m0},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:W0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:n0},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:I0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:y0},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Km},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Jm},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:z0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:H0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:e0},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:N0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:r0},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:M0},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:_0},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:b0},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:qm},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Gm},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:O0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:D0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:q0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:v0},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:x0}],eB=g(()=>{const e=[...Object.entries({state:B0,choice:Um,note:C0,rectWithTitle:k0,labelRect:d0,iconSquare:h0,iconCircle:l0,icon:o0,iconRounded:c0,imageSquare:u0,anchor:Wm,kanbanItem:G0,classBox:j0,erBox:Rc,requirementBox:Y0}),...tB.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),V0=eB();function rB(t){return t in V0}g(rB,"isValidShape");var Hs=new Map;async function X0(t,e,r){let i,n;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?V0[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;r.config.securityLevel==="sandbox"?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),n=await a(i,e,r)}else n=await a(t,e,r),i=n;return e.tooltip&&n.attr("title",e.tooltip),Hs.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(X0,"insertNode");var o$=g((t,e)=>{Hs.set(e.id,t)},"setNodeElem"),l$=g(()=>{Hs.clear()},"clear"),c$=g(t=>{const e=Hs.get(t.id);I.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,i=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+i-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),i},"positionNode"),iB=g((t,e,r,i,n,a)=>{e.arrowTypeStart&&Hu(t,"start",e.arrowTypeStart,r,i,n,a),e.arrowTypeEnd&&Hu(t,"end",e.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),nB={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Hu=g((t,e,r,i,n,a,o)=>{var u;const s=nB[r];if(!s){I.warn(`Unknown arrow type: ${r}`);return}const c=s.type,h=`${n}_${a}-${c}${e==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const f=o.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${f}`;if(!document.getElementById(d)){const p=document.getElementById(h);if(p){const m=p.cloneNode(!0);m.id=d,m.querySelectorAll("path, circle, line").forEach(x=>{x.setAttribute("stroke",o),s.fill&&x.setAttribute("fill",o)}),(u=p.parentNode)==null||u.appendChild(m)}}t.attr(`marker-${e}`,`url(${i}#${d})`)}else t.attr(`marker-${e}`,`url(${i}#${h})`)},"addEdgeMarker"),ps=new Map,qt=new Map,h$=g(()=>{ps.clear(),qt.clear()},"clear"),en=g(t=>t?t.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),aB=g(async(t,e)=>{let r=Ot(xt().flowchart.htmlLabels);const i=await pr(t,e.label,{style:en(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});I.info("abc82",e,e.labelType);const n=t.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label");a.node().appendChild(i);let o=i.getBBox();if(r){const c=i.children[0],l=gt(i);o=c.getBoundingClientRect(),l.attr("width",o.width),l.attr("height",o.height)}a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),ps.set(e.id,n),e.width=o.width,e.height=o.height;let s;if(e.startLabelLeft){const c=await Sr(e.startLabelLeft,en(e.labelStyle)),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).startLeft=l,cn(s,e.startLabelLeft)}if(e.startLabelRight){const c=await Sr(e.startLabelRight,en(e.labelStyle)),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=l.node().appendChild(c),h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).startRight=l,cn(s,e.startLabelRight)}if(e.endLabelLeft){const c=await Sr(e.endLabelLeft,en(e.labelStyle)),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(c),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).endLeft=l,cn(s,e.endLabelLeft)}if(e.endLabelRight){const c=await Sr(e.endLabelRight,en(e.labelStyle)),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(c),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).endRight=l,cn(s,e.endLabelRight)}return i},"insertEdgeLabel");function cn(t,e){xt().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}g(cn,"setTerminalWidth");var sB=g((t,e)=>{I.debug("Moving label abc88 ",t.id,t.label,ps.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=xt(),{subGraphTitleTotalMargin:n}=Xl(i);if(t.label){const a=ps.get(t.id);let o=t.x,s=t.y;if(r){const c=Fe.calcLabelPosition(r);I.debug("Moving label "+t.label+" from (",o,",",s,") to (",c.x,",",c.y,") abc88"),e.updatedPath&&(o=c.x,s=c.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(t.startLabelLeft){const a=qt.get(t.id).startLeft;let o=t.x,s=t.y;if(r){const c=Fe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(t.startLabelRight){const a=qt.get(t.id).startRight;let o=t.x,s=t.y;if(r){const c=Fe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(t.endLabelLeft){const a=qt.get(t.id).endLeft;let o=t.x,s=t.y;if(r){const c=Fe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(t.endLabelRight){const a=qt.get(t.id).endRight;let o=t.x,s=t.y;if(r){const c=Fe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),oB=g((t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),a=Math.abs(e.y-i),o=t.width/2,s=t.height/2;return n>=o||a>=s},"outsideNode"),lB=g((t,e,r)=>{I.debug(`intersection calc abc89:
|
||
outsidePoint: ${JSON.stringify(e)}
|
||
insidePoint : ${JSON.stringify(r)}
|
||
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,a=Math.abs(i-r.x),o=t.width/2;let s=r.x<e.x?o-a:o+a;const c=t.height/2,l=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*o>Math.abs(i-e.x)*c){let u=r.y<e.y?e.y-c-n:n-c-e.y;s=h*u/l;const f={x:r.x<e.x?r.x+s:r.x-h+s,y:r.y<e.y?r.y+l-u:r.y-l+u};return s===0&&(f.x=e.x,f.y=e.y),h===0&&(f.x=e.x),l===0&&(f.y=e.y),I.debug(`abc89 top/bottom calc, Q ${l}, q ${u}, R ${h}, r ${s}`,f),f}else{r.x<e.x?s=e.x-o-i:s=i-o-e.x;let u=l*s/h,f=r.x<e.x?r.x+h-s:r.x-h+s,d=r.y<e.y?r.y+u:r.y-u;return I.debug(`sides calc abc89, Q ${l}, q ${u}, R ${h}, r ${s}`,{_x:f,_y:d}),s===0&&(f=e.x,d=e.y),h===0&&(f=e.x),l===0&&(d=e.y),{x:f,y:d}}},"intersection"),Uu=g((t,e)=>{I.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(a=>{if(I.info("abc88 checking point",a,e),!oB(e,a)&&!n){const o=lB(e,i,a);I.debug("abc88 inside",a,i,o),I.debug("abc88 intersection",o,e);let s=!1;r.forEach(c=>{s=s||c.x===o.x&&c.y===o.y}),r.some(c=>c.x===o.x&&c.y===o.y)?I.warn("abc88 no intersect",o,r):r.push(o),n=!0}else I.warn("abc88 outside",a,i),i=a,n||r.push(a)}),I.debug("returning points",r),r},"cutPathAtIntersect");function Z0(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const n=t[i-1],a=t[i],o=t[i+1];(n.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}g(Z0,"extractCornerPoints");var ju=g(function(t,e,r){const i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:e.x-o*i,y:e.y-o*n}},"findAdjacentPoint"),cB=g(function(t){const{cornerPointPositions:e}=Z0(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const n=t[i-1],a=t[i+1],o=t[i],s=ju(n,o,5),c=ju(a,o,5),l=c.x-s.x,h=c.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){I.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const d=5;o.x===s.x?f={x:l<0?s.x-d+u:s.x+d-u,y:h<0?s.y-u:s.y+u}:f={x:l<0?s.x-u:s.x+u,y:h<0?s.y-d+u:s.y+d-u}}else I.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,c)}else r.push(t[i]);return r},"fixCorners"),hB=g(function(t,e,r,i,n,a,o){var N;const{handDrawnSeed:s}=xt();let c=e.points,l=!1;const h=n;var u=a;const f=[];for(const D in e.cssCompiledStyles)fp(D)||f.push(e.cssCompiledStyles[D]);u.intersect&&h.intersect&&(c=c.slice(1,e.points.length-1),c.unshift(h.intersect(c[0])),I.debug("Last point APA12",e.start,"-->",e.end,c[c.length-1],u,u.intersect(c[c.length-1])),c.push(u.intersect(c[c.length-1]))),e.toCluster&&(I.info("to cluster abc88",r.get(e.toCluster)),c=Uu(e.points,r.get(e.toCluster).node),l=!0),e.fromCluster&&(I.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(c,null,2)),c=Uu(c.reverse(),r.get(e.fromCluster).node).reverse(),l=!0);let d=c.filter(D=>!Number.isNaN(D.y));d=cB(d);let p=xa;switch(p=Ka,e.curve){case"linear":p=Ka;break;case"basis":p=xa;break;case"cardinal":p=yg;break;case"bumpX":p=fg;break;case"bumpY":p=dg;break;case"catmullRom":p=bg;break;case"monotoneX":p=Sg;break;case"monotoneY":p=Tg;break;case"natural":p=Ag;break;case"step":p=Lg;break;case"stepAfter":p=Eg;break;case"stepBefore":p=Bg;break;default:p=xa}const{x:m,y}=O1(e),x=nS().x(m).y(y).curve(p);let b;switch(e.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(e.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let C,v=x(d);const w=Array.isArray(e.style)?e.style:e.style?[e.style]:[];let _=w.find(D=>D==null?void 0:D.startsWith("stroke:"));if(e.look==="handDrawn"){const D=X.svg(t);Object.assign([],d);const T=D.path(v,{roughness:.3,seed:s});b+=" transition",C=gt(T).select("path").attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",w?w.reduce((L,M)=>L+";"+M,""):"");let R=C.attr("d");C.attr("d",R),t.node().appendChild(C.node())}else{const D=f.join(";"),T=w?w.reduce((M,F)=>M+F+";",""):"";let R="";e.animate&&(R=" edge-animation-fast"),e.animation&&(R=" edge-animation-"+e.animation);const L=D?D+";"+T+";":T;C=t.append("path").attr("d",v).attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")+(R??"")).attr("style",L),_=(N=L.match(/stroke:([^;]+)/))==null?void 0:N[1]}let k="";(xt().flowchart.arrowMarkerAbsolute||xt().state.arrowMarkerAbsolute)&&(k=Af(!0)),I.info("arrowTypeStart",e.arrowTypeStart),I.info("arrowTypeEnd",e.arrowTypeEnd),iB(C,e,k,o,i,_);let O={};return l&&(O.updatedPath=c),O.originalPath=e.points,O},"insertEdge"),uB=g((t,e,r,i)=>{e.forEach(n=>{MB[n](t,r,i)})},"insertMarkers"),fB=g((t,e,r)=>{I.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),dB=g((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),pB=g((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),gB=g((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),mB=g((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("stroke","black").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("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),yB=g((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),xB=g((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),bB=g((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),_B=g((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"),CB=g((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"),wB=g((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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),vB=g((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"),kB=g((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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),SB=g((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
||
L20,10
|
||
M20,10
|
||
L0,20`)},"requirement_arrow"),TB=g((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"),MB={extension:fB,composition:dB,aggregation:pB,dependency:gB,lollipop:mB,point:yB,circle:xB,cross:bB,barb:_B,only_one:CB,zero_or_one:wB,one_or_more:vB,zero_or_more:kB,requirement_arrow:SB,requirement_contains:TB},AB=uB,LB={common:Li,getConfig:he,insertCluster:IL,insertEdge:hB,insertEdgeLabel:aB,insertMarkers:AB,insertNode:X0,interpolateToCurve:yc,labelHelper:ct,log:I,positionEdgeLabel:sB},Mn={},K0=g(t=>{for(const e of t)Mn[e.name]=e},"registerLayoutLoaders"),BB=g(()=>{K0([{name:"dagre",loader:g(async()=>await wt(()=>import("./dagre-FFZHY6LT-ByNd4rXI.js"),__vite__mapDeps([7,8,9,10,11,12,3,2,4,1,5,6])),"loader")}])},"registerDefaultLayoutLoaders");BB();var u$=g(async(t,e)=>{if(!(t.layoutAlgorithm in Mn))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=Mn[t.layoutAlgorithm];return(await r.loader()).render(t,e,LB,{algorithm:r.algorithm})},"render"),f$=g((t="",{fallback:e="dagre"}={})=>{if(t in Mn)return t;if(e in Mn)return I.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"),Yu={name:"mermaid",version:"11.8.1",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},EB=g(t=>{var n;const{securityLevel:e}=xt();let r=gt("body");if(e==="sandbox"){const o=((n=gt(`#i${t}`).node())==null?void 0:n.contentDocument)??document;r=gt(o.body)}return r.select(`#${t}`)},"selectSvgElement"),Q0="comm",J0="rule",ty="decl",FB="@import",$B="@namespace",DB="@keyframes",OB="@layer",ey=Math.abs,Ic=String.fromCharCode;function ry(t){return t.trim()}function wa(t,e,r){return t.replace(e,r)}function RB(t,e,r){return t.indexOf(e,r)}function si(t,e){return t.charCodeAt(e)|0}function Mi(t,e,r){return t.slice(e,r)}function Ee(t){return t.length}function IB(t){return t.length}function aa(t,e){return e.push(t),t}var Us=1,Ai=1,iy=0,xe=0,Et=0,Di="";function Pc(t,e,r,i,n,a,o,s){return{value:t,root:e,parent:r,type:i,props:n,children:a,line:Us,column:Ai,length:o,return:"",siblings:s}}function PB(){return Et}function NB(){return Et=xe>0?si(Di,--xe):0,Ai--,Et===10&&(Ai=1,Us--),Et}function ve(){return Et=xe<iy?si(Di,xe++):0,Ai++,Et===10&&(Ai=1,Us++),Et}function or(){return si(Di,xe)}function va(){return xe}function js(t,e){return Mi(Di,t,e)}function An(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 zB(t){return Us=Ai=1,iy=Ee(Di=t),xe=0,[]}function WB(t){return Di="",t}function Bo(t){return ry(js(xe-1,Ml(t===91?t+2:t===40?t+1:t)))}function qB(t){for(;(Et=or())&&Et<33;)ve();return An(t)>2||An(Et)>3?"":" "}function HB(t,e){for(;--e&&ve()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return js(t,va()+(e<6&&or()==32&&ve()==32))}function Ml(t){for(;ve();)switch(Et){case t:return xe;case 34:case 39:t!==34&&t!==39&&Ml(Et);break;case 40:t===41&&Ml(t);break;case 92:ve();break}return xe}function UB(t,e){for(;ve()&&t+Et!==57;)if(t+Et===84&&or()===47)break;return"/*"+js(e,xe-1)+"*"+Ic(t===47?t:ve())}function jB(t){for(;!An(or());)ve();return js(t,xe)}function YB(t){return WB(ka("",null,null,null,[""],t=zB(t),0,[0],t))}function ka(t,e,r,i,n,a,o,s,c){for(var l=0,h=0,u=o,f=0,d=0,p=0,m=1,y=1,x=1,b=0,C="",v=n,w=a,_=i,k=C;y;)switch(p=b,b=ve()){case 40:if(p!=108&&si(k,u-1)==58){RB(k+=wa(Bo(b),"&","&\f"),"&\f",ey(l?s[l-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:k+=Bo(b);break;case 9:case 10:case 13:case 32:k+=qB(p);break;case 92:k+=HB(va()-1,7);continue;case 47:switch(or()){case 42:case 47:aa(GB(UB(ve(),va()),e,r,c),c),(An(p||1)==5||An(or()||1)==5)&&Ee(k)&&Mi(k,-1,void 0)!==" "&&(k+=" ");break;default:k+="/"}break;case 123*m:s[l++]=Ee(k)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(k=wa(k,/\f/g,"")),d>0&&(Ee(k)-u||m===0&&p===47)&&aa(d>32?Vu(k+";",i,r,u-1,c):Vu(wa(k," ","")+";",i,r,u-2,c),c);break;case 59:k+=";";default:if(aa(_=Gu(k,e,r,l,h,n,s,C,v=[],w=[],u,a),a),b===123)if(h===0)ka(k,e,_,_,v,a,u,s,w);else{switch(f){case 99:if(si(k,3)===110)break;case 108:if(si(k,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ka(t,_,_,i&&aa(Gu(t,_,_,0,0,n,s,C,n,v=[],u,w),w),n,w,u,s,i?v:w):ka(k,_,_,_,[""],w,0,s,w)}}l=h=d=0,m=x=1,C=k="",u=o;break;case 58:u=1+Ee(k),d=p;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&NB()==125)continue}switch(k+=Ic(b),b*m){case 38:x=h>0?1:(k+="\f",-1);break;case 44:s[l++]=(Ee(k)-1)*x,x=1;break;case 64:or()===45&&(k+=Bo(ve())),f=or(),h=u=Ee(C=k+=jB(va())),b++;break;case 45:p===45&&Ee(k)==2&&(m=0)}}return a}function Gu(t,e,r,i,n,a,o,s,c,l,h,u){for(var f=n-1,d=n===0?a:[""],p=IB(d),m=0,y=0,x=0;m<i;++m)for(var b=0,C=Mi(t,f+1,f=ey(y=o[m])),v=t;b<p;++b)(v=ry(y>0?d[b]+" "+C:wa(C,/&\f/g,d[b])))&&(c[x++]=v);return Pc(t,e,r,n===0?J0:s,c,l,h,u)}function GB(t,e,r,i){return Pc(t,e,r,Q0,Ic(PB()),Mi(t,2,-2),0,i)}function Vu(t,e,r,i,n){return Pc(t,e,r,ty,Mi(t,0,i),Mi(t,i+1,-1),i,n)}function Al(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function VB(t,e,r,i){switch(t.type){case OB:if(t.children.length)break;case FB:case $B:case ty:return t.return=t.return||t.value;case Q0:return"";case DB:return t.return=t.value+"{"+Al(t.children,i)+"}";case J0:if(!Ee(t.value=t.props.join(",")))return""}return Ee(r=Al(t.children,i))?t.return=t.value+"{"+r+"}":""}var XB=Og(Object.keys,Object),ZB=Object.prototype,KB=ZB.hasOwnProperty;function QB(t){if(!Os(t))return XB(t);var e=[];for(var r in Object(t))KB.call(t,r)&&r!="constructor"&&e.push(r);return e}var Ll=Wr(Ie,"DataView"),Bl=Wr(Ie,"Promise"),El=Wr(Ie,"Set"),Fl=Wr(Ie,"WeakMap"),Xu="[object Map]",JB="[object Object]",Zu="[object Promise]",Ku="[object Set]",Qu="[object WeakMap]",Ju="[object DataView]",tE=zr(Ll),eE=zr(Tn),rE=zr(Bl),iE=zr(El),nE=zr(Fl),_r=Ei;(Ll&&_r(new Ll(new ArrayBuffer(1)))!=Ju||Tn&&_r(new Tn)!=Xu||Bl&&_r(Bl.resolve())!=Zu||El&&_r(new El)!=Ku||Fl&&_r(new Fl)!=Qu)&&(_r=function(t){var e=Ei(t),r=e==JB?t.constructor:void 0,i=r?zr(r):"";if(i)switch(i){case tE:return Ju;case eE:return Xu;case rE:return Zu;case iE:return Ku;case nE:return Qu}return e});var aE="[object Map]",sE="[object Set]",oE=Object.prototype,lE=oE.hasOwnProperty;function tf(t){if(t==null)return!0;if(Rs(t)&&(ns(t)||typeof t=="string"||typeof t.splice=="function"||gc(t)||mc(t)||is(t)))return!t.length;var e=_r(t);if(e==aE||e==sE)return!t.size;if(Os(t))return!QB(t).length;for(var r in t)if(lE.call(t,r))return!1;return!0}var ny="c4",cE=g(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),hE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./c4Diagram-6F6E4RAY-B6hTg9H8.js");return{diagram:e}},__vite__mapDeps([13,14,3,2,4,1,5,6]));return{id:ny,diagram:t}},"loader"),uE={id:ny,detector:cE,loader:hE},fE=uE,ay="flowchart",dE=g((t,e)=>{var r,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},"detector"),pE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./flowDiagram-PKI6S5ZS-Ry-v0Q5g.js");return{diagram:e}},__vite__mapDeps([15,16,17,18,3,2,4,1,5,6]));return{id:ay,diagram:t}},"loader"),gE={id:ay,detector:dE,loader:pE},mE=gE,sy="flowchart-v2",yE=g((t,e)=>{var r,i,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t))},"detector"),xE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./flowDiagram-PKI6S5ZS-Ry-v0Q5g.js");return{diagram:e}},__vite__mapDeps([15,16,17,18,3,2,4,1,5,6]));return{id:sy,diagram:t}},"loader"),bE={id:sy,detector:yE,loader:xE},_E=bE,oy="er",CE=g(t=>/^\s*erDiagram/.test(t),"detector"),wE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./erDiagram-R3QVA2FD-Pi_9scwm.js");return{diagram:e}},__vite__mapDeps([19,17,18,3,2,4,1,5,6]));return{id:oy,diagram:t}},"loader"),vE={id:oy,detector:CE,loader:wE},kE=vE,ly="gitGraph",SE=g(t=>/^\s*gitGraph/.test(t),"detector"),TE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./gitGraphDiagram-GW3U2K7C-tvjpfBbf.js");return{diagram:e}},__vite__mapDeps([20,21,22,23,3,2,4,1,5,6,9,11,12]));return{id:ly,diagram:t}},"loader"),ME={id:ly,detector:SE,loader:TE},AE=ME,cy="gantt",LE=g(t=>/^\s*gantt/.test(t),"detector"),BE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./ganttDiagram-EK5VF46D-Bxc01I9z.js");return{diagram:e}},__vite__mapDeps([24,2,3,4,1,5,6]));return{id:cy,diagram:t}},"loader"),EE={id:cy,detector:LE,loader:BE},FE=EE,hy="info",$E=g(t=>/^\s*info/.test(t),"detector"),DE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./infoDiagram-XT3IWWJI-BuuxTqr8.js");return{diagram:e}},__vite__mapDeps([25,23,3,2,4,1,5,6,9,11,12]));return{id:hy,diagram:t}},"loader"),OE={id:hy,detector:$E,loader:DE},uy="pie",RE=g(t=>/^\s*pie/.test(t),"detector"),IE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./pieDiagram-NIOCPIFQ-CwcVShaD.js");return{diagram:e}},__vite__mapDeps([26,21,23,3,2,4,1,5,6,9,11,12]));return{id:uy,diagram:t}},"loader"),PE={id:uy,detector:RE,loader:IE},fy="quadrantChart",NE=g(t=>/^\s*quadrantChart/.test(t),"detector"),zE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./quadrantDiagram-2OG54O6I-C2wGvonb.js");return{diagram:e}},__vite__mapDeps([27,3,2,4,1,5,6]));return{id:fy,diagram:t}},"loader"),WE={id:fy,detector:NE,loader:zE},qE=WE,dy="xychart",HE=g(t=>/^\s*xychart-beta/.test(t),"detector"),UE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./xychartDiagram-H2YORKM3-DP9uyfob.js");return{diagram:e}},__vite__mapDeps([28,3,2,4,1,5,6]));return{id:dy,diagram:t}},"loader"),jE={id:dy,detector:HE,loader:UE},YE=jE,py="requirement",GE=g(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),VE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./requirementDiagram-SO3GGRV7-DBB4gQhP.js");return{diagram:e}},__vite__mapDeps([29,17,18,3,2,4,1,5,6]));return{id:py,diagram:t}},"loader"),XE={id:py,detector:GE,loader:VE},ZE=XE,gy="sequence",KE=g(t=>/^\s*sequenceDiagram/.test(t),"detector"),QE=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./sequenceDiagram-ZIKVLSP4-oO1T3_CU.js");return{diagram:e}},__vite__mapDeps([30,14,22,3,2,4,1,5,6]));return{id:gy,diagram:t}},"loader"),JE={id:gy,detector:KE,loader:QE},tF=JE,my="class",eF=g((t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},"detector"),rF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./classDiagram-BGRH5UQR-B1ZwhQup.js");return{diagram:e}},__vite__mapDeps([31,32,16,17,18,3,2,4,1,5,6]));return{id:my,diagram:t}},"loader"),iF={id:my,detector:eF,loader:rF},nF=iF,yy="classDiagram",aF=g((t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},"detector"),sF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./classDiagram-v2-O24JOBDK-B1ZwhQup.js");return{diagram:e}},__vite__mapDeps([33,32,16,17,18,3,2,4,1,5,6]));return{id:yy,diagram:t}},"loader"),oF={id:yy,detector:aF,loader:sF},lF=oF,xy="state",cF=g((t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},"detector"),hF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./stateDiagram-XX37X6EN-CH0H6nhR.js");return{diagram:e}},__vite__mapDeps([34,35,17,18,8,9,10,11,3,2,4,1,5,6]));return{id:xy,diagram:t}},"loader"),uF={id:xy,detector:cF,loader:hF},fF=uF,by="stateDiagram",dF=g((t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),pF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./stateDiagram-v2-GD6S3NHB-CxRIz5En.js");return{diagram:e}},__vite__mapDeps([36,35,17,18,3,2,4,1,5,6]));return{id:by,diagram:t}},"loader"),gF={id:by,detector:dF,loader:pF},mF=gF,_y="journey",yF=g(t=>/^\s*journey/.test(t),"detector"),xF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./journeyDiagram-EWQZEKCU-yZAKQsFS.js");return{diagram:e}},__vite__mapDeps([37,14,16,3,2,4,1,5,6]));return{id:_y,diagram:t}},"loader"),bF={id:_y,detector:yF,loader:xF},_F=bF,CF=g((t,e,r)=>{I.debug(`rendering svg for syntax error
|
||
`);const i=EB(e),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Lf(i,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),Cy={draw:CF},wF=Cy,vF={db:{},renderer:Cy,parser:{parse:g(()=>{},"parse")}},kF=vF,wy="flowchart-elk",SF=g((t,e={})=>{var r;return/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),TF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./flowDiagram-PKI6S5ZS-Ry-v0Q5g.js");return{diagram:e}},__vite__mapDeps([15,16,17,18,3,2,4,1,5,6]));return{id:wy,diagram:t}},"loader"),MF={id:wy,detector:SF,loader:TF},AF=MF,vy="timeline",LF=g(t=>/^\s*timeline/.test(t),"detector"),BF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./timeline-definition-RI47OAVP-wbT62k2j.js");return{diagram:e}},__vite__mapDeps([38,3,2,4,1,5,6]));return{id:vy,diagram:t}},"loader"),EF={id:vy,detector:LF,loader:BF},FF=EF,ky="mindmap",$F=g(t=>/^\s*mindmap/.test(t),"detector"),DF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./mindmap-definition-CZNETY7S-CrKQy-YF.js");return{diagram:e}},__vite__mapDeps([39,40,2,3,4,1,5,6]));return{id:ky,diagram:t}},"loader"),OF={id:ky,detector:$F,loader:DF},RF=OF,Sy="kanban",IF=g(t=>/^\s*kanban/.test(t),"detector"),PF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./kanban-definition-ILFWEQ3N-zK-xSLMv.js");return{diagram:e}},__vite__mapDeps([41,16,3,2,4,1,5,6]));return{id:Sy,diagram:t}},"loader"),NF={id:Sy,detector:IF,loader:PF},zF=NF,Ty="sankey",WF=g(t=>/^\s*sankey-beta/.test(t),"detector"),qF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./sankeyDiagram-4UZDY2LN-CYCZYo1y.js");return{diagram:e}},__vite__mapDeps([42,3,2,4,1,5,6]));return{id:Ty,diagram:t}},"loader"),HF={id:Ty,detector:WF,loader:qF},UF=HF,My="packet",jF=g(t=>/^\s*packet-beta/.test(t),"detector"),YF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./diagram-5UYTHUR4-BI5BPMV3.js");return{diagram:e}},__vite__mapDeps([43,21,23,3,2,4,1,5,6,9,11,12]));return{id:My,diagram:t}},"loader"),GF={id:My,detector:jF,loader:YF},Ay="radar",VF=g(t=>/^\s*radar-beta/.test(t),"detector"),XF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./diagram-ZTM2IBQH-DdeCcMoF.js");return{diagram:e}},__vite__mapDeps([44,21,23,3,2,4,1,5,6,9,11,12]));return{id:Ay,diagram:t}},"loader"),ZF={id:Ay,detector:VF,loader:XF},Ly="block",KF=g(t=>/^\s*block-beta/.test(t),"detector"),QF=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./blockDiagram-PHRCVELO-BX1-QuFh.js");return{diagram:e}},__vite__mapDeps([45,16,12,9,8,3,2,4,1,5,6]));return{id:Ly,diagram:t}},"loader"),JF={id:Ly,detector:KF,loader:QF},t3=JF,By="architecture",e3=g(t=>/^\s*architecture/.test(t),"detector"),r3=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./architectureDiagram-NQ2NVSRB-C5lQ6TdU.js");return{diagram:e}},__vite__mapDeps([46,21,22,23,3,2,4,1,5,6,9,11,12,40]));return{id:By,diagram:t}},"loader"),i3={id:By,detector:e3,loader:r3},n3=i3,Ey="treemap",a3=g(t=>/^\s*treemap/.test(t),"detector"),s3=g(async()=>{const{diagram:t}=await wt(async()=>{const{diagram:e}=await import("./diagram-3EMPZRKU-CJIrRTbX.js");return{diagram:e}},__vite__mapDeps([47,18,21,22,23,3,2,4,1,5,6,9,11,12]));return{id:Ey,diagram:t}},"loader"),o3={id:Ey,detector:a3,loader:s3},ef=!1,Ys=g(()=>{ef||(ef=!0,Aa("error",kF,t=>t.toLowerCase().trim()==="error"),Aa("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{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:g(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Oo(AF,RF,n3),Oo(fE,zF,lF,nF,kE,FE,OE,PE,ZE,tF,_E,mE,FF,AE,mF,fF,_F,qE,UF,GF,YE,t3,ZF,o3))},"addDiagrams"),l3=g(async()=>{I.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(mi).map(async([r,{detector:i,loader:n}])=>{if(n)try{No(r)}catch{try{const{diagram:a,id:o}=await n();Aa(o,a,i)}catch(a){throw I.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete mi[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){I.error(`Failed to load ${e.length} external diagrams`);for(const r of e)I.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),c3="graphics-document document";function Fy(t,e){t.attr("role",c3),e!==""&&t.attr("aria-roledescription",e)}g(Fy,"setA11yDiagramInfo");function $y(t,e,r,i){if(t.insert!==void 0){if(r){const n=`chart-desc-${i}`;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){const n=`chart-title-${i}`;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}g($y,"addSVGa11yTitleDescription");var Mr,$l=(Mr=class{constructor(e,r,i,n,a){this.type=e,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(e,r={}){var l,h;const i=he(),n=Rl(e,i);e=sA(e)+`
|
||
`;try{No(n)}catch{const u=Rx(n);if(!u)throw new gf(`Diagram ${n} not found.`);const{id:f,diagram:d}=await u();Aa(f,d)}const{db:a,parser:o,renderer:s,init:c}=No(n);return o.parser&&(o.parser.yy=a),(l=a.clear)==null||l.call(a),c==null||c(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(e),new Mr(n,e,a,o,s)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},g(Mr,"Diagram"),Mr),rf=[],h3=g(()=>{rf.forEach(t=>{t()}),rf=[]},"attachFunctions"),u3=g(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Dy(t){const e=t.match(pf);if(!e)return{text:t,metadata:{}};let r=D1(e[1],{schema:$1})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}g(Dy,"extractFrontMatter");var f3=g(t=>t.replace(/\r\n?/g,`
|
||
`).replace(/<(\w+)([^>]*)>/g,(e,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),d3=g(t=>{const{text:e,metadata:r}=Dy(t),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:e}},"processFrontmatter"),p3=g(t=>{const e=Fe.detectInit(t)??{},r=Fe.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:GM(t),directive:e}},"processDirectives");function Nc(t){const e=f3(t),r=d3(e),i=p3(r.text),n=wc(r.config,i.directive);return t=u3(i.text),{code:t,title:r.title,config:n}}g(Nc,"preprocessDiagram");function Oy(t){const e=new TextEncoder().encode(t),r=Array.from(e,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(Oy,"toBase64");var g3=5e4,m3="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",y3="sandbox",x3="loose",b3="http://www.w3.org/2000/svg",_3="http://www.w3.org/1999/xlink",C3="http://www.w3.org/1999/xhtml",w3="100%",v3="100%",k3="border:0;margin:0;",S3="margin:0",T3="allow-top-navigation-by-user-activation allow-popups",M3='The "iframe" tag is not supported by your browser.',A3=["foreignobject"],L3=["dominant-baseline"];function zc(t){const e=Nc(t);return Ta(),Qx(e.config??{}),e}g(zc,"processAndSetConfigs");async function Ry(t,e){Ys();try{const{code:r,config:i}=zc(t);return{diagramType:(await Py(r)).type,config:i}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}g(Ry,"parse");var nf=g((t,e,r=[])=>`
|
||
.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),B3=g((t,e=new Map)=>{var i;let r="";if(t.themeCSS!==void 0&&(r+=`
|
||
${t.themeCSS}`),t.fontFamily!==void 0&&(r+=`
|
||
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=`
|
||
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const s=t.htmlLabels??((i=t.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(c=>{tf(c.styles)||s.forEach(l=>{r+=nf(c.id,l,c.styles)}),tf(c.textStyles)||(r+=nf(c.id,"tspan",((c==null?void 0:c.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),E3=g((t,e,r,i)=>{const n=B3(t,r),a=mb(e,n,t.themeVariables);return Al(YB(`${i}{${a}}`),VB)},"createUserStyles"),F3=g((t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=qr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),$3=g((t="",e)=>{var n,a;const r=(a=(n=e==null?void 0:e.viewBox)==null?void 0:n.baseVal)!=null&&a.height?e.viewBox.baseVal.height+"px":v3,i=Oy(`<body style="${S3}">${t}</body>`);return`<iframe style="width:${w3};height:${r};${k3}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${T3}">
|
||
${M3}
|
||
</iframe>`},"putIntoIFrame"),af=g((t,e,r,i,n)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",b3);return n&&o.attr("xmlns:xlink",n),o.append("g"),t},"appendDivSvgG");function Dl(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(Dl,"sandboxedIframe");var D3=g((t,e,r,i)=>{var n,a,o;(n=t.getElementById(e))==null||n.remove(),(a=t.getElementById(r))==null||a.remove(),(o=t.getElementById(i))==null||o.remove()},"removeExistingElements"),O3=g(async function(t,e,r){var R,L,M,F,B,$;Ys();const i=zc(e);e=i.code;const n=he();I.debug(n),e.length>((n==null?void 0:n.maxTextSize)??g3)&&(e=m3);const a="#"+t,o="i"+t,s="#"+o,c="d"+t,l="#"+c,h=g(()=>{const q=gt(f?s:l).node();q&&"remove"in q&&q.remove()},"removeTempElements");let u=gt("body");const f=n.securityLevel===y3,d=n.securityLevel===x3,p=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const E=Dl(gt(r),o);u=gt(E.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=gt(r);af(u,t,c,`font-family: ${p}`,_3)}else{if(D3(document,t,c,o),f){const E=Dl(gt("body"),o);u=gt(E.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=gt("body");af(u,t,c)}let m,y;try{m=await $l.fromText(e,{title:i.title})}catch(E){if(n.suppressErrorRendering)throw h(),E;m=await $l.fromText("error"),y=E}const x=u.select(l).node(),b=m.type,C=x.firstChild,v=C.firstChild,w=(L=(R=m.renderer).getClasses)==null?void 0:L.call(R,e,m),_=E3(n,b,w,a),k=document.createElement("style");k.innerHTML=_,C.insertBefore(k,v);try{await m.renderer.draw(e,t,Yu.version,m)}catch(E){throw n.suppressErrorRendering?h():wF.draw(e,t,Yu.version),E}const O=u.select(`${l} svg`),N=(F=(M=m.db).getAccTitle)==null?void 0:F.call(M),D=($=(B=m.db).getAccDescription)==null?void 0:$.call(B);Ny(b,O,N,D),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",C3);let T=u.select(l).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),T=F3(T,f,Ot(n.arrowMarkerAbsolute)),f){const E=u.select(l+" svg").node();T=$3(T,E)}else d||(T=gi.sanitize(T,{ADD_TAGS:A3,ADD_ATTR:L3,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(h3(),y)throw y;return h(),{diagramType:b,svg:T,bindFunctions:m.db.bindFunctions}},"render");function Iy(t={}){var i;const e=Ht({},t);e!=null&&e.fontFamily&&!((i=e.themeVariables)!=null&&i.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),Zx(e),e!=null&&e.theme&&e.theme in Ke?e.themeVariables=Ke[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Ke.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?Xx(e):Cf();Ol(r.logLevel),Ys()}g(Iy,"initialize");var Py=g((t,e={})=>{const{code:r}=Nc(t);return $l.fromText(r,e)},"getDiagramFromText");function Ny(t,e,r,i){Fy(e,t),$y(e,r,i,e.attr("id"))}g(Ny,"addA11yInfo");var Or=Object.freeze({render:O3,parse:Ry,getDiagramFromText:Py,initialize:Iy,getConfig:he,setConfig:wf,getSiteConfig:Cf,updateSiteConfig:Kx,reset:g(()=>{Ta()},"reset"),globalReset:g(()=>{Ta(yi)},"globalReset"),defaultConfig:yi});Ol(he().logLevel);Ta(he());var R3=g((t,e,r)=>{I.warn(t),Cc(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"),zy=g(async function(t={querySelector:".mermaid"}){try{await I3(t)}catch(e){if(Cc(e)&&I.error(e.str),fe.parseError&&fe.parseError(e),!t.suppressErrors)throw I.error("Use the suppressErrors option to suppress these errors"),e}},"run"),I3=g(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Or.getConfig();I.debug(`${t?"":"No "}Callback function found`);let n;if(r)n=r;else if(e)n=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");I.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(I.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Or.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Fe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const c of Array.from(n)){if(I.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const l=`mermaid-${a.next()}`;o=c.innerHTML,o=fm(Fe.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Fe.detectInit(o);h&&I.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Uy(l,o,c);c.innerHTML=u,t&&await t(l),f&&f(c)}catch(u){R3(u,s,fe.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Wy=g(function(t){Or.initialize(t)},"initialize"),P3=g(async function(t,e,r){I.warn("mermaid.init is deprecated. Please use run instead."),t&&Wy(t);const i={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await zy(i)},"init"),N3=g(async(t,{lazyLoad:e=!0}={})=>{Ys(),Oo(...t),e===!1&&await l3()},"registerExternalDiagrams"),qy=g(function(){if(fe.startOnLoad){const{startOnLoad:t}=Or.getConfig();t&&fe.run().catch(e=>I.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",qy,!1);var z3=g(function(t){fe.parseError=t},"setParseErrorHandler"),gs=[],Eo=!1,Hy=g(async()=>{if(!Eo){for(Eo=!0;gs.length>0;){const t=gs.shift();if(t)try{await t()}catch(e){I.error("Error executing queue",e)}}Eo=!1}},"executeQueue"),W3=g(async(t,e)=>new Promise((r,i)=>{const n=g(()=>new Promise((a,o)=>{Or.parse(t,e).then(s=>{a(s),r(s)},s=>{var c;I.error("Error parsing",s),(c=fe.parseError)==null||c.call(fe,s),o(s),i(s)})}),"performCall");gs.push(n),Hy().catch(i)}),"parse"),Uy=g((t,e,r)=>new Promise((i,n)=>{const a=g(()=>new Promise((o,s)=>{Or.render(t,e,r).then(c=>{o(c),i(c)},c=>{var l;I.error("Error parsing",c),(l=fe.parseError)==null||l.call(fe,c),s(c),n(c)})}),"performCall");gs.push(a),Hy().catch(n)}),"render"),fe={startOnLoad:!0,mermaidAPI:Or,parse:W3,render:Uy,init:P3,run:zy,registerExternalDiagrams:N3,registerLayoutLoaders:K0,initialize:Wy,parseError:void 0,contentLoaded:qy,setParseErrorHandler:z3,detectType:Rl,registerIconPacks:hL},d$=fe;/*! Check if previously processed *//*!
|
||
* Wait for document loaded before starting the execution
|
||
*/export{yh as $,V3 as A,j3 as B,un as C,Dx as D,Sb as E,wc as F,he as G,bf as H,QM as I,$1 as J,EB as K,Yu as L,Is as M,i$ as N,Qp as O,n$ as P,qx as Q,Mv as R,xv as S,fL as T,nS as U,bi as V,Y3 as W,Af as X,Il as Y,HM as Z,g as _,bb as a,zM as a$,xa as a0,KM as a1,Bn as a2,db as a3,Ln as a4,G as a5,it as a6,Bf as a7,IL as a8,X0 as a9,tf as aA,Pn as aB,hL as aC,cL as aD,e$ as aE,Z3 as aF,X3 as aG,J3 as aH,ax as aI,Q3 as aJ,sg as aK,lc as aL,Ls as aM,Ov as aN,Dv as aO,Si as aP,$v as aQ,Fv as aR,Va as aS,Dn as aT,sc as aU,ac as aV,ei as aW,Ga as aX,K3 as aY,r$ as aZ,Nr as a_,c$ as aa,O1 as ab,Ot as ac,pr as ad,Xl as ae,km as af,qr as ag,Kg as ah,Xp as ai,Kp as aj,t$ as ak,J as al,fp as am,AB as an,l$ as ao,h$ as ap,s$ as aq,Q as ar,o$ as as,hB as at,sB as au,aB as av,NM as aw,ET as ax,FM as ay,dc as az,xb as b,Hg as b0,Fs as b1,Rs as b2,ns as b3,jg as b4,qg as b5,mM as b6,PM as b7,EM as b8,xT as b9,WM as bA,Os as bB,pc as ba,fM as bb,qM as bc,Rn as bd,Ei as be,es as bf,vM as bg,QB as bh,On as bi,is as bj,yM as bk,Rg as bl,CT as bm,wT as bn,_r as bo,wu as bp,vT as bq,gc as br,_T as bs,TT as bt,Fi as bu,dr as bv,yu as bw,mc as bx,Pg as by,El as bz,xt as c,gt as d,Lf as e,Ht as f,Cb as g,rr as h,Ar as i,z1 as j,Li as k,I as l,d$ as m,Jg as n,G3 as o,f$ as p,wb as q,u$ as r,_b as s,vb as t,Fe as u,D1 as v,eA as w,rB as x,a$ as y,yb as z};
|