217 lines
514 KiB
JavaScript
Generated
217 lines
514 KiB
JavaScript
Generated
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-9IcuADuT.js","assets/ui-vendor-CeCm8EER.js","assets/react-vendor-DEwriMA6.js","assets/feature-graph-1JWVBiE2.js","assets/graph-vendor-B-X5JegA.js","assets/utils-vendor-BysuhMZA.js","assets/feature-graph-BipNuM18.css","assets/feature-documents-4kaALKcK.js","assets/feature-retrieval-D-n9uG79.js","assets/markdown-vendor-Dv0NSOeH.js","assets/index-DzTVXLx_.css","assets/dagre-JOIXM2OF-TJIjXE8i.js","assets/graph-CU5GRdLx.js","assets/_baseUniq-DFa7Eb9f.js","assets/layout-BPcCgInP.js","assets/_basePickBy-Bl0OjHYx.js","assets/clone-q0JoP_FB.js","assets/c4Diagram-6F6E4RAY-DU07Q7eR.js","assets/chunk-67H74DCK-BzWic0ti.js","assets/flowDiagram-KYDEHFYC-D8EOpOOV.js","assets/chunk-E2GYISFI-Dr7CA-9U.js","assets/chunk-BFAMUDN2-B_Xp7o0L.js","assets/chunk-SKB7J2MH-BQwE94MR.js","assets/erDiagram-3M52JZNH-DQbld-WT.js","assets/gitGraphDiagram-GW3U2K7C-D8ZFpzJQ.js","assets/chunk-353BL4L5-CB-hLA6I.js","assets/chunk-AACKK3MU-BXNY6e43.js","assets/treemap-75Q7IDZK-DD3MUlWR.js","assets/ganttDiagram-EK5VF46D-CEsfHCEW.js","assets/infoDiagram-LHK5PUON-CZvb1pXZ.js","assets/pieDiagram-NIOCPIFQ-C7z8k970.js","assets/quadrantDiagram-2OG54O6I-BXCoDa9l.js","assets/xychartDiagram-H2YORKM3-B0TOjdzl.js","assets/requirementDiagram-QOLK2EJ7-B__E5UB_.js","assets/sequenceDiagram-SKLFT4DO-D2MvwKuy.js","assets/classDiagram-M3E45YP4-B4dktJcc.js","assets/chunk-SZ463SBG-DUVkBWO1.js","assets/classDiagram-v2-YAWTLIQI-B4dktJcc.js","assets/stateDiagram-MI5ZYTHO-SxSNvRlg.js","assets/chunk-OW32GOEJ-DLSzBM3I.js","assets/stateDiagram-v2-5AN5P6BG-B4I2qWOX.js","assets/journeyDiagram-EWQZEKCU-BP0DU_a_.js","assets/timeline-definition-MYPXXCX6-C_3CI0NE.js","assets/mindmap-definition-6CBA2TL7-CPiz8UdX.js","assets/cytoscape.esm-CfBqOv7Q.js","assets/kanban-definition-ZSS6B67P-DAM3b6wz.js","assets/sankeyDiagram-4UZDY2LN-B0ppwXxt.js","assets/diagram-5UYTHUR4-CGUPuNu1.js","assets/diagram-ZTM2IBQH-DTNQ4jMU.js","assets/blockDiagram-6J76NXCF-5ERD9lwW.js","assets/architectureDiagram-SUXI7LT5-ChY7B0zU.js","assets/diagram-VMROVX33-D2nCNLh0.js"])))=>i.map(i=>d[i]);
|
||
var Qy=Object.defineProperty;var Jy=(e,t,r)=>t in e?Qy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var vt=(e,t,r)=>Jy(e,typeof t!="symbol"?t+"":t,r);import{a8 as wt}from"./feature-graph-1JWVBiE2.js";import{g as tx}from"./react-vendor-DEwriMA6.js";var sa={exports:{}},ex=sa.exports,nh;function rx(){return nh||(nh=1,function(e,t){(function(r,i){e.exports=i()})(ex,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},k={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,Y=F.clone().add($+(q?-1:1),u);return+(-($+(B-E)/(q?E-Y:Y-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 v="$isDayjsObject",D=function(M){return M instanceof R||!(!M||!M[v])},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 Y=F.split("-");if(!E&&Y.length>1)return M(Y[0])}else{var U=F.name;_[U]=F,E=U}return!$&&E&&(w=E),E||!$&&w},O=function(M,F){if(D(M))return M.clone();var B=typeof F=="object"?F:{};return B.date=M,B.args=arguments,new R(B)},T=k;T.l=N,T.i=D,T.w=function(M,F){return O(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[v]=!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 Y=E.match(y);if(Y){var U=Y[2]-1||0,pt=(Y[7]||"0").substring(0,3);return q?new Date(Date.UTC(Y[1],U,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,pt)):new Date(Y[1],U,Y[3]||1,Y[4]||0,Y[5]||0,Y[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=O(B);return this.startOf($)<=E&&E<=this.endOf($)},F.isAfter=function(B,$){return O(B)<this.startOf($)},F.isBefore=function(B,$){return this.endOf($)<O(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($)||$,Y=T.p(B),U=function(z,j){var et=T.w(E.$u?Date.UTC(E.$y,j,z):new Date(E.$y,j,z),E);return q?et:et.endOf(l)},pt=function(z,j){return T.w(E.toDate()[z].apply(E.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(j)),E)},ht=this.$W,kt=this.$M,nt=this.$D,lt="set"+(this.$u?"UTC":"");switch(Y){case d:return q?U(1,0):U(31,11);case u:return q?U(1,kt):U(0,kt+1);case h:var ut=this.$locale().weekStart||0,Ct=(ht<ut?ht+7:ht)-ut;return U(q?nt-Ct:nt+(6-Ct),kt);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),Y="set"+(this.$u?"UTC":""),U=(E={},E[l]=Y+"Date",E[p]=Y+"Date",E[u]=Y+"Month",E[d]=Y+"FullYear",E[c]=Y+"Hours",E[s]=Y+"Minutes",E[o]=Y+"Seconds",E[a]=Y+"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 Y=T.p($),U=function(kt){var nt=O(q);return T.w(nt.date(nt.date()+Math.round(kt*B)),q)};if(Y===u)return this.set(u,this.$M+B);if(Y===d)return this.set(d,this.$y+B);if(Y===l)return U(1);if(Y===h)return U(7);var pt=(E={},E[s]=i,E[c]=n,E[o]=r,E)[Y]||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",Y=T.z(this),U=this.$H,pt=this.$m,ht=this.$M,kt=E.weekdays,nt=E.months,lt=E.meridiem,ut=function(j,et,P,Tt){return j&&(j[et]||j($,q))||P[et].slice(0,Tt)},Ct=function(j){return T.s(U%12||12,j,"0")},z=lt||function(j,et,P){var Tt=j<12?"AM":"PM";return P?Tt.toLowerCase():Tt};return q.replace(x,function(j,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,kt,2);case"ddd":return ut(E.weekdaysShort,$.$W,kt,3);case"dddd":return kt[$.$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 Y}return null}(j)||Y.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(B,$,E){var q,Y=this,U=T.p($),pt=O(B),ht=(pt.utcOffset()-this.utcOffset())*i,kt=this-pt,nt=function(){return T.m(Y,pt)};switch(U){case d:q=nt()/12;break;case u:q=nt();break;case f:q=nt()/3;break;case h:q=(kt-ht)/6048e5;break;case l:q=(kt-ht)/864e5;break;case c:q=kt/n;break;case s:q=kt/i;break;case o:q=kt/r;break;default:q=kt}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 O.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])}}),O.extend=function(M,F){return M.$i||(M(F,R,O),M.$i=!0),O},O.locale=N,O.isDayjs=D,O.unix=function(M){return O(1e3*M)},O.en=_[w],O.Ls=_,O.p={},O})}(sa)),sa.exports}var ix=rx();const nx=tx(ix),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:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return oa.hue2rgb(a,n,e+1/3)*255;case"g":return oa.hue2rgb(a,n,e)*255;case"b":return oa.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,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 e:return((t-r)/s+(t<r?6:0))*60;case t:return((r-e)/s+2)*60;case r:return((e-t)/s+4)*60;default:return-1}}},ax={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},sx={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ot={channel:oa,lang:ax,unit:sx},ar={};for(let e=0;e<=255;e++)ar[e]=ot.unit.dec2hex(e);const jt={ALL:0,RGB:1,HSL:2};class ox{constructor(){this.type=jt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=jt.ALL}is(t){return this.type===t}}class lx{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new ox}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=jt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=ot.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ot.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=ot.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=ot.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ot.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=ot.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(jt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(jt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(jt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(jt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(jt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(jt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ms=new lx({r:0,g:0,b:0,a:0},"transparent"),ii={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ii.re);if(!t)return;const r=t[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},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${ar[Math.round(t)]}${ar[Math.round(r)]}${ar[Math.round(i)]}${ar[Math.round(n*255)]}`:`#${ar[Math.round(t)]}${ar[Math.round(r)]}${ar[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:e=>{const t=e.match(Cr.hueRe);if(t){const[,r,i]=t;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(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.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},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%, ${n})`:`hsl(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%)`}},cn={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:e=>{e=e.toLowerCase();const t=cn.colors[e];if(t)return ii.parse(t)},stringify:e=>{const t=ii.stringify(e);for(const r in cn.colors)if(cn.colors[r]===t)return r}},en={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:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(en.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},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)}, ${ot.lang.round(n)})`:`rgb(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)})`}},ve={format:{keyword:cn,hex:ii,rgb:en,rgba:en,hsl:Cr,hsla:Cr},parse:e=>{if(typeof e!="string")return e;const t=ii.parse(e)||en.parse(e)||Cr.parse(e)||cn.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(jt.HSL)||e.data.r===void 0?Cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?en.stringify(e):ii.stringify(e)},af=(e,t)=>{const r=ve.parse(e);for(const i in t)r[i]=ot.channel.clamp[i](t[i]);return ve.stringify(r)},hn=(e,t,r=0,i=1)=>{if(typeof e!="number")return af(e,{a:t});const n=ms.set({r:ot.channel.clamp.r(e),g:ot.channel.clamp.g(t),b:ot.channel.clamp.b(r),a:ot.channel.clamp.a(i)});return ve.stringify(n)},Y$=(e,t)=>ot.lang.round(ve.parse(e)[t]),cx=e=>{const{r:t,g:r,b:i}=ve.parse(e),n=.2126*ot.channel.toLinear(t)+.7152*ot.channel.toLinear(r)+.0722*ot.channel.toLinear(i);return ot.lang.round(n)},hx=e=>cx(e)>=.5,An=e=>!hx(e),sf=(e,t,r)=>{const i=ve.parse(e),n=i[t],a=ot.channel.clamp[t](n+r);return n!==a&&(i[t]=a),ve.stringify(i)},G=(e,t)=>sf(e,"l",t),it=(e,t)=>sf(e,"l",-t),A=(e,t)=>{const r=ve.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return af(e,i)},ux=(e,t,r=50)=>{const{r:i,g:n,b:a,a:o}=ve.parse(e),{r:s,g:c,b:l,a:h}=ve.parse(t),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,k=o*u+h*(1-u);return hn(x,b,C,k)},H=(e,t=100)=>{const r=ve.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,ux(r,e,t)};/*! @license DOMPurify 3.2.5 | (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.5/LICENSE */const{entries:of,setPrototypeOf:ah,isFrozen:fx,getPrototypeOf:dx,getOwnPropertyDescriptor:px}=Object;let{freeze:ie,seal:ye,create:lf}=Object,{apply:Fo,construct:$o}=typeof Reflect<"u"&&Reflect;ie||(ie=function(t){return t});ye||(ye=function(t){return t});Fo||(Fo=function(t,r,i){return t.apply(r,i)});$o||($o=function(t,r){return new t(...r)});const jn=ne(Array.prototype.forEach),gx=ne(Array.prototype.lastIndexOf),sh=ne(Array.prototype.pop),Ii=ne(Array.prototype.push),mx=ne(Array.prototype.splice),la=ne(String.prototype.toLowerCase),Js=ne(String.prototype.toString),oh=ne(String.prototype.match),Pi=ne(String.prototype.replace),yx=ne(String.prototype.indexOf),xx=ne(String.prototype.trim),be=ne(Object.prototype.hasOwnProperty),Qt=ne(RegExp.prototype.test),Ni=bx(TypeError);function ne(e){return function(t){t instanceof RegExp&&(t.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 Fo(e,t,i)}}function bx(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return $o(e,r)}}function dt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:la;ah&&ah(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(fx(t)||(t[i]=a),n=a)}e[n]=!0}return e}function _x(e){for(let t=0;t<e.length;t++)be(e,t)||(e[t]=null);return e}function yr(e){const t=lf(null);for(const[r,i]of of(e))be(e,r)&&(Array.isArray(i)?t[r]=_x(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=yr(i):t[r]=i);return t}function zi(e,t){for(;e!==null;){const i=px(e,t);if(i){if(i.get)return ne(i.get);if(typeof i.value=="function")return ne(i.value)}e=dx(e)}function r(){return null}return r}const lh=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"]),to=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"]),eo=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"]),Cx=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"]),ro=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"]),wx=ie(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ch=ie(["#text"]),hh=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"]),io=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"]),uh=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),vx=ye(/<%[\w\W]*|[\w\W]*%>/gm),Sx=ye(/\$\{[\w\W]*/gm),Tx=ye(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mx=ye(/^aria-[\-\w]+$/),cf=ye(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ax=ye(/^(?:\w+script|data):/i),Lx=ye(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hf=ye(/^html$/i),Bx=ye(/^[a-z][.\w]*(-[.\w]+)+$/i);var fh=Object.freeze({__proto__:null,ARIA_ATTR:Mx,ATTR_WHITESPACE:Lx,CUSTOM_ELEMENT:Bx,DATA_ATTR:Tx,DOCTYPE_NAME:hf,ERB_EXPR:vx,IS_ALLOWED_URI:cf,IS_SCRIPT_OR_DATA:Ax,MUSTACHE_EXPR:kx,TMPLIT_EXPR:Sx});const Wi={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ex=function(){return typeof window>"u"?null:window},Fx=function(t,r){if(typeof t!="object"||typeof t.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 t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},dh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function uf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ex();const t=rt=>uf(rt);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==Wi.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,p=c.prototype,m=zi(p,"cloneNode"),y=zi(p,"remove"),x=zi(p,"nextSibling"),b=zi(p,"childNodes"),C=zi(p,"parentNode");if(typeof o=="function"){const rt=r.createElement("template");rt.content&&rt.content.ownerDocument&&(r=rt.content.ownerDocument)}let k,w="";const{implementation:_,createNodeIterator:v,createDocumentFragment:D,getElementsByTagName:N}=r,{importNode:O}=i;let T=dh();t.isSupported=typeof of=="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}=fh;let{IS_ALLOWED_URI:Y}=fh,U=null;const pt=dt({},[...lh,...to,...eo,...ro,...ch]);let ht=null;const kt=dt({},[...hh,...io,...uh,...Gn]);let nt=Object.seal(lf(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,j=!1,et=!0,P=!1,Tt=!0,ft=!1,Pt=!1,Nt=!1,ae=!1,pr=!1,zn=!1,zc=!0,Wc=!1;const Uy="user-content-";let Gs=!0,Di=!1,Yr={},jr=null;const qc=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 Hc=null;const Uc=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"]),Wn="http://www.w3.org/1998/Math/MathML",qn="http://www.w3.org/2000/svg",Ne="http://www.w3.org/1999/xhtml";let Gr=Ne,Xs=!1,Zs=null;const Yy=dt({},[Wn,qn,Ne],Js);let Hn=dt({},["mi","mo","mn","ms","mtext"]),Un=dt({},["annotation-xml"]);const jy=dt({},["title","style","font","a","script"]);let Oi=null;const Gy=["application/xhtml+xml","text/html"],Vy="text/html";let Rt=null,Vr=null;const Xy=r.createElement("form"),jc=function(S){return S instanceof RegExp||S instanceof Function},Ks=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Vr&&Vr===S)){if((!S||typeof S!="object")&&(S={}),S=yr(S),Oi=Gy.indexOf(S.PARSER_MEDIA_TYPE)===-1?Vy:S.PARSER_MEDIA_TYPE,Rt=Oi==="application/xhtml+xml"?Js:la,U=be(S,"ALLOWED_TAGS")?dt({},S.ALLOWED_TAGS,Rt):pt,ht=be(S,"ALLOWED_ATTR")?dt({},S.ALLOWED_ATTR,Rt):kt,Zs=be(S,"ALLOWED_NAMESPACES")?dt({},S.ALLOWED_NAMESPACES,Js):Yy,Vs=be(S,"ADD_URI_SAFE_ATTR")?dt(yr(Yc),S.ADD_URI_SAFE_ATTR,Rt):Yc,Hc=be(S,"ADD_DATA_URI_TAGS")?dt(yr(Uc),S.ADD_DATA_URI_TAGS,Rt):Uc,jr=be(S,"FORBID_CONTENTS")?dt({},S.FORBID_CONTENTS,Rt):qc,lt=be(S,"FORBID_TAGS")?dt({},S.FORBID_TAGS,Rt):{},ut=be(S,"FORBID_ATTR")?dt({},S.FORBID_ATTR,Rt):{},Yr=be(S,"USE_PROFILES")?S.USE_PROFILES:!1,Ct=S.ALLOW_ARIA_ATTR!==!1,z=S.ALLOW_DATA_ATTR!==!1,j=S.ALLOW_UNKNOWN_PROTOCOLS||!1,et=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=S.SAFE_FOR_TEMPLATES||!1,Tt=S.SAFE_FOR_XML!==!1,ft=S.WHOLE_DOCUMENT||!1,ae=S.RETURN_DOM||!1,pr=S.RETURN_DOM_FRAGMENT||!1,zn=S.RETURN_TRUSTED_TYPE||!1,Nt=S.FORCE_BODY||!1,zc=S.SANITIZE_DOM!==!1,Wc=S.SANITIZE_NAMED_PROPS||!1,Gs=S.KEEP_CONTENT!==!1,Di=S.IN_PLACE||!1,Y=S.ALLOWED_URI_REGEXP||cf,Gr=S.NAMESPACE||Ne,Hn=S.MATHML_TEXT_INTEGRATION_POINTS||Hn,Un=S.HTML_INTEGRATION_POINTS||Un,nt=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&jc(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nt.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&jc(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),pr&&(ae=!0),Yr&&(U=dt({},ch),ht=[],Yr.html===!0&&(dt(U,lh),dt(ht,hh)),Yr.svg===!0&&(dt(U,to),dt(ht,io),dt(ht,Gn)),Yr.svgFilters===!0&&(dt(U,eo),dt(ht,io),dt(ht,Gn)),Yr.mathMl===!0&&(dt(U,ro),dt(ht,uh),dt(ht,Gn))),S.ADD_TAGS&&(U===pt&&(U=yr(U)),dt(U,S.ADD_TAGS,Rt)),S.ADD_ATTR&&(ht===kt&&(ht=yr(ht)),dt(ht,S.ADD_ATTR,Rt)),S.ADD_URI_SAFE_ATTR&&dt(Vs,S.ADD_URI_SAFE_ATTR,Rt),S.FORBID_CONTENTS&&(jr===qc&&(jr=yr(jr)),dt(jr,S.FORBID_CONTENTS,Rt)),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 Ni('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ni('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=S.TRUSTED_TYPES_POLICY,w=k.createHTML("")}else k===void 0&&(k=Fx(d,n)),k!==null&&typeof w=="string"&&(w=k.createHTML(""));ie&&ie(S),Vr=S}},Gc=dt({},[...to,...eo,...Cx]),Vc=dt({},[...ro,...wx]),Zy=function(S){let W=C(S);(!W||!W.tagName)&&(W={namespaceURI:Gr,tagName:"template"});const Z=la(S.tagName),Mt=la(W.tagName);return Zs[S.namespaceURI]?S.namespaceURI===qn?W.namespaceURI===Ne?Z==="svg":W.namespaceURI===Wn?Z==="svg"&&(Mt==="annotation-xml"||Hn[Mt]):!!Gc[Z]:S.namespaceURI===Wn?W.namespaceURI===Ne?Z==="math":W.namespaceURI===qn?Z==="math"&&Un[Mt]:!!Vc[Z]:S.namespaceURI===Ne?W.namespaceURI===qn&&!Un[Mt]||W.namespaceURI===Wn&&!Hn[Mt]?!1:!Vc[Z]&&(jy[Z]||!Gc[Z]):!!(Oi==="application/xhtml+xml"&&Zs[S.namespaceURI]):!1},Te=function(S){Ii(t.removed,{element:S});try{C(S).removeChild(S)}catch{y(S)}},Yn=function(S,W){try{Ii(t.removed,{attribute:W.getAttributeNode(S),from:W})}catch{Ii(t.removed,{attribute:null,from:W})}if(W.removeAttribute(S),S==="is")if(ae||pr)try{Te(W)}catch{}else try{W.setAttribute(S,"")}catch{}},Xc=function(S){let W=null,Z=null;if(Nt)S="<remove></remove>"+S;else{const zt=oh(S,/^[\r\n\t ]+/);Z=zt&&zt[0]}Oi==="application/xhtml+xml"&&Gr===Ne&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Mt=k?k.createHTML(S):S;if(Gr===Ne)try{W=new f().parseFromString(Mt,Oi)}catch{}if(!W||!W.documentElement){W=_.createDocument(Gr,"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),Gr===Ne?N.call(W,ft?"html":"body")[0]:ft?W.documentElement:Ut},Zc=function(S){return v.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")},Kc=function(S){return typeof s=="function"&&S instanceof s};function ze(rt,S,W){jn(rt,Z=>{Z.call(t,S,W,Vr)})}const Qc=function(S){let W=null;if(ze(T.beforeSanitizeElements,S,null),Qs(S))return Te(S),!0;const Z=Rt(S.nodeName);if(ze(T.uponSanitizeElement,S,{tagName:Z,allowedTags:U}),S.hasChildNodes()&&!Kc(S.firstElementChild)&&Qt(/<[/\w!]/g,S.innerHTML)&&Qt(/<[/\w!]/g,S.textContent)||S.nodeType===Wi.progressingInstruction||Tt&&S.nodeType===Wi.comment&&Qt(/<[/\w]/g,S.data))return Te(S),!0;if(!U[Z]||lt[Z]){if(!lt[Z]&&th(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 zt=Ut.length;for(let se=zt-1;se>=0;--se){const Me=m(Ut[se],!0);Me.__removalCount=(S.__removalCount||0)+1,Mt.insertBefore(Me,x(S))}}}return Te(S),!0}return S instanceof c&&!Zy(S)||(Z==="noscript"||Z==="noembed"||Z==="noframes")&&Qt(/<\/no(script|embed|frames)/i,S.innerHTML)?(Te(S),!0):(P&&S.nodeType===Wi.text&&(W=S.textContent,jn([R,L,M],Mt=>{W=Pi(W,Mt," ")}),S.textContent!==W&&(Ii(t.removed,{element:S.cloneNode()}),S.textContent=W)),ze(T.afterSanitizeElements,S,null),!1)},Jc=function(S,W,Z){if(zc&&(W==="id"||W==="name")&&(Z in r||Z in Xy))return!1;if(!(z&&!ut[W]&&Qt(F,W))){if(!(Ct&&Qt(B,W))){if(!ht[W]||ut[W]){if(!(th(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(Y,Pi(Z,E,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&S!=="script"&&yx(Z,"data:")===0&&Hc[S])){if(!(j&&!Qt($,Pi(Z,E,"")))){if(Z)return!1}}}}}}return!0},th=function(S){return S!=="annotation-xml"&&oh(S,q)},eh=function(S){ze(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:zt,namespaceURI:se,value:Me}=Ut,Ri=Rt(zt);let Kt=zt==="value"?Me:xx(Me);if(Z.attrName=Ri,Z.attrValue=Kt,Z.keepAttr=!0,Z.forceKeepAttr=void 0,ze(T.uponSanitizeAttribute,S,Z),Kt=Z.attrValue,Wc&&(Ri==="id"||Ri==="name")&&(Yn(zt,S),Kt=Uy+Kt),Tt&&Qt(/((--!?|])>)|<\/(style|title)/i,Kt)){Yn(zt,S);continue}if(Z.forceKeepAttr||(Yn(zt,S),!Z.keepAttr))continue;if(!et&&Qt(/\/>/i,Kt)){Yn(zt,S);continue}P&&jn([R,L,M],ih=>{Kt=Pi(Kt,ih," ")});const rh=Rt(S.nodeName);if(Jc(rh,Ri,Kt)){if(k&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!se)switch(d.getAttributeType(rh,Ri)){case"TrustedHTML":{Kt=k.createHTML(Kt);break}case"TrustedScriptURL":{Kt=k.createScriptURL(Kt);break}}try{se?S.setAttributeNS(se,zt,Kt):S.setAttribute(zt,Kt),Qs(S)?Te(S):sh(t.removed)}catch{}}}ze(T.afterSanitizeAttributes,S,null)},Ky=function rt(S){let W=null;const Z=Zc(S);for(ze(T.beforeSanitizeShadowDOM,S,null);W=Z.nextNode();)ze(T.uponSanitizeShadowNode,W,null),Qc(W),eh(W),W.content instanceof a&&rt(W.content);ze(T.afterSanitizeShadowDOM,S,null)};return t.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"&&!Kc(rt))if(typeof rt.toString=="function"){if(rt=rt.toString(),typeof rt!="string")throw Ni("dirty is not a string, aborting")}else throw Ni("toString is not a function");if(!t.isSupported)return rt;if(Pt||Ks(S),t.removed=[],typeof rt=="string"&&(Di=!1),Di){if(rt.nodeName){const Me=Rt(rt.nodeName);if(!U[Me]||lt[Me])throw Ni("root node is forbidden and cannot be sanitized in-place")}}else if(rt instanceof s)W=Xc("<!---->"),Z=W.ownerDocument.importNode(rt,!0),Z.nodeType===Wi.element&&Z.nodeName==="BODY"||Z.nodeName==="HTML"?W=Z:W.appendChild(Z);else{if(!ae&&!P&&!ft&&rt.indexOf("<")===-1)return k&&zn?k.createHTML(rt):rt;if(W=Xc(rt),!W)return ae?null:zn?w:""}W&&Nt&&Te(W.firstChild);const zt=Zc(Di?rt:W);for(;Mt=zt.nextNode();)Qc(Mt),eh(Mt),Mt.content instanceof a&&Ky(Mt.content);if(Di)return rt;if(ae){if(pr)for(Ut=D.call(W.ownerDocument);W.firstChild;)Ut.appendChild(W.firstChild);else Ut=W;return(ht.shadowroot||ht.shadowrootmode)&&(Ut=O.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(hf,W.ownerDocument.doctype.name)&&(se="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
|
||
`+se),P&&jn([R,L,M],Me=>{se=Pi(se,Me," ")}),k&&zn?k.createHTML(se):se},t.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ks(rt),Pt=!0},t.clearConfig=function(){Vr=null,Pt=!1},t.isValidAttribute=function(rt,S,W){Vr||Ks({});const Z=Rt(rt),Mt=Rt(S);return Jc(Z,Mt,W)},t.addHook=function(rt,S){typeof S=="function"&&Ii(T[rt],S)},t.removeHook=function(rt,S){if(S!==void 0){const W=gx(T[rt],S);return W===-1?void 0:mx(T[rt],W,1)[0]}return sh(T[rt])},t.removeHooks=function(rt){T[rt]=[]},t.removeAllHooks=function(){T=dh()},t}var gi=uf(),ff=Object.defineProperty,g=(e,t)=>ff(e,"name",{value:t,configurable:!0}),$x=(e,t)=>{for(var r in t)ff(e,r,{get:t[r],enumerable:!0})},We={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},I={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Dl=g(function(e="fatal"){let t=We.fatal;typeof e=="string"?e.toLowerCase()in We&&(t=We[e]):typeof e=="number"&&(t=e),I.trace=()=>{},I.debug=()=>{},I.info=()=>{},I.warn=()=>{},I.error=()=>{},I.fatal=()=>{},t<=We.fatal&&(I.fatal=console.error?console.error.bind(console,pe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",pe("FATAL"))),t<=We.error&&(I.error=console.error?console.error.bind(console,pe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",pe("ERROR"))),t<=We.warn&&(I.warn=console.warn?console.warn.bind(console,pe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",pe("WARN"))),t<=We.info&&(I.info=console.info?console.info.bind(console,pe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",pe("INFO"))),t<=We.debug&&(I.debug=console.debug?console.debug.bind(console,pe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("DEBUG"))),t<=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(e=>`%c${nx().format("ss.SSS")} : ${e} : `,"format"),df=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,un=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Dx=/\s*%%.*\n/gm,oi,pf=(oi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(oi,"UnknownDiagramError"),oi),Ar={},Ol=g(function(e,t){e=e.replace(df,"").replace(un,"").replace(Dx,`
|
||
`);for(const[r,{detector:i}]of Object.entries(Ar))if(i(e,t))return r;throw new pf(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Do=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)gf(t,r,i)},"registerLazyLoadedDiagrams"),gf=g((e,t,r)=>{Ar[e]&&I.warn(`Detector with key ${e} already exists. Overwriting.`),Ar[e]={detector:t,loader:r},I.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Ox=g(e=>Ar[e].loader,"getDiagramLoader"),Oo=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Oo(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Oo(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Ht=Oo,ys="#ffffff",xs="#f2f2f2",Jt=g((e,t)=>t?A(e,{s:-40,l:10}):A(e,{s:-40,l:-10}),"mkBorder"),li,Rx=(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,k,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 v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=it(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=it(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||H(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||G(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||it(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||A(this.mainBkg,{h:180,s:-15,l:t*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||A(this.mainBkg,{h:180,s:-15,l:t*(8+v*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||An(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:((k=this.xyChart)==null?void 0:k.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(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(li,"Theme"),li),Ix=g(e=>{const t=new Rx;return t.calculate(e),t},"getThemeVariables"),ci,Px=(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=hn(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=hn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=hn(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 t,r,i,n,a,o,s,c,l,h,u,f,d,p,m,y,x,b,C,k,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||An(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:((t=this.xyChart)==null?void 0:t.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:((k=this.radar)==null?void 0:k.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(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ci,"Theme"),ci),Nx=g(e=>{const t=new Px;return t.calculate(e),t},"getThemeVariables"),hi,zx=(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=hn(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 t,r,i,n,a,o,s,c,l,h,u,f,d,p,m,y,x,b,C,k,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||An(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:((t=this.radar)==null?void 0:t.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:((k=this.xyChart)==null?void 0:k.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(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(hi,"Theme"),hi),Wx=g(e=>{const t=new zx;return t.calculate(e),t},"getThemeVariables"),ui,qx=(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 t,r,i,n,a,o,s,c,l,h,u,f,d,p,m,y,x,b,C,k,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||An(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:((t=this.radar)==null?void 0:t.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:((k=this.xyChart)==null?void 0:k.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(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ui,"Theme"),ui),Hx=g(e=>{const t=new qx;return t.calculate(e),t},"getThemeVariables"),fi,Ux=(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 t,r,i,n,a,o,s,c,l,h,u,f,d,p,m,y,x,b,C,k,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||An(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:((t=this.xyChart)==null?void 0:t.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:((k=this.radar)==null?void 0:k.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(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(fi,"Theme"),fi),Yx=g(e=>{const t=new Ux;return t.calculate(e),t},"getThemeVariables"),Ze={base:{getThemeVariables:Ix},dark:{getThemeVariables:Nx},default:{getThemeVariables:Wx},forest:{getThemeVariables:Hx},neutral:{getThemeVariables:Yx}},Ae={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},mf={...Ae,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Ze.default.getThemeVariables(),sequence:{...Ae.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:{...Ae.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ae.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ae.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:{...Ae.pie,useWidth:984},xyChart:{...Ae.xyChart,useWidth:void 0},requirement:{...Ae.requirement,useWidth:void 0},packet:{...Ae.packet},radar:{...Ae.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},yf=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...yf(e[i],"")]:[...r,t+i],[]),"keyify"),jx=new Set(yf(mf,"")),xf=mf,Sa=g(e=>{if(I.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Sa(t));return}for(const t of Object.keys(e)){if(I.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!jx.has(t)||e[t]==null){I.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){I.debug("sanitizing object",t),Sa(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(I.debug("sanitizing css option",t),e[t]=Gx(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}I.debug("After sanitization",e)}},"sanitizeDirective"),Gx=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),mi=Object.freeze(xf),le=Ht({},mi),bf,yi=[],fn=Ht({},mi),bs=g((e,t)=>{let r=Ht({},e),i={};for(const n of t)wf(n),i=Ht(i,n);if(r=Ht(r,i),i.theme&&i.theme in Ze){const n=Ht({},bf),a=Ht(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ze&&(r.themeVariables=Ze[r.theme].getThemeVariables(a))}return fn=r,kf(fn),fn},"updateCurrentConfig"),Vx=g(e=>(le=Ht({},mi),le=Ht(le,e),e.theme&&Ze[e.theme]&&(le.themeVariables=Ze[e.theme].getThemeVariables(e.themeVariables)),bs(le,yi),le),"setSiteConfig"),Xx=g(e=>{bf=Ht({},e)},"saveConfigFromInitialize"),Zx=g(e=>(le=Ht(le,e),bs(le,yi),le),"updateSiteConfig"),_f=g(()=>Ht({},le),"getSiteConfig"),Cf=g(e=>(kf(e),Ht(fn,e),he()),"setConfig"),he=g(()=>Ht({},fn),"getConfig"),wf=g(e=>{e&&(["secure",...le.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(I.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&wf(e[t])}))},"sanitize"),Kx=g(e=>{var t;Sa(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),yi.push(e),bs(le,yi)},"addDirective"),Ta=g((e=le)=>{yi=[],bs(e,yi)},"reset"),Qx={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ph={},Jx=g(e=>{ph[e]||(I.warn(Qx[e]),ph[e]=!0)},"issueWarning"),kf=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Jx("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ln=/<br\s*\/?>/gi,tb=g(e=>e?Tf(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),eb=(()=>{let e=!1;return()=>{e||(vf(),e=!0)}})();function vf(){const e="data-temp-href-target";gi.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),gi.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(vf,"setupDompurifyHooks");var Sf=g(e=>(eb(),gi.sanitize(e)),"removeScript"),gh=g((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=Sf(e):i!=="loose"&&(e=Tf(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=ab(e))}return e},"sanitizeMore"),Lr=g((e,t)=>e&&(t.dompurifyConfig?e=gi.sanitize(gh(e,t),t.dompurifyConfig).toString():e=gi.sanitize(gh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),rb=g((e,t)=>typeof e=="string"?Lr(e,t):e.flat().map(r=>Lr(r,t)),"sanitizeTextOrArray"),ib=g(e=>Ln.test(e),"hasBreaks"),nb=g(e=>e.split(Ln),"splitBreaks"),ab=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Tf=g(e=>e.replace(Ln,"#br#"),"breakToPlaceholder"),Mf=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Dt=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),sb=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),ob=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),mh=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];lb(a,o)&&(n=a+","+o,i++,r.pop())}r.push(cb(n))}return r.join("")},"parseGenericTypes"),Ro=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),lb=g((e,t)=>{const r=Ro(e,"~"),i=Ro(t,"~");return r===1&&i===1},"shouldCombineSets"),cb=g(e=>{const t=Ro(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];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"),yh=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Io=/\$\$(.*)\$\$/g,xi=g(e=>{var t;return(((t=e.match(Io))==null?void 0:t.length)??0)>0},"hasKatex"),j$=g(async(e,t)=>{e=await Rl(e,t);const r=document.createElement("div");r.innerHTML=e,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"),Rl=g(async(e,t)=>{if(!xi(e))return e;if(!(yh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Io,"MathML is unsupported in this environment.");{const{default:r}=await wt(async()=>{const{default:n}=await import("./index-9IcuADuT.js").then(a=>a.a);return{default:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),i=t.forceLegacyMathML||!yh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ln).map(n=>xi(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Io,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatex"),Ai={getRows:tb,sanitizeText:Lr,sanitizeTextOrArray:rb,hasBreaks:ib,splitBreaks:nb,lineBreakRegex:Ln,removeScript:Sf,getUrl:Mf,evaluate:Dt,getMax:sb,getMin:ob},hb=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),ub=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Af=g(function(e,t,r,i){const n=ub(t,r,i);hb(e,n)},"configureSvgSize"),fb=g(function(e,t,r,i){const n=t.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}`,e),s=a+r*2,c=o+r*2,I.info(`Calculated bounds: ${s}x${c}`),Af(t,c,s,i);const l=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),ca={},db=g((e,t,r)=>{let i="";return e in ca&&ca[e]?i=ca[e](r):I.warn(`No theme found for ${e}`),` & {
|
||
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}
|
||
|
||
${t}
|
||
`},"getStyles"),pb=g((e,t)=>{t!==void 0&&(ca[e]=t)},"addStylesForDiagram"),gb=db,Lf={};$x(Lf,{clear:()=>mb,getAccDescription:()=>_b,getAccTitle:()=>xb,getDiagramTitle:()=>wb,setAccDescription:()=>bb,setAccTitle:()=>yb,setDiagramTitle:()=>Cb});var Il="",Pl="",Nl="",zl=g(e=>Lr(e,he()),"sanitizeText"),mb=g(()=>{Il="",Nl="",Pl=""},"clear"),yb=g(e=>{Il=zl(e).replace(/^\s+/g,"")},"setAccTitle"),xb=g(()=>Il,"getAccTitle"),bb=g(e=>{Nl=zl(e).replace(/\n\s+/g,`
|
||
`)},"setAccDescription"),_b=g(()=>Nl,"getAccDescription"),Cb=g(e=>{Pl=zl(e)},"setDiagramTitle"),wb=g(()=>Pl,"getDiagramTitle"),xh=I,kb=Dl,xt=he,G$=Cf,V$=mi,_s=g(e=>Lr(e,xt()),"sanitizeText"),vb=fb,Sb=g(()=>Lf,"getCommonDb"),Ma={},Aa=g((e,t,r)=>{var i;Ma[e]&&xh.warn(`Diagram with id ${e} already registered. Overwriting.`),Ma[e]=t,r&&gf(e,r),pb(e,t.styles),(i=t.injectUtils)==null||i.call(t,xh,kb,xt,_s,vb,Sb(),()=>{})},"registerDiagram"),Po=g(e=>{if(e in Ma)return Ma[e];throw new Tb(e)},"getDiagram"),di,Tb=(di=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(di,"DiagramNotFoundError"),di);function Wl(e){return typeof e>"u"||e===null}g(Wl,"isNothing");function Bf(e){return typeof e=="object"&&e!==null}g(Bf,"isObject");function Ef(e){return Array.isArray(e)?e:Wl(e)?[]:[e]}g(Ef,"toArray");function Ff(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}g(Ff,"extend");function $f(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g($f,"repeat");function Df(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(Df,"isNegativeZero");var Mb=Wl,Ab=Bf,Lb=Ef,Bb=$f,Eb=Df,Fb=Ff,$t={isNothing:Mb,isObject:Ab,toArray:Lb,repeat:Bb,isNegativeZero:Eb,extend:Fb};function ql(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
||
|
||
`+e.mark.snippet),i+" "+r):i}g(ql,"formatError");function bi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=ql(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(bi,"YAMLException$1");bi.prototype=Object.create(Error.prototype);bi.prototype.constructor=bi;bi.prototype.toString=g(function(t){return this.name+": "+ql(this,t)},"toString");var ce=bi;function ha(e,t,r,i,n){var a="",o="",s=Math.floor(n/2)-1;return i-t>s&&(a=" ... ",t=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}g(ha,"getLine");function ua(e,t){return $t.repeat(" ",t-e.length)+e}g(ua,"padStart");function Of(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,o=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",c,l,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=ha(e.buffer,i[o-c],n[o-c],e.position-(i[o]-i[o-c]),u),s=$t.repeat(" ",t.indent)+ua((e.line-c+1).toString(),h)+" | "+l.str+`
|
||
`+s;for(l=ha(e.buffer,i[o],n[o],e.position,u),s+=$t.repeat(" ",t.indent)+ua((e.line+1).toString(),h)+" | "+l.str+`
|
||
`,s+=$t.repeat("-",t.indent+h+3+l.pos)+`^
|
||
`,c=1;c<=t.linesAfter&&!(o+c>=n.length);c++)l=ha(e.buffer,i[o+c],n[o+c],e.position-(i[o]-i[o+c]),u),s+=$t.repeat(" ",t.indent)+ua((e.line+c+1).toString(),h)+" | "+l.str+`
|
||
`;return s.replace(/\n$/,"")}g(Of,"makeSnippet");var $b=Of,Db=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ob=["scalar","sequence","mapping"];function Rf(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(Rf,"compileStyleAliases");function If(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Db.indexOf(r)===-1)throw new ce('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Rf(t.styleAliases||null),Ob.indexOf(this.kind)===-1)throw new ce('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(If,"Type$1");var Xt=If;function No(e,t){var r=[];return e[t].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(No,"compileList");function Pf(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(Pf,"compileMap");function La(e){return this.extend(e)}g(La,"Schema$1");La.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof Xt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.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 Xt))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 Xt))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=No(n,"implicit"),n.compiledExplicit=No(n,"explicit"),n.compiledTypeMap=Pf(n.compiledImplicit,n.compiledExplicit),n},"extend");var Rb=La,Ib=new Xt("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),Pb=new Xt("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),Nb=new Xt("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),zb=new Rb({explicit:[Ib,Pb,Nb]});function Nf(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(Nf,"resolveYamlNull");function zf(){return null}g(zf,"constructYamlNull");function Wf(e){return e===null}g(Wf,"isNull");var Wb=new Xt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Nf,construct:zf,predicate:Wf,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 qf(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}g(qf,"resolveYamlBoolean");function Hf(e){return e==="true"||e==="True"||e==="TRUE"}g(Hf,"constructYamlBoolean");function Uf(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(Uf,"isBoolean");var qb=new Xt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:qf,construct:Hf,predicate:Uf,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Yf(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(Yf,"isHexCode");function jf(e){return 48<=e&&e<=55}g(jf,"isOctCode");function Gf(e){return 48<=e&&e<=57}g(Gf,"isDecCode");function Vf(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Yf(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!jf(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!Gf(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}g(Vf,"resolveYamlInteger");function Xf(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}g(Xf,"constructYamlInteger");function Zf(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!$t.isNegativeZero(e)}g(Zf,"isInteger");var Hb=new Xt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Vf,construct:Xf,predicate:Zf,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ub=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Kf(e){return!(e===null||!Ub.test(e)||e[e.length-1]==="_")}g(Kf,"resolveYamlFloat");function Qf(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}g(Qf,"constructYamlFloat");var Yb=/^[-+]?[0-9]+e/;function Jf(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if($t.isNegativeZero(e))return"-0.0";return r=e.toString(10),Yb.test(r)?r.replace("e",".e"):r}g(Jf,"representYamlFloat");function td(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||$t.isNegativeZero(e))}g(td,"isFloat");var jb=new Xt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Kf,construct:Qf,predicate:td,represent:Jf,defaultStyle:"lowercase"}),ed=zb.extend({implicit:[Wb,qb,Hb,jb]}),Gb=ed,rd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),id=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 nd(e){return e===null?!1:rd.exec(e)!==null||id.exec(e)!==null}g(nd,"resolveYamlTimestamp");function ad(e){var t,r,i,n,a,o,s,c=0,l=null,h,u,f;if(t=rd.exec(e),t===null&&(t=id.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(h=+t[10],u=+(t[11]||0),l=(h*60+u)*6e4,t[9]==="-"&&(l=-l)),f=new Date(Date.UTC(r,i,n,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}g(ad,"constructYamlTimestamp");function sd(e){return e.toISOString()}g(sd,"representYamlTimestamp");var Vb=new Xt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:nd,construct:ad,instanceOf:Date,represent:sd});function od(e){return e==="<<"||e===null}g(od,"resolveYamlMerge");var Xb=new Xt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:od}),Hl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`;function ld(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=Hl;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(ld,"resolveYamlBinary");function cd(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=Hl,o=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));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(cd,"constructYamlBinary");function hd(e){var t="",r=0,i,n,a=e.length,o=Hl;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}g(hd,"representYamlBinary");function ud(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(ud,"isBinary");var Zb=new Xt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ld,construct:cd,predicate:ud,represent:hd}),Kb=Object.prototype.hasOwnProperty,Qb=Object.prototype.toString;function fd(e){if(e===null)return!0;var t=[],r,i,n,a,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],o=!1,Qb.call(n)!=="[object Object]")return!1;for(a in n)if(Kb.call(n,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}g(fd,"resolveYamlOmap");function dd(e){return e!==null?e:[]}g(dd,"constructYamlOmap");var Jb=new Xt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:fd,construct:dd}),t1=Object.prototype.toString;function pd(e){if(e===null)return!0;var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],t1.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}g(pd,"resolveYamlPairs");function gd(e){if(e===null)return[];var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}g(gd,"constructYamlPairs");var e1=new Xt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:pd,construct:gd}),r1=Object.prototype.hasOwnProperty;function md(e){if(e===null)return!0;var t,r=e;for(t in r)if(r1.call(r,t)&&r[t]!==null)return!1;return!0}g(md,"resolveYamlSet");function yd(e){return e!==null?e:{}}g(yd,"constructYamlSet");var i1=new Xt("tag:yaml.org,2002:set",{kind:"mapping",resolve:md,construct:yd}),xd=Gb.extend({implicit:[Vb,Xb],explicit:[Zb,Jb,e1,i1]}),lr=Object.prototype.hasOwnProperty,Ba=1,bd=2,_d=3,Ea=4,no=1,n1=2,bh=3,a1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s1=/[\x85\u2028\u2029]/,o1=/[,\[\]\{\}]/,Cd=/^(?:!|!!|![a-z\-]+!)$/i,wd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function zo(e){return Object.prototype.toString.call(e)}g(zo,"_class");function we(e){return e===10||e===13}g(we,"is_EOL");function or(e){return e===9||e===32}g(or,"is_WHITE_SPACE");function te(e){return e===9||e===32||e===10||e===13}g(te,"is_WS_OR_EOL");function wr(e){return e===44||e===91||e===93||e===123||e===125}g(wr,"is_FLOW_INDICATOR");function kd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(kd,"fromHexCode");function vd(e){return e===120?2:e===117?4:e===85?8:0}g(vd,"escapedHexLen");function Sd(e){return 48<=e&&e<=57?e-48:-1}g(Sd,"fromDecimalCode");function Wo(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
||
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}g(Wo,"simpleEscapeSequence");function Td(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(Td,"charFromCodepoint");var Md=new Array(256),Ad=new Array(256);for(gr=0;gr<256;gr++)Md[gr]=Wo(gr)?1:0,Ad[gr]=Wo(gr);var gr;function Ld(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||xd,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}g(Ld,"State$1");function Ul(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=$b(r),new ce(t,r)}g(Ul,"generateError");function tt(e,t){throw Ul(e,t)}g(tt,"throwError");function mn(e,t){e.onWarning&&e.onWarning.call(null,Ul(e,t))}g(mn,"throwWarning");var _h={YAML:g(function(t,r,i){var n,a,o;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&tt(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&mn(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var n,a;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Cd.test(n)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),lr.call(t.tagMap,n)&&tt(t,'there is a previously declared suffix for "'+n+'" tag handle'),wd.test(a)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{tt(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function Ke(e,t,r,i){var n,a,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(n=0,a=s.length;n<a;n+=1)o=s.charCodeAt(n),o===9||32<=o&&o<=1114111||tt(e,"expected valid JSON character");else a1.test(s)&&tt(e,"the stream contains non-printable characters");e.result+=s}}g(Ke,"captureSegment");function qo(e,t,r,i){var n,a,o,s;for($t.isObject(r)||tt(e,"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],lr.call(t,a)||(t[a]=r[a],i[a]=!0)}g(qo,"mergeMappings");function kr(e,t,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(e,"nested arrays are not supported inside keys"),typeof n=="object"&&zo(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&zo(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(l=0,h=a.length;l<h;l+=1)qo(e,t,a[l],r);else qo(e,t,a,r);else!e.json&&!lr.call(r,n)&&lr.call(t,n)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,tt(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}g(kr,"storeMappingPair");function Cs(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(Cs,"readLineBreak");function Bt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;or(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(we(n))for(Cs(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&mn(e,"deficient indentation"),i}g(Bt,"skipSeparationSpace");function Bn(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||te(r)))}g(Bn,"testDocumentSeparator");function ws(e,t){t===1?e.result+=" ":t>1&&(e.result+=$t.repeat(`
|
||
`,t-1))}g(ws,"writeFoldedLines");function Bd(e,t,r){var i,n,a,o,s,c,l,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.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=e.input.charCodeAt(e.position+1),te(n)||r&&wr(n)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),te(n)||r&&wr(n))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),te(i))break}else{if(e.position===e.lineStart&&Bn(e)||r&&wr(d))break;if(we(d))if(c=e.line,l=e.lineStart,h=e.lineIndent,Bt(e,!1,-1),e.lineIndent>=t){s=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=h;break}}s&&(Ke(e,a,o,!1),ws(e,e.line-c),a=o=e.position,s=!1),or(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Ke(e,a,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}g(Bd,"readPlainScalar");function Ed(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ke(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else we(r)?(Ke(e,i,n,!0),ws(e,Bt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Bn(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}g(Ed,"readSingleQuotedScalar");function Fd(e,t){var r,i,n,a,o,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return Ke(e,r,e.position,!0),e.position++,!0;if(s===92){if(Ke(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),we(s))Bt(e,!1,t);else if(s<256&&Md[s])e.result+=Ad[s],e.position++;else if((o=vd(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=kd(s))>=0?a=(a<<4)+o:tt(e,"expected hexadecimal character");e.result+=Td(a),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else we(s)?(Ke(e,r,i,!0),ws(e,Bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Bn(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}g(Fd,"readDoubleQuotedScalar");function $d(e,t){var r=!0,i,n,a,o=e.tag,s,c=e.anchor,l,h,u,f,d,p=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,s=[];else if(b===123)h=125,d=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(Bt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=c,e.kind=d?"mapping":"sequence",e.result=s,!0;r?b===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(l=e.input.charCodeAt(e.position+1),te(l)&&(u=f=!0,e.position++,Bt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,Br(e,t,Ba,!1,!0),y=e.tag,m=e.result,Bt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Bt(e,!0,t),Br(e,t,Ba,!1,!0),x=e.result),d?kr(e,s,p,y,m,x,i,n,a):u?s.push(kr(e,null,p,y,m,x,i,n,a)):s.push(m),Bt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}g($d,"readFlowCollection");function Dd(e,t){var r,i,n=no,a=!1,o=!1,s=t,c=0,l=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)no===n?n=u===43?bh:n1:tt(e,"repeat of a chomping mode identifier");else if((h=Sd(u))>=0)h===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?tt(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(or(u)){do u=e.input.charCodeAt(++e.position);while(or(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!we(u)&&u!==0)}for(;u!==0;){for(Cs(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),we(u)){c++;continue}if(e.lineIndent<s){n===bh?e.result+=$t.repeat(`
|
||
`,a?1+c:c):n===no&&a&&(e.result+=`
|
||
`);break}for(i?or(u)?(l=!0,e.result+=$t.repeat(`
|
||
`,a?1+c:c)):l?(l=!1,e.result+=$t.repeat(`
|
||
`,c+1)):c===0?a&&(e.result+=" "):e.result+=$t.repeat(`
|
||
`,c):e.result+=$t.repeat(`
|
||
`,a?1+c:c),a=!0,o=!0,c=0,r=e.position;!we(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ke(e,r,e.position,!1)}return!0}g(Dd,"readBlockScalar");function Ho(e,t){var r,i=e.tag,n=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(c!==45||(o=e.input.charCodeAt(e.position+1),!te(o))));){if(s=!0,e.position++,Bt(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Br(e,t,_d,!1,!0),a.push(e.result),Bt(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}g(Ho,"readBlockSequence");function Od(e,t,r){var i,n,a,o,s,c,l=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,p=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&te(i))b===63?(y&&(kr(e,u,f,d,p,null,o,s,c),d=p=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,s=e.lineStart,c=e.position,!Br(e,r,bd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);or(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),te(b)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(kr(e,u,f,d,p,null,o,s,c),d=p=m=null),x=!0,y=!1,n=!1,d=e.tag,p=e.result;else if(x)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=h,!0}else if(x)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(y&&(o=e.line,s=e.lineStart,c=e.position),Br(e,t,Ea,!0,n)&&(y?p=e.result:m=e.result),y||(kr(e,u,f,d,p,m,o,s,c),d=p=m=null),Bt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&kr(e,u,f,d,p,null,o,s,c),x&&(e.tag=l,e.anchor=h,e.kind="mapping",e.result=u),x}g(Od,"readBlockMapping");function Rd(e){var t,r=!1,i=!1,n,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&tt(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!te(o);)o===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Cd.test(n)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),o1.test(a)&&tt(e,"tag suffix cannot contain flow indicator characters")}a&&!wd.test(a)&&tt(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{tt(e,"tag name is malformed: "+a)}return r?e.tag=a:lr.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:tt(e,'undeclared tag handle "'+n+'"'),!0}g(Rd,"readTagProperty");function Id(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!te(r)&&!wr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(Id,"readAnchorProperty");function Pd(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!te(i)&&!wr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),lr.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Bt(e,!0,-1),!0}g(Pd,"readAlias");function Br(e,t,r,i,n){var a,o,s,c=1,l=!1,h=!1,u,f,d,p,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=Ea===r||_d===r,i&&Bt(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;Rd(e)||Id(e);)Bt(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&(s=l||n),(c===1||Ea===r)&&(Ba===r||bd===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?s&&(Ho(e,y)||Od(e,y,m))||$d(e,m)?h=!0:(o&&Dd(e,m)||Ed(e,m)||Fd(e,m)?h=!0:Pd(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):Bd(e,m,Ba===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(h=s&&Ho(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&tt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(p=e.implicitTypes[u],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(lr.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){p=d[u];break}p||tt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&tt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):tt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}g(Br,"composeNode");function Nd(e){var t=e.position,r,i,n,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Bt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!te(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&tt(e,"directive name must not be less than one character in length");o!==0;){for(;or(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!we(o));break}if(we(o))break;for(r=e.position;o!==0&&!te(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&Cs(e),lr.call(_h,i)?_h[i](e,i,n):mn(e,'unknown document directive "'+i+'"')}if(Bt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Bt(e,!0,-1)):a&&tt(e,"directives end mark is expected"),Br(e,e.lineIndent-1,Ea,!1,!0),Bt(e,!0,-1),e.checkLineBreaks&&s1.test(e.input.slice(t,e.position))&&mn(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Bn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Bt(e,!0,-1));return}if(e.position<e.length-1)tt(e,"end of the stream or a document separator is expected");else return}g(Nd,"readDocument");function Yl(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
||
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Ld(e,t),i=e.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;)Nd(r);return r.documents}g(Yl,"loadDocuments");function l1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Yl(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}g(l1,"loadAll$1");function zd(e,t){var r=Yl(e,t);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(zd,"load$1");var c1=zd,h1={load:c1},Wd=Object.prototype.toString,qd=Object.prototype.hasOwnProperty,jl=65279,u1=9,yn=10,f1=13,d1=32,p1=33,g1=34,Uo=35,m1=37,y1=38,x1=39,b1=42,Hd=44,_1=45,Fa=58,C1=61,w1=62,k1=63,v1=64,Ud=91,Yd=93,S1=96,jd=123,T1=124,Gd=125,Zt={};Zt[0]="\\0";Zt[7]="\\a";Zt[8]="\\b";Zt[9]="\\t";Zt[10]="\\n";Zt[11]="\\v";Zt[12]="\\f";Zt[13]="\\r";Zt[27]="\\e";Zt[34]='\\"';Zt[92]="\\\\";Zt[133]="\\N";Zt[160]="\\_";Zt[8232]="\\L";Zt[8233]="\\P";var M1=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],A1=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Vd(e,t){var r,i,n,a,o,s,c;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)o=i[n],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&qd.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[o]=s;return r}g(Vd,"compileStyleMap");function Xd(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new ce("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+$t.repeat("0",i-t.length)+t}g(Xd,"encodeHex");var L1=1,xn=2;function Zd(e){this.schema=e.schema||xd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=$t.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Vd(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?xn:L1,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(Zd,"State");function Yo(e,t){for(var r=$t.repeat(" ",t),i=0,n=-1,a="",o,s=e.length;i<s;)n=e.indexOf(`
|
||
`,i),n===-1?(o=e.slice(i),i=s):(o=e.slice(i,n+1),i=n+1),o.length&&o!==`
|
||
`&&(a+=r),a+=o;return a}g(Yo,"indentString");function $a(e,t){return`
|
||
`+$t.repeat(" ",e.indent*t)}g($a,"generateNextLine");function Kd(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}g(Kd,"testImplicitResolving");function bn(e){return e===d1||e===u1}g(bn,"isWhitespace");function _i(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==jl||65536<=e&&e<=1114111}g(_i,"isPrintable");function jo(e){return _i(e)&&e!==jl&&e!==f1&&e!==yn}g(jo,"isNsCharOrWhitespace");function Go(e,t,r){var i=jo(e),n=i&&!bn(e);return(r?i:i&&e!==Hd&&e!==Ud&&e!==Yd&&e!==jd&&e!==Gd)&&e!==Uo&&!(t===Fa&&!n)||jo(t)&&!bn(t)&&e===Uo||t===Fa&&n}g(Go,"isPlainSafe");function Qd(e){return _i(e)&&e!==jl&&!bn(e)&&e!==_1&&e!==k1&&e!==Fa&&e!==Hd&&e!==Ud&&e!==Yd&&e!==jd&&e!==Gd&&e!==Uo&&e!==y1&&e!==b1&&e!==p1&&e!==T1&&e!==C1&&e!==w1&&e!==x1&&e!==g1&&e!==m1&&e!==v1&&e!==S1}g(Qd,"isPlainSafeFirst");function Jd(e){return!bn(e)&&e!==Fa}g(Jd,"isPlainSafeLast");function Jr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(Jr,"codePointAt");function Gl(e){var t=/^\n* /;return t.test(e)}g(Gl,"needIndentIndicator");var tp=1,Vo=2,ep=3,rp=4,Kr=5;function ip(e,t,r,i,n,a,o,s){var c,l=0,h=null,u=!1,f=!1,d=i!==-1,p=-1,m=Qd(Jr(e,0))&&Jd(Jr(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Jr(e,c),!_i(l))return Kr;m=m&&Go(l,h,s),h=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Jr(e,c),l===yn)u=!0,d&&(f=f||c-p-1>i&&e[p+1]!==" ",p=c);else if(!_i(l))return Kr;m=m&&Go(l,h,s),h=l}f=f||d&&c-p-1>i&&e[p+1]!==" "}return!u&&!f?m&&!o&&!n(e)?tp:a===xn?Kr:Vo:r>9&&Gl(e)?Kr:o?a===xn?Kr:Vo:f?rp:ep}g(ip,"chooseScalarStyle");function np(e,t,r,i,n){e.dump=function(){if(t.length===0)return e.quotingType===xn?'""':"''";if(!e.noCompatMode&&(M1.indexOf(t)!==-1||A1.test(t)))return e.quotingType===xn?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return Kd(e,l)}switch(g(c,"testAmbiguity"),ip(t,s,e.indent,o,c,e.quotingType,e.forceQuotes&&!i,n)){case tp:return t;case Vo:return"'"+t.replace(/'/g,"''")+"'";case ep:return"|"+Xo(t,e.indent)+Zo(Yo(t,a));case rp:return">"+Xo(t,e.indent)+Zo(Yo(ap(t,o),a));case Kr:return'"'+sp(t)+'"';default:throw new ce("impossible error: invalid scalar style")}}()}g(np,"writeScalar");function Xo(e,t){var r=Gl(e)?String(t):"",i=e[e.length-1]===`
|
||
`,n=i&&(e[e.length-2]===`
|
||
`||e===`
|
||
`),a=n?"+":i?"":"-";return r+a+`
|
||
`}g(Xo,"blockHeader");function Zo(e){return e[e.length-1]===`
|
||
`?e.slice(0,-1):e}g(Zo,"dropEndingNewline");function ap(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var l=e.indexOf(`
|
||
`);return l=l!==-1?l:e.length,r.lastIndex=l,Ko(e.slice(0,l),t)}(),n=e[0]===`
|
||
`||e[0]===" ",a,o;o=r.exec(e);){var s=o[1],c=o[2];a=c[0]===" ",i+=s+(!n&&!a&&c!==""?`
|
||
`:"")+Ko(c,t),n=a}return i}g(ap,"foldString");function Ko(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,c="";i=r.exec(e);)s=i.index,s-n>t&&(a=o>n?o:s,c+=`
|
||
`+e.slice(n,a),n=a+1),o=s;return c+=`
|
||
`,e.length-n>t&&o>n?c+=e.slice(n,o)+`
|
||
`+e.slice(o+1):c+=e.slice(n),c.slice(1)}g(Ko,"foldLine");function sp(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Jr(e,n),i=Zt[r],!i&&_i(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||Xd(r);return t}g(sp,"escapeString");function op(e,t,r){var i="",n=e.tag,a,o,s;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(Re(e,t,s,!1,!1)||typeof s>"u"&&Re(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}g(op,"writeFlowSequence");function Qo(e,t,r,i){var n="",a=e.tag,o,s,c;for(o=0,s=r.length;o<s;o+=1)c=r[o],e.replacer&&(c=e.replacer.call(r,String(o),c)),(Re(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Re(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=$a(e,t)),e.dump&&yn===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}g(Qo,"writeBlockSequence");function lp(e,t,r){var i="",n=e.tag,a=Object.keys(r),o,s,c,l,h;for(o=0,s=a.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),c=a[o],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),Re(e,t,c,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Re(e,t,l,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}g(lp,"writeFlowMapping");function cp(e,t,r,i){var n="",a=e.tag,o=Object.keys(r),s,c,l,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.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(e,t)),l=o[s],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),Re(e,t+1,l,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&yn===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=$a(e,t)),Re(e,t+1,h,!0,u)&&(e.dump&&yn===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}g(cp,"writeBlockMapping");function Jo(e,t,r){var i,n,a,o,s,c;for(n=r?e.explicitTypes:e.implicitTypes,a=0,o=n.length;a<o;a+=1)if(s=n[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,Wd.call(s.represent)==="[object Function]")i=s.represent(t,c);else if(qd.call(s.represent,c))i=s.represent[c](t,c);else throw new ce("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=i}return!0}return!1}g(Jo,"detectType");function Re(e,t,r,i,n,a,o){e.tag=null,e.dump=r,Jo(e,r,!1)||Jo(e,r,!0);var s=Wd.call(e.dump),c=i,l;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(cp(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(lp(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Qo(e,t-1,e.dump,n):Qo(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(op(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&np(e,e.dump,t,a,c);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ce("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}g(Re,"writeNode");function hp(e,t){var r=[],i=[],n,a;for(Da(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}g(hp,"getDuplicateReferences");function Da(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)Da(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)Da(e[i[n]],t,r)}g(Da,"inspectNode");function B1(e,t){t=t||{};var r=new Zd(t);r.noRefs||hp(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Re(r,0,i,!0,!0)?r.dump+`
|
||
`:""}g(B1,"dump$1");function E1(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}g(E1,"renamed");var F1=ed,$1=h1.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 rn(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=At(e),t=At(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}g(rn,"calculateDeltaAndAngle");var At=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),D1=g(e=>({x:g(function(t,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,e.arrowTypeStart)){const{angle:d,deltaX:p}=rn(i[0],i[1]);n=ge[e.arrowTypeStart]*Math.cos(d)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ge,e.arrowTypeEnd)){const{angle:d,deltaX:p}=rn(i[i.length-1],i[i.length-2]);n=ge[e.arrowTypeEnd]*Math.cos(d)*(p>=0?1:-1)}const o=Math.abs(At(t).x-At(i[i.length-1]).x),s=Math.abs(At(t).y-At(i[i.length-1]).y),c=Math.abs(At(t).x-At(i[0]).x),l=Math.abs(At(t).y-At(i[0]).y),h=ge[e.arrowTypeStart],u=ge[e.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(t).x+n},"x"),y:g(function(t,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,e.arrowTypeStart)){const{angle:d,deltaY:p}=rn(i[0],i[1]);n=ge[e.arrowTypeStart]*Math.abs(Math.sin(d))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ge,e.arrowTypeEnd)){const{angle:d,deltaY:p}=rn(i[i.length-1],i[i.length-2]);n=ge[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(p>=0?1:-1)}const o=Math.abs(At(t).y-At(i[i.length-1]).y),s=Math.abs(At(t).x-At(i[i.length-1]).x),c=Math.abs(At(t).y-At(i[0]).y),l=Math.abs(At(t).x-At(i[0]).x),h=ge[e.arrowTypeStart],u=ge[e.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(t).y+n},"y")}),"getLineFunctionsWithOffset"),Vl=g(({flowchart:e})=>{var n,a;const t=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),O1=g(e=>{const{handDrawnSeed:t}=xt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Li=g(e=>{const t=R1([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),R1=g(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n==null?void 0:n.trim())}),t},"styles2Map"),up=g(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),J=g(e=>{const{stylesArray:t}=Li(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];up(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:t,borderStyles:n,backgroundStyles:a}},"styles2String"),K=g((e,t)=>{var c;const{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=Li(e);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]},t)},"userNodeOverrides"),qi={},Ft={},Ch;function I1(){return Ch||(Ch=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.BLANK_URL=Ft.relativeFirstCharacters=Ft.whitespaceEscapeCharsRegex=Ft.urlSchemeRegex=Ft.ctrlCharactersRegex=Ft.htmlCtrlEntityRegex=Ft.htmlEntitiesRegex=Ft.invalidProtocolRegex=void 0,Ft.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ft.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ft.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ft.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ft.urlSchemeRegex=/^.+(:|:)/gim,Ft.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ft.relativeFirstCharacters=[".","/"],Ft.BLANK_URL="about:blank"),Ft}var wh;function P1(){if(wh)return qi;wh=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.sanitizeUrl=void 0;var e=I1();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var s=o.replace(e.ctrlCharactersRegex,"");return s.replace(e.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 e.BLANK_URL;var s,c=n(o.trim());do c=r(c).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),c=n(c),s=c.match(e.ctrlCharactersRegex)||c.match(e.htmlEntitiesRegex)||c.match(e.htmlCtrlEntityRegex)||c.match(e.whitespaceEscapeCharsRegex);while(s&&s.length>0);var l=c;if(!l)return e.BLANK_URL;if(t(l))return l;var h=l.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return l;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var p=new URL(d);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return d}return qi.sanitizeUrl=a,qi}var N1=P1();function fa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function z1(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Xl(e){let t,r,i;e.length!==2?(t=fa,r=(s,c)=>fa(e(s),c),i=(s,c)=>e(s)-c):(t=e===fa||e===z1?e:W1,r=e,i=e);function n(s,c,l=0,h=s.length){if(l<h){if(t(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(t(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 W1(){return 0}function q1(e){return e===null?NaN:+e}const H1=Xl(fa),U1=H1.right;Xl(q1).center;class kh extends Map{constructor(t,r=G1){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[i,n]of t)this.set(i,n)}get(t){return super.get(vh(this,t))}has(t){return super.has(vh(this,t))}set(t,r){return super.set(Y1(this,t),r)}delete(t){return super.delete(j1(this,t))}}function vh({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):r}function Y1({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function j1({_intern:e,_key:t},r){const i=t(r);return e.has(i)&&(r=e.get(r),e.delete(i)),r}function G1(e){return e!==null&&typeof e=="object"?e.valueOf():e}const V1=Math.sqrt(50),X1=Math.sqrt(10),Z1=Math.sqrt(2);function Oa(e,t,r){const i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),o=a>=V1?10:a>=X1?5:a>=Z1?2:1;let s,c,l;return n<0?(l=Math.pow(10,-n)/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,n)*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=r&&r<2?Oa(e,t,r*2):[s,c,l]}function K1(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const i=t<e,[n,a,o]=i?Oa(t,e,r):Oa(e,t,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 tl(e,t,r){return t=+t,e=+e,r=+r,Oa(e,t,r)[2]}function el(e,t,r){t=+t,e=+e,r=+r;const i=t<e,n=i?tl(t,e,r):tl(e,t,r);return(i?-1:1)*(n<0?1/-n:n)}function X$(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function Z$(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function Q1(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(n);++i<n;)a[i]=e+i*r;return a}function J1(e){return e}var da=1,ao=2,rl=3,Vn=4,Sh=1e-6;function t2(e){return"translate("+e+",0)"}function e2(e){return"translate(0,"+e+")"}function r2(e){return t=>+e(t)}function i2(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function n2(){return!this.__axis}function fp(e,t){var r=[],i=null,n=null,a=6,o=6,s=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=e===da||e===Vn?-1:1,h=e===Vn||e===ao?"x":"y",u=e===da||e===rl?t2:e2;function f(d){var p=i??(t.ticks?t.ticks.apply(t,r):t.domain()),m=n??(t.tickFormat?t.tickFormat.apply(t,r):J1),y=Math.max(a,0)+s,x=t.range(),b=+x[0]+c,C=+x[x.length-1]+c,k=(t.bandwidth?i2:r2)(t.copy(),c),w=d.selection?d.selection():d,_=w.selectAll(".domain").data([null]),v=w.selectAll(".tick").data(p,t).order(),D=v.exit(),N=v.enter().append("g").attr("class","tick"),O=v.select("line"),T=v.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),v=v.merge(N),O=O.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",e===da?"0em":e===rl?"0.71em":"0.32em")),d!==w&&(_=_.transition(d),v=v.transition(d),O=O.transition(d),T=T.transition(d),D=D.transition(d).attr("opacity",Sh).attr("transform",function(R){return isFinite(R=k(R))?u(R+c):this.getAttribute("transform")}),N.attr("opacity",Sh).attr("transform",function(R){var L=this.parentNode.__axis;return u((L&&isFinite(L=L(R))?L:k(R))+c)})),D.remove(),_.attr("d",e===Vn||e===ao?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),v.attr("opacity",1).attr("transform",function(R){return u(k(R)+c)}),O.attr(h+"2",l*a),T.attr(h,l*y).text(m),w.filter(n2).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===ao?"start":e===Vn?"end":"middle"),w.each(function(){this.__axis=k})}return f.scale=function(d){return arguments.length?(t=d,f):t},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 K$(e){return fp(da,e)}function Q$(e){return fp(rl,e)}var a2={value:()=>{}};function dp(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new pa(r)}function pa(e){this._=e}function s2(e,t){return e.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&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}pa.prototype=dp.prototype={constructor:pa,on:function(e,t){var r=this._,i=s2(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(e=i[a]).type)&&(n=o2(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=Th(r[n],e.name,t);else if(t==null)for(n in r)r[n]=Th(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new pa(e)},call:function(e,t){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(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function o2(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function Th(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=a2,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var il="http://www.w3.org/1999/xhtml";const Mh={svg:"http://www.w3.org/2000/svg",xhtml:il,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ks(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Mh.hasOwnProperty(t)?{space:Mh[t],local:e}:e}function l2(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===il&&t.documentElement.namespaceURI===il?t.createElement(e):t.createElementNS(r,e)}}function c2(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function pp(e){var t=ks(e);return(t.local?c2:l2)(t)}function h2(){}function Zl(e){return e==null?h2:function(){return this.querySelector(e)}}function u2(e){typeof e!="function"&&(e=Zl(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=new Array(o),c,l,h=0;h<o;++h)(c=a[h])&&(l=e.call(c,c.__data__,h,a))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new de(i,this._parents)}function f2(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function d2(){return[]}function gp(e){return e==null?d2:function(){return this.querySelectorAll(e)}}function p2(e){return function(){return f2(e.apply(this,arguments))}}function g2(e){typeof e=="function"?e=p2(e):e=gp(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(i.push(e.call(c,c.__data__,l,o)),n.push(c));return new de(i,n)}function mp(e){return function(){return this.matches(e)}}function yp(e){return function(t){return t.matches(e)}}var m2=Array.prototype.find;function y2(e){return function(){return m2.call(this.children,e)}}function x2(){return this.firstElementChild}function b2(e){return this.select(e==null?x2:y2(typeof e=="function"?e:yp(e)))}var _2=Array.prototype.filter;function C2(){return Array.from(this.children)}function w2(e){return function(){return _2.call(this.children,e)}}function k2(e){return this.selectAll(e==null?C2:w2(typeof e=="function"?e:yp(e)))}function v2(e){typeof e!="function"&&(e=mp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new de(i,this._parents)}function xp(e){return new Array(e.length)}function S2(){return new de(this._enter||this._groups.map(xp),this._parents)}function Ra(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ra.prototype={constructor:Ra,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function T2(e){return function(){return e}}function M2(e,t,r,i,n,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):r[o]=new Ra(e,a[o]);for(;o<c;++o)(s=t[o])&&(n[o]=s)}function A2(e,t,r,i,n,a,o){var s,c,l=new Map,h=t.length,u=a.length,f=new Array(h),d;for(s=0;s<h;++s)(c=t[s])&&(f[s]=d=o.call(c,c.__data__,s,t)+"",l.has(d)?n[s]=c:l.set(d,c));for(s=0;s<u;++s)d=o.call(e,a[s],s,a)+"",(c=l.get(d))?(i[s]=c,c.__data__=a[s],l.delete(d)):r[s]=new Ra(e,a[s]);for(s=0;s<h;++s)(c=t[s])&&l.get(f[s])===c&&(n[s]=c)}function L2(e){return e.__data__}function B2(e,t){if(!arguments.length)return Array.from(this,L2);var r=t?A2:M2,i=this._parents,n=this._groups;typeof e!="function"&&(e=T2(e));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=E2(e.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,t);for(var b=0,C=0,k,w;b<p;++b)if(k=m[b]){for(b>=C&&(C=b+1);!(w=y[C])&&++C<p;);k._next=w||null}}return o=new de(o,i),o._enter=s,o._exit=c,o}function E2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function F2(){return new de(this._exit||this._groups.map(xp),this._parents)}function $2(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function D2(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._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 O2(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],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 R2(e){e||(e=I2);function t(u,f){return u&&f?e(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(t)}return new de(n,this._parents).order()}function I2(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function P2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function N2(){return Array.from(this)}function z2(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var o=i[n];if(o)return o}return null}function W2(){let e=0;for(const t of this)++e;return e}function q2(){return!this.node()}function H2(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,o=n.length,s;a<o;++a)(s=n[a])&&e.call(s,s.__data__,a,n);return this}function U2(e){return function(){this.removeAttribute(e)}}function Y2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function j2(e,t){return function(){this.setAttribute(e,t)}}function G2(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function V2(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function X2(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Z2(e,t){var r=ks(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?Y2:U2:typeof t=="function"?r.local?X2:V2:r.local?G2:j2)(r,t))}function bp(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function K2(e){return function(){this.style.removeProperty(e)}}function Q2(e,t,r){return function(){this.style.setProperty(e,t,r)}}function J2(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function t_(e,t,r){return arguments.length>1?this.each((t==null?K2:typeof t=="function"?J2:Q2)(e,t,r??"")):Ci(this.node(),e)}function Ci(e,t){return e.style.getPropertyValue(t)||bp(e).getComputedStyle(e,null).getPropertyValue(t)}function e_(e){return function(){delete this[e]}}function r_(e,t){return function(){this[e]=t}}function i_(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function n_(e,t){return arguments.length>1?this.each((t==null?e_:typeof t=="function"?i_:r_)(e,t)):this.node()[e]}function _p(e){return e.trim().split(/^|\s+/)}function Kl(e){return e.classList||new Cp(e)}function Cp(e){this._node=e,this._names=_p(e.getAttribute("class")||"")}Cp.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function wp(e,t){for(var r=Kl(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function kp(e,t){for(var r=Kl(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function a_(e){return function(){wp(this,e)}}function s_(e){return function(){kp(this,e)}}function o_(e,t){return function(){(t.apply(this,arguments)?wp:kp)(this,e)}}function l_(e,t){var r=_p(e+"");if(arguments.length<2){for(var i=Kl(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?o_:t?a_:s_)(r,t))}function c_(){this.textContent=""}function h_(e){return function(){this.textContent=e}}function u_(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function f_(e){return arguments.length?this.each(e==null?c_:(typeof e=="function"?u_:h_)(e)):this.node().textContent}function d_(){this.innerHTML=""}function p_(e){return function(){this.innerHTML=e}}function g_(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function m_(e){return arguments.length?this.each(e==null?d_:(typeof e=="function"?g_:p_)(e)):this.node().innerHTML}function y_(){this.nextSibling&&this.parentNode.appendChild(this)}function x_(){return this.each(y_)}function b_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function __(){return this.each(b_)}function C_(e){var t=typeof e=="function"?e:pp(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function w_(){return null}function k_(e,t){var r=typeof e=="function"?e:pp(e),i=t==null?w_:typeof t=="function"?t:Zl(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function v_(){var e=this.parentNode;e&&e.removeChild(this)}function S_(){return this.each(v_)}function T_(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function M_(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function A_(e){return this.select(e?M_:T_)}function L_(e){return arguments.length?this.property("__data__",e):this.node().__data__}function B_(e){return function(t){e.call(this,t,this.__data__)}}function E_(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function F_(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function $_(e,t,r){return function(){var i=this.__on,n,a=B_(t);if(i){for(var o=0,s=i.length;o<s;++o)if((n=i[o]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function D_(e,t,r){var i=E_(e+""),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=t?$_:F_,n=0;n<a;++n)this.each(s(i[n],t,r));return this}function vp(e,t,r){var i=bp(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function O_(e,t){return function(){return vp(this,e,t)}}function R_(e,t){return function(){return vp(this,e,t.apply(this,arguments))}}function I_(e,t){return this.each((typeof t=="function"?R_:O_)(e,t))}function*P_(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,o;n<a;++n)(o=i[n])&&(yield o)}var Sp=[null];function de(e,t){this._groups=e,this._parents=t}function En(){return new de([[document.documentElement]],Sp)}function N_(){return this}de.prototype=En.prototype={constructor:de,select:u2,selectAll:g2,selectChild:b2,selectChildren:k2,filter:v2,data:B2,enter:S2,exit:F2,join:$2,merge:D2,selection:N_,order:O2,sort:R2,call:P2,nodes:N2,node:z2,size:W2,empty:q2,each:H2,attr:Z2,style:t_,property:n_,classed:l_,text:f_,html:m_,raise:x_,lower:__,append:C_,insert:k_,remove:S_,clone:A_,datum:L_,on:D_,dispatch:I_,[Symbol.iterator]:P_};function gt(e){return typeof e=="string"?new de([[document.querySelector(e)]],[document.documentElement]):new de([[e]],Sp)}function Fn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function vs(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Ir(){}var _n=.7,Ia=1/_n,ni="\\s*([+-]?\\d+)\\s*",Cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z_=/^#([0-9a-f]{3,8})$/,W_=new RegExp(`^rgb\\(${ni},${ni},${ni}\\)$`),q_=new RegExp(`^rgb\\(${De},${De},${De}\\)$`),H_=new RegExp(`^rgba\\(${ni},${ni},${ni},${Cn}\\)$`),U_=new RegExp(`^rgba\\(${De},${De},${De},${Cn}\\)$`),Y_=new RegExp(`^hsl\\(${Cn},${De},${De}\\)$`),j_=new RegExp(`^hsla\\(${Cn},${De},${De},${Cn}\\)$`),Ah={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};Fn(Ir,Er,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lh,formatHex:Lh,formatHex8:G_,formatHsl:V_,formatRgb:Bh,toString:Bh});function Lh(){return this.rgb().formatHex()}function G_(){return this.rgb().formatHex8()}function V_(){return Mp(this).formatHsl()}function Bh(){return this.rgb().formatRgb()}function Er(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=z_.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Eh(t):r===3?new Vt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Xn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Xn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=W_.exec(e))?new Vt(t[1],t[2],t[3],1):(t=q_.exec(e))?new Vt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=H_.exec(e))?Xn(t[1],t[2],t[3],t[4]):(t=U_.exec(e))?Xn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Y_.exec(e))?Dh(t[1],t[2]/100,t[3]/100,1):(t=j_.exec(e))?Dh(t[1],t[2]/100,t[3]/100,t[4]):Ah.hasOwnProperty(e)?Eh(Ah[e]):e==="transparent"?new Vt(NaN,NaN,NaN,0):null}function Eh(e){return new Vt(e>>16&255,e>>8&255,e&255,1)}function Xn(e,t,r,i){return i<=0&&(e=t=r=NaN),new Vt(e,t,r,i)}function Tp(e){return e instanceof Ir||(e=Er(e)),e?(e=e.rgb(),new Vt(e.r,e.g,e.b,e.opacity)):new Vt}function nl(e,t,r,i){return arguments.length===1?Tp(e):new Vt(e,t,r,i??1)}function Vt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Fn(Vt,nl,vs(Ir,{brighter(e){return e=e==null?Ia:Math.pow(Ia,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_n:Math.pow(_n,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vt(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:Fh,formatHex:Fh,formatHex8:X_,formatRgb:$h,toString:$h}));function Fh(){return`#${vr(this.r)}${vr(this.g)}${vr(this.b)}`}function X_(){return`#${vr(this.r)}${vr(this.g)}${vr(this.b)}${vr((isNaN(this.opacity)?1:this.opacity)*255)}`}function $h(){const e=Pa(this.opacity);return`${e===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${e===1?")":`, ${e})`}`}function Pa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Tr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vr(e){return e=Tr(e),(e<16?"0":"")+e.toString(16)}function Dh(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ce(e,t,r,i)}function Mp(e){if(e instanceof Ce)return new Ce(e.h,e.s,e.l,e.opacity);if(e instanceof Ir||(e=Er(e)),!e)return new Ce;if(e instanceof Ce)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,c=(a+n)/2;return s?(t===a?o=(r-i)/s+(r<i)*6:r===a?o=(i-t)/s+2:o=(t-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,e.opacity)}function Z_(e,t,r,i){return arguments.length===1?Mp(e):new Ce(e,t,r,i??1)}function Ce(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Fn(Ce,Z_,vs(Ir,{brighter(e){return e=e==null?Ia:Math.pow(Ia,e),new Ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_n:Math.pow(_n,e),new Ce(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Vt(so(e>=240?e-240:e+120,n,i),so(e,n,i),so(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Ce(Oh(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 e=Pa(this.opacity);return`${e===1?"hsl(":"hsla("}${Oh(this.h)}, ${Zn(this.s)*100}%, ${Zn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Oh(e){return e=(e||0)%360,e<0?e+360:e}function Zn(e){return Math.max(0,Math.min(1,e||0))}function so(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const K_=Math.PI/180,Q_=180/Math.PI,Na=18,Ap=.96422,Lp=1,Bp=.82521,Ep=4/29,ai=6/29,Fp=3*ai*ai,J_=ai*ai*ai;function $p(e){if(e instanceof Oe)return new Oe(e.l,e.a,e.b,e.opacity);if(e instanceof Ye)return Dp(e);e instanceof Vt||(e=Tp(e));var t=ho(e.r),r=ho(e.g),i=ho(e.b),n=oo((.2225045*t+.7168786*r+.0606169*i)/Lp),a,o;return t===r&&r===i?a=o=n:(a=oo((.4360747*t+.3850649*r+.1430804*i)/Ap),o=oo((.0139322*t+.0971045*r+.7141733*i)/Bp)),new Oe(116*n-16,500*(a-n),200*(n-o),e.opacity)}function tC(e,t,r,i){return arguments.length===1?$p(e):new Oe(e,t,r,i??1)}function Oe(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}Fn(Oe,tC,vs(Ir,{brighter(e){return new Oe(this.l+Na*(e??1),this.a,this.b,this.opacity)},darker(e){return new Oe(this.l-Na*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=Ap*lo(t),e=Lp*lo(e),r=Bp*lo(r),new Vt(co(3.1338561*t-1.6168667*e-.4906146*r),co(-.9787684*t+1.9161415*e+.033454*r),co(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function oo(e){return e>J_?Math.pow(e,1/3):e/Fp+Ep}function lo(e){return e>ai?e*e*e:Fp*(e-Ep)}function co(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ho(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function eC(e){if(e instanceof Ye)return new Ye(e.h,e.c,e.l,e.opacity);if(e instanceof Oe||(e=$p(e)),e.a===0&&e.b===0)return new Ye(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Q_;return new Ye(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function al(e,t,r,i){return arguments.length===1?eC(e):new Ye(e,t,r,i??1)}function Ye(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function Dp(e){if(isNaN(e.h))return new Oe(e.l,0,0,e.opacity);var t=e.h*K_;return new Oe(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Fn(Ye,al,vs(Ir,{brighter(e){return new Ye(this.h,this.c,this.l+Na*(e??1),this.opacity)},darker(e){return new Ye(this.h,this.c,this.l-Na*(e??1),this.opacity)},rgb(){return Dp(this).rgb()}}));const Ss=e=>()=>e;function Op(e,t){return function(r){return e+r*t}}function rC(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function iC(e,t){var r=t-e;return r?Op(e,r>180||r<-180?r-360*Math.round(r/360):r):Ss(isNaN(e)?t:e)}function nC(e){return(e=+e)==1?dn:function(t,r){return r-t?rC(t,r,e):Ss(isNaN(t)?r:t)}}function dn(e,t){var r=t-e;return r?Op(e,r):Ss(isNaN(e)?t:e)}const za=function e(t){var r=nC(t);function i(n,a){var o=r((n=nl(n)).r,(a=nl(a)).r),s=r(n.g,a.g),c=r(n.b,a.b),l=dn(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=e,i}(1);function aC(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),n;return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}}function sC(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function oC(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),o;for(o=0;o<i;++o)n[o]=Ql(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<i;++o)a[o]=n[o](s);return a}}function lC(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}function _e(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function cC(e,t){var r={},i={},n;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in e?r[n]=Ql(e[n],t[n]):i[n]=t[n];return function(a){for(n in r)i[n]=r[n](a);return i}}var sl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uo=new RegExp(sl.source,"g");function hC(e){return function(){return e}}function uC(e){return function(t){return e(t)+""}}function Rp(e,t){var r=sl.lastIndex=uo.lastIndex=0,i,n,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(i=sl.exec(e))&&(n=uo.exec(t));)(a=n.index)>r&&(a=t.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=uo.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?uC(c[0].x):hC(t):(t=c.length,function(l){for(var h=0,u;h<t;++h)s[(u=c[h]).i]=u.x(l);return s.join("")})}function Ql(e,t){var r=typeof t,i;return t==null||r==="boolean"?Ss(t):(r==="number"?_e:r==="string"?(i=Er(t))?(t=i,za):Rp:t instanceof Er?za:t instanceof Date?lC:sC(t)?aC:Array.isArray(t)?oC:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?cC:_e)(e,t)}function fC(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Rh=180/Math.PI,ol={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ip(e,t,r,i,n,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*r+t*i)&&(r-=e*c,i-=t*c),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,c/=s),e*i<t*r&&(e=-e,t=-t,c=-c,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*Rh,skewX:Math.atan(c)*Rh,scaleX:o,scaleY:s}}var Kn;function dC(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ol:Ip(t.a,t.b,t.c,t.d,t.e,t.f)}function pC(e){return e==null||(Kn||(Kn=document.createElementNS("http://www.w3.org/2000/svg","g")),Kn.setAttribute("transform",e),!(e=Kn.transform.baseVal.consolidate()))?ol:(e=e.matrix,Ip(e.a,e.b,e.c,e.d,e.e,e.f))}function Pp(e,t,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,t,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+t+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=e(l),h=e(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 gC=Pp(dC,"px, ","px)","deg)"),mC=Pp(pC,", ",")",")");function yC(e){return function(t,r){var i=e((t=al(t)).h,(r=al(r)).h),n=dn(t.c,r.c),a=dn(t.l,r.l),o=dn(t.opacity,r.opacity);return function(s){return t.h=i(s),t.c=n(s),t.l=a(s),t.opacity=o(s),t+""}}}const J$=yC(iC);var wi=0,nn=0,Hi=0,Np=1e3,Wa,an,qa=0,Fr=0,Ts=0,wn=typeof performance=="object"&&performance.now?performance:Date,zp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Jl(){return Fr||(zp(xC),Fr=wn.now()+Ts)}function xC(){Fr=0}function Ha(){this._call=this._time=this._next=null}Ha.prototype=Wp.prototype={constructor:Ha,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Jl():+r)+(t==null?0:+t),!this._next&&an!==this&&(an?an._next=this:Wa=this,an=this),this._call=e,this._time=r,ll()},stop:function(){this._call&&(this._call=null,this._time=1/0,ll())}};function Wp(e,t,r){var i=new Ha;return i.restart(e,t,r),i}function bC(){Jl(),++wi;for(var e=Wa,t;e;)(t=Fr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--wi}function Ih(){Fr=(qa=wn.now())+Ts,wi=nn=0;try{bC()}finally{wi=0,CC(),Fr=0}}function _C(){var e=wn.now(),t=e-qa;t>Np&&(Ts-=t,qa=e)}function CC(){for(var e,t=Wa,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Wa=r);an=e,ll(i)}function ll(e){if(!wi){nn&&(nn=clearTimeout(nn));var t=e-Fr;t>24?(e<1/0&&(nn=setTimeout(Ih,e-wn.now()-Ts)),Hi&&(Hi=clearInterval(Hi))):(Hi||(qa=wn.now(),Hi=setInterval(_C,Np)),wi=1,zp(Ih))}}function Ph(e,t,r){var i=new Ha;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var wC=dp("start","end","cancel","interrupt"),kC=[],qp=0,Nh=1,cl=2,ga=3,zh=4,hl=5,ma=6;function Ms(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;vC(e,r,{name:t,index:i,group:n,on:wC,tween:kC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:qp})}function tc(e,t){var r=Se(e,t);if(r.state>qp)throw new Error("too late; already scheduled");return r}function Ie(e,t){var r=Se(e,t);if(r.state>ga)throw new Error("too late; already running");return r}function Se(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function vC(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Wp(a,0,r.time);function a(l){r.state=Nh,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!==Nh)return c();for(h in i)if(d=i[h],d.name===r.name){if(d.state===ga)return Ph(o);d.state===zh?(d.state=ma,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=ma,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(Ph(function(){r.state===ga&&(r.state=zh,r.timer.restart(s,r.delay,r.time),s(l))}),r.state=cl,r.on.call("start",e,e.__data__,r.index,r.group),r.state===cl){for(r.state=ga,n=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__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=hl,1),u=-1,f=n.length;++u<f;)n[u].call(e,h);r.state===hl&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=ma,r.timer.stop(),delete i[t];for(var l in i)return;delete e.__transition}}function SC(e,t){var r=e.__transition,i,n,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}n=i.state>cl&&i.state<hl,i.state=ma,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function TC(e){return this.each(function(){SC(this,e)})}function MC(e,t){var r,i;return function(){var n=Ie(this,e),a=n.tween;if(a!==r){i=r=a;for(var o=0,s=i.length;o<s;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function AC(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=Ie(this,e),o=a.tween;if(o!==i){n=(i=o).slice();for(var s={name:t,value:r},c=0,l=n.length;c<l;++c)if(n[c].name===t){n[c]=s;break}c===l&&n.push(s)}a.tween=n}}function LC(e,t){var r=this._id;if(e+="",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===e)return o.value;return null}return this.each((t==null?MC:AC)(r,e,t))}function ec(e,t,r){var i=e._id;return e.each(function(){var n=Ie(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return Se(n,i).value[t]}}function Hp(e,t){var r;return(typeof t=="number"?_e:t instanceof Er?za:(r=Er(t))?(t=r,za):Rp)(e,t)}function BC(e){return function(){this.removeAttribute(e)}}function EC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function FC(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttribute(e);return o===n?null:o===i?a:a=t(i=o,r)}}function $C(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===n?null:o===i?a:a=t(i=o,r)}}function DC(e,t,r){var i,n,a;return function(){var o,s=r(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+"",o===c?null:o===i&&c===n?a:(n=c,a=t(i=o,s)))}}function OC(e,t,r){var i,n,a;return function(){var o,s=r(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+"",o===c?null:o===i&&c===n?a:(n=c,a=t(i=o,s)))}}function RC(e,t){var r=ks(e),i=r==="transform"?mC:Hp;return this.attrTween(e,typeof t=="function"?(r.local?OC:DC)(r,i,ec(this,"attr."+e,t)):t==null?(r.local?EC:BC)(r):(r.local?$C:FC)(r,i,t))}function IC(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function PC(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function NC(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&PC(e,a)),r}return n._value=t,n}function zC(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&IC(e,a)),r}return n._value=t,n}function WC(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=ks(e);return this.tween(r,(i.local?NC:zC)(i,t))}function qC(e,t){return function(){tc(this,e).delay=+t.apply(this,arguments)}}function HC(e,t){return t=+t,function(){tc(this,e).delay=t}}function UC(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?qC:HC)(t,e)):Se(this.node(),t).delay}function YC(e,t){return function(){Ie(this,e).duration=+t.apply(this,arguments)}}function jC(e,t){return t=+t,function(){Ie(this,e).duration=t}}function GC(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?YC:jC)(t,e)):Se(this.node(),t).duration}function VC(e,t){if(typeof t!="function")throw new Error;return function(){Ie(this,e).ease=t}}function XC(e){var t=this._id;return arguments.length?this.each(VC(t,e)):Se(this.node(),t).ease}function ZC(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ie(this,e).ease=r}}function KC(e){if(typeof e!="function")throw new Error;return this.each(ZC(this._id,e))}function QC(e){typeof e!="function"&&(e=mp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Qe(i,this._parents,this._name,this._id)}function JC(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),o=new Array(i),s=0;s<a;++s)for(var c=t[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]=t[s];return new Qe(o,this._parents,this._name,this._id)}function tw(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function ew(e,t,r){var i,n,a=tw(t)?tc:Ie;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function rw(e,t){var r=this._id;return arguments.length<2?Se(this.node(),r).on.on(e):this.each(ew(r,e,t))}function iw(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function nw(){return this.on("end.remove",iw(this._id))}function aw(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Zl(e));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=e.call(h,h.__data__,f,s))&&("__data__"in h&&(u.__data__=h.__data__),l[f]=u,Ms(l[f],t,r,f,l,Se(h,r)));return new Qe(a,this._parents,t,r)}function sw(e){var t=this._name,r=this._id;typeof e!="function"&&(e=gp(e));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=e.call(h,h.__data__,u,c),d,p=Se(h,r),m=0,y=f.length;m<y;++m)(d=f[m])&&Ms(d,t,r,m,f,p);a.push(f),o.push(h)}return new Qe(a,o,t,r)}var ow=En.prototype.constructor;function lw(){return new ow(this._groups,this._parents)}function cw(e,t){var r,i,n;return function(){var a=Ci(this,e),o=(this.style.removeProperty(e),Ci(this,e));return a===o?null:a===r&&o===i?n:n=t(r=a,i=o)}}function Up(e){return function(){this.style.removeProperty(e)}}function hw(e,t,r){var i,n=r+"",a;return function(){var o=Ci(this,e);return o===n?null:o===i?a:a=t(i=o,r)}}function uw(e,t,r){var i,n,a;return function(){var o=Ci(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),Ci(this,e))),o===c?null:o===i&&c===n?a:(n=c,a=t(i=o,s))}}function fw(e,t){var r,i,n,a="style."+t,o="end."+a,s;return function(){var c=Ie(this,e),l=c.on,h=c.value[a]==null?s||(s=Up(t)):void 0;(l!==r||n!==h)&&(i=(r=l).copy()).on(o,n=h),c.on=i}}function dw(e,t,r){var i=(e+="")=="transform"?gC:Hp;return t==null?this.styleTween(e,cw(e,i)).on("end.style."+e,Up(e)):typeof t=="function"?this.styleTween(e,uw(e,i,ec(this,"style."+e,t))).each(fw(this._id,e)):this.styleTween(e,hw(e,i,t),r).on("end.style."+e,null)}function pw(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function gw(e,t,r){var i,n;function a(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&pw(e,o,r)),i}return a._value=t,a}function mw(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,gw(e,t,r??""))}function yw(e){return function(){this.textContent=e}}function xw(e){return function(){var t=e(this);this.textContent=t??""}}function bw(e){return this.tween("text",typeof e=="function"?xw(ec(this,"text",e)):yw(e==null?"":e+""))}function _w(e){return function(t){this.textContent=e.call(this,t)}}function Cw(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&_w(n)),t}return i._value=e,i}function ww(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Cw(e))}function kw(){for(var e=this._name,t=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,t);Ms(c,e,r,l,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Qe(i,this._parents,e,r)}function vw(){var e,t,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=Ie(this,i),h=l.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),n===0&&a()})}var Sw=0;function Qe(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Yp(){return++Sw}var qe=En.prototype;Qe.prototype={constructor:Qe,select:aw,selectAll:sw,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:QC,merge:JC,selection:lw,transition:kw,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:rw,attr:RC,attrTween:WC,style:dw,styleTween:mw,text:bw,textTween:ww,remove:nw,tween:LC,delay:UC,duration:GC,ease:XC,easeVarying:KC,end:vw,[Symbol.iterator]:qe[Symbol.iterator]};function Tw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Mw={time:null,delay:0,duration:250,ease:Tw};function Aw(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function Lw(e){var t,r;e instanceof Qe?(t=e._id,e=e._name):(t=Yp(),(r=Mw).time=Jl(),e=e==null?null:e+"");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,e,t,l,o,r||Aw(c,t));return new Qe(i,this._parents,e,t)}En.prototype.interrupt=TC;En.prototype.transition=Lw;const ul=Math.PI,fl=2*ul,xr=1e-6,Bw=fl-xr;function jp(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Ew(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return jp;const r=10**t;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 Fw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?jp:Ew(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,o){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,n,a){if(t=+t,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-t,l=n-r,h=o-t,u=s-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>xr)if(!(Math.abs(u*c-l*h)>xr)||!a)this._append`L${this._x1=t},${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((ul-Math.acos((m+f-y)/(2*x*b)))/2),k=C/b,w=C/x;Math.abs(k-1)>xr&&this._append`L${t+k*h},${r+k*u}`,this._append`A${a},${a},0,0,${+(u*d>h*p)},${this._x1=t+w*c},${this._y1=r+w*l}`}}arc(t,r,i,n,a,o){if(t=+t,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=t+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%fl+fl),f>Bw?this._append`A${i},${i},0,1,${u},${t-s},${r-c}A${i},${i},0,1,${u},${this._x1=l},${this._y1=h}`:f>xr&&this._append`A${i},${i},0,${+(f>=ul)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function $w(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ua(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function ki(e){return e=Ua(Math.abs(e)),e?e[1]:NaN}function Dw(e,t){return function(r,i){for(var n=r.length,a=[],o=0,s=e[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=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Ow(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Rw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ya(e){if(!(t=Rw.exec(e)))throw new Error("invalid format: "+e);var t;return new rc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ya.prototype=rc.prototype;function rc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}rc.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 Iw(e){t:for(var t=e.length,r=1,i=-1,n;r<t;++r)switch(e[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+e[r])break t;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var Gp;function Pw(e,t){var r=Ua(e,t);if(!r)return e+"";var i=r[0],n=r[1],a=n-(Gp=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(e,Math.max(0,t+a-1))[0]}function Wh(e,t){var r=Ua(e,t);if(!r)return e+"";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 qh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:$w,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Wh(e*100,t),r:Wh,s:Pw,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Hh(e){return e}var Uh=Array.prototype.map,Yh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nw(e){var t=e.grouping===void 0||e.thousands===void 0?Hh:Dw(Uh.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Hh:Ow(Uh.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(u){u=Ya(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,k=u.trim,w=u.type;w==="n"?(b=!0,w="g"):qh[w]||(C===void 0&&(C=12),k=!0,w="g"),(y||f==="0"&&d==="=")&&(y=!0,f="0",d="=");var _=m==="$"?r:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",v=m==="$"?i:/[%p]/.test(w)?o:"",D=qh[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 O(T){var R=_,L=v,M,F,B;if(w==="c")L=D(T)+L,T="";else{T=+T;var $=T<0||1/T<0;if(T=isNaN(T)?c:D(Math.abs(T),C),k&&(T=Iw(T)),$&&+T==0&&p!=="+"&&($=!1),R=($?p==="("?p:s:p==="-"||p==="("?"":p)+R,L=(w==="s"?Yh[8+Gp/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=t(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=t(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 O.toString=function(){return u+""},O}function h(u,f){var d=l((u=Ya(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,Vp,Xp;zw({thousands:",",grouping:[3],currency:["$",""]});function zw(e){return Qn=Nw(e),Vp=Qn.format,Xp=Qn.formatPrefix,Qn}function Ww(e){return Math.max(0,-ki(Math.abs(e)))}function qw(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ki(t)/3)))*3-ki(Math.abs(e)))}function Hw(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ki(t)-ki(e))+1}function Uw(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function Yw(){return this.eachAfter(Uw)}function jw(e,t){let r=-1;for(const i of this)e.call(t,i,++r,this);return this}function Gw(e,t){for(var r=this,i=[r],n,a,o=-1;r=i.pop();)if(e.call(t,r,++o,this),n=r.children)for(a=n.length-1;a>=0;--a)i.push(n[a]);return this}function Vw(e,t){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();)e.call(t,r,++c,this);return this}function Xw(e,t){let r=-1;for(const i of this)if(e.call(t,i,++r,this))return i}function Zw(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,n=i&&i.length;--n>=0;)r+=i[n].value;t.value=r})}function Kw(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Qw(e){for(var t=this,r=Jw(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i}function Jw(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}function tk(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function ek(){return Array.from(this)}function rk(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function ik(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*nk(){var e=this,t,r=[e],i,n,a;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(n=0,a=i.length;n<a;++n)r.push(i[n]);while(r.length)}function Zp(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=ok)):t===void 0&&(t=sk);for(var r=new ja(e),i,n=[r],a,o,s,c;i=n.pop();)if((o=t(i.data))&&(c=(o=Array.from(o)).length))for(i.children=o,s=c-1;s>=0;--s)n.push(a=o[s]=new ja(o[s])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(ck)}function ak(){return Zp(this).eachBefore(lk)}function sk(e){return e.children}function ok(e){return Array.isArray(e)?e[1]:null}function lk(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function ck(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function ja(e){this.data=e,this.depth=this.height=0,this.parent=null}ja.prototype=Zp.prototype={constructor:ja,count:Yw,each:jw,eachAfter:Vw,eachBefore:Gw,find:Xw,sum:Zw,sort:Kw,path:Qw,ancestors:tk,descendants:ek,leaves:rk,links:ik,copy:ak,[Symbol.iterator]:nk};function hk(e){if(typeof e!="function")throw new Error;return e}function Ui(){return 0}function Yi(e){return function(){return e}}function uk(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function fk(e,t,r,i,n){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-t)/e.value;++s<c;)o=a[s],o.y0=r,o.y1=n,o.x0=t,o.x1=t+=o.value*l}function dk(e,t,r,i,n){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(n-r)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=i,o.y0=r,o.y1=r+=o.value*l}var pk=(1+Math.sqrt(5))/2;function gk(e,t,r,i,n,a){for(var o=[],s=t.children,c,l,h=0,u=0,f=s.length,d,p,m=t.value,y,x,b,C,k,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*e),_=y*y*w,k=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>k){y-=l;break}k=C}o.push(c={value:y,dice:d<p,children:s.slice(h,u)}),c.dice?fk(c,r,i,n,m?i+=p*y/m:a):dk(c,r,i,m?r+=d*y/m:n,a),m-=y,h=u}return o}const mk=function e(t){function r(i,n,a,o,s){gk(t,i,n,a,o,s)}return r.ratio=function(i){return e((i=+i)>1?i:1)},r}(pk);function t3(){var e=mk,t=!1,r=1,i=1,n=[0],a=Ui,o=Ui,s=Ui,c=Ui,l=Ui;function h(f){return f.x0=f.y0=0,f.x1=r,f.y1=i,f.eachBefore(u),n=[0],t&&f.eachBefore(uk),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),e(f,p,m,y,x))}return h.round=function(f){return arguments.length?(t=!!f,h):t},h.size=function(f){return arguments.length?(r=+f[0],i=+f[1],h):[r,i]},h.tile=function(f){return arguments.length?(e=hk(f),h):e},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(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const jh=Symbol("implicit");function Kp(){var e=new kh,t=[],r=[],i=jh;function n(a){let o=e.get(a);if(o===void 0){if(i!==jh)return i;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return n.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new kh;for(const o of a)e.has(o)||e.set(o,t.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 Kp(t,r).unknown(i)},As.apply(n,arguments),n}function yk(){var e=Kp().unknown(void 0),t=e.domain,r=e.range,i=0,n=1,a,o,s=!1,c=0,l=0,h=.5;delete e.unknown;function u(){var f=t().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=Q1(f).map(function(x){return p+a*x});return r(d?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),u()):t()},e.range=function(f){return arguments.length?([i,n]=f,i=+i,n=+n,u()):[i,n]},e.rangeRound=function(f){return[i,n]=f,i=+i,n=+n,s=!0,u()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(f){return arguments.length?(s=!!f,u()):s},e.padding=function(f){return arguments.length?(c=Math.min(1,l=+f),u()):c},e.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),u()):c},e.paddingOuter=function(f){return arguments.length?(l=+f,u()):l},e.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),u()):h},e.copy=function(){return yk(t(),[i,n]).round(s).paddingInner(c).paddingOuter(l).align(h)},As.apply(u(),arguments)}function xk(e){return function(){return e}}function bk(e){return+e}var Gh=[0,1];function ti(e){return e}function dl(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:xk(isNaN(t)?NaN:.5)}function _k(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function Ck(e,t,r){var i=e[0],n=e[1],a=t[0],o=t[1];return n<i?(i=dl(n,i),a=r(o,a)):(i=dl(i,n),a=r(a,o)),function(s){return a(i(s))}}function wk(e,t,r){var i=Math.min(e.length,t.length)-1,n=new Array(i),a=new Array(i),o=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<i;)n[o]=dl(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var c=U1(e,s,1,i)-1;return a[c](n[c](s))}}function Qp(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function kk(){var e=Gh,t=Gh,r=Ql,i,n,a,o=ti,s,c,l;function h(){var f=Math.min(e.length,t.length);return o!==ti&&(o=_k(e[0],e[f-1])),s=f>2?wk:Ck,c=l=null,u}function u(f){return f==null||isNaN(f=+f)?a:(c||(c=s(e.map(i),t,r)))(i(o(f)))}return u.invert=function(f){return o(n((l||(l=s(t,e.map(i),_e)))(f)))},u.domain=function(f){return arguments.length?(e=Array.from(f,bk),h()):e.slice()},u.range=function(f){return arguments.length?(t=Array.from(f),h()):t.slice()},u.rangeRound=function(f){return t=Array.from(f),r=fC,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 Jp(){return kk()(ti,ti)}function vk(e,t,r,i){var n=el(e,t,r),a;switch(i=Ya(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(a=qw(n,o))&&(i.precision=a),Xp(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Hw(n,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=Ww(n))&&(i.precision=a-(i.type==="%")*2);break}}return Vp(i)}function Sk(e){var t=e.domain;return e.ticks=function(r){var i=t();return K1(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var n=t();return vk(n[0],n[n.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),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=tl(o,s,r),l===c)return i[n]=o,i[a]=s,t(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 e},e}function Tk(){var e=Jp();return e.copy=function(){return Qp(e,Tk())},As.apply(e,arguments),Sk(e)}function Mk(e,t){e=e.slice();var r=0,i=e.length-1,n=e[r],a=e[i],o;return a<n&&(o=r,r=i,i=o,o=n,n=a,a=o),e[r]=t.floor(n),e[i]=t.ceil(a),e}const fo=new Date,po=new Date;function Ot(e,t,r,i){function n(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return n.floor=a=>(e(a=new Date(+a)),a),n.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),n.round=a=>{const o=n(a),s=n.ceil(a);return a-o<s-a?o:s},n.offset=(a,o)=>(t(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)),t(a,s),e(a);while(l<a&&a<o);return c},n.filter=a=>Ot(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(n.count=(a,o)=>(fo.setTime(+a),po.setTime(+o),e(fo),e(po),Math.floor(r(fo,po))),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=Ot(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ga.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ot(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ga);Ga.range;const je=1e3,me=je*60,Ge=me*60,Je=Ge*24,ic=Je*7,Vh=Je*30,go=Je*365,ei=Ot(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*je)},(e,t)=>(t-e)/je,e=>e.getUTCSeconds());ei.range;const nc=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*je)},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getMinutes());nc.range;const Ak=Ot(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getUTCMinutes());Ak.range;const ac=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*je-e.getMinutes()*me)},(e,t)=>{e.setTime(+e+t*Ge)},(e,t)=>(t-e)/Ge,e=>e.getHours());ac.range;const Lk=Ot(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ge)},(e,t)=>(t-e)/Ge,e=>e.getUTCHours());Lk.range;const $n=Ot(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*me)/Je,e=>e.getDate()-1);$n.range;const sc=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Je,e=>e.getUTCDate()-1);sc.range;const Bk=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Je,e=>Math.floor(e/Je));Bk.range;function Pr(e){return Ot(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*me)/ic)}const Ls=Pr(0),Va=Pr(1),Ek=Pr(2),Fk=Pr(3),vi=Pr(4),$k=Pr(5),Dk=Pr(6);Ls.range;Va.range;Ek.range;Fk.range;vi.range;$k.range;Dk.range;function Nr(e){return Ot(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/ic)}const tg=Nr(0),Xa=Nr(1),Ok=Nr(2),Rk=Nr(3),Si=Nr(4),Ik=Nr(5),Pk=Nr(6);tg.range;Xa.range;Ok.range;Rk.range;Si.range;Ik.range;Pk.range;const oc=Ot(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());oc.range;const Nk=Ot(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Nk.range;const tr=Ot(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());tr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});tr.range;const $r=Ot(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());$r.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});$r.range;function zk(e,t,r,i,n,a){const o=[[ei,1,je],[ei,5,5*je],[ei,15,15*je],[ei,30,30*je],[a,1,me],[a,5,5*me],[a,15,15*me],[a,30,30*me],[n,1,Ge],[n,3,3*Ge],[n,6,6*Ge],[n,12,12*Ge],[i,1,Je],[i,2,2*Je],[r,1,ic],[t,1,Vh],[t,3,3*Vh],[e,1,go]];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=Xl(([,,y])=>y).right(o,f);if(d===o.length)return e.every(el(l/go,h/go,u));if(d===0)return Ga.every(Math.max(el(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[Wk,qk]=zk(tr,oc,Ls,$n,ac,nc);function mo(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function yo(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ji(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Hk(e){var t=e.dateTime,r=e.date,i=e.time,n=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Gi(n),h=Vi(n),u=Gi(a),f=Vi(a),d=Gi(o),p=Vi(o),m=Gi(s),y=Vi(s),x=Gi(c),b=Vi(c),C={a:$,A:E,b:q,B:Y,c:null,d:tu,e:tu,f:fv,g:wv,G:vv,H:cv,I:hv,j:uv,L:eg,m:dv,M:pv,p:U,q:pt,Q:iu,s:nu,S:gv,u:mv,U:yv,V:xv,w:bv,W:_v,x:null,X:null,y:Cv,Y:kv,Z:Sv,"%":ru},k={a:ht,A:kt,b:nt,B:lt,c:null,d:eu,e:eu,f:Lv,g:Nv,G:Wv,H:Tv,I:Mv,j:Av,L:ig,m:Bv,M:Ev,p:ut,q:Ct,Q:iu,s:nu,S:Fv,u:$v,U:Dv,V:Ov,w:Rv,W:Iv,x:null,X:null,y:Pv,Y:zv,Z:qv,"%":ru},w={a:O,A:T,b:R,B:L,c:M,d:Qh,e:Qh,f:av,g:Kh,G:Zh,H:Jh,I:Jh,j:ev,L:nv,m:tv,M:rv,p:N,q:Jk,Q:ov,s:lv,S:iv,u:Vk,U:Xk,V:Zk,w:Gk,W:Kk,x:F,X:B,y:Kh,Y:Zh,Z:Qk,"%":sv};C.x=_(r,C),C.X=_(i,C),C.c=_(t,C),k.x=_(r,k),k.X=_(i,k),k.c=_(t,k);function _(z,j){return function(et){var P=[],Tt=-1,ft=0,Pt=z.length,Nt,ae,pr;for(et instanceof Date||(et=new Date(+et));++Tt<Pt;)z.charCodeAt(Tt)===37&&(P.push(z.slice(ft,Tt)),(ae=Xh[Nt=z.charAt(++Tt)])!=null?Nt=z.charAt(++Tt):ae=Nt==="e"?" ":"0",(pr=j[Nt])&&(Nt=pr(et,ae)),P.push(Nt),ft=Tt+1);return P.push(z.slice(ft,Tt)),P.join("")}}function v(z,j){return function(et){var P=ji(1900,void 0,1),Tt=D(P,z,et+="",0),ft,Pt;if(Tt!=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(j&&!("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=yo(ji(P.y,0,1)),Pt=ft.getUTCDay(),ft=Pt>4||Pt===0?Xa.ceil(ft):Xa(ft),ft=sc.offset(ft,(P.V-1)*7),P.y=ft.getUTCFullYear(),P.m=ft.getUTCMonth(),P.d=ft.getUTCDate()+(P.w+6)%7):(ft=mo(ji(P.y,0,1)),Pt=ft.getDay(),ft=Pt>4||Pt===0?Va.ceil(ft):Va(ft),ft=$n.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),Pt="Z"in P?yo(ji(P.y,0,1)).getUTCDay():mo(ji(P.y,0,1)).getDay(),P.m=0,P.d="W"in P?(P.w+6)%7+P.W*7-(Pt+5)%7:P.w+P.U*7-(Pt+6)%7);return"Z"in P?(P.H+=P.Z/100|0,P.M+=P.Z%100,yo(P)):mo(P)}}function D(z,j,et,P){for(var Tt=0,ft=j.length,Pt=et.length,Nt,ae;Tt<ft;){if(P>=Pt)return-1;if(Nt=j.charCodeAt(Tt++),Nt===37){if(Nt=j.charAt(Tt++),ae=w[Nt in Xh?j.charAt(Tt++):Nt],!ae||(P=ae(z,et,P))<0)return-1}else if(Nt!=et.charCodeAt(P++))return-1}return P}function N(z,j,et){var P=l.exec(j.slice(et));return P?(z.p=h.get(P[0].toLowerCase()),et+P[0].length):-1}function O(z,j,et){var P=d.exec(j.slice(et));return P?(z.w=p.get(P[0].toLowerCase()),et+P[0].length):-1}function T(z,j,et){var P=u.exec(j.slice(et));return P?(z.w=f.get(P[0].toLowerCase()),et+P[0].length):-1}function R(z,j,et){var P=x.exec(j.slice(et));return P?(z.m=b.get(P[0].toLowerCase()),et+P[0].length):-1}function L(z,j,et){var P=m.exec(j.slice(et));return P?(z.m=y.get(P[0].toLowerCase()),et+P[0].length):-1}function M(z,j,et){return D(z,t,j,et)}function F(z,j,et){return D(z,r,j,et)}function B(z,j,et){return D(z,i,j,et)}function $(z){return o[z.getDay()]}function E(z){return a[z.getDay()]}function q(z){return c[z.getMonth()]}function Y(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 kt(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 j=_(z+="",C);return j.toString=function(){return z},j},parse:function(z){var j=v(z+="",!1);return j.toString=function(){return z},j},utcFormat:function(z){var j=_(z+="",k);return j.toString=function(){return z},j},utcParse:function(z){var j=v(z+="",!0);return j.toString=function(){return z},j}}}var Xh={"-":"",_:" ",0:"0"},It=/^\s*\d+/,Uk=/^%/,Yk=/[\\^$*+?|[\]().{}]/g;function yt(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",a=n.length;return i+(a<r?new Array(r-a+1).join(t)+n:n)}function jk(e){return e.replace(Yk,"\\$&")}function Gi(e){return new RegExp("^(?:"+e.map(jk).join("|")+")","i")}function Vi(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Gk(e,t,r){var i=It.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function Vk(e,t,r){var i=It.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function Xk(e,t,r){var i=It.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function Zk(e,t,r){var i=It.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function Kk(e,t,r){var i=It.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function Zh(e,t,r){var i=It.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function Kh(e,t,r){var i=It.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function Qk(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function Jk(e,t,r){var i=It.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function tv(e,t,r){var i=It.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function Qh(e,t,r){var i=It.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function ev(e,t,r){var i=It.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function Jh(e,t,r){var i=It.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function rv(e,t,r){var i=It.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function iv(e,t,r){var i=It.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function nv(e,t,r){var i=It.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function av(e,t,r){var i=It.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function sv(e,t,r){var i=Uk.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function ov(e,t,r){var i=It.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function lv(e,t,r){var i=It.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function tu(e,t){return yt(e.getDate(),t,2)}function cv(e,t){return yt(e.getHours(),t,2)}function hv(e,t){return yt(e.getHours()%12||12,t,2)}function uv(e,t){return yt(1+$n.count(tr(e),e),t,3)}function eg(e,t){return yt(e.getMilliseconds(),t,3)}function fv(e,t){return eg(e,t)+"000"}function dv(e,t){return yt(e.getMonth()+1,t,2)}function pv(e,t){return yt(e.getMinutes(),t,2)}function gv(e,t){return yt(e.getSeconds(),t,2)}function mv(e){var t=e.getDay();return t===0?7:t}function yv(e,t){return yt(Ls.count(tr(e)-1,e),t,2)}function rg(e){var t=e.getDay();return t>=4||t===0?vi(e):vi.ceil(e)}function xv(e,t){return e=rg(e),yt(vi.count(tr(e),e)+(tr(e).getDay()===4),t,2)}function bv(e){return e.getDay()}function _v(e,t){return yt(Va.count(tr(e)-1,e),t,2)}function Cv(e,t){return yt(e.getFullYear()%100,t,2)}function wv(e,t){return e=rg(e),yt(e.getFullYear()%100,t,2)}function kv(e,t){return yt(e.getFullYear()%1e4,t,4)}function vv(e,t){var r=e.getDay();return e=r>=4||r===0?vi(e):vi.ceil(e),yt(e.getFullYear()%1e4,t,4)}function Sv(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yt(t/60|0,"0",2)+yt(t%60,"0",2)}function eu(e,t){return yt(e.getUTCDate(),t,2)}function Tv(e,t){return yt(e.getUTCHours(),t,2)}function Mv(e,t){return yt(e.getUTCHours()%12||12,t,2)}function Av(e,t){return yt(1+sc.count($r(e),e),t,3)}function ig(e,t){return yt(e.getUTCMilliseconds(),t,3)}function Lv(e,t){return ig(e,t)+"000"}function Bv(e,t){return yt(e.getUTCMonth()+1,t,2)}function Ev(e,t){return yt(e.getUTCMinutes(),t,2)}function Fv(e,t){return yt(e.getUTCSeconds(),t,2)}function $v(e){var t=e.getUTCDay();return t===0?7:t}function Dv(e,t){return yt(tg.count($r(e)-1,e),t,2)}function ng(e){var t=e.getUTCDay();return t>=4||t===0?Si(e):Si.ceil(e)}function Ov(e,t){return e=ng(e),yt(Si.count($r(e),e)+($r(e).getUTCDay()===4),t,2)}function Rv(e){return e.getUTCDay()}function Iv(e,t){return yt(Xa.count($r(e)-1,e),t,2)}function Pv(e,t){return yt(e.getUTCFullYear()%100,t,2)}function Nv(e,t){return e=ng(e),yt(e.getUTCFullYear()%100,t,2)}function zv(e,t){return yt(e.getUTCFullYear()%1e4,t,4)}function Wv(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Si(e):Si.ceil(e),yt(e.getUTCFullYear()%1e4,t,4)}function qv(){return"+0000"}function ru(){return"%"}function iu(e){return+e}function nu(e){return Math.floor(+e/1e3)}var Xr,ag;Hv({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 Hv(e){return Xr=Hk(e),ag=Xr.format,Xr.parse,Xr.utcFormat,Xr.utcParse,Xr}function Uv(e){return new Date(e)}function Yv(e){return e instanceof Date?+e:+new Date(+e)}function sg(e,t,r,i,n,a,o,s,c,l){var h=Jp(),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"),k=l("%Y");function w(_){return(c(_)<_?d:s(_)<_?p:o(_)<_?m:a(_)<_?y:i(_)<_?n(_)<_?x:b:r(_)<_?C:k)(_)}return h.invert=function(_){return new Date(u(_))},h.domain=function(_){return arguments.length?f(Array.from(_,Yv)):f().map(Uv)},h.ticks=function(_){var v=f();return e(v[0],v[v.length-1],_??10)},h.tickFormat=function(_,v){return v==null?w:l(v)},h.nice=function(_){var v=f();return(!_||typeof _.range!="function")&&(_=t(v[0],v[v.length-1],_??10)),_?f(Mk(v,_)):h},h.copy=function(){return Qp(h,sg(e,t,r,i,n,a,o,s,c,l))},h}function e3(){return As.apply(sg(Wk,qk,tr,oc,Ls,$n,ac,nc,ei,ag).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function jv(e){for(var t=e.length/6|0,r=new Array(t),i=0;i<t;)r[i]="#"+e.slice(i*6,++i*6);return r}const r3=jv("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Lt(e){return function(){return e}}const au=Math.abs,Yt=Math.atan2,mr=Math.cos,Gv=Math.max,xo=Math.min,Le=Math.sin,ri=Math.sqrt,Gt=1e-12,kn=Math.PI,Za=kn/2,ya=2*kn;function Vv(e){return e>1?0:e<-1?kn:Math.acos(e)}function su(e){return e>=1?Za:e<=-1?-Za:Math.asin(e)}function og(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Fw(t)}function Xv(e){return e.innerRadius}function Zv(e){return e.outerRadius}function Kv(e){return e.startAngle}function Qv(e){return e.endAngle}function Jv(e){return e&&e.padAngle}function tS(e,t,r,i,n,a,o,s){var c=r-e,l=i-t,h=o-n,u=s-a,f=u*c-h*l;if(!(f*f<Gt))return f=(h*(t-a)-u*(e-n))/f,[e+f*c,t+f*l]}function Jn(e,t,r,i,n,a,o){var s=e-r,c=t-i,l=(o?a:-a)/ri(s*s+c*c),h=l*c,u=-l*s,f=e+h,d=t+u,p=r+h,m=i+u,y=(f+p)/2,x=(d+m)/2,b=p-f,C=m-d,k=b*b+C*C,w=n-a,_=f*m-p*d,v=(C<0?-1:1)*ri(Gv(0,w*w*k-_*_)),D=(_*C-b*v)/k,N=(-_*b-C*v)/k,O=(_*C+b*v)/k,T=(-_*b+C*v)/k,R=D-y,L=N-x,M=O-y,F=T-x;return R*R+L*L>M*M+F*F&&(D=O,N=T),{cx:D,cy:N,x01:-h,y01:-u,x11:D*(n/w-1),y11:N*(n/w-1)}}function i3(){var e=Xv,t=Zv,r=Lt(0),i=null,n=Kv,a=Qv,o=Jv,s=null,c=og(l);function l(){var h,u,f=+e.apply(this,arguments),d=+t.apply(this,arguments),p=n.apply(this,arguments)-Za,m=a.apply(this,arguments)-Za,y=au(m-p),x=m>p;if(s||(s=h=c()),d<f&&(u=d,d=f,f=u),!(d>Gt))s.moveTo(0,0);else if(y>ya-Gt)s.moveTo(d*mr(p),d*Le(p)),s.arc(0,0,d,p,m,!x),f>Gt&&(s.moveTo(f*mr(m),f*Le(m)),s.arc(0,0,f,m,p,x));else{var b=p,C=m,k=p,w=m,_=y,v=y,D=o.apply(this,arguments)/2,N=D>Gt&&(i?+i.apply(this,arguments):ri(f*f+d*d)),O=xo(au(d-f)/2,+r.apply(this,arguments)),T=O,R=O,L,M;if(N>Gt){var F=su(N/f*Le(D)),B=su(N/d*Le(D));(_-=F*2)>Gt?(F*=x?1:-1,k+=F,w-=F):(_=0,k=w=(p+m)/2),(v-=B*2)>Gt?(B*=x?1:-1,b+=B,C-=B):(v=0,b=C=(p+m)/2)}var $=d*mr(b),E=d*Le(b),q=f*mr(w),Y=f*Le(w);if(O>Gt){var U=d*mr(C),pt=d*Le(C),ht=f*mr(k),kt=f*Le(k),nt;if(y<kn)if(nt=tS($,E,ht,kt,U,pt,q,Y)){var lt=$-nt[0],ut=E-nt[1],Ct=U-nt[0],z=pt-nt[1],j=1/Le(Vv((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=xo(O,(f-et)/(j-1)),R=xo(O,(d-et)/(j+1))}else T=R=0}v>Gt?R>Gt?(L=Jn(ht,kt,$,E,d,R,x),M=Jn(U,pt,q,Y,d,R,x),s.moveTo(L.cx+L.x01,L.cy+L.y01),R<O?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>Gt)||!(_>Gt)?s.lineTo(q,Y):T>Gt?(L=Jn(q,Y,U,pt,f,-T,x),M=Jn($,E,ht,kt,f,-T,x),s.lineTo(L.cx+L.x01,L.cy+L.y01),T<O?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,k,x)}if(s.closePath(),h)return s=null,h+""||null}return l.centroid=function(){var h=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+n.apply(this,arguments)+ +a.apply(this,arguments))/2-kn/2;return[mr(u)*h,Le(u)*h]},l.innerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:Lt(+h),l):e},l.outerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:Lt(+h),l):t},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 lg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function cg(e){this._context=e}cg.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ka(e){return new cg(e)}function eS(e){return e[0]}function rS(e){return e[1]}function iS(e,t){var r=Lt(!0),i=null,n=Ka,a=null,o=og(s);e=typeof e=="function"?e:e===void 0?eS:Lt(e),t=typeof t=="function"?t:t===void 0?rS:Lt(t);function s(c){var l,h=(c=lg(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(+e(u,l,c),+t(u,l,c));if(d)return a=null,d+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:Lt(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),s):t},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 nS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function aS(e){return e}function n3(){var e=aS,t=nS,r=null,i=Lt(0),n=Lt(ya),a=Lt(0);function o(s){var c,l=(s=lg(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),k;for(c=0;c<l;++c)(k=p[d[c]=c]=+e(s[c],c,s))>0&&(f+=k);for(t!=null?d.sort(function(w,_){return t(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],k=p[h],x=m+(k>0?k*u:0)+C,p[h]={data:s[h],index:c,value:k,startAngle:m,endAngle:x,padAngle:b};return p}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,r=null,o):t},o.sort=function(s){return arguments.length?(r=s,t=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 hg{constructor(t,r){this._context=t,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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function ug(e){return new hg(e,!0)}function fg(e){return new hg(e,!1)}function cr(){}function Qa(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Bs(e){this._context=e}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xa(e){return new Bs(e)}function dg(e){this._context=e}dg.prototype={areaStart:cr,areaEnd:cr,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Qa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sS(e){return new dg(e)}function pg(e){this._context=e}pg.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(e,t){switch(e=+e,t=+t,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+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Qa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oS(e){return new pg(e)}function gg(e,t){this._basis=new Bs(e),this._beta=t}gg.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,o=t[r]-n,s=-1,c;++s<=r;)c=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+c*a),this._beta*t[s]+(1-this._beta)*(n+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const lS=function e(t){function r(i){return t===1?new Bs(i):new gg(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function Ja(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function lc(e,t){this._context=e,this._k=(1-t)/6}lc.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ja(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const mg=function e(t){function r(i){return new lc(i,t)}return r.tension=function(i){return e(+i)},r}(0);function cc(e,t){this._context=e,this._k=(1-t)/6}cc.prototype={areaStart:cr,areaEnd:cr,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ja(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cS=function e(t){function r(i){return new cc(i,t)}return r.tension=function(i){return e(+i)},r}(0);function hc(e,t){this._context=e,this._k=(1-t)/6}hc.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(e,t){switch(e=+e,t=+t,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,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hS=function e(t){function r(i){return new hc(i,t)}return r.tension=function(i){return e(+i)},r}(0);function uc(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Gt){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>Gt){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*l+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function yg(e,t){this._context=e,this._alpha=t}yg.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:uc(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xg=function e(t){function r(i){return t?new yg(i,t):new lc(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function bg(e,t){this._context=e,this._alpha=t}bg.prototype={areaStart:cr,areaEnd:cr,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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:uc(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const uS=function e(t){function r(i){return t?new bg(i,t):new cc(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function _g(e,t){this._context=e,this._alpha=t}_g.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;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:uc(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const fS=function e(t){function r(i){return t?new _g(i,t):new hc(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Cg(e){this._context=e}Cg.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function dS(e){return new Cg(e)}function ou(e){return e<0?-1:1}function lu(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(ou(a)+ou(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function cu(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function bo(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function ts(e){this._context=e}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:bo(this,this._t0,cu(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,bo(this,cu(this,r=lu(this,e,t)),r);break;default:bo(this,this._t0,r=lu(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function wg(e){this._context=new kg(e)}(wg.prototype=Object.create(ts.prototype)).point=function(e,t){ts.prototype.point.call(this,t,e)};function kg(e){this._context=e}kg.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function vg(e){return new ts(e)}function Sg(e){return new wg(e)}function Tg(e){this._context=e}Tg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=hu(e),n=hu(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function hu(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),o=new Array(r);for(n[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(n[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function Mg(e){return new Tg(e)}function Es(e,t){this._context=e,this._t=t}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Ag(e){return new Es(e,.5)}function Lg(e){return new Es(e,0)}function Bg(e){return new Es(e,1)}function sn(e,t,r){this.k=e,this.x=t,this.y=r}sn.prototype={constructor:sn,scale:function(e){return e===1?this:new sn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new sn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};sn.prototype;var Eg=typeof global=="object"&&global&&global.Object===Object&&global,pS=typeof self=="object"&&self&&self.Object===Object&&self,Pe=Eg||pS||Function("return this")(),es=Pe.Symbol,Fg=Object.prototype,gS=Fg.hasOwnProperty,mS=Fg.toString,Xi=es?es.toStringTag:void 0;function yS(e){var t=gS.call(e,Xi),r=e[Xi];try{e[Xi]=void 0;var i=!0}catch{}var n=mS.call(e);return i&&(t?e[Xi]=r:delete e[Xi]),n}var xS=Object.prototype,bS=xS.toString;function _S(e){return bS.call(e)}var CS="[object Null]",wS="[object Undefined]",uu=es?es.toStringTag:void 0;function Bi(e){return e==null?e===void 0?wS:CS:uu&&uu in Object(e)?yS(e):_S(e)}function zr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var kS="[object AsyncFunction]",vS="[object Function]",SS="[object GeneratorFunction]",TS="[object Proxy]";function fc(e){if(!zr(e))return!1;var t=Bi(e);return t==vS||t==SS||t==kS||t==TS}var _o=Pe["__core-js_shared__"],fu=function(){var e=/[^.]+$/.exec(_o&&_o.keys&&_o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function MS(e){return!!fu&&fu in e}var AS=Function.prototype,LS=AS.toString;function Wr(e){if(e!=null){try{return LS.call(e)}catch{}try{return e+""}catch{}}return""}var BS=/[\\^$.*+?()[\]{}|]/g,ES=/^\[object .+?Constructor\]$/,FS=Function.prototype,$S=Object.prototype,DS=FS.toString,OS=$S.hasOwnProperty,RS=RegExp("^"+DS.call(OS).replace(BS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function IS(e){if(!zr(e)||MS(e))return!1;var t=fc(e)?RS:ES;return t.test(Wr(e))}function PS(e,t){return e==null?void 0:e[t]}function qr(e,t){var r=PS(e,t);return IS(r)?r:void 0}var vn=qr(Object,"create");function NS(){this.__data__=vn?vn(null):{},this.size=0}function zS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var WS="__lodash_hash_undefined__",qS=Object.prototype,HS=qS.hasOwnProperty;function US(e){var t=this.__data__;if(vn){var r=t[e];return r===WS?void 0:r}return HS.call(t,e)?t[e]:void 0}var YS=Object.prototype,jS=YS.hasOwnProperty;function GS(e){var t=this.__data__;return vn?t[e]!==void 0:jS.call(t,e)}var VS="__lodash_hash_undefined__";function XS(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=vn&&t===void 0?VS:t,this}function Dr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Dr.prototype.clear=NS;Dr.prototype.delete=zS;Dr.prototype.get=US;Dr.prototype.has=GS;Dr.prototype.set=XS;function ZS(){this.__data__=[],this.size=0}function Fs(e,t){return e===t||e!==e&&t!==t}function $s(e,t){for(var r=e.length;r--;)if(Fs(e[r][0],t))return r;return-1}var KS=Array.prototype,QS=KS.splice;function JS(e){var t=this.__data__,r=$s(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():QS.call(t,r,1),--this.size,!0}function tT(e){var t=this.__data__,r=$s(t,e);return r<0?void 0:t[r][1]}function eT(e){return $s(this.__data__,e)>-1}function rT(e,t){var r=this.__data__,i=$s(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function rr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}rr.prototype.clear=ZS;rr.prototype.delete=JS;rr.prototype.get=tT;rr.prototype.has=eT;rr.prototype.set=rT;var Sn=qr(Pe,"Map");function iT(){this.size=0,this.__data__={hash:new Dr,map:new(Sn||rr),string:new Dr}}function nT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ds(e,t){var r=e.__data__;return nT(t)?r[typeof t=="string"?"string":"hash"]:r.map}function aT(e){var t=Ds(this,e).delete(e);return this.size-=t?1:0,t}function sT(e){return Ds(this,e).get(e)}function oT(e){return Ds(this,e).has(e)}function lT(e,t){var r=Ds(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function fr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}fr.prototype.clear=iT;fr.prototype.delete=aT;fr.prototype.get=sT;fr.prototype.has=oT;fr.prototype.set=lT;var cT="Expected a function";function Dn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(cT);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=e.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(Dn.Cache||fr),r}Dn.Cache=fr;function hT(){this.__data__=new rr,this.size=0}function uT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function fT(e){return this.__data__.get(e)}function dT(e){return this.__data__.has(e)}var pT=200;function gT(e,t){var r=this.__data__;if(r instanceof rr){var i=r.__data__;if(!Sn||i.length<pT-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new fr(i)}return r.set(e,t),this.size=r.size,this}function Ei(e){var t=this.__data__=new rr(e);this.size=t.size}Ei.prototype.clear=hT;Ei.prototype.delete=uT;Ei.prototype.get=fT;Ei.prototype.has=dT;Ei.prototype.set=gT;var rs=function(){try{var e=qr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function dc(e,t,r){t=="__proto__"&&rs?rs(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function pl(e,t,r){(r!==void 0&&!Fs(e[t],r)||r===void 0&&!(t in e))&&dc(e,t,r)}function mT(e){return function(t,r,i){for(var n=-1,a=Object(t),o=i(t),s=o.length;s--;){var c=o[++n];if(r(a[c],c,a)===!1)break}return t}}var yT=mT(),$g=typeof exports=="object"&&exports&&!exports.nodeType&&exports,du=$g&&typeof module=="object"&&module&&!module.nodeType&&module,xT=du&&du.exports===$g,pu=xT?Pe.Buffer:void 0,gu=pu?pu.allocUnsafe:void 0;function bT(e,t){if(t)return e.slice();var r=e.length,i=gu?gu(r):new e.constructor(r);return e.copy(i),i}var mu=Pe.Uint8Array;function _T(e){var t=new e.constructor(e.byteLength);return new mu(t).set(new mu(e)),t}function CT(e,t){var r=t?_T(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function wT(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var yu=Object.create,kT=function(){function e(){}return function(t){if(!zr(t))return{};if(yu)return yu(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Dg(e,t){return function(r){return e(t(r))}}var Og=Dg(Object.getPrototypeOf,Object),vT=Object.prototype;function Os(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||vT;return e===r}function ST(e){return typeof e.constructor=="function"&&!Os(e)?kT(Og(e)):{}}function On(e){return e!=null&&typeof e=="object"}var TT="[object Arguments]";function xu(e){return On(e)&&Bi(e)==TT}var Rg=Object.prototype,MT=Rg.hasOwnProperty,AT=Rg.propertyIsEnumerable,is=xu(function(){return arguments}())?xu:function(e){return On(e)&&MT.call(e,"callee")&&!AT.call(e,"callee")},ns=Array.isArray,LT=9007199254740991;function Ig(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=LT}function Rs(e){return e!=null&&Ig(e.length)&&!fc(e)}function BT(e){return On(e)&&Rs(e)}function ET(){return!1}var Pg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bu=Pg&&typeof module=="object"&&module&&!module.nodeType&&module,FT=bu&&bu.exports===Pg,_u=FT?Pe.Buffer:void 0,$T=_u?_u.isBuffer:void 0,pc=$T||ET,DT="[object Object]",OT=Function.prototype,RT=Object.prototype,Ng=OT.toString,IT=RT.hasOwnProperty,PT=Ng.call(Object);function NT(e){if(!On(e)||Bi(e)!=DT)return!1;var t=Og(e);if(t===null)return!0;var r=IT.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ng.call(r)==PT}var zT="[object Arguments]",WT="[object Array]",qT="[object Boolean]",HT="[object Date]",UT="[object Error]",YT="[object Function]",jT="[object Map]",GT="[object Number]",VT="[object Object]",XT="[object RegExp]",ZT="[object Set]",KT="[object String]",QT="[object WeakMap]",JT="[object ArrayBuffer]",tM="[object DataView]",eM="[object Float32Array]",rM="[object Float64Array]",iM="[object Int8Array]",nM="[object Int16Array]",aM="[object Int32Array]",sM="[object Uint8Array]",oM="[object Uint8ClampedArray]",lM="[object Uint16Array]",cM="[object Uint32Array]",St={};St[eM]=St[rM]=St[iM]=St[nM]=St[aM]=St[sM]=St[oM]=St[lM]=St[cM]=!0;St[zT]=St[WT]=St[JT]=St[qT]=St[tM]=St[HT]=St[UT]=St[YT]=St[jT]=St[GT]=St[VT]=St[XT]=St[ZT]=St[KT]=St[QT]=!1;function hM(e){return On(e)&&Ig(e.length)&&!!St[Bi(e)]}function uM(e){return function(t){return e(t)}}var zg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pn=zg&&typeof module=="object"&&module&&!module.nodeType&&module,fM=pn&&pn.exports===zg,Co=fM&&Eg.process,Cu=function(){try{var e=pn&&pn.require&&pn.require("util").types;return e||Co&&Co.binding&&Co.binding("util")}catch{}}(),wu=Cu&&Cu.isTypedArray,gc=wu?uM(wu):hM;function gl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var dM=Object.prototype,pM=dM.hasOwnProperty;function gM(e,t,r){var i=e[t];(!(pM.call(e,t)&&Fs(i,r))||r===void 0&&!(t in e))&&dc(e,t,r)}function mM(e,t,r,i){var n=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=void 0;c===void 0&&(c=e[s]),n?dc(r,s,c):gM(r,s,c)}return r}function yM(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var xM=9007199254740991,bM=/^(?:0|[1-9]\d*)$/;function Wg(e,t){var r=typeof e;return t=t??xM,!!t&&(r=="number"||r!="symbol"&&bM.test(e))&&e>-1&&e%1==0&&e<t}var _M=Object.prototype,CM=_M.hasOwnProperty;function wM(e,t){var r=ns(e),i=!r&&is(e),n=!r&&!i&&pc(e),a=!r&&!i&&!n&&gc(e),o=r||i||n||a,s=o?yM(e.length,String):[],c=s.length;for(var l in e)(t||CM.call(e,l))&&!(o&&(l=="length"||n&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Wg(l,c)))&&s.push(l);return s}function kM(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var vM=Object.prototype,SM=vM.hasOwnProperty;function TM(e){if(!zr(e))return kM(e);var t=Os(e),r=[];for(var i in e)i=="constructor"&&(t||!SM.call(e,i))||r.push(i);return r}function qg(e){return Rs(e)?wM(e,!0):TM(e)}function MM(e){return mM(e,qg(e))}function AM(e,t,r,i,n,a,o){var s=gl(e,r),c=gl(t,r),l=o.get(c);if(l){pl(e,r,l);return}var h=a?a(s,c,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=ns(c),d=!f&&pc(c),p=!f&&!d&&gc(c);h=c,f||d||p?ns(s)?h=s:BT(s)?h=wT(s):d?(u=!1,h=bT(c,!0)):p?(u=!1,h=CT(c,!0)):h=[]:NT(c)||is(c)?(h=s,is(s)?h=MM(s):(!zr(s)||fc(s))&&(h=ST(c))):u=!1}u&&(o.set(c,h),n(h,c,i,a,o),o.delete(c)),pl(e,r,h)}function Hg(e,t,r,i,n){e!==t&&yT(t,function(a,o){if(n||(n=new Ei),zr(a))AM(e,t,o,r,Hg,i,n);else{var s=i?i(gl(e,o),a,o+"",e,t,n):void 0;s===void 0&&(s=a),pl(e,o,s)}},qg)}function Ug(e){return e}function LM(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var ku=Math.max;function BM(e,t,r){return t=ku(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=ku(i.length-t,0),o=Array(a);++n<a;)o[n]=i[t+n];n=-1;for(var s=Array(t+1);++n<t;)s[n]=i[n];return s[t]=r(o),LM(e,this,s)}}function EM(e){return function(){return e}}var FM=rs?function(e,t){return rs(e,"toString",{configurable:!0,enumerable:!1,value:EM(t),writable:!0})}:Ug,$M=800,DM=16,OM=Date.now;function RM(e){var t=0,r=0;return function(){var i=OM(),n=DM-(i-r);if(r=i,n>0){if(++t>=$M)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var IM=RM(FM);function PM(e,t){return IM(BM(e,t,Ug),e+"")}function NM(e,t,r){if(!zr(r))return!1;var i=typeof t;return(i=="number"?Rs(r)&&Wg(t,r.length):i=="string"&&t in r)?Fs(r[t],e):!1}function zM(e){return PM(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,o&&NM(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var s=r[i];s&&e(t,s,i,a)}return t})}var WM=zM(function(e,t,r){Hg(e,t,r)}),qM="",HM={curveBasis:xa,curveBasisClosed:sS,curveBasisOpen:oS,curveBumpX:ug,curveBumpY:fg,curveBundle:lS,curveCardinalClosed:cS,curveCardinalOpen:hS,curveCardinal:mg,curveCatmullRomClosed:uS,curveCatmullRomOpen:fS,curveCatmullRom:xg,curveLinear:Ka,curveLinearClosed:dS,curveMonotoneX:vg,curveMonotoneY:Sg,curveNatural:Mg,curveStep:Ag,curveStepAfter:Bg,curveStepBefore:Lg},UM=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,YM=g(function(e,t){const r=Yg(e,/(?: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=Ol(e,t);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(e,t=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${UM.source})(?=[}][%]{2}).*
|
||
`,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),I.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=un.exec(e))!==null;)if(a.index===un.lastIndex&&un.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){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:e,args:null}:o.length===1?o[0]:o}catch(n){return I.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),jM=g(function(e){return e.replace(un,"")},"removeDirectives"),GM=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function mc(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return HM[r]??t}g(mc,"interpolateToCurve");function jg(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?N1.sanitizeUrl(r):r}g(jg,"formatUrl");var VM=g((e,...t)=>{const r=e.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: ${e} not found in window`);return}a[n](...t)},"runFunc");function yc(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(yc,"distance");function Gg(e){let t,r=0;e.forEach(n=>{r+=yc(n,t),t=n});const i=r/2;return xc(e,i)}g(Gg,"traverseEdge");function Vg(e){return e.length===1?e[0]:Gg(e)}g(Vg,"calcLabelPosition");var vu=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),xc=g((e,t)=>{let r,i=t;for(const n of e){if(r){const a=yc(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:vu((1-o)*r.x+o*n.x,5),y:vu((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),XM=g((e,t,r)=>{I.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=xc(t,25),a=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+n.x)/2,s.y=-Math.cos(o)*a+(t[0].y+n.y)/2,s},"calcCardinalityPosition");function Xg(e,t,r){const i=structuredClone(r);I.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=xc(i,n),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return t==="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):t==="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):t==="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(Xg,"calcTerminalLabelPosition");function Zg(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}g(Zg,"getStylesFromArray");var Su=0,ZM=g(()=>(Su++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Su),"generateId");function Kg(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(Kg,"makeRandomHex");var KM=g(e=>Kg(e.length),"random"),QM=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"),JM=g(function(e,t){const r=t.text.replace(Ai.lineBreakRegex," "),[,i]=Is(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),tA=Dn((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ai.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const c=er(`${o} `,r),l=er(a,r);if(c>t){const{hyphenatedStrings:f,remainingWord:d}=eA(o,t,"-",r);n.push(a,...f),a=d}else l+c>=t?(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)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),eA=Dn((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let o="";return n.forEach((s,c)=>{const l=`${o}${s}`;if(er(l,i)>=t){const u=c+1,f=n.length===u,d=`${l}${r}`;a.push(f?l:d),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Qg(e,t){return bc(e,t).height}g(Qg,"calculateTextHeight");function er(e,t){return bc(e,t).width}g(er,"calculateTextWidth");var bc=Dn((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=Is(r),o=["sans-serif",i],s=e.split(Ai.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=QM();y.text=m||qM;const x=JM(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]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),pi,rA=(pi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(pi,"InitIDGenerator"),pi),ta,iA=g(function(e){return ta=ta||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ta.innerHTML=e,unescape(ta.textContent)},"entityDecode");function _c(e){return"str"in e}g(_c,"isDetailedError");var nA=g((e,t,r,i)=>{var a;if(!i)return;const n=(a=e.node())==null?void 0:a.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Is=g(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Cc(e,t){return WM({},e,t)}g(Cc,"cleanAndMerge");var $e={assignWithDepth:Ht,wrapLabel:tA,calculateTextHeight:Qg,calculateTextWidth:er,calculateTextDimensions:bc,cleanAndMerge:Cc,detectInit:YM,detectDirective:Yg,isSubstringInArray:GM,interpolateToCurve:mc,calcLabelPosition:Vg,calcCardinalityPosition:XM,calcTerminalLabelPosition:Xg,formatUrl:jg,getStylesFromArray:Zg,generateId:ZM,random:KM,runFunc:VM,entityDecode:iA,insertTitle:nA,parseFontSize:Is,InitIDGenerator:rA},aA=g(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Hr=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),a3=g((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function re(e){return e??null}g(re,"handleUndefinedAttr");const sA=Object.freeze({left:0,top:0,width:16,height:16}),as=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Jg=Object.freeze({...sA,...as}),oA=Object.freeze({...Jg,body:"",hidden:!1}),lA=Object.freeze({width:null,height:null}),cA=Object.freeze({...lA,...as}),hA=(e,t,r,i="")=>{const n=e.split(":");if(e.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 wo(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 wo(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return wo(s,r)?s:null}return null},wo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function uA(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Tu(e,t){const r=uA(e,t);for(const i in oA)i in as?i in e&&!(i in r)&&(r[i]=as[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function fA(e,t){const r=e.icons,i=e.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(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Mu(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=Tu(i[s]||n[s],a)}return o(t),r.forEach(o),Tu(e,a)}function dA(e,t){if(e.icons[t])return Mu(e,t,[]);const r=fA(e,[t])[t];return r?Mu(e,t,r):null}const pA=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gA=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Au(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(pA);if(i===null||!i.length)return e;const n=[];let a=i.shift(),o=gA.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function mA(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function yA(e,t){return e?"<defs>"+e+"</defs>"+t:t}function xA(e,t,r){const i=mA(e);return yA(i.defs,t+i.content+r)}const bA=e=>e==="unset"||e==="undefined"||e==="none";function _A(e,t){const r={...Jg,...e},i={...cA,...t},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 k;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:k=n.height/2+n.top,y.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:k=n.width/2+n.left,y.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}C%2===1&&(n.left!==n.top&&(k=n.left,n.left=n.top,n.top=k),n.width!==n.height&&(k=n.width,n.width=n.height,n.height=k)),y.length&&(a=xA(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=Au(u,c/l)):(h=o==="auto"?c:o,u=s===null?Au(h,l/c):s==="auto"?l:s);const f={},d=(m,y)=>{bA(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 CA=/\sid="(\S+)"/g,wA="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let kA=0;function vA(e,t=wA){const r=[];let i;for(;i=CA.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof t=="function"?t(a):t+(kA++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function SA(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function wc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ur=wc();function tm(e){Ur=e}var gn={exec:()=>null};function _t(e,t=""){let r=typeof e=="string"?e:e.source,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,t)};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:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},TA=/^(?:[ \t]*(?:\n|$))+/,MA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,AA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Rn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,LA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kc=/(?:[*+-]|\d{1,9}[.)])/,em=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,rm=_t(em).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(),BA=_t(em).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(),vc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,EA=/^[^\n]+/,Sc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,FA=_t(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$A=_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",Tc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,DA=_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",Tc).replace("tag",Ps).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),im=_t(vc).replace("hr",Rn).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(),OA=_t(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",im).getRegex(),Mc={blockquote:OA,code:MA,def:FA,fences:AA,heading:LA,hr:Rn,html:DA,lheading:rm,list:$A,newline:TA,paragraph:im,table:gn,text:EA},Lu=_t("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Rn).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(),RA={...Mc,lheading:BA,table:Lu,paragraph:_t(vc).replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lu).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()},IA={...Mc,html:_t(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Tc).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:gn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_t(vc).replace("hr",Rn).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",rm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},PA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,NA=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,nm=/^( {2,}|\\)\n(?!\s*$)/,zA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ns=/[\p{P}\p{S}]/u,Ac=/[\s\p{P}\p{S}]/u,am=/[^\s\p{P}\p{S}]/u,WA=_t(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ac).getRegex(),sm=/(?!~)[\p{P}\p{S}]/u,qA=/(?!~)[\s\p{P}\p{S}]/u,HA=/(?:[^\s\p{P}\p{S}]|~)/u,UA=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,om=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,YA=_t(om,"u").replace(/punct/g,Ns).getRegex(),jA=_t(om,"u").replace(/punct/g,sm).getRegex(),lm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",GA=_t(lm,"gu").replace(/notPunctSpace/g,am).replace(/punctSpace/g,Ac).replace(/punct/g,Ns).getRegex(),VA=_t(lm,"gu").replace(/notPunctSpace/g,HA).replace(/punctSpace/g,qA).replace(/punct/g,sm).getRegex(),XA=_t("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,am).replace(/punctSpace/g,Ac).replace(/punct/g,Ns).getRegex(),ZA=_t(/\\(punct)/,"gu").replace(/punct/g,Ns).getRegex(),KA=_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(),QA=_t(Tc).replace("(?:-->|$)","-->").getRegex(),JA=_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",QA).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ss=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,tL=_t(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ss).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),cm=_t(/^!?\[(label)\]\[(ref)\]/).replace("label",ss).replace("ref",Sc).getRegex(),hm=_t(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sc).getRegex(),eL=_t("reflink|nolink(?!\\()","g").replace("reflink",cm).replace("nolink",hm).getRegex(),Lc={_backpedal:gn,anyPunctuation:ZA,autolink:KA,blockSkip:UA,br:nm,code:NA,del:gn,emStrongLDelim:YA,emStrongRDelimAst:GA,emStrongRDelimUnd:XA,escape:PA,link:tL,nolink:hm,punctuation:WA,reflink:cm,reflinkSearch:eL,tag:JA,text:zA,url:gn},rL={...Lc,link:_t(/^!?\[(label)\]\((.*?)\)/).replace("label",ss).getRegex(),reflink:_t(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ss).getRegex()},ml={...Lc,emStrongRDelimAst:VA,emStrongLDelim:jA,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.!#$%&'*+\/=?_`{\|}~-]+@)))/},iL={...ml,br:_t(nm).replace("{2,}","*").getRegex(),text:_t(ml.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ea={normal:Mc,gfm:RA,pedantic:IA},Zi={normal:Lc,gfm:ml,breaks:iL,pedantic:rL},nL={"&":"&","<":"<",">":">",'"':""","'":"'"},Bu=e=>nL[e];function Be(e,t){if(t){if(ee.escapeTest.test(e))return e.replace(ee.escapeReplace,Bu)}else if(ee.escapeTestNoEncode.test(e))return e.replace(ee.escapeReplaceNoEncode,Bu);return e}function Eu(e){try{e=encodeURI(e).replace(ee.percentDecode,"%")}catch{return null}return e}function Fu(e,t){var a;let r=e.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),n=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(ee.slashPipe,"|");return i}function Ki(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function aL(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function $u(e,t,r,i,n){let a=t.href,o=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,c}function sL(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
|
||
`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[s]=o;return s.length>=n.length?a.slice(n.length):a}).join(`
|
||
`)}var os=class{constructor(t){vt(this,"options");vt(this,"rules");vt(this,"lexer");this.options=t||Ur}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ki(i,`
|
||
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=sL(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=Ki(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Ki(r[0],`
|
||
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ki(r[0],`
|
||
`).split(`
|
||
`),n="",a="",o=[];for(;i.length>0;){let s=!1,c=[],l;for(l=0;l<i.length;l++)if(this.rules.other.blockquoteStart.test(i[l]))c.push(i[l]),s=!0;else if(!s)c.push(i[l]);else break;i=i.slice(l);let h=c.join(`
|
||
`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
||
${h}`:h,a=a?`${a}
|
||
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let p=d,m=p.raw+`
|
||
`+i.join(`
|
||
`),y=this.blockquote(m);o[o.length-1]=y,n=n.substring(0,n.length-p.raw.length)+y.raw,a=a.substring(0,a.length-p.text.length)+y.text;break}else if((d==null?void 0:d.type)==="list"){let p=d,m=p.raw+`
|
||
`+i.join(`
|
||
`),y=this.list(m);o[o.length-1]=y,n=n.substring(0,n.length-d.raw.length)+y.raw,a=a.substring(0,a.length-p.raw.length)+y.raw,i=m.substring(o.at(-1).raw.length).split(`
|
||
`);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let o=this.rules.other.listItemRegex(i),s=!1;for(;t;){let l=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
|
||
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
|
||
`,1)[0],p=!f.trim(),m=0;if(this.options.pedantic?(m=2,u=f.trimStart()):p?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=f.slice(m),m+=r[1].length),p&&this.rules.other.blankLine.test(d)&&(h+=d+`
|
||
`,t=t.substring(d.length+1),l=!0),!l){let b=this.rules.other.nextBulletRegex(m),C=this.rules.other.hrRegex(m),k=this.rules.other.fencesBeginRegex(m),w=this.rules.other.headingBeginRegex(m),_=this.rules.other.htmlBeginRegex(m);for(;t;){let v=t.split(`
|
||
`,1)[0],D;if(d=v,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),D=d):D=d.replace(this.rules.other.tabCharGlobal," "),k.test(d)||w.test(d)||_.test(d)||b.test(d)||C.test(d))break;if(D.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=`
|
||
`+D.slice(m);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(f)||w.test(f)||C.test(f))break;u+=`
|
||
`+d}!p&&!d.trim()&&(p=!0),h+=v+`
|
||
`,t=t.substring(v.length+1),f=D.slice(m)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let l=0;l<a.items.length;l++)if(this.lexer.state.top=!1,a.items[l].tokens=this.lexer.blockTokens(a.items[l].text,[]),!a.loose){let h=a.items[l].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}if(a.loose)for(let l=0;l<a.items.length;l++)a.items[l].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){var s;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Fu(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(s=r[3])!=null&&s.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let c of n)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<i.length;c++)o.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:o.align[c]});for(let c of a)o.rows.push(Fu(c,o.header.length).map((l,h)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[h]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
||
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=Ki(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=aL(r[2],"()");if(o===-2)return;if(o>-1){let s=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,s).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),$u(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return $u(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,o,s,c=a,l=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){c+=s;continue}else if((n[5]||n[6])&&a%3&&!((a+s)%3)){l+=s;continue}if(c-=s,c>0)continue;s=Math.min(s,s+c+l);let u=[...n[0]][0].length,f=t.slice(0,a+n.index+u+s);if(Math.min(a,s)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let n,a;if(r[2]==="@")n=r[0],a="mailto:"+n;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);n=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ve=class yl{constructor(t){vt(this,"tokens");vt(this,"options");vt(this,"state");vt(this,"tokenizer");vt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ur,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};let r={other:ee,block:ea.normal,inline:Zi.normal};this.options.pedantic?(r.block=ea.pedantic,r.inline=Zi.pedantic):this.options.gfm&&(r.block=ea.gfm,this.options.breaks?r.inline=Zi.breaks:r.inline=Zi.gfm),this.tokenizer.rules=r}static get rules(){return{block:ea,inline:Zi}}static lex(t,r){return new yl(r).lex(t)}static lexInline(t,r){return new yl(r).inlineTokens(t)}lex(t){t=t.replace(ee.carriageReturn,`
|
||
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var n,a,o;for(this.options.pedantic&&(t=t.replace(ee.tabCharGlobal," ").replace(ee.spaceLine,""));t;){let s;if((a=(n=this.options.extensions)==null?void 0:n.block)!=null&&a.some(l=>(s=l.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let l=r.at(-1);s.raw.length===1&&l!==void 0?l.raw+=`
|
||
`:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
|
||
`)?"":`
|
||
`)+s.raw,l.text+=`
|
||
`+s.text,this.inlineQueue.at(-1).src=l.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
|
||
`)?"":`
|
||
`)+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(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let c=t;if((o=this.options.extensions)!=null&&o.startBlock){let l=1/0,h=t.slice(1),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=t.substring(0,l+1))}if(this.state.top&&(s=this.tokenizer.paragraph(c))){let l=r.at(-1);i&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
||
`)?"":`
|
||
`)+s.raw,l.text+=`
|
||
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(s),i=c.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
|
||
`)?"":`
|
||
`)+s.raw,l.text+=`
|
||
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(s);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var s,c,l;let i=t,n=null;if(this.tokens.links){let 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(;t;){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},t,r))?(t=t.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let 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(t,i,o)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),r.push(h);continue}let u=t;if((l=this.options.extensions)!=null&&l.startInline){let f=1/0,d=t.slice(1),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=t.substring(0,f+1))}if(h=this.tokenizer.inlineText(u)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(o=h.raw.slice(-1)),a=!0;let f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=h.raw,f.text+=h.text):r.push(h);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},ls=class{constructor(t){vt(this,"options");vt(this,"parser");this.options=t||Ur}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let n=(o=(r||"").match(ee.notSpaceStart))==null?void 0:o[0],a=t.replace(ee.endingNewline,"")+`
|
||
`;return n?'<pre><code class="language-'+Be(n)+'">'+(i?a:Be(a,!0))+`</code></pre>
|
||
`:"<pre><code>"+(i?a:Be(a,!0))+`</code></pre>
|
||
`}blockquote({tokens:t}){return`<blockquote>
|
||
${this.parser.parse(t)}</blockquote>
|
||
`}html({text:t}){return t}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
||
`}hr(t){return`<hr>
|
||
`}list(t){let r=t.ordered,i=t.start,n="";for(let s=0;s<t.items.length;s++){let c=t.items[s];n+=this.listitem(c)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
|
||
`+n+"</"+a+`>
|
||
`}listitem(t){var i;let r="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=n+" "+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=n+" "+Be(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
||
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
||
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let n="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let s=0;s<o.length;s++)i+=this.tablecell(o[s]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
||
<thead>
|
||
`+r+`</thead>
|
||
`+n+`</table>
|
||
`}tablerow({text:t}){return`<tr>
|
||
${t}</tr>
|
||
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
||
`}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>${Be(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),a=Eu(t);if(a===null)return n;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+Be(r)+'"'),o+=">"+n+"</a>",o}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=Eu(t);if(a===null)return Be(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Be(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Be(t.text)}},Bc=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""}},Xe=class xl{constructor(t){vt(this,"options");vt(this,"renderer");vt(this,"textRenderer");this.options=t||Ur,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 Bc}static parse(t,r){return new xl(r).parse(t)}static parseInline(t,r){return new xl(r).parseInline(t)}parse(t,r=!0){var n,a;let i="";for(let o=0;o<t.length;o++){let s=t[o];if((a=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&a[s.type]){let 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}}let 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<t.length&&t[o+1].type==="text";)l=t[++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:{let l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}parseInline(t,r=this.renderer){var n,a;let i="";for(let o=0;o<t.length;o++){let s=t[o];if((a=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&a[s.type]){let 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}}let 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:{let l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},Eo,ba=(Eo=class{constructor(t){vt(this,"options");vt(this,"block");this.options=t||Ur}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Ve.lex:Ve.lexInline}provideParser(){return this.block?Xe.parse:Xe.parseInline}},vt(Eo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Eo),oL=class{constructor(...t){vt(this,"defaults",wc());vt(this,"options",this.setOptions);vt(this,"parse",this.parseMarkdown(!0));vt(this,"parseInline",this.parseMarkdown(!1));vt(this,"Parser",Xe);vt(this,"Renderer",ls);vt(this,"TextRenderer",Bc);vt(this,"Lexer",Ve);vt(this,"Tokenizer",os);vt(this,"Hooks",ba);this.use(...t)}walkTokens(t,r){var n,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let c of s.header)i=i.concat(this.walkTokens(c.tokens,r));for(let c of s.rows)for(let l of c)i=i.concat(this.walkTokens(l.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;(a=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&a[s.type]?this.defaults.extensions.childTokens[s.type].forEach(c=>{let l=s[c].flat(1/0);i=i.concat(this.walkTokens(l,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...s){let c=a.renderer.apply(this,s);return c===!1&&(c=o.apply(this,s)),c}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new ls(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,c=i.renderer[s],l=a[s];a[s]=(...h)=>{let u=c.apply(a,h);return u===!1&&(u=l.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new os(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,c=i.tokenizer[s],l=a[s];a[s]=(...h)=>{let u=c.apply(a,h);return u===!1&&(u=l.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new ba;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,c=i.hooks[s],l=a[s];ba.passThroughHooks.has(o)?a[s]=h=>{if(this.defaults.async)return Promise.resolve(c.call(a,h)).then(f=>l.call(a,f));let u=c.call(a,h);return l.call(a,u)}:a[s]=(...h)=>{let u=c.apply(a,h);return u===!1&&(u=l.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;n.walkTokens=function(s){let c=[];return c.push(o.call(this,s)),a&&(c=c.concat(a.call(this,s))),c}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ve.lex(t,r??this.defaults)}parser(t,r){return Xe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let 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);let s=a.hooks?a.hooks.provideLexer():t?Ve.lex:Ve.lexInline,c=a.hooks?a.hooks.provideParser():t?Xe.parse:Xe.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,r){return i=>{if(i.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+Be(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},Or=new oL;function bt(e,t){return Or.parse(e,t)}bt.options=bt.setOptions=function(e){return Or.setOptions(e),bt.defaults=Or.defaults,tm(bt.defaults),bt};bt.getDefaults=wc;bt.defaults=Ur;bt.use=function(...e){return Or.use(...e),bt.defaults=Or.defaults,tm(bt.defaults),bt};bt.walkTokens=function(e,t){return Or.walkTokens(e,t)};bt.parseInline=Or.parseInline;bt.Parser=Xe;bt.parser=Xe.parse;bt.Renderer=ls;bt.TextRenderer=Bc;bt.Lexer=Ve;bt.lexer=Ve.lex;bt.Tokenizer=os;bt.Hooks=ba;bt.parse=bt;bt.options;bt.setOptions;bt.use;bt.walkTokens;bt.parseInline;Xe.parse;Ve.lex;function um(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);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 t.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 lL={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},bl=new Map,fm=new Map,cL=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(I.debug("Registering icon pack:",t.name),"loader"in t)fm.set(t.name,t.loader);else if("icons"in t)bl.set(t.name,t.icons);else throw I.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),dm=g(async(e,t)=>{const r=hA(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=bl.get(i);if(!n){const o=fm.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},bl.set(i,n)}catch(s){throw I.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=dA(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),hL=g(async e=>{try{return await dm(e),!0}catch{return!1}},"isIconAvailable"),In=g(async(e,t,r)=>{let i;try{i=await dm(e,t==null?void 0:t.fallbackPrefix)}catch(o){I.error(o),i=lL}const n=_A(i,t);return SA(vA(n.body),{...n.attributes,...r})},"getIconSVG");function pm(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
||
`).replace(/\n{2,}/g,`
|
||
`),n=um(i);return t===!1?n.replace(/ /g," "):n}g(pm,"preprocessMarkdown");function gm(e,t={}){const r=pm(e,t),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(gm,"markdownToLines");function mm(e,{markdownAutoWrap:t}={}){const r=bt.lexer(e);function i(n){var a,o,s;return n.type==="text"?t===!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(mm,"markdownToHTML");function ym(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(ym,"splitTextToChars");function xm(e,t){const r=ym(t.content);return Ec(e,[],r,t.type)}g(xm,"splitWordToFitWidth");function Ec(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?Ec(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(Ec,"splitWordToFitWidthRecursion");function bm(e,t){if(e.some(({content:r})=>r.includes(`
|
||
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return cs(e,t)}g(bm,"splitLineToFitWidth");function cs(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return cs(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,c]=xm(t,a);r.push([s]),c.content&&e.unshift(c)}return cs(e,t,r)}g(cs,"splitLineToFitWidthRecursion");function _l(e,t){t&&e.attr("style",t)}g(_l,"applyStyle");async function _m(e,t,r,i,n=!1){const a=e.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);const o=a.append("xhtml:div");let s=t.label;t.label&&xi(t.label)&&(s=await Rl(t.label.replace(Ai.lineBreakRegex,`
|
||
`),xt()));const c=t.isNode?"nodeLabel":"edgeLabel",l=o.append("span");l.html(s),_l(l,t.labelStyle),l.attr("class",`${c} ${i}`),_l(o,t.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(_m,"addHtmlSpan");function zs(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}g(zs,"createTspan");function Cm(e,t,r){const i=e.append("text"),n=zs(i,1,t);Ws(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}g(Cm,"computeWidthOfText");function uL(e,t,r){var o;const i=e.append("text"),n=zs(i,1,t);Ws(n,[{content:r,type:"normal"}]);const a=(o=n.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}g(uL,"computeDimensionOfText");function wm(e,t,r,i=!1){const a=t.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=>Cm(a,1.1,f)<=e,"checkWidth"),u=h(l)?[l]:bm(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(wm,"createFormattedText");function Ws(e,t){e.text(""),t.forEach((r,i)=>{const n=e.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(e){const t=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,n,a)=>(t.push((async()=>{const o=`${n}:${a}`;return await hL(o)?await In(o,void 0,{class:"label-icon"}):`<i class='${_s(i).replace(":"," ")}'></i>`})()),i));const r=await Promise.all(t);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??"")}g(km,"replaceIconSubstring");var dr=g(async(e,t="",{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",t,r,i,n,a,o,"addSvgBackground: ",c),a){const h=mm(t,l),u=await km(Hr(h)),f=t.replace(/\\\\/g,"\\"),d={isNode:o,label:xi(t)?f:u,labelStyle:r.replace("fill:","color:")};return await _m(e,d,s,n,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=gm(h.replace("<br>","<br/>"),l),f=wm(s,e,u,t?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(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const c of e){const[l,h]=c;c[0]=(l-i)*o-(h-n)*s+i,c[1]=(l-i)*s+(h-n)*o+n}}}function fL(e,t){return e[0]===t[0]&&e[1]===t[1]}function dL(e,t,r,i=1){const n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,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];fL(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 k=b[C],w=b[C+1];if(k[1]!==w[1]){const _=Math.min(k[1],w[1]);p.push({ymin:_,ymax:Math.max(k[1],w[1]),x:_===k[1]?k[0]:w[0],islope:(w[0]-k[0])/(w[1]-k[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 k=m[b].edge,w=m[C].edge;d.push([[Math.round(k.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 Pn(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),dL(e,n,i,a||1)}class Fc{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Pn(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function qs(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class pL extends Fc{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Pn(t,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 gL extends Fc{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class mL{constructor(t){this.helper=t}fillPolygons(t,r){const i=Pn(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,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 t){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 yL{constructor(t){this.helper=t}fillPolygons(t,r){const i=Pn(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,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 t.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 xL{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=Pn(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.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 bL{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const _L=0,vo=1,Du=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 So(e,t){return e.type===t}function $c(e){const t=[],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:_L,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:vo,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Du,text:""},s}(e);let i="BOD",n=0,a=r[n];for(;!So(a,Du);){let o=0;const s=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return $c("M0,0"+e);n++,o=ra[a.text],i=a.text}else So(a,vo)?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(!So(l,vo))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};t.push(c),n+=o,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function vm(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:o,data:s}of e)switch(o){case"M":a.push({key:"M",data:[...s]}),[t,r]=s,[i,n]=s;break;case"m":t+=s[0],r+=s[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const c=s.map((l,h)=>h%2?l+r:l+t);a.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":a.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const c=s.map((l,h)=>h%2?l+r:l+t);a.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":a.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":a.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],a.push({key:"H",data:[t]});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]}),t=s[2],r=s[3];break;case"s":{const c=s.map((l,h)=>h%2?l+r:l+t);a.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":a.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function Sm(e){const t=[];let r="",i=0,n=0,a=0,o=0,s=0,c=0;for(const{key:l,data:h}of e){switch(l){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],c=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.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),t.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;t.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;t.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?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(Tm(i,n,y,x,u,f,d,p,m).forEach(function(b){t.push({key:"C",data:b})}),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=l}return t}function Qi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Tm(e,t,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{[e,t]=Qi(e,t,-h),[r,i]=Qi(r,i,-h);const L=(e-r)/2,M=(t-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,Y=(s===c?-1:1)*Math.sqrt(Math.abs(E/q));m=Y*n*M/a+(e+r)/2,y=Y*-a*L/n+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),p=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<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=Tm(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),k=Math.cos(p),w=Math.sin(p),_=Math.tan(x/4),v=4/3*n*_,D=4/3*a*_,N=[e,t],O=[e+v*C,t-D*b],T=[r+v*w,i-D*k],R=[r,i];if(O[0]=2*N[0]-O[0],O[1]=2*N[1]-O[1],l)return[O,T,R].concat(f);{f=[O,T,R].concat(f);const L=[];for(let M=0;M<f.length;M+=3){const F=Qi(f[M][0],f[M][1],h),B=Qi(f[M+1][0],f[M+1][1],h),$=Qi(f[M+2][0],f[M+2][1],h);L.push([F[0],F[1],B[0],B[1],$[0],$[1]])}return L}}const CL={randOffset:function(e,t){return at(e,t)},randOffsetWithRange:function(e,t,r){return hs(e,t,r)},ellipse:function(e,t,r,i,n){const a=Am(r,i,n);return Cl(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return hr(e,t,r,i,n,!0)}};function Mm(e,t,r,i,n){return{type:"path",ops:hr(e,t,r,i,n)}}function _a(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...hr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...hr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Mm(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function wL(e,t,r,i,n){return function(a,o){return _a(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Ou(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ia(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:ia(r[0],1.5*(1+.22*t.roughness),Pu(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const s=ia(o,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:ia(o,1.5*(1+.22*t.roughness),Pu(t));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 Am(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/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(e/2),s=Math.abs(t/2);const c=1-r.curveFitting;return o+=at(o*c,r),s+=at(s*c,r),{increment:a,rx:o,ry:s}}function Cl(e,t,r,i){const[n,a]=Nu(i.increment,e,t,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]=Nu(i.increment,e,t,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 Ru(e,t,r,i,n,a,o,s,c){const l=e,h=t;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=zu(y,l,h,u,f,d,p,1,c);if(!c.disableMultiStroke){const b=zu(y,l,h,u,f,d,p,1.5,c);x.push(...b)}return o&&(s?x.push(...hr(l,h,l+u*Math.cos(d),h+f*Math.sin(d),c),...hr(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 Iu(e,t){const r=Sm(vm($c(e))),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(...hr(a[0],a[1],s[0],s[1],t)),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,t)),a=[f,d];break}case"Z":i.push(...hr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function To(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+at(n,t),i[0][1]+at(n,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+at(n,t),i[o][1]+at(n,t)]})}}return{type:"fillPath",ops:r}}function Zr(e,t){return function(r,i){let n=r.fillStyle||"hachure";if(!oe[n])switch(n){case"zigzag":oe[n]||(oe[n]=new pL(i));break;case"cross-hatch":oe[n]||(oe[n]=new gL(i));break;case"dots":oe[n]||(oe[n]=new mL(i));break;case"dashed":oe[n]||(oe[n]=new yL(i));break;case"zigzag-line":oe[n]||(oe[n]=new xL(i));break;default:n="hachure",oe[n]||(oe[n]=new Fc(i))}return oe[n]}(t,CL).fillPolygons(e,t)}function Pu(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Lm(e){return e.randomizer||(e.randomizer=new bL(e.seed||0)),e.randomizer.next()}function hs(e,t,r,i=1){return r.roughness*i*(Lm(r)*(t-e)+e)}function at(e,t,r=1){return hs(-e,e,t,r)}function hr(e,t,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=wl(e,t,r,i,n,!0,!1);if(o)return s;const c=wl(e,t,r,i,n,!0,!0);return s.concat(c)}function wl(e,t,r,i,n,a,o){const s=Math.pow(e-r,2)+Math.pow(t-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*Lm(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,p=n.bowing*n.maxRandomnessOffset*(e-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:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:at(h,n,l)),t+(b?0:at(h,n,l))]}),o?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),p+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),p+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),p+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),p+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function ia(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]),i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+at(t,r),e[n][1]+at(t,r)]),n===e.length-1&&i.push([e[n][0]+at(t,r),e[n][1]+at(t,r)]);return us(i,null,r)}function us(e,t,r){const i=e.length,n=[];if(i>3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const c=e[s];a[0]=[c[0],c[1]],a[1]=[c[0]+(o*e[s+1][0]-o*e[s-1][0])/6,c[1]+(o*e[s+1][1]-o*e[s-1][1])/6],a[2]=[e[s+1][0]+(o*e[s][0]-o*e[s+2][0])/6,e[s+1][1]+(o*e[s][1]-o*e[s+2][1])/6],a[3]=[e[s+1][0],e[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:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...wl(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Nu(e,t,r,i,n,a,o,s){const c=[],l=[];if(s.roughness===0){e/=4,l.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];c.push(u),l.push(u)}l.push([t+i*Math.cos(0),r+n*Math.sin(0)]),l.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=at(.5,s)-Math.PI/2;l.push([at(a,s)+t+.9*i*Math.cos(h-e),at(a,s)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[at(a,s)+t+i*Math.cos(f),at(a,s)+r+n*Math.sin(f)];c.push(d),l.push(d)}l.push([at(a,s)+t+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)+t+.98*i*Math.cos(h+o),at(a,s)+r+.98*n*Math.sin(h+o)]),l.push([at(a,s)+t+.9*i*Math.cos(h+.5*o),at(a,s)+r+.9*n*Math.sin(h+.5*o)])}return[l,c]}function zu(e,t,r,i,n,a,o,s,c){const l=a+at(.1,c),h=[];h.push([at(s,c)+t+.9*i*Math.cos(l-e),at(s,c)+r+.9*n*Math.sin(l-e)]);for(let u=l;u<=o;u+=e)h.push([at(s,c)+t+i*Math.cos(u),at(s,c)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),us(h,null,c)}function kL(e,t,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:[e+at(l[d],s),t+at(l[d],s),r+at(l[d],s),i+at(l[d],s),h[0],h[1]]});return c}function Ji(e){return[...e]}function Wu(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Ji(e[0]),Ji(e[1]),Ji(e[2]),Ji(e[2]));else{const n=[];n.push(e[0],e[0]);for(let s=1;s<e.length;s++)n.push(e[s]),s===e.length-1&&n.push(e[s]);const a=[],o=1-t;i.push(Ji(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(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function vL(e,t,r){const i=Ca(t,r);if(i===0)return Ca(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),Ca(e,br(t,r,n))}function br(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function kl(e,t,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}(e,t)<r){const s=e[t+0];n.length?(a=n[n.length-1],o=s,Math.sqrt(Ca(a,o))>1&&n.push(s)):n.push(s),n.push(e[t+3])}else{const c=e[t+0],l=e[t+1],h=e[t+2],u=e[t+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 SL(e,t){return fs(e,0,e.length,t)}function fs(e,t,r,i,n){const a=n||[],o=e[t],s=e[r-1];let c=0,l=1;for(let h=t+1;h<r-1;++h){const u=vL(e[h],o,s);u>c&&(c=u,l=h)}return Math.sqrt(c)>i?(fs(e,t,l+1,i,a),fs(e,l,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Mo(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)kl(e,3*a,t,i);return r&&r>0?fs(i,0,i.length,r):i}const ue="none";class ds{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,a){const o=this._o(a);return this._d("line",[Mm(t,r,i,n,o)],o)}rectangle(t,r,i,n,a){const o=this._o(a),s=[],c=wL(t,r,i,n,o);if(o.fill){const l=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?s.push(To([l],o)):s.push(Zr([l],o))}return o.stroke!==ue&&s.push(c),this._d("rectangle",s,o)}ellipse(t,r,i,n,a){const o=this._o(a),s=[],c=Am(i,n,o),l=Cl(t,r,o,c);if(o.fill)if(o.fillStyle==="solid"){const h=Cl(t,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(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[_a(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,c){const l=this._o(c),h=[],u=Ru(t,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=Ru(t,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,k=d;let w=Math.abs(p/2),_=Math.abs(m/2);w+=at(.01*w,b),_+=at(.01*_,b);let v=y,D=x;for(;v<0;)v+=2*Math.PI,D+=2*Math.PI;D-v>2*Math.PI&&(v=0,D=2*Math.PI);const N=(D-v)/b.curveStepCount,O=[];for(let T=v;T<=D;T+=N)O.push([C+w*Math.cos(T),k+_*Math.sin(T)]);return O.push([C+w*Math.cos(D),k+_*Math.sin(D)]),O.push([C,k]),Zr([O],b)}(t,r,i,n,a,o,l));return l.stroke!==ue&&h.push(u),this._d("arc",h,l)}curve(t,r){const i=this._o(r),n=[],a=Ou(t,i);if(i.fill&&i.fill!==ue)if(i.fillStyle==="solid"){const o=Ou(t,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=t;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(...Mo(Wu([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):o.push(...Mo(Wu(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(t,r){const i=this._o(r),n=[],a=_a(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(To([t],i)):n.push(Zr([t],i))),i.stroke!==ue&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").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=Sm(vm($c(h))),p=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Mo(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 v=m.length?m[m.length-1]:y;x.push([v[0],v[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 k=[];for(const w of p){const _=SL(w,f);_.length&&k.push(_)}return k}(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),l=Iu(t,i);if(a)if(i.fillStyle==="solid")if(c.length===1){const h=Iu(t,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(To(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(t,r){let i="";for(const n of t.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(t){const r=t.sets||[],i=t.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(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ue,strokeWidth:i,fill:ue}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class TL{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ds(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.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=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.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":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,o,s=!1,c){const l=this.gen.arc(t,r,i,n,a,o,s,c);return this.draw(l),l}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const na="http://www.w3.org/2000/svg";class ML{constructor(t,r){this.svg=t,this.gen=new ds(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(na,"g"),o=t.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||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(n,s,i)}c&&a.appendChild(c)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.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(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,o,s=!1,c){const l=this.gen.arc(t,r,i,n,a,o,s,c);return this.draw(l)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var X={canvas:(e,t)=>new TL(e,t),svg:(e,t)=>new ML(e,t),generator:e=>new ds(e),newSeed:()=>ds.newSeed()},ct=g(async(e,t,r)=>{var u,f;let i;const n=t.useHtmlLabels||Dt((u=xt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",re(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const c=await dr(o,Lr(Hr(s),xt()),{useHtmlLabels:n,width:t.width||((f=xt().flowchart)==null?void 0:f.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let l=c.getBBox();const h=((t==null?void 0:t.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 k=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[_=xf.fontSize]=Is(k),v=_*w+"px";x.style.minWidth=v,x.style.maxWidth=v}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+")"),t.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"),Ao=g(async(e,t,r)=>{var c,l,h,u,f,d;const i=r.useHtmlLabels||Dt((l=(c=xt())==null?void 0:c.flowchart)==null?void 0:l.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await dr(n,Lr(Hr(t),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(Dt((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:e,bbox:o,halfPadding:s,label:n}},"insertLabel"),Q=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),st=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function mt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(mt,"createPathFromPoints");function ur(e,t,r,i,n,a){const o=[],c=r-e,l=i-t,h=c/a,u=2*Math.PI/h,f=t+l/2;for(let d=0;d<=50;d++){const p=d/50,m=e+p*c,y=f+n*Math.sin(u*(m-e));o.push({x:m,y})}return o}g(ur,"generateFullSineWavePoints");function Dc(e,t,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=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:-d,y:-p})}return o}g(Dc,"generateCirclePoints");var AL=g((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,s=e.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"),Fi=AL;function Bm(e,t){t&&e.attr("style",t)}g(Bm,"applyStyle");async function Em(e){const t=gt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let i=e.label;e.label&&xi(e.label)&&(i=await Rl(e.label.replace(Ai.lineBreakRegex,`
|
||
`),xt()));const n=e.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+n+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>"),Bm(r,e.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"),t.node()}g(Em,"addHtmlLabel");var LL=g(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),Dt(xt().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),I.info("vertexText"+n);const a={isNode:i,label:Hr(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Em(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.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=LL,ir=g((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),Fm=g(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:h}=J(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Dt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),p=await dr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=p.getBBox();if(Dt(r.flowchart.htmlLabels)){const v=p.children[0],D=gt(p);m=v.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,C=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const v=X.svg(u),D=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),N=v.path(ir(b,C,y,x,0),D);k=u.insert(()=>(I.debug("Rough node insert CXC",N),N),":first-child"),k.select("path:nth-child(2)").attr("style",l.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=Vl(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),s){const v=d.select("span");v&&v.attr("style",s)}const _=k.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return Fi(t,v)},{cluster:u,labelBBox:m}},"rect"),BL=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return Fi(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),EL=g(async(e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:c}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.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(t.label,t.labelStyle,void 0,!0));let p=d.getBBox();if(Dt(r.flowchart.htmlLabels)){const N=d.children[0],O=gt(d);p=N.getBoundingClientRect(),O.attr("width",p.width),O.attr("height",p.height)}const m=0*t.padding,y=m/2,x=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+m;t.width<=p.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,C=t.height+m-p.height-6,k=t.x-x/2,w=t.y-b/2;t.width=x;const _=t.y-t.height/2-y+p.height+2;let v;if(t.look==="handDrawn"){const N=t.cssClasses.includes("statediagram-cluster-alt"),O=X.svg(l),T=t.rx||t.ry?O.path(ir(k,w,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:c,seed:n}):O.rectangle(k,w,x,b,{seed:n});v=l.insert(()=>T,":first-child");const R=O.rectangle(k,_,x,C,{fill:N?a:o,fillStyle:N?"hachure":"solid",stroke:c,seed:n});v=l.insert(()=>T,":first-child"),f=l.insert(()=>R)}else v=h.insert("rect",":first-child"),v.attr("class","outer").attr("x",k).attr("y",w).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",k).attr("y",_).attr("width",x).attr("height",C);u.attr("transform",`translate(${t.x-p.width/2}, ${w+1-(Dt(r.flowchart.htmlLabels)?0:3)})`);const D=v.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(N){return Fi(t,N)},{cluster:l,labelBBox:p}},"roundedWithTitle"),FL=g(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:h}=J(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Dt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),p=await dr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=p.getBBox();if(Dt(r.flowchart.htmlLabels)){const v=p.children[0],D=gt(p);m=v.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,C=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const v=X.svg(u),D=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),N=v.path(ir(b,C,y,x,t.rx),D);k=u.insert(()=>(I.debug("Rough node insert CXC",N),N),":first-child"),k.select("path:nth-child(2)").attr("style",l.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=Vl(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),s){const v=d.select("span");v&&v.attr("style",s)}const _=k.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return Fi(t,v)},{cluster:u,labelBBox:m}},"kanbanSection"),$L=g((e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),c=0*t.padding,l=t.width+c;t.diff=-t.padding;const h=t.height+c,u=t.x-l/2,f=t.y-h/2;t.width=l;let d;if(t.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",t.look);const p=d.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Fi(t,m)},{cluster:o,labelBBox:{}}},"divider"),DL=Fm,OL={rect:Fm,squareRect:DL,roundedWithTitle:EL,noteGroup:BL,divider:$L,kanbanSection:FL},$m=new Map,RL=g(async(e,t)=>{const r=t.shape||"rect",i=await OL[r](e,t);return $m.set(t.id,i),i},"insertCluster"),u3=g(()=>{$m=new Map},"clear");function Dm(e,t){return e.intersect(t)}g(Dm,"intersectNode");var IL=Dm;function Om(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,s=a-i.y,c=Math.sqrt(t*t*s*s+r*r*o*o),l=Math.abs(t*r*o/c);i.x<n&&(l=-l);var h=Math.abs(t*r*s/c);return i.y<a&&(h=-h),{x:n+l,y:a+h}}g(Om,"intersectEllipse");var Rm=Om;function Im(e,t,r){return Rm(e,t,t,r)}g(Im,"intersectCircle");var PL=Im;function Pm(e,t,r,i){var n,a,o,s,c,l,h,u,f,d,p,m,y,x,b;if(n=t.y-e.y,o=e.x-t.x,c=t.x*e.y-e.x*t.y,f=n*r.x+o*r.y+c,d=n*i.x+o*i.y+c,!(f!==0&&d!==0&&vl(f,d))&&(a=i.y-r.y,s=r.x-i.x,l=i.x*r.y-r.x*i.y,h=a*e.x+s*e.y+l,u=a*t.x+s*t.y+l,!(h!==0&&u!==0&&vl(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(Pm,"intersectLine");function vl(e,t){return e*t>0}g(vl,"sameSign");var NL=Pm;function Nm(e,t,r){let i=e.x,n=e.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=i-e.width/2-o,l=n-e.height/2-s;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=NL(e,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]):e}g(Nm,"intersectPolygon");var zL=Nm,V={node:IL,circle:PL,ellipse:Rm,polygon:zL,rect:Fi};function zm(e,t){const{labelStyles:r}=J(t);t.labelStyle=r;const i=st(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,c=X.svg(a),l=K(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.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(t,u),t.intersect=function(f){return I.info("Circle intersect",t,o,f),V.circle(t,o,f)},a}g(zm,"anchor");function Sl(e,t,r,i,n,a,o){const c=(e+r)/2,l=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/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((t-b)/a,(e-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 v=0;v<20;v++){const D=v/19,N=C+D*w,O=x+n*Math.cos(N),T=b+a*Math.sin(N);_.push({x:O,y:T})}return _}g(Sl,"generateArcPoints");async function Wm(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=a.width+t.padding+20,s=a.height+t.padding,c=s/2,l=c/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Sl(-o/2,-s/2,-o/2,s/2,l,c,!1),{x:o/2,y:s/2},...Sl(o/2,s/2,o/2,-s/2,l,c,!0)],f=X.svg(n),d=K(t,{});t.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&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${l/2}, 0)`),Q(t,y),t.intersect=function(x){return V.polygon(t,u,x)},n}g(Wm,"bowTieRect");function nr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(nr,"insertPolygonShape");async function qm(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=a.height+t.padding,s=12,c=a.width+t.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}=t;if(t.look==="handDrawn"){const y=X.svg(n),x=K(t,{}),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=nr(n,c,o,d);return i&&p.attr("style",i),Q(t,p),t.intersect=function(y){return V.polygon(t,d,y)},n}g(qm,"card");function Hm(e,t){const{nodeStyles:r}=J(t);t.label="";const i=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.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(t,{});t.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&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return V.polygon(t,o,f)},i}g(Hm,"choice");async function Um(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await ct(e,t,st(t)),s=a.width/2+o;let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=X.svg(n),u=K(t,{}),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(t,c),t.intersect=function(h){return I.info("Circle intersect",t,s,h),V.circle(t,s,h)},n}g(Um,"circle");function Ym(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,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 jm(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,s=X.svg(n),c=K(t,{});t.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&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Q(t,f),t.intersect=function(d){return I.info("crossedCircle intersect",t,{radius:a,point:d}),V.circle(t,a,d)},n}g(jm,"crossedCircle");function He(e,t,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=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:-d,y:-p})}return o}g(He,"generateCirclePoints");async function Gm(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...He(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...He(s/2+l*2,-l,l,20,-180,-270),...He(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...He(s/2,c/2,l,20,0,90)],f=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...He(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...He(s/2+s*.1,-l,l,20,-180,-270),...He(s/2+s*.1,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...He(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(t,{fill:"none"});t.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}),k=n.insert("g",":first-child");return k.insert(()=>C,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${l}, 0)`),o.attr("transform",`translate(${-s/2+l-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,k),t.intersect=function(w){return V.polygon(t,f,w)},n}g(Gm,"curlyBraceLeft");function Ue(e,t,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=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:d,y:p})}return o}g(Ue,"generateCirclePoints");async function Vm(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...Ue(s/2,-c/2,l,20,-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+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),{x:s/2,y:c/2+l},{x:-s/2,y:c/2+l}],d=X.svg(n),p=K(t,{fill:"none"});t.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}),k=n.insert("g",":first-child");return k.insert(()=>C,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-l}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,k),t.intersect=function(w){return V.polygon(t,f,w)},n}g(Vm,"curlyBraceRight");function Wt(e,t,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=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:-d,y:-p})}return o}g(Wt,"generateCirclePoints");async function Xm(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,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(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=mt(u).replace("Z",""),b=p.path(x,m),k=mt(f).replace("Z",""),w=p.path(k,m),_=mt(d),v=p.path(_,{...m}),D=n.insert("g",":first-child");return D.insert(()=>v,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>w,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${l-l/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,D),t.intersect=function(N){return V.polygon(t,d,N)},n}g(Xm,"curlyBraces");async function Zm(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=80,s=20,c=Math.max(o,(a.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),l=Math.max(s,a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/2,{cssStyles:u}=t,f=X.svg(n),d=K(t,{});t.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},...Dc(-y,-m/2,h,50,270,90)],C=mt(b),k=f.path(C,d),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-c/2}, ${-l/2})`),Q(t,w),t.intersect=function(_){return V.polygon(t,b,_)},n}g(Zm,"curvedTrapezoid");var WL=g((e,t,r,i,n,a)=>[`M${e},${t+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"),qL=g((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),HL=g((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Km(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Math.max(a.width+t.padding,t.width??0),c=s/2,l=c/(2.5+s/50),h=Math.max(a.height+l+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=X.svg(n),p=qL(0,0,s,h,c,l),m=HL(0,l,s,h,c,l),y=d.path(p,K(t,{})),x=d.path(m,K(t,{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=WL(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(t,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(d){const p=V.rect(t,d),m=p.x-(t.x??0);if(c!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(p.y-(t.y??0))>(t.height??0)/2-l)){let y=l*l*(1-m*m/(c*c));y>0&&(y=Math.sqrt(y)),y=l-y,d.y-(t.y??0)>0&&(y=-y),p.y+=y}return p},n}g(Km,"cylinder");async function Qm(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=a.width+t.padding,c=a.height+t.padding,l=c*.2,h=-s/2,u=-c/2-l/2,{cssStyles:f}=t,d=X.svg(n),p=K(t,{});t.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&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+l+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return V.rect(t,b)},n}g(Qm,"dividedRectangle");async function Jm(e,t){var f,d;const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await ct(e,t,st(t)),c=a.width/2+o+5,l=a.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=X.svg(n),m=K(t,{roughness:.2,strokeWidth:2.5}),y=K(t,{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(t.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(t,h),t.intersect=function(p){return I.info("DoubleCircle intersect",t,c,p),V.circle(t,c,p)},n}g(Jm,"doublecircle");function t0(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=J(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,c=X.svg(a),{nodeBorder:l}=r,h=K(t,{fillStyle:"solid"});t.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&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),Q(t,f),t.intersect=function(d){return I.info("filledCircle intersect",t,{radius:o,point:d}),V.circle(t,o,d)},a}g(t0,"filledCircle");async function e0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=a.width+(t.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}=t,f=X.svg(n),d=K(t,{});t.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&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=s,t.height=c,Q(t,y),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-c/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return I.info("Triangle intersect",t,h,x),V.polygon(t,h,x)},n}g(e0,"flippedTriangle");function r0(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=J(t);t.label="";const o=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),l=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(c=Math.max(10,(t==null?void 0:t.width)??0),l=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*c/2,u=-1*l/2,f=X.svg(o),d=K(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=f.rectangle(h,u,c,l,d),m=o.insert(()=>p,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Q(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return V.rect(t,x)},o}g(r0,"forkJoin");async function i0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await ct(e,t,st(t)),c=Math.max(n,s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/2,{cssStyles:u}=t,f=X.svg(o),d=K(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-c/2,y:-l/2},{x:c/2-h,y:-l/2},...Dc(-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&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Q(t,x),t.intersect=function(b){return I.info("Pill intersect",t,{radius:h,point:b}),V.polygon(t,p,b)},o}g(i0,"halfRoundedRectangle");var UL=g((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function n0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=4,s=a.height+t.padding,c=s/o,l=a.width+2*c+t.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}=t;if(t.look==="handDrawn"){const d=X.svg(n),p=K(t,{}),m=UL(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=nr(n,l,s,h);return i&&u.attr("style",i),t.width=l,t.height=s,Q(t,u),t.intersect=function(d){return V.polygon(t,h,d)},n}g(n0,"hexagon");async function a0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await ct(e,t,st(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:s}=t,c=X.svg(n),l=K(t,{});t.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&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),Q(t,d),t.intersect=function(p){return I.info("Pill intersect",t,{points:h}),V.polygon(t,h,p)},n}g(a0,"hourglass");async function s0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=J(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,label:u}=await ct(e,t,"icon-shape default"),f=t.pos==="t",d=s,p=s,{nodeBorder:m}=r,{stylesMap:y}=Li(t),x=-p/2,b=-d/2,C=t.label?8:0,k=X.svg(l),w=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=k.rectangle(x,b,p,d,w),v=Math.max(p,h.width),D=d+h.height+C,N=k.rectangle(-v/2,-D/2,v,D,{...w,fill:"transparent",stroke:"none"}),O=l.insert(()=>_,":first-child"),T=l.insert(()=>N);if(t.icon){const R=l.append("g");R.html(`<g>${await In(t.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?-D/2:D/2-h.height})`),O.attr("transform",`translate(0,${f?h.height/2+C/2:-h.height/2-C/2})`),Q(t,T),t.intersect=function(R){if(I.info("iconSquare intersect",t,R),!t.label)return V.rect(t,R);const L=t.x??0,M=t.y??0,F=t.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(t,B,R)},l}g(s0,"icon");async function o0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=J(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,label:u}=await ct(e,t,"icon-shape default"),f=20,d=t.label?8:0,p=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Li(t),b=X.svg(l),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=x.get("fill");C.stroke=k??y;const w=l.append("g");t.icon&&w.html(`<g>${await In(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const _=w.node().getBBox(),v=_.width,D=_.height,N=_.x,O=_.y,T=Math.max(v,D)*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(${-v/2-N},${p?h.height/2+d/2-D/2-O:-h.height/2-d/2-D/2-O})`),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(t,$),t.intersect=function(E){return I.info("iconSquare intersect",t,E),V.rect(t,E)},l}g(o0,"iconCircle");async function l0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=J(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await ct(e,t,"icon-shape default"),d=t.pos==="t",p=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Li(t),C=-m/2,k=-p/2,w=t.label?8:0,_=X.svg(l),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const D=b.get("fill");v.stroke=D??x;const N=_.path(ir(C,k,m,p,5),v),O=Math.max(m,h.width),T=p+h.height+w,R=_.rectangle(-O/2,-T/2,O,T,{...v,fill:"transparent",stroke:"none"}),L=l.insert(()=>N,":first-child").attr("class","icon-shape2"),M=l.insert(()=>R);if(t.icon){const F=l.append("g");F.html(`<g>${await In(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const B=F.node().getBBox(),$=B.width,E=B.height,q=B.x,Y=B.y;F.attr("transform",`translate(${-$/2-q},${d?h.height/2+w/2-E/2-Y:-h.height/2-w/2-E/2-Y})`),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(t,M),t.intersect=function(F){if(I.info("iconSquare intersect",t,F),!t.label)return V.rect(t,F);const B=t.x??0,$=t.y??0,E=t.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(t,q,F)},l}g(l0,"iconRounded");async function c0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=J(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await ct(e,t,"icon-shape default"),d=t.pos==="t",p=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Li(t),C=-m/2,k=-p/2,w=t.label?8:0,_=X.svg(l),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const D=b.get("fill");v.stroke=D??x;const N=_.path(ir(C,k,m,p,.1),v),O=Math.max(m,h.width),T=p+h.height+w,R=_.rectangle(-O/2,-T/2,O,T,{...v,fill:"transparent",stroke:"none"}),L=l.insert(()=>N,":first-child"),M=l.insert(()=>R);if(t.icon){const F=l.append("g");F.html(`<g>${await In(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const B=F.node().getBBox(),$=B.width,E=B.height,q=B.x,Y=B.y;F.attr("transform",`translate(${-$/2-q},${d?h.height/2+w/2-E/2-Y:-h.height/2-w/2-E/2-Y})`),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(t,M),t.intersect=function(F){if(I.info("iconSquare intersect",t,F),!t.label)return V.rect(t,F);const B=t.x??0,$=t.y??0,E=t.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(t,q,F)},l}g(c0,"iconSquare");async function h0(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:o}=J(t);t.labelStyle=o;const s=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?s??0:0,(t==null?void 0:t.assetWidth)??n),l=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:c,h=t.constraint==="on"?l/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(l,s??0);const{shapeSvg:u,bbox:f,label:d}=await ct(e,t,"image-shape default"),p=t.pos==="t",m=-l/2,y=-h/2,x=t.label?8:0,b=X.svg(u),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=b.rectangle(m,y,l,h,C),w=Math.max(l,f.width),_=h+f.height+x,v=b.rectangle(-w/2,-_/2,w,_,{...C,fill:"none",stroke:"none"}),D=u.insert(()=>k,":first-child"),N=u.insert(()=>v);if(t.img){const O=u.append("image");O.attr("href",t.img),O.attr("width",l),O.attr("height",h),O.attr("preserveAspectRatio","none"),O.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})`),D.attr("transform",`translate(0,${p?f.height/2+x/2:-f.height/2-x/2})`),Q(t,N),t.intersect=function(O){if(I.info("iconSquare intersect",t,O),!t.label)return V.rect(t,O);const T=t.x??0,R=t.y??0,L=t.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(t,M,O)},u}g(h0,"imageSquare");async function u0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.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}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=K(t,{}),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=nr(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,Q(t,l),t.intersect=function(u){return V.polygon(t,c,u)},n}g(u0,"inv_trapezoid");async function Nn(e,t,r){const{labelStyles:i,nodeStyles:n}=J(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await ct(e,t,st(t)),s=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),c=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),l=-s/2,h=-c/2;let u,{rx:f,ry:d}=t;const{cssStyles:p}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=X.svg(a),y=K(t,{}),x=f||d?m.path(ir(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(t,u),t.intersect=function(m){return V.rect(t,m)},a}g(Nn,"drawRect");async function f0(e,t){const{shapeSvg:r,bbox:i,label:n}=await ct(e,t,"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(t,a),t.intersect=function(c){return V.rect(t,c)},r}g(f0,"labelRect");async function d0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0),(t==null?void 0:t.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}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=K(t,{}),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=nr(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,Q(t,l),t.intersect=function(u){return V.polygon(t,c,u)},n}g(d0,"lean_left");async function p0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0),(t==null?void 0:t.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}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=K(t,{}),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=nr(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,Q(t,l),t.intersect=function(u){return V.polygon(t,c,u)},n}g(p0,"lean_right");function g0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),s=Math.max(35,(t==null?void 0:t.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(t,{});t.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&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${o/2},${-s})`),Q(t,p),t.intersect=function(m){return I.info("lightningBolt intersect",t,m),V.polygon(t,l,m)},n}g(g0,"lightningBolt");var YL=g((e,t,r,i,n,a,o)=>[`M${e},${t+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${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),jL=g((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),GL=g((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function m0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Math.max(a.width+(t.padding??0),t.width??0),c=s/2,l=c/(2.5+s/50),h=Math.max(a.height+l+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=X.svg(n),m=jL(0,0,s,h,c,l,u),y=GL(0,l,s,h,c,l),x=K(t,{}),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(t,f),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+l-(a.y-(a.top??0))})`),t.intersect=function(p){const m=V.rect(t,p),y=m.x-(t.x??0);if(c!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-l)){let x=l*l*(1-y*y/(c*c));x>0&&(x=Math.sqrt(x)),x=l-x,p.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}g(m0,"linedCylinder");async function y0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=c+l,{cssStyles:u}=t,f=X.svg(n),d=K(t,{});t.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},...ur(-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&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),Q(t,y),t.intersect=function(x){return V.polygon(t,p,x)},n}g(y0,"linedWaveEdgedRect");async function x0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=5,h=-s/2,u=-c/2,{cssStyles:f}=t,d=X.svg(n),p=K(t,{}),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}];t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const x=mt(m),b=d.path(x,p),C=mt(y),k=d.path(C,{...p,fill:"none"}),w=n.insert(()=>k,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.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(t,w),t.intersect=function(_){return V.polygon(t,m,_)},n}g(x0,"multiRect");async function b0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=c+l,u=-s/2,f=-h/2,d=5,{cssStyles:p}=t,m=ur(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),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=mt(x),_=C.path(w,k),v=mt(b),D=C.path(v,k),N=n.insert(()=>_,":first-child");return N.insert(()=>D),N.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",p),i&&t.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(t,N),t.intersect=function(O){return V.polygon(t,x,O)},n}g(b0,"multiWaveEdgedRectangle");async function _0(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:n}=J(t);t.labelStyle=i,t.useHtmlLabels||((b=he().flowchart)==null?void 0:b.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s,label:c}=await ct(e,t,st(t)),l=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-l/2,f=-h/2,{cssStyles:d}=t,p=X.svg(o),m=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=p.rectangle(u,f,l,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),c.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Q(t,x),t.intersect=function(C){return V.rect(t,C)},o}g(_0,"note");var VL=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function C0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=a.width+t.padding,s=a.height+t.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}=t;if(t.look==="handDrawn"){const f=X.svg(n),d=K(t,{}),p=VL(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=nr(n,c,c,l);return i&&h.attr("style",i),Q(t,h),t.intersect=function(f){return I.debug(`APA12 Intersect called SPLIT
|
||
point:`,f,`
|
||
node:
|
||
`,t,`
|
||
res:`,V.polygon(t,l,f)),V.polygon(t,l,f)},n}g(C0,"question");async function w0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0),(t==null?void 0:t.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}=t,p=X.svg(n),m=K(t,{});t.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&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.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(t,b),t.intersect=function(C){return V.polygon(t,f,C)},n}g(w0,"rect_left_inv_arrow");async function k0(e,t){var D,N;const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),c=t.description,l=t.label,h=s.node().appendChild(await Sr(l,t.labelStyle,!0,!0));let u={width:0,height:0};if(Dt((N=(D=xt())==null?void 0:D.flowchart)==null?void 0:N.htmlLabels)){const O=h.children[0],T=gt(h);u=O.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,t.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=(t.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+(t.padding||0),C=u.height+(t.padding||0),k=-u.width/2-x,w=-u.height/2-x;let _,v;if(t.look==="handDrawn"){const O=X.svg(a),T=K(t,{}),R=O.path(ir(k,w,b,C,t.rx||0),T),L=O.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,T);v=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"),v=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+(t.padding||0)).attr("height",u.height+(t.padding||0)),v.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(t,_),t.intersect=function(O){return V.rect(t,O)},a}g(k0,"rectWithTitle");async function v0(e,t){const r={rx:5,ry:5,labelPaddingX:((t==null?void 0:t.padding)||0)*1,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Nn(e,t,r)}g(v0,"roundedRect");async function S0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=(t==null?void 0:t.padding)??0,c=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:f}=t,d=X.svg(n),p=K(t,{});t.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&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-c/2+4+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return V.rect(t,b)},n}g(S0,"shadedProcess");async function T0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=-s/2,h=-c/2,{cssStyles:u}=t,f=X.svg(n),d=K(t,{});t.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&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${c/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))}, ${-c/4+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return V.polygon(t,p,b)},n}g(T0,"slopedRect");async function M0(e,t){const r={rx:0,ry:0,labelPaddingX:((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Nn(e,t,r)}g(M0,"squareRect");async function A0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=a.height+t.padding,s=a.width+o/4+t.padding;let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=X.svg(n),u=K(t,{}),f=ir(-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(t,c),t.intersect=function(h){return V.rect(t,h)},n}g(A0,"stadium");async function L0(e,t){return Nn(e,t,{rx:5,ry:5})}g(L0,"state");function B0(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=J(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c}=r,l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=X.svg(l),u=K(t,{});t.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(t,m),t.intersect=function(y){return V.circle(t,7,y)},l}g(B0,"stateEnd");function E0(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const s=X.svg(n).circle(0,0,14,O1(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(t,a),t.intersect=function(o){return V.circle(t,7,o)},n}g(E0,"stateStart");async function F0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=((t==null?void 0:t.padding)||0)/2,s=a.width+t.padding,c=a.height+t.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(t.look==="handDrawn"){const f=X.svg(n),d=K(t,{}),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}=t;x.attr("class","basic label-container").attr("style",re(b)),Q(t,x)}else{const f=nr(n,s,c,u);i&&f.attr("style",i),Q(t,f)}return t.intersect=function(f){return V.polygon(t,u,f)},n}g(F0,"subroutine");async function $0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-o/2,l=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=t,d=X.svg(n),p=K(t,{}),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}];t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const x=mt(m),b=d.path(x,p),C=mt(y),k=d.path(C,{...p,fillStyle:"solid"}),w=n.insert(()=>k,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),Q(t,w),t.intersect=function(_){return V.polygon(t,m,_)},n}g($0,"taggedRect");async function D0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=.2*s,u=.2*c,f=c+l,{cssStyles:d}=t,p=X.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...ur(-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},...ur(x+s,(b+c)*1.3,x+s-h,(b+c)*1.5,-c*.03,.5)],k=mt(y),w=p.path(k,m),_=mt(C),v=p.path(_,{...m,fillStyle:"solid"}),D=n.insert(()=>v,":first-child");return D.insert(()=>w,":first-child"),D.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),Q(t,D),t.intersect=function(N){return V.polygon(t,y,N)},n}g(D0,"taggedWaveEdgedRectangle");async function O0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=Math.max(a.width+t.padding,(t==null?void 0:t.width)||0),s=Math.max(a.height+t.padding,(t==null?void 0:t.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(t,h),t.intersect=function(u){return V.rect(t,u)},n}g(O0,"text");var XL=g((e,t,r,i,n,a)=>`M${e},${t}
|
||
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"),ZL=g((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),KL=g((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function R0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await ct(e,t,st(t)),c=t.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}=t;let p;if(t.look==="handDrawn"){const m=X.svg(n),y=ZL(0,0,f,l,u,h),x=KL(0,0,f,l,u,h),b=m.path(y,K(t,{})),C=m.path(x,K(t,{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=XL(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(t,p),t.intersect=function(m){const y=V.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.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-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}g(R0,"tiltedCylinder");async function I0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=a.width+t.padding,s=a.height+t.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}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=K(t,{}),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=nr(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,Q(t,l),t.intersect=function(u){return V.polygon(t,c,u)},n}g(I0,"trapezoid");async function P0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=60,s=20,c=Math.max(o,a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s,a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=X.svg(n),f=K(t,{});t.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&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Q(t,y),t.intersect=function(x){return V.polygon(t,d,x)},n}g(P0,"trapezoidalPentagon");async function N0(e,t){var b;const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Dt((b=xt().flowchart)==null?void 0:b.htmlLabels),c=a.width+(t.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}=t,d=X.svg(n),p=K(t,{});t.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&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=c,t.height=l,Q(t,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${l/2-(a.height+(t.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(C){return I.info("Triangle intersect",t,u,C),V.polygon(t,u,C)},n}g(N0,"triangle");async function z0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/8,h=c+l,{cssStyles:u}=t,d=70-s,p=d>0?d/2:0,m=X.svg(n),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-p,y:h/2},...ur(-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),k=n.insert(()=>C,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l-(a.y-(a.top??0))})`),Q(t,k),t.intersect=function(w){return V.polygon(t,x,w)},n}g(z0,"waveEdgedRectangle");async function W0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ct(e,t,st(t)),o=100,s=50,c=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.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}=t,y=X.svg(n),x=K(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:p/2},...ur(-u/2,p/2,u/2,p/2,d,1),{x:u/2,y:-p/2},...ur(u/2,-p/2,-u/2,-p/2,d,-1)],C=mt(b),k=y.path(C,x),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),Q(t,w),t.intersect=function(_){return V.polygon(t,b,_)},n}g(W0,"waveRectangle");async function q0(e,t){const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await ct(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=5,h=-s/2,u=-c/2,{cssStyles:f}=t,d=X.svg(n),p=K(t,{}),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}`;t.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&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.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(t,b),t.intersect=function(C){return V.polygon(t,m,C)},n}g(q0,"windowPane");async function Oc(e,t){var pt,ht,kt,nt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:lt}=he(),{background:ut}=lt,Ct={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ut}`]};await Oc(e,Ct)}const i=he();t.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}=t,{labelStyles:s,nodeStyles:c}=J(t);if(r.attributes.length===0&&t.label){const lt={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};er(t.label,i)+lt.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const ut=await Nn(e,t,lt);if(!Dt(i.htmlLabels)){const Ct=ut.select("text"),z=(kt=Ct.node())==null?void 0:kt.getBBox();Ct.attr("transform",`translate(${-z.width/2}, 0)`)}return ut}i.htmlLabels||(n*=1.25,a*=1.25);let l=st(t);l||(l="node default");const h=e.insert("g").attr("class",l).attr("id",t.domId||t.id),u=await Qr(h,t.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,k=!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 j=await Qr(h,lt.comment,i,0,f,["attribute-comment"],s);b=Math.max(b,j.width+n);const et=Math.max(ut.height,Ct.height,z.height,j.height)+a;p.push({yOffset:f,rowHeight:et}),f+=et}let w=4;x<=n&&(C=!1,x=0,w--),b<=n&&(k=!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 v=m+y+x+b,D=X.svg(h),N=K(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");let O=0;p.length>0&&(O=p.reduce((lt,ut)=>lt+((ut==null?void 0:ut.rowHeight)??0),0));const T=Math.max(_.width+n*2,(t==null?void 0:t.width)||0,v),R=Math.max((O??0)+u.height,(t==null?void 0:t.height)||0),L=-T/2,M=-R/2;h.selectAll("g:not(:first-child)").each((lt,ut,Ct)=>{const z=gt(Ct[ut]),j=z.attr("transform");let et=0,P=0;if(j){const ft=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);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=D.rectangle(L,M,T,R,N),B=h.insert(()=>F,":first-child").attr("style",o.join("")),{themeVariables:$}=he(),{rowEven:E,rowOdd:q,nodeBorder:Y}=$;d.push(0);for(const[lt,ut]of p.entries()){const z=(lt+1)%2===0&&ut.yOffset!==0,j=D.rectangle(L,u.height+M+(ut==null?void 0:ut.yOffset),T,ut==null?void 0:ut.rowHeight,{...N,fill:z?E:q,stroke:Y});h.insert(()=>j,"g.label").attr("style",o.join("")).attr("class",`row-rect-${z?"even":"odd"}`)}let U=D.line(L,u.height+M,T+L,u.height+M,N);h.insert(()=>U).attr("class","divider"),U=D.line(m+L,u.height+M,m+L,R+M,N),h.insert(()=>U).attr("class","divider"),C&&(U=D.line(m+y+L,u.height+M,m+y+L,R+M,N),h.insert(()=>U).attr("class","divider")),k&&(U=D.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=D.line(L,u.height+M+lt,T+L,u.height+M+lt,N),h.insert(()=>U).attr("class","divider");if(Q(t,B),c&&t.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 t.intersect=function(lt){return V.rect(t,lt)},h}g(Oc,"erBox");async function Qr(e,t,r,i=0,n=0,a=[],o=""){const s=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==mh(t)&&(t=mh(t),t=t.replaceAll("<","<").replaceAll(">",">"));const c=s.node().appendChild(await dr(s,t,{width:er(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.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(Dt(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 H0(e,t,r,i,n=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",st(t)).attr("id",t.domId||t.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"),t.annotations.length>0){const b=t.annotations[0];await on(s,{text:`«${b}»`},0),u=s.node().getBBox().height}c=o.insert("g").attr("class","label-group text"),await on(c,t,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 t.members){const C=await on(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 t.methods){const C=await on(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(H0,"textHelper");async function on(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=he();let o="useHtmlLabels"in t?t.useHtmlLabels:Dt(a.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),xi(s)&&(o=!0);const c=await dr(n,_s(Hr(s)),{width:er(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(on,"addText");async function U0(e,t){var N,O;const r=xt(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??Dt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:c}=await H0(e,t,r,a,n),{labelStyles:l,nodeStyles:h}=J(t);t.labelStyle=l,t.cssStyles=o.styles||"";const u=((N=o.styles)==null?void 0:N.join(";"))||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!((O=r.class)!=null&&O.hideEmptyMembersBox),d=X.svg(s),p=K(t,{});t.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),k=s.insert(()=>C,":first-child");k.attr("class","basic label-container");const w=k.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(Y,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,v=s.select(".label-group").node().getBBox().height-(f?i/2:0)||0,D=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,_+v+b+i,w.x+w.width,_+v+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,_+v+D+b+n*2+i,w.x+w.width,_+v+D+b+i+n*2,p);s.insert(()=>T).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),k.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),t.labelStyle?s.selectAll("span").attr("style",t.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(t,k),t.intersect=function(T){return V.rect(t,T)},s}g(U0,"classBox");async function Y0(e,t){var _,v;const{labelStyles:r,nodeStyles:i}=J(t);t.labelStyle=r;const n=t,a=t,o=20,s=20,c="verifyMethod"in t,l=st(t),h=e.insert("g").attr("class",l).attr("id",t.domId??t.id);let u;c?u=await Ee(h,`<<${n.type}>>`,0,t.labelStyle):u=await Ee(h,"<<Element>>",0,t.labelStyle);let f=u;const d=await Ee(h,n.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+s,c){const D=await Ee(h,`${n.requirementId?`id: ${n.requirementId}`:""}`,f,t.labelStyle);f+=D;const N=await Ee(h,`${n.text?`Text: ${n.text}`:""}`,f,t.labelStyle);f+=N;const O=await Ee(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,t.labelStyle);f+=O,await Ee(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,t.labelStyle)}else{const D=await Ee(h,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=D,await Ee(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const p=(((_=h.node())==null?void 0:_.getBBox().width)??200)+o,m=(((v=h.node())==null?void 0:v.getBBox().height)??200)+o,y=-p/2,x=-m/2,b=X.svg(h),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=b.rectangle(y,x,p,m,C),w=h.insert(()=>k,":first-child");if(w.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((D,N,O)=>{const T=gt(O[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 D=b.line(y,x+u+d+s,y+p,x+u+d+s,C);h.insert(()=>D).attr("style",i)}return Q(t,w),t.intersect=function(D){return V.rect(t,D)},h}g(Y0,"requirementBox");async function Ee(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=xt(),o=a.htmlLabels??!0,s=await dr(n,_s(Hr(t)),{width:er(t,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(Ee,"addText");var QL=g(e=>{switch(e){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 j0(e,t,{config:r}){var R,L;const{labelStyles:i,nodeStyles:n}=J(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:c,label:l}=await ct(e,t,st(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.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#",t.ticket),f=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,m;f?{label:p,bbox:m}=await Ao(f,"ticket"in t&&t.ticket||"",d):{label:p,bbox:m}=await Ao(s,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await Ao(s,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,C=(t==null?void 0:t.width)||0,k=Math.max(m.height,x.height)/2,w=Math.max(c.height+b*2,(t==null?void 0:t.height)||0)+k,_=-C/2,v=-w/2;l.attr("transform","translate("+(h-C/2)+", "+(-k-c.height/2)+")"),p.attr("transform","translate("+(h-C/2)+", "+(-k+c.height/2)+")"),y.attr("transform","translate("+(h+C/2-x.width-2*a)+", "+(-k+c.height/2)+")");let D;const{rx:N,ry:O}=t,{cssStyles:T}=t;if(t.look==="handDrawn"){const M=X.svg(s),F=K(t,{}),B=N||O?M.path(ir(_,v,C,w,N||0),F):M.rectangle(_,v,C,w,F);D=s.insert(()=>B,":first-child"),D.attr("class","basic label-container").attr("style",T||null)}else{D=s.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",n).attr("rx",N??5).attr("ry",O??5).attr("x",_).attr("y",v).attr("width",C).attr("height",w);const M="priority"in t&&t.priority;if(M){const F=s.append("line"),B=_+2,$=v+Math.floor((N??0)/2),E=v+w-Math.floor((N??0)/2);F.attr("x1",B).attr("y1",$).attr("x2",B).attr("y2",E).attr("stroke-width","4").attr("stroke",QL(M))}}return Q(t,D),t.height=w,t.intersect=function(M){return V.rect(t,M)},s}g(j0,"kanbanItem");var JL=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:M0},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:v0},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:A0},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:F0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Km},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Um},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:C0},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:n0},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:p0},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:d0},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:I0},{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:u0},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Jm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:O0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:qm},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:S0},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:E0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:B0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:r0},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:a0},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Gm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Vm},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Xm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:g0},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:z0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:i0},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:R0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:m0},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Zm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Qm},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:N0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:q0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:t0},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:P0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:e0},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:T0},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:b0},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:x0},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Wm},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:jm},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:D0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:$0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:W0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:w0},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:y0}],tB=g(()=>{const t=[...Object.entries({state:L0,choice:Hm,note:_0,rectWithTitle:k0,labelRect:f0,iconSquare:c0,iconCircle:o0,icon:s0,iconRounded:l0,imageSquare:h0,anchor:zm,kanbanItem:j0,classBox:U0,erBox:Oc,requirementBox:Y0}),...JL.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),G0=tB();function eB(e){return e in G0}g(eB,"isValidShape");var Hs=new Map;async function V0(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?G0[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Hs.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(V0,"insertNode");var f3=g((e,t)=>{Hs.set(t.id,e)},"setNodeElem"),d3=g(()=>{Hs.clear()},"clear"),p3=g(e=>{const t=Hs.get(e.id);I.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),rB=g((e,t,r,i,n,a)=>{t.arrowTypeStart&&qu(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&qu(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),iB={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}},qu=g((e,t,r,i,n,a,o)=>{var u;const s=iB[r];if(!s){I.warn(`Unknown arrow type: ${r}`);return}const c=s.type,h=`${n}_${a}-${c}${t==="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)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),ps=new Map,qt=new Map,g3=g(()=>{ps.clear(),qt.clear()},"clear"),tn=g(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),nB=g(async(e,t)=>{let r=Dt(xt().flowchart.htmlLabels);const i=await dr(e,t.label,{style:tn(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});I.info("abc82",t,t.labelType);const n=e.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(t.id,n),t.width=o.width,t.height=o.height;let s;if(t.startLabelLeft){const c=await Sr(t.startLabelLeft,tn(t.labelStyle)),l=e.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(t.id)||qt.set(t.id,{}),qt.get(t.id).startLeft=l,ln(s,t.startLabelLeft)}if(t.startLabelRight){const c=await Sr(t.startLabelRight,tn(t.labelStyle)),l=e.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(t.id)||qt.set(t.id,{}),qt.get(t.id).startRight=l,ln(s,t.startLabelRight)}if(t.endLabelLeft){const c=await Sr(t.endLabelLeft,tn(t.labelStyle)),l=e.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(t.id)||qt.set(t.id,{}),qt.get(t.id).endLeft=l,ln(s,t.endLabelLeft)}if(t.endLabelRight){const c=await Sr(t.endLabelRight,tn(t.labelStyle)),l=e.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(t.id)||qt.set(t.id,{}),qt.get(t.id).endRight=l,ln(s,t.endLabelRight)}return i},"insertEdgeLabel");function ln(e,t){xt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(ln,"setTerminalWidth");var aB=g((e,t)=>{I.debug("Moving label abc88 ",e.id,e.label,ps.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=xt(),{subGraphTitleTotalMargin:n}=Vl(i);if(e.label){const a=ps.get(e.id);let o=e.x,s=e.y;if(r){const c=$e.calcLabelPosition(r);I.debug("Moving label "+e.label+" from (",o,",",s,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(o=c.x,s=c.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(e.startLabelLeft){const a=qt.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const c=$e.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const a=qt.get(e.id).startRight;let o=e.x,s=e.y;if(r){const c=$e.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const a=qt.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const c=$e.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const a=qt.get(e.id).endRight;let o=e.x,s=e.y;if(r){const c=$e.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),sB=g((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return n>=o||a>=s},"outsideNode"),oB=g((e,t,r)=>{I.debug(`intersection calc abc89:
|
||
outsidePoint: ${JSON.stringify(t)}
|
||
insidePoint : ${JSON.stringify(r)}
|
||
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-a:o+a;const c=e.height/2,l=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*o>Math.abs(i-t.x)*c){let u=r.y<t.y?t.y-c-n:n-c-t.y;s=h*u/l;const f={x:r.x<t.x?r.x+s:r.x-h+s,y:r.y<t.y?r.y+l-u:r.y-l+u};return s===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),l===0&&(f.y=t.y),I.debug(`abc89 top/bottom calc, Q ${l}, q ${u}, R ${h}, r ${s}`,f),f}else{r.x<t.x?s=t.x-o-i:s=i-o-t.x;let u=l*s/h,f=r.x<t.x?r.x+h-s:r.x-h+s,d=r.y<t.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=t.x,d=t.y),h===0&&(f=t.x),l===0&&(d=t.y),{x:f,y:d}}},"intersection"),Hu=g((e,t)=>{I.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(I.info("abc88 checking point",a,t),!sB(t,a)&&!n){const o=oB(t,i,a);I.debug("abc88 inside",a,i,o),I.debug("abc88 intersection",o,t);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 X0(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],o=e[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)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(X0,"extractCornerPoints");var Uu=g(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),lB=g(function(e){const{cornerPointPositions:t}=X0(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],o=e[i],s=Uu(n,o,5),c=Uu(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(e[i]);return r},"fixCorners"),cB=g(function(e,t,r,i,n,a,o){var N;const{handDrawnSeed:s}=xt();let c=t.points,l=!1;const h=n;var u=a;const f=[];for(const O in t.cssCompiledStyles)up(O)||f.push(t.cssCompiledStyles[O]);u.intersect&&h.intersect&&(c=c.slice(1,t.points.length-1),c.unshift(h.intersect(c[0])),I.debug("Last point APA12",t.start,"-->",t.end,c[c.length-1],u,u.intersect(c[c.length-1])),c.push(u.intersect(c[c.length-1]))),t.toCluster&&(I.info("to cluster abc88",r.get(t.toCluster)),c=Hu(t.points,r.get(t.toCluster).node),l=!0),t.fromCluster&&(I.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Hu(c.reverse(),r.get(t.fromCluster).node).reverse(),l=!0);let d=c.filter(O=>!Number.isNaN(O.y));d=lB(d);let p=xa;switch(p=Ka,t.curve){case"linear":p=Ka;break;case"basis":p=xa;break;case"cardinal":p=mg;break;case"bumpX":p=ug;break;case"bumpY":p=fg;break;case"catmullRom":p=xg;break;case"monotoneX":p=vg;break;case"monotoneY":p=Sg;break;case"natural":p=Mg;break;case"step":p=Ag;break;case"stepAfter":p=Bg;break;case"stepBefore":p=Lg;break;default:p=xa}const{x:m,y}=D1(t),x=iS().x(m).y(y).curve(p);let b;switch(t.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(t.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,k=x(d);const w=Array.isArray(t.style)?t.style:t.style?[t.style]:[];let _=w.find(O=>O==null?void 0:O.startsWith("stroke:"));if(t.look==="handDrawn"){const O=X.svg(e);Object.assign([],d);const T=O.path(k,{roughness:.3,seed:s});b+=" transition",C=gt(T).select("path").attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",w?w.reduce((L,M)=>L+";"+M,""):"");let R=C.attr("d");C.attr("d",R),e.node().appendChild(C.node())}else{const O=f.join(";"),T=w?w.reduce((M,F)=>M+F+";",""):"";let R="";t.animate&&(R=" edge-animation-fast"),t.animation&&(R=" edge-animation-"+t.animation);const L=O?O+";"+T+";":T;C=e.append("path").attr("d",k).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")+(R??"")).attr("style",L),_=(N=L.match(/stroke:([^;]+)/))==null?void 0:N[1]}let v="";(xt().flowchart.arrowMarkerAbsolute||xt().state.arrowMarkerAbsolute)&&(v=Mf(!0)),I.info("arrowTypeStart",t.arrowTypeStart),I.info("arrowTypeEnd",t.arrowTypeEnd),rB(C,t,v,o,i,_);let D={};return l&&(D.updatedPath=c),D.originalPath=t.points,D},"insertEdge"),hB=g((e,t,r,i)=>{t.forEach(n=>{TB[n](e,r,i)})},"insertMarkers"),uB=g((e,t,r)=>{I.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).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"),fB=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).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"),dB=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).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"),pB=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).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"),gB=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).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),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).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"),mB=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).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"),yB=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).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"),xB=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).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"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).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"),bB=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),_B=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).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"),CB=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).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=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).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"),wB=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).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((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).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=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).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"),vB=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),SB=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),TB={extension:uB,composition:fB,aggregation:dB,dependency:pB,lollipop:gB,point:mB,circle:yB,cross:xB,barb:bB,only_one:_B,zero_or_one:CB,one_or_more:wB,zero_or_more:kB,requirement_arrow:vB,requirement_contains:SB},MB=hB,AB={common:Ai,getConfig:he,insertCluster:RL,insertEdge:cB,insertEdgeLabel:nB,insertMarkers:MB,insertNode:V0,interpolateToCurve:mc,labelHelper:ct,log:I,positionEdgeLabel:aB},Tn={},Z0=g(e=>{for(const t of e)Tn[t.name]=t},"registerLayoutLoaders"),LB=g(()=>{Z0([{name:"dagre",loader:g(async()=>await wt(()=>import("./dagre-JOIXM2OF-TJIjXE8i.js"),__vite__mapDeps([11,12,13,14,15,16,3,2,4,1,5,6])),"loader")}])},"registerDefaultLayoutLoaders");LB();var m3=g(async(e,t)=>{if(!(e.layoutAlgorithm in Tn))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Tn[e.layoutAlgorithm];return(await r.loader()).render(e,t,AB,{algorithm:r.algorithm})},"render"),y3=g((e="",{fallback:t="dagre"}={})=>{if(e in Tn)return e;if(t in Tn)return I.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Yu={version:"11.9.0"},BB=g(e=>{var n;const{securityLevel:t}=xt();let r=gt("body");if(t==="sandbox"){const o=((n=gt(`#i${e}`).node())==null?void 0:n.contentDocument)??document;r=gt(o.body)}return r.select(`#${e}`)},"selectSvgElement"),K0="comm",Q0="rule",J0="decl",EB="@import",FB="@namespace",$B="@keyframes",DB="@layer",ty=Math.abs,Rc=String.fromCharCode;function ey(e){return e.trim()}function wa(e,t,r){return e.replace(t,r)}function OB(e,t,r){return e.indexOf(t,r)}function si(e,t){return e.charCodeAt(t)|0}function Ti(e,t,r){return e.slice(t,r)}function Fe(e){return e.length}function RB(e){return e.length}function aa(e,t){return t.push(e),e}var Us=1,Mi=1,ry=0,xe=0,Et=0,$i="";function Ic(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Us,column:Mi,length:o,return:"",siblings:s}}function IB(){return Et}function PB(){return Et=xe>0?si($i,--xe):0,Mi--,Et===10&&(Mi=1,Us--),Et}function ke(){return Et=xe<ry?si($i,xe++):0,Mi++,Et===10&&(Mi=1,Us++),Et}function sr(){return si($i,xe)}function ka(){return xe}function Ys(e,t){return Ti($i,e,t)}function Mn(e){switch(e){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 NB(e){return Us=Mi=1,ry=Fe($i=e),xe=0,[]}function zB(e){return $i="",e}function Lo(e){return ey(Ys(xe-1,Tl(e===91?e+2:e===40?e+1:e)))}function WB(e){for(;(Et=sr())&&Et<33;)ke();return Mn(e)>2||Mn(Et)>3?"":" "}function qB(e,t){for(;--t&&ke()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return Ys(e,ka()+(t<6&&sr()==32&&ke()==32))}function Tl(e){for(;ke();)switch(Et){case e:return xe;case 34:case 39:e!==34&&e!==39&&Tl(Et);break;case 40:e===41&&Tl(e);break;case 92:ke();break}return xe}function HB(e,t){for(;ke()&&e+Et!==57;)if(e+Et===84&&sr()===47)break;return"/*"+Ys(t,xe-1)+"*"+Rc(e===47?e:ke())}function UB(e){for(;!Mn(sr());)ke();return Ys(e,xe)}function YB(e){return zB(va("",null,null,null,[""],e=NB(e),0,[0],e))}function va(e,t,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="",k=n,w=a,_=i,v=C;y;)switch(p=b,b=ke()){case 40:if(p!=108&&si(v,u-1)==58){OB(v+=wa(Lo(b),"&","&\f"),"&\f",ty(l?s[l-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:v+=Lo(b);break;case 9:case 10:case 13:case 32:v+=WB(p);break;case 92:v+=qB(ka()-1,7);continue;case 47:switch(sr()){case 42:case 47:aa(jB(HB(ke(),ka()),t,r,c),c),(Mn(p||1)==5||Mn(sr()||1)==5)&&Fe(v)&&Ti(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:s[l++]=Fe(v)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(v=wa(v,/\f/g,"")),d>0&&(Fe(v)-u||m===0&&p===47)&&aa(d>32?Gu(v+";",i,r,u-1,c):Gu(wa(v," ","")+";",i,r,u-2,c),c);break;case 59:v+=";";default:if(aa(_=ju(v,t,r,l,h,n,s,C,k=[],w=[],u,a),a),b===123)if(h===0)va(v,t,_,_,k,a,u,s,w);else{switch(f){case 99:if(si(v,3)===110)break;case 108:if(si(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?va(e,_,_,i&&aa(ju(e,_,_,0,0,n,s,C,n,k=[],u,w),w),n,w,u,s,i?k:w):va(v,_,_,_,[""],w,0,s,w)}}l=h=d=0,m=x=1,C=v="",u=o;break;case 58:u=1+Fe(v),d=p;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&PB()==125)continue}switch(v+=Rc(b),b*m){case 38:x=h>0?1:(v+="\f",-1);break;case 44:s[l++]=(Fe(v)-1)*x,x=1;break;case 64:sr()===45&&(v+=Lo(ke())),f=sr(),h=u=Fe(C=v+=UB(ka())),b++;break;case 45:p===45&&Fe(v)==2&&(m=0)}}return a}function ju(e,t,r,i,n,a,o,s,c,l,h,u){for(var f=n-1,d=n===0?a:[""],p=RB(d),m=0,y=0,x=0;m<i;++m)for(var b=0,C=Ti(e,f+1,f=ty(y=o[m])),k=e;b<p;++b)(k=ey(y>0?d[b]+" "+C:wa(C,/&\f/g,d[b])))&&(c[x++]=k);return Ic(e,t,r,n===0?Q0:s,c,l,h,u)}function jB(e,t,r,i){return Ic(e,t,r,K0,Rc(IB()),Ti(e,2,-2),0,i)}function Gu(e,t,r,i,n){return Ic(e,t,r,J0,Ti(e,0,i),Ti(e,i+1,-1),i,n)}function Ml(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function GB(e,t,r,i){switch(e.type){case DB:if(e.children.length)break;case EB:case FB:case J0:return e.return=e.return||e.value;case K0:return"";case $B:return e.return=e.value+"{"+Ml(e.children,i)+"}";case Q0:if(!Fe(e.value=e.props.join(",")))return""}return Fe(r=Ml(e.children,i))?e.return=e.value+"{"+r+"}":""}var VB=Dg(Object.keys,Object),XB=Object.prototype,ZB=XB.hasOwnProperty;function KB(e){if(!Os(e))return VB(e);var t=[];for(var r in Object(e))ZB.call(e,r)&&r!="constructor"&&t.push(r);return t}var Al=qr(Pe,"DataView"),Ll=qr(Pe,"Promise"),Bl=qr(Pe,"Set"),El=qr(Pe,"WeakMap"),Vu="[object Map]",QB="[object Object]",Xu="[object Promise]",Zu="[object Set]",Ku="[object WeakMap]",Qu="[object DataView]",JB=Wr(Al),tE=Wr(Sn),eE=Wr(Ll),rE=Wr(Bl),iE=Wr(El),_r=Bi;(Al&&_r(new Al(new ArrayBuffer(1)))!=Qu||Sn&&_r(new Sn)!=Vu||Ll&&_r(Ll.resolve())!=Xu||Bl&&_r(new Bl)!=Zu||El&&_r(new El)!=Ku)&&(_r=function(e){var t=Bi(e),r=t==QB?e.constructor:void 0,i=r?Wr(r):"";if(i)switch(i){case JB:return Qu;case tE:return Vu;case eE:return Xu;case rE:return Zu;case iE:return Ku}return t});var nE="[object Map]",aE="[object Set]",sE=Object.prototype,oE=sE.hasOwnProperty;function Ju(e){if(e==null)return!0;if(Rs(e)&&(ns(e)||typeof e=="string"||typeof e.splice=="function"||pc(e)||gc(e)||is(e)))return!e.length;var t=_r(e);if(t==nE||t==aE)return!e.size;if(Os(e))return!KB(e).length;for(var r in e)if(oE.call(e,r))return!1;return!0}var iy="c4",lE=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),cE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./c4Diagram-6F6E4RAY-DU07Q7eR.js");return{diagram:t}},__vite__mapDeps([17,18,3,2,4,1,5,6]));return{id:iy,diagram:e}},"loader"),hE={id:iy,detector:lE,loader:cE},uE=hE,ny="flowchart",fE=g((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),dE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./flowDiagram-KYDEHFYC-D8EOpOOV.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,3,2,4,1,5,6]));return{id:ny,diagram:e}},"loader"),pE={id:ny,detector:fE,loader:dE},gE=pE,ay="flowchart-v2",mE=g((e,t)=>{var r,i,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),yE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./flowDiagram-KYDEHFYC-D8EOpOOV.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,3,2,4,1,5,6]));return{id:ay,diagram:e}},"loader"),xE={id:ay,detector:mE,loader:yE},bE=xE,sy="er",_E=g(e=>/^\s*erDiagram/.test(e),"detector"),CE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./erDiagram-3M52JZNH-DQbld-WT.js");return{diagram:t}},__vite__mapDeps([23,21,22,3,2,4,1,5,6]));return{id:sy,diagram:e}},"loader"),wE={id:sy,detector:_E,loader:CE},kE=wE,oy="gitGraph",vE=g(e=>/^\s*gitGraph/.test(e),"detector"),SE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-GW3U2K7C-D8ZFpzJQ.js");return{diagram:t}},__vite__mapDeps([24,25,26,27,3,2,4,1,5,6,13,15,16]));return{id:oy,diagram:e}},"loader"),TE={id:oy,detector:vE,loader:SE},ME=TE,ly="gantt",AE=g(e=>/^\s*gantt/.test(e),"detector"),LE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./ganttDiagram-EK5VF46D-CEsfHCEW.js");return{diagram:t}},__vite__mapDeps([28,2,3,4,1,5,6]));return{id:ly,diagram:e}},"loader"),BE={id:ly,detector:AE,loader:LE},EE=BE,cy="info",FE=g(e=>/^\s*info/.test(e),"detector"),$E=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./infoDiagram-LHK5PUON-CZvb1pXZ.js");return{diagram:t}},__vite__mapDeps([29,27,3,2,4,1,5,6,13,15,16]));return{id:cy,diagram:e}},"loader"),DE={id:cy,detector:FE,loader:$E},hy="pie",OE=g(e=>/^\s*pie/.test(e),"detector"),RE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./pieDiagram-NIOCPIFQ-C7z8k970.js");return{diagram:t}},__vite__mapDeps([30,25,27,3,2,4,1,5,6,13,15,16]));return{id:hy,diagram:e}},"loader"),IE={id:hy,detector:OE,loader:RE},uy="quadrantChart",PE=g(e=>/^\s*quadrantChart/.test(e),"detector"),NE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./quadrantDiagram-2OG54O6I-BXCoDa9l.js");return{diagram:t}},__vite__mapDeps([31,3,2,4,1,5,6]));return{id:uy,diagram:e}},"loader"),zE={id:uy,detector:PE,loader:NE},WE=zE,fy="xychart",qE=g(e=>/^\s*xychart-beta/.test(e),"detector"),HE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./xychartDiagram-H2YORKM3-B0TOjdzl.js");return{diagram:t}},__vite__mapDeps([32,3,2,4,1,5,6]));return{id:fy,diagram:e}},"loader"),UE={id:fy,detector:qE,loader:HE},YE=UE,dy="requirement",jE=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),GE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./requirementDiagram-QOLK2EJ7-B__E5UB_.js");return{diagram:t}},__vite__mapDeps([33,21,22,3,2,4,1,5,6]));return{id:dy,diagram:e}},"loader"),VE={id:dy,detector:jE,loader:GE},XE=VE,py="sequence",ZE=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),KE=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./sequenceDiagram-SKLFT4DO-D2MvwKuy.js");return{diagram:t}},__vite__mapDeps([34,18,26,3,2,4,1,5,6]));return{id:py,diagram:e}},"loader"),QE={id:py,detector:ZE,loader:KE},JE=QE,gy="class",tF=g((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),eF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./classDiagram-M3E45YP4-B4dktJcc.js");return{diagram:t}},__vite__mapDeps([35,36,20,21,22,3,2,4,1,5,6]));return{id:gy,diagram:e}},"loader"),rF={id:gy,detector:tF,loader:eF},iF=rF,my="classDiagram",nF=g((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),aF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./classDiagram-v2-YAWTLIQI-B4dktJcc.js");return{diagram:t}},__vite__mapDeps([37,36,20,21,22,3,2,4,1,5,6]));return{id:my,diagram:e}},"loader"),sF={id:my,detector:nF,loader:aF},oF=sF,yy="state",lF=g((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),cF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./stateDiagram-MI5ZYTHO-SxSNvRlg.js");return{diagram:t}},__vite__mapDeps([38,39,21,22,12,13,14,15,3,2,4,1,5,6]));return{id:yy,diagram:e}},"loader"),hF={id:yy,detector:lF,loader:cF},uF=hF,xy="stateDiagram",fF=g((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),dF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-5AN5P6BG-B4I2qWOX.js");return{diagram:t}},__vite__mapDeps([40,39,21,22,3,2,4,1,5,6]));return{id:xy,diagram:e}},"loader"),pF={id:xy,detector:fF,loader:dF},gF=pF,by="journey",mF=g(e=>/^\s*journey/.test(e),"detector"),yF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./journeyDiagram-EWQZEKCU-BP0DU_a_.js");return{diagram:t}},__vite__mapDeps([41,18,20,3,2,4,1,5,6]));return{id:by,diagram:e}},"loader"),xF={id:by,detector:mF,loader:yF},bF=xF,_F=g((e,t,r)=>{I.debug(`rendering svg for syntax error
|
||
`);const i=BB(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Af(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"),_y={draw:_F},CF=_y,wF={db:{},renderer:_y,parser:{parse:g(()=>{},"parse")}},kF=wF,Cy="flowchart-elk",vF=g((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),SF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./flowDiagram-KYDEHFYC-D8EOpOOV.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,3,2,4,1,5,6]));return{id:Cy,diagram:e}},"loader"),TF={id:Cy,detector:vF,loader:SF},MF=TF,wy="timeline",AF=g(e=>/^\s*timeline/.test(e),"detector"),LF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./timeline-definition-MYPXXCX6-C_3CI0NE.js");return{diagram:t}},__vite__mapDeps([42,3,2,4,1,5,6]));return{id:wy,diagram:e}},"loader"),BF={id:wy,detector:AF,loader:LF},EF=BF,ky="mindmap",FF=g(e=>/^\s*mindmap/.test(e),"detector"),$F=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./mindmap-definition-6CBA2TL7-CPiz8UdX.js");return{diagram:t}},__vite__mapDeps([43,44,2,3,4,1,5,6]));return{id:ky,diagram:e}},"loader"),DF={id:ky,detector:FF,loader:$F},OF=DF,vy="kanban",RF=g(e=>/^\s*kanban/.test(e),"detector"),IF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./kanban-definition-ZSS6B67P-DAM3b6wz.js");return{diagram:t}},__vite__mapDeps([45,20,3,2,4,1,5,6]));return{id:vy,diagram:e}},"loader"),PF={id:vy,detector:RF,loader:IF},NF=PF,Sy="sankey",zF=g(e=>/^\s*sankey-beta/.test(e),"detector"),WF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./sankeyDiagram-4UZDY2LN-B0ppwXxt.js");return{diagram:t}},__vite__mapDeps([46,3,2,4,1,5,6]));return{id:Sy,diagram:e}},"loader"),qF={id:Sy,detector:zF,loader:WF},HF=qF,Ty="packet",UF=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),YF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./diagram-5UYTHUR4-CGUPuNu1.js");return{diagram:t}},__vite__mapDeps([47,25,27,3,2,4,1,5,6,13,15,16]));return{id:Ty,diagram:e}},"loader"),jF={id:Ty,detector:UF,loader:YF},My="radar",GF=g(e=>/^\s*radar-beta/.test(e),"detector"),VF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./diagram-ZTM2IBQH-DTNQ4jMU.js");return{diagram:t}},__vite__mapDeps([48,25,27,3,2,4,1,5,6,13,15,16]));return{id:My,diagram:e}},"loader"),XF={id:My,detector:GF,loader:VF},Ay="block",ZF=g(e=>/^\s*block-beta/.test(e),"detector"),KF=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./blockDiagram-6J76NXCF-5ERD9lwW.js");return{diagram:t}},__vite__mapDeps([49,20,16,13,12,3,2,4,1,5,6]));return{id:Ay,diagram:e}},"loader"),QF={id:Ay,detector:ZF,loader:KF},JF=QF,Ly="architecture",t$=g(e=>/^\s*architecture/.test(e),"detector"),e$=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./architectureDiagram-SUXI7LT5-ChY7B0zU.js");return{diagram:t}},__vite__mapDeps([50,25,26,27,3,2,4,1,5,6,13,15,16,44]));return{id:Ly,diagram:e}},"loader"),r$={id:Ly,detector:t$,loader:e$},i$=r$,By="treemap",n$=g(e=>/^\s*treemap/.test(e),"detector"),a$=g(async()=>{const{diagram:e}=await wt(async()=>{const{diagram:t}=await import("./diagram-VMROVX33-D2nCNLh0.js");return{diagram:t}},__vite__mapDeps([51,22,25,27,3,2,4,1,5,6,13,15,16]));return{id:By,diagram:e}},"loader"),s$={id:By,detector:n$,loader:a$},tf=!1,js=g(()=>{tf||(tf=!0,Aa("error",kF,e=>e.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")},e=>e.toLowerCase().trimStart().startsWith("---")),Do(MF,OF,i$),Do(uE,NF,oF,iF,kE,EE,DE,IE,XE,JE,bE,gE,EF,ME,gF,uF,bF,WE,HF,jF,YE,JF,XF,s$))},"addDiagrams"),o$=g(async()=>{I.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ar).map(async([r,{detector:i,loader:n}])=>{if(n)try{Po(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 Ar[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){I.error(`Failed to load ${t.length} external diagrams`);for(const r of t)I.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),l$="graphics-document document";function Ey(e,t){e.attr("role",l$),t!==""&&e.attr("aria-roledescription",t)}g(Ey,"setA11yDiagramInfo");function Fy(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}g(Fy,"addSVGa11yTitleDescription");var Mr,Fl=(Mr=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){var l,h;const i=he(),n=Ol(t,i);t=aA(t)+`
|
||
`;try{Po(n)}catch{const u=Ox(n);if(!u)throw new pf(`Diagram ${n} not found.`);const{id:f,diagram:d}=await u();Aa(f,d)}const{db:a,parser:o,renderer:s,init:c}=Po(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(t),new Mr(n,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(Mr,"Diagram"),Mr),ef=[],c$=g(()=>{ef.forEach(e=>{e()}),ef=[]},"attachFunctions"),h$=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function $y(e){const t=e.match(df);if(!t)return{text:e,metadata:{}};let r=$1(t[1],{schema:F1})??{};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:e.slice(t[0].length),metadata:i}}g($y,"extractFrontMatter");var u$=g(e=>e.replace(/\r\n?/g,`
|
||
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),f$=g(e=>{const{text:t,metadata:r}=$y(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),d$=g(e=>{const t=$e.detectInit(e)??{},r=$e.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:jM(e),directive:t}},"processDirectives");function Pc(e){const t=u$(e),r=f$(t),i=d$(r.text),n=Cc(r.config,i.directive);return e=h$(i.text),{code:e,title:r.title,config:n}}g(Pc,"preprocessDiagram");function Dy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(Dy,"toBase64");var p$=5e4,g$="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",m$="sandbox",y$="loose",x$="http://www.w3.org/2000/svg",b$="http://www.w3.org/1999/xlink",_$="http://www.w3.org/1999/xhtml",C$="100%",w$="100%",k$="border:0;margin:0;",v$="margin:0",S$="allow-top-navigation-by-user-activation allow-popups",T$='The "iframe" tag is not supported by your browser.',M$=["foreignobject"],A$=["dominant-baseline"];function Nc(e){const t=Pc(e);return Ta(),Kx(t.config??{}),t}g(Nc,"processAndSetConfigs");async function Oy(e,t){js();try{const{code:r,config:i}=Nc(e);return{diagramType:(await Iy(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}g(Oy,"parse");var rf=g((e,t,r=[])=>`
|
||
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),L$=g((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
|
||
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
||
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
||
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(c=>{Ju(c.styles)||s.forEach(l=>{r+=rf(c.id,l,c.styles)}),Ju(c.textStyles)||(r+=rf(c.id,"tspan",((c==null?void 0:c.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),B$=g((e,t,r,i)=>{const n=L$(e,r),a=gb(t,n,e.themeVariables);return Ml(YB(`${i}{${a}}`),GB)},"createUserStyles"),E$=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Hr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),F$=g((e="",t)=>{var n,a;const r=(a=(n=t==null?void 0:t.viewBox)==null?void 0:n.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":w$,i=Dy(`<body style="${v$}">${e}</body>`);return`<iframe style="width:${C$};height:${r};${k$}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${S$}">
|
||
${T$}
|
||
</iframe>`},"putIntoIFrame"),nf=g((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",x$);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function $l(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g($l,"sandboxedIframe");var $$=g((e,t,r,i)=>{var n,a,o;(n=e.getElementById(t))==null||n.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),D$=g(async function(e,t,r){var R,L,M,F,B,$;js();const i=Nc(t);t=i.code;const n=he();I.debug(n),t.length>((n==null?void 0:n.maxTextSize)??p$)&&(t=g$);const a="#"+e,o="i"+e,s="#"+o,c="d"+e,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===m$,d=n.securityLevel===y$,p=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const E=$l(gt(r),o);u=gt(E.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=gt(r);nf(u,e,c,`font-family: ${p}`,b$)}else{if($$(document,e,c,o),f){const E=$l(gt("body"),o);u=gt(E.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=gt("body");nf(u,e,c)}let m,y;try{m=await Fl.fromText(t,{title:i.title})}catch(E){if(n.suppressErrorRendering)throw h(),E;m=await Fl.fromText("error"),y=E}const x=u.select(l).node(),b=m.type,C=x.firstChild,k=C.firstChild,w=(L=(R=m.renderer).getClasses)==null?void 0:L.call(R,t,m),_=B$(n,b,w,a),v=document.createElement("style");v.innerHTML=_,C.insertBefore(v,k);try{await m.renderer.draw(t,e,Yu.version,m)}catch(E){throw n.suppressErrorRendering?h():CF.draw(t,e,Yu.version),E}const D=u.select(`${l} svg`),N=(F=(M=m.db).getAccTitle)==null?void 0:F.call(M),O=($=(B=m.db).getAccDescription)==null?void 0:$.call(B);Py(b,D,N,O),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",_$);let T=u.select(l).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),T=E$(T,f,Dt(n.arrowMarkerAbsolute)),f){const E=u.select(l+" svg").node();T=F$(T,E)}else d||(T=gi.sanitize(T,{ADD_TAGS:M$,ADD_ATTR:A$,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(c$(),y)throw y;return h(),{diagramType:b,svg:T,bindFunctions:m.db.bindFunctions}},"render");function Ry(e={}){var i;const t=Ht({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Xx(t),t!=null&&t.theme&&t.theme in Ze?t.themeVariables=Ze[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ze.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Vx(t):_f();Dl(r.logLevel),js()}g(Ry,"initialize");var Iy=g((e,t={})=>{const{code:r}=Pc(e);return Fl.fromText(r,t)},"getDiagramFromText");function Py(e,t,r,i){Ey(t,e),Fy(t,r,i,t.attr("id"))}g(Py,"addA11yInfo");var Rr=Object.freeze({render:D$,parse:Oy,getDiagramFromText:Iy,initialize:Ry,getConfig:he,setConfig:Cf,getSiteConfig:_f,updateSiteConfig:Zx,reset:g(()=>{Ta()},"reset"),globalReset:g(()=>{Ta(mi)},"globalReset"),defaultConfig:mi});Dl(he().logLevel);Ta(he());var O$=g((e,t,r)=>{I.warn(e),_c(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Ny=g(async function(e={querySelector:".mermaid"}){try{await R$(e)}catch(t){if(_c(t)&&I.error(t.str),fe.parseError&&fe.parseError(t),!e.suppressErrors)throw I.error("Use the suppressErrors option to suppress these errors"),t}},"run"),R$=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Rr.getConfig();I.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);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)),Rr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new $e.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=um($e.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=$e.detectInit(o);h&&I.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Hy(l,o,c);c.innerHTML=u,e&&await e(l),f&&f(c)}catch(u){O$(u,s,fe.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),zy=g(function(e){Rr.initialize(e)},"initialize"),I$=g(async function(e,t,r){I.warn("mermaid.init is deprecated. Please use run instead."),e&&zy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Ny(i)},"init"),P$=g(async(e,{lazyLoad:t=!0}={})=>{js(),Do(...e),t===!1&&await o$()},"registerExternalDiagrams"),Wy=g(function(){if(fe.startOnLoad){const{startOnLoad:e}=Rr.getConfig();e&&fe.run().catch(t=>I.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Wy,!1);var N$=g(function(e){fe.parseError=e},"setParseErrorHandler"),gs=[],Bo=!1,qy=g(async()=>{if(!Bo){for(Bo=!0;gs.length>0;){const e=gs.shift();if(e)try{await e()}catch(t){I.error("Error executing queue",t)}}Bo=!1}},"executeQueue"),z$=g(async(e,t)=>new Promise((r,i)=>{const n=g(()=>new Promise((a,o)=>{Rr.parse(e,t).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),qy().catch(i)}),"parse"),Hy=g((e,t,r)=>new Promise((i,n)=>{const a=g(()=>new Promise((o,s)=>{Rr.render(e,t,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),qy().catch(n)}),"render"),W$=g(()=>Object.keys(Ar).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),fe={startOnLoad:!0,mermaidAPI:Rr,parse:z$,render:Hy,init:I$,run:Ny,registerExternalDiagrams:P$,registerLayoutLoaders:Z0,initialize:zy,parseError:void 0,contentLoaded:Wy,setParseErrorHandler:N$,detectType:Ol,registerIconPacks:cL,getRegisteredDiagramsMetadata:W$},x3=fe;/*! Check if previously processed *//*!
|
||
* Wait for document loaded before starting the execution
|
||
*/export{mh as $,V$ as A,Y$ as B,hn as C,$x as D,vb as E,Cc as F,he as G,xf as H,KM as I,F1 as J,BB as K,Yu as L,Is as M,i3 as N,Kp as O,n3 as P,Wx as Q,Tk as R,yk as S,uL as T,iS as U,xi as V,j$ as W,Mf as X,Rl as Y,qM as Z,g as _,xb as a,NM as a$,xa as a0,ZM as a1,Ln as a2,fb as a3,An as a4,G as a5,it as a6,Lf as a7,RL as a8,V0 as a9,Ju as aA,In as aB,cL as aC,lL as aD,e3 as aE,Z$ as aF,X$ as aG,J$ as aH,nx as aI,Q$ as aJ,ag as aK,oc as aL,Ls as aM,Dk as aN,$k as aO,vi as aP,Fk as aQ,Ek as aR,Va as aS,$n as aT,ac as aU,nc as aV,ei as aW,Ga as aX,K$ as aY,r3 as aZ,zr as a_,p3 as aa,D1 as ab,Dt as ac,dr as ad,Vl as ae,km as af,Hr as ag,Zg as ah,Vp as ai,Zp as aj,t3 as ak,J as al,up as am,MB as an,d3 as ao,g3 as ap,u3 as aq,Q as ar,f3 as as,cB as at,aB as au,nB as av,PM as aw,BT as ax,EM as ay,fc as az,yb as b,qg as b0,Fs as b1,Rs as b2,ns as b3,Ug as b4,Wg as b5,gM as b6,IM as b7,BM as b8,yT as b9,zM as bA,Os as bB,dc as ba,uM as bb,WM as bc,On as bd,Bi as be,es as bf,wM as bg,KB as bh,Dn as bi,is as bj,mM as bk,Og as bl,_T as bm,CT as bn,_r as bo,Cu as bp,wT as bq,pc as br,bT as bs,ST as bt,Ei as bu,fr as bv,mu as bw,gc as bx,Ig as by,Bl as bz,xt as c,gt as d,Af as e,Ht as f,_b as g,er as h,Lr as i,N1 as j,Ai as k,I as l,x3 as m,Qg as n,G$ as o,y3 as p,Cb as q,m3 as r,bb as s,wb as t,$e as u,$1 as v,tA as w,eB as x,a3 as y,mb as z};
|