const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_astro/dagre-FFZHY6LT.D1SJl_SH.js","_astro/graph.Bt6Epte6.js","_astro/_baseUniq.CIX1jY4c.js","_astro/layout.CS8l1B4K.js","_astro/_basePickBy.DPn-_ezb.js","_astro/clone.CLM-ORft.js","_astro/preload-helper.BlTxHScW.js","_astro/_commonjsHelpers.Cpj98o6Y.js","_astro/purify.es.CEVJ7K31.js","_astro/c4Diagram-6F6E4RAY.HgKc2iOi.js","_astro/chunk-67H74DCK.DJH84EVl.js","_astro/flowDiagram-PKI6S5ZS.kSRike6r.js","_astro/chunk-E2GYISFI.BbVTsD6p.js","_astro/chunk-BFAMUDN2.-2t7MceG.js","_astro/chunk-SKB7J2MH.D6YJMXPz.js","_astro/channel.BDqi1C8f.js","_astro/erDiagram-R3QVA2FD.fPaTUScp.js","_astro/gitGraphDiagram-GW3U2K7C.B5Mqzntd.js","_astro/chunk-353BL4L5.Bq8xlR_z.js","_astro/chunk-AACKK3MU.DN9Oy-8p.js","_astro/treemap-6Y5VK53G.CdzqIi_K.js","_astro/ganttDiagram-EK5VF46D.B6hgdNAW.js","_astro/linear.DKhAGgw6.js","_astro/init.Gi6I4Gst.js","_astro/defaultLocale.C4B-KCzX.js","_astro/infoDiagram-XT3IWWJI.DtsC-CrI.js","_astro/pieDiagram-NIOCPIFQ.BwWkPnDU.js","_astro/arc.C6sccq3M.js","_astro/ordinal.BYWQX77i.js","_astro/quadrantDiagram-2OG54O6I.BAigvV59.js","_astro/xychartDiagram-H2YORKM3.Bm13WRgR.js","_astro/requirementDiagram-SO3GGRV7.D48836HX.js","_astro/sequenceDiagram-ZIKVLSP4.p8UNxtjc.js","_astro/classDiagram-BGRH5UQR.DY1x-7Jj.js","_astro/chunk-QEP2MXWD.BxfLUAg0.js","_astro/classDiagram-v2-O24JOBDK.DY1x-7Jj.js","_astro/stateDiagram-XX37X6EN.DErvrWqV.js","_astro/chunk-6OLS64BW.DiDTSqQD.js","_astro/stateDiagram-v2-GD6S3NHB.VJw3EMlU.js","_astro/journeyDiagram-EWQZEKCU.CUKksXeA.js","_astro/timeline-definition-RI47OAVP.DWuziqzF.js","_astro/mindmap-definition-CZNETY7S.b_aL1plu.js","_astro/cytoscape.esm.Cp5tPnx1.js","_astro/kanban-definition-ILFWEQ3N.wxpP_fRX.js","_astro/sankeyDiagram-4UZDY2LN.ClvILdyl.js","_astro/diagram-5UYTHUR4.qzIlNRXW.js","_astro/diagram-ZTM2IBQH.CRVi92Hn.js","_astro/blockDiagram-PHRCVELO.CQVSoVZA.js","_astro/architectureDiagram-NQ2NVSRB.Da4a9gxq.js","_astro/diagram-3EMPZRKU.DTIXvkVm.js"])))=>i.map(i=>d[i]); import{_ as lt}from"./preload-helper.BlTxHScW.js";import{g as qp}from"./_commonjsHelpers.Cpj98o6Y.js";import{p as rr}from"./purify.es.CEVJ7K31.js";var _i={exports:{}},Wp=_i.exports,eo;function Hp(){return eo||(eo=1,function(t,e){(function(r,i){t.exports=i()})(Wp,function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",g="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(L){var B=["th","st","nd","rd"],k=L%100;return"["+L+(B[(k-20)%10]||B[k]||B[0])+"]"}},_=function(L,B,k){var $=String(L);return!$||$.length>=B?L:""+Array(B+1-$.length).join(k)+L},v={s:_,z:function(L){var B=-L.utcOffset(),k=Math.abs(B),$=Math.floor(k/60),M=k%60;return(B<=0?"+":"-")+_($,2,"0")+":"+_(M,2,"0")},m:function L(B,k){if(B.date()1)return L(U[0])}else{var tt=B.name;T[tt]=B,M=tt}return!$&&M&&(w=M),M||!$&&w},R=function(L,B){if(D(L))return L.clone();var k=typeof B=="object"?B:{};return k.date=L,k.args=arguments,new I(k)},A=v;A.l=E,A.i=D,A.w=function(L,B){return R(L,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var I=function(){function L(k){this.$L=E(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[S]=!0}var B=L.prototype;return B.parse=function(k){this.$d=function($){var M=$.date,W=$.utc;if(M===null)return new Date(NaN);if(A.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var U=M.match(y);if(U){var tt=U[2]-1||0,K=(U[7]||"0").substring(0,3);return W?new Date(Date.UTC(U[1],tt,U[3]||1,U[4]||0,U[5]||0,U[6]||0,K)):new Date(U[1],tt,U[3]||1,U[4]||0,U[5]||0,U[6]||0,K)}}return new Date(M)}(k),this.init()},B.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},B.$utils=function(){return A},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(k,$){var M=R(k);return this.startOf($)<=M&&M<=this.endOf($)},B.isAfter=function(k,$){return R(k)t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const n=r<.5?r*(1+e):r+e-r*e,a=2*r-n;switch(i){case"r":return Ci.hue2rgb(a,n,t+1/3)*255;case"g":return Ci.hue2rgb(a,n,t)*255;case"b":return Ci.hue2rgb(a,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),a=Math.min(t,e,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,l=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return l*100;switch(n){case t:return((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},Vp={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Q={channel:Ci,lang:Gp,unit:Vp},ye={};for(let t=0;t<=255;t++)ye[t]=Q.unit.dec2hex(t);const wt={ALL:0,RGB:1,HSL:2};class Up{constructor(){this.type=wt.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=wt.ALL}is(e){return this.type===e}}class Xp{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Up}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=wt.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:i,l:n}=e;r===void 0&&(e.h=Q.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=Q.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=Q.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:i,b:n}=e;r===void 0&&(e.r=Q.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=Q.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=Q.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(wt.HSL)&&r!==void 0?r:(this._ensureHSL(),Q.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(wt.HSL)&&r!==void 0?r:(this._ensureHSL(),Q.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(wt.HSL)&&r!==void 0?r:(this._ensureHSL(),Q.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(wt.RGB)&&r!==void 0?r:(this._ensureRGB(),Q.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(wt.RGB)&&r!==void 0?r:(this._ensureRGB(),Q.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(wt.RGB)&&r!==void 0?r:(this._ensureRGB(),Q.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(wt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(wt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(wt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(wt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(wt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(wt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const yn=new Xp({r:0,g:0,b:0,a:0},"transparent"),Je={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Je.re);if(!e)return;const r=e[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return yn.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:a?(i&h)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${ye[Math.round(e)]}${ye[Math.round(r)]}${ye[Math.round(i)]}${ye[Math.round(n*255)]}`:`#${ye[Math.round(e)]}${ye[Math.round(r)]}${ye[Math.round(i)]}`}},$e={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match($e.hueRe);if(e){const[,r,i]=e;switch(i){case"grad":return Q.channel.clamp.h(parseFloat(r)*.9);case"rad":return Q.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Q.channel.clamp.h(parseFloat(r)*360)}}return Q.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match($e.re);if(!r)return;const[,i,n,a,o,s]=r;return yn.set({h:$e._hue2deg(i),s:Q.channel.clamp.s(parseFloat(n)),l:Q.channel.clamp.l(parseFloat(a)),a:o?Q.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${Q.lang.round(e)}, ${Q.lang.round(r)}%, ${Q.lang.round(i)}%, ${n})`:`hsl(${Q.lang.round(e)}, ${Q.lang.round(r)}%, ${Q.lang.round(i)}%)`}},Or={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=Or.colors[t];if(e)return Je.parse(e)},stringify:t=>{const e=Je.stringify(t);for(const r in Or.colors)if(Or.colors[r]===e)return r}},Lr={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(Lr.re);if(!r)return;const[,i,n,a,o,s,l,c,h]=r;return yn.set({r:Q.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:Q.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Q.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?Q.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${Q.lang.round(e)}, ${Q.lang.round(r)}, ${Q.lang.round(i)}, ${Q.lang.round(n)})`:`rgb(${Q.lang.round(e)}, ${Q.lang.round(r)}, ${Q.lang.round(i)})`}},Zt={format:{keyword:Or,hex:Je,rgb:Lr,rgba:Lr,hsl:$e,hsla:$e},parse:t=>{if(typeof t!="string")return t;const e=Je.parse(t)||Lr.parse(t)||$e.parse(t)||Or.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(wt.HSL)||t.data.r===void 0?$e.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Lr.stringify(t):Je.stringify(t)},Ml=(t,e)=>{const r=Zt.parse(t);for(const i in e)r[i]=Q.channel.clamp[i](e[i]);return Zt.stringify(r)},Rr=(t,e,r=0,i=1)=>{if(typeof t!="number")return Ml(t,{a:e});const n=yn.set({r:Q.channel.clamp.r(t),g:Q.channel.clamp.g(e),b:Q.channel.clamp.b(r),a:Q.channel.clamp.a(i)});return Zt.stringify(n)},Zp=t=>{const{r:e,g:r,b:i}=Zt.parse(t),n=.2126*Q.channel.toLinear(e)+.7152*Q.channel.toLinear(r)+.0722*Q.channel.toLinear(i);return Q.lang.round(n)},Kp=t=>Zp(t)>=.5,Jr=t=>!Kp(t),Al=(t,e,r)=>{const i=Zt.parse(t),n=i[e],a=Q.channel.clamp[e](n+r);return n!==a&&(i[e]=a),Zt.stringify(i)},N=(t,e)=>Al(t,"l",e),V=(t,e)=>Al(t,"l",-e),C=(t,e)=>{const r=Zt.parse(t),i={};for(const n in e)e[n]&&(i[n]=r[n]+e[n]);return Ml(t,i)},Qp=(t,e,r=50)=>{const{r:i,g:n,b:a,a:o}=Zt.parse(t),{r:s,g:l,b:c,a:h}=Zt.parse(e),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+s*y,b=n*m+l*y,_=a*m+c*y,v=o*u+h*(1-u);return Rr(x,b,_,v)},P=(t,e=100)=>{const r=Zt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Qp(r,t,e)};var $l=Object.defineProperty,p=(t,e)=>$l(t,"name",{value:e,configurable:!0}),Jp=(t,e)=>{for(var r in e)$l(t,r,{get:e[r],enumerable:!0})},te={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},F={trace:p((...t)=>{},"trace"),debug:p((...t)=>{},"debug"),info:p((...t)=>{},"info"),warn:p((...t)=>{},"warn"),error:p((...t)=>{},"error"),fatal:p((...t)=>{},"fatal")},ts=p(function(t="fatal"){let e=te.fatal;typeof t=="string"?t.toLowerCase()in te&&(e=te[t]):typeof t=="number"&&(e=t),F.trace=()=>{},F.debug=()=>{},F.info=()=>{},F.warn=()=>{},F.error=()=>{},F.fatal=()=>{},e<=te.fatal&&(F.fatal=console.error?console.error.bind(console,It("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",It("FATAL"))),e<=te.error&&(F.error=console.error?console.error.bind(console,It("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",It("ERROR"))),e<=te.warn&&(F.warn=console.warn?console.warn.bind(console,It("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",It("WARN"))),e<=te.info&&(F.info=console.info?console.info.bind(console,It("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",It("INFO"))),e<=te.debug&&(F.debug=console.debug?console.debug.bind(console,It("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",It("DEBUG"))),e<=te.trace&&(F.trace=console.debug?console.debug.bind(console,It("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",It("TRACE")))},"setLogLevel"),It=p(t=>`%c${Yp().format("ss.SSS")} : ${t} : `,"format"),Fl=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ir=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,tg=/\s*%%.*\n/gm,El=class extends Error{static{p(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},ir={},es=p(function(t,e){t=t.replace(Fl,"").replace(Ir,"").replace(tg,` `);for(const[r,{detector:i}]of Object.entries(ir))if(i(t,e))return r;throw new El(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),aa=p((...t)=>{for(const{id:e,detector:r,loader:i}of t)Dl(e,r,i)},"registerLazyLoadedDiagrams"),Dl=p((t,e,r)=>{ir[t]&&F.warn(`Detector with key ${t} already exists. Overwriting.`),ir[t]={detector:e,loader:r},F.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),eg=p(t=>ir[t].loader,"getDiagramLoader"),sa=p((t,e,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>sa(t,a,n)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=sa(t[a],e[a],{depth:r-1,clobber:i})):(i||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),_t=sa,xn="#ffffff",bn="#f2f2f2",St=p((t,e)=>e?C(t,{s:-40,l:10}):C(t,{s:-40,l:-10}),"mkBorder"),rg=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||St(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||St(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||St(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||P(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||P(this.tertiaryColor),this.lineColor=this.lineColor||P(this.background),this.arrowheadColor=this.arrowheadColor||P(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?V(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||V(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||P(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||N(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||V(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||V(this.mainBkg,10)):(this.rowOdd=this.rowOdd||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||N(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},ig=p(t=>{const e=new rg;return e.calculate(t),e},"getThemeVariables"),ng=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=P(this.background),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(P("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Rr(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=V("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=V(this.sectionBkgColor,10),this.taskBorderColor=Rr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Rr(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||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||V(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=N(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=N(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=N(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330});for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},ag=p(t=>{const e=new ng;return e.calculate(t),e},"getThemeVariables"),sg=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=C(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=St(this.primaryColor,this.darkMode),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(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=Rr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||V(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||V(this.tertiaryColor,40);for(let t=0;t{this[r]==="calculated"&&(this[r]=void 0)}),typeof t!="object"){this.updateColors();return}const e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},og=p(t=>{const e=new sg;return e.calculate(t),e},"getThemeVariables"),lg=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=N("#cde498",10),this.primaryBorderColor=St(this.primaryColor,this.darkMode),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.primaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=V(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||V(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||V(this.tertiaryColor,40);for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},cg=p(t=>{const e=new lg;return e.calculate(t),e},"getThemeVariables"),hg=class{static{p(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=N(this.contrast,55),this.background="#ffffff",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=St(this.primaryColor,this.darkMode),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(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||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=N(this.contrast,55),this.border2=this.contrast,this.actorBorder=N(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},ug=p(t=>{const e=new hg;return e.calculate(t),e},"getThemeVariables"),se={base:{getThemeVariables:ig},dark:{getThemeVariables:ag},default:{getThemeVariables:og},forest:{getThemeVariables:cg},neutral:{getThemeVariables:ug}},jt={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},Ol={...jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:se.default.getThemeVariables(),sequence:{...jt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...jt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...jt.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...jt.pie,useWidth:984},xyChart:{...jt.xyChart,useWidth:void 0},requirement:{...jt.requirement,useWidth:void 0},packet:{...jt.packet},radar:{...jt.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Rl=p((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...Rl(t[i],"")]:[...r,e+i],[]),"keyify"),fg=new Set(Rl(Ol,"")),Il=Ol,Oi=p(t=>{if(F.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Oi(e));return}for(const e of Object.keys(t)){if(F.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!fg.has(e)||t[e]==null){F.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){F.debug("sanitizing object",e),Oi(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(F.debug("sanitizing css option",e),t[e]=dg(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}F.debug("After sanitization",t)}},"sanitizeDirective"),dg=p(t=>{let e=0,r=0;for(const i of t){if(e{let r=_t({},t),i={};for(const n of e)ql(n),i=_t(i,n);if(r=_t(r,i),i.theme&&i.theme in se){const n=_t({},Pl),a=_t(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in se&&(r.themeVariables=se[r.theme].getThemeVariables(a))}return Pr=r,Wl(Pr),Pr},"updateCurrentConfig"),pg=p(t=>($t=_t({},nr),$t=_t($t,t),t.theme&&se[t.theme]&&($t.themeVariables=se[t.theme].getThemeVariables(t.themeVariables)),_n($t,ar),$t),"setSiteConfig"),gg=p(t=>{Pl=_t({},t)},"saveConfigFromInitialize"),mg=p(t=>($t=_t($t,t),_n($t,ar),$t),"updateSiteConfig"),Nl=p(()=>_t({},$t),"getSiteConfig"),zl=p(t=>(Wl(t),_t(Pr,t),Dt()),"setConfig"),Dt=p(()=>_t({},Pr),"getConfig"),ql=p(t=>{t&&(["secure",...$t.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(F.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&ql(t[e])}))},"sanitize"),yg=p(t=>{Oi(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),ar.push(t),_n($t,ar)},"addDirective"),Ri=p((t=$t)=>{ar=[],_n(t,ar)},"reset"),xg={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ro={},bg=p(t=>{ro[t]||(F.warn(xg[t]),ro[t]=!0)},"issueWarning"),Wl=p(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&bg("LAZY_LOAD_DEPRECATED")},"checkConfig"),ti=//gi,_g=p(t=>t?Yl(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Cg=(()=>{let t=!1;return()=>{t||(Hl(),t=!0)}})();function Hl(){const t="data-temp-href-target";rr.addHook("beforeSanitizeAttributes",e=>{e instanceof Element&&e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),rr.addHook("afterSanitizeAttributes",e=>{e instanceof Element&&e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}p(Hl,"setupDompurifyHooks");var jl=p(t=>(Cg(),rr.sanitize(t)),"removeScript"),io=p((t,e)=>{if(e.flowchart?.htmlLabels!==!1){const r=e.securityLevel;r==="antiscript"||r==="strict"?t=jl(t):r!=="loose"&&(t=Yl(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=Sg(t))}return t},"sanitizeMore"),Ie=p((t,e)=>t&&(e.dompurifyConfig?t=rr.sanitize(io(t,e),e.dompurifyConfig).toString():t=rr.sanitize(io(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),wg=p((t,e)=>typeof t=="string"?Ie(t,e):t.flat().map(r=>Ie(r,e)),"sanitizeTextOrArray"),vg=p(t=>ti.test(t),"hasBreaks"),kg=p(t=>t.split(ti),"splitBreaks"),Sg=p(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Yl=p(t=>t.replace(ti,"#br#"),"breakToPlaceholder"),Gl=p(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),mt=p(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Tg=p(function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),Bg=p(function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),no=p(function(t){const e=t.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,t.split(e).length-1),"countOccurrence"),Lg=p((t,e)=>{const r=oa(t,"~"),i=oa(e,"~");return r===1&&i===1},"shouldCombineSets"),Mg=p(t=>{const e=oa(t,"~");let r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ao=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),la=/\$\$(.*)\$\$/g,sr=p(t=>(t.match(la)?.length??0)>0,"hasKatex"),gT=p(async(t,e)=>{t=await rs(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),rs=p(async(t,e)=>{if(!sr(t))return t;if(!(ao()||e.legacyMathML||e.forceLegacyMathML))return t.replace(la,"MathML is unsupported in this environment.");{const{default:r}=await lt(async()=>{const{default:n}=await import("./katex.CfZphoad.js");return{default:n}},[]),i=e.forceLegacyMathML||!ao()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ti).map(n=>sr(n)?`
${n}
`:`
${n}
`).join("").replace(la,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatex"),dr={getRows:_g,sanitizeText:Ie,sanitizeTextOrArray:wg,hasBreaks:vg,splitBreaks:kg,lineBreakRegex:ti,removeScript:jl,getUrl:Gl,evaluate:mt,getMax:Tg,getMin:Bg},Ag=p(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),$g=p(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Vl=p(function(t,e,r,i){const n=$g(e,r,i);Ag(t,n)},"configureSvgSize"),Fg=p(function(t,e,r,i){const n=e.node().getBBox(),a=n.width,o=n.height;F.info(`SVG bounds: ${a}x${o}`,n);let s=0,l=0;F.info(`Graph bounds: ${s}x${l}`,t),s=a+r*2,l=o+r*2,F.info(`Calculated bounds: ${s}x${l}`),Vl(e,l,s,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),wi={},Eg=p((t,e,r)=>{let i="";return t in wi&&wi[t]?i=wi[t](r):F.warn(`No theme found for ${t}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } @keyframes edge-animation-frame { from { stroke-dashoffset: 0; } } @keyframes dash { to { stroke-dashoffset: 0; } } & .edge-animation-slow { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 50s linear infinite; stroke-linecap: round; } & .edge-animation-fast { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 20s linear infinite; stroke-linecap: round; } /* Classes common for multiple diagrams */ & .error-icon { fill: ${r.errorBkgColor}; } & .error-text { fill: ${r.errorTextColor}; stroke: ${r.errorTextColor}; } & .edge-thickness-normal { stroke-width: 1px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${r.lineColor}; stroke: ${r.lineColor}; } & .marker.cross { stroke: ${r.lineColor}; } & svg { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; } & p { margin: 0 } ${i} ${e} `},"getStyles"),Dg=p((t,e)=>{e!==void 0&&(wi[t]=e)},"addStylesForDiagram"),Og=Eg,Ul={};Jp(Ul,{clear:()=>Rg,getAccDescription:()=>zg,getAccTitle:()=>Pg,getDiagramTitle:()=>Wg,setAccDescription:()=>Ng,setAccTitle:()=>Ig,setDiagramTitle:()=>qg});var is="",ns="",as="",ss=p(t=>Ie(t,Dt()),"sanitizeText"),Rg=p(()=>{is="",as="",ns=""},"clear"),Ig=p(t=>{is=ss(t).replace(/^\s+/g,"")},"setAccTitle"),Pg=p(()=>is,"getAccTitle"),Ng=p(t=>{as=ss(t).replace(/\n\s+/g,` `)},"setAccDescription"),zg=p(()=>as,"getAccDescription"),qg=p(t=>{ns=ss(t)},"setDiagramTitle"),Wg=p(()=>ns,"getDiagramTitle"),so=F,Hg=ts,at=Dt,mT=zl,yT=nr,Cn=p(t=>Ie(t,at()),"sanitizeText"),jg=Fg,Yg=p(()=>Ul,"getCommonDb"),Ii={},Pi=p((t,e,r)=>{Ii[t]&&so.warn(`Diagram with id ${t} already registered. Overwriting.`),Ii[t]=e,r&&Dl(t,r),Dg(t,e.styles),e.injectUtils?.(so,Hg,at,Cn,jg,Yg(),()=>{})},"registerDiagram"),ca=p(t=>{if(t in Ii)return Ii[t];throw new Gg(t)},"getDiagram"),Gg=class extends Error{static{p(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};function os(t){return typeof t>"u"||t===null}p(os,"isNothing");function Xl(t){return typeof t=="object"&&t!==null}p(Xl,"isObject");function Zl(t){return Array.isArray(t)?t:os(t)?[]:[t]}p(Zl,"toArray");function Kl(t,e){var r,i,n,a;if(e)for(a=Object.keys(e),r=0,i=a.length;rs&&(a=" ... ",e=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+o,pos:i-e+a.length}}p(vi,"getLine");function ki(t,e){return gt.repeat(" ",e-t.length)+t}p(ki,"padStart");function tc(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,o=-1;a=r.exec(t.buffer);)n.push(a.index),i.push(a.index+a[0].length),t.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",l,c,h=Math.min(t.line+e.linesAfter,n.length).toString().length,u=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(o-l<0);l++)c=vi(t.buffer,i[o-l],n[o-l],t.position-(i[o]-i[o-l]),u),s=gt.repeat(" ",e.indent)+ki((t.line-l+1).toString(),h)+" | "+c.str+` `+s;for(c=vi(t.buffer,i[o],n[o],t.position,u),s+=gt.repeat(" ",e.indent)+ki((t.line+1).toString(),h)+" | "+c.str+` `,s+=gt.repeat("-",e.indent+h+3+c.pos)+`^ `,l=1;l<=e.linesAfter&&!(o+l>=n.length);l++)c=vi(t.buffer,i[o+l],n[o+l],t.position-(i[o]-i[o+l]),u),s+=gt.repeat(" ",e.indent)+ki((t.line+l+1).toString(),h)+" | "+c.str+` `;return s.replace(/\n$/,"")}p(tc,"makeSnippet");var Jg=tc,tm=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],em=["scalar","sequence","mapping"];function ec(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}p(ec,"compileStyleAliases");function rc(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(tm.indexOf(r)===-1)throw new Ft('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=ec(e.styleAliases||null),em.indexOf(this.kind)===-1)throw new Ft('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}p(rc,"Type$1");var vt=rc;function ha(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}p(ha,"compileList");function ic(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(p(i,"collectType"),e=0,r=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:p(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:p(function(t){return t.toString(10)},"decimal"),hexadecimal:p(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),hm=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mc(t){return!(t===null||!hm.test(t)||t[t.length-1]==="_")}p(mc,"resolveYamlFloat");function yc(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}p(yc,"constructYamlFloat");var um=/^[-+]?[0-9]+e/;function xc(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(gt.isNegativeZero(t))return"-0.0";return r=t.toString(10),um.test(r)?r.replace("e",".e"):r}p(xc,"representYamlFloat");function bc(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||gt.isNegativeZero(t))}p(bc,"isFloat");var fm=new vt("tag:yaml.org,2002:float",{kind:"scalar",resolve:mc,construct:yc,predicate:bc,represent:xc,defaultStyle:"lowercase"}),_c=sm.extend({implicit:[om,lm,cm,fm]}),dm=_c,Cc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),wc=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 vc(t){return t===null?!1:Cc.exec(t)!==null||wc.exec(t)!==null}p(vc,"resolveYamlTimestamp");function kc(t){var e,r,i,n,a,o,s,l=0,c=null,h,u,f;if(e=Cc.exec(t),e===null&&(e=wc.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(a=+e[4],o=+e[5],s=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],u=+(e[11]||0),c=(h*60+u)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,a,o,s,l)),c&&f.setTime(f.getTime()-c),f}p(kc,"constructYamlTimestamp");function Sc(t){return t.toISOString()}p(Sc,"representYamlTimestamp");var pm=new vt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:vc,construct:kc,instanceOf:Date,represent:Sc});function Tc(t){return t==="<<"||t===null}p(Tc,"resolveYamlMerge");var gm=new vt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Tc}),cs=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function Bc(t){if(t===null)return!1;var e,r,i=0,n=t.length,a=cs;for(r=0;r64)){if(e<0)return!1;i+=6}return i%8===0}p(Bc,"resolveYamlBinary");function Lc(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,a=cs,o=0,s=[];for(e=0;e>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(e));return r=n%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}p(Lc,"constructYamlBinary");function Mc(t){var e="",r=0,i,n,a=t.length,o=cs;for(i=0;i>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[i];return n=a%3,n===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):n===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):n===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}p(Mc,"representYamlBinary");function Ac(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}p(Ac,"isBinary");var mm=new vt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Bc,construct:Lc,predicate:Ac,represent:Mc}),ym=Object.prototype.hasOwnProperty,xm=Object.prototype.toString;function $c(t){if(t===null)return!0;var e=[],r,i,n,a,o,s=t;for(r=0,i=s.length;r>10)+55296,(t-65536&1023)+56320)}p(Yc,"charFromCodepoint");var Gc=new Array(256),Vc=new Array(256);for(Be=0;Be<256;Be++)Gc[Be]=fa(Be)?1:0,Vc[Be]=fa(Be);var Be;function Uc(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Ic,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(Uc,"State$1");function hs(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=Jg(r),new Ft(e,r)}p(hs,"generateError");function G(t,e){throw hs(t,e)}p(G,"throwError");function qr(t,e){t.onWarning&&t.onWarning.call(null,hs(t,e))}p(qr,"throwWarning");var lo={YAML:p(function(e,r,i){var n,a,o;e.version!==null&&G(e,"duplication of %YAML directive"),i.length!==1&&G(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&G(e,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&G(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&qr(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(e,r,i){var n,a;i.length!==2&&G(e,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],zc.test(n)||G(e,"ill-formed tag handle (first argument) of the TAG directive"),Ce.call(e.tagMap,n)&&G(e,'there is a previously declared suffix for "'+n+'" tag handle'),qc.test(a)||G(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{G(e,"tag prefix is malformed: "+a)}e.tagMap[n]=a},"handleTagDirective")};function oe(t,e,r,i){var n,a,o,s;if(e1&&(t.result+=gt.repeat(` `,e-1))}p(vn,"writeFoldedLines");function Xc(t,e,r){var i,n,a,o,s,l,c,h,u=t.kind,f=t.result,d;if(d=t.input.charCodeAt(t.position),Tt(d)||Fe(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=t.input.charCodeAt(t.position+1),Tt(n)||r&&Fe(n)))return!1;for(t.kind="scalar",t.result="",a=o=t.position,s=!1;d!==0;){if(d===58){if(n=t.input.charCodeAt(t.position+1),Tt(n)||r&&Fe(n))break}else if(d===35){if(i=t.input.charCodeAt(t.position-1),Tt(i))break}else{if(t.position===t.lineStart&&ei(t)||r&&Fe(d))break;if(qt(d))if(l=t.line,c=t.lineStart,h=t.lineIndent,ft(t,!1,-1),t.lineIndent>=e){s=!0,d=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=c,t.lineIndent=h;break}}s&&(oe(t,a,o,!1),vn(t,t.line-l),a=o=t.position,s=!1),_e(d)||(o=t.position+1),d=t.input.charCodeAt(++t.position)}return oe(t,a,o,!1),t.result?!0:(t.kind=u,t.result=f,!1)}p(Xc,"readPlainScalar");function Zc(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(oe(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else qt(r)?(oe(t,i,n,!0),vn(t,ft(t,!1,e)),i=n=t.position):t.position===t.lineStart&&ei(t)?G(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);G(t,"unexpected end of the stream within a single quoted scalar")}p(Zc,"readSingleQuotedScalar");function Kc(t,e){var r,i,n,a,o,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return oe(t,r,t.position,!0),t.position++,!0;if(s===92){if(oe(t,r,t.position,!0),s=t.input.charCodeAt(++t.position),qt(s))ft(t,!1,e);else if(s<256&&Gc[s])t.result+=Vc[s],t.position++;else if((o=Hc(s))>0){for(n=o,a=0;n>0;n--)s=t.input.charCodeAt(++t.position),(o=Wc(s))>=0?a=(a<<4)+o:G(t,"expected hexadecimal character");t.result+=Yc(a),t.position++}else G(t,"unknown escape sequence");r=i=t.position}else qt(s)?(oe(t,r,i,!0),vn(t,ft(t,!1,e)),r=i=t.position):t.position===t.lineStart&&ei(t)?G(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}G(t,"unexpected end of the stream within a double quoted scalar")}p(Kc,"readDoubleQuotedScalar");function Qc(t,e){var r=!0,i,n,a,o=t.tag,s,l=t.anchor,c,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=t.input.charCodeAt(t.position),b===91)h=93,d=!1,s=[];else if(b===123)h=125,d=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),b=t.input.charCodeAt(++t.position);b!==0;){if(ft(t,!0,e),b=t.input.charCodeAt(t.position),b===h)return t.position++,t.tag=o,t.anchor=l,t.kind=d?"mapping":"sequence",t.result=s,!0;r?b===44&&G(t,"expected the node content, but found ','"):G(t,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=t.input.charCodeAt(t.position+1),Tt(c)&&(u=f=!0,t.position++,ft(t,!0,e))),i=t.line,n=t.lineStart,a=t.position,Pe(t,e,zi,!1,!0),y=t.tag,m=t.result,ft(t,!0,e),b=t.input.charCodeAt(t.position),(f||t.line===i)&&b===58&&(u=!0,b=t.input.charCodeAt(++t.position),ft(t,!0,e),Pe(t,e,zi,!1,!0),x=t.result),d?Ee(t,s,g,y,m,x,i,n,a):u?s.push(Ee(t,null,g,y,m,x,i,n,a)):s.push(m),ft(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}G(t,"unexpected end of the stream within a flow collection")}p(Qc,"readFlowCollection");function Jc(t,e){var r,i,n=jn,a=!1,o=!1,s=e,l=0,c=!1,h,u;if(u=t.input.charCodeAt(t.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(t.kind="scalar",t.result="";u!==0;)if(u=t.input.charCodeAt(++t.position),u===43||u===45)jn===n?n=u===43?oo:km:G(t,"repeat of a chomping mode identifier");else if((h=jc(u))>=0)h===0?G(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?G(t,"repeat of an indentation width identifier"):(s=e+h-1,o=!0);else break;if(_e(u)){do u=t.input.charCodeAt(++t.position);while(_e(u));if(u===35)do u=t.input.charCodeAt(++t.position);while(!qt(u)&&u!==0)}for(;u!==0;){for(wn(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!o||t.lineIndents&&(s=t.lineIndent),qt(u)){l++;continue}if(t.lineIndente)&&l!==0)G(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(o=t.line,s=t.lineStart,l=t.position),Pe(t,e,qi,!0,n)&&(y?g=t.result:m=t.result),y||(Ee(t,u,f,d,g,m,o,s,l),d=g=m=null),ft(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)G(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),u=0,f=t.implicitTypes.length;u"),t.result!==null&&g.kind!==t.kind&&G(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):G(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}p(Pe,"composeNode");function nh(t){var e=t.position,r,i,n,a=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(ft(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(a=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!Tt(o);)o=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&G(t,"directive name must not be less than one character in length");o!==0;){for(;_e(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!qt(o));break}if(qt(o))break;for(r=t.position;o!==0&&!Tt(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}o!==0&&wn(t),Ce.call(lo,i)?lo[i](t,i,n):qr(t,'unknown document directive "'+i+'"')}if(ft(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,ft(t,!0,-1)):a&&G(t,"directives end mark is expected"),Pe(t,t.lineIndent-1,qi,!1,!0),ft(t,!0,-1),t.checkLineBreaks&&Tm.test(t.input.slice(e,t.position))&&qr(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ei(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,ft(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var i=us(t,r);if(typeof e!="function")return i;for(var n=0,a=i.length;n=55296&&r<=56319&&e+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Qe,"codePointAt");function ds(t){var e=/^\n* /;return e.test(t)}p(ds,"needIndentIndicator");var bh=1,ba=2,_h=3,Ch=4,Ze=5;function wh(t,e,r,i,n,a,o,s){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=yh(Qe(t,0))&&xh(Qe(t,t.length-1));if(e||o)for(l=0;l=65536?l+=2:l++){if(c=Qe(t,l),!lr(c))return Ze;m=m&&xa(c,h,s),h=c}else{for(l=0;l=65536?l+=2:l++){if(c=Qe(t,l),c===Wr)u=!0,d&&(f=f||l-g-1>i&&t[g+1]!==" ",g=l);else if(!lr(c))return Ze;m=m&&xa(c,h,s),h=c}f=f||d&&l-g-1>i&&t[g+1]!==" "}return!u&&!f?m&&!o&&!n(t)?bh:a===Hr?Ze:ba:r>9&&ds(t)?Ze:o?a===Hr?Ze:ba:f?Ch:_h}p(wh,"chooseScalarStyle");function vh(t,e,r,i,n){t.dump=function(){if(e.length===0)return t.quotingType===Hr?'""':"''";if(!t.noCompatMode&&(Vm.indexOf(e)!==-1||Um.test(e)))return t.quotingType===Hr?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),s=i||t.flowLevel>-1&&r>=t.flowLevel;function l(c){return mh(t,c)}switch(p(l,"testAmbiguity"),wh(e,s,t.indent,o,l,t.quotingType,t.forceQuotes&&!i,n)){case bh:return e;case ba:return"'"+e.replace(/'/g,"''")+"'";case _h:return"|"+_a(e,t.indent)+Ca(ma(e,a));case Ch:return">"+_a(e,t.indent)+Ca(ma(kh(e,o),a));case Ze:return'"'+Sh(e)+'"';default:throw new Ft("impossible error: invalid scalar style")}}()}p(vh,"writeScalar");function _a(t,e){var r=ds(t)?String(e):"",i=t[t.length-1]===` `,n=i&&(t[t.length-2]===` `||t===` `),a=n?"+":i?"":"-";return r+a+` `}p(_a,"blockHeader");function Ca(t){return t[t.length-1]===` `?t.slice(0,-1):t}p(Ca,"dropEndingNewline");function kh(t,e){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=t.indexOf(` `);return c=c!==-1?c:t.length,r.lastIndex=c,wa(t.slice(0,c),e)}(),n=t[0]===` `||t[0]===" ",a,o;o=r.exec(t);){var s=o[1],l=o[2];a=l[0]===" ",i+=s+(!n&&!a&&l!==""?` `:"")+wa(l,e),n=a}return i}p(kh,"foldString");function wa(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,l="";i=r.exec(t);)s=i.index,s-n>e&&(a=o>n?o:s,l+=` `+t.slice(n,a),n=a+1),o=s;return l+=` `,t.length-n>e&&o>n?l+=t.slice(n,o)+` `+t.slice(o+1):l+=t.slice(n),l.slice(1)}p(wa,"foldLine");function Sh(t){for(var e="",r=0,i,n=0;n=65536?n+=2:n++)r=Qe(t,n),i=kt[r],!i&&lr(r)?(e+=t[n],r>=65536&&(e+=t[n+1])):e+=i||ph(r);return e}p(Sh,"escapeString");function Th(t,e,r){var i="",n=t.tag,a,o,s;for(a=0,o=r.length;a"u"&&Kt(t,e,null,!1,!1))&&(i!==""&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=n,t.dump="["+i+"]"}p(Th,"writeFlowSequence");function va(t,e,r,i){var n="",a=t.tag,o,s,l;for(o=0,s=r.length;o"u"&&Kt(t,e+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Hi(t,e)),t.dump&&Wr===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=a,t.dump=n||"[]"}p(va,"writeBlockSequence");function Bh(t,e,r){var i="",n=t.tag,a=Object.keys(r),o,s,l,c,h;for(o=0,s=a.length;o1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Kt(t,e,c,!1,!1)&&(h+=t.dump,i+=h));t.tag=n,t.dump="{"+i+"}"}p(Bh,"writeFlowMapping");function Lh(t,e,r,i){var n="",a=t.tag,o=Object.keys(r),s,l,c,h,u,f;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new Ft("sortKeys must be a boolean or a function");for(s=0,l=o.length;s1024,u&&(t.dump&&Wr===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,u&&(f+=Hi(t,e)),Kt(t,e+1,h,!0,u)&&(t.dump&&Wr===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,n+=f));t.tag=a,t.dump=n||"{}"}p(Lh,"writeBlockMapping");function ka(t,e,r){var i,n,a,o,s,l;for(n=r?t.explicitTypes:t.implicitTypes,a=0,o=n.length;a tag resolver accepts not "'+l+'" style');t.dump=i}return!0}return!1}p(ka,"detectType");function Kt(t,e,r,i,n,a,o){t.tag=null,t.dump=r,ka(t,r,!1)||ka(t,r,!0);var s=sh.call(t.dump),l=i,c;i&&(i=t.flowLevel<0||t.flowLevel>e);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=t.duplicates.indexOf(r),f=u!==-1),(t.tag!==null&&t.tag!=="?"||f||t.indent!==2&&e>0)&&(n=!1),f&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(h&&f&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(t.dump).length!==0?(Lh(t,e,t.dump,n),f&&(t.dump="&ref_"+u+t.dump)):(Bh(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(s==="[object Array]")i&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?va(t,e-1,t.dump,n):va(t,e,t.dump,n),f&&(t.dump="&ref_"+u+t.dump)):(Th(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(s==="[object String]")t.tag!=="?"&&vh(t,t.dump,e,a,l);else{if(s==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Ft("unacceptable kind of an object to dump "+s)}t.tag!==null&&t.tag!=="?"&&(c=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",t.dump=c+" "+t.dump)}return!0}p(Kt,"writeNode");function Mh(t,e){var r=[],i=[],n,a;for(ji(t,r,i),n=0,a=i.length;nArray.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),t0=p(t=>({x:p(function(e,r,i){let n=0;const a=ut(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pt,t.arrowTypeEnd)){const{angle:d,deltaX:g}=Mr(i[i.length-1],i[i.length-2]);n=Pt[t.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(ut(e).x-ut(i[i.length-1]).x),s=Math.abs(ut(e).y-ut(i[i.length-1]).y),l=Math.abs(ut(e).x-ut(i[0]).x),c=Math.abs(ut(e).y-ut(i[0]).y),h=Pt[t.arrowTypeStart],u=Pt[t.arrowTypeEnd],f=1;if(o0&&s0&&c=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pt,t.arrowTypeEnd)){const{angle:d,deltaY:g}=Mr(i[i.length-1],i[i.length-2]);n=Pt[t.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(ut(e).y-ut(i[i.length-1]).y),s=Math.abs(ut(e).x-ut(i[i.length-1]).x),l=Math.abs(ut(e).y-ut(i[0]).y),c=Math.abs(ut(e).x-ut(i[0]).x),h=Pt[t.arrowTypeStart],u=Pt[t.arrowTypeEnd],f=1;if(o0&&s0&&c{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,i=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),e0=p(t=>{const{handDrawnSeed:e}=at();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),pr=p(t=>{const e=r0([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),r0=p(t=>{const e=new Map;return t.forEach(r=>{const[i,n]=r.split(":");e.set(i.trim(),n?.trim())}),e},"styles2Map"),Ah=p(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),Y=p(t=>{const{stylesArray:e}=pr(t),r=[],i=[],n=[],a=[];return e.forEach(o=>{const s=o[0];Ah(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&n.push(o.join(":")+" !important"),s==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:a}},"styles2String"),H=p((t,e)=>{const{themeVariables:r,handDrawnSeed:i}=at(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=pr(t);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides"),_r={},pt={},co;function i0(){return co||(co=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.BLANK_URL=pt.relativeFirstCharacters=pt.whitespaceEscapeCharsRegex=pt.urlSchemeRegex=pt.ctrlCharactersRegex=pt.htmlCtrlEntityRegex=pt.htmlEntitiesRegex=pt.invalidProtocolRegex=void 0,pt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,pt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,pt.htmlCtrlEntityRegex=/&(newline|tab);/gi,pt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,pt.urlSchemeRegex=/^.+(:|:)/gim,pt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,pt.relativeFirstCharacters=[".","/"],pt.BLANK_URL="about:blank"),pt}var ho;function n0(){if(ho)return _r;ho=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.sanitizeUrl=void 0;var t=i0();function e(o){return t.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var s=o.replace(t.ctrlCharactersRegex,"");return s.replace(t.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function n(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return t.BLANK_URL;var s,l=n(o.trim());do l=r(l).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim(),l=n(l),s=l.match(t.ctrlCharactersRegex)||l.match(t.htmlEntitiesRegex)||l.match(t.htmlCtrlEntityRegex)||l.match(t.whitespaceEscapeCharsRegex);while(s&&s.length>0);var c=l;if(!c)return t.BLANK_URL;if(e(c))return c;var h=c.trimStart(),u=h.match(t.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(f))return t.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return t.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return _r.sanitizeUrl=a,_r}var a0=n0(),s0={value:()=>{}};function $h(){for(var t=0,e=arguments.length,r={},i;t=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Si.prototype=$h.prototype={constructor:Si,on:function(t,e){var r=this._,i=o0(t+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(n),i=0,n,a;i=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),fo.hasOwnProperty(e)?{space:fo[e],local:t}:t}function c0(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Sa&&e.documentElement.namespaceURI===Sa?e.createElement(t):e.createElementNS(r,t)}}function h0(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Fh(t){var e=kn(t);return(e.local?h0:c0)(e)}function u0(){}function gs(t){return t==null?u0:function(){return this.querySelector(t)}}function f0(t){typeof t!="function"&&(t=gs(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n=_&&(_=b+1);!(w=y[_])&&++_=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function I0(t){t||(t=P0);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;ae?1:t>=e?0:NaN}function N0(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function z0(){return Array.from(this)}function q0(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?Q0:typeof e=="function"?ty:J0)(t,e,r??"")):cr(this.node(),t)}function cr(t,e){return t.style.getPropertyValue(e)||Ih(t).getComputedStyle(t,null).getPropertyValue(e)}function ry(t){return function(){delete this[t]}}function iy(t,e){return function(){this[t]=e}}function ny(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function ay(t,e){return arguments.length>1?this.each((e==null?ry:typeof e=="function"?ny:iy)(t,e)):this.node()[t]}function Ph(t){return t.trim().split(/^|\s+/)}function ms(t){return t.classList||new Nh(t)}function Nh(t){this._node=t,this._names=Ph(t.getAttribute("class")||"")}Nh.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function zh(t,e){for(var r=ms(t),i=-1,n=e.length;++i=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function Ey(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,n=e.length,a;r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?ui(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?ui(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Wy.exec(t))?new Et(e[1],e[2],e[3],1):(e=Hy.exec(t))?new Et(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=jy.exec(t))?ui(e[1],e[2],e[3],e[4]):(e=Yy.exec(t))?ui(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Gy.exec(t))?_o(e[1],e[2]/100,e[3]/100,1):(e=Vy.exec(t))?_o(e[1],e[2]/100,e[3]/100,e[4]):po.hasOwnProperty(t)?yo(po[t]):t==="transparent"?new Et(NaN,NaN,NaN,0):null}function yo(t){return new Et(t>>16&255,t>>8&255,t&255,1)}function ui(t,e,r,i){return i<=0&&(t=e=r=NaN),new Et(t,e,r,i)}function Zy(t){return t instanceof ii||(t=Vr(t)),t?(t=t.rgb(),new Et(t.r,t.g,t.b,t.opacity)):new Et}function Ta(t,e,r,i){return arguments.length===1?Zy(t):new Et(t,e,r,i??1)}function Et(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}ys(Et,Ta,jh(ii,{brighter(t){return t=t==null?Gi:Math.pow(Gi,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Yr:Math.pow(Yr,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Et(Re(this.r),Re(this.g),Re(this.b),Vi(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:xo,formatHex:xo,formatHex8:Ky,formatRgb:bo,toString:bo}));function xo(){return`#${De(this.r)}${De(this.g)}${De(this.b)}`}function Ky(){return`#${De(this.r)}${De(this.g)}${De(this.b)}${De((isNaN(this.opacity)?1:this.opacity)*255)}`}function bo(){const t=Vi(this.opacity);return`${t===1?"rgb(":"rgba("}${Re(this.r)}, ${Re(this.g)}, ${Re(this.b)}${t===1?")":`, ${t})`}`}function Vi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Re(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function De(t){return t=Re(t),(t<16?"0":"")+t.toString(16)}function _o(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new zt(t,e,r,i)}function Yh(t){if(t instanceof zt)return new zt(t.h,t.s,t.l,t.opacity);if(t instanceof ii||(t=Vr(t)),!t)return new zt;if(t instanceof zt)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),a=Math.max(e,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(e===a?o=(r-i)/s+(r0&&l<1?0:o,new zt(o,s,l,t.opacity)}function Qy(t,e,r,i){return arguments.length===1?Yh(t):new zt(t,e,r,i??1)}function zt(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}ys(zt,Qy,jh(ii,{brighter(t){return t=t==null?Gi:Math.pow(Gi,t),new zt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Yr:Math.pow(Yr,t),new zt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new Et(Yn(t>=240?t-240:t+120,n,i),Yn(t,n,i),Yn(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new zt(Co(this.h),fi(this.s),fi(this.l),Vi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Vi(this.opacity);return`${t===1?"hsl(":"hsla("}${Co(this.h)}, ${fi(this.s)*100}%, ${fi(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Co(t){return t=(t||0)%360,t<0?t+360:t}function fi(t){return Math.max(0,Math.min(1,t||0))}function Yn(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const xs=t=>()=>t;function Gh(t,e){return function(r){return t+r*e}}function Jy(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function xT(t,e){var r=e-t;return r?Gh(t,r>180||r<-180?r-360*Math.round(r/360):r):xs(isNaN(t)?e:t)}function tx(t){return(t=+t)==1?Vh:function(e,r){return r-e?Jy(e,r,t):xs(isNaN(e)?r:e)}}function Vh(t,e){var r=e-t;return r?Gh(t,r):xs(isNaN(t)?e:t)}const wo=function t(e){var r=tx(e);function i(n,a){var o=r((n=Ta(n)).r,(a=Ta(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),c=Vh(n.opacity,a.opacity);return function(h){return n.r=o(h),n.g=s(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=t,i}(1);function xe(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var Ba=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Gn=new RegExp(Ba.source,"g");function ex(t){return function(){return t}}function rx(t){return function(e){return t(e)+""}}function ix(t,e){var r=Ba.lastIndex=Gn.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(t=t+"",e=e+"";(i=Ba.exec(t))&&(n=Gn.exec(e));)(a=n.index)>r&&(a=e.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:xe(i,n)})),r=Gn.lastIndex;return r180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:xe(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function s(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:xe(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,d,g){if(c!==u||h!==f){var m=d.push(n(d)+"scale(",null,",",null,")");g.push({i:m-4,x:xe(c,u)},{i:m-2,x:xe(h,f)})}else(u!==1||f!==1)&&d.push(n(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),o(c.rotate,h.rotate,u,f),s(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var g=-1,m=f.length,y;++g=0&&t._call.call(void 0,e),t=t._next;--hr}function ko(){Ne=(Xi=Ur.now())+Sn,hr=Ar=0;try{cx()}finally{hr=0,ux(),Ne=0}}function hx(){var t=Ur.now(),e=t-Xi;e>Zh&&(Sn-=e,Xi=t)}function ux(){for(var t,e=Ui,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Ui=r);$r=t,Ma(i)}function Ma(t){if(!hr){Ar&&(Ar=clearTimeout(Ar));var e=t-Ne;e>24?(t<1/0&&(Ar=setTimeout(ko,t-Ur.now()-Sn)),Cr&&(Cr=clearInterval(Cr))):(Cr||(Xi=Ur.now(),Cr=setInterval(hx,Zh)),hr=1,Kh(ko))}}function So(t,e,r){var i=new Zi;return e=e==null?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,r),i}var fx=$h("start","end","cancel","interrupt"),dx=[],Jh=0,To=1,Aa=2,Ti=3,Bo=4,$a=5,Bi=6;function Tn(t,e,r,i,n,a){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;px(t,r,{name:e,index:i,group:n,on:fx,tween:dx,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Jh})}function _s(t,e){var r=Ht(t,e);if(r.state>Jh)throw new Error("too late; already scheduled");return r}function Qt(t,e){var r=Ht(t,e);if(r.state>Ti)throw new Error("too late; already running");return r}function Ht(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function px(t,e,r){var i=t.__transition,n;i[e]=r,r.timer=Qh(a,0,r.time);function a(c){r.state=To,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,f,d;if(r.state!==To)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===Ti)return So(o);d.state===Bo?(d.state=Bi,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+hAa&&i.state<$a,i.state=Bi,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[o]}a&&delete t.__transition}}function mx(t){return this.each(function(){gx(this,t)})}function yx(t,e){var r,i;return function(){var n=Qt(this,t),a=n.tween;if(a!==r){i=r=a;for(var o=0,s=i.length;o=0&&(e=e.slice(0,r)),!e||e==="start"})}function Yx(t,e,r){var i,n,a=jx(e)?_s:Qt;return function(){var o=a(this,t),s=o.on;s!==i&&(n=(i=s).copy()).on(e,r),o.on=n}}function Gx(t,e){var r=this._id;return arguments.length<2?Ht(this.node(),r).on.on(t):this.each(Yx(r,t,e))}function Vx(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Ux(){return this.on("end.remove",Vx(this._id))}function Xx(t){var e=this._name,r=this._id;typeof t!="function"&&(t=gs(t));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o=0))throw new Error(`invalid digits: ${t}`);if(e>15)return iu;const r=10**e;return function(i){this._+=i[0];for(let n=1,a=i.length;nLe)if(!(Math.abs(u*l-c*h)>Le)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let d=i-o,g=n-s,m=l*l+c*c,y=d*d+g*g,x=Math.sqrt(m),b=Math.sqrt(f),_=a*Math.tan((Fa-Math.acos((m+f-y)/(2*x*b)))/2),v=_/b,w=_/x;Math.abs(v-1)>Le&&this._append`L${e+v*h},${r+v*u}`,this._append`A${a},${a},0,0,${+(u*d>h*g)},${this._x1=e+w*l},${this._y1=r+w*c}`}}arc(e,r,i,n,a,o){if(e=+e,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),c=e+s,h=r+l,u=1^o,f=o?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Le||Math.abs(this._y1-h)>Le)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Ea+Ea),f>_b?this._append`A${i},${i},0,1,${u},${e-s},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>Le&&this._append`A${i},${i},0,${+(f>=Fa)},${u},${this._x1=e+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(e,r,i,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Ue(t){return function(){return t}}const bT=Math.abs,_T=Math.atan2,CT=Math.cos,wT=Math.max,vT=Math.min,kT=Math.sin,ST=Math.sqrt,Lo=1e-12,ws=Math.PI,Mo=ws/2,TT=2*ws;function BT(t){return t>1?0:t<-1?ws:Math.acos(t)}function LT(t){return t>=1?Mo:t<=-1?-Mo:Math.asin(t)}function vb(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new wb(e)}function kb(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function nu(t){this._context=t}nu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Ki(t){return new nu(t)}function Sb(t){return t[0]}function Tb(t){return t[1]}function Bb(t,e){var r=Ue(!0),i=null,n=Ki,a=null,o=vb(s);t=typeof t=="function"?t:t===void 0?Sb:Ue(t),e=typeof e=="function"?e:e===void 0?Tb:Ue(e);function s(l){var c,h=(l=kb(l)).length,u,f=!1,d;for(i==null&&(a=n(d=o())),c=0;c<=h;++c)!(c0)for(var i=t[0],n=e[0],a=t[r]-i,o=e[r]-n,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+l*a),this._beta*e[s]+(1-this._beta)*(n+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Ab=function t(e){function r(i){return e===1?new Bn(i):new hu(i,e)}return r.beta=function(i){return t(+i)},r}(.85);function Ji(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function vs(t,e){this._context=t,this._k=(1-e)/6}vs.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:Ji(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ji(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const uu=function t(e){function r(i){return new vs(i,e)}return r.tension=function(i){return t(+i)},r}(0);function ks(t,e){this._context=t,this._k=(1-e)/6}ks.prototype={areaStart:we,areaEnd:we,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ji(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $b=function t(e){function r(i){return new ks(i,e)}return r.tension=function(i){return t(+i)},r}(0);function Ss(t,e){this._context=t,this._k=(1-e)/6}Ss.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ji(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Fb=function t(e){function r(i){return new Ss(i,e)}return r.tension=function(i){return t(+i)},r}(0);function Ts(t,e,r){var i=t._x1,n=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Lo){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Lo){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(i,n,a,o,t._x2,t._y2)}function fu(t,e){this._context=t,this._alpha=e}fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ts(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const du=function t(e){function r(i){return e?new fu(i,e):new vs(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function pu(t,e){this._context=t,this._alpha=e}pu.prototype={areaStart:we,areaEnd:we,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ts(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Eb=function t(e){function r(i){return e?new pu(i,e):new ks(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function gu(t,e){this._context=t,this._alpha=e}gu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ts(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Db=function t(e){function r(i){return e?new gu(i,e):new Ss(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function mu(t){this._context=t}mu.prototype={areaStart:we,areaEnd:we,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Ob(t){return new mu(t)}function Ao(t){return t<0?-1:1}function $o(t,e,r){var i=t._x1-t._x0,n=e-t._x1,a=(t._y1-t._y0)/(i||n<0&&-0),o=(r-t._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(Ao(a)+Ao(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Fo(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Vn(t,e,r){var i=t._x0,n=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,n+s*e,a-s,o-s*r,a,o)}function tn(t){this._context=t}tn.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:Vn(this,this._t0,Fo(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Vn(this,Fo(this,r=$o(this,t,e)),r);break;default:Vn(this,this._t0,r=$o(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function yu(t){this._context=new xu(t)}(yu.prototype=Object.create(tn.prototype)).point=function(t,e){tn.prototype.point.call(this,e,t)};function xu(t){this._context=t}xu.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,n,a){this._context.bezierCurveTo(e,t,i,r,a,n)}};function bu(t){return new tn(t)}function _u(t){return new yu(t)}function Cu(t){this._context=t}Cu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=Eo(t),n=Eo(e),a=0,o=1;o=0;--e)n[e]=(o[e]-n[e+1])/a[e];for(a[r-1]=(t[r]+n[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function vu(t){return new Ln(t,.5)}function ku(t){return new Ln(t,0)}function Su(t){return new Ln(t,1)}function Fr(t,e,r){this.k=t,this.x=e,this.y=r}Fr.prototype={constructor:Fr,scale:function(t){return t===1?this:new Fr(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Fr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Fr.prototype;var Tu=typeof global=="object"&&global&&global.Object===Object&&global,Rb=typeof self=="object"&&self&&self.Object===Object&&self,Jt=Tu||Rb||Function("return this")(),en=Jt.Symbol,Bu=Object.prototype,Ib=Bu.hasOwnProperty,Pb=Bu.toString,wr=en?en.toStringTag:void 0;function Nb(t){var e=Ib.call(t,wr),r=t[wr];try{t[wr]=void 0;var i=!0}catch{}var n=Pb.call(t);return i&&(e?t[wr]=r:delete t[wr]),n}var zb=Object.prototype,qb=zb.toString;function Wb(t){return qb.call(t)}var Hb="[object Null]",jb="[object Undefined]",Do=en?en.toStringTag:void 0;function gr(t){return t==null?t===void 0?jb:Hb:Do&&Do in Object(t)?Nb(t):Wb(t)}function He(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Yb="[object AsyncFunction]",Gb="[object Function]",Vb="[object GeneratorFunction]",Ub="[object Proxy]";function Bs(t){if(!He(t))return!1;var e=gr(t);return e==Gb||e==Vb||e==Yb||e==Ub}var Un=Jt["__core-js_shared__"],Oo=function(){var t=/[^.]+$/.exec(Un&&Un.keys&&Un.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Xb(t){return!!Oo&&Oo in t}var Zb=Function.prototype,Kb=Zb.toString;function je(t){if(t!=null){try{return Kb.call(t)}catch{}try{return t+""}catch{}}return""}var Qb=/[\\^$.*+?()[\]{}|]/g,Jb=/^\[object .+?Constructor\]$/,t1=Function.prototype,e1=Object.prototype,r1=t1.toString,i1=e1.hasOwnProperty,n1=RegExp("^"+r1.call(i1).replace(Qb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function a1(t){if(!He(t)||Xb(t))return!1;var e=Bs(t)?n1:Jb;return e.test(je(t))}function s1(t,e){return t?.[e]}function Ye(t,e){var r=s1(t,e);return a1(r)?r:void 0}var Xr=Ye(Object,"create");function o1(){this.__data__=Xr?Xr(null):{},this.size=0}function l1(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var c1="__lodash_hash_undefined__",h1=Object.prototype,u1=h1.hasOwnProperty;function f1(t){var e=this.__data__;if(Xr){var r=e[t];return r===c1?void 0:r}return u1.call(e,t)?e[t]:void 0}var d1=Object.prototype,p1=d1.hasOwnProperty;function g1(t){var e=this.__data__;return Xr?e[t]!==void 0:p1.call(e,t)}var m1="__lodash_hash_undefined__";function y1(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Xr&&e===void 0?m1:e,this}function ze(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}function k1(t,e){var r=this.__data__,i=An(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function ue(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=K1}function En(t){return t!=null&&Fu(t.length)&&!Bs(t)}function Q1(t){return ai(t)&&En(t)}function J1(){return!1}var Eu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wo=Eu&&typeof module=="object"&&module&&!module.nodeType&&module,t2=Wo&&Wo.exports===Eu,Ho=t2?Jt.Buffer:void 0,e2=Ho?Ho.isBuffer:void 0,Ms=e2||J1,r2="[object Object]",i2=Function.prototype,n2=Object.prototype,Du=i2.toString,a2=n2.hasOwnProperty,s2=Du.call(Object);function o2(t){if(!ai(t)||gr(t)!=r2)return!1;var e=Au(t);if(e===null)return!0;var r=a2.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Du.call(r)==s2}var l2="[object Arguments]",c2="[object Array]",h2="[object Boolean]",u2="[object Date]",f2="[object Error]",d2="[object Function]",p2="[object Map]",g2="[object Number]",m2="[object Object]",y2="[object RegExp]",x2="[object Set]",b2="[object String]",_2="[object WeakMap]",C2="[object ArrayBuffer]",w2="[object DataView]",v2="[object Float32Array]",k2="[object Float64Array]",S2="[object Int8Array]",T2="[object Int16Array]",B2="[object Int32Array]",L2="[object Uint8Array]",M2="[object Uint8ClampedArray]",A2="[object Uint16Array]",$2="[object Uint32Array]",ht={};ht[v2]=ht[k2]=ht[S2]=ht[T2]=ht[B2]=ht[L2]=ht[M2]=ht[A2]=ht[$2]=!0;ht[l2]=ht[c2]=ht[C2]=ht[h2]=ht[w2]=ht[u2]=ht[f2]=ht[d2]=ht[p2]=ht[g2]=ht[m2]=ht[y2]=ht[x2]=ht[b2]=ht[_2]=!1;function F2(t){return ai(t)&&Fu(t.length)&&!!ht[gr(t)]}function E2(t){return function(e){return t(e)}}var Ou=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nr=Ou&&typeof module=="object"&&module&&!module.nodeType&&module,D2=Nr&&Nr.exports===Ou,Xn=D2&&Tu.process,jo=function(){try{var t=Nr&&Nr.require&&Nr.require("util").types;return t||Xn&&Xn.binding&&Xn.binding("util")}catch{}}(),Yo=jo&&jo.isTypedArray,As=Yo?E2(Yo):F2;function Oa(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var O2=Object.prototype,R2=O2.hasOwnProperty;function I2(t,e,r){var i=t[e];(!(R2.call(t,e)&&Mn(i,r))||r===void 0&&!(e in t))&&Ls(t,e,r)}function P2(t,e,r,i){var n=!r;r||(r={});for(var a=-1,o=e.length;++a-1&&t%1==0&&t0){if(++e>=e_)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var a_=n_(t_);function s_(t,e){return a_(Q2(t,e,Nu),t+"")}function o_(t,e,r){if(!He(r))return!1;var i=typeof e;return(i=="number"?En(r)&&Ru(e,r.length):i=="string"&&e in r)?Mn(r[e],t):!1}function l_(t){return s_(function(e,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,o&&o_(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),e=Object(e);++is.args);Oi(o),i=_t(i,[...o])}else i=r.args;if(!i)return;let n=es(t,e);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),zu=p(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${f_.source})(?=[}][%]{2}).* `,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),F.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i;const n=[];for(;(i=Ir.exec(t))!==null;)if(i.index===Ir.lastIndex&&Ir.lastIndex++,i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e)){const a=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:o})}return n.length===0?{type:t,args:null}:n.length===1?n[0]:n}catch(r){return F.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),p_=p(function(t){return t.replace(Ir,"")},"removeDirectives"),g_=p(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function $s(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return u_[r]??e}p($s,"interpolateToCurve");function qu(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?a0.sanitizeUrl(r):r}p(qu,"formatUrl");var m_=p((t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let a=window;for(let o=0;o{r+=Fs(n,e),e=n});const i=r/2;return Es(t,i)}p(Wu,"traverseEdge");function Hu(t){return t.length===1?t[0]:Wu(t)}p(Hu,"calcLabelPosition");var Vo=p((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),Es=p((t,e)=>{let r,i=e;for(const n of t){if(r){const a=Fs(n,r);if(a===0)return r;if(a=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:Vo((1-o)*r.x+o*n.x,5),y:Vo((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),y_=p((t,e,r)=>{F.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=Es(e,25),a=t?10:5,o=Math.atan2(e[0].y-n.y,e[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+n.x)/2,s.y=-Math.cos(o)*a+(e[0].y+n.y)/2,s},"calcCardinalityPosition");function ju(t,e,r){const i=structuredClone(r);F.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();const n=25+t,a=Es(i,n),o=10+t*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):e==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):e==="end_left"?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}p(ju,"calcTerminalLabelPosition");function Yu(t){let e="",r="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}p(Yu,"getStylesFromArray");var Uo=0,x_=p(()=>(Uo++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Uo),"generateId");function Gu(t){let e="";const r="0123456789abcdef",i=r.length;for(let n=0;nGu(t.length),"random"),__=p(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"),C_=p(function(t,e){const r=e.text.replace(dr.lineBreakRegex," "),[,i]=Dn(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",i),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),n},"drawSimpleText"),w_=ni((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),dr.lineBreakRegex.test(t)))return t;const i=t.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const l=ce(`${o} `,r),c=ce(a,r);if(l>e){const{hyphenatedStrings:f,remainingWord:d}=v_(o,e,"-",r);n.push(a,...f),a=d}else c+l>=e?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),v_=ni((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],a=[];let o="";return n.forEach((s,l)=>{const c=`${o}${s}`;if(ce(c,i)>=e){const u=l+1,f=n.length===u,d=`${c}${r}`;a.push(f?c:d),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Vu(t,e){return Ds(t,e).height}p(Vu,"calculateTextHeight");function ce(t,e){return Ds(t,e).width}p(ce,"calculateTextWidth");var Ds=ni((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,a]=Dn(r),o=["sans-serif",i],s=t.split(dr.lineBreakRegex),l=[],c=rt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=__();y.text=m||h_;const x=C_(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");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),k_=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{p(this,"InitIDGenerator")}},pi,S_=p(function(t){return pi=pi||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),pi.innerHTML=t,unescape(pi.textContent)},"entityDecode");function Os(t){return"str"in t}p(Os,"isDetailedError");var T_=p((t,e,r,i)=>{if(!i)return;const n=t.node()?.getBBox();n&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Dn=p(t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function Rs(t,e){return c_({},t,e)}p(Rs,"cleanAndMerge");var Ut={assignWithDepth:_t,wrapLabel:w_,calculateTextHeight:Vu,calculateTextWidth:ce,calculateTextDimensions:Ds,cleanAndMerge:Rs,detectInit:d_,detectDirective:zu,isSubstringInArray:g_,interpolateToCurve:$s,calcLabelPosition:Hu,calcCardinalityPosition:y_,calcTerminalLabelPosition:ju,formatUrl:qu,getStylesFromArray:Yu,generateId:x_,random:b_,runFunc:m_,entityDecode:S_,insertTitle:T_,parseFontSize:Dn,InitIDGenerator:k_},B_=p(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},"encodeEntities"),Ge=p(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),MT=p((t,e,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`,"getEdgeId");function Lt(t){return t??null}p(Lt,"handleUndefinedAttr");const L_=Object.freeze({left:0,top:0,width:16,height:16}),sn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Uu=Object.freeze({...L_,...sn}),M_=Object.freeze({...Uu,body:"",hidden:!1}),A_=Object.freeze({width:null,height:null}),$_=Object.freeze({...A_,...sn}),F_=(t,e,r,i="")=>{const n=t.split(":");if(t.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:s};return Zn(c)?c:null}const a=n[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return Zn(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return Zn(s,r)?s:null}return null},Zn=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function E_(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}function Xo(t,e){const r=E_(t,e);for(const i in M_)i in sn?i in t&&!(i in r)&&(r[i]=sn[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function D_(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const s=i[o]&&i[o].parent,l=s&&a(s);l&&(n[o]=[s].concat(l))}return n[o]}return(e||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Zo(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let a={};function o(s){a=Xo(i[s]||n[s],a)}return o(e),r.forEach(o),Xo(t,a)}function O_(t,e){if(t.icons[e])return Zo(t,e,[]);const r=D_(t,[e])[e];return r?Zo(t,e,r):null}const R_=/(-?[0-9.]*[0-9]+[0-9.]*)/g,I_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ko(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const i=t.split(R_);if(i===null||!i.length)return t;const n=[];let a=i.shift(),o=I_.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*e*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function P_(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const n=t.indexOf(">",i),a=t.indexOf("",a);if(o===-1)break;r+=t.slice(n+1,a).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}function N_(t,e){return t?""+t+""+e:e}function z_(t,e,r){const i=P_(t);return N_(i.defs,e+i.content+r)}const q_=t=>t==="unset"||t==="undefined"||t==="none";function W_(t,e){const r={...Uu,...t},i={...$_,...e},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let _=m.rotate;x?b?_+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let v;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:v=n.height/2+n.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:v=n.width/2+n.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}_%2===1&&(n.left!==n.top&&(v=n.left,n.left=n.top,n.top=v),n.width!==n.height&&(v=n.width,n.width=n.height,n.height=v)),y.length&&(a=z_(a,'',""))});const o=i.width,s=i.height,l=n.width,c=n.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?c:s,h=Ko(u,l/c)):(h=o==="auto"?l:o,u=s===null?Ko(h,c/l):s==="auto"?c:s);const f={},d=(m,y)=>{q_(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[n.left,n.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const H_=/\sid="(\S+)"/g,j_="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Y_=0;function G_(t,e=j_){const r=[];let i;for(;i=H_.exec(t);)r.push(i[1]);if(!r.length)return t;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof e=="function"?e(a):e+(Y_++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),t=t.replace(new RegExp(n,"g"),""),t}function V_(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'"+t+""}function Is(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ve=Is();function Xu(t){Ve=t}var zr={exec:()=>null};function ot(t,e=""){let r=typeof t=="string"?t:t.source;const i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Bt.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,e)};return i}var Bt={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:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},U_=/^(?:[ \t]*(?:\n|$))+/,X_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Z_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,si=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,K_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ps=/(?:[*+-]|\d{1,9}[.)])/,Zu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ku=ot(Zu).replace(/bull/g,Ps).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(),Q_=ot(Zu).replace(/bull/g,Ps).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(),Ns=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,J_=/^[^\n]+/,zs=/(?!\s*\])(?:\\.|[^\[\]\\])+/,tC=ot(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",zs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),eC=ot(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ps).getRegex(),On="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",qs=/|$))/,rC=ot("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",qs).replace("tag",On).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qu=ot(Ns).replace("hr",si).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",On).getRegex(),iC=ot(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Qu).getRegex(),Ws={blockquote:iC,code:X_,def:tC,fences:Z_,heading:K_,hr:si,html:rC,lheading:Ku,list:eC,newline:U_,paragraph:Qu,table:zr,text:J_},Qo=ot("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",si).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",On).getRegex(),nC={...Ws,lheading:Q_,table:Qo,paragraph:ot(Ns).replace("hr",si).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Qo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",On).getRegex()},aC={...Ws,html:ot(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qs).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:zr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ot(Ns).replace("hr",si).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",Ku).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},sC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,oC=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ju=/^( {2,}|\\)\n(?!\s*$)/,lC=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,rf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,dC=ot(rf,"u").replace(/punct/g,Rn).getRegex(),pC=ot(rf,"u").replace(/punct/g,ef).getRegex(),nf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gC=ot(nf,"gu").replace(/notPunctSpace/g,tf).replace(/punctSpace/g,Hs).replace(/punct/g,Rn).getRegex(),mC=ot(nf,"gu").replace(/notPunctSpace/g,uC).replace(/punctSpace/g,hC).replace(/punct/g,ef).getRegex(),yC=ot("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,tf).replace(/punctSpace/g,Hs).replace(/punct/g,Rn).getRegex(),xC=ot(/\\(punct)/,"gu").replace(/punct/g,Rn).getRegex(),bC=ot(/^<(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(),_C=ot(qs).replace("(?:-->|$)","-->").getRegex(),CC=ot("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",_C).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),on=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,wC=ot(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",on).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),af=ot(/^!?\[(label)\]\[(ref)\]/).replace("label",on).replace("ref",zs).getRegex(),sf=ot(/^!?\[(ref)\](?:\[\])?/).replace("ref",zs).getRegex(),vC=ot("reflink|nolink(?!\\()","g").replace("reflink",af).replace("nolink",sf).getRegex(),js={_backpedal:zr,anyPunctuation:xC,autolink:bC,blockSkip:fC,br:Ju,code:oC,del:zr,emStrongLDelim:dC,emStrongRDelimAst:gC,emStrongRDelimUnd:yC,escape:sC,link:wC,nolink:sf,punctuation:cC,reflink:af,reflinkSearch:vC,tag:CC,text:lC,url:zr},kC={...js,link:ot(/^!?\[(label)\]\((.*?)\)/).replace("label",on).getRegex(),reflink:ot(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",on).getRegex()},Ra={...js,emStrongRDelimAst:mC,emStrongLDelim:pC,url:ot(/^((?: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]*?(?:(?=[\\":">",'"':""","'":"'"},Jo=t=>TC[t];function Yt(t,e){if(e){if(Bt.escapeTest.test(t))return t.replace(Bt.escapeReplace,Jo)}else if(Bt.escapeTestNoEncode.test(t))return t.replace(Bt.escapeReplaceNoEncode,Jo);return t}function tl(t){try{t=encodeURI(t).replace(Bt.percentDecode,"%")}catch{return null}return t}function el(t,e){const r=t.replace(Bt.findPipe,(a,o,s)=>{let l=!1,c=o;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Bt.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length0?-2:-1}function rl(t,e,r,i,n){const a=e.href,o=e.title||null,s=t[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;const l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function LC(t,e,r){const i=t.match(r.other.indentCodeCompensation);if(i===null)return e;const n=i[1];return e.split(` `).map(a=>{const o=a.match(r.other.beginningSpace);if(o===null)return a;const[s]=o;return s.length>=n.length?a.slice(n.length):a}).join(` `)}var ln=class{options;rules;lexer;constructor(t){this.options=t||Ve}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:kr(r,` `)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const r=e[0],i=LC(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){const i=kr(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:kr(e[0],` `)}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let r=kr(e[0],` `).split(` `),i="",n="";const a=[];for(;r.length>0;){let o=!1;const s=[];let l;for(l=0;l1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let o=!1;for(;t;){let l=!1,c="",h="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let u=e[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),f=t.split(` `,1)[0],d=!u.trim(),g=0;if(this.options.pedantic?(g=2,h=u.trimStart()):d?g=e[1].length+1:(g=e[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,h=u.slice(g),g+=e[1].length),d&&this.rules.other.blankLine.test(f)&&(c+=f+` `,t=t.substring(f.length+1),l=!0),!l){const x=this.rules.other.nextBulletRegex(g),b=this.rules.other.hrRegex(g),_=this.rules.other.fencesBeginRegex(g),v=this.rules.other.headingBeginRegex(g),w=this.rules.other.htmlBeginRegex(g);for(;t;){const T=t.split(` `,1)[0];let S;if(f=T,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),S=f):S=f.replace(this.rules.other.tabCharGlobal," "),_.test(f)||v.test(f)||w.test(f)||x.test(f)||b.test(f))break;if(S.search(this.rules.other.nonSpaceChar)>=g||!f.trim())h+=` `+S.slice(g);else{if(d||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(u)||v.test(u)||b.test(u))break;h+=` `+f}!d&&!f.trim()&&(d=!0),c+=T+` `,t=t.substring(T.length+1),u=S.slice(g)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));let m=null,y;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(y=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:c,task:!!m,checked:y,loose:!1,text:h,tokens:[]}),n.raw+=c}const s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l=0;lu.type==="space"),h=c.length>0&&c.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=h}if(n.loose)for(let l=0;l({text:s,tokens:this.lexer.inline(s),header:!1,align:a.align[l]})));return a}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const r=e[1].charAt(e[1].length-1)===` `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=kr(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=BC(e[2],"()");if(a===-2)return;if(a>-1){const s=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let i=e[2],n="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],n=a[3])}else n=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),rl(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[i.toLowerCase()];if(!n){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return rl(r,n,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const a=[...i[0]].length-1;let o,s,l=a,c=0;const h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*t.length+a);(i=h.exec(e))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(s=[...o].length,i[3]||i[4]){l+=s;continue}else if((i[5]||i[6])&&a%3&&!((a+s)%3)){c+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);const u=[...i[0]][0].length,f=t.slice(0,a+i.index+u+s);if(Math.min(a,s)%2){const g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}const d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let r,i;return e[2]==="@"?(r=e[1],i="mailto:"+r):(r=e[1],i=r),{type:"link",raw:e[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,i;if(e[2]==="@")r=e[0],i="mailto:"+r;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);r=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},ne=class Ia{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ve,this.options.tokenizer=this.options.tokenizer||new ln,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:Bt,block:gi.normal,inline:vr.normal};this.options.pedantic?(r.block=gi.pedantic,r.inline=vr.pedantic):this.options.gfm&&(r.block=gi.gfm,this.options.breaks?r.inline=vr.breaks:r.inline=vr.gfm),this.tokenizer.rules=r}static get rules(){return{block:gi,inline:vr}}static lex(e,r){return new Ia(r).lex(e)}static lexInline(e,r){return new Ia(r).inlineTokens(e)}lex(e){e=e.replace(Bt.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let r=0;r(n=o.call({lexer:this},e,r))?(e=e.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);const o=r.at(-1);n.raw.length===1&&o!==void 0?o.raw+=` `:r.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);const o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=` `+n.raw,o.text+=` `+n.text,this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);const o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=` `+n.raw,o.text+=` `+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),r.push(n);continue}let a=e;if(this.options.extensions?.startBlock){let o=1/0;const s=e.slice(1);let l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},s),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(a=e.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){const o=r.at(-1);i&&o?.type==="paragraph"?(o.raw+=` `+n.raw,o.text+=` `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n),i=a.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);const o=r.at(-1);o?.type==="text"?(o.raw+=` `+n.raw,o.text+=` `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(e){const o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let i=e,n=null;if(this.tokens.links){const s=Object.keys(this.tokens.links);if(s.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)s.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,o="";for(;e;){a||(o=""),a=!1;let s;if(this.options.extensions?.inline?.some(c=>(s=c.call({lexer:this},e,r))?(e=e.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);const c=r.at(-1);s.type==="text"&&c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):r.push(s);continue}if(s=this.tokenizer.emStrong(e,i,o)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),r.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),r.push(s);continue}let l=e;if(this.options.extensions?.startInline){let c=1/0;const h=e.slice(1);let u;this.options.extensions.startInline.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(s=this.tokenizer.inlineText(l)){e=e.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(o=s.raw.slice(-1)),a=!0;const c=r.at(-1);c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):r.push(s);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},cn=class{options;parser;constructor(t){this.options=t||Ve}space(t){return""}code({text:t,lang:e,escaped:r}){const i=(e||"").match(Bt.notSpaceStart)?.[0],n=t.replace(Bt.endingNewline,"")+` `;return i?'
'+(r?n:Yt(n,!0))+`
`:"
"+(r?n:Yt(n,!0))+`
`}blockquote({tokens:t}){return`
${this.parser.parse(t)}
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} `}hr(t){return`
`}list(t){const e=t.ordered,r=t.start;let i="";for(let o=0;o `+i+" `}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Yt(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • `}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

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

    An error occurred:

    "+Yt(r.message+"",!0)+"
    ";return e?Promise.resolve(i):i}if(e)return Promise.reject(r);throw r}}},qe=new MC;function st(t,e){return qe.parse(t,e)}st.options=st.setOptions=function(t){return qe.setOptions(t),st.defaults=qe.defaults,Xu(st.defaults),st};st.getDefaults=Is;st.defaults=Ve;st.use=function(...t){return qe.use(...t),st.defaults=qe.defaults,Xu(st.defaults),st};st.walkTokens=function(t,e){return qe.walkTokens(t,e)};st.parseInline=qe.parseInline;st.Parser=ae;st.parser=ae.parse;st.Renderer=cn;st.TextRenderer=Ys;st.Lexer=ne;st.lexer=ne.lex;st.Tokenizer=ln;st.Hooks=Mi;st.parse=st;st.options;st.setOptions;st.use;st.walkTokens;st.parseInline;ae.parse;ne.lex;function of(t){for(var e=[],r=1;r?',height:80,width:80},Na=new Map,lf=new Map,$C=p(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(F.debug("Registering icon pack:",e.name),"loader"in e)lf.set(e.name,e.loader);else if("icons"in e)Na.set(e.name,e.icons);else throw F.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),cf=p(async(t,e)=>{const r=F_(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let n=Na.get(i);if(!n){const o=lf.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},Na.set(i,n)}catch(s){throw F.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=O_(n,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),FC=p(async t=>{try{return await cf(t),!0}catch{return!1}},"isIconAvailable"),oi=p(async(t,e,r)=>{let i;try{i=await cf(t,e?.fallbackPrefix)}catch(o){F.error(o),i=AC}const n=W_(i,e);return V_(G_(n.body),{...n.attributes,...r})},"getIconSVG");function hf(t,{markdownAutoWrap:e}){const i=t.replace(//g,` `).replace(/\n{2,}/g,` `),n=of(i);return e===!1?n.replace(/ /g," "):n}p(hf,"preprocessMarkdown");function uf(t,e={}){const r=hf(t,e),i=st.lexer(r),n=[[]];let a=0;function o(s,l="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:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(c=>{o(c,s.type)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}return p(o,"processNode"),i.forEach(s=>{s.type==="paragraph"?s.tokens?.forEach(l=>{o(l)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}),n}p(uf,"markdownToLines");function ff(t,{markdownAutoWrap:e}={}){const r=st.lexer(t);function i(n){return n.type==="text"?e===!1?n.text.replace(/\n */g,"
    ").replace(/ /g," "):n.text.replace(/\n */g,"
    "):n.type==="strong"?`${n.tokens?.map(i).join("")}`:n.type==="em"?`${n.tokens?.map(i).join("")}`:n.type==="paragraph"?`

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

    `:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:`Unsupported markdown: ${n.type}`}return p(i,"output"),r.map(i).join("")}p(ff,"markdownToHTML");function df(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}p(df,"splitTextToChars");function pf(t,e){const r=df(e.content);return Gs(t,[],r,e.type)}p(pf,"splitWordToFitWidth");function Gs(t,e,r,i){if(r.length===0)return[{content:e.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...e,n];return t([{content:o.join(""),type:i}])?Gs(t,o,a,i):(e.length===0&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}p(Gs,"splitWordToFitWidthRecursion");function gf(t,e){if(t.some(({content:r})=>r.includes(` `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return hn(t,e)}p(gf,"splitLineToFitWidth");function hn(t,e,r=[],i=[]){if(t.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";t[0].content===" "&&(n=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),e(o))return hn(t,e,r,o);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[s,l]=pf(e,a);r.push([s]),l.content&&t.unshift(l)}return hn(t,e,r)}p(hn,"splitLineToFitWidthRecursion");function za(t,e){e&&t.attr("style",e)}p(za,"applyStyle");async function mf(t,e,r,i,n=!1){const a=t.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);const o=a.append("xhtml:div");let s=e.label;e.label&&sr(e.label)&&(s=await rs(e.label.replace(dr.lineBreakRegex,` `),at()));const l=e.isNode?"nodeLabel":"edgeLabel",c=o.append("span");c.html(s),za(c,e.labelStyle),c.attr("class",`${l} ${i}`),za(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let h=o.node().getBoundingClientRect();return h.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),h=o.node().getBoundingClientRect()),a.node()}p(mf,"addHtmlSpan");function In(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}p(In,"createTspan");function yf(t,e,r){const i=t.append("text"),n=In(i,1,e);Pn(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(yf,"computeWidthOfText");function EC(t,e,r){const i=t.append("text"),n=In(i,1,e);Pn(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(EC,"computeDimensionOfText");function xf(t,e,r,i=!1){const a=e.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(f=>yf(a,1.1,f)<=t,"checkWidth"),u=h(c)?[c]:gf(c,h);for(const f of u){const d=In(s,l,1.1);Pn(d,f),l++}}if(i){const c=s.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return s.node()}p(xf,"createFormattedText");function Pn(t,e){t.text(""),e.forEach((r,i)=>{const n=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}p(Pn,"updateTextContentAndStyles");async function bf(t){const e=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,n,a)=>(e.push((async()=>{const o=`${n}:${a}`;return await FC(o)?await oi(o,void 0,{class:"label-icon"}):``})()),i));const r=await Promise.all(e);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??"")}p(bf,"replaceIconSubstring");var Te=p(async(t,e="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(F.debug("XYZ createText",e,r,i,n,a,o,"addSvgBackground: ",l),a){const h=ff(e,c),u=await bf(Ge(h)),f=e.replace(/\\\\/g,"\\"),d={isNode:o,label:sr(e)?f:u,labelStyle:r.replace("fill:","color:")};return await mf(t,d,s,n,l)}else{const h=e.replace(//g,"
    "),u=uf(h.replace("
    ","
    "),c),f=xf(s,t,u,e?l:!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:");rt(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");rt(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");rt(f).select("text").attr("style",g)}return f}},"createText");function Kn(t,e,r){if(t&&t.length){const[i,n]=e,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const l of t){const[c,h]=l;l[0]=(c-i)*o-(h-n)*s+i,l[1]=(c-i)*s+(h-n)*o+n}}}function DC(t,e){return t[0]===e[0]&&t[1]===e[1]}function OC(t,e,r,i=1){const n=r,a=Math.max(e,.1),o=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,s=[0,0];if(n)for(const c of o)Kn(c,s,n);const l=function(c,h,u){const f=[];for(const b of c){const _=[...b];DC(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&f.push(_)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let _=0;_b.ymin<_.ymin?-1:b.ymin>_.ymin?1:b.x<_.x?-1:b.x>_.x?1:b.ymax===_.ymax?0:(b.ymax-_.ymax)/Math.abs(b.ymax-_.ymax)),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let _=0;_y);_++)b=_;g.splice(0,b+1).forEach(_=>{m.push({s:y,edge:_})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,_)=>b.edge.x===_.edge.x?0:(b.edge.x-_.edge.x)/Math.abs(b.edge.x-_.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b=m.length)break;const v=m[b].edge,w=m[_].edge;d.push([[Math.round(v.x),y],[Math.round(w.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return d}(o,a,i);if(n){for(const c of o)Kn(c,s,-n);(function(c,h,u){const f=[];c.forEach(d=>f.push(...d)),Kn(f,h,u)})(l,s,-n)}return l}function li(t,e){var r;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),OC(t,n,i,a||1)}class Vs{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const i=li(e,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(e,r){const i=[];for(const n of e)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function Nn(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class RC extends Vs{fillPolygons(e,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=li(e,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)Nn([c,h])&&o.push([[c[0]-s,c[1]+l],[...h]],[[c[0]+s,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class IC extends Vs{fillPolygons(e,r){const i=this._fillPolygons(e,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,n);return i.ops=i.ops.concat(a.ops),i}}class PC{constructor(e){this.helper=e}fillPolygons(e,r){const i=li(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(e,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=n/4;for(const s of e){const l=Nn(s),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(s[0][0]+s[1][0])/2-n/4,d=Math.min(s[0][1],s[1][1]);for(let g=0;g{const s=Nn(o),l=Math.floor(s/(i+n)),c=(s+n-l*(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{const o=Nn(a),s=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;uh%2?c+r:c+e);a.push({key:"C",data:l}),e=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const l=s.map((c,h)=>h%2?c+r:c+e);a.push({key:"Q",data:l}),e=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const l=s.map((c,h)=>h%2?c+r:c+e);a.push({key:"S",data:l}),e=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=n}return a}function Cf(t){const e=[];let r="",i=0,n=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":e.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],e.push({key:"L",data:[i,n]});break;case"V":n=h[0],e.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=n+(n-l)):(u=i,f=n),e.push({key:"C",data:[u,f,...h]}),s=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-s),g=n+(n-l)):(d=i,g=n);const m=i+2*(d-i)/3,y=n+2*(g-n)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;e.push({key:"C",data:[m,y,x,b,u,f]}),s=d,l=g,i=u,n=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;e.push({key:"C",data:[m,y,x,b,d,g]}),s=u,l=f,i=d,n=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(e.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(wf(i,n,y,x,u,f,d,g,m).forEach(function(b){e.push({key:"C",data:b})}),i=y,n=x);break}case"Z":e.push({key:"Z",data:[]}),i=a,n=o}r=c}return e}function Sr(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function wf(t,e,r,i,n,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(c)[d,g,m,y]=c;else{[t,e]=Sr(t,e,-h),[r,i]=Sr(r,i,-h);const O=(t-r)/2,L=(e-i)/2;let B=O*O/(n*n)+L*L/(a*a);B>1&&(B=Math.sqrt(B),n*=B,a*=B);const k=n*n,$=a*a,M=k*$-k*L*L-$*O*O,W=k*L*L+$*O*O,U=(s===l?-1:1)*Math.sqrt(Math.abs(M/W));m=U*n*L/a+(t+r)/2,y=U*-a*O/n+(e+i)/2,d=Math.asin(parseFloat(((e-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),tg&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const O=g,L=r,B=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=wf(r=m+n*Math.cos(g),i=y+a*Math.sin(g),L,B,n,a,o,0,l,[g,O,m,y])}x=g-d;const b=Math.cos(d),_=Math.sin(d),v=Math.cos(g),w=Math.sin(g),T=Math.tan(x/4),S=4/3*n*T,D=4/3*a*T,E=[t,e],R=[t+S*_,e-D*b],A=[r+S*w,i-D*v],I=[r,i];if(R[0]=2*E[0]-R[0],R[1]=2*E[1]-R[1],c)return[R,A,I].concat(f);{f=[R,A,I].concat(f);const O=[];for(let L=0;L2){const n=[];for(let a=0;a2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-d)/2),x=cl(y,c,h,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=cl(y,c,h,u,f,d,g,1.5,l);x.push(...b)}return o&&(s?x.push(...ve(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...ve(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function sl(t,e){const r=Cf(_f(Us(t))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...ve(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[l,c,h,u,f,d]=s;i.push(...YC(l,c,h,u,f,d,a,e)),a=[f,d];break}case"Z":i.push(...ve(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:i}}function ta(t,e){const r=[];for(const i of t)if(i.length){const n=e.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+X(n,e),i[0][1]+X(n,e)]});for(let o=1;o500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,f=.2+.2*Sf(n);let d=n.bowing*n.maxRandomnessOffset*(i-e)/200,g=n.bowing*n.maxRandomnessOffset*(t-r)/200;d=X(d,n,c),g=X(g,n,c);const m=[],y=()=>X(u,n,c),x=()=>X(h,n,c),b=n.preserveVertices;return o?m.push({op:"move",data:[t+(b?0:y()),e+(b?0:y())]}):m.push({op:"move",data:[t+(b?0:X(h,n,c)),e+(b?0:X(h,n,c))]}),o?m.push({op:"bcurveTo",data:[d+t+(r-t)*f+y(),g+e+(i-e)*f+y(),d+t+2*(r-t)*f+y(),g+e+2*(i-e)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+t+(r-t)*f+x(),g+e+(i-e)*f+x(),d+t+2*(r-t)*f+x(),g+e+2*(i-e)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function yi(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+X(e,r),t[0][1]+X(e,r)]),i.push([t[0][0]+X(e,r),t[0][1]+X(e,r)]);for(let n=1;n3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let s=1;s+21&&n.push(s)):n.push(s),n.push(t[e+3])}else{const l=t[e+0],c=t[e+1],h=t[e+2],u=t[e+3],f=Me(l,c,.5),d=Me(c,h,.5),g=Me(h,u,.5),m=Me(f,d,.5),y=Me(d,g,.5),x=Me(m,y,.5);Ha([l,f,m,x],0,r,n),Ha([x,y,g,u],0,r,n)}var a,o;return n}function VC(t,e){return dn(t,0,t.length,e)}function dn(t,e,r,i,n){const a=n||[],o=t[e],s=t[r-1];let l=0,c=1;for(let h=e+1;hl&&(l=u,c=h)}return Math.sqrt(l)>i?(dn(t,e,c+1,i,a),dn(t,c,r,i,a)):(a.length||a.push(o),a.push(s)),a}function ea(t,e=.15,r){const i=[],n=(t.length-1)/3;for(let a=0;a0?dn(i,0,i.length,r):i}const Ot="none";class pn{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,i){return{shape:e,sets:r||[],options:i||this.defaultOptions}}line(e,r,i,n,a){const o=this._o(a);return this._d("line",[vf(e,r,i,n,o)],o)}rectangle(e,r,i,n,a){const o=this._o(a),s=[],l=jC(e,r,i,n,o);if(o.fill){const c=[[e,r],[e+i,r],[e+i,r+n],[e,r+n]];o.fillStyle==="solid"?s.push(ta([c],o)):s.push(Xe([c],o))}return o.stroke!==Ot&&s.push(l),this._d("rectangle",s,o)}ellipse(e,r,i,n,a){const o=this._o(a),s=[],l=kf(i,n,o),c=qa(e,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=qa(e,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push(Xe([c.estimatedPoints],o));return o.stroke!==Ot&&s.push(c.opset),this._d("ellipse",s,o)}circle(e,r,i,n){const a=this.ellipse(e,r,i,i,n);return a.shape="circle",a}linearPath(e,r){const i=this._o(r);return this._d("linearPath",[Ai(e,!1,i)],i)}arc(e,r,i,n,a,o,s=!1,l){const c=this._o(l),h=[],u=al(e,r,i,n,a,o,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=al(e,r,i,n,a,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,g,m,y,x,b){const _=f,v=d;let w=Math.abs(g/2),T=Math.abs(m/2);w+=X(.01*w,b),T+=X(.01*T,b);let S=y,D=x;for(;S<0;)S+=2*Math.PI,D+=2*Math.PI;D-S>2*Math.PI&&(S=0,D=2*Math.PI);const E=(D-S)/b.curveStepCount,R=[];for(let A=S;A<=D;A+=E)R.push([_+w*Math.cos(A),v+T*Math.sin(A)]);return R.push([_+w*Math.cos(D),v+T*Math.sin(D)]),R.push([_,v]),Xe([R],b)}(e,r,i,n,a,o,c));return c.stroke!==Ot&&h.push(u),this._d("arc",h,c)}curve(e,r){const i=this._o(r),n=[],a=nl(e,i);if(i.fill&&i.fill!==Ot)if(i.fillStyle==="solid"){const o=nl(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=e;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...ea(hl([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...ea(hl(c),10,(1+i.roughness)/2))}o.length&&n.push(Xe([o],i))}return i.stroke!==Ot&&n.push(a),this._d("curve",n,i)}polygon(e,r){const i=this._o(r),n=[],a=Ai(e,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(ta([e],i)):n.push(Xe([e],i))),i.stroke!==Ot&&n.push(a),this._d("polygon",n,i)}path(e,r){const i=this._o(r),n=[];if(!e)return this._d("path",n,i);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Ot,o=i.stroke!==Ot,s=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const d=Cf(_f(Us(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...ea(x,u)),x=[]},_=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:w,data:T}of d)switch(w){case"M":_(),y=[T[0],T[1]],m.push(y);break;case"L":b(),m.push([T[0],T[1]]);break;case"C":if(!x.length){const S=m.length?m[m.length-1]:y;x.push([S[0],S[1]])}x.push([T[0],T[1]]),x.push([T[2],T[3]]),x.push([T[4],T[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(_(),!f)return g;const v=[];for(const w of g){const T=VC(w,f);T.length&&v.push(T)}return v}(e,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=sl(e,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=sl(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(ta(l,i));else n.push(Xe(l,i));return o&&(s?l.forEach(h=>{n.push(Ai(h,!1,i))}):n.push(c)),this._d("path",n,i)}opsToPath(e,r){let i="";for(const n of e.ops){const a=typeof r=="number"&&r>=0?n.data.map(o=>+o.toFixed(r)):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(e){const r=e.sets||[],i=e.options||this.defaultOptions,n=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ot};break;case"fillPath":o={d:this.opsToPath(a),stroke:Ot,strokeWidth:0,fill:i.fill||Ot};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(e,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Ot,strokeWidth:i,fill:Ot}}_mergedShape(e){return e.filter((r,i)=>i===0||r.op!=="move")}}class UC{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new pn(r)}draw(e){const r=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const s=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(e,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),e.save(),i.fillLineDash&&e.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(e.lineDashOffset=i.fillLineDashOffset),e.strokeStyle=i.fill||"",e.lineWidth=n,this._drawToContext(e,r,i.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,i,n="nonzero"){e.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(s=>+s.toFixed(i)):a.data;switch(a.op){case"move":e.moveTo(o[0],o[1]);break;case"bcurveTo":e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":e.lineTo(o[0],o[1])}}r.type==="fillPath"?e.fill(n):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,i,n,a){const o=this.gen.line(e,r,i,n,a);return this.draw(o),o}rectangle(e,r,i,n,a){const o=this.gen.rectangle(e,r,i,n,a);return this.draw(o),o}ellipse(e,r,i,n,a){const o=this.gen.ellipse(e,r,i,n,a);return this.draw(o),o}circle(e,r,i,n){const a=this.gen.circle(e,r,i,n);return this.draw(a),a}linearPath(e,r){const i=this.gen.linearPath(e,r);return this.draw(i),i}polygon(e,r){const i=this.gen.polygon(e,r);return this.draw(i),i}arc(e,r,i,n,a,o,s=!1,l){const c=this.gen.arc(e,r,i,n,a,o,s,l);return this.draw(c),c}curve(e,r){const i=this.gen.curve(e,r);return this.draw(i),i}path(e,r){const i=this.gen.path(e,r);return this.draw(i),i}}const xi="http://www.w3.org/2000/svg";class XC{constructor(e,r){this.svg=e,this.gen=new pn(r)}draw(e){const r=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(xi,"g"),o=e.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=n.createElementNS(xi,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(xi,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,s,i)}l&&a.appendChild(l)}return a}fillSketch(e,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=e.createElementNS(xi,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,i,n,a){const o=this.gen.line(e,r,i,n,a);return this.draw(o)}rectangle(e,r,i,n,a){const o=this.gen.rectangle(e,r,i,n,a);return this.draw(o)}ellipse(e,r,i,n,a){const o=this.gen.ellipse(e,r,i,n,a);return this.draw(o)}circle(e,r,i,n){const a=this.gen.circle(e,r,i,n);return this.draw(a)}linearPath(e,r){const i=this.gen.linearPath(e,r);return this.draw(i)}polygon(e,r){const i=this.gen.polygon(e,r);return this.draw(i)}arc(e,r,i,n,a,o,s=!1,l){const c=this.gen.arc(e,r,i,n,a,o,s,l);return this.draw(c)}curve(e,r){const i=this.gen.curve(e,r);return this.draw(i)}path(e,r){const i=this.gen.path(e,r);return this.draw(i)}}var q={canvas:(t,e)=>new UC(t,e),svg:(t,e)=>new XC(t,e),generator:t=>new pn(t),newSeed:()=>pn.newSeed()},J=p(async(t,e,r)=>{let i;const n=e.useHtmlLabels||mt(at()?.htmlLabels);r?i=r:i="node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",Lt(e.labelStyle));let s;e.label===void 0?s="":s=typeof e.label=="string"?e.label:e.label[0];const l=await Te(o,Ie(Ge(s),at()),{useHtmlLabels:n,width:e.width||at().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let c=l.getBBox();const h=(e?.padding??0)/2;if(n){const u=l.children[0],f=rt(l),d=u.getElementsByTagName("img");if(d){const g=s.replace(/]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=at().fontSize?at().fontSize:window.getComputedStyle(document.body).fontSize,_=5,[v=Il.fontSize]=Dn(b),w=v*_+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}return n?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),e.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:o}},"labelHelper"),ra=p(async(t,e,r)=>{const i=r.useHtmlLabels||mt(at()?.flowchart?.htmlLabels),n=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Te(n,Ie(Ge(e),at()),{useHtmlLabels:i,width:r.width||at()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(mt(at()?.flowchart?.htmlLabels)){const l=a.children[0],c=rt(a);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:o,halfPadding:s,label:n}},"insertLabel"),j=p((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),Z=p((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function it(t){const e=t.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}p(it,"createPathFromPoints");function ke(t,e,r,i,n,a){const o=[],l=r-t,c=i-e,h=l/a,u=2*Math.PI/h,f=e+c/2;for(let d=0;d<=50;d++){const g=d/50,m=t+g*l,y=f+n*Math.sin(u*(m-t));o.push({x:m,y})}return o}p(ke,"generateFullSineWavePoints");function Xs(t,e,r,i,n,a){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u{var r=t.x,i=t.y,n=e.x-r,a=e.y-i,o=t.width/2,s=t.height/2,l,c;return Math.abs(a)*o>Math.abs(n)*s?(a<0&&(s=-s),l=a===0?0:s*n/a,c=s):(n<0&&(o=-o),l=o,c=n===0?0:o*a/n),{x:r+l,y:i+c}},"intersectRect"),yr=ZC;function Tf(t,e){e&&t.attr("style",e)}p(Tf,"applyStyle");async function Bf(t){const e=rt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let i=t.label;t.label&&sr(t.label)&&(i=await rs(t.label.replace(dr.lineBreakRegex,` `),at()));const n=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+i+""),Tf(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}p(Bf,"addHtmlLabel");var KC=p(async(t,e,r,i)=>{let n=t||"";if(typeof n=="object"&&(n=n[0]),mt(at().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"
    "),F.info("vertexText"+n);const a={isNode:i,label:Ge(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>``),labelStyle:e&&e.replace("fill:","color:")};return await Bf(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|/gi):Array.isArray(n)?o=n:o=[];for(const s of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s.trim(),a.appendChild(l)}return a}},"createLabel"),Oe=KC,fe=p((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),Lf=p(async(t,e)=>{F.info("Creating subgraph rect for ",e.id,e);const r=at(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Y(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),f=mt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Te(d,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(mt(r.flowchart.htmlLabels)){const S=g.children[0],D=rt(g);m=S.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const x=e.height,b=e.x-y/2,_=e.y-x/2;F.trace("Data ",e,JSON.stringify(e));let v;if(e.look==="handDrawn"){const S=q.svg(u),D=H(e,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),E=S.path(fe(b,_,y,x,0),D);v=u.insert(()=>(F.debug("Rough node insert CXC",E),E),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=ps(r);if(d.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+w})`),s){const S=d.select("span");S&&S.attr("style",s)}const T=v.node().getBBox();return e.offsetX=0,e.width=T.width,e.height=T.height,e.offsetY=m.height-e.padding/2,e.intersect=function(S){return yr(e,S)},{cluster:u,labelBBox:m}},"rect"),QC=p((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,a=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(s){return yr(e,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),JC=p(async(t,e)=>{const r=at(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,c=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=u.node().appendChild(await Oe(e.label,e.labelStyle,void 0,!0));let g=d.getBBox();if(mt(r.flowchart.htmlLabels)){const E=d.children[0],R=rt(d);g=E.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}const m=0*e.padding,y=m/2,x=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+m;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height+m,_=e.height+m-g.height-6,v=e.x-x/2,w=e.y-b/2;e.width=x;const T=e.y-e.height/2-y+g.height+2;let S;if(e.look==="handDrawn"){const E=e.cssClasses.includes("statediagram-cluster-alt"),R=q.svg(c),A=e.rx||e.ry?R.path(fe(v,w,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:n}):R.rectangle(v,w,x,b,{seed:n});S=c.insert(()=>A,":first-child");const I=R.rectangle(v,T,x,_,{fill:E?a:o,fillStyle:E?"hachure":"solid",stroke:l,seed:n});S=c.insert(()=>A,":first-child"),f=c.insert(()=>I)}else S=h.insert("rect",":first-child"),S.attr("class","outer").attr("x",v).attr("y",w).attr("width",x).attr("height",b).attr("data-look",e.look),f.attr("class","inner").attr("x",v).attr("y",T).attr("width",x).attr("height",_);u.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(mt(r.flowchart.htmlLabels)?0:3)})`);const D=S.node().getBBox();return e.height=D.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(E){return yr(e,E)},{cluster:c,labelBBox:g}},"roundedWithTitle"),tw=p(async(t,e)=>{F.info("Creating subgraph rect for ",e.id,e);const r=at(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Y(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),f=mt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Te(d,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0,width:e.width});let m=g.getBBox();if(mt(r.flowchart.htmlLabels)){const S=g.children[0],D=rt(g);m=S.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const x=e.height,b=e.x-y/2,_=e.y-x/2;F.trace("Data ",e,JSON.stringify(e));let v;if(e.look==="handDrawn"){const S=q.svg(u),D=H(e,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),E=S.path(fe(b,_,y,x,e.rx),D);v=u.insert(()=>(F.debug("Rough node insert CXC",E),E),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=ps(r);if(d.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+w})`),s){const S=d.select("span");S&&S.attr("style",s)}const T=v.node().getBBox();return e.offsetX=0,e.width=T.width,e.height=T.height,e.offsetY=m.height-e.padding/2,e.intersect=function(S){return yr(e,S)},{cluster:u,labelBBox:m}},"kanbanSection"),ew=p((t,e)=>{const r=at(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),s=o.insert("g",":first-child"),l=0*e.padding,c=e.width+l;e.diff=-e.padding;const h=e.height+l,u=e.x-c/2,f=e.y-h/2;e.width=c;let d;if(e.look==="handDrawn"){const y=q.svg(o).rectangle(u,f,c,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",c).attr("height",h).attr("data-look",e.look);const g=d.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(m){return yr(e,m)},{cluster:o,labelBBox:{}}},"divider"),rw=Lf,iw={rect:Lf,squareRect:rw,roundedWithTitle:JC,noteGroup:QC,divider:ew,kanbanSection:tw},Mf=new Map,nw=p(async(t,e)=>{const r=e.shape||"rect",i=await iw[r](t,e);return Mf.set(e.id,i),i},"insertCluster"),AT=p(()=>{Mf=new Map},"clear");function Af(t,e){return t.intersect(e)}p(Af,"intersectNode");var aw=Af;function $f(t,e,r,i){var n=t.x,a=t.y,o=n-i.x,s=a-i.y,l=Math.sqrt(e*e*s*s+r*r*o*o),c=Math.abs(e*r*o/l);i.x0}p(ja,"sameSign");var ow=Df;function Of(t,e,r){let i=t.x,n=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=i-t.width/2-o,c=n-t.height/2-s;for(let h=0;h1&&a.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return gh,":first-child");return u.attr("class","anchor").attr("style",Lt(s)),j(e,u),e.intersect=function(f){return F.info("Circle intersect",e,o,f),z.circle(e,o,f)},a}p(Rf,"anchor");function Ya(t,e,r,i,n,a,o){const l=(t+r)/2,c=(e+i)/2,h=Math.atan2(i-e,r-t),u=(r-t)/2,f=(i-e)/2,d=u/n,g=f/a,m=Math.sqrt(d**2+g**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=l+y*a*Math.sin(h)*(o?-1:1),b=c-y*n*Math.cos(h)*(o?-1:1),_=Math.atan2((e-b)/a,(t-x)/n);let w=Math.atan2((i-b)/a,(r-x)/n)-_;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const T=[];for(let S=0;S<20;S++){const D=S/19,E=_+D*w,R=x+n*Math.cos(E),A=b+a*Math.sin(E);T.push({x:R,y:A})}return T}p(Ya,"generateArcPoints");async function If(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=a.width+e.padding+20,s=a.height+e.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:h}=e,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Ya(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...Ya(o/2,s/2,o/2,-s/2,c,l,!0)],f=q.svg(n),d=H(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=it(u),m=f.path(g,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),j(e,y),e.intersect=function(x){return z.polygon(e,u,x)},n}p(If,"bowTieRect");function de(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}p(de,"insertPolygonShape");async function Pf(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=a.height+e.padding,s=12,l=a.width+e.padding+s,c=0,h=l,u=-o,f=0,d=[{x:c+s,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+s},{x:c+s,y:u}];let g;const{cssStyles:m}=e;if(e.look==="handDrawn"){const y=q.svg(n),x=H(e,{}),b=it(d),_=y.path(b,x);g=n.insert(()=>_,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=de(n,l,o,d);return i&&g.attr("style",i),j(e,g),e.intersect=function(y){return z.polygon(e,d,y)},n}p(Pf,"card");function Nf(t,e){const{nodeStyles:r}=Y(e);e.label="";const i=t.insert("g").attr("class",Z(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,a=Math.max(28,e.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=q.svg(i),l=H(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=it(o),h=s.path(c,l),u=i.insert(()=>h,":first-child");return n&&e.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&e.look!=="handDrawn"&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(f){return z.polygon(e,o,f)},i}p(Nf,"choice");async function zf(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await J(t,e,Z(e)),s=a.width/2+o;let l;const{cssStyles:c}=e;if(e.look==="handDrawn"){const h=q.svg(n),u=H(e,{}),f=h.circle(0,0,s*2,u);l=n.insert(()=>f,":first-child"),l.attr("class","basic label-container").attr("style",Lt(c))}else l=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return j(e,l),e.intersect=function(h){return F.info("Circle intersect",e,s,h),z.circle(e,s,h)},n}p(zf,"circle");function qf(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=t*2,n={x:i/2*e,y:i/2*r},a={x:-(i/2)*e,y:i/2*r},o={x:-(i/2)*e,y:-(i/2)*r},s={x:i/2*e,y:-(i/2)*r};return`M ${a.x},${a.y} L ${s.x},${s.y} M ${n.x},${n.y} L ${o.x},${o.y}`}p(qf,"createLine");function Wf(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r,e.label="";const n=t.insert("g").attr("class",Z(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:o}=e,s=q.svg(n),l=H(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,a*2,l),h=qf(a),u=s.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),o&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",i),j(e,f),e.intersect=function(d){return F.info("crossedCircle intersect",e,{radius:a,point:d}),z.circle(e,a,d)},n}p(Wf,"crossedCircle");function re(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u_,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-s/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),j(e,v),e.intersect=function(w){return z.polygon(e,f,w)},n}p(Hf,"curlyBraceLeft");function ie(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u_,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),j(e,v),e.intersect=function(w){return z.polygon(e,f,w)},n}p(jf,"curlyBraceRight");function xt(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;uS,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>w,":first-child"),D.attr("class","text"),h&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),j(e,D),e.intersect=function(E){return z.polygon(e,d,E)},n}p(Yf,"curlyBraces");async function Gf(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=80,s=20,l=Math.max(o,(a.width+(e.padding??0)*2)*1.25,e?.width??0),c=Math.max(s,a.height+(e.padding??0)*2,e?.height??0),h=c/2,{cssStyles:u}=e,f=q.svg(n),d=H(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Xs(-y,-m/2,h,50,270,90)],_=it(b),v=f.path(_,d),w=n.insert(()=>v,":first-child");return w.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",u),i&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-l/2}, ${-c/2})`),j(e,w),e.intersect=function(T){return z.polygon(e,b,T)},n}p(Gf,"curvedTrapezoid");var cw=p((t,e,r,i,n,a)=>[`M${t},${e+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),hw=p((t,e,r,i,n,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),uw=p((t,e,r,i,n,a)=>[`M${t-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Vf(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=Math.max(a.width+e.padding,e.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+e.padding,e.height??0);let u;const{cssStyles:f}=e;if(e.look==="handDrawn"){const d=q.svg(n),g=hw(0,0,s,h,l,c),m=uw(0,c,s,h,l,c),y=d.path(g,H(e,{})),x=d.path(m,H(e,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=cw(0,0,s,h,l,c);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",Lt(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),j(e,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(d){const g=z.rect(e,d),m=g.x-(e.x??0);if(l!=0&&(Math.abs(m)<(e.width??0)/2||Math.abs(m)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(e.y??0)>0&&(y=-y),g.y+=y}return g},n}p(Vf,"cylinder");async function Uf(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=a.width+e.padding,l=a.height+e.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:f}=e,d=q.svg(n),g=H(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(e.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(e.padding??0)/2-(a.y-(a.top??0))})`),j(e,x),e.intersect=function(b){return z.rect(e,b)},n}p(Uf,"dividedRectangle");async function Xf(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await J(t,e,Z(e)),l=a.width/2+o+5,c=a.width/2+o;let h;const{cssStyles:u}=e;if(e.look==="handDrawn"){const f=q.svg(n),d=H(e,{roughness:.2,strokeWidth:2.5}),g=H(e,{roughness:.2,strokeWidth:1.5}),m=f.circle(0,0,l*2,d),y=f.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",Lt(e.cssClasses)).attr("style",Lt(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const f=h.insert("circle",":first-child"),d=h.insert("circle");h.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),d.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return j(e,h),e.intersect=function(f){return F.info("DoubleCircle intersect",e,l,f),z.circle(e,l,f)},n}p(Xf,"doublecircle");function Zf(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=Y(e);e.label="",e.labelStyle=i;const a=t.insert("g").attr("class",Z(e)).attr("id",e.domId??e.id),o=7,{cssStyles:s}=e,l=q.svg(a),{nodeBorder:c}=r,h=H(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",n),j(e,f),e.intersect=function(d){return F.info("filledCircle intersect",e,{radius:o,point:d}),z.circle(e,o,d)},a}p(Zf,"filledCircle");async function Kf(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=a.width+(e.padding??0),l=s+a.height,c=s+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=e,f=q.svg(n),d=H(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=it(h),m=f.path(g,d),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),e.width=s,e.height=l,j(e,y),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(x){return F.info("Triangle intersect",e,h,x),z.polygon(e,h,x)},n}p(Kf,"flippedTriangle");function Qf(t,e,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=Y(e);e.label="";const o=t.insert("g").attr("class",Z(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);r==="LR"&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));const h=-1*l/2,u=-1*c/2,f=q.svg(o),d=H(e,{stroke:n.lineColor,fill:n.lineColor});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,l,c,d),m=o.insert(()=>g,":first-child");s&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),j(e,m);const y=i?.padding??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(x){return z.rect(e,x)},o}p(Qf,"forkJoin");async function Jf(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await J(t,e,Z(e)),l=Math.max(n,s.width+(e.padding??0)*2,e?.width??0),c=Math.max(a,s.height+(e.padding??0)*2,e?.height??0),h=c/2,{cssStyles:u}=e,f=q.svg(o),d=H(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Xs(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=it(g),y=f.path(m,d),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),j(e,x),e.intersect=function(b){return F.info("Pill intersect",e,{radius:h,point:b}),z.polygon(e,g,b)},o}p(Jf,"halfRoundedRectangle");var fw=p((t,e,r,i,n)=>[`M${t+n},${e}`,`L${t+r-n},${e}`,`L${t+r},${e-i/2}`,`L${t+r-n},${e-i}`,`L${t+n},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function td(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=4,s=a.height+e.padding,l=s/o,c=a.width+2*l+e.padding,h=[{x:l,y:0},{x:c-l,y:0},{x:c,y:-s/2},{x:c-l,y:-s},{x:l,y:-s},{x:0,y:-s/2}];let u;const{cssStyles:f}=e;if(e.look==="handDrawn"){const d=q.svg(n),g=H(e,{}),m=fw(0,0,c,s,l),y=d.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${s/2})`),f&&u.attr("style",f)}else u=de(n,c,s,h);return i&&u.attr("style",i),e.width=c,e.height=s,j(e,u),e.intersect=function(d){return z.polygon(e,h,d)},n}p(td,"hexagon");async function ed(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.label="",e.labelStyle=r;const{shapeSvg:n}=await J(t,e,Z(e)),a=Math.max(30,e?.width??0),o=Math.max(30,e?.height??0),{cssStyles:s}=e,l=q.svg(n),c=H(e,{});e.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=it(h),f=l.path(u,c),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container"),s&&e.look!=="handDrawn"&&d.selectChildren("path").attr("style",s),i&&e.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),j(e,d),e.intersect=function(g){return F.info("Pill intersect",e,{points:h}),z.polygon(e,h,g)},n}p(ed,"hourglass");async function rd(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Y(e);e.labelStyle=n;const a=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await J(t,e,"icon-shape default"),f=e.pos==="t",d=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=pr(e),x=-g/2,b=-d/2,_=e.label?8:0,v=q.svg(c),w=H(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=v.rectangle(x,b,g,d,w),S=Math.max(g,h.width),D=d+h.height+_,E=v.rectangle(-S/2,-D/2,S,D,{...w,fill:"transparent",stroke:"none"}),R=c.insert(()=>T,":first-child"),A=c.insert(()=>E);if(e.icon){const I=c.append("g");I.html(`${await oi(e.icon,{height:s,width:s,fallbackPrefix:""})}`);const O=I.node().getBBox(),L=O.width,B=O.height,k=O.x,$=O.y;I.attr("transform",`translate(${-L/2-k},${f?h.height/2+_/2-B/2-$:-h.height/2-_/2-B/2-$})`),I.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})`),R.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),j(e,A),e.intersect=function(I){if(F.info("iconSquare intersect",e,I),!e.label)return z.rect(e,I);const O=e.x??0,L=e.y??0,B=e.height??0;let k=[];return f?k=[{x:O-h.width/2,y:L-B/2},{x:O+h.width/2,y:L-B/2},{x:O+h.width/2,y:L-B/2+h.height+_},{x:O+g/2,y:L-B/2+h.height+_},{x:O+g/2,y:L+B/2},{x:O-g/2,y:L+B/2},{x:O-g/2,y:L-B/2+h.height+_},{x:O-h.width/2,y:L-B/2+h.height+_}]:k=[{x:O-g/2,y:L-B/2},{x:O+g/2,y:L-B/2},{x:O+g/2,y:L-B/2+d},{x:O+h.width/2,y:L-B/2+d},{x:O+h.width/2/2,y:L+B/2},{x:O-h.width/2,y:L+B/2},{x:O-h.width/2,y:L-B/2+d},{x:O-g/2,y:L-B/2+d}],z.polygon(e,k,I)},c}p(rd,"icon");async function id(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Y(e);e.labelStyle=n;const a=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await J(t,e,"icon-shape default"),f=20,d=e.label?8:0,g=e.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=pr(e),b=q.svg(c),_=H(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=x.get("fill");_.stroke=v??y;const w=c.append("g");e.icon&&w.html(`${await oi(e.icon,{height:s,width:s,fallbackPrefix:""})}`);const T=w.node().getBBox(),S=T.width,D=T.height,E=T.x,R=T.y,A=Math.max(S,D)*Math.SQRT2+f*2,I=b.circle(0,0,A,_),O=Math.max(A,h.width),L=A+h.height+d,B=b.rectangle(-O/2,-L/2,O,L,{..._,fill:"transparent",stroke:"none"}),k=c.insert(()=>I,":first-child"),$=c.insert(()=>B);return w.attr("transform",`translate(${-S/2-E},${g?h.height/2+d/2-D/2-R:-h.height/2-d/2-D/2-R})`),w.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-L/2:L/2-h.height})`),k.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),j(e,$),e.intersect=function(M){return F.info("iconSquare intersect",e,M),z.rect(e,M)},c}p(id,"iconCircle");async function nd(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Y(e);e.labelStyle=n;const a=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await J(t,e,"icon-shape default"),d=e.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=pr(e),_=-m/2,v=-g/2,w=e.label?8:0,T=q.svg(c),S=H(e,{});e.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=b.get("fill");S.stroke=D??x;const E=T.path(fe(_,v,m,g,5),S),R=Math.max(m,h.width),A=g+h.height+w,I=T.rectangle(-R/2,-A/2,R,A,{...S,fill:"transparent",stroke:"none"}),O=c.insert(()=>E,":first-child").attr("class","icon-shape2"),L=c.insert(()=>I);if(e.icon){const B=c.append("g");B.html(`${await oi(e.icon,{height:s,width:s,fallbackPrefix:""})}`);const k=B.node().getBBox(),$=k.width,M=k.height,W=k.x,U=k.y;B.attr("transform",`translate(${-$/2-W},${d?h.height/2+w/2-M/2-U:-h.height/2-w/2-M/2-U})`),B.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-A/2:A/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),j(e,L),e.intersect=function(B){if(F.info("iconSquare intersect",e,B),!e.label)return z.rect(e,B);const k=e.x??0,$=e.y??0,M=e.height??0;let W=[];return d?W=[{x:k-h.width/2,y:$-M/2},{x:k+h.width/2,y:$-M/2},{x:k+h.width/2,y:$-M/2+h.height+w},{x:k+m/2,y:$-M/2+h.height+w},{x:k+m/2,y:$+M/2},{x:k-m/2,y:$+M/2},{x:k-m/2,y:$-M/2+h.height+w},{x:k-h.width/2,y:$-M/2+h.height+w}]:W=[{x:k-m/2,y:$-M/2},{x:k+m/2,y:$-M/2},{x:k+m/2,y:$-M/2+g},{x:k+h.width/2,y:$-M/2+g},{x:k+h.width/2/2,y:$+M/2},{x:k-h.width/2,y:$+M/2},{x:k-h.width/2,y:$-M/2+g},{x:k-m/2,y:$-M/2+g}],z.polygon(e,W,B)},c}p(nd,"iconRounded");async function ad(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Y(e);e.labelStyle=n;const a=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await J(t,e,"icon-shape default"),d=e.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=pr(e),_=-m/2,v=-g/2,w=e.label?8:0,T=q.svg(c),S=H(e,{});e.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=b.get("fill");S.stroke=D??x;const E=T.path(fe(_,v,m,g,.1),S),R=Math.max(m,h.width),A=g+h.height+w,I=T.rectangle(-R/2,-A/2,R,A,{...S,fill:"transparent",stroke:"none"}),O=c.insert(()=>E,":first-child"),L=c.insert(()=>I);if(e.icon){const B=c.append("g");B.html(`${await oi(e.icon,{height:s,width:s,fallbackPrefix:""})}`);const k=B.node().getBBox(),$=k.width,M=k.height,W=k.x,U=k.y;B.attr("transform",`translate(${-$/2-W},${d?h.height/2+w/2-M/2-U:-h.height/2-w/2-M/2-U})`),B.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-A/2:A/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),j(e,L),e.intersect=function(B){if(F.info("iconSquare intersect",e,B),!e.label)return z.rect(e,B);const k=e.x??0,$=e.y??0,M=e.height??0;let W=[];return d?W=[{x:k-h.width/2,y:$-M/2},{x:k+h.width/2,y:$-M/2},{x:k+h.width/2,y:$-M/2+h.height+w},{x:k+m/2,y:$-M/2+h.height+w},{x:k+m/2,y:$+M/2},{x:k-m/2,y:$+M/2},{x:k-m/2,y:$-M/2+h.height+w},{x:k-h.width/2,y:$-M/2+h.height+w}]:W=[{x:k-m/2,y:$-M/2},{x:k+m/2,y:$-M/2},{x:k+m/2,y:$-M/2+g},{x:k+h.width/2,y:$-M/2+g},{x:k+h.width/2/2,y:$+M/2},{x:k-h.width/2,y:$+M/2},{x:k-h.width/2,y:$-M/2+g},{x:k-m/2,y:$-M/2+g}],z.polygon(e,W,B)},c}p(ad,"iconSquare");async function sd(t,e,{config:{flowchart:r}}){const i=new Image;i.src=e?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=n/a;const{labelStyles:o}=Y(e);e.labelStyle=o;const s=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const l=Math.max(e.label?s??0:0,e?.assetWidth??n),c=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,h=e.constraint==="on"?c/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(c,s??0);const{shapeSvg:u,bbox:f,label:d}=await J(t,e,"image-shape default"),g=e.pos==="t",m=-c/2,y=-h/2,x=e.label?8:0,b=q.svg(u),_=H(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=b.rectangle(m,y,c,h,_),w=Math.max(c,f.width),T=h+f.height+x,S=b.rectangle(-w/2,-T/2,w,T,{..._,fill:"none",stroke:"none"}),D=u.insert(()=>v,":first-child"),E=u.insert(()=>S);if(e.img){const R=u.append("image");R.attr("href",e.img),R.attr("width",c),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${g?T/2-h:-T/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),D.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),j(e,E),e.intersect=function(R){if(F.info("iconSquare intersect",e,R),!e.label)return z.rect(e,R);const A=e.x??0,I=e.y??0,O=e.height??0;let L=[];return g?L=[{x:A-f.width/2,y:I-O/2},{x:A+f.width/2,y:I-O/2},{x:A+f.width/2,y:I-O/2+f.height+x},{x:A+c/2,y:I-O/2+f.height+x},{x:A+c/2,y:I+O/2},{x:A-c/2,y:I+O/2},{x:A-c/2,y:I-O/2+f.height+x},{x:A-f.width/2,y:I-O/2+f.height+x}]:L=[{x:A-c/2,y:I-O/2},{x:A+c/2,y:I-O/2},{x:A+c/2,y:I-O/2+h},{x:A+f.width/2,y:I-O/2+h},{x:A+f.width/2/2,y:I+O/2},{x:A-f.width/2,y:I+O/2},{x:A-f.width/2,y:I-O/2+h},{x:A-c/2,y:I-O/2+h}],z.polygon(e,L,R)},u}p(sd,"imageSquare");async function od(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),s=Math.max(a.height+(e.padding??0)*2,e?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=q.svg(n),f=H(e,{}),d=it(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=de(n,o,s,l);return i&&c.attr("style",i),e.width=o,e.height=s,j(e,c),e.intersect=function(u){return z.polygon(e,l,u)},n}p(od,"inv_trapezoid");async function ci(t,e,r){const{labelStyles:i,nodeStyles:n}=Y(e);e.labelStyle=i;const{shapeSvg:a,bbox:o}=await J(t,e,Z(e)),s=Math.max(o.width+r.labelPaddingX*2,e?.width||0),l=Math.max(o.height+r.labelPaddingY*2,e?.height||0),c=-s/2,h=-l/2;let u,{rx:f,ry:d}=e;const{cssStyles:g}=e;if(r?.rx&&r.ry&&(f=r.rx,d=r.ry),e.look==="handDrawn"){const m=q.svg(a),y=H(e,{}),x=f||d?m.path(fe(c,h,s,l,f||0),y):m.rectangle(c,h,s,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Lt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",Lt(f)).attr("ry",Lt(d)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return j(e,u),e.intersect=function(m){return z.rect(e,m)},a}p(ci,"drawRect");async function ld(t,e){const{shapeSvg:r,bbox:i,label:n}=await J(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),j(e,a),e.intersect=function(l){return z.rect(e,l)},r}p(ld,"labelRect");async function cd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),s=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=q.svg(n),f=H(e,{}),d=it(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=de(n,o,s,l);return i&&c.attr("style",i),e.width=o,e.height=s,j(e,c),e.intersect=function(u){return z.polygon(e,l,u)},n}p(cd,"lean_left");async function hd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),s=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=q.svg(n),f=H(e,{}),d=it(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=de(n,o,s,l);return i&&c.attr("style",i),e.width=o,e.height=s,j(e,c),e.intersect=function(u){return z.polygon(e,l,u)},n}p(hd,"lean_right");function ud(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.label="",e.labelStyle=r;const n=t.insert("g").attr("class",Z(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(35,e?.width??0),s=Math.max(35,e?.height??0),l=7,c=[{x:o,y:0},{x:0,y:s+l/2},{x:o-2*l,y:s+l/2},{x:0,y:2*s},{x:o,y:s-l/2},{x:2*l,y:s-l/2}],h=q.svg(n),u=H(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=it(c),d=h.path(f,u),g=n.insert(()=>d,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),j(e,g),e.intersect=function(m){return F.info("lightningBolt intersect",e,m),z.polygon(e,c,m)},n}p(ud,"lightningBolt");var dw=p((t,e,r,i,n,a,o)=>[`M${t},${e+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${t},${e+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),pw=p((t,e,r,i,n,a,o)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${t},${e+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),gw=p((t,e,r,i,n,a)=>[`M${t-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function fd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=Math.max(a.width+(e.padding??0),e.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+(e.padding??0),e.height??0),u=h*.1;let f;const{cssStyles:d}=e;if(e.look==="handDrawn"){const g=q.svg(n),m=pw(0,0,s,h,l,c,u),y=gw(0,c,s,h,l,c),x=H(e,{}),b=g.path(m,x),_=g.path(y,x);n.insert(()=>_,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=dw(0,0,s,h,l,c,u);f=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Lt(d)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),j(e,f),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),e.intersect=function(g){const m=z.rect(e,g),y=m.x-(e.x??0);if(l!=0&&(Math.abs(y)<(e.width??0)/2||Math.abs(y)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(e.y??0)>0&&(x=-x),m.y+=x}return m},n}p(fd,"linedCylinder");async function dd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),c=l/4,h=l+c,{cssStyles:u}=e,f=q.svg(n),d=H(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...ke(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,c,.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(g.map(x=>[x.x,x.y]),d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),j(e,y),e.intersect=function(x){return z.polygon(e,g,x)},n}p(dd,"linedWaveEdgedRect");async function pd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=e,d=q.svg(n),g=H(e,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+s-c,y:u+l+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u+l-c},{x:h+s+c,y:u+l-c},{x:h+s+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+s-c,y:u+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u},{x:h,y:u}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=it(m),b=d.path(x,g),_=it(y),v=d.path(_,{...g,fill:"none"}),w=n.insert(()=>v,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),j(e,w),e.intersect=function(T){return z.polygon(e,m,T)},n}p(pd,"multiRect");async function gd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),c=l/4,h=l+c,u=-s/2,f=-h/2,d=5,{cssStyles:g}=e,m=ke(u-d,f+h+d,u+s-d,f+h+d,c,.8),y=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}],_=q.svg(n),v=H(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=it(x),T=_.path(w,v),S=it(b),D=_.path(S,v),E=n.insert(()=>T,":first-child");return E.insert(()=>D),E.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",g),i&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(a.width/2)-d-(a.x-(a.left??0))}, ${-(a.height/2)+d-c/2-(a.y-(a.top??0))})`),j(e,E),e.intersect=function(R){return z.polygon(e,x,R)},n}p(gd,"multiWaveEdgedRectangle");async function md(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=Y(e);e.labelStyle=i,e.useHtmlLabels||Dt().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);const{shapeSvg:o,bbox:s}=await J(t,e,Z(e)),l=Math.max(s.width+(e.padding??0)*2,e?.width??0),c=Math.max(s.height+(e.padding??0)*2,e?.height??0),h=-l/2,u=-c/2,{cssStyles:f}=e,d=q.svg(o),g=H(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=d.rectangle(h,u,l,c,g),y=o.insert(()=>m,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),j(e,y),e.intersect=function(x){return z.rect(e,x)},o}p(md,"note");var mw=p((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function yd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=a.width+e.padding,s=a.height+e.padding,l=o+s,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let h;const{cssStyles:u}=e;if(e.look==="handDrawn"){const f=q.svg(n),d=H(e,{}),g=mw(0,0,l),m=f.path(g,d);h=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=de(n,l,l,c);return i&&h.attr("style",i),j(e,h),e.intersect=function(f){return F.debug(`APA12 Intersect called SPLIT point:`,f,` node: `,e,` res:`,z.polygon(e,c,f)),z.polygon(e,c,f)},n}p(yd,"question");async function xd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),c=-s/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:d}=e,g=q.svg(n),m=H(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=it(f),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),j(e,b),e.intersect=function(_){return z.polygon(e,f,_)},n}p(xd,"rect_left_inv_arrow");async function bd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;let n;e.cssClasses?n="node "+e.cssClasses:n="node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),l=e.description,c=e.label,h=s.node().appendChild(await Oe(c,e.labelStyle,!0,!0));let u={width:0,height:0};if(mt(at()?.flowchart?.htmlLabels)){const D=h.children[0],E=rt(h);u=D.getBoundingClientRect(),E.attr("width",u.width),E.attr("height",u.height)}F.info("Text 2",l);const f=l||[],d=h.getBBox(),g=s.node().appendChild(await Oe(f.join?f.join("
    "):f,e.labelStyle,!0,!0)),m=g.children[0],y=rt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(e.padding||0)/2;rt(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),rt(h).attr("transform","translate( "+(u.width(F.debug("Rough node insert CXC",R),A),":first-child"),T=a.insert(()=>(F.debug("Rough node insert CXC",R),R),":first-child")}else T=o.insert("rect",":first-child"),S=o.insert("line"),T.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(e.padding||0)).attr("height",u.height+(e.padding||0)),S.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 j(e,T),e.intersect=function(D){return z.rect(e,D)},a}p(bd,"rectWithTitle");async function _d(t,e){const r={rx:5,ry:5,labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return ci(t,e,r)}p(_d,"roundedRect");async function Cd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=e?.padding??0,l=Math.max(a.width+(e.padding??0)*2,e?.width??0),c=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:f}=e,d=q.svg(n),g=H(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Lt(f)),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(e.padding??0)-(a.x-(a.left??0))},${-c/2+(e.padding??0)-(a.y-(a.top??0))})`),j(e,x),e.intersect=function(b){return z.rect(e,b)},n}p(Cd,"shadedProcess");async function wd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),c=-s/2,h=-l/2,{cssStyles:u}=e,f=q.svg(n),d=H(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h-l/2}],m=it(g),y=f.path(m,d),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),j(e,x),e.intersect=function(b){return z.polygon(e,g,b)},n}p(wd,"slopedRect");async function vd(t,e){const r={rx:0,ry:0,labelPaddingX:(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return ci(t,e,r)}p(vd,"squareRect");async function kd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=a.height+e.padding,s=a.width+o/4+e.padding;let l;const{cssStyles:c}=e;if(e.look==="handDrawn"){const h=q.svg(n),u=H(e,{}),f=fe(-s/2,-o/2,s,o,o/2),d=h.path(f,u);l=n.insert(()=>d,":first-child"),l.attr("class","basic label-container").attr("style",Lt(c))}else l=n.insert("rect",":first-child"),l.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 j(e,l),e.intersect=function(h){return z.rect(e,h)},n}p(kd,"stadium");async function Sd(t,e){return ci(t,e,{rx:5,ry:5})}p(Sd,"state");function Td(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=Y(e);e.labelStyle=i;const{cssStyles:a}=e,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=q.svg(c),u=H(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=s??l,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),j(e,m),e.intersect=function(y){return z.circle(e,7,y)},c}p(Td,"stateEnd");function Bd(t,e,{config:{themeVariables:r}}){const{lineColor:i}=r,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a;if(e.look==="handDrawn"){const s=q.svg(n).circle(0,0,14,e0(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 j(e,a),e.intersect=function(o){return z.circle(e,7,o)},n}p(Bd,"stateStart");async function Ld(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=(e?.padding||0)/2,s=a.width+e.padding,l=a.height+e.padding,c=-a.width/2-o,h=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(e.look==="handDrawn"){const f=q.svg(n),d=H(e,{}),g=f.rectangle(c-8,h,s+16,l,d),m=f.line(c,h,c,h+l,d),y=f.line(c+s,h,c+s,h+l,d);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",Lt(b)),j(e,x)}else{const f=de(n,s,l,u);i&&f.attr("style",i),j(e,f)}return e.intersect=function(f){return z.polygon(e,u,f)},n}p(Ld,"subroutine");async function Md(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),s=Math.max(a.height+(e.padding??0)*2,e?.height??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=e,d=q.svg(n),g=H(e,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+s},{x:l-h/2,y:c+s}],y=[{x:l+o-h/2,y:c+s},{x:l+o+h/2,y:c+s},{x:l+o+h/2,y:c+s-u}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=it(m),b=d.path(x,g),_=it(y),v=d.path(_,{...g,fillStyle:"solid"}),w=n.insert(()=>v,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),j(e,w),e.intersect=function(T){return z.polygon(e,m,T)},n}p(Md,"taggedRect");async function Ad(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),c=l/4,h=.2*s,u=.2*l,f=l+c,{cssStyles:d}=e,g=q.svg(n),m=H(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...ke(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,c,.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,_=[{x:x+s-h,y:(b+l)*1.4},{x:x+s,y:b+l-u},{x:x+s,y:(b+l)*.9},...ke(x+s,(b+l)*1.3,x+s-h,(b+l)*1.5,-l*.03,.5)],v=it(y),w=g.path(v,m),T=it(_),S=g.path(T,{...m,fillStyle:"solid"}),D=n.insert(()=>S,":first-child");return D.insert(()=>w,":first-child"),D.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),j(e,D),e.intersect=function(E){return z.polygon(e,y,E)},n}p(Ad,"taggedWaveEdgedRectangle");async function $d(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=Math.max(a.width+e.padding,e?.width||0),s=Math.max(a.height+e.padding,e?.height||0),l=-o/2,c=-s/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",s),j(e,h),e.intersect=function(u){return z.rect(e,u)},n}p($d,"text");var yw=p((t,e,r,i,n,a)=>`M${t},${e} a${n},${a} 0,0,1 0,${-i} l${r},0 a${n},${a} 0,0,1 0,${i} M${r},${-i} a${n},${a} 0,0,0 0,${i} l${-r},0`,"createCylinderPathD"),xw=p((t,e,r,i,n,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),bw=p((t,e,r,i,n,a)=>[`M${t+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Fd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await J(t,e,Z(e)),l=e.look==="neo"?s*2:s,c=a.height+l,h=c/2,u=h/(2.5+c/50),f=a.width+u+l,{cssStyles:d}=e;let g;if(e.look==="handDrawn"){const m=q.svg(n),y=xw(0,0,f,c,u,h),x=bw(0,0,f,c,u,h),b=m.path(y,H(e,{})),_=m.path(x,H(e,{fill:"none"}));g=n.insert(()=>_,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=yw(0,0,f,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Lt(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),o.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),j(e,g),e.intersect=function(m){const y=z.rect(e,m),x=y.y-(e.y??0);if(h!=0&&(Math.abs(x)<(e.height??0)/2||Math.abs(x)==(e.height??0)/2&&Math.abs(y.x-(e.x??0))>(e.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(e.x??0)>0&&(b=-b),y.x+=b}return y},n}p(Fd,"tiltedCylinder");async function Ed(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=a.width+e.padding,s=a.height+e.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=q.svg(n),f=H(e,{}),d=it(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=de(n,o,s,l);return i&&c.attr("style",i),e.width=o,e.height=s,j(e,c),e.intersect=function(u){return z.polygon(e,l,u)},n}p(Ed,"trapezoid");async function Dd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=60,s=20,l=Math.max(o,a.width+(e.padding??0)*2,e?.width??0),c=Math.max(s,a.height+(e.padding??0)*2,e?.height??0),{cssStyles:h}=e,u=q.svg(n),f=H(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=it(d),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),j(e,y),e.intersect=function(x){return z.polygon(e,d,x)},n}p(Dd,"trapezoidalPentagon");async function Od(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=mt(at().flowchart?.htmlLabels),l=a.width+(e.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=e,d=q.svg(n),g=H(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=it(u),y=d.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),e.width=l,e.height=c,j(e,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(b){return F.info("Triangle intersect",e,u,b),z.polygon(e,u,b)},n}p(Od,"triangle");async function Rd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),c=l/8,h=l+c,{cssStyles:u}=e,d=70-s,g=d>0?d/2:0,m=q.svg(n),y=H(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...ke(-s/2-g,h/2,s/2+g,h/2,c,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],b=it(x),_=m.path(b,y),v=n.insert(()=>_,":first-child");return v.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c-(a.y-(a.top??0))})`),j(e,v),e.intersect=function(w){return z.polygon(e,x,w)},n}p(Rd,"waveEdgedRectangle");async function Id(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await J(t,e,Z(e)),o=100,s=50,l=Math.max(a.width+(e.padding??0)*2,e?.width??0),c=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=l/c;let u=l,f=c;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),g=f+d*2,{cssStyles:m}=e,y=q.svg(n),x=H(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...ke(-u/2,g/2,u/2,g/2,d,1),{x:u/2,y:-g/2},...ke(u/2,-g/2,-u/2,-g/2,d,-1)],_=it(b),v=y.path(_,x),w=n.insert(()=>v,":first-child");return w.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),j(e,w),e.intersect=function(T){return z.polygon(e,b,T)},n}p(Id,"waveRectangle");async function Pd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await J(t,e,Z(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=e,d=q.svg(n),g=H(e,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u-c}],y=`M${h-c},${u-c} L${h+s},${u-c} L${h+s},${u+l} L${h-c},${u+l} L${h-c},${u-c} M${h-c},${u} L${h+s},${u} M${h},${u-c} L${h},${u+l}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),j(e,b),e.intersect=function(_){return z.polygon(e,m,_)},n}p(Pd,"windowPane");async function Zs(t,e){const r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){const{themeVariables:K}=Dt(),{background:et}=K,nt={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${et}`]};await Zs(t,nt)}const i=Dt();e.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:o}=e,{labelStyles:s,nodeStyles:l}=Y(e);if(r.attributes.length===0&&e.label){const K={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};ce(e.label,i)+K.labelPaddingX*20){const K=u.width+n*2-(m+y+x+b);m+=K/w,y+=K/w,x>0&&(x+=K/w),b>0&&(b+=K/w)}const S=m+y+x+b,D=q.svg(h),E=H(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let R=0;g.length>0&&(R=g.reduce((K,et)=>K+(et?.rowHeight??0),0));const A=Math.max(T.width+n*2,e?.width||0,S),I=Math.max((R??0)+u.height,e?.height||0),O=-A/2,L=-I/2;h.selectAll("g:not(:first-child)").each((K,et,nt)=>{const ct=rt(nt[et]),Mt=ct.attr("transform");let Ct=0,pe=0;if(Mt){const yt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Mt);yt&&(Ct=parseFloat(yt[1]),pe=parseFloat(yt[2]),ct.attr("class").includes("attribute-name")?Ct+=m:ct.attr("class").includes("attribute-keys")?Ct+=m+y:ct.attr("class").includes("attribute-comment")&&(Ct+=m+y+x))}ct.attr("transform",`translate(${O+n/2+Ct}, ${pe+L+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(L+a/2)+")");const B=D.rectangle(O,L,A,I,E),k=h.insert(()=>B,":first-child").attr("style",o.join("")),{themeVariables:$}=Dt(),{rowEven:M,rowOdd:W,nodeBorder:U}=$;d.push(0);for(const[K,et]of g.entries()){const ct=(K+1)%2===0&&et.yOffset!==0,Mt=D.rectangle(O,u.height+L+et?.yOffset,A,et?.rowHeight,{...E,fill:ct?M:W,stroke:U});h.insert(()=>Mt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${ct?"even":"odd"}`)}let tt=D.line(O,u.height+L,A+O,u.height+L,E);h.insert(()=>tt).attr("class","divider"),tt=D.line(m+O,u.height+L,m+O,I+L,E),h.insert(()=>tt).attr("class","divider"),_&&(tt=D.line(m+y+O,u.height+L,m+y+O,I+L,E),h.insert(()=>tt).attr("class","divider")),v&&(tt=D.line(m+y+x+O,u.height+L,m+y+x+O,I+L,E),h.insert(()=>tt).attr("class","divider"));for(const K of d)tt=D.line(O,u.height+L+K,A+O,u.height+L+K,E),h.insert(()=>tt).attr("class","divider");if(j(e,k),l&&e.look!=="handDrawn"){const et=l.split(";")?.filter(nt=>nt.includes("stroke"))?.map(nt=>`${nt}`).join("; ");h.selectAll("path").attr("style",et??""),h.selectAll(".row-rect-even path").attr("style",l)}return e.intersect=function(K){return z.rect(e,K)},h}p(Zs,"erBox");async function Ke(t,e,r,i=0,n=0,a=[],o=""){const s=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);e!==no(e)&&(e=no(e),e=e.replaceAll("<","<").replaceAll(">",">"));const l=s.node().appendChild(await Te(s,e,{width:ce(e,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(mt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=rt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Ke,"addText");async function Nd(t,e,r,i,n=r.class.padding??12){const a=i?0:3,o=t.insert("g").attr("class",Z(e)).attr("id",e.domId||e.id);let s=null,l=null,c=null,h=null,u=0,f=0,d=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const b=e.annotations[0];await Er(s,{text:`«${b}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Er(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const b of e.members){const _=await Er(c,b,m,[b.parseClassifier()]);m+=_+a}d=c.node().getBBox().height,d<=0&&(d=n/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of e.methods){const _=await Er(h,b,y,[b.parseClassifier()]);y+=_+a}let x=o.node().getBBox();if(s!==null){const b=s.node().getBBox();s.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.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}}p(Nd,"textHelper");async function Er(t,e,r,i=[]){const n=t.insert("g").attr("class","label").attr("style",i.join("; ")),a=Dt();let o="useHtmlLabels"in e?e.useHtmlLabels:mt(a.htmlLabels)??!0,s="";"text"in e?s=e.text:s=e.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),sr(s)&&(o=!0);const l=await Te(n,Cn(Ge(s)),{width:ce(s,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],f=rt(l);h=u.innerHTML.split("
    ").length,u.innerHTML.includes("")&&(h+=u.innerHTML.split("").length-1);const d=u.getElementsByTagName("img");if(d){const g=s.replace(/]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,v=parseInt(b,10)*5+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&rt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.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=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Er,"addText");async function zd(t,e){const r=at(),i=r.class.padding??12,n=i,a=e.useHtmlLabels??mt(r.htmlLabels)??!0,o=e;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:l}=await Nd(t,e,r,a,n),{labelStyles:c,nodeStyles:h}=Y(e);e.labelStyle=c,e.cssStyles=o.styles||"";const u=o.styles?.join(";")||h||"";e.cssStyles||(e.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,d=q.svg(s),g=H(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.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,_=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),g),v=s.insert(()=>_,":first-child");v.attr("class","basic label-container");const w=v.node().getBBox();s.selectAll(".text").each((E,R,A)=>{const I=rt(A[R]),O=I.attr("transform");let L=0;if(O){const M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);M&&(L=parseFloat(M[2]))}let B=L+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||(B-=4);let k=x;(I.attr("class").includes("label-group")||I.attr("class").includes("annotation-group"))&&(k=-I.node()?.getBBox().width/2||0,s.selectAll("text").each(function($,M,W){window.getComputedStyle(W[M]).textAnchor==="middle"&&(k=0)})),I.attr("transform",`translate(${k}, ${B})`)});const T=s.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,S=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 E=d.line(w.x,T+S+b+i,w.x+w.width,T+S+b+i,g);s.insert(()=>E).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const E=d.line(w.x,T+S+D+b+n*2+i,w.x+w.width,T+S+D+b+i+n*2,g);s.insert(()=>E).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),e.labelStyle?s.selectAll("span").attr("style",e.labelStyle):s.selectAll("span").attr("style",u),!a){const E=RegExp(/color\s*:\s*([^;]*)/),R=E.exec(u);if(R){const A=R[0].replace("color","fill");s.selectAll("tspan").attr("style",A)}else if(c){const A=E.exec(c);if(A){const I=A[0].replace("color","fill");s.selectAll("tspan").attr("style",I)}}}return j(e,v),e.intersect=function(E){return z.rect(e,E)},s}p(zd,"classBox");async function qd(t,e){const{labelStyles:r,nodeStyles:i}=Y(e);e.labelStyle=r;const n=e,a=e,o=20,s=20,l="verifyMethod"in e,c=Z(e),h=t.insert("g").attr("class",c).attr("id",e.domId??e.id);let u;l?u=await Gt(h,`<<${n.type}>>`,0,e.labelStyle):u=await Gt(h,"<<Element>>",0,e.labelStyle);let f=u;const d=await Gt(h,n.name,f,e.labelStyle+"; font-weight: bold;");if(f+=d+s,l){const T=await Gt(h,`${n.requirementId?`id: ${n.requirementId}`:""}`,f,e.labelStyle);f+=T;const S=await Gt(h,`${n.text?`Text: ${n.text}`:""}`,f,e.labelStyle);f+=S;const D=await Gt(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,e.labelStyle);f+=D,await Gt(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,e.labelStyle)}else{const T=await Gt(h,`${a.type?`Type: ${a.type}`:""}`,f,e.labelStyle);f+=T,await Gt(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,e.labelStyle)}const g=(h.node()?.getBBox().width??200)+o,m=(h.node()?.getBBox().height??200)+o,y=-g/2,x=-m/2,b=q.svg(h),_=H(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=b.rectangle(y,x,g,m,_),w=h.insert(()=>v,":first-child");if(w.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((T,S,D)=>{const E=rt(D[S]),R=E.attr("transform");let A=0,I=0;if(R){const k=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);k&&(A=parseFloat(k[1]),I=parseFloat(k[2]))}const O=I-m/2;let L=y+o/2;(S===0||S===1)&&(L=A),E.attr("transform",`translate(${L}, ${O+o})`)}),f>u+d+s){const T=b.line(y,x+u+d+s,y+g,x+u+d+s,_);h.insert(()=>T).attr("style",i)}return j(e,w),e.intersect=function(T){return z.rect(e,T)},h}p(qd,"requirementBox");async function Gt(t,e,r,i=""){if(e==="")return 0;const n=t.insert("g").attr("class","label").attr("style",i),a=at(),o=a.htmlLabels??!0,s=await Te(n,Cn(Ge(e)),{width:ce(e,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const c=s.children[0],h=rt(s);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=s.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);l=s.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(Gt,"addText");var _w=p(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Wd(t,e,{config:r}){const{labelStyles:i,nodeStyles:n}=Y(e);e.labelStyle=i||"";const a=10,o=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await J(t,e,Z(e)),h=e.padding||10;let u="",f;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),f=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await ra(f,"ticket"in e&&e.ticket||"",d):{label:g,bbox:m}=await ra(s,"ticket"in e&&e.ticket||"",d);const{label:y,bbox:x}=await ra(s,"assigned"in e&&e.assigned||"",d);e.width=o;const b=10,_=e?.width||0,v=Math.max(m.height,x.height)/2,w=Math.max(l.height+b*2,e?.height||0)+v,T=-_/2,S=-w/2;c.attr("transform","translate("+(h-_/2)+", "+(-v-l.height/2)+")"),g.attr("transform","translate("+(h-_/2)+", "+(-v+l.height/2)+")"),y.attr("transform","translate("+(h+_/2-x.width-2*a)+", "+(-v+l.height/2)+")");let D;const{rx:E,ry:R}=e,{cssStyles:A}=e;if(e.look==="handDrawn"){const I=q.svg(s),O=H(e,{}),L=E||R?I.path(fe(T,S,_,w,E||0),O):I.rectangle(T,S,_,w,O);D=s.insert(()=>L,":first-child"),D.attr("class","basic label-container").attr("style",A||null)}else{D=s.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",n).attr("rx",E??5).attr("ry",R??5).attr("x",T).attr("y",S).attr("width",_).attr("height",w);const I="priority"in e&&e.priority;if(I){const O=s.append("line"),L=T+2,B=S+Math.floor((E??0)/2),k=S+w-Math.floor((E??0)/2);O.attr("x1",L).attr("y1",B).attr("x2",L).attr("y2",k).attr("stroke-width","4").attr("stroke",_w(I))}}return j(e,D),e.height=w,e.intersect=function(I){return z.rect(e,I)},s}p(Wd,"kanbanItem");var Cw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:vd},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:_d},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:kd},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ld},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Vf},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:zf},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:yd},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:td},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:hd},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:cd},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ed},{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:od},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Xf},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:$d},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Pf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Cd},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Bd},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Td},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Qf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ed},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Hf},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:jf},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Yf},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ud},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Rd},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Jf},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Fd},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:fd},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Gf},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Uf},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Od},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Pd},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Zf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Dd},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Kf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:wd},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:gd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:pd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:If},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Wf},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Ad},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Md},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Id},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:xd},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:dd}],ww=p(()=>{const e=[...Object.entries({state:Sd,choice:Nf,note:md,rectWithTitle:bd,labelRect:ld,iconSquare:ad,iconCircle:id,icon:rd,iconRounded:nd,imageSquare:sd,anchor:Rf,kanbanItem:Wd,classBox:zd,erBox:Zs,requirementBox:qd}),...Cw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Hd=ww();function vw(t){return t in Hd}p(vw,"isValidShape");var zn=new Map;async function jd(t,e,r){let i,n;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?Hd[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;r.config.securityLevel==="sandbox"?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),n=await a(i,e,r)}else n=await a(t,e,r),i=n;return e.tooltip&&n.attr("title",e.tooltip),zn.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(jd,"insertNode");var $T=p((t,e)=>{zn.set(e.id,t)},"setNodeElem"),FT=p(()=>{zn.clear()},"clear"),ET=p(t=>{const e=zn.get(t.id);F.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,i=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+i-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),i},"positionNode"),kw=p((t,e,r,i,n,a)=>{e.arrowTypeStart&&ul(t,"start",e.arrowTypeStart,r,i,n,a),e.arrowTypeEnd&&ul(t,"end",e.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),Sw={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}},ul=p((t,e,r,i,n,a,o)=>{const s=Sw[r];if(!s){F.warn(`Unknown arrow type: ${r}`);return}const l=s.type,h=`${n}_${a}-${l}${e==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const d=document.getElementById(h);if(d){const g=d.cloneNode(!0);g.id=f,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",o),s.fill&&y.setAttribute("fill",o)}),d.parentNode?.appendChild(g)}}t.attr(`marker-${e}`,`url(${i}#${f})`)}else t.attr(`marker-${e}`,`url(${i}#${h})`)},"addEdgeMarker"),gn=new Map,bt=new Map,DT=p(()=>{gn.clear(),bt.clear()},"clear"),Br=p(t=>t?t.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Tw=p(async(t,e)=>{let r=mt(at().flowchart.htmlLabels);const i=await Te(t,e.label,{style:Br(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});F.info("abc82",e,e.labelType);const n=t.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label");a.node().appendChild(i);let o=i.getBBox();if(r){const l=i.children[0],c=rt(i);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),gn.set(e.id,n),e.width=o.width,e.height=o.height;let s;if(e.startLabelLeft){const l=await Oe(e.startLabelLeft,Br(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),bt.get(e.id)||bt.set(e.id,{}),bt.get(e.id).startLeft=c,Dr(s,e.startLabelLeft)}if(e.startLabelRight){const l=await Oe(e.startLabelRight,Br(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=c.node().appendChild(l),h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),bt.get(e.id)||bt.set(e.id,{}),bt.get(e.id).startRight=c,Dr(s,e.startLabelRight)}if(e.endLabelLeft){const l=await Oe(e.endLabelLeft,Br(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),bt.get(e.id)||bt.set(e.id,{}),bt.get(e.id).endLeft=c,Dr(s,e.endLabelLeft)}if(e.endLabelRight){const l=await Oe(e.endLabelRight,Br(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),bt.get(e.id)||bt.set(e.id,{}),bt.get(e.id).endRight=c,Dr(s,e.endLabelRight)}return i},"insertEdgeLabel");function Dr(t,e){at().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}p(Dr,"setTerminalWidth");var Bw=p((t,e)=>{F.debug("Moving label abc88 ",t.id,t.label,gn.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=at(),{subGraphTitleTotalMargin:n}=ps(i);if(t.label){const a=gn.get(t.id);let o=t.x,s=t.y;if(r){const l=Ut.calcLabelPosition(r);F.debug("Moving label "+t.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(o=l.x,s=l.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(t.startLabelLeft){const a=bt.get(t.id).startLeft;let o=t.x,s=t.y;if(r){const l=Ut.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(t.startLabelRight){const a=bt.get(t.id).startRight;let o=t.x,s=t.y;if(r){const l=Ut.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(t.endLabelLeft){const a=bt.get(t.id).endLeft;let o=t.x,s=t.y;if(r){const l=Ut.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(t.endLabelRight){const a=bt.get(t.id).endRight;let o=t.x,s=t.y;if(r){const l=Ut.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),Lw=p((t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),a=Math.abs(e.y-i),o=t.width/2,s=t.height/2;return n>=o||a>=s},"outsideNode"),Mw=p((t,e,r)=>{F.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,a=Math.abs(i-r.x),o=t.width/2;let s=r.xMath.abs(i-e.x)*l){let u=r.y{F.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(a=>{if(F.info("abc88 checking point",a,e),!Lw(e,a)&&!n){const o=Mw(e,i,a);F.debug("abc88 inside",a,i,o),F.debug("abc88 intersection",o,e);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?F.warn("abc88 no intersect",o,r):r.push(o),n=!0}else F.warn("abc88 outside",a,i),i=a,n||r.push(a)}),F.debug("returning points",r),r},"cutPathAtIntersect");function Yd(t){const e=[],r=[];for(let i=1;i5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}p(Yd,"extractCornerPoints");var dl=p(function(t,e,r){const i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:e.x-o*i,y:e.y-o*n}},"findAdjacentPoint"),Aw=p(function(t){const{cornerPointPositions:e}=Yd(t),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10){F.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:c<0?s.x-d+u:s.x+d-u,y:h<0?s.y-u:s.y+u}:f={x:c<0?s.x-u:s.x+u,y:h<0?s.y-d+u:s.y+d-u}}else F.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,l)}else r.push(t[i]);return r},"fixCorners"),$w=p(function(t,e,r,i,n,a,o){const{handDrawnSeed:s}=at();let l=e.points,c=!1;const h=n;var u=a;const f=[];for(const E in e.cssCompiledStyles)Ah(E)||f.push(e.cssCompiledStyles[E]);u.intersect&&h.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(h.intersect(l[0])),F.debug("Last point APA12",e.start,"-->",e.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),e.toCluster&&(F.info("to cluster abc88",r.get(e.toCluster)),l=fl(e.points,r.get(e.toCluster).node),c=!0),e.fromCluster&&(F.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=fl(l.reverse(),r.get(e.fromCluster).node).reverse(),c=!0);let d=l.filter(E=>!Number.isNaN(E.y));d=Aw(d);let g=Li;switch(g=Ki,e.curve){case"linear":g=Ki;break;case"basis":g=Li;break;case"cardinal":g=uu;break;case"bumpX":g=su;break;case"bumpY":g=ou;break;case"catmullRom":g=du;break;case"monotoneX":g=bu;break;case"monotoneY":g=_u;break;case"natural":g=wu;break;case"step":g=vu;break;case"stepAfter":g=Su;break;case"stepBefore":g=ku;break;default:g=Li}const{x:m,y}=t0(e),x=Bb().x(m).y(y).curve(g);let b;switch(e.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(e.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let _,v=x(d);const w=Array.isArray(e.style)?e.style:e.style?[e.style]:[];let T=w.find(E=>E?.startsWith("stroke:"));if(e.look==="handDrawn"){const E=q.svg(t);Object.assign([],d);const R=E.path(v,{roughness:.3,seed:s});b+=" transition",_=rt(R).select("path").attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",w?w.reduce((I,O)=>I+";"+O,""):"");let A=_.attr("d");_.attr("d",A),t.node().appendChild(_.node())}else{const E=f.join(";"),R=w?w.reduce((O,L)=>O+L+";",""):"";let A="";e.animate&&(A=" edge-animation-fast"),e.animation&&(A=" edge-animation-"+e.animation);const I=E?E+";"+R+";":R;_=t.append("path").attr("d",v).attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")+(A??"")).attr("style",I),T=I.match(/stroke:([^;]+)/)?.[1]}let S="";(at().flowchart.arrowMarkerAbsolute||at().state.arrowMarkerAbsolute)&&(S=Gl(!0)),F.info("arrowTypeStart",e.arrowTypeStart),F.info("arrowTypeEnd",e.arrowTypeEnd),kw(_,e,S,o,i,T);let D={};return c&&(D.updatedPath=l),D.originalPath=e.points,D},"insertEdge"),Fw=p((t,e,r,i)=>{e.forEach(n=>{Uw[n](t,r,i)})},"insertMarkers"),Ew=p((t,e,r)=>{F.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Dw=p((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ow=p((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Rw=p((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Iw=p((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Pw=p((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Nw=p((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),zw=p((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),qw=p((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Ww=p((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Hw=p((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),jw=p((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Yw=p((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Gw=p((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`)},"requirement_arrow"),Vw=p((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Uw={extension:Ew,composition:Dw,aggregation:Ow,dependency:Rw,lollipop:Iw,point:Pw,circle:Nw,cross:zw,barb:qw,only_one:Ww,zero_or_one:Hw,one_or_more:jw,zero_or_more:Yw,requirement_arrow:Gw,requirement_contains:Vw},Xw=Fw,Zw={common:dr,getConfig:Dt,insertCluster:nw,insertEdge:$w,insertEdgeLabel:Tw,insertMarkers:Xw,insertNode:jd,interpolateToCurve:$s,labelHelper:J,log:F,positionEdgeLabel:Bw},Kr={},Gd=p(t=>{for(const e of t)Kr[e.name]=e},"registerLayoutLoaders"),Kw=p(()=>{Gd([{name:"dagre",loader:p(async()=>await lt(()=>import("./dagre-FFZHY6LT.D1SJl_SH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),"loader")}])},"registerDefaultLayoutLoaders");Kw();var OT=p(async(t,e)=>{if(!(t.layoutAlgorithm in Kr))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=Kr[t.layoutAlgorithm];return(await r.loader()).render(t,e,Zw,{algorithm:r.algorithm})},"render"),RT=p((t="",{fallback:e="dagre"}={})=>{if(t in Kr)return t;if(e in Kr)return F.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),pl={name:"mermaid",version:"11.8.1",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},Qw=p(t=>{const{securityLevel:e}=at();let r=rt("body");if(e==="sandbox"){const a=rt(`#i${t}`).node()?.contentDocument??document;r=rt(a.body)}return r.select(`#${t}`)},"selectSvgElement"),Vd="comm",Ud="rule",Xd="decl",Jw="@import",tv="@namespace",ev="@keyframes",rv="@layer",Zd=Math.abs,Ks=String.fromCharCode;function Kd(t){return t.trim()}function Fi(t,e,r){return t.replace(e,r)}function iv(t,e,r){return t.indexOf(e,r)}function er(t,e){return t.charCodeAt(e)|0}function ur(t,e,r){return t.slice(e,r)}function Vt(t){return t.length}function nv(t){return t.length}function bi(t,e){return e.push(t),t}var qn=1,fr=1,Qd=0,Nt=0,dt=0,xr="";function Qs(t,e,r,i,n,a,o,s){return{value:t,root:e,parent:r,type:i,props:n,children:a,line:qn,column:fr,length:o,return:"",siblings:s}}function av(){return dt}function sv(){return dt=Nt>0?er(xr,--Nt):0,fr--,dt===10&&(fr=1,qn--),dt}function Wt(){return dt=Nt2||Qr(dt)>3?"":" "}function hv(t,e){for(;--e&&Wt()&&!(dt<48||dt>102||dt>57&&dt<65||dt>70&&dt<97););return Wn(t,Ei()+(e<6&&be()==32&&Wt()==32))}function Ga(t){for(;Wt();)switch(dt){case t:return Nt;case 34:case 39:t!==34&&t!==39&&Ga(dt);break;case 40:t===41&&Ga(t);break;case 92:Wt();break}return Nt}function uv(t,e){for(;Wt()&&t+dt!==57;)if(t+dt===84&&be()===47)break;return"/*"+Wn(e,Nt-1)+"*"+Ks(t===47?t:Wt())}function fv(t){for(;!Qr(be());)Wt();return Wn(t,Nt)}function dv(t){return lv(Di("",null,null,null,[""],t=ov(t),0,[0],t))}function Di(t,e,r,i,n,a,o,s,l){for(var c=0,h=0,u=o,f=0,d=0,g=0,m=1,y=1,x=1,b=0,_="",v=n,w=a,T=i,S=_;y;)switch(g=b,b=Wt()){case 40:if(g!=108&&er(S,u-1)==58){iv(S+=Fi(ia(b),"&","&\f"),"&\f",Zd(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:S+=ia(b);break;case 9:case 10:case 13:case 32:S+=cv(g);break;case 92:S+=hv(Ei()-1,7);continue;case 47:switch(be()){case 42:case 47:bi(pv(uv(Wt(),Ei()),e,r,l),l),(Qr(g||1)==5||Qr(be()||1)==5)&&Vt(S)&&ur(S,-1,void 0)!==" "&&(S+=" ");break;default:S+="/"}break;case 123*m:s[c++]=Vt(S)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(S=Fi(S,/\f/g,"")),d>0&&(Vt(S)-u||m===0&&g===47)&&bi(d>32?ml(S+";",i,r,u-1,l):ml(Fi(S," ","")+";",i,r,u-2,l),l);break;case 59:S+=";";default:if(bi(T=gl(S,e,r,c,h,n,s,_,v=[],w=[],u,a),a),b===123)if(h===0)Di(S,e,T,T,v,a,u,s,w);else{switch(f){case 99:if(er(S,3)===110)break;case 108:if(er(S,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Di(t,T,T,i&&bi(gl(t,T,T,0,0,n,s,_,n,v=[],u,w),w),n,w,u,s,i?v:w):Di(S,T,T,T,[""],w,0,s,w)}}c=h=d=0,m=x=1,_=S="",u=o;break;case 58:u=1+Vt(S),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&sv()==125)continue}switch(S+=Ks(b),b*m){case 38:x=h>0?1:(S+="\f",-1);break;case 44:s[c++]=(Vt(S)-1)*x,x=1;break;case 64:be()===45&&(S+=ia(Wt())),f=be(),h=u=Vt(_=S+=fv(Ei())),b++;break;case 45:g===45&&Vt(S)==2&&(m=0)}}return a}function gl(t,e,r,i,n,a,o,s,l,c,h,u){for(var f=n-1,d=n===0?a:[""],g=nv(d),m=0,y=0,x=0;m0?d[b]+" "+_:Fi(_,/&\f/g,d[b])))&&(l[x++]=v);return Qs(t,e,r,n===0?Ud:s,l,c,h,u)}function pv(t,e,r,i){return Qs(t,e,r,Vd,Ks(av()),ur(t,2,-2),0,i)}function ml(t,e,r,i,n){return Qs(t,e,r,Xd,ur(t,0,i),ur(t,i+1,-1),i,n)}function Va(t,e){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),$v=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./c4Diagram-6F6E4RAY.HgKc2iOi.js");return{diagram:e}},__vite__mapDeps([9,10,6,7,8]));return{id:Jd,diagram:t}},"loader"),Fv={id:Jd,detector:Av,loader:$v},Ev=Fv,tp="flowchart",Dv=p((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),Ov=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./flowDiagram-PKI6S5ZS.kSRike6r.js");return{diagram:e}},__vite__mapDeps([11,12,13,14,15,6,7,8]));return{id:tp,diagram:t}},"loader"),Rv={id:tp,detector:Dv,loader:Ov},Iv=Rv,ep="flowchart-v2",Pv=p((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),Nv=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./flowDiagram-PKI6S5ZS.kSRike6r.js");return{diagram:e}},__vite__mapDeps([11,12,13,14,15,6,7,8]));return{id:ep,diagram:t}},"loader"),zv={id:ep,detector:Pv,loader:Nv},qv=zv,rp="er",Wv=p(t=>/^\s*erDiagram/.test(t),"detector"),Hv=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./erDiagram-R3QVA2FD.fPaTUScp.js");return{diagram:e}},__vite__mapDeps([16,13,14,15,6,7,8]));return{id:rp,diagram:t}},"loader"),jv={id:rp,detector:Wv,loader:Hv},Yv=jv,ip="gitGraph",Gv=p(t=>/^\s*gitGraph/.test(t),"detector"),Vv=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./gitGraphDiagram-GW3U2K7C.B5Mqzntd.js");return{diagram:e}},__vite__mapDeps([17,18,19,20,6,2,4,5,7,8]));return{id:ip,diagram:t}},"loader"),Uv={id:ip,detector:Gv,loader:Vv},Xv=Uv,np="gantt",Zv=p(t=>/^\s*gantt/.test(t),"detector"),Kv=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./ganttDiagram-EK5VF46D.B6hgdNAW.js");return{diagram:e}},__vite__mapDeps([21,7,22,23,24,6,8]));return{id:np,diagram:t}},"loader"),Qv={id:np,detector:Zv,loader:Kv},Jv=Qv,ap="info",tk=p(t=>/^\s*info/.test(t),"detector"),ek=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./infoDiagram-XT3IWWJI.DtsC-CrI.js");return{diagram:e}},__vite__mapDeps([25,20,6,2,4,5,7,8]));return{id:ap,diagram:t}},"loader"),rk={id:ap,detector:tk,loader:ek},sp="pie",ik=p(t=>/^\s*pie/.test(t),"detector"),nk=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./pieDiagram-NIOCPIFQ.BwWkPnDU.js");return{diagram:e}},__vite__mapDeps([26,18,20,6,2,4,5,27,28,23,7,8]));return{id:sp,diagram:t}},"loader"),ak={id:sp,detector:ik,loader:nk},op="quadrantChart",sk=p(t=>/^\s*quadrantChart/.test(t),"detector"),ok=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./quadrantDiagram-2OG54O6I.BAigvV59.js");return{diagram:e}},__vite__mapDeps([29,22,23,24,6,7,8]));return{id:op,diagram:t}},"loader"),lk={id:op,detector:sk,loader:ok},ck=lk,lp="xychart",hk=p(t=>/^\s*xychart-beta/.test(t),"detector"),uk=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./xychartDiagram-H2YORKM3.Bm13WRgR.js");return{diagram:e}},__vite__mapDeps([30,23,28,22,24,6,7,8]));return{id:lp,diagram:t}},"loader"),fk={id:lp,detector:hk,loader:uk},dk=fk,cp="requirement",pk=p(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),gk=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./requirementDiagram-SO3GGRV7.D48836HX.js");return{diagram:e}},__vite__mapDeps([31,13,14,6,7,8]));return{id:cp,diagram:t}},"loader"),mk={id:cp,detector:pk,loader:gk},yk=mk,hp="sequence",xk=p(t=>/^\s*sequenceDiagram/.test(t),"detector"),bk=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./sequenceDiagram-ZIKVLSP4.p8UNxtjc.js");return{diagram:e}},__vite__mapDeps([32,10,19,6,7,8]));return{id:hp,diagram:t}},"loader"),_k={id:hp,detector:xk,loader:bk},Ck=_k,up="class",wk=p((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),vk=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./classDiagram-BGRH5UQR.DY1x-7Jj.js");return{diagram:e}},__vite__mapDeps([33,34,12,13,14,6,7,8]));return{id:up,diagram:t}},"loader"),kk={id:up,detector:wk,loader:vk},Sk=kk,fp="classDiagram",Tk=p((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),Bk=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./classDiagram-v2-O24JOBDK.DY1x-7Jj.js");return{diagram:e}},__vite__mapDeps([35,34,12,13,14,6,7,8]));return{id:fp,diagram:t}},"loader"),Lk={id:fp,detector:Tk,loader:Bk},Mk=Lk,dp="state",Ak=p((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),$k=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./stateDiagram-XX37X6EN.DErvrWqV.js");return{diagram:e}},__vite__mapDeps([36,37,13,14,1,2,3,4,6,7,8]));return{id:dp,diagram:t}},"loader"),Fk={id:dp,detector:Ak,loader:$k},Ek=Fk,pp="stateDiagram",Dk=p((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Ok=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./stateDiagram-v2-GD6S3NHB.VJw3EMlU.js");return{diagram:e}},__vite__mapDeps([38,37,13,14,6,7,8]));return{id:pp,diagram:t}},"loader"),Rk={id:pp,detector:Dk,loader:Ok},Ik=Rk,gp="journey",Pk=p(t=>/^\s*journey/.test(t),"detector"),Nk=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./journeyDiagram-EWQZEKCU.CUKksXeA.js");return{diagram:e}},__vite__mapDeps([39,10,12,27,6,7,8]));return{id:gp,diagram:t}},"loader"),zk={id:gp,detector:Pk,loader:Nk},qk=zk,Wk=p((t,e,r)=>{F.debug(`rendering svg for syntax error `);const i=Qw(e),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Vl(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"),mp={draw:Wk},Hk=mp,jk={db:{},renderer:mp,parser:{parse:p(()=>{},"parse")}},Yk=jk,yp="flowchart-elk",Gk=p((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),Vk=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./flowDiagram-PKI6S5ZS.kSRike6r.js");return{diagram:e}},__vite__mapDeps([11,12,13,14,15,6,7,8]));return{id:yp,diagram:t}},"loader"),Uk={id:yp,detector:Gk,loader:Vk},Xk=Uk,xp="timeline",Zk=p(t=>/^\s*timeline/.test(t),"detector"),Kk=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./timeline-definition-RI47OAVP.DWuziqzF.js");return{diagram:e}},__vite__mapDeps([40,27,6,7,8]));return{id:xp,diagram:t}},"loader"),Qk={id:xp,detector:Zk,loader:Kk},Jk=Qk,bp="mindmap",tS=p(t=>/^\s*mindmap/.test(t),"detector"),eS=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./mindmap-definition-CZNETY7S.b_aL1plu.js");return{diagram:e}},__vite__mapDeps([41,42,7,6,8]));return{id:bp,diagram:t}},"loader"),rS={id:bp,detector:tS,loader:eS},iS=rS,_p="kanban",nS=p(t=>/^\s*kanban/.test(t),"detector"),aS=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./kanban-definition-ILFWEQ3N.wxpP_fRX.js");return{diagram:e}},__vite__mapDeps([43,12,6,7,8]));return{id:_p,diagram:t}},"loader"),sS={id:_p,detector:nS,loader:aS},oS=sS,Cp="sankey",lS=p(t=>/^\s*sankey-beta/.test(t),"detector"),cS=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./sankeyDiagram-4UZDY2LN.ClvILdyl.js");return{diagram:e}},__vite__mapDeps([44,28,23,6,7,8]));return{id:Cp,diagram:t}},"loader"),hS={id:Cp,detector:lS,loader:cS},uS=hS,wp="packet",fS=p(t=>/^\s*packet-beta/.test(t),"detector"),dS=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./diagram-5UYTHUR4.qzIlNRXW.js");return{diagram:e}},__vite__mapDeps([45,18,20,6,2,4,5,7,8]));return{id:wp,diagram:t}},"loader"),pS={id:wp,detector:fS,loader:dS},vp="radar",gS=p(t=>/^\s*radar-beta/.test(t),"detector"),mS=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./diagram-ZTM2IBQH.CRVi92Hn.js");return{diagram:e}},__vite__mapDeps([46,18,20,6,2,4,5,7,8]));return{id:vp,diagram:t}},"loader"),yS={id:vp,detector:gS,loader:mS},kp="block",xS=p(t=>/^\s*block-beta/.test(t),"detector"),bS=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./blockDiagram-PHRCVELO.CQVSoVZA.js");return{diagram:e}},__vite__mapDeps([47,12,5,2,1,15,6,7,8]));return{id:kp,diagram:t}},"loader"),_S={id:kp,detector:xS,loader:bS},CS=_S,Sp="architecture",wS=p(t=>/^\s*architecture/.test(t),"detector"),vS=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./architectureDiagram-NQ2NVSRB.Da4a9gxq.js");return{diagram:e}},__vite__mapDeps([48,18,19,20,6,2,4,5,42,7,8]));return{id:Sp,diagram:t}},"loader"),kS={id:Sp,detector:wS,loader:vS},SS=kS,Tp="treemap",TS=p(t=>/^\s*treemap/.test(t),"detector"),BS=p(async()=>{const{diagram:t}=await lt(async()=>{const{diagram:e}=await import("./diagram-3EMPZRKU.DTIXvkVm.js");return{diagram:e}},__vite__mapDeps([49,14,18,19,20,6,2,4,5,24,28,23,7,8]));return{id:Tp,diagram:t}},"loader"),LS={id:Tp,detector:TS,loader:BS},vl=!1,Hn=p(()=>{vl||(vl=!0,Pi("error",Yk,t=>t.toLowerCase().trim()==="error"),Pi("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{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:p(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),aa(Xk,iS,SS),aa(Ev,oS,Mk,Sk,Yv,Jv,rk,ak,yk,Ck,qv,Iv,Jk,Xv,Ik,Ek,qk,ck,uS,pS,dk,CS,yS,LS))},"addDiagrams"),MS=p(async()=>{F.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(ir).map(async([r,{detector:i,loader:n}])=>{if(n)try{ca(r)}catch{try{const{diagram:a,id:o}=await n();Pi(o,a,i)}catch(a){throw F.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ir[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){F.error(`Failed to load ${e.length} external diagrams`);for(const r of e)F.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),AS="graphics-document document";function Bp(t,e){t.attr("role",AS),e!==""&&t.attr("aria-roledescription",e)}p(Bp,"setA11yDiagramInfo");function Lp(t,e,r,i){if(t.insert!==void 0){if(r){const n=`chart-desc-${i}`;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){const n=`chart-title-${i}`;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}p(Lp,"addSVGa11yTitleDescription");var Qa=class Mp{constructor(e,r,i,n,a){this.type=e,this.text=r,this.db=i,this.parser=n,this.renderer=a}static{p(this,"Diagram")}static async fromText(e,r={}){const i=Dt(),n=es(e,i);e=B_(e)+` `;try{ca(n)}catch{const c=eg(n);if(!c)throw new El(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Pi(h,u)}const{db:a,parser:o,renderer:s,init:l}=ca(n);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await o.parse(e),new Mp(n,e,a,o,s)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},kl=[],$S=p(()=>{kl.forEach(t=>{t()}),kl=[]},"attachFunctions"),FS=p(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Ap(t){const e=t.match(Fl);if(!e)return{text:t,metadata:{}};let r=Jm(e[1],{schema:Qm})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}p(Ap,"extractFrontMatter");var ES=p(t=>t.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),DS=p(t=>{const{text:e,metadata:r}=Ap(t),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:e}},"processFrontmatter"),OS=p(t=>{const e=Ut.detectInit(t)??{},r=Ut.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:p_(t),directive:e}},"processDirectives");function Js(t){const e=ES(t),r=DS(e),i=OS(r.text),n=Rs(r.config,i.directive);return t=FS(i.text),{code:t,title:r.title,config:n}}p(Js,"preprocessDiagram");function $p(t){const e=new TextEncoder().encode(t),r=Array.from(e,i=>String.fromCodePoint(i)).join("");return btoa(r)}p($p,"toBase64");var RS=5e4,IS="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",PS="sandbox",NS="loose",zS="http://www.w3.org/2000/svg",qS="http://www.w3.org/1999/xlink",WS="http://www.w3.org/1999/xhtml",HS="100%",jS="100%",YS="border:0;margin:0;",GS="margin:0",VS="allow-top-navigation-by-user-activation allow-popups",US='The "iframe" tag is not supported by your browser.',XS=["foreignobject"],ZS=["dominant-baseline"];function to(t){const e=Js(t);return Ri(),yg(e.config??{}),e}p(to,"processAndSetConfigs");async function Fp(t,e){Hn();try{const{code:r,config:i}=to(t);return{diagramType:(await Dp(r)).type,config:i}}catch(r){if(e?.suppressErrors)return!1;throw r}}p(Fp,"parse");var Sl=p((t,e,r=[])=>` .${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),KS=p((t,e=new Map)=>{let r="";if(t.themeCSS!==void 0&&(r+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(r+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=` :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const o=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(s=>{wl(s.styles)||o.forEach(l=>{r+=Sl(s.id,l,s.styles)}),wl(s.textStyles)||(r+=Sl(s.id,"tspan",(s?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),QS=p((t,e,r,i)=>{const n=KS(t,r),a=Og(e,n,t.themeVariables);return Va(dv(`${i}{${a}}`),gv)},"createUserStyles"),JS=p((t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ge(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),tT=p((t="",e)=>{const r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":jS,i=$p(`${t}`);return``},"putIntoIFrame"),Tl=p((t,e,r,i,n)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",zS);return n&&o.attr("xmlns:xlink",n),o.append("g"),t},"appendDivSvgG");function Ja(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Ja,"sandboxedIframe");var eT=p((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),rT=p(async function(t,e,r){Hn();const i=to(e);e=i.code;const n=Dt();F.debug(n),e.length>(n?.maxTextSize??RS)&&(e=IS);const a="#"+t,o="i"+t,s="#"+o,l="d"+t,c="#"+l,h=p(()=>{const O=rt(f?s:c).node();O&&"remove"in O&&O.remove()},"removeTempElements");let u=rt("body");const f=n.securityLevel===PS,d=n.securityLevel===NS,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const I=Ja(rt(r),o);u=rt(I.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=rt(r);Tl(u,t,l,`font-family: ${g}`,qS)}else{if(eT(document,t,l,o),f){const I=Ja(rt("body"),o);u=rt(I.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=rt("body");Tl(u,t,l)}let m,y;try{m=await Qa.fromText(e,{title:i.title})}catch(I){if(n.suppressErrorRendering)throw h(),I;m=await Qa.fromText("error"),y=I}const x=u.select(c).node(),b=m.type,_=x.firstChild,v=_.firstChild,w=m.renderer.getClasses?.(e,m),T=QS(n,b,w,a),S=document.createElement("style");S.innerHTML=T,_.insertBefore(S,v);try{await m.renderer.draw(e,t,pl.version,m)}catch(I){throw n.suppressErrorRendering?h():Hk.draw(e,t,pl.version),I}const D=u.select(`${c} svg`),E=m.db.getAccTitle?.(),R=m.db.getAccDescription?.();Op(b,D,E,R),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",WS);let A=u.select(c).node().innerHTML;if(F.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),A=JS(A,f,mt(n.arrowMarkerAbsolute)),f){const I=u.select(c+" svg").node();A=tT(A,I)}else d||(A=rr.sanitize(A,{ADD_TAGS:XS,ADD_ATTR:ZS,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if($S(),y)throw y;return h(),{diagramType:b,svg:A,bindFunctions:m.db.bindFunctions}},"render");function Ep(t={}){const e=_t({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),gg(e),e?.theme&&e.theme in se?e.themeVariables=se[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=se.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?pg(e):Nl();ts(r.logLevel),Hn()}p(Ep,"initialize");var Dp=p((t,e={})=>{const{code:r}=Js(t);return Qa.fromText(r,e)},"getDiagramFromText");function Op(t,e,r,i){Bp(e,t),Lp(e,r,i,e.attr("id"))}p(Op,"addA11yInfo");var We=Object.freeze({render:rT,parse:Fp,getDiagramFromText:Dp,initialize:Ep,getConfig:Dt,setConfig:zl,getSiteConfig:Nl,updateSiteConfig:mg,reset:p(()=>{Ri()},"reset"),globalReset:p(()=>{Ri(nr)},"globalReset"),defaultConfig:nr});ts(Dt().logLevel);Ri(Dt());var iT=p((t,e,r)=>{F.warn(t),Os(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Rp=p(async function(t={querySelector:".mermaid"}){try{await nT(t)}catch(e){if(Os(e)&&F.error(e.str),he.parseError&&he.parseError(e),!t.suppressErrors)throw F.error("Use the suppressErrors option to suppress these errors"),e}},"run"),nT=p(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=We.getConfig();F.debug(`${t?"":"No "}Callback function found`);let n;if(r)n=r;else if(e)n=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");F.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(F.debug("Start On Load: "+i?.startOnLoad),We.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new Ut.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const l of Array.from(n)){if(F.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=of(Ut.entityDecode(o)).trim().replace(//gi,"
    ");const h=Ut.detectInit(o);h&&F.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await zp(c,o,l);l.innerHTML=u,t&&await t(c),f&&f(l)}catch(u){iT(u,s,he.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Ip=p(function(t){We.initialize(t)},"initialize"),aT=p(async function(t,e,r){F.warn("mermaid.init is deprecated. Please use run instead."),t&&Ip(t);const i={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Rp(i)},"init"),sT=p(async(t,{lazyLoad:e=!0}={})=>{Hn(),aa(...t),e===!1&&await MS()},"registerExternalDiagrams"),Pp=p(function(){if(he.startOnLoad){const{startOnLoad:t}=We.getConfig();t&&he.run().catch(e=>F.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Pp,!1);var oT=p(function(t){he.parseError=t},"setParseErrorHandler"),mn=[],na=!1,Np=p(async()=>{if(!na){for(na=!0;mn.length>0;){const t=mn.shift();if(t)try{await t()}catch(e){F.error("Error executing queue",e)}}na=!1}},"executeQueue"),lT=p(async(t,e)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,o)=>{We.parse(t,e).then(s=>{a(s),r(s)},s=>{F.error("Error parsing",s),he.parseError?.(s),o(s),i(s)})}),"performCall");mn.push(n),Np().catch(i)}),"parse"),zp=p((t,e,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((o,s)=>{We.render(t,e,r).then(l=>{o(l),i(l)},l=>{F.error("Error parsing",l),he.parseError?.(l),s(l),n(l)})}),"performCall");mn.push(a),Np().catch(n)}),"render"),he={startOnLoad:!0,mermaidAPI:We,parse:lT,render:zp,init:aT,run:Rp,registerExternalDiagrams:sT,registerLayoutLoaders:Gd,initialize:Ip,parseError:void 0,contentLoaded:Pp,setParseErrorHandler:oT,detectType:es,registerIconPacks:$C},Bl=he;/*! Check if previously processed *//*! * Wait for document loaded before starting the execution */const cT=document.querySelectorAll("pre.mermaid");let Ll=!1;async function hT(){const t=document.documentElement.getAttribute("data-theme")==="light"?"neutral":"dark";for(const e of cT){Ll||e.setAttribute("data-diagram",e.textContent);const r=e.getAttribute("data-diagram");Bl.initialize({startOnLoad:!1,theme:t}),await Bl.render(`mermaid-${crypto.randomUUID()}`,r).then(({svg:i})=>e.innerHTML=i),e.setAttribute("data-processed","true")}Ll=!0}const uT=new MutationObserver(()=>hT());uT.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});export{BT as $,yT as A,Rr as B,Zt as C,Jp as D,jg as E,Rs as F,Dt as G,Il as H,b_ as I,Qm as J,Qw as K,pl as L,vb as M,Mo as N,Lo as O,TT as P,CT as Q,kT as R,vT as S,bT as T,Q as U,Ue as V,ws as W,ST as X,_T as Y,LT as Z,p as _,Pg as a,Zy as a$,wT as a0,og as a1,sr as a2,gT as a3,Dn as a4,h_ as a5,Gl as a6,rs as a7,no as a8,Bb as a9,j as aA,$T as aB,$w as aC,Bw as aD,Tw as aE,EC as aF,kb as aG,oi as aH,$C as aI,AC as aJ,He as aK,o_ as aL,Iu as aM,Mn as aN,En as aO,an as aP,Nu as aQ,Ru as aR,I2 as aS,xs as aT,xe as aU,wo as aV,ix as aW,Vr as aX,Y as aY,Ah as aZ,Et as a_,Li as aa,x_ as ab,Fg as ac,Jr as ad,N as ae,V as af,Ul as ag,nw as ah,jd as ai,ET as aj,t0 as ak,mt as al,Te as am,ps as an,bf as ao,Ge as ap,Yu as aq,s_ as ar,Q1 as as,J2 as at,Bs as au,wl as av,Xw as aw,FT as ax,DT as ay,AT as az,Ig as b,ys as b0,jh as b1,ii as b2,Vh as b3,xT as b4,Yp as b5,a_ as b6,Q2 as b7,N1 as b8,Ls as b9,Fn as bA,E2 as ba,c_ as bb,ai as bc,gr as bd,en as be,j2 as bf,bv as bg,ni as bh,nn as bi,P2 as bj,Au as bk,W1 as bl,H1 as bm,Ae as bn,jo as bo,j1 as bp,Ms as bq,q1 as br,V1 as bs,mr as bt,Se as bu,No as bv,As as bw,Fu as bx,Za as by,l_ as bz,at as c,rt as d,Vl as e,_t as f,zg as g,ce as h,Ie as i,a0 as j,dr as k,F as l,Vu as m,ti as n,mT as o,RT as p,qg as q,OT as r,Ng as s,Wg as t,Ut as u,Jm as v,w_ as w,vw as x,MT as y,Rg as z};