Files
Excalidraw/excalidraw/excalidraw-app/build/assets/index-jpNTxDe4.js
T
Yuzhong Zhang b9ba07ea5d app init
2025-07-05 23:27:59 +08:00

100 lines
263 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{h as fc,g as pc,i as rt}from"./index-2K3MavtT.js";const Ln=20,gc={rect:"rectangle",circle:"ellipse"},mc={startOnLoad:!1,flowchart:{curve:"linear"},themeVariables:{fontSize:`${Ln*1.25}px`}};class Cr{constructor({converter:e}){this.convert=(i,r)=>this.converter(i,{...r,fontSize:r.fontSize||Ln}),this.converter=e}}var de;(function(t){t.ROUND="round",t.STADIUM="stadium",t.DOUBLECIRCLE="doublecircle",t.CIRCLE="circle",t.DIAMOND="diamond"})(de||(de={}));var cn;(function(t){t.COLOR="color"})(cn||(cn={}));var Ae;(function(t){t.FILL="fill",t.STROKE="stroke",t.STROKE_WIDTH="stroke-width",t.STROKE_DASHARRAY="stroke-dasharray"})(Ae||(Ae={}));var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});var Ms=Fn.removeMarkdown=void 0,_c=function(t,e){e===void 0&&(e={listUnicodeChar:""}),e=e||{},e.listUnicodeChar=e.hasOwnProperty("listUnicodeChar")?e.listUnicodeChar:!1,e.stripListLeaders=e.hasOwnProperty("stripListLeaders")?e.stripListLeaders:!0,e.gfm=e.hasOwnProperty("gfm")?e.gfm:!0,e.useImgAltText=e.hasOwnProperty("useImgAltText")?e.useImgAltText:!0,e.preserveLinks=e.hasOwnProperty("preserveLinks")?e.preserveLinks:!1;var i=t||"";i=i.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*$/gm,"");try{e.stripListLeaders&&(e.listUnicodeChar?i=i.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,e.listUnicodeChar+" $1"):i=i.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,"$1")),e.gfm&&(i=i.replace(/\n={2,}/g,`
`).replace(/~{3}.*\n/g,"").replace(/~~/g,"").replace(/`{3}.*\n/g,"")),e.preserveLinks&&(i=i.replace(/\[(.*?)\][\[\(](.*?)[\]\)]/g,"$1 ($2)")),i=i.replace(/<[^>]*>/g,"").replace(/^[=\-]{2,}\s*$/g,"").replace(/\[\^.+?\](\: .*?$)?/g,"").replace(/\s{0,2}\[.*?\]: .*?$/g,"").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g,e.useImgAltText?"$1":"").replace(/\[(.*?)\][\[\(].*?[\]\)]/g,"$1").replace(/^\s{0,3}>\s?/g,"").replace(/(^|\n)\s{0,3}>\s?/g,`
`).replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g,"").replace(/^(\n)?\s{0,}#{1,6}\s+| {0,}(\n)?\s{0,}#{0,} {0,}(\n)?\s{0,}$/gm,"$1$2$3").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,"$2").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,"$2").replace(/(`{3,})(.*?)\1/gm,"$2").replace(/`(.+?)`/g,"$1").replace(/\n{2,}/g,`
`)}catch(r){return console.error(r),t}return i};Ms=Fn.removeMarkdown=_c;const yc={arrow_circle:{endArrowhead:"dot"},arrow_cross:{endArrowhead:"bar"},double_arrow_circle:{endArrowhead:"dot",startArrowhead:"dot"},double_arrow_cross:{endArrowhead:"bar",startArrowhead:"bar"},double_arrow_point:{endArrowhead:"arrow",startArrowhead:"arrow"}},bc=t=>yc[t],Bi=t=>{let e=t.text;return t.labelType==="markdown"&&(e=Ms(t.text)),Cc(e)},Cc=t=>{const e=/\s?(fa|fab):[a-zA-Z0-9-]+/g;return t.replace(e,"")},xc=t=>{const e={};return Object.keys(t).forEach(i=>{var r;switch(i){case Ae.FILL:{e.backgroundColor=t[i],e.fillStyle="solid";break}case Ae.STROKE:{e.strokeColor=t[i];break}case Ae.STROKE_WIDTH:{e.strokeWidth=Number((r=t[i])==null?void 0:r.split("px")[0]);break}case Ae.STROKE_DASHARRAY:{e.strokeStyle="dashed";break}}}),e},Tc=t=>{const e={};return Object.keys(t).forEach(i=>{switch(i){case cn.COLOR:{e.strokeColor=t[i];break}}}),e},Sc=t=>{const e={};t.subGraphs.map(r=>{r.nodeIds.forEach(n=>{e[r.id]={id:r.id,parent:null,isLeaf:!1},e[n]={id:n,parent:r.id,isLeaf:t.vertices[n]!==void 0}})});const i={};return[...Object.keys(t.vertices),...t.subGraphs.map(r=>r.id)].forEach(r=>{if(!e[r])return;let n=e[r];const s=[];for(n.isLeaf||s.push(`subgraph_group_${n.id}`);n.parent;)s.push(`subgraph_group_${n.parent}`),n=e[n.parent];i[r]=s}),{getGroupIds:r=>i[r]||[],getParentId:r=>e[r]?e[r].parent:null}},kc=new Cr({converter:(t,e)=>{const i=[],r=e.fontSize,{getGroupIds:n,getParentId:s}=Sc(t);return t.subGraphs.reverse().forEach(o=>{const a=n(o.id),l={id:o.id,type:"rectangle",groupIds:a,x:o.x,y:o.y,width:o.width,height:o.height,label:{groupIds:a,text:Bi(o),fontSize:r,verticalAlign:"top"}};i.push(l)}),Object.values(t.vertices).forEach(o=>{if(!o)return;const a=n(o.id),l=xc(o.containerStyle),c=Tc(o.labelStyle);let h={id:o.id,type:"rectangle",groupIds:a,x:o.x,y:o.y,width:o.width,height:o.height,strokeWidth:2,label:{groupIds:a,text:Bi(o),fontSize:r,...c},link:o.link||null,...l};switch(o.type){case de.STADIUM:{h={...h,roundness:{type:3}};break}case de.ROUND:{h={...h,roundness:{type:3}};break}case de.DOUBLECIRCLE:{a.push(`doublecircle_${o.id}}`);const p={type:"ellipse",groupIds:a,x:o.x+5,y:o.y+5,width:o.width-5*2,height:o.height-5*2,strokeWidth:2,roundness:{type:3},label:{groupIds:a,text:Bi(o),fontSize:r}};h={...h,groupIds:a,type:"ellipse"},i.push(p);break}case de.CIRCLE:{h.type="ellipse";break}case de.DIAMOND:{h.type="diamond";break}}i.push(h)}),t.edges.forEach(o=>{let a=[];const l=s(o.start),c=s(o.end);l&&l===c&&(a=n(l));const{startX:h,startY:u,reflectionPoints:p}=o,d=p.map(E=>[E.x-p[0].x,E.y-p[0].y]),m=bc(o.type),C={id:`${o.start}_${o.end}`,type:"arrow",groupIds:a,x:h,y:u,strokeWidth:o.stroke==="thick"?4:2,strokeStyle:o.stroke==="dotted"?"dashed":void 0,points:d,...o.text?{label:{text:Bi(o),fontSize:r,groupIds:a}}:{},roundness:{type:2},...m},$=i.find(E=>E.id===o.start),y=i.find(E=>E.id===o.end);!$||!y||(C.start={id:$.id||""},C.end={id:y.id||""},i.push(C))}),{elements:i}}});let Xt=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,i)=>(i&=63,i<36?e+=i.toString(36):i<62?e+=(i-26).toString(36).toUpperCase():i>62?e+="-":e+="_",e),"");const vc=new Cr({converter:t=>{const e=Xt(),{width:i,height:r}=t,n={type:"image",x:0,y:0,width:i,height:r,status:"saved",fileId:e};return{files:{[e]:{id:e,mimeType:t.mimeType,dataURL:t.dataURL}},elements:[n]}}}),ti=t=>{const e={type:"line",x:t.startX,y:t.startY,points:[[0,0],[t.endX-t.startX,t.endY-t.startY]],width:t.endX-t.startX,height:t.endY-t.startY,strokeStyle:t.strokeStyle||"solid",strokeColor:t.strokeColor||"#000",strokeWidth:t.strokeWidth||1};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),t.id&&Object.assign(e,{id:t.id}),e},Ji=t=>{const e={type:"text",x:t.x,y:t.y,width:t.width,height:t.height,text:t.text||"",fontSize:t.fontSize,verticalAlign:"middle"};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),t.id&&Object.assign(e,{id:t.id}),e},Ke=t=>{var r,n,s,o;let e={};t.type==="rectangle"&&t.subtype==="activation"&&(e={backgroundColor:"#e9ecef",fillStyle:"solid"});const i={id:t.id,type:t.type,x:t.x,y:t.y,width:t.width,height:t.height,label:{text:((r=t==null?void 0:t.label)==null?void 0:r.text)||"",fontSize:(n=t==null?void 0:t.label)==null?void 0:n.fontSize,verticalAlign:((s=t.label)==null?void 0:s.verticalAlign)||"middle",strokeColor:((o=t.label)==null?void 0:o.color)||"#000",groupIds:t.groupId?[t.groupId]:[]},strokeStyle:t==null?void 0:t.strokeStyle,strokeWidth:t==null?void 0:t.strokeWidth,strokeColor:t==null?void 0:t.strokeColor,backgroundColor:t==null?void 0:t.bgColor,fillStyle:"solid",...e};return t.groupId&&Object.assign(i,{groupIds:[t.groupId]}),i},$s=t=>{var i;const e={type:"arrow",x:t.startX,y:t.startY,points:t.points||[[0,0],[t.endX-t.startX,t.endY-t.startY]],width:t.endX-t.startX,height:t.endY-t.startY,strokeStyle:(t==null?void 0:t.strokeStyle)||"solid",endArrowhead:(t==null?void 0:t.endArrowhead)||null,startArrowhead:(t==null?void 0:t.startArrowhead)||null,label:{text:((i=t==null?void 0:t.label)==null?void 0:i.text)||"",fontSize:16},roundness:{type:2},start:t.start,end:t.end};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),e},wc=new Cr({converter:t=>{const e=[],i=[];if(Object.values(t.nodes).forEach(r=>{!r||!r.length||r.forEach(n=>{let s;switch(n.type){case"line":s=ti(n);break;case"rectangle":case"ellipse":s=Ke(n);break;case"text":s=Ji(n);break;default:throw`unknown type ${n.type}`}n.type==="rectangle"&&(n==null?void 0:n.subtype)==="activation"?i.push(s):e.push(s)})}),Object.values(t.lines).forEach(r=>{r&&e.push(ti(r))}),Object.values(t.arrows).forEach(r=>{r&&(e.push($s(r)),r.sequenceNumber&&e.push(Ke(r.sequenceNumber)))}),e.push(...i),t.loops){const{lines:r,texts:n,nodes:s}=t.loops;r.forEach(o=>{e.push(ti(o))}),n.forEach(o=>{e.push(Ji(o))}),s.forEach(o=>{e.push(Ke(o))})}return t.groups&&t.groups.forEach(r=>{const{actorKeys:n,name:s}=r;let o=1/0,a=1/0,l=0,c=0;if(!n.length)return;e.filter(x=>{if(x.id){const j=x.id.indexOf("-"),U=x.id.substring(0,j);return n.includes(U)}}).forEach(x=>{if(x.x===void 0||x.y===void 0||x.width===void 0||x.height===void 0)throw new Error(`Actor attributes missing ${x}`);o=Math.min(o,x.x),a=Math.min(a,x.y),l=Math.max(l,x.x+x.width),c=Math.max(c,x.y+x.height)});const u=10,p=o-u,d=a-u,m=l-o+u*2,_=c-a+u*2,C=Xt(),$=Ke({type:"rectangle",x:p,y:d,width:m,height:_,bgColor:r.fill,id:C});e.unshift($);const y=Xt(),E=[C];e.forEach(x=>{if(x.type!=="frame"){if(x.x===void 0||x.y===void 0||x.width===void 0||x.height===void 0)throw new Error(`Element attributes missing ${x}`);if(x.x>=o&&x.x+x.width<=l&&x.y>=a&&x.y+x.height<=c){const j=x.id||Xt();x.id||Object.assign(x,{id:j}),E.push(j)}}});const W={type:"frame",id:y,name:s,children:E};e.push(W)}),{elements:e}}}),Bc=new Cr({converter:t=>{const e=[];return Object.values(t.nodes).forEach(i=>{!i||!i.length||i.forEach(r=>{let n;switch(r.type){case"line":n=ti(r);break;case"rectangle":case"ellipse":n=Ke(r);break;case"text":n=Ji(r);break;default:throw`unknown type ${r.type}`}e.push(n)})}),Object.values(t.lines).forEach(i=>{i&&e.push(ti(i))}),Object.values(t.arrows).forEach(i=>{if(!i)return;const r=$s(i);e.push(r)}),Object.values(t.text).forEach(i=>{const r=Ji(i);e.push(r)}),Object.values(t.namespaces).forEach(i=>{const r=Object.keys(i.classes),n=[...r],s=[...t.lines,...t.arrows,...t.text];r.forEach(a=>{const l=s.filter(c=>c.metadata&&"class"in c.metadata&&c.metadata.classId===a).map(c=>c.id);l.length&&n.push(...l)});const o={type:"frame",id:Xt(),name:i.id,children:n};e.push(o)}),{elements:e}}}),Ec=(t,e={})=>{switch(t.type){case"graphImage":return vc.convert(t,e);case"flowchart":return kc.convert(t,e);case"sequence":return wc.convert(t,e);case"class":return Bc.convert(t,e);default:throw new Error(`graphToExcalidraw: unknown graph type "${t.type}, only flowcharts are supported!"`)}};function Ac(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var r=Array.from(typeof t=="string"?[t]:t);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var n=r.reduce(function(a,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?a.concat(c.map(function(h){var u,p;return(p=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):a},[]);if(n.length){var s=new RegExp(`
[ ]{`+Math.min.apply(Math,n)+"}","g");r=r.map(function(a){return a.replace(s,`
`)})}r[0]=r[0].replace(/^\r?\n/,"");var o=r[0];return e.forEach(function(a,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=a;typeof a=="string"&&a.includes(`
`)&&(u=String(a).split(`
`).map(function(p,d){return d===0?p:""+h+p}).join(`
`)),o+=u+r[l+1]}),o}var Ds={exports:{}};(function(t,e){(function(i,r){t.exports=r()})(fc,function(){var i=1e3,r=6e4,n=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",h="week",u="month",p="quarter",d="year",m="date",_="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|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,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(v){var k=["th","st","nd","rd"],S=v%100;return"["+v+(k[(S-20)%10]||k[S]||k[0])+"]"}},E=function(v,k,S){var L=String(v);return!L||L.length>=k?v:""+Array(k+1-L.length).join(S)+v},W={s:E,z:function(v){var k=-v.utcOffset(),S=Math.abs(k),L=Math.floor(S/60),w=S%60;return(k<=0?"+":"-")+E(L,2,"0")+":"+E(w,2,"0")},m:function v(k,S){if(k.date()<S.date())return-v(S,k);var L=12*(S.year()-k.year())+(S.month()-k.month()),w=k.clone().add(L,u),F=S-w<0,q=k.clone().add(L+(F?-1:1),u);return+(-(L+(S-w)/(F?w-q:q-w))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:u,y:d,w:h,d:c,D:m,h:l,m:a,s:o,ms:s,Q:p}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},x="en",j={};j[x]=y;var U="$isDayjsObject",vt=function(v){return v instanceof it||!(!v||!v[U])},Ct=function v(k,S,L){var w;if(!k)return x;if(typeof k=="string"){var F=k.toLowerCase();j[F]&&(w=F),S&&(j[F]=S,w=F);var q=k.split("-");if(!w&&q.length>1)return v(q[0])}else{var P=k.name;j[P]=k,w=P}return!L&&w&&(x=w),w||!L&&x},z=function(v,k){if(vt(v))return v.clone();var S=typeof k=="object"?k:{};return S.date=v,S.args=arguments,new it(S)},R=W;R.l=Ct,R.i=vt,R.w=function(v,k){return z(v,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var it=function(){function v(S){this.$L=Ct(S.locale,null,!0),this.parse(S),this.$x=this.$x||S.x||{},this[U]=!0}var k=v.prototype;return k.parse=function(S){this.$d=function(L){var w=L.date,F=L.utc;if(w===null)return new Date(NaN);if(R.u(w))return new Date;if(w instanceof Date)return new Date(w);if(typeof w=="string"&&!/Z$/i.test(w)){var q=w.match(C);if(q){var P=q[2]-1||0,K=(q[7]||"0").substring(0,3);return F?new Date(Date.UTC(q[1],P,q[3]||1,q[4]||0,q[5]||0,q[6]||0,K)):new Date(q[1],P,q[3]||1,q[4]||0,q[5]||0,q[6]||0,K)}}return new Date(w)}(S),this.init()},k.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},k.$utils=function(){return R},k.isValid=function(){return this.$d.toString()!==_},k.isSame=function(S,L){var w=z(S);return this.startOf(L)<=w&&w<=this.endOf(L)},k.isAfter=function(S,L){return z(S)<this.startOf(L)},k.isBefore=function(S,L){return this.endOf(L)<z(S)},k.$g=function(S,L,w){return R.u(S)?this[L]:this.set(w,S)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(S,L){var w=this,F=!!R.u(L)||L,q=R.p(S),P=function(Ot,Q){var at=R.w(w.$u?Date.UTC(w.$y,Q,Ot):new Date(w.$y,Q,Ot),w);return F?at:at.endOf(c)},K=function(Ot,Q){return R.w(w.toDate()[Ot].apply(w.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(Q)),w)},H=this.$W,J=this.$M,st=this.$D,zt="set"+(this.$u?"UTC":"");switch(q){case d:return F?P(1,0):P(31,11);case u:return F?P(1,J):P(0,J+1);case h:var wt=this.$locale().weekStart||0,Qt=(H<wt?H+7:H)-wt;return P(F?st-Qt:st+(6-Qt),J);case c:case m:return K(zt+"Hours",0);case l:return K(zt+"Minutes",1);case a:return K(zt+"Seconds",2);case o:return K(zt+"Milliseconds",3);default:return this.clone()}},k.endOf=function(S){return this.startOf(S,!1)},k.$set=function(S,L){var w,F=R.p(S),q="set"+(this.$u?"UTC":""),P=(w={},w[c]=q+"Date",w[m]=q+"Date",w[u]=q+"Month",w[d]=q+"FullYear",w[l]=q+"Hours",w[a]=q+"Minutes",w[o]=q+"Seconds",w[s]=q+"Milliseconds",w)[F],K=F===c?this.$D+(L-this.$W):L;if(F===u||F===d){var H=this.clone().set(m,1);H.$d[P](K),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else P&&this.$d[P](K);return this.init(),this},k.set=function(S,L){return this.clone().$set(S,L)},k.get=function(S){return this[R.p(S)]()},k.add=function(S,L){var w,F=this;S=Number(S);var q=R.p(L),P=function(J){var st=z(F);return R.w(st.date(st.date()+Math.round(J*S)),F)};if(q===u)return this.set(u,this.$M+S);if(q===d)return this.set(d,this.$y+S);if(q===c)return P(1);if(q===h)return P(7);var K=(w={},w[a]=r,w[l]=n,w[o]=i,w)[q]||1,H=this.$d.getTime()+S*K;return R.w(H,this)},k.subtract=function(S,L){return this.add(-1*S,L)},k.format=function(S){var L=this,w=this.$locale();if(!this.isValid())return w.invalidDate||_;var F=S||"YYYY-MM-DDTHH:mm:ssZ",q=R.z(this),P=this.$H,K=this.$m,H=this.$M,J=w.weekdays,st=w.months,zt=w.meridiem,wt=function(Q,at,Wt,te){return Q&&(Q[at]||Q(L,F))||Wt[at].slice(0,te)},Qt=function(Q){return R.s(P%12||12,Q,"0")},Ot=zt||function(Q,at,Wt){var te=Q<12?"AM":"PM";return Wt?te.toLowerCase():te};return F.replace($,function(Q,at){return at||function(Wt){switch(Wt){case"YY":return String(L.$y).slice(-2);case"YYYY":return R.s(L.$y,4,"0");case"M":return H+1;case"MM":return R.s(H+1,2,"0");case"MMM":return wt(w.monthsShort,H,st,3);case"MMMM":return wt(st,H);case"D":return L.$D;case"DD":return R.s(L.$D,2,"0");case"d":return String(L.$W);case"dd":return wt(w.weekdaysMin,L.$W,J,2);case"ddd":return wt(w.weekdaysShort,L.$W,J,3);case"dddd":return J[L.$W];case"H":return String(P);case"HH":return R.s(P,2,"0");case"h":return Qt(1);case"hh":return Qt(2);case"a":return Ot(P,K,!0);case"A":return Ot(P,K,!1);case"m":return String(K);case"mm":return R.s(K,2,"0");case"s":return String(L.$s);case"ss":return R.s(L.$s,2,"0");case"SSS":return R.s(L.$ms,3,"0");case"Z":return q}return null}(Q)||q.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(S,L,w){var F,q=this,P=R.p(L),K=z(S),H=(K.utcOffset()-this.utcOffset())*r,J=this-K,st=function(){return R.m(q,K)};switch(P){case d:F=st()/12;break;case u:F=st();break;case p:F=st()/3;break;case h:F=(J-H)/6048e5;break;case c:F=(J-H)/864e5;break;case l:F=J/n;break;case a:F=J/r;break;case o:F=J/i;break;default:F=J}return w?F:R.a(F)},k.daysInMonth=function(){return this.endOf(u).$D},k.$locale=function(){return j[this.$L]},k.locale=function(S,L){if(!S)return this.$L;var w=this.clone(),F=Ct(S,L,!0);return F&&(w.$L=F),w},k.clone=function(){return R.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},v}(),V=it.prototype;return z.prototype=V,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",u],["$y",d],["$D",m]].forEach(function(v){V[v[1]]=function(k){return this.$g(k,v[0],v[1])}}),z.extend=function(v,k){return v.$i||(v(k,it,z),v.$i=!0),z},z.locale=Ct,z.isDayjs=vt,z.unix=function(v){return z(1e3*v)},z.en=j[x],z.Ls=j,z.p={},z})})(Ds);var Lc=Ds.exports;const Fc=pc(Lc);var Ns={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=t.BLANK_URL=void 0;var e=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,r=/&(newline|tab);/gi,n=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|&colon;)/gim,o=[".","/"];t.BLANK_URL="about:blank";function a(h){return o.indexOf(h[0])>-1}function l(h){var u=h.replace(n,"");return u.replace(i,function(p,d){return String.fromCharCode(d)})}function c(h){if(!h)return t.BLANK_URL;var u=l(h).replace(r,"").replace(n,"").trim();if(!u)return t.BLANK_URL;if(a(u))return u;var p=u.match(s);if(!p)return u;var d=p[0];return e.test(d)?t.BLANK_URL:u}t.sanitizeUrl=c})(Ns);var Oc={value:()=>{}};function Rs(){for(var t=0,e=arguments.length,i={},r;t<e;++t){if(!(r=arguments[t]+"")||r in i||/[\s.]/.test(r))throw new Error("illegal type: "+r);i[r]=[]}return new Ri(i)}function Ri(t){this._=t}function Ic(t,e){return t.trim().split(/^|\s+/).map(function(i){var r="",n=i.indexOf(".");if(n>=0&&(r=i.slice(n+1),i=i.slice(0,n)),i&&!e.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:r}})}Ri.prototype=Rs.prototype={constructor:Ri,on:function(t,e){var i=this._,r=Ic(t+"",i),n,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((n=(t=r[s]).type)&&(n=Mc(i[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(n=(t=r[s]).type)i[n]=ko(i[n],t.name,e);else if(e==null)for(n in i)i[n]=ko(i[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var i in e)t[i]=e[i].slice();return new Ri(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var i=new Array(n),r=0,n,s;r<n;++r)i[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,n=s.length;r<n;++r)s[r].value.apply(e,i)},apply:function(t,e,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],n=0,s=r.length;n<s;++n)r[n].value.apply(e,i)}};function Mc(t,e){for(var i=0,r=t.length,n;i<r;++i)if((n=t[i]).name===e)return n.value}function ko(t,e,i){for(var r=0,n=t.length;r<n;++r)if(t[r].name===e){t[r]=Oc,t=t.slice(0,r).concat(t.slice(r+1));break}return i!=null&&t.push({name:e,value:i}),t}var hn="http://www.w3.org/1999/xhtml";const vo={svg:"http://www.w3.org/2000/svg",xhtml:hn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function xr(t){var e=t+="",i=e.indexOf(":");return i>=0&&(e=t.slice(0,i))!=="xmlns"&&(t=t.slice(i+1)),vo.hasOwnProperty(e)?{space:vo[e],local:t}:t}function $c(t){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===hn&&e.documentElement.namespaceURI===hn?e.createElement(t):e.createElementNS(i,t)}}function Dc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ps(t){var e=xr(t);return(e.local?Dc:$c)(e)}function Nc(){}function On(t){return t==null?Nc:function(){return this.querySelector(t)}}function Rc(t){typeof t!="function"&&(t=On(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n<i;++n)for(var s=e[n],o=s.length,a=r[n]=new Array(o),l,c,h=0;h<o;++h)(l=s[h])&&(c=t.call(l,l.__data__,h,s))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new bt(r,this._parents)}function Pc(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function qc(){return[]}function qs(t){return t==null?qc:function(){return this.querySelectorAll(t)}}function zc(t){return function(){return Pc(t.apply(this,arguments))}}function Wc(t){typeof t=="function"?t=zc(t):t=qs(t);for(var e=this._groups,i=e.length,r=[],n=[],s=0;s<i;++s)for(var o=e[s],a=o.length,l,c=0;c<a;++c)(l=o[c])&&(r.push(t.call(l,l.__data__,c,o)),n.push(l));return new bt(r,n)}function zs(t){return function(){return this.matches(t)}}function Ws(t){return function(e){return e.matches(t)}}var jc=Array.prototype.find;function Hc(t){return function(){return jc.call(this.children,t)}}function Yc(){return this.firstElementChild}function Uc(t){return this.select(t==null?Yc:Hc(typeof t=="function"?t:Ws(t)))}var Gc=Array.prototype.filter;function Vc(){return Array.from(this.children)}function Xc(t){return function(){return Gc.call(this.children,t)}}function Kc(t){return this.selectAll(t==null?Vc:Xc(typeof t=="function"?t:Ws(t)))}function Zc(t){typeof t!="function"&&(t=zs(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n<i;++n)for(var s=e[n],o=s.length,a=r[n]=[],l,c=0;c<o;++c)(l=s[c])&&t.call(l,l.__data__,c,s)&&a.push(l);return new bt(r,this._parents)}function js(t){return new Array(t.length)}function Jc(){return new bt(this._enter||this._groups.map(js),this._parents)}function Qi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Qi.prototype={constructor:Qi,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Qc(t){return function(){return t}}function th(t,e,i,r,n,s){for(var o=0,a,l=e.length,c=s.length;o<c;++o)(a=e[o])?(a.__data__=s[o],r[o]=a):i[o]=new Qi(t,s[o]);for(;o<l;++o)(a=e[o])&&(n[o]=a)}function eh(t,e,i,r,n,s,o){var a,l,c=new Map,h=e.length,u=s.length,p=new Array(h),d;for(a=0;a<h;++a)(l=e[a])&&(p[a]=d=o.call(l,l.__data__,a,e)+"",c.has(d)?n[a]=l:c.set(d,l));for(a=0;a<u;++a)d=o.call(t,s[a],a,s)+"",(l=c.get(d))?(r[a]=l,l.__data__=s[a],c.delete(d)):i[a]=new Qi(t,s[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(p[a])===l&&(n[a]=l)}function ih(t){return t.__data__}function rh(t,e){if(!arguments.length)return Array.from(this,ih);var i=e?eh:th,r=this._parents,n=this._groups;typeof t!="function"&&(t=Qc(t));for(var s=n.length,o=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var h=r[c],u=n[c],p=u.length,d=nh(t.call(h,h&&h.__data__,c,r)),m=d.length,_=a[c]=new Array(m),C=o[c]=new Array(m),$=l[c]=new Array(p);i(h,u,_,C,$,d,e);for(var y=0,E=0,W,x;y<m;++y)if(W=_[y]){for(y>=E&&(E=y+1);!(x=C[E])&&++E<m;);W._next=x||null}}return o=new bt(o,r),o._enter=a,o._exit=l,o}function nh(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function oh(){return new bt(this._exit||this._groups.map(js),this._parents)}function sh(t,e,i){var r=this.enter(),n=this,s=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),i==null?s.remove():i(s),r&&n?r.merge(n).order():n}function ah(t){for(var e=t.selection?t.selection():t,i=this._groups,r=e._groups,n=i.length,s=r.length,o=Math.min(n,s),a=new Array(n),l=0;l<o;++l)for(var c=i[l],h=r[l],u=c.length,p=a[l]=new Array(u),d,m=0;m<u;++m)(d=c[m]||h[m])&&(p[m]=d);for(;l<n;++l)a[l]=i[l];return new bt(a,this._parents)}function lh(){for(var t=this._groups,e=-1,i=t.length;++e<i;)for(var r=t[e],n=r.length-1,s=r[n],o;--n>=0;)(o=r[n])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function ch(t){t||(t=hh);function e(u,p){return u&&p?t(u.__data__,p.__data__):!u-!p}for(var i=this._groups,r=i.length,n=new Array(r),s=0;s<r;++s){for(var o=i[s],a=o.length,l=n[s]=new Array(a),c,h=0;h<a;++h)(c=o[h])&&(l[h]=c);l.sort(e)}return new bt(n,this._parents).order()}function hh(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function uh(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function dh(){return Array.from(this)}function fh(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var r=t[e],n=0,s=r.length;n<s;++n){var o=r[n];if(o)return o}return null}function ph(){let t=0;for(const e of this)++t;return t}function gh(){return!this.node()}function mh(t){for(var e=this._groups,i=0,r=e.length;i<r;++i)for(var n=e[i],s=0,o=n.length,a;s<o;++s)(a=n[s])&&t.call(a,a.__data__,s,n);return this}function _h(t){return function(){this.removeAttribute(t)}}function yh(t){return function(){this.removeAttributeNS(t.space,t.local)}}function bh(t,e){return function(){this.setAttribute(t,e)}}function Ch(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function xh(t,e){return function(){var i=e.apply(this,arguments);i==null?this.removeAttribute(t):this.setAttribute(t,i)}}function Th(t,e){return function(){var i=e.apply(this,arguments);i==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function Sh(t,e){var i=xr(t);if(arguments.length<2){var r=this.node();return i.local?r.getAttributeNS(i.space,i.local):r.getAttribute(i)}return this.each((e==null?i.local?yh:_h:typeof e=="function"?i.local?Th:xh:i.local?Ch:bh)(i,e))}function Hs(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function kh(t){return function(){this.style.removeProperty(t)}}function vh(t,e,i){return function(){this.style.setProperty(t,e,i)}}function wh(t,e,i){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,i)}}function Bh(t,e,i){return arguments.length>1?this.each((e==null?kh:typeof e=="function"?wh:vh)(t,e,i??"")):Me(this.node(),t)}function Me(t,e){return t.style.getPropertyValue(e)||Hs(t).getComputedStyle(t,null).getPropertyValue(e)}function Eh(t){return function(){delete this[t]}}function Ah(t,e){return function(){this[t]=e}}function Lh(t,e){return function(){var i=e.apply(this,arguments);i==null?delete this[t]:this[t]=i}}function Fh(t,e){return arguments.length>1?this.each((e==null?Eh:typeof e=="function"?Lh:Ah)(t,e)):this.node()[t]}function Ys(t){return t.trim().split(/^|\s+/)}function In(t){return t.classList||new Us(t)}function Us(t){this._node=t,this._names=Ys(t.getAttribute("class")||"")}Us.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 Gs(t,e){for(var i=In(t),r=-1,n=e.length;++r<n;)i.add(e[r])}function Vs(t,e){for(var i=In(t),r=-1,n=e.length;++r<n;)i.remove(e[r])}function Oh(t){return function(){Gs(this,t)}}function Ih(t){return function(){Vs(this,t)}}function Mh(t,e){return function(){(e.apply(this,arguments)?Gs:Vs)(this,t)}}function $h(t,e){var i=Ys(t+"");if(arguments.length<2){for(var r=In(this.node()),n=-1,s=i.length;++n<s;)if(!r.contains(i[n]))return!1;return!0}return this.each((typeof e=="function"?Mh:e?Oh:Ih)(i,e))}function Dh(){this.textContent=""}function Nh(t){return function(){this.textContent=t}}function Rh(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ph(t){return arguments.length?this.each(t==null?Dh:(typeof t=="function"?Rh:Nh)(t)):this.node().textContent}function qh(){this.innerHTML=""}function zh(t){return function(){this.innerHTML=t}}function Wh(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function jh(t){return arguments.length?this.each(t==null?qh:(typeof t=="function"?Wh:zh)(t)):this.node().innerHTML}function Hh(){this.nextSibling&&this.parentNode.appendChild(this)}function Yh(){return this.each(Hh)}function Uh(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Gh(){return this.each(Uh)}function Vh(t){var e=typeof t=="function"?t:Ps(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Xh(){return null}function Kh(t,e){var i=typeof t=="function"?t:Ps(t),r=e==null?Xh:typeof e=="function"?e:On(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),r.apply(this,arguments)||null)})}function Zh(){var t=this.parentNode;t&&t.removeChild(this)}function Jh(){return this.each(Zh)}function Qh(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tu(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function eu(t){return this.select(t?tu:Qh)}function iu(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ru(t){return function(e){t.call(this,e,this.__data__)}}function nu(t){return t.trim().split(/^|\s+/).map(function(e){var i="",r=e.indexOf(".");return r>=0&&(i=e.slice(r+1),e=e.slice(0,r)),{type:e,name:i}})}function ou(t){return function(){var e=this.__on;if(e){for(var i=0,r=-1,n=e.length,s;i<n;++i)s=e[i],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++r]=s;++r?e.length=r:delete this.__on}}}function su(t,e,i){return function(){var r=this.__on,n,s=ru(e);if(r){for(var o=0,a=r.length;o<a;++o)if((n=r[o]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=s,n.options=i),n.value=e;return}}this.addEventListener(t.type,s,i),n={type:t.type,name:t.name,value:e,listener:s,options:i},r?r.push(n):this.__on=[n]}}function au(t,e,i){var r=nu(t+""),n,s=r.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(n=0,h=a[l];n<s;++n)if((o=r[n]).type===h.type&&o.name===h.name)return h.value}return}for(a=e?su:ou,n=0;n<s;++n)this.each(a(r[n],e,i));return this}function Xs(t,e,i){var r=Hs(t),n=r.CustomEvent;typeof n=="function"?n=new n(e,i):(n=r.document.createEvent("Event"),i?(n.initEvent(e,i.bubbles,i.cancelable),n.detail=i.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function lu(t,e){return function(){return Xs(this,t,e)}}function cu(t,e){return function(){return Xs(this,t,e.apply(this,arguments))}}function hu(t,e){return this.each((typeof e=="function"?cu:lu)(t,e))}function*uu(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var r=t[e],n=0,s=r.length,o;n<s;++n)(o=r[n])&&(yield o)}var Ks=[null];function bt(t,e){this._groups=t,this._parents=e}function mi(){return new bt([[document.documentElement]],Ks)}function du(){return this}bt.prototype=mi.prototype={constructor:bt,select:Rc,selectAll:Wc,selectChild:Uc,selectChildren:Kc,filter:Zc,data:rh,enter:Jc,exit:oh,join:sh,merge:ah,selection:du,order:lh,sort:ch,call:uh,nodes:dh,node:fh,size:ph,empty:gh,each:mh,attr:Sh,style:Bh,property:Fh,classed:$h,text:Ph,html:jh,raise:Yh,lower:Gh,append:Vh,insert:Kh,remove:Jh,clone:eu,datum:iu,on:au,dispatch:hu,[Symbol.iterator]:uu};function Mt(t){return typeof t=="string"?new bt([[document.querySelector(t)]],[document.documentElement]):new bt([[t]],Ks)}function Mn(t,e,i){t.prototype=e.prototype=i,i.constructor=t}function Zs(t,e){var i=Object.create(t.prototype);for(var r in e)i[r]=e[r];return i}function _i(){}var oi=.7,tr=1/oi,Oe="\\s*([+-]?\\d+)\\s*",si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fu=/^#([0-9a-f]{3,8})$/,pu=new RegExp(`^rgb\\(${Oe},${Oe},${Oe}\\)$`),gu=new RegExp(`^rgb\\(${Dt},${Dt},${Dt}\\)$`),mu=new RegExp(`^rgba\\(${Oe},${Oe},${Oe},${si}\\)$`),_u=new RegExp(`^rgba\\(${Dt},${Dt},${Dt},${si}\\)$`),yu=new RegExp(`^hsl\\(${si},${Dt},${Dt}\\)$`),bu=new RegExp(`^hsla\\(${si},${Dt},${Dt},${si}\\)$`),wo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Mn(_i,ai,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Bo,formatHex:Bo,formatHex8:Cu,formatHsl:xu,formatRgb:Eo,toString:Eo});function Bo(){return this.rgb().formatHex()}function Cu(){return this.rgb().formatHex8()}function xu(){return Js(this).formatHsl()}function Eo(){return this.rgb().formatRgb()}function ai(t){var e,i;return t=(t+"").trim().toLowerCase(),(e=fu.exec(t))?(i=e[1].length,e=parseInt(e[1],16),i===6?Ao(e):i===3?new gt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Ei(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Ei(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=pu.exec(t))?new gt(e[1],e[2],e[3],1):(e=gu.exec(t))?new gt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=mu.exec(t))?Ei(e[1],e[2],e[3],e[4]):(e=_u.exec(t))?Ei(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=yu.exec(t))?Oo(e[1],e[2]/100,e[3]/100,1):(e=bu.exec(t))?Oo(e[1],e[2]/100,e[3]/100,e[4]):wo.hasOwnProperty(t)?Ao(wo[t]):t==="transparent"?new gt(NaN,NaN,NaN,0):null}function Ao(t){return new gt(t>>16&255,t>>8&255,t&255,1)}function Ei(t,e,i,r){return r<=0&&(t=e=i=NaN),new gt(t,e,i,r)}function Tu(t){return t instanceof _i||(t=ai(t)),t?(t=t.rgb(),new gt(t.r,t.g,t.b,t.opacity)):new gt}function un(t,e,i,r){return arguments.length===1?Tu(t):new gt(t,e,i,r??1)}function gt(t,e,i,r){this.r=+t,this.g=+e,this.b=+i,this.opacity=+r}Mn(gt,un,Zs(_i,{brighter(t){return t=t==null?tr:Math.pow(tr,t),new gt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?oi:Math.pow(oi,t),new gt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new gt(pe(this.r),pe(this.g),pe(this.b),er(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:Lo,formatHex:Lo,formatHex8:Su,formatRgb:Fo,toString:Fo}));function Lo(){return`#${fe(this.r)}${fe(this.g)}${fe(this.b)}`}function Su(){return`#${fe(this.r)}${fe(this.g)}${fe(this.b)}${fe((isNaN(this.opacity)?1:this.opacity)*255)}`}function Fo(){const t=er(this.opacity);return`${t===1?"rgb(":"rgba("}${pe(this.r)}, ${pe(this.g)}, ${pe(this.b)}${t===1?")":`, ${t})`}`}function er(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function pe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function fe(t){return t=pe(t),(t<16?"0":"")+t.toString(16)}function Oo(t,e,i,r){return r<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new Et(t,e,i,r)}function Js(t){if(t instanceof Et)return new Et(t.h,t.s,t.l,t.opacity);if(t instanceof _i||(t=ai(t)),!t)return new Et;if(t instanceof Et)return t;t=t.rgb();var e=t.r/255,i=t.g/255,r=t.b/255,n=Math.min(e,i,r),s=Math.max(e,i,r),o=NaN,a=s-n,l=(s+n)/2;return a?(e===s?o=(i-r)/a+(i<r)*6:i===s?o=(r-e)/a+2:o=(e-i)/a+4,a/=l<.5?s+n:2-s-n,o*=60):a=l>0&&l<1?0:o,new Et(o,a,l,t.opacity)}function ku(t,e,i,r){return arguments.length===1?Js(t):new Et(t,e,i,r??1)}function Et(t,e,i,r){this.h=+t,this.s=+e,this.l=+i,this.opacity=+r}Mn(Et,ku,Zs(_i,{brighter(t){return t=t==null?tr:Math.pow(tr,t),new Et(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?oi:Math.pow(oi,t),new Et(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,i=this.l,r=i+(i<.5?i:1-i)*e,n=2*i-r;return new gt(Ur(t>=240?t-240:t+120,n,r),Ur(t,n,r),Ur(t<120?t+240:t-120,n,r),this.opacity)},clamp(){return new Et(Io(this.h),Ai(this.s),Ai(this.l),er(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=er(this.opacity);return`${t===1?"hsl(":"hsla("}${Io(this.h)}, ${Ai(this.s)*100}%, ${Ai(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Io(t){return t=(t||0)%360,t<0?t+360:t}function Ai(t){return Math.max(0,Math.min(1,t||0))}function Ur(t,e,i){return(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)*255}const $n=t=>()=>t;function Qs(t,e){return function(i){return t+i*e}}function vu(t,e,i){return t=Math.pow(t,i),e=Math.pow(e,i)-t,i=1/i,function(r){return Math.pow(t+r*e,i)}}function w1(t,e){var i=e-t;return i?Qs(t,i>180||i<-180?i-360*Math.round(i/360):i):$n(isNaN(t)?e:t)}function wu(t){return(t=+t)==1?ta:function(e,i){return i-e?vu(e,i,t):$n(isNaN(e)?i:e)}}function ta(t,e){var i=e-t;return i?Qs(t,i):$n(isNaN(t)?e:t)}const Mo=function t(e){var i=wu(e);function r(n,s){var o=i((n=un(n)).r,(s=un(s)).r),a=i(n.g,s.g),l=i(n.b,s.b),c=ta(n.opacity,s.opacity);return function(h){return n.r=o(h),n.g=a(h),n.b=l(h),n.opacity=c(h),n+""}}return r.gamma=t,r}(1);function ie(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}var dn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Gr=new RegExp(dn.source,"g");function Bu(t){return function(){return t}}function Eu(t){return function(e){return t(e)+""}}function Au(t,e){var i=dn.lastIndex=Gr.lastIndex=0,r,n,s,o=-1,a=[],l=[];for(t=t+"",e=e+"";(r=dn.exec(t))&&(n=Gr.exec(e));)(s=n.index)>i&&(s=e.slice(i,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(n=n[0])?a[o]?a[o]+=n:a[++o]=n:(a[++o]=null,l.push({i:o,x:ie(r,n)})),i=Gr.lastIndex;return i<e.length&&(s=e.slice(i),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?Eu(l[0].x):Bu(e):(e=l.length,function(c){for(var h=0,u;h<e;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}var $o=180/Math.PI,fn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ea(t,e,i,r,n,s){var o,a,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*i+e*r)&&(i-=t*l,r-=e*l),(a=Math.sqrt(i*i+r*r))&&(i/=a,r/=a,l/=a),t*r<e*i&&(t=-t,e=-e,l=-l,o=-o),{translateX:n,translateY:s,rotate:Math.atan2(e,t)*$o,skewX:Math.atan(l)*$o,scaleX:o,scaleY:a}}var Li;function Lu(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?fn:ea(e.a,e.b,e.c,e.d,e.e,e.f)}function Fu(t){return t==null||(Li||(Li=document.createElementNS("http://www.w3.org/2000/svg","g")),Li.setAttribute("transform",t),!(t=Li.transform.baseVal.consolidate()))?fn:(t=t.matrix,ea(t.a,t.b,t.c,t.d,t.e,t.f))}function ia(t,e,i,r){function n(c){return c.length?c.pop()+" ":""}function s(c,h,u,p,d,m){if(c!==u||h!==p){var _=d.push("translate(",null,e,null,i);m.push({i:_-4,x:ie(c,u)},{i:_-2,x:ie(h,p)})}else(u||p)&&d.push("translate("+u+e+p+i)}function o(c,h,u,p){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),p.push({i:u.push(n(u)+"rotate(",null,r)-2,x:ie(c,h)})):h&&u.push(n(u)+"rotate("+h+r)}function a(c,h,u,p){c!==h?p.push({i:u.push(n(u)+"skewX(",null,r)-2,x:ie(c,h)}):h&&u.push(n(u)+"skewX("+h+r)}function l(c,h,u,p,d,m){if(c!==u||h!==p){var _=d.push(n(d)+"scale(",null,",",null,")");m.push({i:_-4,x:ie(c,u)},{i:_-2,x:ie(h,p)})}else(u!==1||p!==1)&&d.push(n(d)+"scale("+u+","+p+")")}return function(c,h){var u=[],p=[];return c=t(c),h=t(h),s(c.translateX,c.translateY,h.translateX,h.translateY,u,p),o(c.rotate,h.rotate,u,p),a(c.skewX,h.skewX,u,p),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,p),c=h=null,function(d){for(var m=-1,_=p.length,C;++m<_;)u[(C=p[m]).i]=C.x(d);return u.join("")}}}var Ou=ia(Lu,"px, ","px)","deg)"),Iu=ia(Fu,", ",")",")"),$e=0,Ze=0,Ue=0,ra=1e3,ir,Je,rr=0,_e=0,Tr=0,li=typeof performance=="object"&&performance.now?performance:Date,na=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Dn(){return _e||(na(Mu),_e=li.now()+Tr)}function Mu(){_e=0}function nr(){this._call=this._time=this._next=null}nr.prototype=oa.prototype={constructor:nr,restart:function(t,e,i){if(typeof t!="function")throw new TypeError("callback is not a function");i=(i==null?Dn():+i)+(e==null?0:+e),!this._next&&Je!==this&&(Je?Je._next=this:ir=this,Je=this),this._call=t,this._time=i,pn()},stop:function(){this._call&&(this._call=null,this._time=1/0,pn())}};function oa(t,e,i){var r=new nr;return r.restart(t,e,i),r}function $u(){Dn(),++$e;for(var t=ir,e;t;)(e=_e-t._time)>=0&&t._call.call(void 0,e),t=t._next;--$e}function Do(){_e=(rr=li.now())+Tr,$e=Ze=0;try{$u()}finally{$e=0,Nu(),_e=0}}function Du(){var t=li.now(),e=t-rr;e>ra&&(Tr-=e,rr=t)}function Nu(){for(var t,e=ir,i,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(i=e._next,e._next=null,e=t?t._next=i:ir=i);Je=t,pn(r)}function pn(t){if(!$e){Ze&&(Ze=clearTimeout(Ze));var e=t-_e;e>24?(t<1/0&&(Ze=setTimeout(Do,t-li.now()-Tr)),Ue&&(Ue=clearInterval(Ue))):(Ue||(rr=li.now(),Ue=setInterval(Du,ra)),$e=1,na(Do))}}function No(t,e,i){var r=new nr;return e=e==null?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,i),r}var Ru=Rs("start","end","cancel","interrupt"),Pu=[],sa=0,Ro=1,gn=2,Pi=3,Po=4,mn=5,qi=6;function Sr(t,e,i,r,n,s){var o=t.__transition;if(!o)t.__transition={};else if(i in o)return;qu(t,i,{name:e,index:r,group:n,on:Ru,tween:Pu,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:sa})}function Nn(t,e){var i=Ft(t,e);if(i.state>sa)throw new Error("too late; already scheduled");return i}function qt(t,e){var i=Ft(t,e);if(i.state>Pi)throw new Error("too late; already running");return i}function Ft(t,e){var i=t.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function qu(t,e,i){var r=t.__transition,n;r[e]=i,i.timer=oa(s,0,i.time);function s(c){i.state=Ro,i.timer.restart(o,i.delay,i.time),i.delay<=c&&o(c-i.delay)}function o(c){var h,u,p,d;if(i.state!==Ro)return l();for(h in r)if(d=r[h],d.name===i.name){if(d.state===Pi)return No(o);d.state===Po?(d.state=qi,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[h]):+h<e&&(d.state=qi,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[h])}if(No(function(){i.state===Pi&&(i.state=Po,i.timer.restart(a,i.delay,i.time),a(c))}),i.state=gn,i.on.call("start",t,t.__data__,i.index,i.group),i.state===gn){for(i.state=Pi,n=new Array(p=i.tween.length),h=0,u=-1;h<p;++h)(d=i.tween[h].value.call(t,t.__data__,i.index,i.group))&&(n[++u]=d);n.length=u+1}}function a(c){for(var h=c<i.duration?i.ease.call(null,c/i.duration):(i.timer.restart(l),i.state=mn,1),u=-1,p=n.length;++u<p;)n[u].call(t,h);i.state===mn&&(i.on.call("end",t,t.__data__,i.index,i.group),l())}function l(){i.state=qi,i.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function zu(t,e){var i=t.__transition,r,n,s=!0,o;if(i){e=e==null?null:e+"";for(o in i){if((r=i[o]).name!==e){s=!1;continue}n=r.state>gn&&r.state<mn,r.state=qi,r.timer.stop(),r.on.call(n?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete i[o]}s&&delete t.__transition}}function Wu(t){return this.each(function(){zu(this,t)})}function ju(t,e){var i,r;return function(){var n=qt(this,t),s=n.tween;if(s!==i){r=i=s;for(var o=0,a=r.length;o<a;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}n.tween=r}}function Hu(t,e,i){var r,n;if(typeof i!="function")throw new Error;return function(){var s=qt(this,t),o=s.tween;if(o!==r){n=(r=o).slice();for(var a={name:e,value:i},l=0,c=n.length;l<c;++l)if(n[l].name===e){n[l]=a;break}l===c&&n.push(a)}s.tween=n}}function Yu(t,e){var i=this._id;if(t+="",arguments.length<2){for(var r=Ft(this.node(),i).tween,n=0,s=r.length,o;n<s;++n)if((o=r[n]).name===t)return o.value;return null}return this.each((e==null?ju:Hu)(i,t,e))}function Rn(t,e,i){var r=t._id;return t.each(function(){var n=qt(this,r);(n.value||(n.value={}))[e]=i.apply(this,arguments)}),function(n){return Ft(n,r).value[e]}}function aa(t,e){var i;return(typeof e=="number"?ie:e instanceof ai?Mo:(i=ai(e))?(e=i,Mo):Au)(t,e)}function Uu(t){return function(){this.removeAttribute(t)}}function Gu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Vu(t,e,i){var r,n=i+"",s;return function(){var o=this.getAttribute(t);return o===n?null:o===r?s:s=e(r=o,i)}}function Xu(t,e,i){var r,n=i+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===r?s:s=e(r=o,i)}}function Ku(t,e,i){var r,n,s;return function(){var o,a=i(this),l;return a==null?void this.removeAttribute(t):(o=this.getAttribute(t),l=a+"",o===l?null:o===r&&l===n?s:(n=l,s=e(r=o,a)))}}function Zu(t,e,i){var r,n,s;return function(){var o,a=i(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),l=a+"",o===l?null:o===r&&l===n?s:(n=l,s=e(r=o,a)))}}function Ju(t,e){var i=xr(t),r=i==="transform"?Iu:aa;return this.attrTween(t,typeof e=="function"?(i.local?Zu:Ku)(i,r,Rn(this,"attr."+t,e)):e==null?(i.local?Gu:Uu)(i):(i.local?Xu:Vu)(i,r,e))}function Qu(t,e){return function(i){this.setAttribute(t,e.call(this,i))}}function td(t,e){return function(i){this.setAttributeNS(t.space,t.local,e.call(this,i))}}function ed(t,e){var i,r;function n(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&td(t,s)),i}return n._value=e,n}function id(t,e){var i,r;function n(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&Qu(t,s)),i}return n._value=e,n}function rd(t,e){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;var r=xr(t);return this.tween(i,(r.local?ed:id)(r,e))}function nd(t,e){return function(){Nn(this,t).delay=+e.apply(this,arguments)}}function od(t,e){return e=+e,function(){Nn(this,t).delay=e}}function sd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?nd:od)(e,t)):Ft(this.node(),e).delay}function ad(t,e){return function(){qt(this,t).duration=+e.apply(this,arguments)}}function ld(t,e){return e=+e,function(){qt(this,t).duration=e}}function cd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?ad:ld)(e,t)):Ft(this.node(),e).duration}function hd(t,e){if(typeof e!="function")throw new Error;return function(){qt(this,t).ease=e}}function ud(t){var e=this._id;return arguments.length?this.each(hd(e,t)):Ft(this.node(),e).ease}function dd(t,e){return function(){var i=e.apply(this,arguments);if(typeof i!="function")throw new Error;qt(this,t).ease=i}}function fd(t){if(typeof t!="function")throw new Error;return this.each(dd(this._id,t))}function pd(t){typeof t!="function"&&(t=zs(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n<i;++n)for(var s=e[n],o=s.length,a=r[n]=[],l,c=0;c<o;++c)(l=s[c])&&t.call(l,l.__data__,c,s)&&a.push(l);return new Zt(r,this._parents,this._name,this._id)}function gd(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,i=t._groups,r=e.length,n=i.length,s=Math.min(r,n),o=new Array(r),a=0;a<s;++a)for(var l=e[a],c=i[a],h=l.length,u=o[a]=new Array(h),p,d=0;d<h;++d)(p=l[d]||c[d])&&(u[d]=p);for(;a<r;++a)o[a]=e[a];return new Zt(o,this._parents,this._name,this._id)}function md(t){return(t+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");return i>=0&&(e=e.slice(0,i)),!e||e==="start"})}function _d(t,e,i){var r,n,s=md(e)?Nn:qt;return function(){var o=s(this,t),a=o.on;a!==r&&(n=(r=a).copy()).on(e,i),o.on=n}}function yd(t,e){var i=this._id;return arguments.length<2?Ft(this.node(),i).on.on(t):this.each(_d(i,t,e))}function bd(t){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==t)return;e&&e.removeChild(this)}}function Cd(){return this.on("end.remove",bd(this._id))}function xd(t){var e=this._name,i=this._id;typeof t!="function"&&(t=On(t));for(var r=this._groups,n=r.length,s=new Array(n),o=0;o<n;++o)for(var a=r[o],l=a.length,c=s[o]=new Array(l),h,u,p=0;p<l;++p)(h=a[p])&&(u=t.call(h,h.__data__,p,a))&&("__data__"in h&&(u.__data__=h.__data__),c[p]=u,Sr(c[p],e,i,p,c,Ft(h,i)));return new Zt(s,this._parents,e,i)}function Td(t){var e=this._name,i=this._id;typeof t!="function"&&(t=qs(t));for(var r=this._groups,n=r.length,s=[],o=[],a=0;a<n;++a)for(var l=r[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var p=t.call(h,h.__data__,u,l),d,m=Ft(h,i),_=0,C=p.length;_<C;++_)(d=p[_])&&Sr(d,e,i,_,p,m);s.push(p),o.push(h)}return new Zt(s,o,e,i)}var Sd=mi.prototype.constructor;function kd(){return new Sd(this._groups,this._parents)}function vd(t,e){var i,r,n;return function(){var s=Me(this,t),o=(this.style.removeProperty(t),Me(this,t));return s===o?null:s===i&&o===r?n:n=e(i=s,r=o)}}function la(t){return function(){this.style.removeProperty(t)}}function wd(t,e,i){var r,n=i+"",s;return function(){var o=Me(this,t);return o===n?null:o===r?s:s=e(r=o,i)}}function Bd(t,e,i){var r,n,s;return function(){var o=Me(this,t),a=i(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),Me(this,t))),o===l?null:o===r&&l===n?s:(n=l,s=e(r=o,a))}}function Ed(t,e){var i,r,n,s="style."+e,o="end."+s,a;return function(){var l=qt(this,t),c=l.on,h=l.value[s]==null?a||(a=la(e)):void 0;(c!==i||n!==h)&&(r=(i=c).copy()).on(o,n=h),l.on=r}}function Ad(t,e,i){var r=(t+="")=="transform"?Ou:aa;return e==null?this.styleTween(t,vd(t,r)).on("end.style."+t,la(t)):typeof e=="function"?this.styleTween(t,Bd(t,r,Rn(this,"style."+t,e))).each(Ed(this._id,t)):this.styleTween(t,wd(t,r,e),i).on("end.style."+t,null)}function Ld(t,e,i){return function(r){this.style.setProperty(t,e.call(this,r),i)}}function Fd(t,e,i){var r,n;function s(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&Ld(t,o,i)),r}return s._value=e,s}function Od(t,e,i){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,Fd(t,e,i??""))}function Id(t){return function(){this.textContent=t}}function Md(t){return function(){var e=t(this);this.textContent=e??""}}function $d(t){return this.tween("text",typeof t=="function"?Md(Rn(this,"text",t)):Id(t==null?"":t+""))}function Dd(t){return function(e){this.textContent=t.call(this,e)}}function Nd(t){var e,i;function r(){var n=t.apply(this,arguments);return n!==i&&(e=(i=n)&&Dd(n)),e}return r._value=t,r}function Rd(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Nd(t))}function Pd(){for(var t=this._name,e=this._id,i=ca(),r=this._groups,n=r.length,s=0;s<n;++s)for(var o=r[s],a=o.length,l,c=0;c<a;++c)if(l=o[c]){var h=Ft(l,e);Sr(l,t,i,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Zt(r,this._parents,t,i)}function qd(){var t,e,i=this,r=i._id,n=i.size();return new Promise(function(s,o){var a={value:o},l={value:function(){--n===0&&s()}};i.each(function(){var c=qt(this,r),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),n===0&&s()})}var zd=0;function Zt(t,e,i,r){this._groups=t,this._parents=e,this._name=i,this._id=r}function ca(){return++zd}var Yt=mi.prototype;Zt.prototype={constructor:Zt,select:xd,selectAll:Td,selectChild:Yt.selectChild,selectChildren:Yt.selectChildren,filter:pd,merge:gd,selection:kd,transition:Pd,call:Yt.call,nodes:Yt.nodes,node:Yt.node,size:Yt.size,empty:Yt.empty,each:Yt.each,on:yd,attr:Ju,attrTween:rd,style:Ad,styleTween:Od,text:$d,textTween:Rd,remove:Cd,tween:Yu,delay:sd,duration:cd,ease:ud,easeVarying:fd,end:qd,[Symbol.iterator]:Yt[Symbol.iterator]};function Wd(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var jd={time:null,delay:0,duration:250,ease:Wd};function Hd(t,e){for(var i;!(i=t.__transition)||!(i=i[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return i}function Yd(t){var e,i;t instanceof Zt?(e=t._id,t=t._name):(e=ca(),(i=jd).time=Dn(),t=t==null?null:t+"");for(var r=this._groups,n=r.length,s=0;s<n;++s)for(var o=r[s],a=o.length,l,c=0;c<a;++c)(l=o[c])&&Sr(l,t,e,c,o,i||Hd(l,e));return new Zt(r,this._parents,t,e)}mi.prototype.interrupt=Wu;mi.prototype.transition=Yd;const B1=Math.abs,E1=Math.atan2,A1=Math.cos,L1=Math.max,F1=Math.min,O1=Math.sin,I1=Math.sqrt,qo=1e-12,Pn=Math.PI,zo=Pn/2,M1=2*Pn;function $1(t){return t>1?0:t<-1?Pn:Math.acos(t)}function D1(t){return t>=1?zo:t<=-1?-zo:Math.asin(t)}function ha(t){this._context=t}ha.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 Ud(t){return new ha(t)}class ua{constructor(e,i){this._context=e,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,i){switch(e=+e,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,i,e,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,e,this._y0,e,i);break}}this._x0=e,this._y0=i}}function Gd(t){return new ua(t,!0)}function Vd(t){return new ua(t,!1)}function oe(){}function or(t,e,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+i)/6)}function kr(t){this._context=t}kr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:or(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:or(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Xd(t){return new kr(t)}function da(t){this._context=t}da.prototype={areaStart:oe,areaEnd:oe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:or(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Kd(t){return new da(t)}function fa(t){this._context=t}fa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,r):this._context.moveTo(i,r);break;case 3:this._point=4;default:or(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Zd(t){return new fa(t)}function pa(t,e){this._basis=new kr(t),this._beta=e}pa.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,i=t.length-1;if(i>0)for(var r=t[0],n=e[0],s=t[i]-r,o=e[i]-n,a=-1,l;++a<=i;)l=a/i,this._basis.point(this._beta*t[a]+(1-this._beta)*(r+l*s),this._beta*e[a]+(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 Jd=function t(e){function i(r){return e===1?new kr(r):new pa(r,e)}return i.beta=function(r){return t(+r)},i}(.85);function sr(t,e,i){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-i),t._x2,t._y2)}function qn(t,e){this._context=t,this._k=(1-e)/6}qn.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:sr(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:sr(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 Qd=function t(e){function i(r){return new qn(r,e)}return i.tension=function(r){return t(+r)},i}(0);function zn(t,e){this._context=t,this._k=(1-e)/6}zn.prototype={areaStart:oe,areaEnd:oe,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:sr(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 tf=function t(e){function i(r){return new zn(r,e)}return i.tension=function(r){return t(+r)},i}(0);function Wn(t,e){this._context=t,this._k=(1-e)/6}Wn.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:sr(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 ef=function t(e){function i(r){return new Wn(r,e)}return i.tension=function(r){return t(+r)},i}(0);function jn(t,e,i){var r=t._x1,n=t._y1,s=t._x2,o=t._y2;if(t._l01_a>qo){var a=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);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>qo){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);s=(s*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-i*t._l12_2a)/h}t._context.bezierCurveTo(r,n,s,o,t._x2,t._y2)}function ga(t,e){this._context=t,this._alpha=e}ga.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 i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,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:jn(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 rf=function t(e){function i(r){return e?new ga(r,e):new qn(r,0)}return i.alpha=function(r){return t(+r)},i}(.5);function ma(t,e){this._context=t,this._alpha=e}ma.prototype={areaStart:oe,areaEnd:oe,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 i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,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:jn(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 nf=function t(e){function i(r){return e?new ma(r,e):new zn(r,0)}return i.alpha=function(r){return t(+r)},i}(.5);function _a(t,e){this._context=t,this._alpha=e}_a.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 i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,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:jn(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 of=function t(e){function i(r){return e?new _a(r,e):new Wn(r,0)}return i.alpha=function(r){return t(+r)},i}(.5);function ya(t){this._context=t}ya.prototype={areaStart:oe,areaEnd:oe,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 sf(t){return new ya(t)}function Wo(t){return t<0?-1:1}function jo(t,e,i){var r=t._x1-t._x0,n=e-t._x1,s=(t._y1-t._y0)/(r||n<0&&-0),o=(i-t._y1)/(n||r<0&&-0),a=(s*n+o*r)/(r+n);return(Wo(s)+Wo(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function Ho(t,e){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function Vr(t,e,i){var r=t._x0,n=t._y0,s=t._x1,o=t._y1,a=(s-r)/3;t._context.bezierCurveTo(r+a,n+a*e,s-a,o-a*i,s,o)}function ar(t){this._context=t}ar.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:Vr(this,this._t0,Ho(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 i=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,Vr(this,Ho(this,i=jo(this,t,e)),i);break;default:Vr(this,this._t0,i=jo(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=i}}};function ba(t){this._context=new Ca(t)}(ba.prototype=Object.create(ar.prototype)).point=function(t,e){ar.prototype.point.call(this,e,t)};function Ca(t){this._context=t}Ca.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,i,r,n,s){this._context.bezierCurveTo(e,t,r,i,s,n)}};function af(t){return new ar(t)}function lf(t){return new ba(t)}function xa(t){this._context=t}xa.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,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),i===2)this._context.lineTo(t[1],e[1]);else for(var r=Yo(t),n=Yo(e),s=0,o=1;o<i;++s,++o)this._context.bezierCurveTo(r[0][s],n[0][s],r[1][s],n[1][s],t[o],e[o]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Yo(t){var e,i=t.length-1,r,n=new Array(i),s=new Array(i),o=new Array(i);for(n[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<i-1;++e)n[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(n[i-1]=2,s[i-1]=7,o[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=n[e]/s[e-1],s[e]-=r,o[e]-=r*o[e-1];for(n[i-1]=o[i-1]/s[i-1],e=i-2;e>=0;--e)n[e]=(o[e]-n[e+1])/s[e];for(s[i-1]=(t[i]+n[i-1])/2,e=0;e<i-1;++e)s[e]=2*t[e+1]-n[e+1];return[n,s]}function cf(t){return new xa(t)}function vr(t,e){this._context=t,this._t=e}vr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=t,this._y=e}};function hf(t){return new vr(t,.5)}function uf(t){return new vr(t,0)}function df(t){return new vr(t,1)}function Qe(t,e,i){this.k=t,this.x=e,this.y=i}Qe.prototype={constructor:Qe,scale:function(t){return t===1?this:new Qe(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Qe(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+")"}};Qe.prototype;/*! @license DOMPurify 3.0.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.3/LICENSE */const{entries:Ta,setPrototypeOf:Uo,isFrozen:ff,getPrototypeOf:pf,getOwnPropertyDescriptor:gf}=Object;let{freeze:ft,seal:Lt,create:mf}=Object,{apply:_n,construct:yn}=typeof Reflect<"u"&&Reflect;_n||(_n=function(e,i,r){return e.apply(i,r)});ft||(ft=function(e){return e});Lt||(Lt=function(e){return e});yn||(yn=function(e,i){return new e(...i)});const _f=St(Array.prototype.forEach),Go=St(Array.prototype.pop),Ge=St(Array.prototype.push),zi=St(String.prototype.toLowerCase),Xr=St(String.prototype.toString),yf=St(String.prototype.match),Bt=St(String.prototype.replace),bf=St(String.prototype.indexOf),Cf=St(String.prototype.trim),_t=St(RegExp.prototype.test),Ve=xf(TypeError);function St(t){return function(e){for(var i=arguments.length,r=new Array(i>1?i-1:0),n=1;n<i;n++)r[n-1]=arguments[n];return _n(t,e,r)}}function xf(t){return function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return yn(t,i)}}function Y(t,e,i){var r;i=(r=i)!==null&&r!==void 0?r:zi,Uo&&Uo(t,null);let n=e.length;for(;n--;){let s=e[n];if(typeof s=="string"){const o=i(s);o!==s&&(ff(e)||(e[n]=o),s=o)}t[s]=!0}return t}function Be(t){const e=mf(null);for(const[i,r]of Ta(t))e[i]=r;return e}function Fi(t,e){for(;t!==null;){const r=gf(t,e);if(r){if(r.get)return St(r.get);if(typeof r.value=="function")return St(r.value)}t=pf(t)}function i(r){return console.warn("fallback value for",r),null}return i}const Vo=ft(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Kr=ft(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Zr=ft(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Tf=ft(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Jr=ft(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Sf=ft(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Xo=ft(["#text"]),Ko=ft(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Qr=ft(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Zo=ft(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Oi=ft(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),kf=Lt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vf=Lt(/<%[\w\W]*|[\w\W]*%>/gm),wf=Lt(/\${[\w\W]*}/gm),Bf=Lt(/^data-[\-\w.\u00B7-\uFFFF]/),Ef=Lt(/^aria-[\-\w]+$/),Sa=Lt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Af=Lt(/^(?:\w+script|data):/i),Lf=Lt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ka=Lt(/^html$/i);var Jo=Object.freeze({__proto__:null,MUSTACHE_EXPR:kf,ERB_EXPR:vf,TMPLIT_EXPR:wf,DATA_ATTR:Bf,ARIA_ATTR:Ef,IS_ALLOWED_URI:Sa,IS_SCRIPT_OR_DATA:Af,ATTR_WHITESPACE:Lf,DOCTYPE_NAME:ka});const Ff=()=>typeof window>"u"?null:window,Of=function(e,i){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const n="data-tt-policy-suffix";i&&i.hasAttribute(n)&&(r=i.getAttribute(n));const s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function va(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ff();const e=O=>va(O);if(e.version="3.0.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;const i=t.document,r=i.currentScript;let{document:n}=t;const{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:d}=t,m=l.prototype,_=Fi(m,"cloneNode"),C=Fi(m,"nextSibling"),$=Fi(m,"childNodes"),y=Fi(m,"parentNode");if(typeof o=="function"){const O=n.createElement("template");O.content&&O.content.ownerDocument&&(n=O.content.ownerDocument)}let E,W="";const{implementation:x,createNodeIterator:j,createDocumentFragment:U,getElementsByTagName:vt}=n,{importNode:Ct}=i;let z={};e.isSupported=typeof Ta=="function"&&typeof y=="function"&&x&&x.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:R,ERB_EXPR:it,TMPLIT_EXPR:V,DATA_ATTR:v,ARIA_ATTR:k,IS_SCRIPT_OR_DATA:S,ATTR_WHITESPACE:L}=Jo;let{IS_ALLOWED_URI:w}=Jo,F=null;const q=Y({},[...Vo,...Kr,...Zr,...Jr,...Xo]);let P=null;const K=Y({},[...Ko,...Qr,...Zo,...Oi]);let H=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),J=null,st=null,zt=!0,wt=!0,Qt=!1,Ot=!0,Q=!1,at=!1,Wt=!1,te=!1,Te=!1,xi=!1,Ti=!1,ao=!0,lo=!1;const nc="user-content-";let Rr=!0,Ye=!1,Se={},ke=null;const co=Y({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ho=null;const uo=Y({},["audio","video","img","source","image","track"]);let Pr=null;const fo=Y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Si="http://www.w3.org/1998/Math/MathML",ki="http://www.w3.org/2000/svg",jt="http://www.w3.org/1999/xhtml";let ve=jt,qr=!1,zr=null;const oc=Y({},[Si,ki,jt],Xr);let le;const sc=["application/xhtml+xml","text/html"],ac="text/html";let nt,we=null;const lc=n.createElement("form"),po=function(f){return f instanceof RegExp||f instanceof Function},Wr=function(f){if(!(we&&we===f)){if((!f||typeof f!="object")&&(f={}),f=Be(f),le=sc.indexOf(f.PARSER_MEDIA_TYPE)===-1?le=ac:le=f.PARSER_MEDIA_TYPE,nt=le==="application/xhtml+xml"?Xr:zi,F="ALLOWED_TAGS"in f?Y({},f.ALLOWED_TAGS,nt):q,P="ALLOWED_ATTR"in f?Y({},f.ALLOWED_ATTR,nt):K,zr="ALLOWED_NAMESPACES"in f?Y({},f.ALLOWED_NAMESPACES,Xr):oc,Pr="ADD_URI_SAFE_ATTR"in f?Y(Be(fo),f.ADD_URI_SAFE_ATTR,nt):fo,ho="ADD_DATA_URI_TAGS"in f?Y(Be(uo),f.ADD_DATA_URI_TAGS,nt):uo,ke="FORBID_CONTENTS"in f?Y({},f.FORBID_CONTENTS,nt):co,J="FORBID_TAGS"in f?Y({},f.FORBID_TAGS,nt):{},st="FORBID_ATTR"in f?Y({},f.FORBID_ATTR,nt):{},Se="USE_PROFILES"in f?f.USE_PROFILES:!1,zt=f.ALLOW_ARIA_ATTR!==!1,wt=f.ALLOW_DATA_ATTR!==!1,Qt=f.ALLOW_UNKNOWN_PROTOCOLS||!1,Ot=f.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=f.SAFE_FOR_TEMPLATES||!1,at=f.WHOLE_DOCUMENT||!1,Te=f.RETURN_DOM||!1,xi=f.RETURN_DOM_FRAGMENT||!1,Ti=f.RETURN_TRUSTED_TYPE||!1,te=f.FORCE_BODY||!1,ao=f.SANITIZE_DOM!==!1,lo=f.SANITIZE_NAMED_PROPS||!1,Rr=f.KEEP_CONTENT!==!1,Ye=f.IN_PLACE||!1,w=f.ALLOWED_URI_REGEXP||Sa,ve=f.NAMESPACE||jt,H=f.CUSTOM_ELEMENT_HANDLING||{},f.CUSTOM_ELEMENT_HANDLING&&po(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=f.CUSTOM_ELEMENT_HANDLING.tagNameCheck),f.CUSTOM_ELEMENT_HANDLING&&po(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),f.CUSTOM_ELEMENT_HANDLING&&typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(wt=!1),xi&&(Te=!0),Se&&(F=Y({},[...Xo]),P=[],Se.html===!0&&(Y(F,Vo),Y(P,Ko)),Se.svg===!0&&(Y(F,Kr),Y(P,Qr),Y(P,Oi)),Se.svgFilters===!0&&(Y(F,Zr),Y(P,Qr),Y(P,Oi)),Se.mathMl===!0&&(Y(F,Jr),Y(P,Zo),Y(P,Oi))),f.ADD_TAGS&&(F===q&&(F=Be(F)),Y(F,f.ADD_TAGS,nt)),f.ADD_ATTR&&(P===K&&(P=Be(P)),Y(P,f.ADD_ATTR,nt)),f.ADD_URI_SAFE_ATTR&&Y(Pr,f.ADD_URI_SAFE_ATTR,nt),f.FORBID_CONTENTS&&(ke===co&&(ke=Be(ke)),Y(ke,f.FORBID_CONTENTS,nt)),Rr&&(F["#text"]=!0),at&&Y(F,["html","head","body"]),F.table&&(Y(F,["tbody"]),delete J.tbody),f.TRUSTED_TYPES_POLICY){if(typeof f.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof f.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=f.TRUSTED_TYPES_POLICY,W=E.createHTML("")}else E===void 0&&(E=Of(d,r)),E!==null&&typeof W=="string"&&(W=E.createHTML(""));ft&&ft(f),we=f}},go=Y({},["mi","mo","mn","ms","mtext"]),mo=Y({},["foreignobject","desc","title","annotation-xml"]),cc=Y({},["title","style","font","a","script"]),vi=Y({},Kr);Y(vi,Zr),Y(vi,Tf);const jr=Y({},Jr);Y(jr,Sf);const hc=function(f){let b=y(f);(!b||!b.tagName)&&(b={namespaceURI:ve,tagName:"template"});const B=zi(f.tagName),G=zi(b.tagName);return zr[f.namespaceURI]?f.namespaceURI===ki?b.namespaceURI===jt?B==="svg":b.namespaceURI===Si?B==="svg"&&(G==="annotation-xml"||go[G]):!!vi[B]:f.namespaceURI===Si?b.namespaceURI===jt?B==="math":b.namespaceURI===ki?B==="math"&&mo[G]:!!jr[B]:f.namespaceURI===jt?b.namespaceURI===ki&&!mo[G]||b.namespaceURI===Si&&!go[G]?!1:!jr[B]&&(cc[B]||!vi[B]):!!(le==="application/xhtml+xml"&&zr[f.namespaceURI]):!1},ce=function(f){Ge(e.removed,{element:f});try{f.parentNode.removeChild(f)}catch{f.remove()}},Hr=function(f,b){try{Ge(e.removed,{attribute:b.getAttributeNode(f),from:b})}catch{Ge(e.removed,{attribute:null,from:b})}if(b.removeAttribute(f),f==="is"&&!P[f])if(Te||xi)try{ce(b)}catch{}else try{b.setAttribute(f,"")}catch{}},_o=function(f){let b,B;if(te)f="<remove></remove>"+f;else{const xt=yf(f,/^[\r\n\t ]+/);B=xt&&xt[0]}le==="application/xhtml+xml"&&ve===jt&&(f='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+f+"</body></html>");const G=E?E.createHTML(f):f;if(ve===jt)try{b=new p().parseFromString(G,le)}catch{}if(!b||!b.documentElement){b=x.createDocument(ve,"template",null);try{b.documentElement.innerHTML=qr?W:G}catch{}}const ot=b.body||b.documentElement;return f&&B&&ot.insertBefore(n.createTextNode(B),ot.childNodes[0]||null),ve===jt?vt.call(b,at?"html":"body")[0]:at?b.documentElement:ot},yo=function(f){return j.call(f.ownerDocument||f,f,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},uc=function(f){return f instanceof u&&(typeof f.nodeName!="string"||typeof f.textContent!="string"||typeof f.removeChild!="function"||!(f.attributes instanceof h)||typeof f.removeAttribute!="function"||typeof f.setAttribute!="function"||typeof f.namespaceURI!="string"||typeof f.insertBefore!="function"||typeof f.hasChildNodes!="function")},wi=function(f){return typeof a=="object"?f instanceof a:f&&typeof f=="object"&&typeof f.nodeType=="number"&&typeof f.nodeName=="string"},Ht=function(f,b,B){z[f]&&_f(z[f],G=>{G.call(e,b,B,we)})},bo=function(f){let b;if(Ht("beforeSanitizeElements",f,null),uc(f))return ce(f),!0;const B=nt(f.nodeName);if(Ht("uponSanitizeElement",f,{tagName:B,allowedTags:F}),f.hasChildNodes()&&!wi(f.firstElementChild)&&(!wi(f.content)||!wi(f.content.firstElementChild))&&_t(/<[/\w]/g,f.innerHTML)&&_t(/<[/\w]/g,f.textContent))return ce(f),!0;if(!F[B]||J[B]){if(!J[B]&&xo(B)&&(H.tagNameCheck instanceof RegExp&&_t(H.tagNameCheck,B)||H.tagNameCheck instanceof Function&&H.tagNameCheck(B)))return!1;if(Rr&&!ke[B]){const G=y(f)||f.parentNode,ot=$(f)||f.childNodes;if(ot&&G){const xt=ot.length;for(let Z=xt-1;Z>=0;--Z)G.insertBefore(_(ot[Z],!0),C(f))}}return ce(f),!0}return f instanceof l&&!hc(f)||(B==="noscript"||B==="noembed")&&_t(/<\/no(script|embed)/i,f.innerHTML)?(ce(f),!0):(Q&&f.nodeType===3&&(b=f.textContent,b=Bt(b,R," "),b=Bt(b,it," "),b=Bt(b,V," "),f.textContent!==b&&(Ge(e.removed,{element:f.cloneNode()}),f.textContent=b)),Ht("afterSanitizeElements",f,null),!1)},Co=function(f,b,B){if(ao&&(b==="id"||b==="name")&&(B in n||B in lc))return!1;if(!(wt&&!st[b]&&_t(v,b))){if(!(zt&&_t(k,b))){if(!P[b]||st[b]){if(!(xo(f)&&(H.tagNameCheck instanceof RegExp&&_t(H.tagNameCheck,f)||H.tagNameCheck instanceof Function&&H.tagNameCheck(f))&&(H.attributeNameCheck instanceof RegExp&&_t(H.attributeNameCheck,b)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(b))||b==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&_t(H.tagNameCheck,B)||H.tagNameCheck instanceof Function&&H.tagNameCheck(B))))return!1}else if(!Pr[b]){if(!_t(w,Bt(B,L,""))){if(!((b==="src"||b==="xlink:href"||b==="href")&&f!=="script"&&bf(B,"data:")===0&&ho[f])){if(!(Qt&&!_t(S,Bt(B,L,"")))){if(B)return!1}}}}}}return!0},xo=function(f){return f.indexOf("-")>0},To=function(f){let b,B,G,ot;Ht("beforeSanitizeAttributes",f,null);const{attributes:xt}=f;if(!xt)return;const Z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:P};for(ot=xt.length;ot--;){b=xt[ot];const{name:It,namespaceURI:Yr}=b;if(B=It==="value"?b.value:Cf(b.value),G=nt(It),Z.attrName=G,Z.attrValue=B,Z.keepAttr=!0,Z.forceKeepAttr=void 0,Ht("uponSanitizeAttribute",f,Z),B=Z.attrValue,Z.forceKeepAttr||(Hr(It,f),!Z.keepAttr))continue;if(!Ot&&_t(/\/>/i,B)){Hr(It,f);continue}Q&&(B=Bt(B,R," "),B=Bt(B,it," "),B=Bt(B,V," "));const So=nt(f.nodeName);if(Co(So,G,B)){if(lo&&(G==="id"||G==="name")&&(Hr(It,f),B=nc+B),E&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Yr)switch(d.getAttributeType(So,G)){case"TrustedHTML":{B=E.createHTML(B);break}case"TrustedScriptURL":{B=E.createScriptURL(B);break}}try{Yr?f.setAttributeNS(Yr,It,B):f.setAttribute(It,B),Go(e.removed)}catch{}}}Ht("afterSanitizeAttributes",f,null)},dc=function O(f){let b;const B=yo(f);for(Ht("beforeSanitizeShadowDOM",f,null);b=B.nextNode();)Ht("uponSanitizeShadowNode",b,null),!bo(b)&&(b.content instanceof s&&O(b.content),To(b));Ht("afterSanitizeShadowDOM",f,null)};return e.sanitize=function(O){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b,B,G,ot;if(qr=!O,qr&&(O="<!-->"),typeof O!="string"&&!wi(O))if(typeof O.toString=="function"){if(O=O.toString(),typeof O!="string")throw Ve("dirty is not a string, aborting")}else throw Ve("toString is not a function");if(!e.isSupported)return O;if(Wt||Wr(f),e.removed=[],typeof O=="string"&&(Ye=!1),Ye){if(O.nodeName){const It=nt(O.nodeName);if(!F[It]||J[It])throw Ve("root node is forbidden and cannot be sanitized in-place")}}else if(O instanceof a)b=_o("<!---->"),B=b.ownerDocument.importNode(O,!0),B.nodeType===1&&B.nodeName==="BODY"||B.nodeName==="HTML"?b=B:b.appendChild(B);else{if(!Te&&!Q&&!at&&O.indexOf("<")===-1)return E&&Ti?E.createHTML(O):O;if(b=_o(O),!b)return Te?null:Ti?W:""}b&&te&&ce(b.firstChild);const xt=yo(Ye?O:b);for(;G=xt.nextNode();)bo(G)||(G.content instanceof s&&dc(G.content),To(G));if(Ye)return O;if(Te){if(xi)for(ot=U.call(b.ownerDocument);b.firstChild;)ot.appendChild(b.firstChild);else ot=b;return(P.shadowroot||P.shadowrootmod)&&(ot=Ct.call(i,ot,!0)),ot}let Z=at?b.outerHTML:b.innerHTML;return at&&F["!doctype"]&&b.ownerDocument&&b.ownerDocument.doctype&&b.ownerDocument.doctype.name&&_t(ka,b.ownerDocument.doctype.name)&&(Z="<!DOCTYPE "+b.ownerDocument.doctype.name+`>
`+Z),Q&&(Z=Bt(Z,R," "),Z=Bt(Z,it," "),Z=Bt(Z,V," ")),E&&Ti?E.createHTML(Z):Z},e.setConfig=function(O){Wr(O),Wt=!0},e.clearConfig=function(){we=null,Wt=!1},e.isValidAttribute=function(O,f,b){we||Wr({});const B=nt(O),G=nt(f);return Co(B,G,b)},e.addHook=function(O,f){typeof f=="function"&&(z[O]=z[O]||[],Ge(z[O],f))},e.removeHook=function(O){if(z[O])return Go(z[O])},e.removeHooks=function(O){z[O]&&(z[O]=[])},e.removeAllHooks=function(){z={}},e}var lr=va();const Wi={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+(e-t)*6*i:i<1/2?e:i<2/3?t+(e-t)*(2/3-i)*6:t),hsl2rgb:({h:t,s:e,l:i},r)=>{if(!e)return i*2.55;t/=360,e/=100,i/=100;const n=i<.5?i*(1+e):i+e-i*e,s=2*i-n;switch(r){case"r":return Wi.hue2rgb(s,n,t+1/3)*255;case"g":return Wi.hue2rgb(s,n,t)*255;case"b":return Wi.hue2rgb(s,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:i},r)=>{t/=255,e/=255,i/=255;const n=Math.max(t,e,i),s=Math.min(t,e,i),o=(n+s)/2;if(r==="l")return o*100;if(n===s)return 0;const a=n-s,l=o>.5?a/(2-n-s):a/(n+s);if(r==="s")return l*100;switch(n){case t:return((e-i)/a+(e<i?6:0))*60;case e:return((i-t)/a+2)*60;case i:return((t-e)/a+4)*60;default:return-1}}},If=Wi,Mf={clamp:(t,e,i)=>e>i?Math.min(e,Math.max(i,t)):Math.min(i,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},$f=Mf,Df={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Nf=Df,Rf={channel:If,lang:$f,unit:Nf},N=Rf,ee={};for(let t=0;t<=255;t++)ee[t]=N.unit.dec2hex(t);const lt={ALL:0,RGB:1,HSL:2};class Pf{constructor(){this.type=lt.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=lt.ALL}is(e){return this.type===e}}const qf=Pf;class zf{constructor(e,i){this.color=i,this.changed=!1,this.data=e,this.type=new qf}set(e,i){return this.color=i,this.changed=!1,this.data=e,this.type.type=lt.ALL,this}_ensureHSL(){const e=this.data,{h:i,s:r,l:n}=e;i===void 0&&(e.h=N.channel.rgb2hsl(e,"h")),r===void 0&&(e.s=N.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=N.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:i,g:r,b:n}=e;i===void 0&&(e.r=N.channel.hsl2rgb(e,"r")),r===void 0&&(e.g=N.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=N.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,i=e.r;return!this.type.is(lt.HSL)&&i!==void 0?i:(this._ensureHSL(),N.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,i=e.g;return!this.type.is(lt.HSL)&&i!==void 0?i:(this._ensureHSL(),N.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,i=e.b;return!this.type.is(lt.HSL)&&i!==void 0?i:(this._ensureHSL(),N.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,i=e.h;return!this.type.is(lt.RGB)&&i!==void 0?i:(this._ensureRGB(),N.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,i=e.s;return!this.type.is(lt.RGB)&&i!==void 0?i:(this._ensureRGB(),N.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,i=e.l;return!this.type.is(lt.RGB)&&i!==void 0?i:(this._ensureRGB(),N.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(lt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(lt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(lt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(lt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(lt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(lt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const Wf=zf,jf=new Wf({r:0,g:0,b:0,a:0},"transparent"),wr=jf,wa={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(wa.re);if(!e)return;const i=e[1],r=parseInt(i,16),n=i.length,s=n%4===0,o=n>4,a=o?1:17,l=o?8:4,c=s?0:-1,h=o?255:15;return wr.set({r:(r>>l*(c+3)&h)*a,g:(r>>l*(c+2)&h)*a,b:(r>>l*(c+1)&h)*a,a:s?(r&h)*a/255:1},t)},stringify:t=>{const{r:e,g:i,b:r,a:n}=t;return n<1?`#${ee[Math.round(e)]}${ee[Math.round(i)]}${ee[Math.round(r)]}${ee[Math.round(n*255)]}`:`#${ee[Math.round(e)]}${ee[Math.round(i)]}${ee[Math.round(r)]}`}},ei=wa,ji={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(ji.hueRe);if(e){const[,i,r]=e;switch(r){case"grad":return N.channel.clamp.h(parseFloat(i)*.9);case"rad":return N.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return N.channel.clamp.h(parseFloat(i)*360)}}return N.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const i=t.match(ji.re);if(!i)return;const[,r,n,s,o,a]=i;return wr.set({h:ji._hue2deg(r),s:N.channel.clamp.s(parseFloat(n)),l:N.channel.clamp.l(parseFloat(s)),a:o?N.channel.clamp.a(a?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:i,l:r,a:n}=t;return n<1?`hsla(${N.lang.round(e)}, ${N.lang.round(i)}%, ${N.lang.round(r)}%, ${n})`:`hsl(${N.lang.round(e)}, ${N.lang.round(i)}%, ${N.lang.round(r)}%)`}},Ii=ji,Hi={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=Hi.colors[t];if(e)return ei.parse(e)},stringify:t=>{const e=ei.stringify(t);for(const i in Hi.colors)if(Hi.colors[i]===e)return i}},Qo=Hi,Ba={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 i=t.match(Ba.re);if(!i)return;const[,r,n,s,o,a,l,c,h]=i;return wr.set({r:N.channel.clamp.r(n?parseFloat(r)*2.55:parseFloat(r)),g:N.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:N.channel.clamp.b(l?parseFloat(a)*2.55:parseFloat(a)),a:c?N.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:i,b:r,a:n}=t;return n<1?`rgba(${N.lang.round(e)}, ${N.lang.round(i)}, ${N.lang.round(r)}, ${N.lang.round(n)})`:`rgb(${N.lang.round(e)}, ${N.lang.round(i)}, ${N.lang.round(r)})`}},Mi=Ba,Hf={format:{keyword:Qo,hex:ei,rgb:Mi,rgba:Mi,hsl:Ii,hsla:Ii},parse:t=>{if(typeof t!="string")return t;const e=ei.parse(t)||Mi.parse(t)||Ii.parse(t)||Qo.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(lt.HSL)||t.data.r===void 0?Ii.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Mi.stringify(t):ei.stringify(t)},Rt=Hf,Yf=(t,e)=>{const i=Rt.parse(t);for(const r in e)i[r]=N.channel.clamp[r](e[r]);return Rt.stringify(i)},Ea=Yf,Uf=(t,e,i=0,r=1)=>{if(typeof t!="number")return Ea(t,{a:e});const n=wr.set({r:N.channel.clamp.r(t),g:N.channel.clamp.g(e),b:N.channel.clamp.b(i),a:N.channel.clamp.a(r)});return Rt.stringify(n)},ii=Uf,Gf=t=>{const{r:e,g:i,b:r}=Rt.parse(t),n=.2126*N.channel.toLinear(e)+.7152*N.channel.toLinear(i)+.0722*N.channel.toLinear(r);return N.lang.round(n)},Vf=Gf,Xf=t=>Vf(t)>=.5,Kf=Xf,Zf=t=>!Kf(t),yi=Zf,Jf=(t,e,i)=>{const r=Rt.parse(t),n=r[e],s=N.channel.clamp[e](n+i);return n!==s&&(r[e]=s),Rt.stringify(r)},Aa=Jf,Qf=(t,e)=>Aa(t,"l",e),I=Qf,tp=(t,e)=>Aa(t,"l",-e),D=tp,ep=(t,e)=>{const i=Rt.parse(t),r={};for(const n in e)e[n]&&(r[n]=i[n]+e[n]);return Ea(t,r)},g=ep,ip=(t,e,i=50)=>{const{r,g:n,b:s,a:o}=Rt.parse(t),{r:a,g:l,b:c,a:h}=Rt.parse(e),u=i/100,p=u*2-1,d=o-h,_=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,C=1-_,$=r*_+a*C,y=n*_+l*C,E=s*_+c*C,W=o*u+h*(1-u);return ii($,y,E,W)},rp=ip,np=(t,e=100)=>{const i=Rt.parse(t);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,rp(i,t,e)},T=np;var op=typeof global=="object"&&global&&global.Object===Object&&global;const La=op;var sp=typeof self=="object"&&self&&self.Object===Object&&self,ap=La||sp||Function("return this")();const ae=ap;var lp=ae.Symbol;const cr=lp;var Fa=Object.prototype,cp=Fa.hasOwnProperty,hp=Fa.toString,Xe=cr?cr.toStringTag:void 0;function up(t){var e=cp.call(t,Xe),i=t[Xe];try{t[Xe]=void 0;var r=!0}catch{}var n=hp.call(t);return r&&(e?t[Xe]=i:delete t[Xe]),n}var dp=Object.prototype,fp=dp.toString;function pp(t){return fp.call(t)}var gp="[object Null]",mp="[object Undefined]",ts=cr?cr.toStringTag:void 0;function bi(t){return t==null?t===void 0?mp:gp:ts&&ts in Object(t)?up(t):pp(t)}function Oa(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var _p="[object AsyncFunction]",yp="[object Function]",bp="[object GeneratorFunction]",Cp="[object Proxy]";function Ia(t){if(!Oa(t))return!1;var e=bi(t);return e==yp||e==bp||e==_p||e==Cp}var xp=ae["__core-js_shared__"];const tn=xp;var es=function(){var t=/[^.]+$/.exec(tn&&tn.keys&&tn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Tp(t){return!!es&&es in t}var Sp=Function.prototype,kp=Sp.toString;function Ce(t){if(t!=null){try{return kp.call(t)}catch{}try{return t+""}catch{}}return""}var vp=/[\\^$.*+?()[\]{}|]/g,wp=/^\[object .+?Constructor\]$/,Bp=Function.prototype,Ep=Object.prototype,Ap=Bp.toString,Lp=Ep.hasOwnProperty,Fp=RegExp("^"+Ap.call(Lp).replace(vp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Op(t){if(!Oa(t)||Tp(t))return!1;var e=Ia(t)?Fp:wp;return e.test(Ce(t))}function Ip(t,e){return t==null?void 0:t[e]}function ze(t,e){var i=Ip(t,e);return Op(i)?i:void 0}var Mp=ze(Object,"create");const ci=Mp;function $p(){this.__data__=ci?ci(null):{},this.size=0}function Dp(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Np="__lodash_hash_undefined__",Rp=Object.prototype,Pp=Rp.hasOwnProperty;function qp(t){var e=this.__data__;if(ci){var i=e[t];return i===Np?void 0:i}return Pp.call(e,t)?e[t]:void 0}var zp=Object.prototype,Wp=zp.hasOwnProperty;function jp(t){var e=this.__data__;return ci?e[t]!==void 0:Wp.call(e,t)}var Hp="__lodash_hash_undefined__";function Yp(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=ci&&e===void 0?Hp:e,this}function ye(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}ye.prototype.clear=$p;ye.prototype.delete=Dp;ye.prototype.get=qp;ye.prototype.has=jp;ye.prototype.set=Yp;function Up(){this.__data__=[],this.size=0}function Gp(t,e){return t===e||t!==t&&e!==e}function Br(t,e){for(var i=t.length;i--;)if(Gp(t[i][0],e))return i;return-1}var Vp=Array.prototype,Xp=Vp.splice;function Kp(t){var e=this.__data__,i=Br(e,t);if(i<0)return!1;var r=e.length-1;return i==r?e.pop():Xp.call(e,i,1),--this.size,!0}function Zp(t){var e=this.__data__,i=Br(e,t);return i<0?void 0:e[i][1]}function Jp(t){return Br(this.__data__,t)>-1}function Qp(t,e){var i=this.__data__,r=Br(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this}function We(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}We.prototype.clear=Up;We.prototype.delete=Kp;We.prototype.get=Zp;We.prototype.has=Jp;We.prototype.set=Qp;var tg=ze(ae,"Map");const hr=tg;function eg(){this.size=0,this.__data__={hash:new ye,map:new(hr||We),string:new ye}}function ig(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Er(t,e){var i=t.__data__;return ig(e)?i[typeof e=="string"?"string":"hash"]:i.map}function rg(t){var e=Er(this,t).delete(t);return this.size-=e?1:0,e}function ng(t){return Er(this,t).get(t)}function og(t){return Er(this,t).has(t)}function sg(t,e){var i=Er(this,t),r=i.size;return i.set(t,e),this.size+=i.size==r?0:1,this}function xe(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}xe.prototype.clear=eg;xe.prototype.delete=rg;xe.prototype.get=ng;xe.prototype.has=og;xe.prototype.set=sg;var ag="Expected a function";function Ci(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(ag);var i=function(){var r=arguments,n=e?e.apply(this,r):r[0],s=i.cache;if(s.has(n))return s.get(n);var o=t.apply(this,r);return i.cache=s.set(n,o)||s,o};return i.cache=new(Ci.Cache||xe),i}Ci.Cache=xe;var Ma="comm",$a="rule",Da="decl",lg="@import",cg="@keyframes",hg="@layer",ug=Math.abs,Hn=String.fromCharCode;function Na(t){return t.trim()}function Yi(t,e,i){return t.replace(e,i)}function dg(t,e){return t.indexOf(e)}function hi(t,e){return t.charCodeAt(e)|0}function ui(t,e,i){return t.slice(e,i)}function Gt(t){return t.length}function fg(t){return t.length}function $i(t,e){return e.push(t),t}var Ar=1,De=1,Ra=0,kt=0,tt=0,je="";function Yn(t,e,i,r,n,s,o,a){return{value:t,root:e,parent:i,type:r,props:n,children:s,line:Ar,column:De,length:o,return:"",siblings:a}}function pg(){return tt}function gg(){return tt=kt>0?hi(je,--kt):0,De--,tt===10&&(De=1,Ar--),tt}function At(){return tt=kt<Ra?hi(je,kt++):0,De++,tt===10&&(De=1,Ar++),tt}function ge(){return hi(je,kt)}function Ui(){return kt}function Lr(t,e){return ui(je,t,e)}function bn(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function mg(t){return Ar=De=1,Ra=Gt(je=t),kt=0,[]}function _g(t){return je="",t}function en(t){return Na(Lr(kt-1,Cn(t===91?t+2:t===40?t+1:t)))}function yg(t){for(;(tt=ge())&&tt<33;)At();return bn(t)>2||bn(tt)>3?"":" "}function bg(t,e){for(;--e&&At()&&!(tt<48||tt>102||tt>57&&tt<65||tt>70&&tt<97););return Lr(t,Ui()+(e<6&&ge()==32&&At()==32))}function Cn(t){for(;At();)switch(tt){case t:return kt;case 34:case 39:t!==34&&t!==39&&Cn(tt);break;case 40:t===41&&Cn(t);break;case 92:At();break}return kt}function Cg(t,e){for(;At()&&t+tt!==57;)if(t+tt===84&&ge()===47)break;return"/*"+Lr(e,kt-1)+"*"+Hn(t===47?t:At())}function xg(t){for(;!bn(ge());)At();return Lr(t,kt)}function Tg(t){return _g(Gi("",null,null,null,[""],t=mg(t),0,[0],t))}function Gi(t,e,i,r,n,s,o,a,l){for(var c=0,h=0,u=o,p=0,d=0,m=0,_=1,C=1,$=1,y=0,E="",W=n,x=s,j=r,U=E;C;)switch(m=y,y=At()){case 40:if(m!=108&&hi(U,u-1)==58){dg(U+=Yi(en(y),"&","&\f"),"&\f")!=-1&&($=-1);break}case 34:case 39:case 91:U+=en(y);break;case 9:case 10:case 13:case 32:U+=yg(m);break;case 92:U+=bg(Ui()-1,7);continue;case 47:switch(ge()){case 42:case 47:$i(Sg(Cg(At(),Ui()),e,i,l),l);break;default:U+="/"}break;case 123*_:a[c++]=Gt(U)*$;case 125*_:case 59:case 0:switch(y){case 0:case 125:C=0;case 59+h:$==-1&&(U=Yi(U,/\f/g,"")),d>0&&Gt(U)-u&&$i(d>32?rs(U+";",r,i,u-1,l):rs(Yi(U," ","")+";",r,i,u-2,l),l);break;case 59:U+=";";default:if($i(j=is(U,e,i,c,h,n,a,E,W=[],x=[],u,s),s),y===123)if(h===0)Gi(U,e,j,j,W,s,u,a,x);else switch(p===99&&hi(U,3)===110?100:p){case 100:case 108:case 109:case 115:Gi(t,j,j,r&&$i(is(t,j,j,0,0,n,a,E,n,W=[],u,x),x),n,x,u,a,r?W:x);break;default:Gi(U,j,j,j,[""],x,0,a,x)}}c=h=d=0,_=$=1,E=U="",u=o;break;case 58:u=1+Gt(U),d=m;default:if(_<1){if(y==123)--_;else if(y==125&&_++==0&&gg()==125)continue}switch(U+=Hn(y),y*_){case 38:$=h>0?1:(U+="\f",-1);break;case 44:a[c++]=(Gt(U)-1)*$,$=1;break;case 64:ge()===45&&(U+=en(At())),p=ge(),h=u=Gt(E=U+=xg(Ui())),y++;break;case 45:m===45&&Gt(U)==2&&(_=0)}}return s}function is(t,e,i,r,n,s,o,a,l,c,h,u){for(var p=n-1,d=n===0?s:[""],m=fg(d),_=0,C=0,$=0;_<r;++_)for(var y=0,E=ui(t,p+1,p=ug(C=o[_])),W=t;y<m;++y)(W=Na(C>0?d[y]+" "+E:Yi(E,/&\f/g,d[y])))&&(l[$++]=W);return Yn(t,e,i,n===0?$a:a,l,c,h,u)}function Sg(t,e,i,r){return Yn(t,e,i,Ma,Hn(pg()),ui(t,2,-2),0,r)}function rs(t,e,i,r,n){return Yn(t,e,i,Da,ui(t,0,r),ui(t,r+1,-1),r,n)}function xn(t,e){for(var i="",r=0;r<t.length;r++)i+=e(t[r],r,t,e)||"";return i}function kg(t,e,i,r){switch(t.type){case hg:if(t.children.length)break;case lg:case Da:return t.return=t.return||t.value;case Ma:return"";case cg:return t.return=t.value+"{"+xn(t.children,r)+"}";case $a:if(!Gt(t.value=t.props.join(",")))return""}return Gt(i=xn(t.children,r))?t.return=t.value+"{"+i+"}":""}var vg=Object.prototype;function Pa(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||vg;return t===i}function wg(t,e){return function(i){return t(e(i))}}var Bg=wg(Object.keys,Object);const Eg=Bg;var Ag=Object.prototype,Lg=Ag.hasOwnProperty;function Fg(t){if(!Pa(t))return Eg(t);var e=[];for(var i in Object(t))Lg.call(t,i)&&i!="constructor"&&e.push(i);return e}var Og=ze(ae,"DataView");const Tn=Og;var Ig=ze(ae,"Promise");const Sn=Ig;var Mg=ze(ae,"Set");const kn=Mg;var $g=ze(ae,"WeakMap");const vn=$g;var ns="[object Map]",Dg="[object Object]",os="[object Promise]",ss="[object Set]",as="[object WeakMap]",ls="[object DataView]",Ng=Ce(Tn),Rg=Ce(hr),Pg=Ce(Sn),qg=Ce(kn),zg=Ce(vn),ue=bi;(Tn&&ue(new Tn(new ArrayBuffer(1)))!=ls||hr&&ue(new hr)!=ns||Sn&&ue(Sn.resolve())!=os||kn&&ue(new kn)!=ss||vn&&ue(new vn)!=as)&&(ue=function(t){var e=bi(t),i=e==Dg?t.constructor:void 0,r=i?Ce(i):"";if(r)switch(r){case Ng:return ls;case Rg:return ns;case Pg:return os;case qg:return ss;case zg:return as}return e});const Wg=ue;function Un(t){return t!=null&&typeof t=="object"}var jg="[object Arguments]";function cs(t){return Un(t)&&bi(t)==jg}var qa=Object.prototype,Hg=qa.hasOwnProperty,Yg=qa.propertyIsEnumerable,Ug=cs(function(){return arguments}())?cs:function(t){return Un(t)&&Hg.call(t,"callee")&&!Yg.call(t,"callee")};const Gg=Ug;var Vg=Array.isArray;const Xg=Vg;var Kg=9007199254740991;function za(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Kg}function Zg(t){return t!=null&&za(t.length)&&!Ia(t)}function Jg(){return!1}var Wa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hs=Wa&&typeof module=="object"&&module&&!module.nodeType&&module,Qg=hs&&hs.exports===Wa,us=Qg?ae.Buffer:void 0,tm=us?us.isBuffer:void 0,em=tm||Jg;const im=em;var rm="[object Arguments]",nm="[object Array]",om="[object Boolean]",sm="[object Date]",am="[object Error]",lm="[object Function]",cm="[object Map]",hm="[object Number]",um="[object Object]",dm="[object RegExp]",fm="[object Set]",pm="[object String]",gm="[object WeakMap]",mm="[object ArrayBuffer]",_m="[object DataView]",ym="[object Float32Array]",bm="[object Float64Array]",Cm="[object Int8Array]",xm="[object Int16Array]",Tm="[object Int32Array]",Sm="[object Uint8Array]",km="[object Uint8ClampedArray]",vm="[object Uint16Array]",wm="[object Uint32Array]",X={};X[ym]=X[bm]=X[Cm]=X[xm]=X[Tm]=X[Sm]=X[km]=X[vm]=X[wm]=!0;X[rm]=X[nm]=X[mm]=X[om]=X[_m]=X[sm]=X[am]=X[lm]=X[cm]=X[hm]=X[um]=X[dm]=X[fm]=X[pm]=X[gm]=!1;function Bm(t){return Un(t)&&za(t.length)&&!!X[bi(t)]}function Em(t){return function(e){return t(e)}}var ja=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ri=ja&&typeof module=="object"&&module&&!module.nodeType&&module,Am=ri&&ri.exports===ja,rn=Am&&La.process,Lm=function(){try{var t=ri&&ri.require&&ri.require("util").types;return t||rn&&rn.binding&&rn.binding("util")}catch{}}();const ds=Lm;var fs=ds&&ds.isTypedArray,Fm=fs?Em(fs):Bm;const Om=Fm;var Im="[object Map]",Mm="[object Set]",$m=Object.prototype,Dm=$m.hasOwnProperty;function Vi(t){if(t==null)return!0;if(Zg(t)&&(Xg(t)||typeof t=="string"||typeof t.splice=="function"||im(t)||Om(t)||Gg(t)))return!t.length;var e=Wg(t);if(e==Im||e==Mm)return!t.size;if(Pa(t))return!Fg(t).length;for(var i in t)if(Dm.call(t,i))return!1;return!0}const Ut={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},A={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},Gn=function(t="fatal"){let e=Ut.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Ut&&(e=Ut[t])):typeof t=="number"&&(e=t),A.trace=()=>{},A.debug=()=>{},A.info=()=>{},A.warn=()=>{},A.error=()=>{},A.fatal=()=>{},e<=Ut.fatal&&(A.fatal=console.error?console.error.bind(console,Tt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Tt("FATAL"))),e<=Ut.error&&(A.error=console.error?console.error.bind(console,Tt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Tt("ERROR"))),e<=Ut.warn&&(A.warn=console.warn?console.warn.bind(console,Tt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Tt("WARN"))),e<=Ut.info&&(A.info=console.info?console.info.bind(console,Tt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Tt("INFO"))),e<=Ut.debug&&(A.debug=console.debug?console.debug.bind(console,Tt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Tt("DEBUG"))),e<=Ut.trace&&(A.trace=console.debug?console.debug.bind(console,Tt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Tt("TRACE")))},Tt=t=>`%c${Fc().format("ss.SSS")} : ${t} : `,Fr=/<br\s*\/?>/gi,Nm=t=>t?Ya(t).replace(/\\n/g,"#br#").split("#br#"):[""],Ha=t=>lr.sanitize(t),ps=(t,e)=>{var i;if(((i=e.flowchart)==null?void 0:i.htmlLabels)!==!1){const r=e.securityLevel;r==="antiscript"||r==="strict"?t=Ha(t):r!=="loose"&&(t=Ya(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=zm(t))}return t},di=(t,e)=>t&&(e.dompurifyConfig?t=lr.sanitize(ps(t,e),e.dompurifyConfig).toString():t=lr.sanitize(ps(t,e),{FORBID_TAGS:["style"]}).toString(),t),Rm=(t,e)=>typeof t=="string"?di(t,e):t.flat().map(i=>di(i,e)),Pm=t=>Fr.test(t),qm=t=>t.split(Fr),zm=t=>t.replace(/#br#/g,"<br/>"),Ya=t=>t.replace(Fr,"#br#"),Wm=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},Ua=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),jm=function(...t){const e=t.filter(i=>!isNaN(i));return Math.max(...e)},Hm=function(...t){const e=t.filter(i=>!isNaN(i));return Math.min(...e)},Ym=function(t){let e=t;if(t.split("~").length-1>=2){let i=e;do e=i,i=e.replace(/~([^\s,:;]+)~/,"<$1>");while(i!=e);return Ym(i)}else return e},Vn={getRows:Nm,sanitizeText:di,sanitizeTextOrArray:Rm,hasBreaks:Pm,splitBreaks:qm,lineBreakRegex:Fr,removeScript:Ha,getUrl:Wm,evaluate:Ua,getMax:jm,getMin:Hm},dt=(t,e)=>e?g(t,{s:-40,l:10}):g(t,{s:-40,l:-10}),Or="#ffffff",Ir="#f2f2f2";let Um=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||g(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||g(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||T(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||T(this.tertiaryColor),this.lineColor=this.lineColor||T(this.background),this.arrowheadColor=this.arrowheadColor||T(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?D(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||"grey",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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||T(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||I(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||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||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=D(this["cScale"+i],75);else for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=D(this["cScale"+i],25);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||T(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||I(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||D(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=this["cScaleLabel"+i]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||g(this.mainBkg,{h:180,s:-15,l:e*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||g(this.mainBkg,{h:180,s:-15,l:e*(8+i*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||g(this.primaryColor,{h:64}),this.fillType3=this.fillType3||g(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||g(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||g(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||g(this.primaryColor,{h:128}),this.fillType7=this.fillType7||g(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||g(this.primaryColor,{l:-10}),this.pie5=this.pie5||g(this.secondaryColor,{l:-10}),this.pie6=this.pie6||g(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||g(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||g(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||g(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||g(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||g(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||g(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yi(this.quadrant1Fill)?I(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||g(this.primaryColor,{h:-30}),this.git4=this.git4||g(this.primaryColor,{h:-60}),this.git5=this.git5||g(this.primaryColor,{h:-90}),this.git6=this.git6||g(this.primaryColor,{h:60}),this.git7=this.git7||g(this.primaryColor,{h:120}),this.darkMode?(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ir}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const Gm=t=>{const e=new Um;return e.calculate(t),e};let Vm=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=I(this.primaryColor,16),this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=T(this.background),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.tertiaryColor),this.lineColor=T(this.background),this.textColor=T(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=I(T("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=ii(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=D("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=D(this.sectionBkgColor,10),this.taskBorderColor=ii(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ii(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=I(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=I(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,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=I(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.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=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(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||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||T(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||g(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||g(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yi(this.quadrant1Fill)?I(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=I(this.secondaryColor,20),this.git1=I(this.pie2||this.secondaryColor,20),this.git2=I(this.pie3||this.tertiaryColor,20),this.git3=I(this.pie4||g(this.primaryColor,{h:-30}),20),this.git4=I(this.pie5||g(this.primaryColor,{h:-60}),20),this.git5=I(this.pie6||g(this.primaryColor,{h:-90}),10),this.git6=I(this.pie7||g(this.primaryColor,{h:60}),10),this.git7=I(this.pie8||g(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||T(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||T(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||I(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||I(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const Xm=t=>{const e=new Vm;return e.calculate(t),e};let Km=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=g(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.tertiaryColor),this.lineColor=T(this.background),this.textColor=T(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="#e8e8e8",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="grey",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.sectionBkgColor=ii(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,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||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=D(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||D(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||g(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||g(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||g(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||T(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||T(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=I(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||g(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||g(this.primaryColor,{l:-10}),this.pie5=this.pie5||g(this.secondaryColor,{l:-30}),this.pie6=this.pie6||g(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||g(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||g(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||g(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||g(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||g(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||g(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yi(this.quadrant1Fill)?I(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||g(this.primaryColor,{h:-30}),this.git4=this.git4||g(this.primaryColor,{h:-60}),this.git5=this.git5||g(this.primaryColor,{h:-90}),this.git6=this.git6||g(this.primaryColor,{h:60}),this.git7=this.git7||g(this.primaryColor,{h:120}),this.darkMode?(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||D(T(this.git0),25),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||T(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||T(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ir}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const Zm=t=>{const e=new Km;return e.calculate(t),e};let Jm=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=I("#cde498",10),this.primaryBorderColor=dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.primaryColor),this.lineColor=T(this.background),this.textColor=T(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="grey",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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=D(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.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=D(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||D(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||g(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||g(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||g(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||g(this.primaryColor,{l:-30}),this.pie5=this.pie5||g(this.secondaryColor,{l:-30}),this.pie6=this.pie6||g(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||g(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||g(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||g(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||g(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||g(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||g(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yi(this.quadrant1Fill)?I(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||g(this.primaryColor,{h:-30}),this.git4=this.git4||g(this.primaryColor,{h:-60}),this.git5=this.git5||g(this.primaryColor,{h:-90}),this.git6=this.git6||g(this.primaryColor,{h:60}),this.git7=this.git7||g(this.primaryColor,{h:120}),this.darkMode?(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||T(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||T(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ir}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const Qm=t=>{const e=new Jm;return e.calculate(t),e};class t0{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=I(this.contrast,55),this.background="#ffffff",this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.tertiaryColor),this.lineColor=T(this.background),this.textColor=T(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="calculated",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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=I(this.contrast,55),this.border2=this.contrast,this.actorBorder=I(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||T(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||D(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||g(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||g(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=I(this.contrast,30),this.sectionBkgColor2=I(this.contrast,30),this.taskBorderColor=D(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=I(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=D(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yi(this.quadrant1Fill)?I(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=D(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||g(this.primaryColor,{h:-30}),this.git4=this.pie5||g(this.primaryColor,{h:-60}),this.git5=this.pie6||g(this.primaryColor,{h:-90}),this.git6=this.pie7||g(this.primaryColor,{h:60}),this.git7=this.pie8||g(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ir}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}}const e0=t=>{const e=new t0;return e.calculate(t),e},Kt={base:{getThemeVariables:Gm},dark:{getThemeVariables:Xm},default:{getThemeVariables:Zm},forest:{getThemeVariables:Qm},neutral:{getThemeVariables:e0}},re={theme:"default",themeVariables:Kt.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{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,useMaxWidth:!0,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,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,displayMode:"",axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,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"]},timeline:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,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},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{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,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0,textPosition:.75},quadrantChart:{chartWidth:500,chartHeight:500,titlePadding:10,titleFontSize:20,quadrantPadding:5,quadrantTextTopPadding:5,quadrantLabelFontSize:16,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2,xAxisLabelPadding:5,xAxisLabelFontSize:16,xAxisPosition:"top",yAxisLabelPadding:5,yAxisLabelFontSize:16,yAxisPosition:"left",pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,useMaxWidth:!0},requirement:{useWidth:void 0,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},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,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,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},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"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};re.class&&(re.class.arrowMarkerAbsolute=re.arrowMarkerAbsolute);re.gitGraph&&(re.gitGraph.arrowMarkerAbsolute=re.arrowMarkerAbsolute);const Ga=(t,e="")=>Object.keys(t).reduce((i,r)=>Array.isArray(t[r])?i:typeof t[r]=="object"&&t[r]!==null?[...i,e+r,...Ga(t[r],"")]:[...i,e+r],[]),i0=Ga(re,""),r0=re;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Va(t){return typeof t>"u"||t===null}function n0(t){return typeof t=="object"&&t!==null}function o0(t){return Array.isArray(t)?t:Va(t)?[]:[t]}function s0(t,e){var i,r,n,s;if(e)for(s=Object.keys(e),i=0,r=s.length;i<r;i+=1)n=s[i],t[n]=e[n];return t}function a0(t,e){var i="",r;for(r=0;r<e;r+=1)i+=t;return i}function l0(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var c0=Va,h0=n0,u0=o0,d0=a0,f0=l0,p0=s0,ut={isNothing:c0,isObject:h0,toArray:u0,repeat:d0,isNegativeZero:f0,extend:p0};function Xa(t,e){var i="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(i+=`
`+t.mark.snippet),r+" "+i):r}function fi(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Xa(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}fi.prototype=Object.create(Error.prototype);fi.prototype.constructor=fi;fi.prototype.toString=function(e){return this.name+": "+Xa(this,e)};var Vt=fi;function nn(t,e,i,r,n){var s="",o="",a=Math.floor(n/2)-1;return r-e>a&&(s=" ... ",e=r-a+s.length),i-r>a&&(o=" ...",i=r+a-o.length),{str:s+t.slice(e,i).replace(/\t/g,"→")+o,pos:r-e+s.length}}function on(t,e){return ut.repeat(" ",e-t.length)+t}function g0(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 i=/\r?\n|\r|\0/g,r=[0],n=[],s,o=-1;s=i.exec(t.buffer);)n.push(s.index),r.push(s.index+s[0].length),t.position<=s.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var a="",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=nn(t.buffer,r[o-l],n[o-l],t.position-(r[o]-r[o-l]),u),a=ut.repeat(" ",e.indent)+on((t.line-l+1).toString(),h)+" | "+c.str+`
`+a;for(c=nn(t.buffer,r[o],n[o],t.position,u),a+=ut.repeat(" ",e.indent)+on((t.line+1).toString(),h)+" | "+c.str+`
`,a+=ut.repeat("-",e.indent+h+3+c.pos)+`^
`,l=1;l<=e.linesAfter&&!(o+l>=n.length);l++)c=nn(t.buffer,r[o+l],n[o+l],t.position-(r[o]-r[o+l]),u),a+=ut.repeat(" ",e.indent)+on((t.line+l+1).toString(),h)+" | "+c.str+`
`;return a.replace(/\n$/,"")}var m0=g0,_0=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],y0=["scalar","sequence","mapping"];function b0(t){var e={};return t!==null&&Object.keys(t).forEach(function(i){t[i].forEach(function(r){e[String(r)]=i})}),e}function C0(t,e){if(e=e||{},Object.keys(e).forEach(function(i){if(_0.indexOf(i)===-1)throw new Vt('Unknown option "'+i+'" 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(i){return i},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=b0(e.styleAliases||null),y0.indexOf(this.kind)===-1)throw new Vt('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var ht=C0;function gs(t,e){var i=[];return t[e].forEach(function(r){var n=i.length;i.forEach(function(s,o){s.tag===r.tag&&s.kind===r.kind&&s.multi===r.multi&&(n=o)}),i[n]=r}),i}function x0(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,i;function r(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(e=0,i=arguments.length;e<i;e+=1)arguments[e].forEach(r);return t}function wn(t){return this.extend(t)}wn.prototype.extend=function(e){var i=[],r=[];if(e instanceof ht)r.push(e);else if(Array.isArray(e))r=r.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(i=i.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit));else throw new Vt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(s){if(!(s instanceof ht))throw new Vt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Vt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Vt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(s){if(!(s instanceof ht))throw new Vt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(wn.prototype);return n.implicit=(this.implicit||[]).concat(i),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=gs(n,"implicit"),n.compiledExplicit=gs(n,"explicit"),n.compiledTypeMap=x0(n.compiledImplicit,n.compiledExplicit),n};var T0=wn,S0=new ht("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),k0=new ht("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),v0=new ht("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Ka=new T0({explicit:[S0,k0,v0]});function w0(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function B0(){return null}function E0(t){return t===null}var A0=new ht("tag:yaml.org,2002:null",{kind:"scalar",resolve:w0,construct:B0,predicate:E0,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function L0(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function F0(t){return t==="true"||t==="True"||t==="TRUE"}function O0(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var I0=new ht("tag:yaml.org,2002:bool",{kind:"scalar",resolve:L0,construct:F0,predicate:O0,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function M0(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function $0(t){return 48<=t&&t<=55}function D0(t){return 48<=t&&t<=57}function N0(t){if(t===null)return!1;var e=t.length,i=0,r=!1,n;if(!e)return!1;if(n=t[i],(n==="-"||n==="+")&&(n=t[++i]),n==="0"){if(i+1===e)return!0;if(n=t[++i],n==="b"){for(i++;i<e;i++)if(n=t[i],n!=="_"){if(n!=="0"&&n!=="1")return!1;r=!0}return r&&n!=="_"}if(n==="x"){for(i++;i<e;i++)if(n=t[i],n!=="_"){if(!M0(t.charCodeAt(i)))return!1;r=!0}return r&&n!=="_"}if(n==="o"){for(i++;i<e;i++)if(n=t[i],n!=="_"){if(!$0(t.charCodeAt(i)))return!1;r=!0}return r&&n!=="_"}}if(n==="_")return!1;for(;i<e;i++)if(n=t[i],n!=="_"){if(!D0(t.charCodeAt(i)))return!1;r=!0}return!(!r||n==="_")}function R0(t){var e=t,i=1,r;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),r=e[0],(r==="-"||r==="+")&&(r==="-"&&(i=-1),e=e.slice(1),r=e[0]),e==="0")return 0;if(r==="0"){if(e[1]==="b")return i*parseInt(e.slice(2),2);if(e[1]==="x")return i*parseInt(e.slice(2),16);if(e[1]==="o")return i*parseInt(e.slice(2),8)}return i*parseInt(e,10)}function P0(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!ut.isNegativeZero(t)}var q0=new ht("tag:yaml.org,2002:int",{kind:"scalar",resolve:N0,construct:R0,predicate:P0,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),z0=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function W0(t){return!(t===null||!z0.test(t)||t[t.length-1]==="_")}function j0(t){var e,i;return e=t.replace(/_/g,"").toLowerCase(),i=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:i*parseFloat(e,10)}var H0=/^[-+]?[0-9]+e/;function Y0(t,e){var i;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(ut.isNegativeZero(t))return"-0.0";return i=t.toString(10),H0.test(i)?i.replace("e",".e"):i}function U0(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||ut.isNegativeZero(t))}var G0=new ht("tag:yaml.org,2002:float",{kind:"scalar",resolve:W0,construct:j0,predicate:U0,represent:Y0,defaultStyle:"lowercase"}),V0=Ka.extend({implicit:[A0,I0,q0,G0]}),X0=V0,Za=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ja=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 K0(t){return t===null?!1:Za.exec(t)!==null||Ja.exec(t)!==null}function Z0(t){var e,i,r,n,s,o,a,l=0,c=null,h,u,p;if(e=Za.exec(t),e===null&&(e=Ja.exec(t)),e===null)throw new Error("Date resolve error");if(i=+e[1],r=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(i,r,n));if(s=+e[4],o=+e[5],a=+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)),p=new Date(Date.UTC(i,r,n,s,o,a,l)),c&&p.setTime(p.getTime()-c),p}function J0(t){return t.toISOString()}var Q0=new ht("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:K0,construct:Z0,instanceOf:Date,represent:J0});function t_(t){return t==="<<"||t===null}var e_=new ht("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t_}),Xn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function i_(t){if(t===null)return!1;var e,i,r=0,n=t.length,s=Xn;for(i=0;i<n;i++)if(e=s.indexOf(t.charAt(i)),!(e>64)){if(e<0)return!1;r+=6}return r%8===0}function r_(t){var e,i,r=t.replace(/[\r\n=]/g,""),n=r.length,s=Xn,o=0,a=[];for(e=0;e<n;e++)e%4===0&&e&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(r.charAt(e));return i=n%4*6,i===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):i===18?(a.push(o>>10&255),a.push(o>>2&255)):i===12&&a.push(o>>4&255),new Uint8Array(a)}function n_(t){var e="",i=0,r,n,s=t.length,o=Xn;for(r=0;r<s;r++)r%3===0&&r&&(e+=o[i>>18&63],e+=o[i>>12&63],e+=o[i>>6&63],e+=o[i&63]),i=(i<<8)+t[r];return n=s%3,n===0?(e+=o[i>>18&63],e+=o[i>>12&63],e+=o[i>>6&63],e+=o[i&63]):n===2?(e+=o[i>>10&63],e+=o[i>>4&63],e+=o[i<<2&63],e+=o[64]):n===1&&(e+=o[i>>2&63],e+=o[i<<4&63],e+=o[64],e+=o[64]),e}function o_(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var s_=new ht("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i_,construct:r_,predicate:o_,represent:n_}),a_=Object.prototype.hasOwnProperty,l_=Object.prototype.toString;function c_(t){if(t===null)return!0;var e=[],i,r,n,s,o,a=t;for(i=0,r=a.length;i<r;i+=1){if(n=a[i],o=!1,l_.call(n)!=="[object Object]")return!1;for(s in n)if(a_.call(n,s))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function h_(t){return t!==null?t:[]}var u_=new ht("tag:yaml.org,2002:omap",{kind:"sequence",resolve:c_,construct:h_}),d_=Object.prototype.toString;function f_(t){if(t===null)return!0;var e,i,r,n,s,o=t;for(s=new Array(o.length),e=0,i=o.length;e<i;e+=1){if(r=o[e],d_.call(r)!=="[object Object]"||(n=Object.keys(r),n.length!==1))return!1;s[e]=[n[0],r[n[0]]]}return!0}function p_(t){if(t===null)return[];var e,i,r,n,s,o=t;for(s=new Array(o.length),e=0,i=o.length;e<i;e+=1)r=o[e],n=Object.keys(r),s[e]=[n[0],r[n[0]]];return s}var g_=new ht("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:f_,construct:p_}),m_=Object.prototype.hasOwnProperty;function __(t){if(t===null)return!0;var e,i=t;for(e in i)if(m_.call(i,e)&&i[e]!==null)return!1;return!0}function y_(t){return t!==null?t:{}}var b_=new ht("tag:yaml.org,2002:set",{kind:"mapping",resolve:__,construct:y_}),C_=X0.extend({implicit:[Q0,e_],explicit:[s_,u_,g_,b_]}),se=Object.prototype.hasOwnProperty,ur=1,Qa=2,tl=3,dr=4,sn=1,x_=2,ms=3,T_=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S_=/[\x85\u2028\u2029]/,k_=/[,\[\]\{\}]/,el=/^(?:!|!!|![a-z\-]+!)$/i,il=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _s(t){return Object.prototype.toString.call(t)}function Nt(t){return t===10||t===13}function me(t){return t===9||t===32}function mt(t){return t===9||t===32||t===10||t===13}function Le(t){return t===44||t===91||t===93||t===123||t===125}function v_(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function w_(t){return t===120?2:t===117?4:t===85?8:0}function B_(t){return 48<=t&&t<=57?t-48:-1}function ys(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function E_(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var rl=new Array(256),nl=new Array(256);for(var Ee=0;Ee<256;Ee++)rl[Ee]=ys(Ee)?1:0,nl[Ee]=ys(Ee);function A_(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||C_,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ol(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=m0(i),new Vt(e,i)}function M(t,e){throw ol(t,e)}function fr(t,e){t.onWarning&&t.onWarning.call(null,ol(t,e))}var bs={YAML:function(e,i,r){var n,s,o;e.version!==null&&M(e,"duplication of %YAML directive"),r.length!==1&&M(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),n===null&&M(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&M(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&fr(e,"unsupported YAML version of the document")},TAG:function(e,i,r){var n,s;r.length!==2&&M(e,"TAG directive accepts exactly two arguments"),n=r[0],s=r[1],el.test(n)||M(e,"ill-formed tag handle (first argument) of the TAG directive"),se.call(e.tagMap,n)&&M(e,'there is a previously declared suffix for "'+n+'" tag handle'),il.test(s)||M(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{M(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s}};function ne(t,e,i,r){var n,s,o,a;if(e<i){if(a=t.input.slice(e,i),r)for(n=0,s=a.length;n<s;n+=1)o=a.charCodeAt(n),o===9||32<=o&&o<=1114111||M(t,"expected valid JSON character");else T_.test(a)&&M(t,"the stream contains non-printable characters");t.result+=a}}function Cs(t,e,i,r){var n,s,o,a;for(ut.isObject(i)||M(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(i),o=0,a=n.length;o<a;o+=1)s=n[o],se.call(e,s)||(e[s]=i[s],r[s]=!0)}function Fe(t,e,i,r,n,s,o,a,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&M(t,"nested arrays are not supported inside keys"),typeof n=="object"&&_s(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&_s(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)Cs(t,e,s[c],i);else Cs(t,e,s,i);else!t.json&&!se.call(i,n)&&se.call(e,n)&&(t.line=o||t.line,t.lineStart=a||t.lineStart,t.position=l||t.position,M(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):e[n]=s,delete i[n];return e}function Kn(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):M(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function et(t,e,i){for(var r=0,n=t.input.charCodeAt(t.position);n!==0;){for(;me(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(Nt(n))for(Kn(t),n=t.input.charCodeAt(t.position),r++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return i!==-1&&r!==0&&t.lineIndent<i&&fr(t,"deficient indentation"),r}function Mr(t){var e=t.position,i;return i=t.input.charCodeAt(e),!!((i===45||i===46)&&i===t.input.charCodeAt(e+1)&&i===t.input.charCodeAt(e+2)&&(e+=3,i=t.input.charCodeAt(e),i===0||mt(i)))}function Zn(t,e){e===1?t.result+=" ":e>1&&(t.result+=ut.repeat(`
`,e-1))}function L_(t,e,i){var r,n,s,o,a,l,c,h,u=t.kind,p=t.result,d;if(d=t.input.charCodeAt(t.position),mt(d)||Le(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),mt(n)||i&&Le(n)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,a=!1;d!==0;){if(d===58){if(n=t.input.charCodeAt(t.position+1),mt(n)||i&&Le(n))break}else if(d===35){if(r=t.input.charCodeAt(t.position-1),mt(r))break}else{if(t.position===t.lineStart&&Mr(t)||i&&Le(d))break;if(Nt(d))if(l=t.line,c=t.lineStart,h=t.lineIndent,et(t,!1,-1),t.lineIndent>=e){a=!0,d=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=c,t.lineIndent=h;break}}a&&(ne(t,s,o,!1),Zn(t,t.line-l),s=o=t.position,a=!1),me(d)||(o=t.position+1),d=t.input.charCodeAt(++t.position)}return ne(t,s,o,!1),t.result?!0:(t.kind=u,t.result=p,!1)}function F_(t,e){var i,r,n;if(i=t.input.charCodeAt(t.position),i!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(i=t.input.charCodeAt(t.position))!==0;)if(i===39)if(ne(t,r,t.position,!0),i=t.input.charCodeAt(++t.position),i===39)r=t.position,t.position++,n=t.position;else return!0;else Nt(i)?(ne(t,r,n,!0),Zn(t,et(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Mr(t)?M(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);M(t,"unexpected end of the stream within a single quoted scalar")}function O_(t,e){var i,r,n,s,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,i=r=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return ne(t,i,t.position,!0),t.position++,!0;if(a===92){if(ne(t,i,t.position,!0),a=t.input.charCodeAt(++t.position),Nt(a))et(t,!1,e);else if(a<256&&rl[a])t.result+=nl[a],t.position++;else if((o=w_(a))>0){for(n=o,s=0;n>0;n--)a=t.input.charCodeAt(++t.position),(o=v_(a))>=0?s=(s<<4)+o:M(t,"expected hexadecimal character");t.result+=E_(s),t.position++}else M(t,"unknown escape sequence");i=r=t.position}else Nt(a)?(ne(t,i,r,!0),Zn(t,et(t,!1,e)),i=r=t.position):t.position===t.lineStart&&Mr(t)?M(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}M(t,"unexpected end of the stream within a double quoted scalar")}function I_(t,e){var i=!0,r,n,s,o=t.tag,a,l=t.anchor,c,h,u,p,d,m=Object.create(null),_,C,$,y;if(y=t.input.charCodeAt(t.position),y===91)h=93,d=!1,a=[];else if(y===123)h=125,d=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),y=t.input.charCodeAt(++t.position);y!==0;){if(et(t,!0,e),y=t.input.charCodeAt(t.position),y===h)return t.position++,t.tag=o,t.anchor=l,t.kind=d?"mapping":"sequence",t.result=a,!0;i?y===44&&M(t,"expected the node content, but found ','"):M(t,"missed comma between flow collection entries"),C=_=$=null,u=p=!1,y===63&&(c=t.input.charCodeAt(t.position+1),mt(c)&&(u=p=!0,t.position++,et(t,!0,e))),r=t.line,n=t.lineStart,s=t.position,Ne(t,e,ur,!1,!0),C=t.tag,_=t.result,et(t,!0,e),y=t.input.charCodeAt(t.position),(p||t.line===r)&&y===58&&(u=!0,y=t.input.charCodeAt(++t.position),et(t,!0,e),Ne(t,e,ur,!1,!0),$=t.result),d?Fe(t,a,m,C,_,$,r,n,s):u?a.push(Fe(t,null,m,C,_,$,r,n,s)):a.push(_),et(t,!0,e),y=t.input.charCodeAt(t.position),y===44?(i=!0,y=t.input.charCodeAt(++t.position)):i=!1}M(t,"unexpected end of the stream within a flow collection")}function M_(t,e){var i,r,n=sn,s=!1,o=!1,a=e,l=0,c=!1,h,u;if(u=t.input.charCodeAt(t.position),u===124)r=!1;else if(u===62)r=!0;else return!1;for(t.kind="scalar",t.result="";u!==0;)if(u=t.input.charCodeAt(++t.position),u===43||u===45)sn===n?n=u===43?ms:x_:M(t,"repeat of a chomping mode identifier");else if((h=B_(u))>=0)h===0?M(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?M(t,"repeat of an indentation width identifier"):(a=e+h-1,o=!0);else break;if(me(u)){do u=t.input.charCodeAt(++t.position);while(me(u));if(u===35)do u=t.input.charCodeAt(++t.position);while(!Nt(u)&&u!==0)}for(;u!==0;){for(Kn(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!o||t.lineIndent<a)&&u===32;)t.lineIndent++,u=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>a&&(a=t.lineIndent),Nt(u)){l++;continue}if(t.lineIndent<a){n===ms?t.result+=ut.repeat(`
`,s?1+l:l):n===sn&&s&&(t.result+=`
`);break}for(r?me(u)?(c=!0,t.result+=ut.repeat(`
`,s?1+l:l)):c?(c=!1,t.result+=ut.repeat(`
`,l+1)):l===0?s&&(t.result+=" "):t.result+=ut.repeat(`
`,l):t.result+=ut.repeat(`
`,s?1+l:l),s=!0,o=!0,l=0,i=t.position;!Nt(u)&&u!==0;)u=t.input.charCodeAt(++t.position);ne(t,i,t.position,!1)}return!0}function xs(t,e){var i,r=t.tag,n=t.anchor,s=[],o,a=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,M(t,"tab characters must not be used in indentation")),!(l!==45||(o=t.input.charCodeAt(t.position+1),!mt(o))));){if(a=!0,t.position++,et(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(i=t.line,Ne(t,e,tl,!1,!0),s.push(t.result),et(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&l!==0)M(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=r,t.anchor=n,t.kind="sequence",t.result=s,!0):!1}function $_(t,e,i){var r,n,s,o,a,l,c=t.tag,h=t.anchor,u={},p=Object.create(null),d=null,m=null,_=null,C=!1,$=!1,y;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=u),y=t.input.charCodeAt(t.position);y!==0;){if(!C&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,M(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),s=t.line,(y===63||y===58)&&mt(r))y===63?(C&&(Fe(t,u,p,d,m,null,o,a,l),d=m=_=null),$=!0,C=!0,n=!0):C?(C=!1,n=!0):M(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,y=r;else{if(o=t.line,a=t.lineStart,l=t.position,!Ne(t,i,Qa,!1,!0))break;if(t.line===s){for(y=t.input.charCodeAt(t.position);me(y);)y=t.input.charCodeAt(++t.position);if(y===58)y=t.input.charCodeAt(++t.position),mt(y)||M(t,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(Fe(t,u,p,d,m,null,o,a,l),d=m=_=null),$=!0,C=!1,n=!1,d=t.tag,m=t.result;else if($)M(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=h,!0}else if($)M(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=h,!0}if((t.line===s||t.lineIndent>e)&&(C&&(o=t.line,a=t.lineStart,l=t.position),Ne(t,e,dr,!0,n)&&(C?m=t.result:_=t.result),C||(Fe(t,u,p,d,m,_,o,a,l),d=m=_=null),et(t,!0,-1),y=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&y!==0)M(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return C&&Fe(t,u,p,d,m,null,o,a,l),$&&(t.tag=c,t.anchor=h,t.kind="mapping",t.result=u),$}function D_(t){var e,i=!1,r=!1,n,s,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&M(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(i=!0,o=t.input.charCodeAt(++t.position)):o===33?(r=!0,n="!!",o=t.input.charCodeAt(++t.position)):n="!",e=t.position,i){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(s=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):M(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!mt(o);)o===33&&(r?M(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),el.test(n)||M(t,"named tag handle cannot contain such characters"),r=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),k_.test(s)&&M(t,"tag suffix cannot contain flow indicator characters")}s&&!il.test(s)&&M(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{M(t,"tag name is malformed: "+s)}return i?t.tag=s:se.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:M(t,'undeclared tag handle "'+n+'"'),!0}function N_(t){var e,i;if(i=t.input.charCodeAt(t.position),i!==38)return!1;for(t.anchor!==null&&M(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!mt(i)&&!Le(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&M(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function R_(t){var e,i,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!mt(r)&&!Le(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&M(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),se.call(t.anchorMap,i)||M(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],et(t,!0,-1),!0}function Ne(t,e,i,r,n){var s,o,a,l=1,c=!1,h=!1,u,p,d,m,_,C;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=o=a=dr===i||tl===i,r&&et(t,!0,-1)&&(c=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;D_(t)||N_(t);)et(t,!0,-1)?(c=!0,a=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):a=!1;if(a&&(a=c||n),(l===1||dr===i)&&(ur===i||Qa===i?_=e:_=e+1,C=t.position-t.lineStart,l===1?a&&(xs(t,C)||$_(t,C,_))||I_(t,_)?h=!0:(o&&M_(t,_)||F_(t,_)||O_(t,_)?h=!0:R_(t)?(h=!0,(t.tag!==null||t.anchor!==null)&&M(t,"alias node should not have any properties")):L_(t,_,ur===i)&&(h=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(h=a&&xs(t,C))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&M(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),u=0,p=t.implicitTypes.length;u<p;u+=1)if(m=t.implicitTypes[u],m.resolve(t.result)){t.result=m.construct(t.result),t.tag=m.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(se.call(t.typeMap[t.kind||"fallback"],t.tag))m=t.typeMap[t.kind||"fallback"][t.tag];else for(m=null,d=t.typeMap.multi[t.kind||"fallback"],u=0,p=d.length;u<p;u+=1)if(t.tag.slice(0,d[u].tag.length)===d[u].tag){m=d[u];break}m||M(t,"unknown tag !<"+t.tag+">"),t.result!==null&&m.kind!==t.kind&&M(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+m.kind+'", not "'+t.kind+'"'),m.resolve(t.result,t.tag)?(t.result=m.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):M(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}function P_(t){var e=t.position,i,r,n,s=!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&&(et(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(s=!0,o=t.input.charCodeAt(++t.position),i=t.position;o!==0&&!mt(o);)o=t.input.charCodeAt(++t.position);for(r=t.input.slice(i,t.position),n=[],r.length<1&&M(t,"directive name must not be less than one character in length");o!==0;){for(;me(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!Nt(o));break}if(Nt(o))break;for(i=t.position;o!==0&&!mt(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(i,t.position))}o!==0&&Kn(t),se.call(bs,r)?bs[r](t,r,n):fr(t,'unknown document directive "'+r+'"')}if(et(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,et(t,!0,-1)):s&&M(t,"directives end mark is expected"),Ne(t,t.lineIndent-1,dr,!1,!0),et(t,!0,-1),t.checkLineBreaks&&S_.test(t.input.slice(e,t.position))&&fr(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Mr(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,et(t,!0,-1));return}if(t.position<t.length-1)M(t,"end of the stream or a document separator is expected");else return}function sl(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var i=new A_(t,e),r=t.indexOf("\0");for(r!==-1&&(i.position=r,M(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)P_(i);return i.documents}function q_(t,e,i){e!==null&&typeof e=="object"&&typeof i>"u"&&(i=e,e=null);var r=sl(t,i);if(typeof e!="function")return r;for(var n=0,s=r.length;n<s;n+=1)e(r[n])}function z_(t,e){var i=sl(t,e);if(i.length!==0){if(i.length===1)return i[0];throw new Vt("expected a single document in the stream, but found more")}}var W_=q_,j_=z_,H_={loadAll:W_,load:j_},Y_=Ka,U_=H_.load;const al=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;function G_(t,e){var i,r;const n=t.match(al);if(n){const s=U_(n[1],{schema:Y_});return s!=null&&s.title&&((i=e.setDiagramTitle)==null||i.call(e,s.title)),s!=null&&s.displayMode&&((r=e.setDisplayMode)==null||r.call(e,s.displayMode)),t.slice(n[0].length)}else return t}const Bn=function(t,e,i){const{depth:r,clobber:n}=Object.assign({depth:2,clobber:!1},i);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(s=>Bn(t,s,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(s=>{t.includes(s)||t.push(s)}),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(s=>{typeof e[s]=="object"&&(t[s]===void 0||typeof t[s]=="object")?(t[s]===void 0&&(t[s]=Array.isArray(e[s])?[]:{}),t[s]=Bn(t[s],e[s],{depth:r-1,clobber:n})):(n||typeof t[s]!="object"&&typeof e[s]!="object")&&(t[s]=e[s])}),t)},ct=Bn,pi=Object.freeze(r0);let pt=ct({},pi),ll,Re=[],ni=ct({},pi);const $r=(t,e)=>{let i=ct({},t),r={};for(const n of e)hl(n),r=ct(r,n);if(i=ct(i,r),r.theme&&r.theme in Kt){const n=ct({},ll),s=ct(n.themeVariables||{},r.themeVariables);i.theme&&i.theme in Kt&&(i.themeVariables=Kt[i.theme].getThemeVariables(s))}return ni=i,fl(ni),ni},V_=t=>(pt=ct({},pi),pt=ct(pt,t),t.theme&&Kt[t.theme]&&(pt.themeVariables=Kt[t.theme].getThemeVariables(t.themeVariables)),$r(pt,Re),pt),X_=t=>{ll=ct({},t)},K_=t=>(pt=ct(pt,t),$r(pt,Re),pt),cl=()=>ct({},pt),Z_=t=>(fl(t),ct(ni,t),Jt()),Jt=()=>ct({},ni),hl=t=>{["secure",...pt.secure??[]].forEach(e=>{t[e]!==void 0&&(A.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.indexOf("__")===0&&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"&&hl(t[e])})},ul=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),Re.push(t),$r(pt,Re)},pr=(t=pt)=>{Re=[],$r(t,Re)};var dl=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(dl||{});const Ts={},J_=t=>{Ts[t]||(A.warn(dl[t]),Ts[t]=!0)},fl=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&J_("LAZY_LOAD_DEPRECATED")},Q_=function(t,e){for(let i of e)t.attr(i[0],i[1])},ty=function(t,e,i){let r=new Map;return i?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r},ey=function(t,e,i,r){const n=ty(e,i,r);Q_(t,n)},iy=function(t,e,i,r){const n=e.node().getBBox(),s=n.width,o=n.height;A.info(`SVG bounds: ${s}x${o}`,n);let a=0,l=0;A.info(`Graph bounds: ${a}x${l}`,t),a=s+i*2,l=o+i*2,A.info(`Calculated bounds: ${a}x${l}`),ey(e,l,a,r);const c=`${n.x-i} ${n.y-i} ${n.width+2*i} ${n.height+2*i}`;e.attr("viewBox",c)},Xi={},ry=(t,e,i)=>{let r="";return t in Xi&&Xi[t]?r=Xi[t](i):A.warn(`No theme found for ${t}`),` & {
font-family: ${i.fontFamily};
font-size: ${i.fontSize};
fill: ${i.textColor}
}
/* Classes common for multiple diagrams */
& .error-icon {
fill: ${i.errorBkgColor};
}
& .error-text {
fill: ${i.errorTextColor};
stroke: ${i.errorTextColor};
}
& .edge-thickness-normal {
stroke-width: 2px;
}
& .edge-thickness-thick {
stroke-width: 3.5px
}
& .edge-pattern-solid {
stroke-dasharray: 0;
}
& .edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
& .marker {
fill: ${i.lineColor};
stroke: ${i.lineColor};
}
& .marker.cross {
stroke: ${i.lineColor};
}
& svg {
font-family: ${i.fontFamily};
font-size: ${i.fontSize};
}
${r}
${e}
`},ny=(t,e)=>{Xi[t]=e},oy=ry;let Jn="",Dr="",Qn="";const to=t=>di(t,Jt()),pl=function(){Jn="",Qn="",Dr=""},gl=function(t){Jn=to(t).replace(/^\s+/g,"")},ml=function(){return Jn||Dr},_l=function(t){Qn=to(t).replace(/\n\s+/g,`
`)},yl=function(){return Qn},bl=function(t){Dr=to(t)},Cl=function(){return Dr},sy={getAccTitle:ml,setAccTitle:gl,getDiagramTitle:Cl,setDiagramTitle:bl,getAccDescription:yl,setAccDescription:_l,clear:pl},ay=Object.freeze(Object.defineProperty({__proto__:null,clear:pl,default:sy,getAccDescription:yl,getAccTitle:ml,getDiagramTitle:Cl,setAccDescription:_l,setAccTitle:gl,setDiagramTitle:bl},Symbol.toStringTag,{value:"Module"}));let he={};const xl=function(t,e,i,r){A.debug("parseDirective is being called",e,i,r);try{if(e!==void 0)switch(e=e.trim(),i){case"open_directive":he={};break;case"type_directive":if(!he)throw new Error("currentDirective is undefined");he.type=e.toLowerCase();break;case"arg_directive":if(!he)throw new Error("currentDirective is undefined");he.args=JSON.parse(e);break;case"close_directive":ly(t,he,r),he=void 0;break}}catch(n){A.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${i}`),A.error(n.message)}},ly=function(t,e,i){switch(A.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(r=>{e.args[r]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),e.args[i]=e.args[r],delete e.args[r])}),A.info("sanitize in handleDirective",e.args),qe(e.args),A.info("sanitize in handleDirective (done)",e.args),ul(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":A.warn("themeCss encountered");break;default:A.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},cy=A,hy=Gn,Tl=Jt,uy=t=>di(t,Tl()),dy=iy,fy=()=>ay,py=(t,e,i,r)=>xl(t,e,i,r),gr={},mr=(t,e,i)=>{if(gr[t])throw new Error(`Diagram ${t} already registered.`);gr[t]=e,i&&vl(t,i),ny(t,e.styles),e.injectUtils&&e.injectUtils(cy,hy,Tl,uy,dy,fy(),py)},eo=t=>{if(t in gr)return gr[t];throw new Error(`Diagram ${t} not found.`)};class Sl extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}}const gy=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,my=/\s*%%.*\n/gm,Pe={},Nr=function(t,e){t=t.replace(al,"").replace(gy,"").replace(my,`
`);for(const[i,{detector:r}]of Object.entries(Pe))if(r(t,e))return i;throw new Sl(`No diagram type detected matching given configuration for text: ${t}`)},kl=(...t)=>{for(const{id:e,detector:i,loader:r}of t)vl(e,i,r)},_y=async()=>{A.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Pe).map(async([i,{detector:r,loader:n}])=>{if(n)try{eo(i)}catch{try{const{diagram:o,id:a}=await n();mr(a,o,r)}catch(o){throw A.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete Pe[i],o}}}))).filter(i=>i.status==="rejected");if(e.length>0){A.error(`Failed to load ${e.length} external diagrams`);for(const i of e)A.error(i);throw new Error(`Failed to load ${e.length} external diagrams`)}},vl=(t,e,i)=>{Pe[t]?A.error(`Detector with key ${t} already exists`):Pe[t]={detector:e,loader:i},A.debug(`Detector with key ${t} added${i?" with loader":""}`)},yy=t=>Pe[t].loader,by="",Cy={curveBasis:Xd,curveBasisClosed:Kd,curveBasisOpen:Zd,curveBumpX:Gd,curveBumpY:Vd,curveBundle:Jd,curveCardinalClosed:tf,curveCardinalOpen:ef,curveCardinal:Qd,curveCatmullRomClosed:nf,curveCatmullRomOpen:of,curveCatmullRom:rf,curveLinear:Ud,curveLinearClosed:sf,curveMonotoneX:af,curveMonotoneY:lf,curveNatural:cf,curveStep:hf,curveStepAfter:df,curveStepBefore:uf},an=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,xy=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ty=function(t,e){const i=wl(t,/(?:init\b)|(?:initialize\b)/);let r={};if(Array.isArray(i)){const n=i.map(s=>s.args);qe(n),r=ct(r,[...n])}else r=i.args;if(r){let n=Nr(t,e);["config"].forEach(s=>{r[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),r[n]=r[s],delete r[s])})}return r},wl=function(t,e=null){try{const i=new RegExp(`[%]{2}(?![{]${xy.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),A.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let r;const n=[];for(;(r=an.exec(t))!==null;)if(r.index===an.lastIndex&&an.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){const s=r[1]?r[1]:r[2],o=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;n.push({type:s,args:o})}return n.length===0&&n.push({type:t,args:null}),n.length===1?n[0]:n}catch(i){return A.error(`ERROR: ${i.message} - Unable to parse directive
${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},Sy=function(t,e){for(const[i,r]of e.entries())if(r.match(t))return i;return-1};function ky(t,e){if(!t)return e;const i=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Cy[i]||e}function vy(t,e){const i=t.trim();if(i)return e.securityLevel!=="loose"?Ns.sanitizeUrl(i):i}const wy=(t,...e)=>{const i=t.split("."),r=i.length-1,n=i[r];let s=window;for(let o=0;o<r;o++)if(s=s[i[o]],!s)return;s[n](...e)};function _r(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function By(t){let e,i=0;t.forEach(s=>{i+=_r(s,e),e=s});let r=i/2,n;return e=void 0,t.forEach(s=>{if(e&&!n){const o=_r(s,e);if(o<r)r-=o;else{const a=r/o;a<=0&&(n=e),a>=1&&(n={x:s.x,y:s.y}),a>0&&a<1&&(n={x:(1-a)*e.x+a*s.x,y:(1-a)*e.y+a*s.y})}}e=s}),n}function Ey(t){return t.length===1?t[0]:By(t)}const Ay=(t,e,i)=>{let r;A.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());let s=25,o;r=void 0,e.forEach(h=>{if(r&&!o){const u=_r(h,r);if(u<s)s-=u;else{const p=s/u;p<=0&&(o=r),p>=1&&(o={x:h.x,y:h.y}),p>0&&p<1&&(o={x:(1-p)*r.x+p*h.x,y:(1-p)*r.y+p*h.y})}}r=h});const a=t?10:5,l=Math.atan2(e[0].y-o.y,e[0].x-o.x),c={x:0,y:0};return c.x=Math.sin(l)*a+(e[0].x+o.x)/2,c.y=-Math.cos(l)*a+(e[0].y+o.y)/2,c};function Ly(t,e,i){let r=JSON.parse(JSON.stringify(i)),n;A.info("our points",r),e!=="start_left"&&e!=="start_right"&&(r=r.reverse()),r.forEach(u=>{n=u});let o=25+t,a;n=void 0,r.forEach(u=>{if(n&&!a){const p=_r(u,n);if(p<o)o-=p;else{const d=o/p;d<=0&&(a=n),d>=1&&(a={x:u.x,y:u.y}),d>0&&d<1&&(a={x:(1-d)*n.x+d*u.x,y:(1-d)*n.y+d*u.y})}}n=u});const l=10+t*.5,c=Math.atan2(r[0].y-a.y,r[0].x-a.x),h={x:0,y:0};return h.x=Math.sin(c)*l+(r[0].x+a.x)/2,h.y=-Math.cos(c)*l+(r[0].y+a.y)/2,e==="start_left"&&(h.x=Math.sin(c+Math.PI)*l+(r[0].x+a.x)/2,h.y=-Math.cos(c+Math.PI)*l+(r[0].y+a.y)/2),e==="end_right"&&(h.x=Math.sin(c-Math.PI)*l+(r[0].x+a.x)/2-5,h.y=-Math.cos(c-Math.PI)*l+(r[0].y+a.y)/2-5),e==="end_left"&&(h.x=Math.sin(c)*l+(r[0].x+a.x)/2-5,h.y=-Math.cos(c)*l+(r[0].y+a.y)/2-5),h}function Fy(t){let e="",i="";for(const r of t)r!==void 0&&(r.startsWith("color:")||r.startsWith("text-align:")?i=i+r+";":e=e+r+";");return{style:e,labelStyle:i}}let Ss=0;const Oy=()=>(Ss++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ss);function Iy(t){let e="";const i="0123456789abcdef",r=i.length;for(let n=0;n<t;n++)e+=i.charAt(Math.floor(Math.random()*r));return e}const My=t=>Iy(t.length),$y=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}},Dy=function(t,e){const i=e.text.replace(Vn.lineBreakRegex," "),[,r]=ro(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",r),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);const s=n.append("tspan");return s.attr("x",e.x+e.textMargin*2),s.attr("fill",e.fill),s.text(i),n},Ny=Ci((t,e,i)=>{if(!t||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),Vn.lineBreakRegex.test(t)))return t;const r=t.split(" "),n=[];let s="";return r.forEach((o,a)=>{const l=yr(`${o} `,i),c=yr(s,i);if(l>e){const{hyphenatedStrings:p,remainingWord:d}=Ry(o,e,"-",i);n.push(s,...p),s=d}else c+l>=e?(n.push(s),s=o):s=[s,o].filter(Boolean).join(" ");a+1===r.length&&n.push(s)}),n.filter(o=>o!=="").join(i.joinWith)},(t,e,i)=>`${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Ry=Ci((t,e,i="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const n=[...t],s=[];let o="";return n.forEach((a,l)=>{const c=`${o}${a}`;if(yr(c,r)>=e){const u=l+1,p=n.length===u,d=`${c}${i}`;s.push(p?c:d),o=""}else o=c}),{hyphenatedStrings:s,remainingWord:o}},(t,e,i="-",r)=>`${t}${e}${i}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function Py(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),io(t,e).height}function yr(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),io(t,e).width}const io=Ci((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:i,fontFamily:r,fontWeight:n}=e;if(!t)return{width:0,height:0};const[,s]=ro(i),o=["sans-serif",r],a=t.split(Vn.lineBreakRegex),l=[],c=Mt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const p of o){let d=0;const m={width:0,height:0,lineHeight:0};for(const _ of a){const C=$y();C.text=_||by;const $=Dy(h,C).style("font-size",s).style("font-weight",n).style("font-family",p),y=($._groups||$)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,y.width)),d=Math.round(y.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}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}`),qy=class{constructor(e,i){this.deterministic=e,this.seed=i,this.count=i?i.length:0}next(){return this.deterministic?this.count++:Date.now()}};let Di;const zy=function(t){return Di=Di||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Di.innerHTML=t,unescape(Di.textContent)},qe=t=>{if(A.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>qe(e)):Object.keys(t).forEach(e=>{A.debug("Checking key",e),e.startsWith("__")&&(A.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(A.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(A.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(A.debug("sanitizing themeCss option"),t[e]=Ki(t[e])),e.includes("fontFamily")&&(A.debug("sanitizing fontFamily option"),t[e]=Ki(t[e])),e.includes("altFontFamily")&&(A.debug("sanitizing altFontFamily option"),t[e]=Ki(t[e])),i0.includes(e)?typeof t[e]=="object"&&(A.debug("sanitize deleting object",e),qe(t[e])):(A.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){const e=Object.keys(t.themeVariables);for(const i of e){const r=t.themeVariables[i];r&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[i]="")}}A.debug("After sanitization",t)},Ki=t=>{let e=0,i=0;for(const r of t){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";r==="{"?e++:r==="}"&&i++}return e!==i?"{ /* ERROR: Unbalanced CSS */ }":t};function Bl(t){return"str"in t}function Wy(t){return t instanceof Error?t.message:String(t)}const jy=(t,e,i,r)=>{if(!r)return;const n=t.node().getBBox();t.append("text").text(r).attr("x",n.x+n.width/2).attr("y",-i).attr("class",e)},ro=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]},Zi={assignWithDepth:ct,wrapLabel:Ny,calculateTextHeight:Py,calculateTextWidth:yr,calculateTextDimensions:io,detectInit:Ty,detectDirective:wl,isSubstringInArray:Sy,interpolateToCurve:ky,calcLabelPosition:Ey,calcCardinalityPosition:Ay,calcTerminalLabelPosition:Ly,formatUrl:vy,getStylesFromArray:Fy,generateId:Oy,random:My,runFunc:wy,entityDecode:zy,initIdGenerator:qy,directiveSanitizer:qe,sanitizeCss:Ki,insertTitle:jy,parseFontSize:ro},ks="10.2.3",El="c4",Hy=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null,Yy=async()=>{const{diagram:t}=await rt(()=>import("./c4Diagram-9cddb37f-N9kopixF.js"),__vite__mapDeps([0,1,2,3]));return{id:El,diagram:t}},Uy={id:El,detector:Hy,loader:Yy},Gy=Uy,Al="flowchart",Vy=(t,e)=>{var i,r;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null},Xy=async()=>{const{diagram:t}=await rt(()=>import("./flowDiagram-93327f21-bzemmV0w.js"),__vite__mapDeps([4,5,6,7,8,9,10,11,12,13,14,15,2,3]));return{id:Al,diagram:t}},Ky={id:Al,detector:Vy,loader:Xy},Zy=Ky,Ll="flowchart-v2",Jy=(t,e)=>{var i,r,n;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-d3"||((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*flowchart/)!==null},Qy=async()=>{const{diagram:t}=await rt(()=>import("./flowDiagram-v2-476db779-kB7FwdKI.js"),__vite__mapDeps([16,5,7,6,8,9,10,11,12,13,14,15,2,3]));return{id:Ll,diagram:t}},tb={id:Ll,detector:Jy,loader:Qy},eb=tb,Fl="er",ib=t=>t.match(/^\s*erDiagram/)!==null,rb=async()=>{const{diagram:t}=await rt(()=>import("./erDiagram-f6946109-z4VASuEu.js"),__vite__mapDeps([17,6,12,13,14,2,3]));return{id:Fl,diagram:t}},nb={id:Fl,detector:ib,loader:rb},ob=nb,Ol="gitGraph",sb=t=>t.match(/^\s*gitGraph/)!==null,ab=async()=>{const{diagram:t}=await rt(()=>import("./gitGraphDiagram-1e960c50-nR2fIRcx.js"),__vite__mapDeps([18,2,3]));return{id:Ol,diagram:t}},lb={id:Ol,detector:sb,loader:ab},cb=lb,Il="gantt",hb=t=>t.match(/^\s*gantt/)!==null,ub=async()=>{const{diagram:t}=await rt(()=>import("./ganttDiagram-7ce12d6b-bNEEGiE3.js"),__vite__mapDeps([19,2,3,20,21]));return{id:Il,diagram:t}},db={id:Il,detector:hb,loader:ub},fb=db,Ml="info",pb=t=>t.match(/^\s*info/)!==null,gb=async()=>{const{diagram:t}=await rt(()=>import("./infoDiagram-264bed3e-S8LyFZ95.js"),__vite__mapDeps([22,2,3]));return{id:Ml,diagram:t}},mb={id:Ml,detector:pb,loader:gb},_b=mb,$l="pie",yb=t=>t.match(/^\s*pie/)!==null,bb=async()=>{const{diagram:t}=await rt(()=>import("./pieDiagram-157505fe-K3QYu1_A.js"),__vite__mapDeps([23,21,13,14,24,2,3]));return{id:$l,diagram:t}},Cb={id:$l,detector:yb,loader:bb},xb=Cb,Dl="quadrantChart",Tb=t=>t.match(/^\s*quadrantChart/)!==null,Sb=async()=>{const{diagram:t}=await rt(()=>import("./quadrantDiagram-fd70f2d0-9W_l-w0k.js"),__vite__mapDeps([25,20,21,2,3]));return{id:Dl,diagram:t}},kb={id:Dl,detector:Tb,loader:Sb},vb=kb,Nl="requirement",wb=t=>t.match(/^\s*requirement(Diagram)?/)!==null,Bb=async()=>{const{diagram:t}=await rt(()=>import("./requirementDiagram-19c99588-nu0kgzn5.js"),__vite__mapDeps([26,6,12,13,14,2,3]));return{id:Nl,diagram:t}},Eb={id:Nl,detector:wb,loader:Bb},Ab=Eb,Rl="sequence",Lb=t=>t.match(/^\s*sequenceDiagram/)!==null,Fb=async()=>{const{diagram:t}=await rt(()=>import("./sequenceDiagram-5dfd0049-6G3skaqL.js"),__vite__mapDeps([27,1,15,2,3]));return{id:Rl,diagram:t}},Ob={id:Rl,detector:Lb,loader:Fb},Ib=Ob,Pl="class",Mb=(t,e)=>{var i;return((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},$b=async()=>{const{diagram:t}=await rt(()=>import("./classDiagram-bc733c3b-nWtrl_HS.js"),__vite__mapDeps([28,29,6,11,12,13,14,2,3]));return{id:Pl,diagram:t}},Db={id:Pl,detector:Mb,loader:$b},Nb=Db,ql="classDiagram",Rb=(t,e)=>{var i;return t.match(/^\s*classDiagram/)!==null&&((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},Pb=async()=>{const{diagram:t}=await rt(()=>import("./classDiagram-v2-8931bdaf-hkLGNE-q.js"),__vite__mapDeps([30,29,6,8,9,10,11,12,13,14,2,3]));return{id:ql,diagram:t}},qb={id:ql,detector:Rb,loader:Pb},zb=qb,zl="state",Wb=(t,e)=>{var i;return((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},jb=async()=>{const{diagram:t}=await rt(()=>import("./stateDiagram-133e3642-C-DPoShl.js"),__vite__mapDeps([31,32,6,12,13,14,2,3]));return{id:zl,diagram:t}},Hb={id:zl,detector:Wb,loader:jb},Yb=Hb,Wl="stateDiagram",Ub=(t,e)=>{var i,r;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||t.match(/^\s*stateDiagram/)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},Gb=async()=>{const{diagram:t}=await rt(()=>import("./stateDiagram-v2-6371a76b-m56clzbO.js"),__vite__mapDeps([33,32,6,8,9,10,11,12,13,14,2,3]));return{id:Wl,diagram:t}},Vb={id:Wl,detector:Ub,loader:Gb},Xb=Vb,jl="journey",Kb=t=>t.match(/^\s*journey/)!==null,Zb=async()=>{const{diagram:t}=await rt(()=>import("./journeyDiagram-31be0096-pp8z6RK0.js"),__vite__mapDeps([34,1,24,14,2,3]));return{id:jl,diagram:t}},Jb={id:jl,detector:Kb,loader:Zb},Qb=Jb,tC=()=>"",eC=tC,iC=function(){},rC=(t,e,i)=>{try{A.debug(`Renering svg for syntax error
`);const r=Mt("#"+e),n=r.append("g");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 "+i),r.attr("height",100),r.attr("width",500),r.attr("viewBox","768 0 912 512")}catch(r){A.error("Error while rendering info diagram"),A.error(Wy(r))}},Hl={setConf:iC,draw:rC},nC={db:{clear:()=>{}},styles:eC,renderer:Hl,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},oC=nC,Yl="flowchart-elk",sC=(t,e)=>{var i;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk")},aC=async()=>{const{diagram:t}=await rt(()=>import("./flowchart-elk-definition-5082a990-_inAippy.js"),__vite__mapDeps([35,5,9,10,11,12,13,14,2,3,36]));return{id:Yl,diagram:t}},lC={id:Yl,detector:sC,loader:aC},cC=lC,Ul="timeline",hC=t=>t.match(/^\s*timeline/)!==null,uC=async()=>{const{diagram:t}=await rt(()=>import("./timeline-definition-5ed366f4-6Q7yW0Tk.js"),__vite__mapDeps([37,24,14,2,3]));return{id:Ul,diagram:t}},dC={id:Ul,detector:hC,loader:uC},fC=dC,Gl="mindmap",pC=t=>t.match(/^\s*mindmap/)!==null,gC=async()=>{const{diagram:t}=await rt(()=>import("./mindmap-definition-4fc2557c-YYRKFqOa.js"),__vite__mapDeps([38,10,2,3]));return{id:Gl,diagram:t}},mC={id:Gl,detector:pC,loader:gC},_C=mC;let vs=!1;const no=()=>{vs||(vs=!0,mr("error",oC,t=>t.toLowerCase().trim()==="error"),mr("---",{db:{clear:()=>{}},styles:{},renderer:{},parser:{parser:{yy:{}},parse:()=>{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")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),kl(Gy,zb,Nb,ob,fb,_b,xb,Ab,Ib,cC,eb,Zy,_C,fC,cb,Xb,Yb,Qb,vb))},yC=t=>t.trimStart().replace(/^\s*%%(?!{)[^\n]+\n?/gm,"");class Vl{constructor(e){var i,r;this.text=e,this.type="graph",this.text+=`
`;const n=Jt();try{this.type=Nr(e,n)}catch(a){this.type="error",this.detectError=a}const s=eo(this.type);A.debug("Type "+this.type),this.db=s.db,(r=(i=this.db).clear)==null||r.call(i),this.renderer=s.renderer,this.parser=s.parser;const o=this.parser.parse.bind(this.parser);this.parser.parse=a=>o(yC(G_(a,this.db))),this.parser.parser.yy=this.db,s.init&&(s.init(n),A.info("Initialized diagram "+this.type,n)),this.parse()}parse(){var e,i;if(this.detectError)throw this.detectError;(i=(e=this.db).clear)==null||i.call(e),this.parser.parse(this.text)}async render(e,i){await this.renderer.draw(this.text,e,i,this)}getParser(){return this.parser}getType(){return this.type}}const oo=async t=>{const e=Nr(t,Jt());try{eo(e)}catch{const r=yy(e);if(!r)throw new Sl(`Diagram ${e} not found.`);const{id:n,diagram:s}=await r();mr(n,s)}return new Vl(t)};let En=[];const W1=t=>{En.push(t)},bC=()=>{En.forEach(t=>{t()}),En=[]},CC="graphics-document document";function xC(t,e){t.attr("role",CC),Vi(e)||t.attr("aria-roledescription",e)}function TC(t,e,i,r){if(t.insert!==void 0)if(e||i){if(i){const n="chart-desc-"+r;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(i)}if(e){const n="chart-title-"+r;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}else return}const Xl=["graph","flowchart","flowchart-v2","flowchart-elk","stateDiagram","stateDiagram-v2"],SC=5e4,kC="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",vC="sandbox",wC="loose",BC="http://www.w3.org/2000/svg",EC="http://www.w3.org/1999/xlink",AC="http://www.w3.org/1999/xhtml",LC="100%",FC="100%",OC="border:0;margin:0;",IC="margin:0",MC="allow-top-navigation-by-user-activation allow-popups",$C='The "iframe" tag is not supported by your browser.',DC=["foreignobject"],NC=["dominant-baseline"];async function RC(t,e){no();try{(await oo(t)).parse()}catch(i){if(e!=null&&e.suppressErrors)return!1;throw i}return!0}const PC=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){const r=i.substring(1,i.length-1);return/^\+?\d+$/.test(r)?"fl°°"+r+"¶ß":"fl°"+r+"¶ß"}),e},qC=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},ws=(t,e,i=[])=>`
.${t} ${e} { ${i.join(" !important; ")} !important; }`,zC=(t,e,i={})=>{var r;let n="";if(t.themeCSS!==void 0&&(n+=`
${t.themeCSS}`),t.fontFamily!==void 0&&(n+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(n+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!Vi(i)&&Xl.includes(e)){const l=t.htmlLabels||((r=t.flowchart)==null?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const c in i){const h=i[c];Vi(h.styles)||l.forEach(u=>{n+=ws(h.id,u,h.styles)}),Vi(h.textStyles)||(n+=ws(h.id,"tspan",h.textStyles))}}return n},WC=(t,e,i,r)=>{const n=zC(t,e,i),s=oy(e,n,t.themeVariables);return xn(Tg(`${r}{${s}}`),kg)},jC=(t="",e,i)=>{let r=t;return!i&&!e&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=qC(r),r=r.replace(/<br>/g,"<br/>"),r},HC=(t="",e)=>{const i=e?e.viewBox.baseVal.height+"px":FC,r=btoa('<body style="'+IC+'">'+t+"</body>");return`<iframe style="width:${LC};height:${i};${OC}" src="data:text/html;base64,${r}" sandbox="${MC}">
${$C}
</iframe>`},Bs=(t,e,i,r,n)=>{const s=t.append("div");s.attr("id",i),r&&s.attr("style",r);const o=s.append("svg").attr("id",e).attr("width","100%").attr("xmlns",BC);return n&&o.attr("xmlns:xlink",n),o.append("g"),t};function Es(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const YC=(t,e,i,r)=>{var n,s,o;(n=t.getElementById(e))==null||n.remove(),(s=t.getElementById(i))==null||s.remove(),(o=t.getElementById(r))==null||o.remove()},UC=async function(t,e,i){var r,n,s,o;no(),pr();const a=Zi.detectInit(e);a&&(qe(a),ul(a));const l=Jt();A.debug(l),e.length>((l==null?void 0:l.maxTextSize)??SC)&&(e=kC),e=e.replace(/\r\n?/g,`
`),e=e.replace(/<(\w+)([^>]*)>/g,(L,w,F)=>"<"+w+F.replace(/="([^"]*)"/g,"='$1'")+">");const c="#"+t,h="i"+t,u="#"+h,p="d"+t,d="#"+p;let m=Mt("body");const _=l.securityLevel===vC,C=l.securityLevel===wC,$=l.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),_){const L=Es(Mt(i),h);m=Mt(L.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=Mt(i);Bs(m,t,p,`font-family: ${$}`,EC)}else{if(YC(document,t,p,h),_){const L=Es(Mt("body"),h);m=Mt(L.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=Mt("body");Bs(m,t,p)}e=PC(e);let y,E;try{y=await oo(e)}catch(L){y=new Vl("error"),E=L}const W=m.select(d).node(),x=y.type,j=W.firstChild,U=j.firstChild,vt=Xl.includes(x)?y.renderer.getClasses(e,y):{},Ct=WC(l,x,vt,c),z=document.createElement("style");z.innerHTML=Ct,j.insertBefore(z,U);try{await y.renderer.draw(e,t,ks,y)}catch(L){throw Hl.draw(e,t,ks),L}const R=m.select(`${d} svg`),it=(n=(r=y.db).getAccTitle)==null?void 0:n.call(r),V=(o=(s=y.db).getAccDescription)==null?void 0:o.call(s);VC(x,R,it,V),m.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",AC);let v=m.select(d).node().innerHTML;if(A.debug("config.arrowMarkerAbsolute",l.arrowMarkerAbsolute),v=jC(v,_,Ua(l.arrowMarkerAbsolute)),_){const L=m.select(d+" svg").node();v=HC(v,L)}else C||(v=lr.sanitize(v,{ADD_TAGS:DC,ADD_ATTR:NC}));if(bC(),E)throw E;const S=Mt(_?u:d).node();return S&&"remove"in S&&S.remove(),{svg:v,bindFunctions:y.db.bindFunctions}};function GC(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),X_(t),t!=null&&t.theme&&t.theme in Kt?t.themeVariables=Kt[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Kt.default.getThemeVariables(t.themeVariables));const i=typeof t=="object"?V_(t):cl();Gn(i.logLevel),no()}function VC(t,e,i,r){xC(e,t),TC(e,i,r,e.attr("id"))}const be=Object.freeze({render:UC,parse:RC,parseDirective:xl,getDiagramFromText:oo,initialize:GC,getConfig:Jt,setConfig:Z_,getSiteConfig:cl,updateSiteConfig:K_,reset:()=>{pr()},globalReset:()=>{pr(pi)},defaultConfig:pi});Gn(Jt().logLevel);pr(Jt());const XC=(t,e,i)=>{A.warn(t),Bl(t)?(i&&i(t.str,t.hash),e.push({...t,message:t.str,error:t})):(i&&i(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},Kl=async function(t={querySelector:".mermaid"}){try{await KC(t)}catch(e){if(Bl(e)&&A.error(e.str),yt.parseError&&yt.parseError(e),!t.suppressErrors)throw A.error("Use the suppressErrors option to suppress these errors"),e}},KC=async function({postRenderCallback:t,querySelector:e,nodes:i}={querySelector:".mermaid"}){const r=be.getConfig();A.debug(`${t?"":"No "}Callback function found`);let n;if(i)n=i;else if(e)n=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");A.debug(`Found ${n.length} diagrams`),(r==null?void 0:r.startOnLoad)!==void 0&&(A.debug("Start On Load: "+(r==null?void 0:r.startOnLoad)),be.updateSiteConfig({startOnLoad:r==null?void 0:r.startOnLoad}));const s=new Zi.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let o;const a=[];for(const l of Array.from(n)){A.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;o=l.innerHTML,o=Ac(Zi.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Zi.detectInit(o);h&&A.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:p}=await tc(c,o,l);l.innerHTML=u,t&&await t(c),p&&p(l)}catch(u){XC(u,a,yt.parseError)}}if(a.length>0)throw a[0]},Zl=function(t){be.initialize(t)},ZC=async function(t,e,i){A.warn("mermaid.init is deprecated. Please use run instead."),t&&Zl(t);const r={postRenderCallback:i,querySelector:".mermaid"};typeof e=="string"?r.querySelector=e:e&&(e instanceof HTMLElement?r.nodes=[e]:r.nodes=e),await Kl(r)},JC=async(t,{lazyLoad:e=!0}={})=>{kl(...t),e===!1&&await _y()},Jl=function(){if(yt.startOnLoad){const{startOnLoad:t}=be.getConfig();t&&yt.run().catch(e=>A.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*!
* Wait for document loaded before starting the execution
*/window.addEventListener("load",Jl,!1)}const QC=function(t){yt.parseError=t},br=[];let ln=!1;const Ql=async()=>{if(!ln){for(ln=!0;br.length>0;){const t=br.shift();if(t)try{await t()}catch(e){A.error("Error executing queue",e)}}ln=!1}},t1=async(t,e)=>new Promise((i,r)=>{const n=()=>new Promise((s,o)=>{be.parse(t,e).then(a=>{s(a),i(a)},a=>{var l;A.error("Error parsing",a),(l=yt.parseError)==null||l.call(yt,a),o(a),r(a)})});br.push(n),Ql().catch(r)}),tc=(t,e,i)=>new Promise((r,n)=>{const s=()=>new Promise((o,a)=>{be.render(t,e,i).then(l=>{o(l),r(l)},l=>{var c;A.error("Error parsing",l),(c=yt.parseError)==null||c.call(yt,l),a(l),n(l)})});br.push(s),Ql().catch(n)}),yt={startOnLoad:!0,mermaidAPI:be,parse:t1,render:tc,init:ZC,run:Kl,registerExternalDiagrams:JC,initialize:Zl,parseError:void 0,contentLoaded:Jl,setParseErrorHandler:QC,detectType:Nr},He=t=>{t=i1(t);const e=t.replace(/#(\d+);/g,"&#$1;").replace(/#([a-z]+);/g,"&$1;"),i=document.createElement("textarea");return i.innerHTML=e,i.value},Ie=t=>{const e=t.getAttribute("transform"),i=e==null?void 0:e.match(/translate\(([ \d.-]+),\s*([\d.-]+)\)/);let r=0,n=0;return i&&(r=Number(i[1]),n=Number(i[2])),{transformX:r,transformY:n}},e1=t=>{let e=t;return e=e.replace(/style.*:\S*#.*;/g,i=>i.substring(0,i.length-1)),e=e.replace(/classDef.*:\S*#.*;/g,i=>i.substring(0,i.length-1)),e=e.replace(/#\w+;/g,i=>{const r=i.substring(1,i.length-1);return/^\+?\d+$/.test(r)?`fl°°${r}¶ß`:`fl°${r}¶ß`}),e},i1=function(t){return t.replace(/fl°°/g,"#").replace(/fl°/g,"&").replace(/¶ß/g,";")},ec=(t,e={x:0,y:0})=>{if(t.tagName.toLowerCase()!=="path")throw new Error(`Invalid input: Expected an HTMLElement of tag "path", got ${t.tagName}`);const i=t.getAttribute("d");if(!i)throw new Error('Path element does not contain a "d" attribute');const r=i.split(/(?=[LM])/),n=r[0].substring(1).split(",").map(a=>parseFloat(a)),s=r[r.length-1].substring(1).split(",").map(a=>parseFloat(a)),o=r.map(a=>{const l=a.substring(1).split(",").map(c=>parseFloat(c));return{x:l[0],y:l[1]}}).filter((a,l,c)=>{if(l===c.length-1)return!0;const h=c[l-1];return l===0||a.x!==h.x&&a.y!==h.y}).map(a=>({x:a.x+e.x,y:a.y+e.y}));return{startX:n[0]+e.x,startY:n[1]+e.y,endX:s[0]+e.x,endY:s[1]+e.y,reflectionPoints:o}},r1=(t,e)=>{const i=t.nodes.map(a=>a.startsWith("flowchart-")?a.split("-")[1]:a),r=e.querySelector(`[id='${t.id}']`);if(!r)throw new Error("SubGraph element not found");const n=so(r,e),s=r.getBBox(),o={width:s.width,height:s.height};return t.classes=void 0,t.dir=void 0,{...t,nodeIds:i,...n,...o,text:He(t.title)}},n1=(t,e)=>{var u,p,d;const i=e.querySelector(`[id*="flowchart-${t.id}-"]`);if(!i)return;let r;((u=i.parentElement)==null?void 0:u.tagName.toLowerCase())==="a"&&(r=i.parentElement.getAttribute("xlink:href"));const n=so(r?i.parentElement:i,e),s=i.getBBox(),o={width:s.width,height:s.height},a=(p=i.querySelector(".label-container"))==null?void 0:p.getAttribute("style"),l=(d=i.querySelector(".label"))==null?void 0:d.getAttribute("style"),c={};a==null||a.split(";").forEach(m=>{if(!m)return;const _=m.split(":")[0].trim(),C=m.split(":")[1].trim();c[_]=C});const h={};return l==null||l.split(";").forEach(m=>{if(!m)return;const _=m.split(":")[0].trim(),C=m.split(":")[1].trim();h[_]=C}),{id:t.id,labelType:t.labelType,text:He(t.text),type:t.type,link:r||void 0,...n,...o,containerStyle:c,labelStyle:h}},o1=(t,e)=>{const i=e.querySelector(`[id*="L-${t.start}-${t.end}"]`);if(!i)throw new Error("Edge element not found");const r=so(i,e),n=ec(i,r);return t.length=void 0,{...t,...n,text:He(t.text)}},so=(t,e)=>{var l;if(!t)throw new Error("Element not found");let i=(l=t.parentElement)==null?void 0:l.parentElement;const r=t.childNodes[0];let n={x:0,y:0};if(r){const{transformX:c,transformY:h}=Ie(r),u=r.getBBox();n={x:Number(r.getAttribute("x"))||c+u.x||0,y:Number(r.getAttribute("y"))||h+u.y||0}}const{transformX:s,transformY:o}=Ie(t),a={x:s+n.x,y:o+n.y};for(;i&&i.id!==e.id;){if(i.classList.value==="root"&&i.hasAttribute("transform")){const{transformX:c,transformY:h}=Ie(i);a.x+=c,a.y+=h}i=i.parentElement}return a},s1=(t,e)=>{t.parse();const i=t.parser.yy,r=i.getVertices();Object.keys(r).forEach(o=>{r[o]=n1(r[o],e)});const n=i.getEdges().map(o=>o1(o,e));return{type:"flowchart",subGraphs:i.getSubGraphs().map(o=>r1(o,e)),vertices:r,edges:n}},a1=(t,e)=>{const i={};e!=null&&e.label&&(i.label={text:He(e.label),fontSize:16});const r=t.tagName;if(r==="line")i.startX=Number(t.getAttribute("x1")),i.startY=Number(t.getAttribute("y1")),i.endX=Number(t.getAttribute("x2")),i.endY=Number(t.getAttribute("y2"));else if(r==="path"){const n=t.getAttribute("d");if(!n)throw new Error('Path element does not contain a "d" attribute');const s=n.split(/(?=[LC])/),o=s[0].substring(1).split(",").map(c=>parseFloat(c)),a=[];s.forEach(c=>{const h=c.substring(1).trim().split(" ").map(u=>{const[p,d]=u.split(",");return[parseFloat(p)-o[0],parseFloat(d)-o[1]]});a.push(...h)});const l=a[a.length-1];i.startX=o[0],i.startY=o[1],i.endX=l[0],i.endY=l[1],i.points=a}return e!=null&&e.label&&(i.startY=i.startY-10,i.endY=i.endY-10),i.strokeColor=t.getAttribute("stroke"),i.strokeWidth=Number(t.getAttribute("stroke-width")),i.type="arrow",i.strokeStyle=(e==null?void 0:e.strokeStyle)||"solid",i.startArrowhead=(e==null?void 0:e.startArrowhead)||null,i.endArrowhead=(e==null?void 0:e.endArrowhead)||null,i},ic=(t,e,i,r,n)=>{const s={};return s.type="arrow",s.startX=t,s.startY=e,s.endX=i,s.endY=r,Object.assign(s,{...n}),s},An=(t,e,i,r)=>({type:"text",x:t,y:e,text:i,width:(r==null?void 0:r.width)||20,height:(r==null?void 0:r.height)||20,fontSize:(r==null?void 0:r.fontSize)||Ln,id:r==null?void 0:r.id,groupId:r==null?void 0:r.groupId,metadata:r==null?void 0:r.metadata}),rc=(t,e,i)=>{const r={},n=Number(t.getAttribute("x")),s=Number(t.getAttribute("y"));r.type="text",r.text=He(e),i!=null&&i.id&&(r.id=i.id),i!=null&&i.groupId&&(r.groupId=i.groupId);const o=t.getBBox();r.width=o.width,r.height=o.height,r.x=n-o.width/2,r.y=s;const a=parseInt(getComputedStyle(t).fontSize);return r.fontSize=a,r},Pt=(t,e,i={})=>{const r={};r.type=e;const{label:n,subtype:s,id:o,groupId:a}=i;r.id=o,a&&(r.groupId=a),n&&(r.label={text:He(n.text),fontSize:16,verticalAlign:n==null?void 0:n.verticalAlign});const l=t.getBBox();switch(r.x=l.x,r.y=l.y,r.width=l.width,r.height=l.height,r.subtype=s,s){case"highlight":const c=t.getAttribute("fill");c&&(r.bgColor=c);break;case"note":r.strokeStyle="dashed";break}return r},gi=(t,e,i,r,n,s)=>{const o={};return o.startX=e,o.startY=i,o.endX=r,s!=null&&s.groupId&&(o.groupId=s.groupId),s!=null&&s.id&&(o.id=s.id),o.endY=n,o.strokeColor=t.getAttribute("stroke"),o.strokeWidth=Number(t.getAttribute("stroke-width")),o.type="line",o},As={0:"SOLID",1:"DOTTED",3:"SOLID_CROSS",4:"DOTTED_CROSS",5:"SOLID_OPEN",6:"DOTTED_OPEN",24:"SOLID_POINT",25:"DOTTED_POINT"},$t={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32},l1=t=>{let e;switch(t){case $t.SOLID:case $t.SOLID_CROSS:case $t.SOLID_OPEN:case $t.SOLID_POINT:e="solid";break;case $t.DOTTED:case $t.DOTTED_CROSS:case $t.DOTTED_OPEN:case $t.DOTTED_POINT:e="dotted";break;default:e="solid";break}return e},c1=(t,e)=>{var r,n;if(!!((r=t.nextElementSibling)!=null&&r.classList.contains("sequenceNumber"))){const s=(n=t.nextElementSibling)==null?void 0:n.textContent;if(!s)throw new Error("sequence number not present");const o=30,a=o/2,l=10,c={type:"rectangle",x:e.startX-l,y:e.startY-a,label:{text:s,fontSize:14},bgColor:"#e9ecef",height:o,subtype:"sequence"};Object.assign(e,{sequenceNumber:c})}},Ls=(t,e,i)=>{if(!t)throw"root node not found";const r=Xt(),n=Array.from(t.children),s=[];return n.forEach((o,a)=>{const l=`${i==null?void 0:i.id}-${a}`;let c;switch(o.tagName){case"line":const h=Number(o.getAttribute("x1")),u=Number(o.getAttribute("y1")),p=Number(o.getAttribute("x2")),d=Number(o.getAttribute("y2"));c=gi(o,h,u,p,d,{groupId:r,id:l});break;case"text":c=rc(o,e,{groupId:r,id:l});break;case"circle":c=Pt(o,"ellipse",{label:o.textContent?{text:o.textContent}:void 0,groupId:r,id:l});default:c=Pt(o,gc[o.tagName],{label:o.textContent?{text:o.textContent}:void 0,groupId:r,id:l})}s.push(c)}),s},h1=(t,e)=>{const i=Array.from(e.querySelectorAll(".actor")).filter(o=>o.tagName==="text").map(o=>o.parentElement),r=[],n=[],s=Object.keys(t).length;return Object.values(t).forEach((o,a)=>{const l=i[a],c=i[s+a];if(!l||!c)throw"root not found";const h=o.description;if(o.type==="participant"){const u=Pt(l.firstChild,"rectangle",{id:`${o.name}-top`,label:{text:h},subtype:"actor"});if(!u)throw"Top Node element not found!";r.push([u]);const p=Pt(c.firstChild,"rectangle",{id:`${o.name}-bottom`,label:{text:h},subtype:"actor"});r.push([p]);const d=l.previousElementSibling;if((d==null?void 0:d.tagName)!=="line")throw"Line not found";const m=Number(d.getAttribute("x1"));if(!u.height)throw"Top node element height is null";const _=u.y+u.height,C=p.y,$=Number(d.getAttribute("x2")),y=gi(d,m,_,$,C);n.push(y)}else if(o.type==="actor"){const u=Ls(l,h,{id:`${o.name}-top`});r.push(u);const p=Ls(c,h,{id:`${o.name}-bottom`});r.push(p);const d=l.previousElementSibling;if((d==null?void 0:d.tagName)!=="line")throw"Line not found";const m=Number(d.getAttribute("x1")),_=Number(d.getAttribute("y1")),C=Number(d.getAttribute("x2")),$=p.find(y=>y.type==="ellipse");if($){const y=$.y,E=gi(d,m,_,C,y);n.push(E)}}}),{nodes:r,lines:n}},u1=(t,e)=>{const i=[],r=Array.from(e.querySelectorAll('[class*="messageLine"]')),n=Object.keys(As),s=t.filter(o=>n.includes(o.type.toString()));return r.forEach((o,a)=>{const l=s[a],c=As[l.type],h=a1(o,{label:l==null?void 0:l.message,strokeStyle:l1(l.type),endArrowhead:c==="SOLID_OPEN"||c==="DOTTED_OPEN"?null:"arrow"});c1(o,h),i.push(h)}),i},d1=(t,e)=>{const i=Array.from(e.querySelectorAll(".note")).map(s=>s.parentElement),r=t.filter(s=>s.type===$t.NOTE),n=[];return i.forEach((s,o)=>{if(!s)return;const a=s.firstChild,l=r[o].message,c=Pt(a,"rectangle",{label:{text:l},subtype:"note"});n.push(c)}),n},f1=t=>{const e=Array.from(t.querySelectorAll("[class*=activation]")),i=[];return e.forEach(r=>{const n=Pt(r,"rectangle",{label:{text:""},subtype:"activation"});i.push(n)}),i},p1=(t,e)=>{const i=Array.from(e.querySelectorAll(".loopLine")),r=[],n=[],s=[];i.forEach(h=>{const u=Number(h.getAttribute("x1")),p=Number(h.getAttribute("y1")),d=Number(h.getAttribute("x2")),m=Number(h.getAttribute("y2")),_=gi(h,u,p,d,m);_.strokeStyle="dotted",_.strokeColor="#adb5bd",_.strokeWidth=2,r.push(_)});const o=Array.from(e.querySelectorAll(".loopText")),a=t.filter(h=>h.type===$t.CRITICAL_START).map(h=>h.message);o.forEach(h=>{var _;const u=h.textContent||"",p=rc(h,u),d=((_=u.match(/\[(.*?)\]/))==null?void 0:_[1])||"";a.includes(d)&&(p.x+=16),n.push(p)});const l=Array.from(e==null?void 0:e.querySelectorAll(".labelBox")),c=Array.from(e==null?void 0:e.querySelectorAll(".labelText"));return l.forEach((h,u)=>{var m;const p=((m=c[u])==null?void 0:m.textContent)||"",d=Pt(h,"rectangle",{label:{text:p}});d.strokeColor="#adb5bd",d.bgColor="#e9ecef",d.width=void 0,s.push(d)}),{lines:r,texts:n,nodes:s}},g1=t=>{const e=Array.from(t.querySelectorAll(".rect")).filter(r=>{var n;return((n=r.parentElement)==null?void 0:n.tagName)!=="g"}),i=[];return e.forEach(r=>{const n=Pt(r,"rectangle",{label:{text:""},subtype:"highlight"});i.push(n)}),i},m1=(t,e)=>{t.parse();const i=t.parser.yy,r=[],n=i.getBoxes(),s=g1(e),o=i.getActors(),{nodes:a,lines:l}=h1(o,e),c=i.getMessages(),h=u1(c,e),u=d1(c,e),p=f1(e),d=p1(c,e);return r.push(s),r.push(...a),r.push(u),r.push(p),{type:"sequence",lines:l,arrows:h,nodes:r,loops:d,groups:n}},Ni={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},Fs={LINE:0,DOTTED_LINE:1},_1=t=>{let e;switch(t){case Fs.LINE:e="solid";break;case Fs.DOTTED_LINE:e="dotted";break;default:e="solid"}return e},Os=t=>{let e;switch(t){case Ni.AGGREGATION:e="diamond_outline";break;case Ni.COMPOSITION:e="diamond";break;case Ni.EXTENSION:e="triangle_outline";break;case"none":e=null;break;case Ni.DEPENDENCY:default:e="arrow";break}return e},Is=(t,e)=>{const i=[],r=[],n=[];return Object.values(t).forEach(s=>{var _;const{domId:o,id:a}=s,l=Xt(),c=e.querySelector(`[id*=classId-${a}]`);if(!c)throw Error(`DOM Node with id ${o} not found`);const{transformX:h,transformY:u}=Ie(c),p=Pt(c.firstChild,"rectangle",{id:a,groupId:l});p.x+=h,p.y+=u,p.metadata={classId:a},i.push(p),Array.from(c.querySelectorAll(".divider")).forEach(C=>{const $=Number(C.getAttribute("x1")),y=Number(C.getAttribute("y1")),E=Number(C.getAttribute("x2")),W=Number(C.getAttribute("y2")),x=gi(C,$,y,E,W,{groupId:l,id:Xt()});x.startX+=h,x.startY+=u,x.endX+=h,x.endY+=u,x.metadata={classId:a},r.push(x)});const m=(_=c.querySelector(".label"))==null?void 0:_.children;if(!m)throw"label nodes not found";Array.from(m).forEach(C=>{const $=C.textContent;if(!$)return;const y=Xt(),{transformX:E,transformY:W}=Ie(C),x=C.getBBox(),j=10,U=An(h+E,u+W+j,$,{width:x.width,height:x.height,id:y,groupId:l,metadata:{classId:y}});n.push(U)})}),{nodes:i,lines:r,text:n}},y1=(t,e,i,r)=>{var a;const n=(a=i.querySelector(".edgePaths"))==null?void 0:a.children;if(!n)throw new Error("No Edges found!");const s=[],o=[];return t.forEach((l,c)=>{const{id1:h,id2:u,relation:p}=l,d=e.find(k=>k.id===h),m=e.find(k=>k.id===u),_=_1(p.lineType),C=Os(p.type1),$=Os(p.type2),y=ec(n[c]),{startX:E,startY:W,endX:x,endY:j}=y,U=ic(E,W,x,j,{strokeStyle:_,startArrowhead:C,endArrowhead:$,label:l.title?{text:l.title}:void 0,start:{type:"rectangle",id:d.id},end:{type:"rectangle",id:m.id}});s.push(U);const{relationTitle1:vt,relationTitle2:Ct}=l,z=20,R=15,it=15;let V,v;if(vt&&vt!=="none"){switch(r){case"TB":V=E-z,x<E&&(V-=it),v=W+R;break;case"BT":V=E+z,x>E&&(V+=it),v=W-R;break;case"LR":V=E+z,v=W+R,j>W&&(v+=it);break;case"RL":V=E-z,v=W-R,W>j&&(v-=it);break;default:V=E-z,v=W+R}const k=An(V,v,vt,{fontSize:16});o.push(k)}if(Ct&&Ct!=="none"){switch(r){case"TB":V=x+z,x<E&&(V+=it),v=j-R;break;case"BT":V=x-z,x>E&&(V-=it),v=j+R;break;case"LR":V=x-z,v=j-R,j>W&&(v-=it);break;case"RL":V=x+z,v=j+R,W>j&&(v+=it);break;default:V=x+z,v=j-R}const k=An(V,v,Ct,{fontSize:16});o.push(k)}}),{arrows:s,text:o}},b1=(t,e,i)=>{const r=[],n=[];return t.forEach(s=>{const{id:o,text:a,class:l}=s,c=e.querySelector(`#${o}`);if(!c)throw new Error(`Node with id ${o} not found!`);const{transformX:h,transformY:u}=Ie(c),p=c.firstChild,d=Pt(p,"rectangle",{id:o,subtype:"note",label:{text:a}});if(Object.assign(d,{x:d.x+h,y:d.y+u}),r.push(d),l){const m=i.find(W=>W.id===l);if(!m)throw new Error(`class node with id ${l} not found!`);const _=d.x+(d.width||0)/2,C=d.y+(d.height||0),$=_,y=m.y,E=ic(_,C,$,y,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:d.id,type:"rectangle"},end:{id:m.id,type:"rectangle"}});n.push(E)}}),{notes:r,connectors:n}},C1=(t,e)=>{t.parse();const i=t.parser.yy,r=i.getDirection(),n=[],s=[],o=[],a=[],l=i.getNamespaces();Object.keys(l).length&&Object.values(l).forEach(_=>{const C=Is(_.classes,e);n.push(C.nodes),s.push(...C.lines),o.push(...C.text),a.push(...C.nodes)});const c=i.getClasses();if(Object.keys(c).length){const _=Is(c,e);n.push(_.nodes),s.push(..._.lines),o.push(..._.text),a.push(..._.nodes)}const h=i.getRelations(),{arrows:u,text:p}=y1(h,a,e,r),{notes:d,connectors:m}=b1(i.getNotes(),e,a);return n.push(d),u.push(...m),o.push(...p),{type:"class",nodes:n,lines:s,arrows:u,text:o,namespaces:l}},x1=t=>{const e=t.querySelector("svg");if(!e)throw new Error("SVG element not found");const i=e.getBoundingClientRect(),r=i.width,n=i.height;e.setAttribute("width",`${r}`),e.setAttribute("height",`${n}`);const s="image/svg+xml",o=unescape(encodeURIComponent(e.outerHTML)),l=`data:image/svg+xml;base64,${btoa(o)}`;return{type:"graphImage",mimeType:s,dataURL:l,width:r,height:n}},T1=async t=>{yt.initialize(mc);const e=await yt.mermaidAPI.getDiagramFromText(e1(t)),{svg:i}=await yt.render("mermaid-to-excalidraw",t),r=document.createElement("div");r.setAttribute("style","opacity: 0; position: relative; z-index: -1;"),r.innerHTML=i,r.id="mermaid-diagram",document.body.appendChild(r);let n;switch(e.type){case"flowchart-v2":{n=s1(e,r);break}case"sequence":{n=m1(e,r);break}case"classDiagram":{n=C1(e,r);break}default:n=x1(r)}return r.remove(),n},S1=async(t,e={})=>{const i=await T1(t);return Ec(i,e)},j1=Object.freeze(Object.defineProperty({__proto__:null,parseMermaidToExcalidraw:S1},Symbol.toStringTag,{value:"Module"}));export{Rt as $,Un as A,bi as B,Xg as C,Oa as D,ze as E,Gp as F,Zg as G,Gg as H,im as I,Om as J,Fg as K,Pa as L,Ci as M,wg as N,We as O,hr as P,xe as Q,ae as R,cr as S,Wg as T,ds as U,Em as V,za as W,Ia as X,kn as Y,Vi as Z,N as _,yl as a,ii as a0,bt as a1,Ks as a2,Pc as a3,qC as a4,Xd as a5,Ac as a6,Ym as a7,Z_ as a8,Tl as a9,D1 as aA,$1 as aB,L1 as aC,Zm as aD,r0 as aE,W1 as aF,by as aG,Oy as aH,ay as aI,xl as aJ,yi as aK,I as aL,D as aM,j1 as aN,dy as aa,My as ab,Mn as ac,Zs as ad,gt as ae,_i as af,Tu as ag,ta as ah,w1 as ai,Fc as aj,$n as ak,ie as al,ai as am,Mo as an,Au as ao,M1 as ap,ro as aq,Pn as ar,A1 as as,O1 as at,zo as au,qo as av,I1 as aw,F1 as ax,B1 as ay,E1 as az,_l as b,Jt as c,di as d,ct as e,yr as f,ml as g,Mt as h,ey as i,Vn as j,Py as k,A as l,be as m,Ns as n,Ud as o,Fy as p,Ua as q,ky as r,gl as s,iy as t,pi as u,bl as v,Ny as w,Cl as x,Zi as y,pl as z};
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = ["assets/c4Diagram-9cddb37f-N9kopixF.js","assets/svgDrawCommon-f26cad39-uSOEV6F1.js","assets/index-2K3MavtT.js","assets/index-4wu8EIXu.css","assets/flowDiagram-93327f21-bzemmV0w.js","assets/flowDb-6a57c1b4-o7QdmK-d.js","assets/layout-ewywu0M6.js","assets/styles-5f89df53-Cnw1EiWb.js","assets/index-a92ac404-gZDUZJdp.js","assets/edges-49ac43a2-VNwnN65b.js","assets/createText-3df630b5-oLWc-GwH.js","assets/svgDraw-0fcc813d-8P1J7hc8.js","assets/line-reZX-DPl.js","assets/array-Nw74a44z.js","assets/path-aUcfwwLI.js","assets/selectAll-ksDY_7eo.js","assets/flowDiagram-v2-476db779-kB7FwdKI.js","assets/erDiagram-f6946109-z4VASuEu.js","assets/gitGraphDiagram-1e960c50-nR2fIRcx.js","assets/ganttDiagram-7ce12d6b-bNEEGiE3.js","assets/linear-WA_JRKe7.js","assets/init-Hi12RPRh.js","assets/infoDiagram-264bed3e-S8LyFZ95.js","assets/pieDiagram-157505fe-K3QYu1_A.js","assets/arc-uMvMTTPz.js","assets/quadrantDiagram-fd70f2d0-9W_l-w0k.js","assets/requirementDiagram-19c99588-nu0kgzn5.js","assets/sequenceDiagram-5dfd0049-6G3skaqL.js","assets/classDiagram-bc733c3b-nWtrl_HS.js","assets/styles-aefe6593-IaILeGot.js","assets/classDiagram-v2-8931bdaf-hkLGNE-q.js","assets/stateDiagram-133e3642-C-DPoShl.js","assets/styles-fa41df25-AN4ki2j_.js","assets/stateDiagram-v2-6371a76b-m56clzbO.js","assets/journeyDiagram-31be0096-pp8z6RK0.js","assets/flowchart-elk-definition-5082a990-_inAippy.js","assets/_commonjs-dynamic-modules-h-SxKiO4.js","assets/timeline-definition-5ed366f4-6Q7yW0Tk.js","assets/mindmap-definition-4fc2557c-YYRKFqOa.js"]
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
//# sourceMappingURL=index-jpNTxDe4.js.map