cc-viewer 1.6.145 → 1.6.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{App-BPCacQDX.js → App-Bg1ykw9N.js} +2 -2
- package/dist/assets/{AppHeader.module-QcskUPdE.js → AppHeader.module-DhcOuZms.js} +167 -167
- package/dist/assets/{Mobile-DThGtdjg.js → Mobile-BjRsnayd.js} +1 -1
- package/dist/assets/_baseUniq-BiHiW46-.js +1 -0
- package/dist/assets/{arc-CsAXcIuy.js → arc-AIJRwdpf.js} +1 -1
- package/dist/assets/architectureDiagram-Q4EWVU46-DZn-XLQV.js +36 -0
- package/dist/assets/{blockDiagram-WCTKOSBZ-C2F9kq9K.js → blockDiagram-DXYQGD6D-Dy3byd3t.js} +6 -6
- package/dist/assets/c4Diagram-AHTNJAMY-G40SkaxF.js +10 -0
- package/dist/assets/channel-BRg2_FRk.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-sJCFl3Gt.js → chunk-4BX2VUAB-Bk4vL9wC.js} +1 -1
- package/dist/assets/chunk-4TB4RGXK-B2D4JHi6.js +206 -0
- package/dist/assets/{chunk-55IACEB6-ZZ26iUgb.js → chunk-55IACEB6-B0-Hl4vJ.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-DcwKWdB5.js → chunk-EDXVE4YY-6ATgq6Wq.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-IF1GrXIm.js → chunk-FMBD7UC4-DfTtc0R0.js} +1 -1
- package/dist/assets/chunk-OYMX7WX6-jaqxbY2l.js +231 -0
- package/dist/assets/{chunk-QZHKN3VN-DnXCfqe9.js → chunk-QZHKN3VN-CPafBHbx.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-DHvLzKGB.js → chunk-YZCP3GAM-DLHyHlLG.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-Qq_hSpx1.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-Qq_hSpx1.js +1 -0
- package/dist/assets/clone-BhABW5fY.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DWzGLG1h.js → cose-bilkent-S5V4N54A-ZT0ZeYB-.js} +1 -1
- package/dist/assets/{cytoscape.esm-BQaXIfA_.js → cytoscape.esm-DxGcaOPV.js} +4 -4
- package/dist/assets/dagre-KV5264BT-CwDQ9l6b.js +4 -0
- package/dist/assets/diagram-5BDNPKRD-CSCXklZU.js +10 -0
- package/dist/assets/diagram-G4DWMVQ6-CjjGYG0E.js +24 -0
- package/dist/assets/diagram-MMDJMWI5-Cftn-Qdy.js +43 -0
- package/dist/assets/diagram-TYMM5635-BeezZrTd.js +24 -0
- package/dist/assets/erDiagram-SMLLAGMA-ByJh9pMp.js +85 -0
- package/dist/assets/flowDiagram-DWJPFMVM-DrcBxT9C.js +162 -0
- package/dist/assets/{ganttDiagram-A5KZAMGK-D5GYC6WT.js → ganttDiagram-T4ZO3ILL-mN4NOW1U.js} +4 -4
- package/dist/assets/gitGraphDiagram-UUTBAWPF-DAo6LzCC.js +106 -0
- package/dist/assets/graph-CXqohRNR.js +1 -0
- package/dist/assets/{index-LbnIqHk5.js → index-DSND3yxX.js} +2 -2
- package/dist/assets/infoDiagram-42DDH7IO-DIpCJx1X.js +2 -0
- package/dist/assets/{ishikawaDiagram-PHBUUO56-DnbLMhAb.js → ishikawaDiagram-UXIWVN3A-DZbNsvGT.js} +2 -2
- package/dist/assets/journeyDiagram-VCZTEJTY-DTxQPxwN.js +139 -0
- package/dist/assets/{kanban-definition-K7BYSVSG-gEGqSR0y.js → kanban-definition-6JOO6SKY-fryTe3NV.js} +6 -6
- package/dist/assets/{katex-f0vruDP5.js → katex-DkKDou_j.js} +17 -25
- package/dist/assets/layout-C1gHGo0J.js +1 -0
- package/dist/assets/{linear-ReYEEL1R.js → linear-HLMb6250.js} +1 -1
- package/dist/assets/mermaid.core-CMhqtu8w.js +308 -0
- package/dist/assets/min-BpC86Zva.js +1 -0
- package/dist/assets/mindmap-definition-QFDTVHPH-D5KUUhQn.js +96 -0
- package/dist/assets/pieDiagram-DEJITSTG-D5qj26lg.js +30 -0
- package/dist/assets/{quadrantDiagram-337W2JSQ-A3lokKWj.js → quadrantDiagram-34T5L4WZ-BUkrkdNG.js} +1 -1
- package/dist/assets/requirementDiagram-MS252O5E-6SO8vXf5.js +84 -0
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-C5wFSz8a.js → sankeyDiagram-XADWPNL6-Bu3WwTPe.js} +2 -2
- package/dist/assets/sequenceDiagram-FGHM5R23-DSJN8bds.js +157 -0
- package/dist/assets/stateDiagram-FHFEXIEX-Cn4Rn5T-.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-CEMHmyFQ.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-v8yp7Wsn.js +120 -0
- package/dist/assets/{vennDiagram-LZ73GAT5-BlPc8f4w.js → vennDiagram-DHZGUBPP-CRF3cJL1.js} +5 -5
- package/dist/assets/wardley-RL74JXVD-lc9SJ1ni.js +162 -0
- package/dist/assets/wardleyDiagram-NUSXRM2D-Dsk2SPYg.js +20 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-D7oIwksS.js +7 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/_basePickBy-C3yxr0y6.js +0 -1
- package/dist/assets/_baseUniq-CVcJ-lr1.js +0 -1
- package/dist/assets/architectureDiagram-2XIMDMQ5-m5ndCHP6.js +0 -36
- package/dist/assets/c4Diagram-IC4MRINW-DQnqFzCk.js +0 -10
- package/dist/assets/channel-BIWi3RbV.js +0 -1
- package/dist/assets/chunk-NQ4KR5QH-DwJkLVO2.js +0 -220
- package/dist/assets/chunk-WL4C6EOR-BxjnYZJN.js +0 -189
- package/dist/assets/classDiagram-VBA2DB6C-BSWVMGXL.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-BSWVMGXL.js +0 -1
- package/dist/assets/clone-_-3fMJgy.js +0 -1
- package/dist/assets/dagre-KLK3FWXG-Dy5DHz5U.js +0 -4
- package/dist/assets/diagram-E7M64L7V-DNHsmwnC.js +0 -24
- package/dist/assets/diagram-IFDJBPK2-hUH_ncvk.js +0 -43
- package/dist/assets/diagram-P4PSJMXO-BuQdbXJo.js +0 -24
- package/dist/assets/erDiagram-INFDFZHY-DhpzAH03.js +0 -70
- package/dist/assets/flowDiagram-PKNHOUZH-B9iPD7X6.js +0 -162
- package/dist/assets/gitGraphDiagram-K3NZZRJ6-CmpKPRI3.js +0 -65
- package/dist/assets/graph-iD9rZR0_.js +0 -1
- package/dist/assets/infoDiagram-LFFYTUFH-C7KlvwiT.js +0 -2
- package/dist/assets/journeyDiagram-4ABVD52K-CE5FVoRM.js +0 -139
- package/dist/assets/layout-Bel_oeSz.js +0 -1
- package/dist/assets/mermaid.core-ImsNGbuM.js +0 -254
- package/dist/assets/mindmap-definition-YRQLILUH-BiOwVfEW.js +0 -68
- package/dist/assets/pieDiagram-SKSYHLDU-DPcNaxZY.js +0 -30
- package/dist/assets/requirementDiagram-Z7DCOOCP-C2ccrp69.js +0 -73
- package/dist/assets/sequenceDiagram-2WXFIKYE-B4632Pnl.js +0 -145
- package/dist/assets/stateDiagram-RAJIS63D-BjasCgMJ.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-B30g1mLW.js +0 -1
- package/dist/assets/timeline-definition-YZTLITO2-DU6d0QTq.js +0 -61
- package/dist/assets/treemap-KZPCXAKY-CC8iLif5.js +0 -162
- package/dist/assets/xychartDiagram-JWTSCODW-C1egzVx-.js +0 -7
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-CwDQ9l6b.js","assets/graph-CXqohRNR.js","assets/_baseUniq-BiHiW46-.js","assets/layout-C1gHGo0J.js","assets/min-BpC86Zva.js","assets/clone-BhABW5fY.js","assets/index-DSND3yxX.js","assets/index-DpVZHXlw.css","assets/AppHeader.module-DhcOuZms.js","assets/AppHeader-ByR6-vBp.css","assets/cose-bilkent-S5V4N54A-ZT0ZeYB-.js","assets/cytoscape.esm-DxGcaOPV.js","assets/c4Diagram-AHTNJAMY-G40SkaxF.js","assets/chunk-YZCP3GAM-DLHyHlLG.js","assets/flowDiagram-DWJPFMVM-DrcBxT9C.js","assets/chunk-FMBD7UC4-DfTtc0R0.js","assets/chunk-55IACEB6-B0-Hl4vJ.js","assets/chunk-EDXVE4YY-6ATgq6Wq.js","assets/channel-BRg2_FRk.js","assets/erDiagram-SMLLAGMA-ByJh9pMp.js","assets/gitGraphDiagram-UUTBAWPF-DAo6LzCC.js","assets/chunk-4BX2VUAB-Bk4vL9wC.js","assets/chunk-QZHKN3VN-CPafBHbx.js","assets/wardley-RL74JXVD-lc9SJ1ni.js","assets/ganttDiagram-T4ZO3ILL-mN4NOW1U.js","assets/linear-HLMb6250.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-DIpCJx1X.js","assets/pieDiagram-DEJITSTG-D5qj26lg.js","assets/arc-AIJRwdpf.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-34T5L4WZ-BUkrkdNG.js","assets/xychartDiagram-5P7HB3ND-D7oIwksS.js","assets/requirementDiagram-MS252O5E-6SO8vXf5.js","assets/sequenceDiagram-FGHM5R23-DSJN8bds.js","assets/classDiagram-6PBFFD2Q-Qq_hSpx1.js","assets/chunk-4TB4RGXK-B2D4JHi6.js","assets/classDiagram-v2-HSJHXN6E-Qq_hSpx1.js","assets/stateDiagram-FHFEXIEX-Cn4Rn5T-.js","assets/chunk-OYMX7WX6-jaqxbY2l.js","assets/stateDiagram-v2-QKLJ7IA2-CEMHmyFQ.js","assets/journeyDiagram-VCZTEJTY-DTxQPxwN.js","assets/timeline-definition-GMOUNBTQ-v8yp7Wsn.js","assets/mindmap-definition-QFDTVHPH-D5KUUhQn.js","assets/kanban-definition-6JOO6SKY-fryTe3NV.js","assets/sankeyDiagram-XADWPNL6-Bu3WwTPe.js","assets/diagram-TYMM5635-BeezZrTd.js","assets/diagram-MMDJMWI5-Cftn-Qdy.js","assets/blockDiagram-DXYQGD6D-Dy3byd3t.js","assets/diagram-5BDNPKRD-CSCXklZU.js","assets/architectureDiagram-Q4EWVU46-DZn-XLQV.js","assets/ishikawaDiagram-UXIWVN3A-DZbNsvGT.js","assets/vennDiagram-DHZGUBPP-CRF3cJL1.js","assets/diagram-G4DWMVQ6-CjjGYG0E.js","assets/wardleyDiagram-NUSXRM2D-Dsk2SPYg.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var ff=Object.defineProperty;var yf=(e,t,r)=>t in e?ff(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pt=(e,t,r)=>yf(e,typeof t!="symbol"?t+"":t,r);import{g as mf,_ as ot}from"./index-DSND3yxX.js";import{p as Br,b7 as Cf,b8 as xf,b9 as bf}from"./AppHeader.module-DhcOuZms.js";var Ni={exports:{}},kf=Ni.exports,fn;function Tf(){return fn||(fn=1,(function(e,t){(function(r,i){e.exports=i()})(kf,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",n="second",o="minute",l="hour",h="day",c="week",u="month",p="quarter",d="year",f="date",y="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var M=["th","st","nd","rd"],L=I%100;return"["+I+(M[(L-20)%10]||M[L]||M[0])+"]"}},k=function(I,M,L){var E=String(I);return!E||E.length>=M?I:""+Array(M+1-E.length).join(L)+I},_={s:k,z:function(I){var M=-I.utcOffset(),L=Math.abs(M),E=Math.floor(L/60),F=L%60;return(M<=0?"+":"-")+k(E,2,"0")+":"+k(F,2,"0")},m:function I(M,L){if(M.date()<L.date())return-I(L,M);var E=12*(L.year()-M.year())+(L.month()-M.month()),F=M.clone().add(E,u),q=L-F<0,z=M.clone().add(E+(q?-1:1),u);return+(-(E+(L-F)/(q?F-z:z-F))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:u,y:d,w:c,d:h,D:f,h:l,m:o,s:n,ms:a,Q:p}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},w="en",v={};v[w]=b;var T="$isDayjsObject",B=function(I){return I instanceof W||!(!I||!I[T])},R=function I(M,L,E){var F;if(!M)return w;if(typeof M=="string"){var q=M.toLowerCase();v[q]&&(F=q),L&&(v[q]=L,F=q);var z=M.split("-");if(!F&&z.length>1)return I(z[0])}else{var et=M.name;v[et]=M,F=et}return!E&&F&&(w=F),F||!E&&w},D=function(I,M){if(B(I))return I.clone();var L=typeof M=="object"?M:{};return L.date=I,L.args=arguments,new W(L)},O=_;O.l=R,O.i=B,O.w=function(I,M){return D(I,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var W=(function(){function I(L){this.$L=R(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[T]=!0}var M=I.prototype;return M.parse=function(L){this.$d=(function(E){var F=E.date,q=E.utc;if(F===null)return new Date(NaN);if(O.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var z=F.match(m);if(z){var et=z[2]-1||0,st=(z[7]||"0").substring(0,3);return q?new Date(Date.UTC(z[1],et,z[3]||1,z[4]||0,z[5]||0,z[6]||0,st)):new Date(z[1],et,z[3]||1,z[4]||0,z[5]||0,z[6]||0,st)}}return new Date(F)})(L),this.init()},M.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},M.$utils=function(){return O},M.isValid=function(){return this.$d.toString()!==y},M.isSame=function(L,E){var F=D(L);return this.startOf(E)<=F&&F<=this.endOf(E)},M.isAfter=function(L,E){return D(L)<this.startOf(E)},M.isBefore=function(L,E){return this.endOf(E)<D(L)},M.$g=function(L,E,F){return O.u(L)?this[E]:this.set(F,L)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(L,E){var F=this,q=!!O.u(E)||E,z=O.p(L),et=function(te,V){var rt=O.w(F.$u?Date.UTC(F.$y,V,te):new Date(F.$y,V,te),F);return q?rt:rt.endOf(h)},st=function(te,V){return O.w(F.toDate()[te].apply(F.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(V)),F)},lt=this.$W,nt=this.$M,ut=this.$D,bt="set"+(this.$u?"UTC":"");switch(z){case d:return q?et(1,0):et(31,11);case u:return q?et(1,nt):et(0,nt+1);case c:var $t=this.$locale().weekStart||0,Jt=(lt<$t?lt+7:lt)-$t;return et(q?ut-Jt:ut+(6-Jt),nt);case h:case f:return st(bt+"Hours",0);case l:return st(bt+"Minutes",1);case o:return st(bt+"Seconds",2);case n:return st(bt+"Milliseconds",3);default:return this.clone()}},M.endOf=function(L){return this.startOf(L,!1)},M.$set=function(L,E){var F,q=O.p(L),z="set"+(this.$u?"UTC":""),et=(F={},F[h]=z+"Date",F[f]=z+"Date",F[u]=z+"Month",F[d]=z+"FullYear",F[l]=z+"Hours",F[o]=z+"Minutes",F[n]=z+"Seconds",F[a]=z+"Milliseconds",F)[q],st=q===h?this.$D+(E-this.$W):E;if(q===u||q===d){var lt=this.clone().set(f,1);lt.$d[et](st),lt.init(),this.$d=lt.set(f,Math.min(this.$D,lt.daysInMonth())).$d}else et&&this.$d[et](st);return this.init(),this},M.set=function(L,E){return this.clone().$set(L,E)},M.get=function(L){return this[O.p(L)]()},M.add=function(L,E){var F,q=this;L=Number(L);var z=O.p(E),et=function(nt){var ut=D(q);return O.w(ut.date(ut.date()+Math.round(nt*L)),q)};if(z===u)return this.set(u,this.$M+L);if(z===d)return this.set(d,this.$y+L);if(z===h)return et(1);if(z===c)return et(7);var st=(F={},F[o]=i,F[l]=s,F[n]=r,F)[z]||1,lt=this.$d.getTime()+L*st;return O.w(lt,this)},M.subtract=function(L,E){return this.add(-1*L,E)},M.format=function(L){var E=this,F=this.$locale();if(!this.isValid())return F.invalidDate||y;var q=L||"YYYY-MM-DDTHH:mm:ssZ",z=O.z(this),et=this.$H,st=this.$m,lt=this.$M,nt=F.weekdays,ut=F.months,bt=F.meridiem,$t=function(V,rt,gt,_t){return V&&(V[rt]||V(E,q))||gt[rt].slice(0,_t)},Jt=function(V){return O.s(et%12||12,V,"0")},te=bt||function(V,rt,gt){var _t=V<12?"AM":"PM";return gt?_t.toLowerCase():_t};return q.replace(C,(function(V,rt){return rt||(function(gt){switch(gt){case"YY":return String(E.$y).slice(-2);case"YYYY":return O.s(E.$y,4,"0");case"M":return lt+1;case"MM":return O.s(lt+1,2,"0");case"MMM":return $t(F.monthsShort,lt,ut,3);case"MMMM":return $t(ut,lt);case"D":return E.$D;case"DD":return O.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return $t(F.weekdaysMin,E.$W,nt,2);case"ddd":return $t(F.weekdaysShort,E.$W,nt,3);case"dddd":return nt[E.$W];case"H":return String(et);case"HH":return O.s(et,2,"0");case"h":return Jt(1);case"hh":return Jt(2);case"a":return te(et,st,!0);case"A":return te(et,st,!1);case"m":return String(st);case"mm":return O.s(st,2,"0");case"s":return String(E.$s);case"ss":return O.s(E.$s,2,"0");case"SSS":return O.s(E.$ms,3,"0");case"Z":return z}return null})(V)||z.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(L,E,F){var q,z=this,et=O.p(E),st=D(L),lt=(st.utcOffset()-this.utcOffset())*i,nt=this-st,ut=function(){return O.m(z,st)};switch(et){case d:q=ut()/12;break;case u:q=ut();break;case p:q=ut()/3;break;case c:q=(nt-lt)/6048e5;break;case h:q=(nt-lt)/864e5;break;case l:q=nt/s;break;case o:q=nt/i;break;case n:q=nt/r;break;default:q=nt}return F?q:O.a(q)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return v[this.$L]},M.locale=function(L,E){if(!L)return this.$L;var F=this.clone(),q=R(L,E,!0);return q&&(F.$L=q),F},M.clone=function(){return O.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},I})(),N=W.prototype;return D.prototype=N,[["$ms",a],["$s",n],["$m",o],["$H",l],["$W",h],["$M",u],["$y",d],["$D",f]].forEach((function(I){N[I[1]]=function(M){return this.$g(M,I[0],I[1])}})),D.extend=function(I,M){return I.$i||(I(M,W,D),I.$i=!0),D},D.locale=R,D.isDayjs=B,D.unix=function(I){return D(1e3*I)},D.en=v[w],D.Ls=v,D.p={},D}))})(Ni)),Ni.exports}var wf=Tf();const _f=mf(wf);var Kl=Object.defineProperty,g=(e,t)=>Kl(e,"name",{value:t,configurable:!0}),Sf=(e,t)=>{for(var r in t)Kl(e,r,{get:t[r],enumerable:!0})},ce={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},P={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},po=g(function(e="fatal"){let t=ce.fatal;typeof e=="string"?e.toLowerCase()in ce&&(t=ce[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=ce.fatal&&(P.fatal=console.error?console.error.bind(console,Yt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Yt("FATAL"))),t<=ce.error&&(P.error=console.error?console.error.bind(console,Yt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Yt("ERROR"))),t<=ce.warn&&(P.warn=console.warn?console.warn.bind(console,Yt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Yt("WARN"))),t<=ce.info&&(P.info=console.info?console.info.bind(console,Yt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Yt("INFO"))),t<=ce.debug&&(P.debug=console.debug?console.debug.bind(console,Yt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yt("DEBUG"))),t<=ce.trace&&(P.trace=console.debug?console.debug.bind(console,Yt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yt("TRACE")))},"setLogLevel"),Yt=g(e=>`%c${_f().format("ss.SSS")} : ${e} : `,"format");const zi={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return zi.hue2rgb(a,s,e+1/3)*255;case"g":return zi.hue2rgb(a,s,e)*255;case"b":return zi.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),n=(s+a)/2;if(i==="l")return n*100;if(s===a)return 0;const o=s-a,l=n>.5?o/(2-s-a):o/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},vf={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Bf={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},tt={channel:zi,lang:vf,unit:Bf},we={};for(let e=0;e<=255;e++)we[e]=tt.unit.dec2hex(e);const Lt={ALL:0,RGB:1,HSL:2};class Lf{constructor(){this.type=Lt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Lt.ALL}is(t){return this.type===t}}class Ff{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Lf}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Lt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=tt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=tt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=tt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=tt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=tt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=tt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Lt.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Lt.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Lt.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Lt.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Lt.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Lt.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Lt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Lt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Lt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Lt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Lt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Lt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const As=new Ff({r:0,g:0,b:0,a:0},"transparent"),ur={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ur.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,n=s>4,o=n?1:17,l=n?8:4,h=a?0:-1,c=n?255:15;return As.set({r:(i>>l*(h+3)&c)*o,g:(i>>l*(h+2)&c)*o,b:(i>>l*(h+1)&c)*o,a:a?(i&c)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${we[Math.round(t)]}${we[Math.round(r)]}${we[Math.round(i)]}${we[Math.round(s*255)]}`:`#${we[Math.round(t)]}${we[Math.round(r)]}${we[Math.round(i)]}`}},Ne={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Ne.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return tt.channel.clamp.h(parseFloat(r)*.9);case"rad":return tt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return tt.channel.clamp.h(parseFloat(r)*360)}}return tt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ne.re);if(!r)return;const[,i,s,a,n,o]=r;return As.set({h:Ne._hue2deg(i),s:tt.channel.clamp.s(parseFloat(s)),l:tt.channel.clamp.l(parseFloat(a)),a:n?tt.channel.clamp.a(o?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%, ${s})`:`hsl(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%)`}},Jr={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Jr.colors[e];if(t)return ur.parse(t)},stringify:e=>{const t=ur.stringify(e);for(const r in Jr.colors)if(Jr.colors[r]===t)return r}},jr={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(jr.re);if(!r)return;const[,i,s,a,n,o,l,h,c]=r;return As.set({r:tt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:tt.channel.clamp.g(n?parseFloat(a)*2.55:parseFloat(a)),b:tt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:h?tt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)}, ${tt.lang.round(s)})`:`rgb(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)})`}},se={format:{keyword:Jr,hex:ur,rgb:jr,rgba:jr,hsl:Ne,hsla:Ne},parse:e=>{if(typeof e!="string")return e;const t=ur.parse(e)||jr.parse(e)||Ne.parse(e)||Jr.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Lt.HSL)||e.data.r===void 0?Ne.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?jr.stringify(e):ur.stringify(e)},Jl=(e,t)=>{const r=se.parse(e);for(const i in t)r[i]=tt.channel.clamp[i](t[i]);return se.stringify(r)},ve=(e,t,r=0,i=1)=>{if(typeof e!="number")return Jl(e,{a:t});const s=As.set({r:tt.channel.clamp.r(e),g:tt.channel.clamp.g(t),b:tt.channel.clamp.b(r),a:tt.channel.clamp.a(i)});return se.stringify(s)},Mf=e=>{const{r:t,g:r,b:i}=se.parse(e),s=.2126*tt.channel.toLinear(t)+.7152*tt.channel.toLinear(r)+.0722*tt.channel.toLinear(i);return tt.lang.round(s)},Af=e=>Mf(e)>=.5,Qt=e=>!Af(e),th=(e,t,r)=>{const i=se.parse(e),s=i[t],a=tt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),se.stringify(i)},$=(e,t)=>th(e,"l",t),A=(e,t)=>th(e,"l",-t),x=(e,t)=>{const r=se.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Jl(e,i)},$f=(e,t,r=50)=>{const{r:i,g:s,b:a,a:n}=se.parse(e),{r:o,g:l,b:h,a:c}=se.parse(t),u=r/100,p=u*2-1,d=n-c,y=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,m=1-y,C=i*y+o*m,b=s*y+l*m,k=a*y+h*m,_=n*u+c*(1-u);return ve(C,b,k,_)},S=(e,t=100)=>{const r=se.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,$f(r,e,t)};var eh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ti=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ef=/\s*%%.*\n/gm,pr,rh=(pr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(pr,"UnknownDiagramError"),pr),Xe={},go=g(function(e,t){e=e.replace(eh,"").replace(ti,"").replace(Ef,`
|
|
3
|
+
`);for(const[r,{detector:i}]of Object.entries(Xe))if(i(e,t))return r;throw new rh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),fa=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)ih(t,r,i)},"registerLazyLoadedDiagrams"),ih=g((e,t,r)=>{Xe[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),Xe[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Of=g(e=>Xe[e].loader,"getDiagramLoader"),ya=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>ya(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=ya(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Tt=ya,oe="#ffffff",ne="#f2f2f2",J=g((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),gr,If=(gr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,n,o,l,h,c,u,p,d,f,y,m,C,b,k,_,w,v,T;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(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||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10)):(this.rowOdd=this.rowOdd||$(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||$(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScale"+B]=A(this["cScale"+B],75);else for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScale"+B]=A(this["cScale"+B],25);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleInv"+B]=this["cScaleInv"+B]||S(this["cScale"+B]);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this.darkMode?this["cScalePeer"+B]=this["cScalePeer"+B]||$(this["cScale"+B],10):this["cScalePeer"+B]=this["cScalePeer"+B]||A(this["cScale"+B],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleLabel"+B]=this["cScaleLabel"+B]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let B=0;B<5;B++)this["surface"+B]=this["surface"+B]||x(this.mainBkg,{h:180,s:-15,l:t*(5+B*3)}),this["surfacePeer"+B]=this["surfacePeer"+B]||x(this.mainBkg,{h:180,s:-15,l:t*(8+B*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((p=this.xyChart)==null?void 0:p.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,dataLabelColor:((f=this.xyChart)==null?void 0:f.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((y=this.xyChart)==null?void 0:y.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((C=this.xyChart)==null?void 0:C.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((k=this.xyChart)==null?void 0:k.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_=this.xyChart)==null?void 0:_.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((T=this.xyChart)==null?void 0:T.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(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||oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(gr,"Theme"),gr),Df=g(e=>{const t=new If;return t.calculate(e),t},"getThemeVariables"),fr,Pf=(fr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(S("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ve(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=A("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=ve(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ve(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||$(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,n,o,l,h,c,u,p,d,f,y,m,C,b,k,_,w,v;this.secondBkg=$(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=$(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=$(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=S(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||S(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScalePeer"+T]=this["cScalePeer"+T]||$(this["cScale"+T],10);for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{h:30,s:-30,l:-(-10+T*4)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{h:30,s:-30,l:-(-7+T*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["pie"+T]=this["cScale"+T];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let T=0;T<8;T++)this["venn"+(T+1)]=this["venn"+(T+1)]??$(this["cScale"+T],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((f=this.radar)==null?void 0:f.axisStrokeWidth)||2,axisLabelFontSize:((y=this.radar)==null?void 0:y.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=$(this.secondaryColor,20),this.git1=$(this.pie2||this.secondaryColor,20),this.git2=$(this.pie3||this.tertiaryColor,20),this.git3=$(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=$(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=$(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=$(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=$(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||S(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||S(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||$(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(fr,"Theme"),fr),Rf=g(e=>{const t=new Pf;return t.calculate(e),t},"getThemeVariables"),yr,qf=(yr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=ve(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,n,o,l,h,c,u,p,d,f,y,m,C,b,k,_,w,v;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=A(this["cScale"+T],10),this["cScalePeer"+T]=this["cScalePeer"+T]||A(this["cScale"+T],25);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||x(this["cScale"+T],{h:180});for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{h:30,l:-(5+T*5)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{h:30,l:-(7+T*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||S(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||S(this.labelTextColor);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||$(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||$(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((o=this.radar)==null?void 0:o.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,dataLabelColor:((d=this.xyChart)==null?void 0:d.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((f=this.xyChart)==null?void 0:f.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((y=this.xyChart)==null?void 0:y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((C=this.xyChart)==null?void 0:C.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((k=this.xyChart)==null?void 0:k.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||A(S(this.git0),25),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||S(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||S(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||oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(yr,"Theme"),yr),Nf=g(e=>{const t=new qf;return t.calculate(e),t},"getThemeVariables"),mr,zf=(mr=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=$("#cde498",10),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.primaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,n,o,l,h,c,u,p,d,f,y,m,C,b,k,_,w,v;this.actorBorder=A(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=A(this["cScale"+T],10),this["cScalePeer"+T]=this["cScalePeer"+T]||A(this["cScale"+T],25);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||x(this["cScale"+T],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{h:30,s:-30,l:-(5+T*5)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{h:30,s:-30,l:-(8+T*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||$(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||$(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((o=this.radar)==null?void 0:o.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,dataLabelColor:((d=this.xyChart)==null?void 0:d.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((f=this.xyChart)==null?void 0:f.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((y=this.xyChart)==null?void 0:y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((C=this.xyChart)==null?void 0:C.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((k=this.xyChart)==null?void 0:k.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||S(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||S(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||oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(mr,"Theme"),mr),Wf=g(e=>{const t=new zf;return t.calculate(e),t},"getThemeVariables"),Cr,Hf=(Cr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=$(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||$(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,n,o,l,h,c,u,p,d,f,y,m,C,b,k,_,w,v;this.secondBkg=$(this.contrast,55),this.border2=this.contrast,this.actorBorder=$(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||S(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this.darkMode?this["cScalePeer"+T]=this["cScalePeer"+T]||$(this["cScale"+T],10):this["cScalePeer"+T]=this["cScalePeer"+T]||A(this["cScale"+T],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{l:-(5+T*5)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{l:-(8+T*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=$(this.contrast,30),this.sectionBkgColor2=$(this.contrast,30),this.taskBorderColor=A(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=$(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["pie"+T]=this["cScale"+T];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let T=0;T<8;T++)this["venn"+(T+1)]=this["venn"+(T+1)]??this["cScale"+T];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((f=this.radar)==null?void 0:f.axisStrokeWidth)||2,axisLabelFontSize:((y=this.radar)==null?void 0:y.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(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||oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Cr,"Theme"),Cr),Yf=g(e=>{const t=new Hf;return t.calculate(e),t},"getThemeVariables"),xr,jf=(xr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,n,o,l,h,c,u,p,d,f,y;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||$(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=A(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=A(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||S(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||$(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||A(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((y=this.xyChart)==null?void 0:y.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(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||oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(xr,"Theme"),xr),Xf=g(e=>{const t=new jf;return t.calculate(e),t},"getThemeVariables"),br,Uf=(br=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(S("#323D47"),10),this.border1="#ccc",this.border2=ve(255,255,255,.25),this.arrowheadColor=S(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,n,o,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(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||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=A(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=A(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||S(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||$(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||A(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(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||oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(br,"Theme"),br),Gf=g(e=>{const t=new Uf;return t.calculate(e),t},"getThemeVariables"),kr,Vf=(kr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=J("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,n,o,l,h,c,u,p,d,f,y;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||$(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=A(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=A(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||S(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||$(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||A(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((y=this.xyChart)==null?void 0:y.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(kr,"Theme"),kr),Zf=g(e=>{const t=new Vf;return t.calculate(e),t},"getThemeVariables"),Tr,Qf=(Tr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(S("#323D47"),10),this.border1="#ccc",this.border2=ve(255,255,255,.25),this.arrowheadColor=S(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,n,o,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(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||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=A(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=A(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||S(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||$(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||A(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Tr,"Theme"),Tr),Kf=g(e=>{const t=new Qf;return t.calculate(e),t},"getThemeVariables"),wr,Jf=(wr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,n,o,l,h,c,u,p,d,f,y;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||$(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||S(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||$(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||A(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((y=this.xyChart)==null?void 0:y.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(wr,"Theme"),wr),t0=g(e=>{const t=new Jf;return t.calculate(e),t},"getThemeVariables"),_r,e0=(_r=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(S("#323D47"),10),this.border1="#ccc",this.border2=ve(255,255,255,.25),this.arrowheadColor=S(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,n,o,l,h,c,u,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||S(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||$(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||A(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=A(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qt(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(_r,"Theme"),_r),r0=g(e=>{const t=new e0;return t.calculate(e),t},"getThemeVariables"),ge={base:{getThemeVariables:Df},dark:{getThemeVariables:Rf},default:{getThemeVariables:Nf},forest:{getThemeVariables:Wf},neutral:{getThemeVariables:Yf},neo:{getThemeVariables:Xf},"neo-dark":{getThemeVariables:Gf},redux:{getThemeVariables:Zf},"redux-dark":{getThemeVariables:Kf},"redux-color":{getThemeVariables:t0},"redux-dark-color":{getThemeVariables:r0}},Nt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},sh={...Nt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ge.default.getThemeVariables(),sequence:{...Nt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Nt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Nt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Nt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Nt.pie,useWidth:984},xyChart:{...Nt.xyChart,useWidth:void 0},requirement:{...Nt.requirement,useWidth:void 0},packet:{...Nt.packet},treeView:{...Nt.treeView,useWidth:void 0},radar:{...Nt.radar},ishikawa:{...Nt.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Nt.venn}},ah=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...ah(e[i],"")]:[...r,t+i],[]),"keyify"),i0=new Set(ah(sh,"")),oh=sh,Zi=g(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Zi(t));return}for(const t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!i0.has(t)||e[t]==null){P.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){P.debug("sanitizing object",t),Zi(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(P.debug("sanitizing css option",t),e[t]=s0(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),s0=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Lr=Object.freeze(oh),Ce=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Pt=Tt({},Lr),Qi,Ue=[],ei=Tt({},Lr),$s=g((e,t)=>{let r=Tt({},e),i={};for(const s of t)hh(s),i=Tt(i,s);if(r=Tt(r,i),i.theme&&i.theme in ge){const s=Tt({},Qi),a=Tt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in ge&&(r.themeVariables=ge[r.theme].getThemeVariables(a))}return ei=r,uh(ei),ei},"updateCurrentConfig"),a0=g(e=>(Pt=Tt({},Lr),Pt=Tt(Pt,e),e.theme&&ge[e.theme]&&(Pt.themeVariables=ge[e.theme].getThemeVariables(e.themeVariables)),$s(Pt,Ue),Pt),"setSiteConfig"),o0=g(e=>{Qi=Tt({},e)},"saveConfigFromInitialize"),n0=g(e=>(Pt=Tt(Pt,e),$s(Pt,Ue),Pt),"updateSiteConfig"),nh=g(()=>Tt({},Pt),"getSiteConfig"),lh=g(e=>(uh(e),Tt(ei,e),mt()),"setConfig"),mt=g(()=>Tt({},ei),"getConfig"),hh=g(e=>{e&&(["secure",...Pt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(P.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&hh(e[t])}))},"sanitize"),l0=g(e=>{var t;Zi(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ue.push(e),$s(Pt,Ue)},"addDirective"),Ki=g((e=Pt)=>{Ue=[],$s(e,Ue)},"reset"),h0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},yn={},ch=g(e=>{yn[e]||(P.warn(h0[e]),yn[e]=!0)},"issueWarning"),uh=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ch("LAZY_LOAD_DEPRECATED")},"checkConfig"),mB=g(()=>{let e={};Qi&&(e=Tt(e,Qi));for(const t of Ue)e=Tt(e,t);return e},"getUserDefinedConfig"),It=g(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&ch("FLOWCHART_HTML_LABELS_DEPRECATED"),Ce(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Ci=/<br\s*\/?>/gi,c0=g(e=>e?gh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),u0=(()=>{let e=!1;return()=>{e||(dh(),e=!0)}})();function dh(){const e="data-temp-href-target";Br.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Br.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(dh,"setupDompurifyHooks");var ph=g(e=>(u0(),Br.sanitize(e)),"removeScript"),mn=g((e,t)=>{if(It(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=ph(e):r!=="loose"&&(e=gh(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=f0(e))}return e},"sanitizeMore"),Zt=g((e,t)=>e&&(t.dompurifyConfig?e=Br.sanitize(mn(e,t),t.dompurifyConfig).toString():e=Br.sanitize(mn(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),d0=g((e,t)=>typeof e=="string"?Zt(e,t):e.flat().map(r=>Zt(r,t)),"sanitizeTextOrArray"),p0=g(e=>Ci.test(e),"hasBreaks"),g0=g(e=>e.split(Ci),"splitBreaks"),f0=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),gh=g(e=>e.replace(Ci,"#br#"),"breakToPlaceholder"),y0=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),m0=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),C0=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Cn=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],n=t[i+1];x0(a,n)&&(s=a+","+n,i++,r.pop())}r.push(b0(s))}return r.join("")},"parseGenericTypes"),ma=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),x0=g((e,t)=>{const r=ma(e,"~"),i=ma(t,"~");return r===1&&i===1},"shouldCombineSets"),b0=g(e=>{const t=ma(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),xn=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ca=/\$\$(.*)\$\$/g,ai=g(e=>{var t;return(((t=e.match(Ca))==null?void 0:t.length)??0)>0},"hasKatex"),CB=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await fh(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),k0=g(async(e,t)=>{if(!ai(e))return e;if(!(xn()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ca,"MathML is unsupported in this environment.");{const{default:r}=await ot(async()=>{const{default:s}=await import("./katex-DkKDou_j.js");return{default:s}},[]),i=t.forceLegacyMathML||!xn()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ci).map(s=>ai(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Ca,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),fh=g(async(e,t)=>Zt(await k0(e,t),t),"renderKatexSanitized"),xi={getRows:c0,sanitizeText:Zt,sanitizeTextOrArray:d0,hasBreaks:p0,splitBreaks:g0,lineBreakRegex:Ci,removeScript:ph,getUrl:y0,evaluate:Ce,getMax:m0,getMin:C0},T0=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),w0=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),yh=g(function(e,t,r,i){const s=w0(t,r,i);T0(e,s)},"configureSvgSize"),_0=g(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,n=s.height;P.info(`SVG bounds: ${a}x${n}`,s);let o=0,l=0;P.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=n+r*2,P.info(`Calculated bounds: ${o}x${l}`),yh(t,l,o,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),Wi={},S0=g((e,t,r,i)=>{let s="";return e in Wi&&Wi[e]?s=Wi[e]({...r,svgId:i}):P.warn(`No theme found for ${e}`),` & {
|
|
4
|
+
font-family: ${r.fontFamily};
|
|
5
|
+
font-size: ${r.fontSize};
|
|
6
|
+
fill: ${r.textColor}
|
|
7
|
+
}
|
|
8
|
+
@keyframes edge-animation-frame {
|
|
9
|
+
from {
|
|
10
|
+
stroke-dashoffset: 0;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
@keyframes dash {
|
|
14
|
+
to {
|
|
15
|
+
stroke-dashoffset: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
& .edge-animation-slow {
|
|
19
|
+
stroke-dasharray: 9,5 !important;
|
|
20
|
+
stroke-dashoffset: 900;
|
|
21
|
+
animation: dash 50s linear infinite;
|
|
22
|
+
stroke-linecap: round;
|
|
23
|
+
}
|
|
24
|
+
& .edge-animation-fast {
|
|
25
|
+
stroke-dasharray: 9,5 !important;
|
|
26
|
+
stroke-dashoffset: 900;
|
|
27
|
+
animation: dash 20s linear infinite;
|
|
28
|
+
stroke-linecap: round;
|
|
29
|
+
}
|
|
30
|
+
/* Classes common for multiple diagrams */
|
|
31
|
+
|
|
32
|
+
& .error-icon {
|
|
33
|
+
fill: ${r.errorBkgColor};
|
|
34
|
+
}
|
|
35
|
+
& .error-text {
|
|
36
|
+
fill: ${r.errorTextColor};
|
|
37
|
+
stroke: ${r.errorTextColor};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
& .edge-thickness-normal {
|
|
41
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
42
|
+
}
|
|
43
|
+
& .edge-thickness-thick {
|
|
44
|
+
stroke-width: 3.5px
|
|
45
|
+
}
|
|
46
|
+
& .edge-pattern-solid {
|
|
47
|
+
stroke-dasharray: 0;
|
|
48
|
+
}
|
|
49
|
+
& .edge-thickness-invisible {
|
|
50
|
+
stroke-width: 0;
|
|
51
|
+
fill: none;
|
|
52
|
+
}
|
|
53
|
+
& .edge-pattern-dashed{
|
|
54
|
+
stroke-dasharray: 3;
|
|
55
|
+
}
|
|
56
|
+
.edge-pattern-dotted {
|
|
57
|
+
stroke-dasharray: 2;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
& .marker {
|
|
61
|
+
fill: ${r.lineColor};
|
|
62
|
+
stroke: ${r.lineColor};
|
|
63
|
+
}
|
|
64
|
+
& .marker.cross {
|
|
65
|
+
stroke: ${r.lineColor};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
& svg {
|
|
69
|
+
font-family: ${r.fontFamily};
|
|
70
|
+
font-size: ${r.fontSize};
|
|
71
|
+
}
|
|
72
|
+
& p {
|
|
73
|
+
margin: 0
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
${s}
|
|
77
|
+
.node .neo-node {
|
|
78
|
+
stroke: ${r.nodeBorder};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
82
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
83
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
[data-look="neo"].node path {
|
|
88
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
89
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[data-look="neo"].node .outer-path {
|
|
93
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-look="neo"].node .neo-line path {
|
|
97
|
+
stroke: ${r.nodeBorder};
|
|
98
|
+
filter: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[data-look="neo"].node circle{
|
|
102
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
103
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-look="neo"].node circle .state-start{
|
|
107
|
+
fill: #000000;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-look="neo"].icon-shape .icon {
|
|
111
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
112
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
116
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
117
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
${t}
|
|
121
|
+
`},"getStyles"),v0=g((e,t)=>{t!==void 0&&(Wi[e]=t)},"addStylesForDiagram"),B0=S0,mh={};Sf(mh,{clear:()=>L0,getAccDescription:()=>$0,getAccTitle:()=>M0,getDiagramTitle:()=>O0,setAccDescription:()=>A0,setAccTitle:()=>F0,setDiagramTitle:()=>E0});var fo="",yo="",mo="",Co=g(e=>Zt(e,mt()),"sanitizeText"),L0=g(()=>{fo="",mo="",yo=""},"clear"),F0=g(e=>{fo=Co(e).replace(/^\s+/g,"")},"setAccTitle"),M0=g(()=>fo,"getAccTitle"),A0=g(e=>{mo=Co(e).replace(/\n\s+/g,`
|
|
122
|
+
`)},"setAccDescription"),$0=g(()=>mo,"getAccDescription"),E0=g(e=>{yo=Co(e)},"setDiagramTitle"),O0=g(()=>yo,"getDiagramTitle"),bn=P,I0=po,ht=mt,xB=lh,bB=Lr,xo=g(e=>Zt(e,ht()),"sanitizeText"),D0=_0,P0=g(()=>mh,"getCommonDb"),Ji={},ts=g((e,t,r)=>{var i;Ji[e]&&bn.warn(`Diagram with id ${e} already registered. Overwriting.`),Ji[e]=t,r&&ih(e,r),v0(e,t.styles),(i=t.injectUtils)==null||i.call(t,bn,I0,ht,xo,D0,P0(),()=>{})},"registerDiagram"),xa=g(e=>{if(e in Ji)return Ji[e];throw new R0(e)},"getDiagram"),Sr,R0=(Sr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(Sr,"DiagramNotFoundError"),Sr),q0={value:()=>{}};function Ch(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Hi(r)}function Hi(e){this._=e}function N0(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Hi.prototype=Ch.prototype={constructor:Hi,on:function(e,t){var r=this._,i=N0(e+"",r),s,a=-1,n=i.length;if(arguments.length<2){for(;++a<n;)if((s=(e=i[a]).type)&&(s=z0(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<n;)if(s=(e=i[a]).type)r[s]=kn(r[s],e.name,t);else if(t==null)for(s in r)r[s]=kn(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Hi(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function z0(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function kn(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=q0,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var ba="http://www.w3.org/1999/xhtml";const Tn={svg:"http://www.w3.org/2000/svg",xhtml:ba,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Es(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Tn.hasOwnProperty(t)?{space:Tn[t],local:e}:e}function W0(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===ba&&t.documentElement.namespaceURI===ba?t.createElement(e):t.createElementNS(r,e)}}function H0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function xh(e){var t=Es(e);return(t.local?H0:W0)(t)}function Y0(){}function bo(e){return e==null?Y0:function(){return this.querySelector(e)}}function j0(e){typeof e!="function"&&(e=bo(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=new Array(n),l,h,c=0;c<n;++c)(l=a[c])&&(h=e.call(l,l.__data__,c,a))&&("__data__"in l&&(h.__data__=l.__data__),o[c]=h);return new Ht(i,this._parents)}function X0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function U0(){return[]}function bh(e){return e==null?U0:function(){return this.querySelectorAll(e)}}function G0(e){return function(){return X0(e.apply(this,arguments))}}function V0(e){typeof e=="function"?e=G0(e):e=bh(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var n=t[a],o=n.length,l,h=0;h<o;++h)(l=n[h])&&(i.push(e.call(l,l.__data__,h,n)),s.push(l));return new Ht(i,s)}function kh(e){return function(){return this.matches(e)}}function Th(e){return function(t){return t.matches(e)}}var Z0=Array.prototype.find;function Q0(e){return function(){return Z0.call(this.children,e)}}function K0(){return this.firstElementChild}function J0(e){return this.select(e==null?K0:Q0(typeof e=="function"?e:Th(e)))}var ty=Array.prototype.filter;function ey(){return Array.from(this.children)}function ry(e){return function(){return ty.call(this.children,e)}}function iy(e){return this.selectAll(e==null?ey:ry(typeof e=="function"?e:Th(e)))}function sy(e){typeof e!="function"&&(e=kh(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=[],l,h=0;h<n;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&o.push(l);return new Ht(i,this._parents)}function wh(e){return new Array(e.length)}function ay(){return new Ht(this._enter||this._groups.map(wh),this._parents)}function es(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}es.prototype={constructor:es,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function oy(e){return function(){return e}}function ny(e,t,r,i,s,a){for(var n=0,o,l=t.length,h=a.length;n<h;++n)(o=t[n])?(o.__data__=a[n],i[n]=o):r[n]=new es(e,a[n]);for(;n<l;++n)(o=t[n])&&(s[n]=o)}function ly(e,t,r,i,s,a,n){var o,l,h=new Map,c=t.length,u=a.length,p=new Array(c),d;for(o=0;o<c;++o)(l=t[o])&&(p[o]=d=n.call(l,l.__data__,o,t)+"",h.has(d)?s[o]=l:h.set(d,l));for(o=0;o<u;++o)d=n.call(e,a[o],o,a)+"",(l=h.get(d))?(i[o]=l,l.__data__=a[o],h.delete(d)):r[o]=new es(e,a[o]);for(o=0;o<c;++o)(l=t[o])&&h.get(p[o])===l&&(s[o]=l)}function hy(e){return e.__data__}function cy(e,t){if(!arguments.length)return Array.from(this,hy);var r=t?ly:ny,i=this._parents,s=this._groups;typeof e!="function"&&(e=oy(e));for(var a=s.length,n=new Array(a),o=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],u=s[h],p=u.length,d=uy(e.call(c,c&&c.__data__,h,i)),f=d.length,y=o[h]=new Array(f),m=n[h]=new Array(f),C=l[h]=new Array(p);r(c,u,y,m,C,d,t);for(var b=0,k=0,_,w;b<f;++b)if(_=y[b]){for(b>=k&&(k=b+1);!(w=m[k])&&++k<f;);_._next=w||null}}return n=new Ht(n,i),n._enter=o,n._exit=l,n}function uy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function dy(){return new Ht(this._exit||this._groups.map(wh),this._parents)}function py(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function gy(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,n=Math.min(s,a),o=new Array(s),l=0;l<n;++l)for(var h=r[l],c=i[l],u=h.length,p=o[l]=new Array(u),d,f=0;f<u;++f)(d=h[f]||c[f])&&(p[f]=d);for(;l<s;++l)o[l]=r[l];return new Ht(o,this._parents)}function fy(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],n;--s>=0;)(n=i[s])&&(a&&n.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(n,a),a=n);return this}function yy(e){e||(e=my);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var n=r[a],o=n.length,l=s[a]=new Array(o),h,c=0;c<o;++c)(h=n[c])&&(l[c]=h);l.sort(t)}return new Ht(s,this._parents).order()}function my(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Cy(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function xy(){return Array.from(this)}function by(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var n=i[s];if(n)return n}return null}function ky(){let e=0;for(const t of this)++e;return e}function Ty(){return!this.node()}function wy(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,n=s.length,o;a<n;++a)(o=s[a])&&e.call(o,o.__data__,a,s);return this}function _y(e){return function(){this.removeAttribute(e)}}function Sy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function vy(e,t){return function(){this.setAttribute(e,t)}}function By(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ly(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Fy(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function My(e,t){var r=Es(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?Sy:_y:typeof t=="function"?r.local?Fy:Ly:r.local?By:vy)(r,t))}function _h(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ay(e){return function(){this.style.removeProperty(e)}}function $y(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Ey(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Oy(e,t,r){return arguments.length>1?this.each((t==null?Ay:typeof t=="function"?Ey:$y)(e,t,r??"")):Fr(this.node(),e)}function Fr(e,t){return e.style.getPropertyValue(t)||_h(e).getComputedStyle(e,null).getPropertyValue(t)}function Iy(e){return function(){delete this[e]}}function Dy(e,t){return function(){this[e]=t}}function Py(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Ry(e,t){return arguments.length>1?this.each((t==null?Iy:typeof t=="function"?Py:Dy)(e,t)):this.node()[e]}function Sh(e){return e.trim().split(/^|\s+/)}function ko(e){return e.classList||new vh(e)}function vh(e){this._node=e,this._names=Sh(e.getAttribute("class")||"")}vh.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Bh(e,t){for(var r=ko(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function Lh(e,t){for(var r=ko(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function qy(e){return function(){Bh(this,e)}}function Ny(e){return function(){Lh(this,e)}}function zy(e,t){return function(){(t.apply(this,arguments)?Bh:Lh)(this,e)}}function Wy(e,t){var r=Sh(e+"");if(arguments.length<2){for(var i=ko(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?zy:t?qy:Ny)(r,t))}function Hy(){this.textContent=""}function Yy(e){return function(){this.textContent=e}}function jy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Xy(e){return arguments.length?this.each(e==null?Hy:(typeof e=="function"?jy:Yy)(e)):this.node().textContent}function Uy(){this.innerHTML=""}function Gy(e){return function(){this.innerHTML=e}}function Vy(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Zy(e){return arguments.length?this.each(e==null?Uy:(typeof e=="function"?Vy:Gy)(e)):this.node().innerHTML}function Qy(){this.nextSibling&&this.parentNode.appendChild(this)}function Ky(){return this.each(Qy)}function Jy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function tm(){return this.each(Jy)}function em(e){var t=typeof e=="function"?e:xh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function rm(){return null}function im(e,t){var r=typeof e=="function"?e:xh(e),i=t==null?rm:typeof t=="function"?t:bo(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function sm(){var e=this.parentNode;e&&e.removeChild(this)}function am(){return this.each(sm)}function om(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function nm(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lm(e){return this.select(e?nm:om)}function hm(e){return arguments.length?this.property("__data__",e):this.node().__data__}function cm(e){return function(t){e.call(this,t,this.__data__)}}function um(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function dm(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function pm(e,t,r){return function(){var i=this.__on,s,a=cm(t);if(i){for(var n=0,o=i.length;n<o;++n)if((s=i[n]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function gm(e,t,r){var i=um(e+""),s,a=i.length,n;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,h=o.length,c;l<h;++l)for(s=0,c=o[l];s<a;++s)if((n=i[s]).type===c.type&&n.name===c.name)return c.value}return}for(o=t?pm:dm,s=0;s<a;++s)this.each(o(i[s],t,r));return this}function Fh(e,t,r){var i=_h(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function fm(e,t){return function(){return Fh(this,e,t)}}function ym(e,t){return function(){return Fh(this,e,t.apply(this,arguments))}}function mm(e,t){return this.each((typeof t=="function"?ym:fm)(e,t))}function*Cm(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,n;s<a;++s)(n=i[s])&&(yield n)}var Mh=[null];function Ht(e,t){this._groups=e,this._parents=t}function bi(){return new Ht([[document.documentElement]],Mh)}function xm(){return this}Ht.prototype=bi.prototype={constructor:Ht,select:j0,selectAll:V0,selectChild:J0,selectChildren:iy,filter:sy,data:cy,enter:ay,exit:dy,join:py,merge:gy,selection:xm,order:fy,sort:yy,call:Cy,nodes:xy,node:by,size:ky,empty:Ty,each:wy,attr:My,style:Oy,property:Ry,classed:Wy,text:Xy,html:Zy,raise:Ky,lower:tm,append:em,insert:im,remove:am,clone:lm,datum:hm,on:gm,dispatch:mm,[Symbol.iterator]:Cm};function it(e){return typeof e=="string"?new Ht([[document.querySelector(e)]],[document.documentElement]):new Ht([[e]],Mh)}function To(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ah(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ki(){}var oi=.7,rs=1/oi,dr="\\s*([+-]?\\d+)\\s*",ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bm=/^#([0-9a-f]{3,8})$/,km=new RegExp(`^rgb\\(${dr},${dr},${dr}\\)$`),Tm=new RegExp(`^rgb\\(${ie},${ie},${ie}\\)$`),wm=new RegExp(`^rgba\\(${dr},${dr},${dr},${ni}\\)$`),_m=new RegExp(`^rgba\\(${ie},${ie},${ie},${ni}\\)$`),Sm=new RegExp(`^hsl\\(${ni},${ie},${ie}\\)$`),vm=new RegExp(`^hsla\\(${ni},${ie},${ie},${ni}\\)$`),wn={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};To(ki,li,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_n,formatHex:_n,formatHex8:Bm,formatHsl:Lm,formatRgb:Sn,toString:Sn});function _n(){return this.rgb().formatHex()}function Bm(){return this.rgb().formatHex8()}function Lm(){return $h(this).formatHsl()}function Sn(){return this.rgb().formatRgb()}function li(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=bm.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?vn(t):r===3?new qt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Fi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Fi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=km.exec(e))?new qt(t[1],t[2],t[3],1):(t=Tm.exec(e))?new qt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=wm.exec(e))?Fi(t[1],t[2],t[3],t[4]):(t=_m.exec(e))?Fi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Sm.exec(e))?Fn(t[1],t[2]/100,t[3]/100,1):(t=vm.exec(e))?Fn(t[1],t[2]/100,t[3]/100,t[4]):wn.hasOwnProperty(e)?vn(wn[e]):e==="transparent"?new qt(NaN,NaN,NaN,0):null}function vn(e){return new qt(e>>16&255,e>>8&255,e&255,1)}function Fi(e,t,r,i){return i<=0&&(e=t=r=NaN),new qt(e,t,r,i)}function Fm(e){return e instanceof ki||(e=li(e)),e?(e=e.rgb(),new qt(e.r,e.g,e.b,e.opacity)):new qt}function ka(e,t,r,i){return arguments.length===1?Fm(e):new qt(e,t,r,i??1)}function qt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}To(qt,ka,Ah(ki,{brighter(e){return e=e==null?rs:Math.pow(rs,e),new qt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?oi:Math.pow(oi,e),new qt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qt(Ye(this.r),Ye(this.g),Ye(this.b),is(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:Bn,formatHex:Bn,formatHex8:Mm,formatRgb:Ln,toString:Ln}));function Bn(){return`#${ze(this.r)}${ze(this.g)}${ze(this.b)}`}function Mm(){return`#${ze(this.r)}${ze(this.g)}${ze(this.b)}${ze((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ln(){const e=is(this.opacity);return`${e===1?"rgb(":"rgba("}${Ye(this.r)}, ${Ye(this.g)}, ${Ye(this.b)}${e===1?")":`, ${e})`}`}function is(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ye(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ze(e){return e=Ye(e),(e<16?"0":"")+e.toString(16)}function Fn(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ut(e,t,r,i)}function $h(e){if(e instanceof Ut)return new Ut(e.h,e.s,e.l,e.opacity);if(e instanceof ki||(e=li(e)),!e)return new Ut;if(e instanceof Ut)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),n=NaN,o=a-s,l=(a+s)/2;return o?(t===a?n=(r-i)/o+(r<i)*6:r===a?n=(i-t)/o+2:n=(t-r)/o+4,o/=l<.5?a+s:2-a-s,n*=60):o=l>0&&l<1?0:n,new Ut(n,o,l,e.opacity)}function Am(e,t,r,i){return arguments.length===1?$h(e):new Ut(e,t,r,i??1)}function Ut(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}To(Ut,Am,Ah(ki,{brighter(e){return e=e==null?rs:Math.pow(rs,e),new Ut(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?oi:Math.pow(oi,e),new Ut(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new qt(ta(e>=240?e-240:e+120,s,i),ta(e,s,i),ta(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Ut(Mn(this.h),Mi(this.s),Mi(this.l),is(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=is(this.opacity);return`${e===1?"hsl(":"hsla("}${Mn(this.h)}, ${Mi(this.s)*100}%, ${Mi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Mn(e){return e=(e||0)%360,e<0?e+360:e}function Mi(e){return Math.max(0,Math.min(1,e||0))}function ta(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const wo=e=>()=>e;function Eh(e,t){return function(r){return e+r*t}}function $m(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function kB(e,t){var r=t-e;return r?Eh(e,r>180||r<-180?r-360*Math.round(r/360):r):wo(isNaN(e)?t:e)}function Em(e){return(e=+e)==1?Oh:function(t,r){return r-t?$m(t,r,e):wo(isNaN(t)?r:t)}}function Oh(e,t){var r=t-e;return r?Eh(e,r):wo(isNaN(e)?t:e)}const An=(function e(t){var r=Em(t);function i(s,a){var n=r((s=ka(s)).r,(a=ka(a)).r),o=r(s.g,a.g),l=r(s.b,a.b),h=Oh(s.opacity,a.opacity);return function(c){return s.r=n(c),s.g=o(c),s.b=l(c),s.opacity=h(c),s+""}}return i.gamma=e,i})(1);function _e(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ta=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ea=new RegExp(Ta.source,"g");function Om(e){return function(){return e}}function Im(e){return function(t){return e(t)+""}}function Dm(e,t){var r=Ta.lastIndex=ea.lastIndex=0,i,s,a,n=-1,o=[],l=[];for(e=e+"",t=t+"";(i=Ta.exec(e))&&(s=ea.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),o[n]?o[n]+=a:o[++n]=a),(i=i[0])===(s=s[0])?o[n]?o[n]+=s:o[++n]=s:(o[++n]=null,l.push({i:n,x:_e(i,s)})),r=ea.lastIndex;return r<t.length&&(a=t.slice(r),o[n]?o[n]+=a:o[++n]=a),o.length<2?l[0]?Im(l[0].x):Om(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)o[(u=l[c]).i]=u.x(h);return o.join("")})}var $n=180/Math.PI,wa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ih(e,t,r,i,s,a){var n,o,l;return(n=Math.sqrt(e*e+t*t))&&(e/=n,t/=n),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,n=-n),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*$n,skewX:Math.atan(l)*$n,scaleX:n,scaleY:o}}var Ai;function Pm(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?wa:Ih(t.a,t.b,t.c,t.d,t.e,t.f)}function Rm(e){return e==null||(Ai||(Ai=document.createElementNS("http://www.w3.org/2000/svg","g")),Ai.setAttribute("transform",e),!(e=Ai.transform.baseVal.consolidate()))?wa:(e=e.matrix,Ih(e.a,e.b,e.c,e.d,e.e,e.f))}function Dh(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,c,u,p,d,f){if(h!==u||c!==p){var y=d.push("translate(",null,t,null,r);f.push({i:y-4,x:_e(h,u)},{i:y-2,x:_e(c,p)})}else(u||p)&&d.push("translate("+u+t+p+r)}function n(h,c,u,p){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),p.push({i:u.push(s(u)+"rotate(",null,i)-2,x:_e(h,c)})):c&&u.push(s(u)+"rotate("+c+i)}function o(h,c,u,p){h!==c?p.push({i:u.push(s(u)+"skewX(",null,i)-2,x:_e(h,c)}):c&&u.push(s(u)+"skewX("+c+i)}function l(h,c,u,p,d,f){if(h!==u||c!==p){var y=d.push(s(d)+"scale(",null,",",null,")");f.push({i:y-4,x:_e(h,u)},{i:y-2,x:_e(c,p)})}else(u!==1||p!==1)&&d.push(s(d)+"scale("+u+","+p+")")}return function(h,c){var u=[],p=[];return h=e(h),c=e(c),a(h.translateX,h.translateY,c.translateX,c.translateY,u,p),n(h.rotate,c.rotate,u,p),o(h.skewX,c.skewX,u,p),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,p),h=c=null,function(d){for(var f=-1,y=p.length,m;++f<y;)u[(m=p[f]).i]=m.x(d);return u.join("")}}}var qm=Dh(Pm,"px, ","px)","deg)"),Nm=Dh(Rm,", ",")",")"),Mr=0,Xr=0,Pr=0,Ph=1e3,ss,Ur,as=0,Ge=0,Os=0,hi=typeof performance=="object"&&performance.now?performance:Date,Rh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _o(){return Ge||(Rh(zm),Ge=hi.now()+Os)}function zm(){Ge=0}function os(){this._call=this._time=this._next=null}os.prototype=qh.prototype={constructor:os,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?_o():+r)+(t==null?0:+t),!this._next&&Ur!==this&&(Ur?Ur._next=this:ss=this,Ur=this),this._call=e,this._time=r,_a()},stop:function(){this._call&&(this._call=null,this._time=1/0,_a())}};function qh(e,t,r){var i=new os;return i.restart(e,t,r),i}function Wm(){_o(),++Mr;for(var e=ss,t;e;)(t=Ge-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Mr}function En(){Ge=(as=hi.now())+Os,Mr=Xr=0;try{Wm()}finally{Mr=0,Ym(),Ge=0}}function Hm(){var e=hi.now(),t=e-as;t>Ph&&(Os-=t,as=e)}function Ym(){for(var e,t=ss,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:ss=r);Ur=e,_a(i)}function _a(e){if(!Mr){Xr&&(Xr=clearTimeout(Xr));var t=e-Ge;t>24?(e<1/0&&(Xr=setTimeout(En,e-hi.now()-Os)),Pr&&(Pr=clearInterval(Pr))):(Pr||(as=hi.now(),Pr=setInterval(Hm,Ph)),Mr=1,Rh(En))}}function On(e,t,r){var i=new os;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var jm=Ch("start","end","cancel","interrupt"),Xm=[],Nh=0,In=1,Sa=2,Yi=3,Dn=4,va=5,ji=6;function Is(e,t,r,i,s,a){var n=e.__transition;if(!n)e.__transition={};else if(r in n)return;Um(e,r,{name:t,index:i,group:s,on:jm,tween:Xm,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Nh})}function So(e,t){var r=Kt(e,t);if(r.state>Nh)throw new Error("too late; already scheduled");return r}function le(e,t){var r=Kt(e,t);if(r.state>Yi)throw new Error("too late; already running");return r}function Kt(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Um(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=qh(a,0,r.time);function a(h){r.state=In,r.timer.restart(n,r.delay,r.time),r.delay<=h&&n(h-r.delay)}function n(h){var c,u,p,d;if(r.state!==In)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===Yi)return On(n);d.state===Dn?(d.state=ji,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=ji,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(On(function(){r.state===Yi&&(r.state=Dn,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=Sa,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Sa){for(r.state=Yi,s=new Array(p=r.tween.length),c=0,u=-1;c<p;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);s.length=u+1}}function o(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=va,1),u=-1,p=s.length;++u<p;)s[u].call(e,c);r.state===va&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=ji,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function Gm(e,t){var r=e.__transition,i,s,a=!0,n;if(r){t=t==null?null:t+"";for(n in r){if((i=r[n]).name!==t){a=!1;continue}s=i.state>Sa&&i.state<va,i.state=ji,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[n]}a&&delete e.__transition}}function Vm(e){return this.each(function(){Gm(this,e)})}function Zm(e,t){var r,i;return function(){var s=le(this,e),a=s.tween;if(a!==r){i=r=a;for(var n=0,o=i.length;n<o;++n)if(i[n].name===t){i=i.slice(),i.splice(n,1);break}}s.tween=i}}function Qm(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=le(this,e),n=a.tween;if(n!==i){s=(i=n).slice();for(var o={name:t,value:r},l=0,h=s.length;l<h;++l)if(s[l].name===t){s[l]=o;break}l===h&&s.push(o)}a.tween=s}}function Km(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Kt(this.node(),r).tween,s=0,a=i.length,n;s<a;++s)if((n=i[s]).name===e)return n.value;return null}return this.each((t==null?Zm:Qm)(r,e,t))}function vo(e,t,r){var i=e._id;return e.each(function(){var s=le(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Kt(s,i).value[t]}}function zh(e,t){var r;return(typeof t=="number"?_e:t instanceof li?An:(r=li(t))?(t=r,An):Dm)(e,t)}function Jm(e){return function(){this.removeAttribute(e)}}function tC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function eC(e,t,r){var i,s=r+"",a;return function(){var n=this.getAttribute(e);return n===s?null:n===i?a:a=t(i=n,r)}}function rC(e,t,r){var i,s=r+"",a;return function(){var n=this.getAttributeNS(e.space,e.local);return n===s?null:n===i?a:a=t(i=n,r)}}function iC(e,t,r){var i,s,a;return function(){var n,o=r(this),l;return o==null?void this.removeAttribute(e):(n=this.getAttribute(e),l=o+"",n===l?null:n===i&&l===s?a:(s=l,a=t(i=n,o)))}}function sC(e,t,r){var i,s,a;return function(){var n,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(n=this.getAttributeNS(e.space,e.local),l=o+"",n===l?null:n===i&&l===s?a:(s=l,a=t(i=n,o)))}}function aC(e,t){var r=Es(e),i=r==="transform"?Nm:zh;return this.attrTween(e,typeof t=="function"?(r.local?sC:iC)(r,i,vo(this,"attr."+e,t)):t==null?(r.local?tC:Jm)(r):(r.local?rC:eC)(r,i,t))}function oC(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function nC(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function lC(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&nC(e,a)),r}return s._value=t,s}function hC(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&oC(e,a)),r}return s._value=t,s}function cC(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Es(e);return this.tween(r,(i.local?lC:hC)(i,t))}function uC(e,t){return function(){So(this,e).delay=+t.apply(this,arguments)}}function dC(e,t){return t=+t,function(){So(this,e).delay=t}}function pC(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?uC:dC)(t,e)):Kt(this.node(),t).delay}function gC(e,t){return function(){le(this,e).duration=+t.apply(this,arguments)}}function fC(e,t){return t=+t,function(){le(this,e).duration=t}}function yC(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?gC:fC)(t,e)):Kt(this.node(),t).duration}function mC(e,t){if(typeof t!="function")throw new Error;return function(){le(this,e).ease=t}}function CC(e){var t=this._id;return arguments.length?this.each(mC(t,e)):Kt(this.node(),t).ease}function xC(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;le(this,e).ease=r}}function bC(e){if(typeof e!="function")throw new Error;return this.each(xC(this._id,e))}function kC(e){typeof e!="function"&&(e=kh(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=[],l,h=0;h<n;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&o.push(l);return new ye(i,this._parents,this._name,this._id)}function TC(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),n=new Array(i),o=0;o<a;++o)for(var l=t[o],h=r[o],c=l.length,u=n[o]=new Array(c),p,d=0;d<c;++d)(p=l[d]||h[d])&&(u[d]=p);for(;o<i;++o)n[o]=t[o];return new ye(n,this._parents,this._name,this._id)}function wC(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function _C(e,t,r){var i,s,a=wC(t)?So:le;return function(){var n=a(this,e),o=n.on;o!==i&&(s=(i=o).copy()).on(t,r),n.on=s}}function SC(e,t){var r=this._id;return arguments.length<2?Kt(this.node(),r).on.on(e):this.each(_C(r,e,t))}function vC(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function BC(){return this.on("end.remove",vC(this._id))}function LC(e){var t=this._name,r=this._id;typeof e!="function"&&(e=bo(e));for(var i=this._groups,s=i.length,a=new Array(s),n=0;n<s;++n)for(var o=i[n],l=o.length,h=a[n]=new Array(l),c,u,p=0;p<l;++p)(c=o[p])&&(u=e.call(c,c.__data__,p,o))&&("__data__"in c&&(u.__data__=c.__data__),h[p]=u,Is(h[p],t,r,p,h,Kt(c,r)));return new ye(a,this._parents,t,r)}function FC(e){var t=this._name,r=this._id;typeof e!="function"&&(e=bh(e));for(var i=this._groups,s=i.length,a=[],n=[],o=0;o<s;++o)for(var l=i[o],h=l.length,c,u=0;u<h;++u)if(c=l[u]){for(var p=e.call(c,c.__data__,u,l),d,f=Kt(c,r),y=0,m=p.length;y<m;++y)(d=p[y])&&Is(d,t,r,y,p,f);a.push(p),n.push(c)}return new ye(a,n,t,r)}var MC=bi.prototype.constructor;function AC(){return new MC(this._groups,this._parents)}function $C(e,t){var r,i,s;return function(){var a=Fr(this,e),n=(this.style.removeProperty(e),Fr(this,e));return a===n?null:a===r&&n===i?s:s=t(r=a,i=n)}}function Wh(e){return function(){this.style.removeProperty(e)}}function EC(e,t,r){var i,s=r+"",a;return function(){var n=Fr(this,e);return n===s?null:n===i?a:a=t(i=n,r)}}function OC(e,t,r){var i,s,a;return function(){var n=Fr(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Fr(this,e))),n===l?null:n===i&&l===s?a:(s=l,a=t(i=n,o))}}function IC(e,t){var r,i,s,a="style."+t,n="end."+a,o;return function(){var l=le(this,e),h=l.on,c=l.value[a]==null?o||(o=Wh(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(n,s=c),l.on=i}}function DC(e,t,r){var i=(e+="")=="transform"?qm:zh;return t==null?this.styleTween(e,$C(e,i)).on("end.style."+e,Wh(e)):typeof t=="function"?this.styleTween(e,OC(e,i,vo(this,"style."+e,t))).each(IC(this._id,e)):this.styleTween(e,EC(e,i,t),r).on("end.style."+e,null)}function PC(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function RC(e,t,r){var i,s;function a(){var n=t.apply(this,arguments);return n!==s&&(i=(s=n)&&PC(e,n,r)),i}return a._value=t,a}function qC(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,RC(e,t,r??""))}function NC(e){return function(){this.textContent=e}}function zC(e){return function(){var t=e(this);this.textContent=t??""}}function WC(e){return this.tween("text",typeof e=="function"?zC(vo(this,"text",e)):NC(e==null?"":e+""))}function HC(e){return function(t){this.textContent=e.call(this,t)}}function YC(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&HC(s)),t}return i._value=e,i}function jC(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,YC(e))}function XC(){for(var e=this._name,t=this._id,r=Hh(),i=this._groups,s=i.length,a=0;a<s;++a)for(var n=i[a],o=n.length,l,h=0;h<o;++h)if(l=n[h]){var c=Kt(l,t);Is(l,e,r,h,n,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ye(i,this._parents,e,r)}function UC(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,n){var o={value:n},l={value:function(){--s===0&&a()}};r.each(function(){var h=le(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),h.on=t}),s===0&&a()})}var GC=0;function ye(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Hh(){return++GC}var ue=bi.prototype;ye.prototype={constructor:ye,select:LC,selectAll:FC,selectChild:ue.selectChild,selectChildren:ue.selectChildren,filter:kC,merge:TC,selection:AC,transition:XC,call:ue.call,nodes:ue.nodes,node:ue.node,size:ue.size,empty:ue.empty,each:ue.each,on:SC,attr:aC,attrTween:cC,style:DC,styleTween:qC,text:WC,textTween:jC,remove:BC,tween:Km,delay:pC,duration:yC,ease:CC,easeVarying:bC,end:UC,[Symbol.iterator]:ue[Symbol.iterator]};function VC(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ZC={time:null,delay:0,duration:250,ease:VC};function QC(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function KC(e){var t,r;e instanceof ye?(t=e._id,e=e._name):(t=Hh(),(r=ZC).time=_o(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var n=i[a],o=n.length,l,h=0;h<o;++h)(l=n[h])&&Is(l,e,t,h,n,r||QC(l,t));return new ye(i,this._parents,e,t)}bi.prototype.interrupt=Vm;bi.prototype.transition=KC;const Ba=Math.PI,La=2*Ba,Pe=1e-6,JC=La-Pe;function Yh(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function tx(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Yh;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class ex{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Yh:tx(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,n){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+n}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let n=this._x1,o=this._y1,l=i-t,h=s-r,c=n-t,u=o-r,p=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>Pe)if(!(Math.abs(u*l-h*c)>Pe)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-n,f=s-o,y=l*l+h*h,m=d*d+f*f,C=Math.sqrt(y),b=Math.sqrt(p),k=a*Math.tan((Ba-Math.acos((y+p-m)/(2*C*b)))/2),_=k/b,w=k/C;Math.abs(_-1)>Pe&&this._append`L${t+_*c},${r+_*u}`,this._append`A${a},${a},0,0,${+(u*d>c*f)},${this._x1=t+w*l},${this._y1=r+w*h}`}}arc(t,r,i,s,a,n){if(t=+t,r=+r,i=+i,n=!!n,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(s),l=i*Math.sin(s),h=t+o,c=r+l,u=1^n,p=n?s-a:a-s;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>Pe||Math.abs(this._y1-c)>Pe)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%La+La),p>JC?this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:p>Pe&&this._append`A${i},${i},0,${+(p>=Ba)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function sr(e){return function(){return e}}const TB=Math.abs,wB=Math.atan2,_B=Math.cos,SB=Math.max,vB=Math.min,BB=Math.sin,LB=Math.sqrt,Pn=1e-12,Bo=Math.PI,Rn=Bo/2,FB=2*Bo;function MB(e){return e>1?0:e<-1?Bo:Math.acos(e)}function AB(e){return e>=1?Rn:e<=-1?-Rn:Math.asin(e)}function rx(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new ex(t)}function ix(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function jh(e){this._context=e}jh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ri(e){return new jh(e)}function sx(e){return e[0]}function ax(e){return e[1]}function ox(e,t){var r=sr(!0),i=null,s=ri,a=null,n=rx(o);e=typeof e=="function"?e:e===void 0?sx:sr(e),t=typeof t=="function"?t:t===void 0?ax:sr(t);function o(l){var h,c=(l=ix(l)).length,u,p=!1,d;for(i==null&&(a=s(d=n())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(u,h,l),+t(u,h,l));if(d)return a=null,d+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:sr(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:sr(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:sr(!!l),o):r},o.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),o):s},o.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),o):i},o}class Xh{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Uh(e){return new Xh(e,!0)}function Gh(e){return new Xh(e,!1)}function Le(){}function ns(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Ds(e){this._context=e}Ds.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:ns(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ns(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fa(e){return new Ds(e)}function Vh(e){this._context=e}Vh.prototype={areaStart:Le,areaEnd:Le,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ns(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nx(e){return new Vh(e)}function Zh(e){this._context=e}Zh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:ns(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lx(e){return new Zh(e)}function Qh(e,t){this._basis=new Ds(e),this._beta=t}Qh.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,n=t[r]-s,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(s+l*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const hx=(function e(t){function r(i){return t===1?new Ds(i):new Qh(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ls(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Lo(e,t){this._context=e,this._k=(1-t)/6}Lo.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:ls(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ls(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Kh=(function e(t){function r(i){return new Lo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Fo(e,t){this._context=e,this._k=(1-t)/6}Fo.prototype={areaStart:Le,areaEnd:Le,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ls(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cx=(function e(t){function r(i){return new Fo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Mo(e,t){this._context=e,this._k=(1-t)/6}Mo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ls(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ux=(function e(t){function r(i){return new Mo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ao(e,t,r){var i=e._x1,s=e._y1,a=e._x2,n=e._y2;if(e._l01_a>Pn){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Pn){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,n=(n*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,n,e._x2,e._y2)}function Jh(e,t){this._context=e,this._alpha=t}Jh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ao(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const tc=(function e(t){function r(i){return t?new Jh(i,t):new Lo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ec(e,t){this._context=e,this._alpha=t}ec.prototype={areaStart:Le,areaEnd:Le,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ao(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const dx=(function e(t){function r(i){return t?new ec(i,t):new Fo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function rc(e,t){this._context=e,this._alpha=t}rc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ao(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const px=(function e(t){function r(i){return t?new rc(i,t):new Mo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ic(e){this._context=e}ic.prototype={areaStart:Le,areaEnd:Le,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function gx(e){return new ic(e)}function qn(e){return e<0?-1:1}function Nn(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),n=(r-e._y1)/(s||i<0&&-0),o=(a*s+n*i)/(i+s);return(qn(a)+qn(n))*Math.min(Math.abs(a),Math.abs(n),.5*Math.abs(o))||0}function zn(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ra(e,t,r){var i=e._x0,s=e._y0,a=e._x1,n=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,s+o*t,a-o,n-o*r,a,n)}function hs(e){this._context=e}hs.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:ra(this,this._t0,zn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ra(this,zn(this,r=Nn(this,e,t)),r);break;default:ra(this,this._t0,r=Nn(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function sc(e){this._context=new ac(e)}(sc.prototype=Object.create(hs.prototype)).point=function(e,t){hs.prototype.point.call(this,t,e)};function ac(e){this._context=e}ac.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function oc(e){return new hs(e)}function nc(e){return new sc(e)}function lc(e){this._context=e}lc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Wn(e),s=Wn(t),a=0,n=1;n<r;++a,++n)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[n],t[n]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Wn(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),n=new Array(r);for(s[0]=0,a[0]=2,n[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,n[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,n[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,n[t]-=i*n[t-1];for(s[r-1]=n[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(n[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function hc(e){return new lc(e)}function Ps(e,t){this._context=e,this._t=t}Ps.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function cc(e){return new Ps(e,.5)}function uc(e){return new Ps(e,0)}function dc(e){return new Ps(e,1)}function Gr(e,t,r){this.k=e,this.x=t,this.y=r}Gr.prototype={constructor:Gr,scale:function(e){return e===1?this:new Gr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Gr(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Gr.prototype;var fx=g(e=>{var s;const{securityLevel:t}=ht();let r=it("body");if(t==="sandbox"){const n=((s=it(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=it(n.body)}return r.select(`#${e}`)},"selectSvgElement");function $o(e){return typeof e>"u"||e===null}g($o,"isNothing");function pc(e){return typeof e=="object"&&e!==null}g(pc,"isObject");function gc(e){return Array.isArray(e)?e:$o(e)?[]:[e]}g(gc,"toArray");function fc(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}g(fc,"extend");function yc(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(yc,"repeat");function mc(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(mc,"isNegativeZero");var yx=$o,mx=pc,Cx=gc,xx=yc,bx=mc,kx=fc,wt={isNothing:yx,isObject:mx,toArray:Cx,repeat:xx,isNegativeZero:bx,extend:kx};function Eo(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
123
|
+
|
|
124
|
+
`+e.mark.snippet),i+" "+r):i}g(Eo,"formatError");function Ar(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Eo(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(Ar,"YAMLException$1");Ar.prototype=Object.create(Error.prototype);Ar.prototype.constructor=Ar;Ar.prototype.toString=g(function(t){return this.name+": "+Eo(this,t)},"toString");var Rt=Ar;function Xi(e,t,r,i,s){var a="",n="",o=Math.floor(s/2)-1;return i-t>o&&(a=" ... ",t=i-o+a.length),r-i>o&&(n=" ...",r=i+o-n.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+n,pos:i-t+a.length}}g(Xi,"getLine");function Ui(e,t){return wt.repeat(" ",t-e.length)+e}g(Ui,"padStart");function Cc(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],a,n=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&n<0&&(n=i.length-2);n<0&&(n=i.length-1);var o="",l,h,c=Math.min(e.line+t.linesAfter,s.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(n-l<0);l++)h=Xi(e.buffer,i[n-l],s[n-l],e.position-(i[n]-i[n-l]),u),o=wt.repeat(" ",t.indent)+Ui((e.line-l+1).toString(),c)+" | "+h.str+`
|
|
125
|
+
`+o;for(h=Xi(e.buffer,i[n],s[n],e.position,u),o+=wt.repeat(" ",t.indent)+Ui((e.line+1).toString(),c)+" | "+h.str+`
|
|
126
|
+
`,o+=wt.repeat("-",t.indent+c+3+h.pos)+`^
|
|
127
|
+
`,l=1;l<=t.linesAfter&&!(n+l>=s.length);l++)h=Xi(e.buffer,i[n+l],s[n+l],e.position-(i[n]-i[n+l]),u),o+=wt.repeat(" ",t.indent)+Ui((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
128
|
+
`;return o.replace(/\n$/,"")}g(Cc,"makeSnippet");var Tx=Cc,wx=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],_x=["scalar","sequence","mapping"];function xc(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(xc,"compileStyleAliases");function bc(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(wx.indexOf(r)===-1)throw new Rt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=xc(t.styleAliases||null),_x.indexOf(this.kind)===-1)throw new Rt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(bc,"Type$1");var Mt=bc;function Ma(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,n){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=n)}),r[s]=i}),r}g(Ma,"compileList");function kc(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(kc,"compileMap");function cs(e){return this.extend(e)}g(cs,"Schema$1");cs.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof Mt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Rt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Mt))throw new Rt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Rt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Rt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Mt))throw new Rt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(cs.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Ma(s,"implicit"),s.compiledExplicit=Ma(s,"explicit"),s.compiledTypeMap=kc(s.compiledImplicit,s.compiledExplicit),s},"extend");var Sx=cs,vx=new Mt("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),Bx=new Mt("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),Lx=new Mt("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),Fx=new Sx({explicit:[vx,Bx,Lx]});function Tc(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(Tc,"resolveYamlNull");function wc(){return null}g(wc,"constructYamlNull");function _c(e){return e===null}g(_c,"isNull");var Mx=new Mt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Tc,construct:wc,predicate:_c,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function Sc(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}g(Sc,"resolveYamlBoolean");function vc(e){return e==="true"||e==="True"||e==="TRUE"}g(vc,"constructYamlBoolean");function Bc(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(Bc,"isBoolean");var Ax=new Mt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Sc,construct:vc,predicate:Bc,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Lc(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(Lc,"isHexCode");function Fc(e){return 48<=e&&e<=55}g(Fc,"isOctCode");function Mc(e){return 48<=e&&e<=57}g(Mc,"isDecCode");function Ac(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Lc(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Fc(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Mc(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}g(Ac,"resolveYamlInteger");function $c(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}g($c,"constructYamlInteger");function Ec(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!wt.isNegativeZero(e)}g(Ec,"isInteger");var $x=new Mt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Ac,construct:$c,predicate:Ec,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ex=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Oc(e){return!(e===null||!Ex.test(e)||e[e.length-1]==="_")}g(Oc,"resolveYamlFloat");function Ic(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}g(Ic,"constructYamlFloat");var Ox=/^[-+]?[0-9]+e/;function Dc(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(wt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Ox.test(r)?r.replace("e",".e"):r}g(Dc,"representYamlFloat");function Pc(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||wt.isNegativeZero(e))}g(Pc,"isFloat");var Ix=new Mt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Oc,construct:Ic,predicate:Pc,represent:Dc,defaultStyle:"lowercase"}),Rc=Fx.extend({implicit:[Mx,Ax,$x,Ix]}),Dx=Rc,qc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Nc=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 zc(e){return e===null?!1:qc.exec(e)!==null||Nc.exec(e)!==null}g(zc,"resolveYamlTimestamp");function Wc(e){var t,r,i,s,a,n,o,l=0,h=null,c,u,p;if(t=qc.exec(e),t===null&&(t=Nc.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],n=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,s,a,n,o,l)),h&&p.setTime(p.getTime()-h),p}g(Wc,"constructYamlTimestamp");function Hc(e){return e.toISOString()}g(Hc,"representYamlTimestamp");var Px=new Mt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:zc,construct:Wc,instanceOf:Date,represent:Hc});function Yc(e){return e==="<<"||e===null}g(Yc,"resolveYamlMerge");var Rx=new Mt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Yc}),Oo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
129
|
+
\r`;function jc(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=Oo;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(jc,"resolveYamlBinary");function Xc(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=Oo,n=0,o=[];for(t=0;t<s;t++)t%4===0&&t&&(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)),n=n<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)):r===18?(o.push(n>>10&255),o.push(n>>2&255)):r===12&&o.push(n>>4&255),new Uint8Array(o)}g(Xc,"constructYamlBinary");function Uc(e){var t="",r=0,i,s,a=e.length,n=Oo;for(i=0;i<a;i++)i%3===0&&i&&(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]),r=(r<<8)+e[i];return s=a%3,s===0?(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]):s===2?(t+=n[r>>10&63],t+=n[r>>4&63],t+=n[r<<2&63],t+=n[64]):s===1&&(t+=n[r>>2&63],t+=n[r<<4&63],t+=n[64],t+=n[64]),t}g(Uc,"representYamlBinary");function Gc(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(Gc,"isBinary");var qx=new Mt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:jc,construct:Xc,predicate:Gc,represent:Uc}),Nx=Object.prototype.hasOwnProperty,zx=Object.prototype.toString;function Vc(e){if(e===null)return!0;var t=[],r,i,s,a,n,o=e;for(r=0,i=o.length;r<i;r+=1){if(s=o[r],n=!1,zx.call(s)!=="[object Object]")return!1;for(a in s)if(Nx.call(s,a))if(!n)n=!0;else return!1;if(!n)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}g(Vc,"resolveYamlOmap");function Zc(e){return e!==null?e:[]}g(Zc,"constructYamlOmap");var Wx=new Mt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Vc,construct:Zc}),Hx=Object.prototype.toString;function Qc(e){if(e===null)return!0;var t,r,i,s,a,n=e;for(a=new Array(n.length),t=0,r=n.length;t<r;t+=1){if(i=n[t],Hx.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}g(Qc,"resolveYamlPairs");function Kc(e){if(e===null)return[];var t,r,i,s,a,n=e;for(a=new Array(n.length),t=0,r=n.length;t<r;t+=1)i=n[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}g(Kc,"constructYamlPairs");var Yx=new Mt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Qc,construct:Kc}),jx=Object.prototype.hasOwnProperty;function Jc(e){if(e===null)return!0;var t,r=e;for(t in r)if(jx.call(r,t)&&r[t]!==null)return!1;return!0}g(Jc,"resolveYamlSet");function tu(e){return e!==null?e:{}}g(tu,"constructYamlSet");var Xx=new Mt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Jc,construct:tu}),eu=Dx.extend({implicit:[Px,Rx],explicit:[qx,Wx,Yx,Xx]}),Fe=Object.prototype.hasOwnProperty,us=1,ru=2,iu=3,ds=4,ia=1,Ux=2,Hn=3,Gx=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Vx=/[\x85\u2028\u2029]/,Zx=/[,\[\]\{\}]/,su=/^(?:!|!!|![a-z\-]+!)$/i,au=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Aa(e){return Object.prototype.toString.call(e)}g(Aa,"_class");function Vt(e){return e===10||e===13}g(Vt,"is_EOL");function Be(e){return e===9||e===32}g(Be,"is_WHITE_SPACE");function Et(e){return e===9||e===32||e===10||e===13}g(Et,"is_WS_OR_EOL");function We(e){return e===44||e===91||e===93||e===123||e===125}g(We,"is_FLOW_INDICATOR");function ou(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(ou,"fromHexCode");function nu(e){return e===120?2:e===117?4:e===85?8:0}g(nu,"escapedHexLen");function lu(e){return 48<=e&&e<=57?e-48:-1}g(lu,"fromDecimalCode");function $a(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
130
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}g($a,"simpleEscapeSequence");function hu(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(hu,"charFromCodepoint");function Io(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(Io,"setProperty");var cu=new Array(256),uu=new Array(256);for(Ie=0;Ie<256;Ie++)cu[Ie]=$a(Ie)?1:0,uu[Ie]=$a(Ie);var Ie;function du(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||eu,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}g(du,"State$1");function Do(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Tx(r),new Rt(t,r)}g(Do,"generateError");function G(e,t){throw Do(e,t)}g(G,"throwError");function ci(e,t){e.onWarning&&e.onWarning.call(null,Do(e,t))}g(ci,"throwWarning");var Yn={YAML:g(function(t,r,i){var s,a,n;t.version!==null&&G(t,"duplication of %YAML directive"),i.length!==1&&G(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&G(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),n=parseInt(s[2],10),a!==1&&G(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&ci(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var s,a;i.length!==2&&G(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],su.test(s)||G(t,"ill-formed tag handle (first argument) of the TAG directive"),Fe.call(t.tagMap,s)&&G(t,'there is a previously declared suffix for "'+s+'" tag handle'),au.test(a)||G(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{G(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function fe(e,t,r,i){var s,a,n,o;if(t<r){if(o=e.input.slice(t,r),i)for(s=0,a=o.length;s<a;s+=1)n=o.charCodeAt(s),n===9||32<=n&&n<=1114111||G(e,"expected valid JSON character");else Gx.test(o)&&G(e,"the stream contains non-printable characters");e.result+=o}}g(fe,"captureSegment");function Ea(e,t,r,i){var s,a,n,o;for(wt.isObject(r)||G(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),n=0,o=s.length;n<o;n+=1)a=s[n],Fe.call(t,a)||(Io(t,a,r[a]),i[a]=!0)}g(Ea,"mergeMappings");function He(e,t,r,i,s,a,n,o,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&G(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Aa(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Aa(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)Ea(e,t,a[h],r);else Ea(e,t,a,r);else!e.json&&!Fe.call(r,s)&&Fe.call(t,s)&&(e.line=n||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,G(e,"duplicated mapping key")),Io(t,s,a),delete r[s];return t}g(He,"storeMappingPair");function Rs(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):G(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(Rs,"readLineBreak");function xt(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Be(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(Vt(s))for(Rs(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&ci(e,"deficient indentation"),i}g(xt,"skipSeparationSpace");function Ti(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Et(r)))}g(Ti,"testDocumentSeparator");function qs(e,t){t===1?e.result+=" ":t>1&&(e.result+=wt.repeat(`
|
|
131
|
+
`,t-1))}g(qs,"writeFoldedLines");function pu(e,t,r){var i,s,a,n,o,l,h,c,u=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),Et(d)||We(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)&&(s=e.input.charCodeAt(e.position+1),Et(s)||r&&We(s)))return!1;for(e.kind="scalar",e.result="",a=n=e.position,o=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),Et(s)||r&&We(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Et(i))break}else{if(e.position===e.lineStart&&Ti(e)||r&&We(d))break;if(Vt(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,xt(e,!1,-1),e.lineIndent>=t){o=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=n,e.line=l,e.lineStart=h,e.lineIndent=c;break}}o&&(fe(e,a,n,!1),qs(e,e.line-l),a=n=e.position,o=!1),Be(d)||(n=e.position+1),d=e.input.charCodeAt(++e.position)}return fe(e,a,n,!1),e.result?!0:(e.kind=u,e.result=p,!1)}g(pu,"readPlainScalar");function gu(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(fe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else Vt(r)?(fe(e,i,s,!0),qs(e,xt(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Ti(e)?G(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);G(e,"unexpected end of the stream within a single quoted scalar")}g(gu,"readSingleQuotedScalar");function fu(e,t){var r,i,s,a,n,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return fe(e,r,e.position,!0),e.position++,!0;if(o===92){if(fe(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Vt(o))xt(e,!1,t);else if(o<256&&cu[o])e.result+=uu[o],e.position++;else if((n=nu(o))>0){for(s=n,a=0;s>0;s--)o=e.input.charCodeAt(++e.position),(n=ou(o))>=0?a=(a<<4)+n:G(e,"expected hexadecimal character");e.result+=hu(a),e.position++}else G(e,"unknown escape sequence");r=i=e.position}else Vt(o)?(fe(e,r,i,!0),qs(e,xt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ti(e)?G(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}G(e,"unexpected end of the stream within a double quoted scalar")}g(fu,"readDoubleQuotedScalar");function yu(e,t){var r=!0,i,s,a,n=e.tag,o,l=e.anchor,h,c,u,p,d,f=Object.create(null),y,m,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,d=!1,o=[];else if(b===123)c=125,d=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),b=e.input.charCodeAt(++e.position);b!==0;){if(xt(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=n,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=o,!0;r?b===44&&G(e,"expected the node content, but found ','"):G(e,"missed comma between flow collection entries"),m=y=C=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Et(h)&&(u=p=!0,e.position++,xt(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,Ve(e,t,us,!1,!0),m=e.tag,y=e.result,xt(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),xt(e,!0,t),Ve(e,t,us,!1,!0),C=e.result),d?He(e,o,f,m,y,C,i,s,a):u?o.push(He(e,null,f,m,y,C,i,s,a)):o.push(y),xt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}G(e,"unexpected end of the stream within a flow collection")}g(yu,"readFlowCollection");function mu(e,t){var r,i,s=ia,a=!1,n=!1,o=t,l=0,h=!1,c,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)ia===s?s=u===43?Hn:Ux:G(e,"repeat of a chomping mode identifier");else if((c=lu(u))>=0)c===0?G(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?G(e,"repeat of an indentation width identifier"):(o=t+c-1,n=!0);else break;if(Be(u)){do u=e.input.charCodeAt(++e.position);while(Be(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Vt(u)&&u!==0)}for(;u!==0;){for(Rs(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!n||e.lineIndent<o)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>o&&(o=e.lineIndent),Vt(u)){l++;continue}if(e.lineIndent<o){s===Hn?e.result+=wt.repeat(`
|
|
132
|
+
`,a?1+l:l):s===ia&&a&&(e.result+=`
|
|
133
|
+
`);break}for(i?Be(u)?(h=!0,e.result+=wt.repeat(`
|
|
134
|
+
`,a?1+l:l)):h?(h=!1,e.result+=wt.repeat(`
|
|
135
|
+
`,l+1)):l===0?a&&(e.result+=" "):e.result+=wt.repeat(`
|
|
136
|
+
`,l):e.result+=wt.repeat(`
|
|
137
|
+
`,a?1+l:l),a=!0,n=!0,l=0,r=e.position;!Vt(u)&&u!==0;)u=e.input.charCodeAt(++e.position);fe(e,r,e.position,!1)}return!0}g(mu,"readBlockScalar");function Oa(e,t){var r,i=e.tag,s=e.anchor,a=[],n,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),!(l!==45||(n=e.input.charCodeAt(e.position+1),!Et(n))));){if(o=!0,e.position++,xt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Ve(e,t,iu,!1,!0),a.push(e.result),xt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)G(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}g(Oa,"readBlockSequence");function Cu(e,t,r){var i,s,a,n,o,l,h=e.tag,c=e.anchor,u={},p=Object.create(null),d=null,f=null,y=null,m=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Et(i))b===63?(m&&(He(e,u,p,d,f,null,n,o,l),d=f=y=null),C=!0,m=!0,s=!0):m?(m=!1,s=!0):G(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(n=e.line,o=e.lineStart,l=e.position,!Ve(e,r,ru,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Be(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Et(b)||G(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(He(e,u,p,d,f,null,n,o,l),d=f=y=null),C=!0,m=!1,s=!1,d=e.tag,f=e.result;else if(C)G(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)G(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===a||e.lineIndent>t)&&(m&&(n=e.line,o=e.lineStart,l=e.position),Ve(e,t,ds,!0,s)&&(m?f=e.result:y=e.result),m||(He(e,u,p,d,f,y,n,o,l),d=f=y=null),xt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)G(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&He(e,u,p,d,f,null,n,o,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}g(Cu,"readBlockMapping");function xu(e){var t,r=!1,i=!1,s,a,n;if(n=e.input.charCodeAt(e.position),n!==33)return!1;if(e.tag!==null&&G(e,"duplication of a tag property"),n=e.input.charCodeAt(++e.position),n===60?(r=!0,n=e.input.charCodeAt(++e.position)):n===33?(i=!0,s="!!",n=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do n=e.input.charCodeAt(++e.position);while(n!==0&&n!==62);e.position<e.length?(a=e.input.slice(t,e.position),n=e.input.charCodeAt(++e.position)):G(e,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!Et(n);)n===33&&(i?G(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),su.test(s)||G(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),n=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Zx.test(a)&&G(e,"tag suffix cannot contain flow indicator characters")}a&&!au.test(a)&&G(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{G(e,"tag name is malformed: "+a)}return r?e.tag=a:Fe.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:G(e,'undeclared tag handle "'+s+'"'),!0}g(xu,"readTagProperty");function bu(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&G(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Et(r)&&!We(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(bu,"readAnchorProperty");function ku(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Et(i)&&!We(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Fe.call(e.anchorMap,r)||G(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],xt(e,!0,-1),!0}g(ku,"readAlias");function Ve(e,t,r,i,s){var a,n,o,l=1,h=!1,c=!1,u,p,d,f,y,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=n=o=ds===r||iu===r,i&&xt(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;xu(e)||bu(e);)xt(e,!0,-1)?(h=!0,o=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=h||s),(l===1||ds===r)&&(us===r||ru===r?y=t:y=t+1,m=e.position-e.lineStart,l===1?o&&(Oa(e,m)||Cu(e,m,y))||yu(e,y)?c=!0:(n&&mu(e,y)||gu(e,y)||fu(e,y)?c=!0:ku(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&G(e,"alias node should not have any properties")):pu(e,y,us===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=o&&Oa(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&G(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if(f=e.implicitTypes[u],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Fe.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,p=d.length;u<p;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){f=d[u];break}f||G(e,"unknown tag !<"+e.tag+">"),e.result!==null&&f.kind!==e.kind&&G(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):G(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}g(Ve,"composeNode");function Tu(e){var t=e.position,r,i,s,a=!1,n;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(n=e.input.charCodeAt(e.position))!==0&&(xt(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||n!==37));){for(a=!0,n=e.input.charCodeAt(++e.position),r=e.position;n!==0&&!Et(n);)n=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&G(e,"directive name must not be less than one character in length");n!==0;){for(;Be(n);)n=e.input.charCodeAt(++e.position);if(n===35){do n=e.input.charCodeAt(++e.position);while(n!==0&&!Vt(n));break}if(Vt(n))break;for(r=e.position;n!==0&&!Et(n);)n=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}n!==0&&Rs(e),Fe.call(Yn,i)?Yn[i](e,i,s):ci(e,'unknown document directive "'+i+'"')}if(xt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,xt(e,!0,-1)):a&&G(e,"directives end mark is expected"),Ve(e,e.lineIndent-1,ds,!1,!0),xt(e,!0,-1),e.checkLineBreaks&&Vx.test(e.input.slice(t,e.position))&&ci(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ti(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,xt(e,!0,-1));return}if(e.position<e.length-1)G(e,"end of the stream or a document separator is expected");else return}g(Tu,"readDocument");function Po(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
138
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new du(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,G(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Tu(r);return r.documents}g(Po,"loadDocuments");function Qx(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Po(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}g(Qx,"loadAll$1");function wu(e,t){var r=Po(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Rt("expected a single document in the stream, but found more")}}g(wu,"load$1");var Kx=wu,Jx={load:Kx},_u=Object.prototype.toString,Su=Object.prototype.hasOwnProperty,Ro=65279,tb=9,ui=10,eb=13,rb=32,ib=33,sb=34,Ia=35,ab=37,ob=38,nb=39,lb=42,vu=44,hb=45,ps=58,cb=61,ub=62,db=63,pb=64,Bu=91,Lu=93,gb=96,Fu=123,fb=124,Mu=125,At={};At[0]="\\0";At[7]="\\a";At[8]="\\b";At[9]="\\t";At[10]="\\n";At[11]="\\v";At[12]="\\f";At[13]="\\r";At[27]="\\e";At[34]='\\"';At[92]="\\\\";At[133]="\\N";At[160]="\\_";At[8232]="\\L";At[8233]="\\P";var yb=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],mb=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Au(e,t){var r,i,s,a,n,o,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)n=i[s],o=String(t[n]),n.slice(0,2)==="!!"&&(n="tag:yaml.org,2002:"+n.slice(2)),l=e.compiledTypeMap.fallback[n],l&&Su.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[n]=o;return r}g(Au,"compileStyleMap");function $u(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Rt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+wt.repeat("0",i-t.length)+t}g($u,"encodeHex");var Cb=1,di=2;function Eu(e){this.schema=e.schema||eu,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=wt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Au(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?di:Cb,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(Eu,"State");function Da(e,t){for(var r=wt.repeat(" ",t),i=0,s=-1,a="",n,o=e.length;i<o;)s=e.indexOf(`
|
|
139
|
+
`,i),s===-1?(n=e.slice(i),i=o):(n=e.slice(i,s+1),i=s+1),n.length&&n!==`
|
|
140
|
+
`&&(a+=r),a+=n;return a}g(Da,"indentString");function gs(e,t){return`
|
|
141
|
+
`+wt.repeat(" ",e.indent*t)}g(gs,"generateNextLine");function Ou(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}g(Ou,"testImplicitResolving");function pi(e){return e===rb||e===tb}g(pi,"isWhitespace");function $r(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ro||65536<=e&&e<=1114111}g($r,"isPrintable");function Pa(e){return $r(e)&&e!==Ro&&e!==eb&&e!==ui}g(Pa,"isNsCharOrWhitespace");function Ra(e,t,r){var i=Pa(e),s=i&&!pi(e);return(r?i:i&&e!==vu&&e!==Bu&&e!==Lu&&e!==Fu&&e!==Mu)&&e!==Ia&&!(t===ps&&!s)||Pa(t)&&!pi(t)&&e===Ia||t===ps&&s}g(Ra,"isPlainSafe");function Iu(e){return $r(e)&&e!==Ro&&!pi(e)&&e!==hb&&e!==db&&e!==ps&&e!==vu&&e!==Bu&&e!==Lu&&e!==Fu&&e!==Mu&&e!==Ia&&e!==ob&&e!==lb&&e!==ib&&e!==fb&&e!==cb&&e!==ub&&e!==nb&&e!==sb&&e!==ab&&e!==pb&&e!==gb}g(Iu,"isPlainSafeFirst");function Du(e){return!pi(e)&&e!==ps}g(Du,"isPlainSafeLast");function cr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(cr,"codePointAt");function qo(e){var t=/^\n* /;return t.test(e)}g(qo,"needIndentIndicator");var Pu=1,qa=2,Ru=3,qu=4,nr=5;function Nu(e,t,r,i,s,a,n,o){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,f=-1,y=Iu(cr(e,0))&&Du(cr(e,e.length-1));if(t||n)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=cr(e,l),!$r(h))return nr;y=y&&Ra(h,c,o),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=cr(e,l),h===ui)u=!0,d&&(p=p||l-f-1>i&&e[f+1]!==" ",f=l);else if(!$r(h))return nr;y=y&&Ra(h,c,o),c=h}p=p||d&&l-f-1>i&&e[f+1]!==" "}return!u&&!p?y&&!n&&!s(e)?Pu:a===di?nr:qa:r>9&&qo(e)?nr:n?a===di?nr:qa:p?qu:Ru}g(Nu,"chooseScalarStyle");function zu(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===di?'""':"''";if(!e.noCompatMode&&(yb.indexOf(t)!==-1||mb.test(t)))return e.quotingType===di?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return Ou(e,h)}switch(g(l,"testAmbiguity"),Nu(t,o,e.indent,n,l,e.quotingType,e.forceQuotes&&!i,s)){case Pu:return t;case qa:return"'"+t.replace(/'/g,"''")+"'";case Ru:return"|"+Na(t,e.indent)+za(Da(t,a));case qu:return">"+Na(t,e.indent)+za(Da(Wu(t,n),a));case nr:return'"'+Hu(t)+'"';default:throw new Rt("impossible error: invalid scalar style")}})()}g(zu,"writeScalar");function Na(e,t){var r=qo(e)?String(t):"",i=e[e.length-1]===`
|
|
142
|
+
`,s=i&&(e[e.length-2]===`
|
|
143
|
+
`||e===`
|
|
144
|
+
`),a=s?"+":i?"":"-";return r+a+`
|
|
145
|
+
`}g(Na,"blockHeader");function za(e){return e[e.length-1]===`
|
|
146
|
+
`?e.slice(0,-1):e}g(za,"dropEndingNewline");function Wu(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=e.indexOf(`
|
|
147
|
+
`);return h=h!==-1?h:e.length,r.lastIndex=h,Wa(e.slice(0,h),t)})(),s=e[0]===`
|
|
148
|
+
`||e[0]===" ",a,n;n=r.exec(e);){var o=n[1],l=n[2];a=l[0]===" ",i+=o+(!s&&!a&&l!==""?`
|
|
149
|
+
`:"")+Wa(l,t),s=a}return i}g(Wu,"foldString");function Wa(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,n=0,o=0,l="";i=r.exec(e);)o=i.index,o-s>t&&(a=n>s?n:o,l+=`
|
|
150
|
+
`+e.slice(s,a),s=a+1),n=o;return l+=`
|
|
151
|
+
`,e.length-s>t&&n>s?l+=e.slice(s,n)+`
|
|
152
|
+
`+e.slice(n+1):l+=e.slice(s),l.slice(1)}g(Wa,"foldLine");function Hu(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=cr(e,s),i=At[r],!i&&$r(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||$u(r);return t}g(Hu,"escapeString");function Yu(e,t,r){var i="",s=e.tag,a,n,o;for(a=0,n=r.length;a<n;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(ae(e,t,o,!1,!1)||typeof o>"u"&&ae(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}g(Yu,"writeFlowSequence");function Ha(e,t,r,i){var s="",a=e.tag,n,o,l;for(n=0,o=r.length;n<o;n+=1)l=r[n],e.replacer&&(l=e.replacer.call(r,String(n),l)),(ae(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ae(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=gs(e,t)),e.dump&&ui===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}g(Ha,"writeBlockSequence");function ju(e,t,r){var i="",s=e.tag,a=Object.keys(r),n,o,l,h,c;for(n=0,o=a.length;n<o;n+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=a[n],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),ae(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ae(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}g(ju,"writeFlowMapping");function Xu(e,t,r,i){var s="",a=e.tag,n=Object.keys(r),o,l,h,c,u,p;if(e.sortKeys===!0)n.sort();else if(typeof e.sortKeys=="function")n.sort(e.sortKeys);else if(e.sortKeys)throw new Rt("sortKeys must be a boolean or a function");for(o=0,l=n.length;o<l;o+=1)p="",(!i||s!=="")&&(p+=gs(e,t)),h=n[o],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),ae(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&ui===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=gs(e,t)),ae(e,t+1,c,!0,u)&&(e.dump&&ui===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}g(Xu,"writeBlockMapping");function Ya(e,t,r){var i,s,a,n,o,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,n=s.length;a<n;a+=1)if(o=s[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,_u.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(Su.call(o.represent,l))i=o.represent[l](t,l);else throw new Rt("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(Ya,"detectType");function ae(e,t,r,i,s,a,n){e.tag=null,e.dump=r,Ya(e,r,!1)||Ya(e,r,!0);var o=_u.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=o==="[object Object]"||o==="[object Array]",u,p;if(c&&(u=e.duplicates.indexOf(r),p=u!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(Xu(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(ju(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!n&&t>0?Ha(e,t-1,e.dump,s):Ha(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(Yu(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&zu(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Rt("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}g(ae,"writeNode");function Uu(e,t){var r=[],i=[],s,a;for(fs(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}g(Uu,"getDuplicateReferences");function fs(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)fs(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)fs(e[i[s]],t,r)}g(fs,"inspectNode");function xb(e,t){t=t||{};var r=new Eu(t);r.noRefs||Uu(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ae(r,0,i,!0,!0)?r.dump+`
|
|
153
|
+
`:""}g(xb,"dump$1");function bb(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}g(bb,"renamed");var kb=Rc,Tb=Jx.load;/*! Bundled license information:
|
|
154
|
+
|
|
155
|
+
js-yaml/dist/js-yaml.mjs:
|
|
156
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
157
|
+
*/var Rr=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Ft={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},jn={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Vr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=yt(e),t=yt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],n=s-r,o=a-i;return{angle:Math.atan(o/n),deltaX:n,deltaY:o}}g(Vr,"calculateDeltaAndAngle");var yt=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),wb=g(e=>({x:g(function(t,r,i){let s=0;const a=yt(i[0]).x<yt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ft,e.arrowTypeStart)){const{angle:d,deltaX:f}=Vr(i[0],i[1]);s=Ft[e.arrowTypeStart]*Math.cos(d)*(f>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ft,e.arrowTypeEnd)){const{angle:d,deltaX:f}=Vr(i[i.length-1],i[i.length-2]);s=Ft[e.arrowTypeEnd]*Math.cos(d)*(f>=0?1:-1)}const n=Math.abs(yt(t).x-yt(i[i.length-1]).x),o=Math.abs(yt(t).y-yt(i[i.length-1]).y),l=Math.abs(yt(t).x-yt(i[0]).x),h=Math.abs(yt(t).y-yt(i[0]).y),c=Ft[e.arrowTypeStart],u=Ft[e.arrowTypeEnd],p=1;if(n<u&&n>0&&o<u){let d=u+p-n;d*=a==="right"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=a==="right"?-1:1,s+=d}return yt(t).x+s},"x"),y:g(function(t,r,i){let s=0;const a=yt(i[0]).y<yt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ft,e.arrowTypeStart)){const{angle:d,deltaY:f}=Vr(i[0],i[1]);s=Ft[e.arrowTypeStart]*Math.abs(Math.sin(d))*(f>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ft,e.arrowTypeEnd)){const{angle:d,deltaY:f}=Vr(i[i.length-1],i[i.length-2]);s=Ft[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(f>=0?1:-1)}const n=Math.abs(yt(t).y-yt(i[i.length-1]).y),o=Math.abs(yt(t).x-yt(i[i.length-1]).x),l=Math.abs(yt(t).y-yt(i[0]).y),h=Math.abs(yt(t).x-yt(i[0]).x),c=Ft[e.arrowTypeStart],u=Ft[e.arrowTypeEnd],p=1;if(n<u&&n>0&&o<u){let d=u+p-n;d*=a==="up"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=a==="up"?-1:1,s+=d}return yt(t).y+s},"y")}),"getLineFunctionsWithOffset"),$i={},kt={},Xn;function _b(){return Xn||(Xn=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.BLANK_URL=kt.relativeFirstCharacters=kt.whitespaceEscapeCharsRegex=kt.urlSchemeRegex=kt.ctrlCharactersRegex=kt.htmlCtrlEntityRegex=kt.htmlEntitiesRegex=kt.invalidProtocolRegex=void 0,kt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,kt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,kt.htmlCtrlEntityRegex=/&(newline|tab);/gi,kt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,kt.urlSchemeRegex=/^.+(:|:)/gim,kt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,kt.relativeFirstCharacters=[".","/"],kt.BLANK_URL="about:blank"),kt}var Un;function Sb(){if(Un)return $i;Un=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.sanitizeUrl=a;var e=_b();function t(n){return e.relativeFirstCharacters.indexOf(n[0])>-1}function r(n){var o=n.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,h){return String.fromCharCode(h)})}function i(n){return URL.canParse(n)}function s(n){try{return decodeURIComponent(n)}catch{return n}}function a(n){if(!n)return e.BLANK_URL;var o,l=s(n.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),u=c.match(e.urlSchemeRegex);if(!u)return h;var p=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var d=c.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return d;if(p==="http:"||p==="https:"){if(!i(d))return e.BLANK_URL;var f=new URL(d);return f.protocol=f.protocol.toLowerCase(),f.hostname=f.hostname.toLowerCase(),f.toString()}return d}return $i}var vb=Sb(),Gu=typeof global=="object"&&global&&global.Object===Object&&global,Bb=typeof self=="object"&&self&&self.Object===Object&&self,he=Gu||Bb||Function("return this")(),ys=he.Symbol,Vu=Object.prototype,Lb=Vu.hasOwnProperty,Fb=Vu.toString,qr=ys?ys.toStringTag:void 0;function Mb(e){var t=Lb.call(e,qr),r=e[qr];try{e[qr]=void 0;var i=!0}catch{}var s=Fb.call(e);return i&&(t?e[qr]=r:delete e[qr]),s}var Ab=Object.prototype,$b=Ab.toString;function Eb(e){return $b.call(e)}var Ob="[object Null]",Ib="[object Undefined]",Gn=ys?ys.toStringTag:void 0;function Er(e){return e==null?e===void 0?Ib:Ob:Gn&&Gn in Object(e)?Mb(e):Eb(e)}function tr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Db="[object AsyncFunction]",Pb="[object Function]",Rb="[object GeneratorFunction]",qb="[object Proxy]";function No(e){if(!tr(e))return!1;var t=Er(e);return t==Pb||t==Rb||t==Db||t==qb}var sa=he["__core-js_shared__"],Vn=(function(){var e=/[^.]+$/.exec(sa&&sa.keys&&sa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Nb(e){return!!Vn&&Vn in e}var zb=Function.prototype,Wb=zb.toString;function er(e){if(e!=null){try{return Wb.call(e)}catch{}try{return e+""}catch{}}return""}var Hb=/[\\^$.*+?()[\]{}|]/g,Yb=/^\[object .+?Constructor\]$/,jb=Function.prototype,Xb=Object.prototype,Ub=jb.toString,Gb=Xb.hasOwnProperty,Vb=RegExp("^"+Ub.call(Gb).replace(Hb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zb(e){if(!tr(e)||Nb(e))return!1;var t=No(e)?Vb:Yb;return t.test(er(e))}function Qb(e,t){return e==null?void 0:e[t]}function rr(e,t){var r=Qb(e,t);return Zb(r)?r:void 0}var gi=rr(Object,"create");function Kb(){this.__data__=gi?gi(null):{},this.size=0}function Jb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var t1="__lodash_hash_undefined__",e1=Object.prototype,r1=e1.hasOwnProperty;function i1(e){var t=this.__data__;if(gi){var r=t[e];return r===t1?void 0:r}return r1.call(t,e)?t[e]:void 0}var s1=Object.prototype,a1=s1.hasOwnProperty;function o1(e){var t=this.__data__;return gi?t[e]!==void 0:a1.call(t,e)}var n1="__lodash_hash_undefined__";function l1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=gi&&t===void 0?n1:t,this}function Ze(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ze.prototype.clear=Kb;Ze.prototype.delete=Jb;Ze.prototype.get=i1;Ze.prototype.has=o1;Ze.prototype.set=l1;function h1(){this.__data__=[],this.size=0}function Ns(e,t){return e===t||e!==e&&t!==t}function zs(e,t){for(var r=e.length;r--;)if(Ns(e[r][0],t))return r;return-1}var c1=Array.prototype,u1=c1.splice;function d1(e){var t=this.__data__,r=zs(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():u1.call(t,r,1),--this.size,!0}function p1(e){var t=this.__data__,r=zs(t,e);return r<0?void 0:t[r][1]}function g1(e){return zs(this.__data__,e)>-1}function f1(e,t){var r=this.__data__,i=zs(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function xe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}xe.prototype.clear=h1;xe.prototype.delete=d1;xe.prototype.get=p1;xe.prototype.has=g1;xe.prototype.set=f1;var fi=rr(he,"Map");function y1(){this.size=0,this.__data__={hash:new Ze,map:new(fi||xe),string:new Ze}}function m1(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ws(e,t){var r=e.__data__;return m1(t)?r[typeof t=="string"?"string":"hash"]:r.map}function C1(e){var t=Ws(this,e).delete(e);return this.size-=t?1:0,t}function x1(e){return Ws(this,e).get(e)}function b1(e){return Ws(this,e).has(e)}function k1(e,t){var r=Ws(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function $e(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}$e.prototype.clear=y1;$e.prototype.delete=C1;$e.prototype.get=x1;$e.prototype.has=b1;$e.prototype.set=k1;var T1="Expected a function";function wi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(T1);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);var n=e.apply(this,i);return r.cache=a.set(s,n)||a,n};return r.cache=new(wi.Cache||$e),r}wi.Cache=$e;function w1(){this.__data__=new xe,this.size=0}function _1(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function S1(e){return this.__data__.get(e)}function v1(e){return this.__data__.has(e)}var B1=200;function L1(e,t){var r=this.__data__;if(r instanceof xe){var i=r.__data__;if(!fi||i.length<B1-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new $e(i)}return r.set(e,t),this.size=r.size,this}function Or(e){var t=this.__data__=new xe(e);this.size=t.size}Or.prototype.clear=w1;Or.prototype.delete=_1;Or.prototype.get=S1;Or.prototype.has=v1;Or.prototype.set=L1;var ms=(function(){try{var e=rr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function zo(e,t,r){t=="__proto__"&&ms?ms(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ja(e,t,r){(r!==void 0&&!Ns(e[t],r)||r===void 0&&!(t in e))&&zo(e,t,r)}function F1(e){return function(t,r,i){for(var s=-1,a=Object(t),n=i(t),o=n.length;o--;){var l=n[++s];if(r(a[l],l,a)===!1)break}return t}}var M1=F1(),Zu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zn=Zu&&typeof module=="object"&&module&&!module.nodeType&&module,A1=Zn&&Zn.exports===Zu,Qn=A1?he.Buffer:void 0,Kn=Qn?Qn.allocUnsafe:void 0;function $1(e,t){if(t)return e.slice();var r=e.length,i=Kn?Kn(r):new e.constructor(r);return e.copy(i),i}var Jn=he.Uint8Array;function E1(e){var t=new e.constructor(e.byteLength);return new Jn(t).set(new Jn(e)),t}function O1(e,t){var r=t?E1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function I1(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var tl=Object.create,D1=(function(){function e(){}return function(t){if(!tr(t))return{};if(tl)return tl(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Qu(e,t){return function(r){return e(t(r))}}var Ku=Qu(Object.getPrototypeOf,Object),P1=Object.prototype;function Hs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||P1;return e===r}function R1(e){return typeof e.constructor=="function"&&!Hs(e)?D1(Ku(e)):{}}function _i(e){return e!=null&&typeof e=="object"}var q1="[object Arguments]";function el(e){return _i(e)&&Er(e)==q1}var Ju=Object.prototype,N1=Ju.hasOwnProperty,z1=Ju.propertyIsEnumerable,Cs=el((function(){return arguments})())?el:function(e){return _i(e)&&N1.call(e,"callee")&&!z1.call(e,"callee")},xs=Array.isArray,W1=9007199254740991;function td(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=W1}function Ys(e){return e!=null&&td(e.length)&&!No(e)}function H1(e){return _i(e)&&Ys(e)}function Y1(){return!1}var ed=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rl=ed&&typeof module=="object"&&module&&!module.nodeType&&module,j1=rl&&rl.exports===ed,il=j1?he.Buffer:void 0,X1=il?il.isBuffer:void 0,Wo=X1||Y1,U1="[object Object]",G1=Function.prototype,V1=Object.prototype,rd=G1.toString,Z1=V1.hasOwnProperty,Q1=rd.call(Object);function K1(e){if(!_i(e)||Er(e)!=U1)return!1;var t=Ku(e);if(t===null)return!0;var r=Z1.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&rd.call(r)==Q1}var J1="[object Arguments]",tk="[object Array]",ek="[object Boolean]",rk="[object Date]",ik="[object Error]",sk="[object Function]",ak="[object Map]",ok="[object Number]",nk="[object Object]",lk="[object RegExp]",hk="[object Set]",ck="[object String]",uk="[object WeakMap]",dk="[object ArrayBuffer]",pk="[object DataView]",gk="[object Float32Array]",fk="[object Float64Array]",yk="[object Int8Array]",mk="[object Int16Array]",Ck="[object Int32Array]",xk="[object Uint8Array]",bk="[object Uint8ClampedArray]",kk="[object Uint16Array]",Tk="[object Uint32Array]",ft={};ft[gk]=ft[fk]=ft[yk]=ft[mk]=ft[Ck]=ft[xk]=ft[bk]=ft[kk]=ft[Tk]=!0;ft[J1]=ft[tk]=ft[dk]=ft[ek]=ft[pk]=ft[rk]=ft[ik]=ft[sk]=ft[ak]=ft[ok]=ft[nk]=ft[lk]=ft[hk]=ft[ck]=ft[uk]=!1;function wk(e){return _i(e)&&td(e.length)&&!!ft[Er(e)]}function _k(e){return function(t){return e(t)}}var id=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ii=id&&typeof module=="object"&&module&&!module.nodeType&&module,Sk=ii&&ii.exports===id,aa=Sk&&Gu.process,sl=(function(){try{var e=ii&&ii.require&&ii.require("util").types;return e||aa&&aa.binding&&aa.binding("util")}catch{}})(),al=sl&&sl.isTypedArray,Ho=al?_k(al):wk;function Xa(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var vk=Object.prototype,Bk=vk.hasOwnProperty;function Lk(e,t,r){var i=e[t];(!(Bk.call(e,t)&&Ns(i,r))||r===void 0&&!(t in e))&&zo(e,t,r)}function Fk(e,t,r,i){var s=!r;r||(r={});for(var a=-1,n=t.length;++a<n;){var o=t[a],l=void 0;l===void 0&&(l=e[o]),s?zo(r,o,l):Lk(r,o,l)}return r}function Mk(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var Ak=9007199254740991,$k=/^(?:0|[1-9]\d*)$/;function sd(e,t){var r=typeof e;return t=t??Ak,!!t&&(r=="number"||r!="symbol"&&$k.test(e))&&e>-1&&e%1==0&&e<t}var Ek=Object.prototype,Ok=Ek.hasOwnProperty;function Ik(e,t){var r=xs(e),i=!r&&Cs(e),s=!r&&!i&&Wo(e),a=!r&&!i&&!s&&Ho(e),n=r||i||s||a,o=n?Mk(e.length,String):[],l=o.length;for(var h in e)(t||Ok.call(e,h))&&!(n&&(h=="length"||s&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||sd(h,l)))&&o.push(h);return o}function Dk(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Pk=Object.prototype,Rk=Pk.hasOwnProperty;function qk(e){if(!tr(e))return Dk(e);var t=Hs(e),r=[];for(var i in e)i=="constructor"&&(t||!Rk.call(e,i))||r.push(i);return r}function ad(e){return Ys(e)?Ik(e,!0):qk(e)}function Nk(e){return Fk(e,ad(e))}function zk(e,t,r,i,s,a,n){var o=Xa(e,r),l=Xa(t,r),h=n.get(l);if(h){ja(e,r,h);return}var c=a?a(o,l,r+"",e,t,n):void 0,u=c===void 0;if(u){var p=xs(l),d=!p&&Wo(l),f=!p&&!d&&Ho(l);c=l,p||d||f?xs(o)?c=o:H1(o)?c=I1(o):d?(u=!1,c=$1(l,!0)):f?(u=!1,c=O1(l,!0)):c=[]:K1(l)||Cs(l)?(c=o,Cs(o)?c=Nk(o):(!tr(o)||No(o))&&(c=R1(l))):u=!1}u&&(n.set(l,c),s(c,l,i,a,n),n.delete(l)),ja(e,r,c)}function od(e,t,r,i,s){e!==t&&M1(t,function(a,n){if(s||(s=new Or),tr(a))zk(e,t,n,r,od,i,s);else{var o=i?i(Xa(e,n),a,n+"",e,t,s):void 0;o===void 0&&(o=a),ja(e,n,o)}},ad)}function nd(e){return e}function Wk(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var ol=Math.max;function Hk(e,t,r){return t=ol(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=ol(i.length-t,0),n=Array(a);++s<a;)n[s]=i[t+s];s=-1;for(var o=Array(t+1);++s<t;)o[s]=i[s];return o[t]=r(n),Wk(e,this,o)}}function Yk(e){return function(){return e}}var jk=ms?function(e,t){return ms(e,"toString",{configurable:!0,enumerable:!1,value:Yk(t),writable:!0})}:nd,Xk=800,Uk=16,Gk=Date.now;function Vk(e){var t=0,r=0;return function(){var i=Gk(),s=Uk-(i-r);if(r=i,s>0){if(++t>=Xk)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Zk=Vk(jk);function Qk(e,t){return Zk(Hk(e,t,nd),e+"")}function Kk(e,t,r){if(!tr(r))return!1;var i=typeof t;return(i=="number"?Ys(r)&&sd(t,r.length):i=="string"&&t in r)?Ns(r[t],e):!1}function Jk(e){return Qk(function(t,r){var i=-1,s=r.length,a=s>1?r[s-1]:void 0,n=s>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(s--,a):void 0,n&&Kk(r[0],r[1],n)&&(a=s<3?void 0:a,s=1),t=Object(t);++i<s;){var o=r[i];o&&e(t,o,i,a)}return t})}var t2=Jk(function(e,t,r){od(e,t,r)}),e2="",r2={curveBasis:Fa,curveBasisClosed:nx,curveBasisOpen:lx,curveBumpX:Uh,curveBumpY:Gh,curveBundle:hx,curveCardinalClosed:cx,curveCardinalOpen:ux,curveCardinal:Kh,curveCatmullRomClosed:dx,curveCatmullRomOpen:px,curveCatmullRom:tc,curveLinear:ri,curveLinearClosed:gx,curveMonotoneX:oc,curveMonotoneY:nc,curveNatural:hc,curveStep:cc,curveStepAfter:dc,curveStepBefore:uc},i2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,s2=g(function(e,t){const r=ld(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(o=>o.args);Zi(n),i=Tt(i,[...n])}else i=r.args;if(!i)return;let s=go(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),ld=g(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${i2.source})(?=[}][%]{2}).*
|
|
158
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const n=[];for(;(a=ti.exec(e))!==null;)if(a.index===ti.lastIndex&&ti.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const o=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;n.push({type:o,args:l})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(s){return P.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),a2=g(function(e){return e.replace(ti,"")},"removeDirectives"),o2=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Yo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return r2[r]??t}g(Yo,"interpolateToCurve");function hd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?vb.sanitizeUrl(r):r}g(hd,"formatUrl");var n2=g((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let n=0;n<i;n++)if(a=a[r[n]],!a){P.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function jo(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(jo,"distance");function cd(e){let t,r=0;e.forEach(s=>{r+=jo(s,t),t=s});const i=r/2;return Xo(e,i)}g(cd,"traverseEdge");function ud(e){return e.length===1?e[0]:cd(e)}g(ud,"calcLabelPosition");var nl=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Xo=g((e,t)=>{let r,i=t;for(const s of e){if(r){const a=jo(s,r);if(a===0)return r;if(a<i)i-=a;else{const n=i/a;if(n<=0)return r;if(n>=1)return{x:s.x,y:s.y};if(n>0&&n<1)return{x:nl((1-n)*r.x+n*s.x,5),y:nl((1-n)*r.y+n*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),l2=g((e,t,r)=>{P.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Xo(t,25),a=e?10:5,n=Math.atan2(t[0].y-s.y,t[0].x-s.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(t[0].x+s.x)/2,o.y=-Math.cos(n)*a+(t[0].y+s.y)/2,o},"calcCardinalityPosition");function dd(e,t,r){const i=structuredClone(r);P.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Xo(i,s),n=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2),l}g(dd,"calcTerminalLabelPosition");function pd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}g(pd,"getStylesFromArray");var ll=0,h2=g(()=>(ll++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ll),"generateId");function gd(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(gd,"makeRandomHex");var c2=g(e=>gd(e.length),"random"),u2=g(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),d2=g(function(e,t){const r=t.text.replace(xi.lineBreakRegex," "),[,i]=js(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),p2=wi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),xi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((n,o)=>{const l=me(`${n} `,r),h=me(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=g2(n,t,"-",r);s.push(a,...p),a=d}else h+l>=t?(s.push(a),a=n):a=[a,n].filter(Boolean).join(" ");o+1===i.length&&s.push(a)}),s.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),g2=wi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let n="";return s.forEach((o,l)=>{const h=`${n}${o}`;if(me(h,i)>=t){const u=l+1,p=s.length===u,d=`${h}${r}`;a.push(p?h:d),n=""}else n=h}),{hyphenatedStrings:a,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function fd(e,t){return Uo(e,t).height}g(fd,"calculateTextHeight");function me(e,t){return Uo(e,t).width}g(me,"calculateTextWidth");var Uo=wi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=js(r),n=["sans-serif",i],o=e.split(xi.lineBreakRegex),l=[],h=it("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const p of n){let d=0;const f={width:0,height:0,lineHeight:0};for(const y of o){const m=u2();m.text=y||e2;const C=d2(c,m).style("font-size",a).style("font-weight",s).style("font-family",p),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");f.width=Math.round(Math.max(f.width,b.width)),d=Math.round(b.height),f.height+=d,f.lineHeight=Math.round(Math.max(f.lineHeight,d))}l.push(f)}c.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]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),vr,f2=(vr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(vr,"InitIDGenerator"),vr),Ei,y2=g(function(e){return Ei=Ei||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ei.innerHTML=e,unescape(Ei.textContent)},"entityDecode");function Go(e){return"str"in e}g(Go,"isDetailedError");var m2=g((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),js=g(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Vo(e,t){return t2({},e,t)}g(Vo,"cleanAndMerge");var Gt={assignWithDepth:Tt,wrapLabel:p2,calculateTextHeight:fd,calculateTextWidth:me,calculateTextDimensions:Uo,cleanAndMerge:Vo,detectInit:s2,detectDirective:ld,isSubstringInArray:o2,interpolateToCurve:Yo,calcLabelPosition:ud,calcCardinalityPosition:l2,calcTerminalLabelPosition:dd,formatUrl:hd,getStylesFromArray:pd,generateId:h2,random:c2,runFunc:n2,entityDecode:y2,insertTitle:m2,isLabelCoordinateInPath:yd,parseFontSize:js,InitIDGenerator:f2},C2=g(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Qe=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),$B=g((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function St(e){return e??null}g(St,"handleUndefinedAttr");function yd(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}g(yd,"isLabelCoordinateInPath");var Zo=g(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function md(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(a=>{function n(){if(s.style.display="flex",s.style.flexDirection="column",i){const o=ht().fontSize?ht().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=oh.fontSize]=js(o),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}g(n,"setupImage"),setTimeout(()=>{s.complete&&n()}),s.addEventListener("error",n),s.addEventListener("load",n)})))}g(md,"configureLabelImages");var x2=g(e=>{const{handDrawnSeed:t}=ht();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Ir=g(e=>{const t=b2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),b2=g(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Cd=g(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),X=g(e=>{const{stylesArray:t}=Ir(e),r=[],i=[],s=[],a=[];return t.forEach(n=>{const o=n[0];Cd(o)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),o.includes("stroke")&&s.push(n.join(":")+" !important"),o==="fill"&&a.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),j=g((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=ht(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:n}=Ir(e);return Object.assign({roughness:.7,fill:n.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:n.get("stroke")||s,seed:i,strokeWidth:((l=n.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:k2(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),k2=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const T2=Object.freeze({left:0,top:0,width:16,height:16}),bs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xd=Object.freeze({...T2,...bs}),w2=Object.freeze({...xd,body:"",hidden:!1}),_2=Object.freeze({width:null,height:null}),S2=Object.freeze({..._2,...bs}),v2=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const o=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:o};return oa(h)?h:null}const a=s[0],n=a.split("-");if(n.length>1){const o={provider:i,prefix:n.shift(),name:n.join("-")};return oa(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return oa(o,r)?o:null}return null},oa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function B2(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function hl(e,t){const r=B2(e,t);for(const i in w2)i in bs?i in e&&!(i in r)&&(r[i]=bs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function L2(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(n){if(r[n])return s[n]=[];if(!(n in s)){s[n]=null;const o=i[n]&&i[n].parent,l=o&&a(o);l&&(s[n]=[o].concat(l))}return s[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function cl(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function n(o){a=hl(i[o]||s[o],a)}return n(t),r.forEach(n),hl(e,a)}function F2(e,t){if(e.icons[t])return cl(e,t,[]);const r=L2(e,[t])[t];return r?cl(e,t,r):null}const M2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,A2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ul(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(M2);if(i===null||!i.length)return e;const s=[];let a=i.shift(),n=A2.test(a);for(;;){if(n){const o=parseFloat(a);isNaN(o)?s.push(a):s.push(Math.ceil(o*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");n=!n}}function $2(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const n=e.indexOf(">",a);if(n===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function E2(e,t){return e?"<defs>"+e+"</defs>"+t:t}function O2(e,t,r){const i=$2(e);return E2(i.defs,t+i.content+r)}const I2=e=>e==="unset"||e==="undefined"||e==="none";function D2(e,t){const r={...xd,...e},i={...S2,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(y=>{const m=[],C=y.hFlip,b=y.vFlip;let k=y.rotate;C?b?k+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):b&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let _;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:_=s.height/2+s.top,m.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:_=s.width/2+s.left,m.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}k%2===1&&(s.left!==s.top&&(_=s.left,s.left=s.top,s.top=_),s.width!==s.height&&(_=s.width,s.width=s.height,s.height=_)),m.length&&(a=O2(a,'<g transform="'+m.join(" ")+'">',"</g>"))});const n=i.width,o=i.height,l=s.width,h=s.height;let c,u;n===null?(u=o===null?"1em":o==="auto"?h:o,c=ul(u,l/h)):(c=n==="auto"?l:n,u=o===null?ul(c,h/l):o==="auto"?h:o);const p={},d=(y,m)=>{I2(m)||(p[y]=m.toString())};d("width",c),d("height",u);const f=[s.left,s.top,l,h];return p.viewBox=f.join(" "),{attributes:p,viewBox:f,body:a}}const P2=/\sid="(\S+)"/g,dl=new Map;function R2(e){e=e.replace(/[0-9]+$/,"")||"a";const t=dl.get(e)||0;return dl.set(e,t+1),t?`${e}${t}`:e}function q2(e){const t=[];let r;for(;r=P2.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=R2(s),n=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function N2(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Qo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ir=Qo();function bd(e){ir=e}var si={exec:()=>null};function ct(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let n=typeof a=="string"?a:a.source;return n=n.replace(Ot.caret,"$1"),r=r.replace(s,n),i},getRegex:()=>new RegExp(r,t)};return i}var z2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ot={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},W2=/^(?:[ \t]*(?:\n|$))+/,H2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Y2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Si=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,j2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ko=/(?:[*+-]|\d{1,9}[.)])/,kd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Td=ct(kd).replace(/bull/g,Ko).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),X2=ct(kd).replace(/bull/g,Ko).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Jo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,U2=/^[^\n]+/,tn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,G2=ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),V2=ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ko).getRegex(),Xs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",en=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Z2=ct("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",en).replace("tag",Xs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wd=ct(Jo).replace("hr",Si).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xs).getRegex(),Q2=ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wd).getRegex(),rn={blockquote:Q2,code:H2,def:G2,fences:Y2,heading:j2,hr:Si,html:Z2,lheading:Td,list:V2,newline:W2,paragraph:wd,table:si,text:U2},pl=ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Si).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xs).getRegex(),K2={...rn,lheading:X2,table:pl,paragraph:ct(Jo).replace("hr",Si).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xs).getRegex()},J2={...rn,html:ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",en).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:si,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ct(Jo).replace("hr",Si).replace("heading",` *#{1,6} *[^
|
|
159
|
+
]`).replace("lheading",Td).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,eT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_d=/^( {2,}|\\)\n(?!\s*$)/,rT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Us=/[\p{P}\p{S}]/u,sn=/[\s\p{P}\p{S}]/u,Sd=/[^\s\p{P}\p{S}]/u,iT=ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,sn).getRegex(),vd=/(?!~)[\p{P}\p{S}]/u,sT=/(?!~)[\s\p{P}\p{S}]/u,aT=/(?:[^\s\p{P}\p{S}]|~)/u,oT=ct(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",z2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Bd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nT=ct(Bd,"u").replace(/punct/g,Us).getRegex(),lT=ct(Bd,"u").replace(/punct/g,vd).getRegex(),Ld="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hT=ct(Ld,"gu").replace(/notPunctSpace/g,Sd).replace(/punctSpace/g,sn).replace(/punct/g,Us).getRegex(),cT=ct(Ld,"gu").replace(/notPunctSpace/g,aT).replace(/punctSpace/g,sT).replace(/punct/g,vd).getRegex(),uT=ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Sd).replace(/punctSpace/g,sn).replace(/punct/g,Us).getRegex(),dT=ct(/\\(punct)/,"gu").replace(/punct/g,Us).getRegex(),pT=ct(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),gT=ct(en).replace("(?:-->|$)","-->").getRegex(),fT=ct("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",gT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ks=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,yT=ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ks).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fd=ct(/^!?\[(label)\]\[(ref)\]/).replace("label",ks).replace("ref",tn).getRegex(),Md=ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",tn).getRegex(),mT=ct("reflink|nolink(?!\\()","g").replace("reflink",Fd).replace("nolink",Md).getRegex(),gl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,an={_backpedal:si,anyPunctuation:dT,autolink:pT,blockSkip:oT,br:_d,code:eT,del:si,emStrongLDelim:nT,emStrongRDelimAst:hT,emStrongRDelimUnd:uT,escape:tT,link:yT,nolink:Md,punctuation:iT,reflink:Fd,reflinkSearch:mT,tag:fT,text:rT,url:si},CT={...an,link:ct(/^!?\[(label)\]\((.*?)\)/).replace("label",ks).getRegex(),reflink:ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ks).getRegex()},Ua={...an,emStrongRDelimAst:cT,emStrongLDelim:lT,url:ct(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",gl).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ct(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",gl).getRegex()},xT={...Ua,br:ct(_d).replace("{2,}","*").getRegex(),text:ct(Ua.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Oi={normal:rn,gfm:K2,pedantic:J2},Nr={normal:an,gfm:Ua,breaks:xT,pedantic:CT},bT={"&":"&","<":"<",">":">",'"':""","'":"'"},fl=e=>bT[e];function ee(e,t){if(t){if(Ot.escapeTest.test(e))return e.replace(Ot.escapeReplace,fl)}else if(Ot.escapeTestNoEncode.test(e))return e.replace(Ot.escapeReplaceNoEncode,fl);return e}function yl(e){try{e=encodeURI(e).replace(Ot.percentDecode,"%")}catch{return null}return e}function ml(e,t){var a;let r=e.replace(Ot.findPipe,(n,o,l)=>{let h=!1,c=o;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Ot.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Ot.slashPipe,"|");return i}function zr(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function kT(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Cl(e,t,r,i,s){let a=t.href,n=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function TT(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
160
|
+
`).map(a=>{let n=a.match(r.other.beginningSpace);if(n===null)return a;let[o]=n;return o.length>=s.length?a.slice(s.length):a}).join(`
|
|
161
|
+
`)}var Ts=class{constructor(t){pt(this,"options");pt(this,"rules");pt(this,"lexer");this.options=t||ir}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:zr(i,`
|
|
162
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=TT(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=zr(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:zr(r[0],`
|
|
163
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=zr(r[0],`
|
|
164
|
+
`).split(`
|
|
165
|
+
`),s="",a="",n=[];for(;i.length>0;){let o=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),o=!0;else if(!o)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
|
|
166
|
+
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
167
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
168
|
+
${c}`:c,a=a?`${a}
|
|
169
|
+
${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=p,i.length===0)break;let d=n.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let f=d,y=f.raw+`
|
|
170
|
+
`+i.join(`
|
|
171
|
+
`),m=this.blockquote(y);n[n.length-1]=m,s=s.substring(0,s.length-f.raw.length)+m.raw,a=a.substring(0,a.length-f.text.length)+m.text;break}else if((d==null?void 0:d.type)==="list"){let f=d,y=f.raw+`
|
|
172
|
+
`+i.join(`
|
|
173
|
+
`),m=this.list(y);n[n.length-1]=m,s=s.substring(0,s.length-d.raw.length)+m.raw,a=a.substring(0,a.length-f.raw.length)+m.raw,i=y.substring(n.at(-1).raw.length).split(`
|
|
174
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:n,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let n=this.rules.other.listItemRegex(i),o=!1;for(;t;){let h=!1,c="",u="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let p=r[2].split(`
|
|
175
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
|
|
176
|
+
`,1)[0],f=!p.trim(),y=0;if(this.options.pedantic?(y=2,u=p.trimStart()):f?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=p.slice(y),y+=r[1].length),f&&this.rules.other.blankLine.test(d)&&(c+=d+`
|
|
177
|
+
`,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),_=this.rules.other.fencesBeginRegex(y),w=this.rules.other.headingBeginRegex(y),v=this.rules.other.htmlBeginRegex(y);for(;t;){let T=t.split(`
|
|
178
|
+
`,1)[0],B;if(d=T,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),B=d):B=d.replace(this.rules.other.tabCharGlobal," "),_.test(d)||w.test(d)||v.test(d)||b.test(d)||k.test(d))break;if(B.search(this.rules.other.nonSpaceChar)>=y||!d.trim())u+=`
|
|
179
|
+
`+B.slice(y);else{if(f||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(p)||w.test(p)||k.test(p))break;u+=`
|
|
180
|
+
`+d}!f&&!d.trim()&&(f=!0),c+=T+`
|
|
181
|
+
`,t=t.substring(T.length+1),p=B.slice(y)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));let m=null,C;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(C=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!m,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=c}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let c=a.items[h].tokens.filter(p=>p.type==="space"),u=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=u}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=ml(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
182
|
+
`):[],n={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?n.align.push("right"):this.rules.other.tableAlignCenter.test(l)?n.align.push("center"):this.rules.other.tableAlignLeft.test(l)?n.align.push("left"):n.align.push(null);for(let l=0;l<i.length;l++)n.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:n.align[l]});for(let l of a)n.rows.push(ml(l,n.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[c]})));return n}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
183
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let n=zr(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=kT(r[2],"()");if(n===-2)return;if(n>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+n;r[2]=r[2].substring(0,n),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],a=n[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Cl(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return Cl(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,n,o,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(o=[...n].length,s[3]||s[4]){l+=o;continue}else if((s[5]||s[6])&&a%3&&!((a+o)%3)){h+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+h);let u=[...s[0]][0].length,p=t.slice(0,a+s.index+u+o);if(Math.min(a,o)%2){let f=p.slice(1,-1);return{type:"em",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let n;do n=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(n!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},jt=class Ga{constructor(t){pt(this,"tokens");pt(this,"options");pt(this,"state");pt(this,"tokenizer");pt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ir,this.options.tokenizer=this.options.tokenizer||new Ts,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Ot,block:Oi.normal,inline:Nr.normal};this.options.pedantic?(r.block=Oi.pedantic,r.inline=Nr.pedantic):this.options.gfm&&(r.block=Oi.gfm,this.options.breaks?r.inline=Nr.breaks:r.inline=Nr.gfm),this.tokenizer.rules=r}static get rules(){return{block:Oi,inline:Nr}}static lex(t,r){return new Ga(r).lex(t)}static lexInline(t,r){return new Ga(r).inlineTokens(t)}lex(t){t=t.replace(Ot.carriageReturn,`
|
|
184
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,n;for(this.options.pedantic&&(t=t.replace(Ot.tabCharGlobal," ").replace(Ot.spaceLine,""));t;){let o;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(o=h.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let h=r.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
|
|
185
|
+
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
186
|
+
`)?"":`
|
|
187
|
+
`)+o.raw,h.text+=`
|
|
188
|
+
`+o.text,this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
189
|
+
`)?"":`
|
|
190
|
+
`)+o.raw,h.text+=`
|
|
191
|
+
`+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let l=t;if((n=this.options.extensions)!=null&&n.startBlock){let h=1/0,c=t.slice(1),u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},c),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
192
|
+
`)?"":`
|
|
193
|
+
`)+o.raw,h.text+=`
|
|
194
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o),i=l.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
195
|
+
`)?"":`
|
|
196
|
+
`)+o.raw,h.text+=`
|
|
197
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,u,p;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let n=!1,o="";for(;t;){n||(o=""),n=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(y=>(d=y.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let y=r.at(-1);d.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,o)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let f=t;if((p=this.options.extensions)!=null&&p.startInline){let y=1/0,m=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},m),typeof C=="number"&&C>=0&&(y=Math.min(y,C))}),y<1/0&&y>=0&&(f=t.substring(0,y+1))}if(d=this.tokenizer.inlineText(f)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(o=d.raw.slice(-1)),n=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},ws=class{constructor(t){pt(this,"options");pt(this,"parser");this.options=t||ir}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let s=(n=(r||"").match(Ot.notSpaceStart))==null?void 0:n[0],a=t.replace(Ot.endingNewline,"")+`
|
|
198
|
+
`;return s?'<pre><code class="language-'+ee(s)+'">'+(i?a:ee(a,!0))+`</code></pre>
|
|
199
|
+
`:"<pre><code>"+(i?a:ee(a,!0))+`</code></pre>
|
|
200
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
201
|
+
${this.parser.parse(t)}</blockquote>
|
|
202
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
203
|
+
`}hr(t){return`<hr>
|
|
204
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let o=0;o<t.items.length;o++){let l=t.items[o];s+=this.listitem(l)}let a=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+a+n+`>
|
|
205
|
+
`+s+"</"+a+`>
|
|
206
|
+
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+ee(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
207
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
208
|
+
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let n=t.rows[a];i="";for(let o=0;o<n.length;o++)i+=this.tablecell(n[o]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
209
|
+
<thead>
|
|
210
|
+
`+r+`</thead>
|
|
211
|
+
`+s+`</table>
|
|
212
|
+
`}tablerow({text:t}){return`<tr>
|
|
213
|
+
${t}</tr>
|
|
214
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
215
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ee(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=yl(t);if(a===null)return s;t=a;let n='<a href="'+t+'"';return r&&(n+=' title="'+ee(r)+'"'),n+=">"+s+"</a>",n}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=yl(t);if(a===null)return ee(i);t=a;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${ee(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ee(t.text)}},on=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Xt=class Va{constructor(t){pt(this,"options");pt(this,"renderer");pt(this,"textRenderer");this.options=t||ir,this.options.renderer=this.options.renderer||new ws,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new on}static parse(t,r){return new Va(r).parse(t)}static parseInline(t,r){return new Va(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=o,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=o;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;n+1<t.length&&t[n+1].type==="text";)h=t[++n],c+=`
|
|
216
|
+
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=h||"";continue}}let l=o;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},qi,Zr=(qi=class{constructor(t){pt(this,"options");pt(this,"block");this.options=t||ir}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?jt.lex:jt.lexInline}provideParser(){return this.block?Xt.parse:Xt.parseInline}},pt(qi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),pt(qi,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),qi),wT=class{constructor(...t){pt(this,"defaults",Qo());pt(this,"options",this.setOptions);pt(this,"parse",this.parseMarkdown(!0));pt(this,"parseInline",this.parseMarkdown(!1));pt(this,"Parser",Xt);pt(this,"Renderer",ws);pt(this,"TextRenderer",on);pt(this,"Lexer",jt);pt(this,"Tokenizer",Ts);pt(this,"Hooks",Zr);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let o=n;for(let l of o.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let o=n;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=n;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let h=o[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let n=r.renderers[a.name];n?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=n.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[a.level];n?n.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new ws(this.defaults);for(let n in i.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,l=i.renderer[o],h=a[o];a[o]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Ts(this.defaults);for(let n in i.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,l=i.tokenizer[o],h=a[o];a[o]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Zr;for(let n in i.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,l=i.hooks[o],h=a[o];Zr.passThroughHooks.has(n)?a[o]=c=>{if(this.defaults.async&&Zr.passThroughHooksRespectAsync.has(n))return(async()=>{let p=await l.call(a,c);return h.call(a,p)})();let u=l.call(a,c);return h.call(a,u)}:a[o]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,c);return p===!1&&(p=await h.apply(a,c)),p})();let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(o){let l=[];return l.push(n.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return jt.lex(t,r??this.defaults)}parser(t,r){return Xt.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},n=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?jt.lex:jt.lexInline)(o,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?Xt.parse:Xt.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(n);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?jt.lex:jt.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Xt.parse:Xt.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return n(o)}}}onError(t,r){return i=>{if(i.message+=`
|
|
217
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+ee(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Ke=new wT;function dt(e,t){return Ke.parse(e,t)}dt.options=dt.setOptions=function(e){return Ke.setOptions(e),dt.defaults=Ke.defaults,bd(dt.defaults),dt};dt.getDefaults=Qo;dt.defaults=ir;dt.use=function(...e){return Ke.use(...e),dt.defaults=Ke.defaults,bd(dt.defaults),dt};dt.walkTokens=function(e,t){return Ke.walkTokens(e,t)};dt.parseInline=Ke.parseInline;dt.Parser=Xt;dt.parser=Xt.parse;dt.Renderer=ws;dt.TextRenderer=on;dt.Lexer=jt;dt.lexer=jt.lex;dt.Tokenizer=Ts;dt.Hooks=Zr;dt.parse=dt;dt.options;dt.setOptions;dt.use;dt.walkTokens;dt.parseInline;Xt.parse;jt.lex;function Ad(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(o,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(c){var u,p;return(p=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):o},[]);if(s.length){var a=new RegExp(`
|
|
218
|
+
[ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(o){return o.replace(a,`
|
|
219
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return t.forEach(function(o,l){var h=n.match(/(?:^|\n)( *)$/),c=h?h[1]:"",u=o;typeof o=="string"&&o.includes(`
|
|
220
|
+
`)&&(u=String(o).split(`
|
|
221
|
+
`).map(function(p,d){return d===0?p:""+c+p}).join(`
|
|
222
|
+
`)),n+=u+i[l+1]}),n}var _T={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Za=new Map,$d=new Map,ST=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(P.debug("Registering icon pack:",t.name),"loader"in t)$d.set(t.name,t.loader);else if("icons"in t)Za.set(t.name,t.icons);else throw P.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Ed=g(async(e,t)=>{const r=v2(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=Za.get(i);if(!s){const n=$d.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await n(),prefix:i},Za.set(i,s)}catch(o){throw P.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=F2(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),vT=g(async e=>{try{return await Ed(e),!0}catch{return!1}},"isIconAvailable"),vi=g(async(e,t,r)=>{let i;try{i=await Ed(e,t==null?void 0:t.fallbackPrefix)}catch(n){P.error(n),i=_T}const s=D2(i,t),a=N2(q2(s.body),{...s.attributes,...r});return Zt(a,mt())},"getIconSVG");function Od(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
223
|
+
`).replace(/\n{2,}/g,`
|
|
224
|
+
`);return Ad(i)}g(Od,"preprocessMarkdown");function Id(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}g(Id,"nonMarkdownToLines");function Dd(e,t={}){const r=Od(e,t),i=dt.lexer(r),s=[[]];let a=0;function n(o,l="normal"){o.type==="text"?o.text.split(`
|
|
225
|
+
`).forEach((c,u)=>{u!==0&&(a++,s.push([])),c.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&s[a].push({content:p,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{n(h,o.type)}):o.type==="html"&&s[a].push({content:o.text,type:"normal"})}return g(n,"processNode"),i.forEach(o=>{var l;o.type==="paragraph"?(l=o.tokens)==null||l.forEach(h=>{n(h)}):o.type==="html"?s[a].push({content:o.text,type:"normal"}):s[a].push({content:o.raw,type:"normal"})}),s}g(Dd,"markdownToLines");function Pd(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(Pd,"nonMarkdownToHTML");function Rd(e,{markdownAutoWrap:t}={}){const r=dt.lexer(e);function i(s){var a,n,o;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(n=s.tokens)==null?void 0:n.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(o=s.tokens)==null?void 0:o.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(P.warn(`Unsupported markdown: ${s.type}`),s.raw)}return g(i,"output"),r.map(i).join("")}g(Rd,"markdownToHTML");function qd(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(qd,"splitTextToChars");function Nd(e,t){const r=qd(t.content);return nn(e,[],r,t.type)}g(Nd,"splitWordToFitWidth");function nn(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,n=[...t,s];return e([{content:n.join(""),type:i}])?nn(e,n,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(nn,"splitWordToFitWidthRecursion");function zd(e,t){if(e.some(({content:r})=>r.includes(`
|
|
226
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return _s(e,t)}g(zd,"splitLineToFitWidth");function _s(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},n=[...i];if(s!==""&&n.push({content:s,type:"normal"}),n.push(a),t(n))return _s(e,t,r,n);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=Nd(t,a);r.push([o]),l.content&&e.unshift(l)}return _s(e,t,r)}g(_s,"splitLineToFitWidthRecursion");function Qa(e,t){t&&e.attr("style",t)}g(Qa,"applyStyle");var xl=16384;async function Wd(e,t,r,i,s=!1,a=mt()){const n=e.append("foreignObject");n.attr("width",`${Math.min(10*r,xl)}px`),n.attr("height",`${Math.min(10*r,xl)}px`);const o=n.append("xhtml:div"),l=ai(t.label)?await fh(t.label.replace(xi.lineBreakRegex,`
|
|
227
|
+
`),a):Zt(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=o.append("span");c.html(l),Qa(c,t.labelStyle),c.attr("class",`${h} ${i}`),Qa(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),n.node()}g(Wd,"addHtmlSpan");function Gs(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}g(Gs,"createTspan");function Hd(e,t,r){const i=e.append("text"),s=Gs(i,1,t);Vs(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}g(Hd,"computeWidthOfText");function BT(e,t,r){var n;const i=e.append("text"),s=Gs(i,1,t);Vs(s,[{content:r,type:"normal"}]);const a=(n=s.node())==null?void 0:n.getBoundingClientRect();return a&&i.remove(),a}g(BT,"computeDimensionOfText");function Yd(e,t,r,i=!1,s=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),l=n.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=g(d=>Hd(n,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:zd(c,u);for(const d of p){const f=Gs(l,h,1.1,s);Vs(f,d),h++}}if(i){const c=l.node().getBBox(),u=2;return o.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),n.node()}else return l.node()}g(Yd,"createFormattedText");function Ka(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(Ka,"decodeHTMLEntities");function Vs(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(Ka(r.content)):s.text(" "+Ka(r.content))})}g(Vs,"updateTextContentAndStyles");async function jd(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,n)=>(r.push((async()=>{const o=`${a}:${n}`;return await vT(o)?await vi(o,void 0,{class:"label-icon"}):`<i class='${Zt(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(jd,"replaceIconSubstring");var be=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:n=!0,isNode:o=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(P.debug("XYZ createText",t,r,i,s,a,o,"addSvgBackground: ",h),a){const u=n?Rd(t,c):Pd(t),p=await jd(Qe(u),c),d=t.replace(/\\\\/g,"\\"),f={isNode:o,label:ai(t)?d:p,labelStyle:r.replace("fill:","color:")};return await Wd(e,f,l,s,h,c)}else{const u=Qe(t.replace(/<br\s*\/?>/g,"<br/>")),p=n?Dd(u.replace("<br>","<br/>"),c):Id(u),d=Yd(l,e,p,t?h:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");it(d).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");it(d).select("rect").attr("style",f.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");it(d).select("text").attr("style",y)}return i?it(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):it(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function na(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,n=Math.cos(a),o=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*n-(c-s)*o+i,l[1]=(h-i)*o+(c-s)*n+s}}}function LT(e,t){return e[0]===t[0]&&e[1]===t[1]}function FT(e,t,r,i=1){const s=r,a=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(s)for(const h of n)na(h,o,s);const l=(function(h,c,u){const p=[];for(const b of h){const k=[...b];LT(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const d=[];c=Math.max(c,.1);const f=[];for(const b of p)for(let k=0;k<b.length-1;k++){const _=b[k],w=b[k+1];if(_[1]!==w[1]){const v=Math.min(_[1],w[1]);f.push({ymin:v,ymax:Math.max(_[1],w[1]),x:v===_[1]?_[0]:w[0],islope:(w[0]-_[0])/(w[1]-_[1])})}}if(f.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!f.length)return d;let y=[],m=f[0].ymin,C=0;for(;y.length||f.length;){if(f.length){let b=-1;for(let k=0;k<f.length&&!(f[k].ymin>m);k++)b=k;f.splice(0,b+1).forEach((k=>{y.push({s:m,edge:k})}))}if(y=y.filter((b=>!(b.edge.ymax<=m))),y.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(u!==1||C%c==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const k=b+1;if(k>=y.length)break;const _=y[b].edge,w=y[k].edge;d.push([[Math.round(_.x),m],[Math.round(w.x),m]])}m+=u,y.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),C++}return d})(n,a,i);if(s){for(const h of n)na(h,o,-s);(function(h,c,u){const p=[];h.forEach((d=>p.push(...d))),na(p,c,u)})(l,o,-s)}return l}function Bi(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),FT(e,s,i,a||1)}class ln{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Bi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Zs(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class MT extends ln{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Bi(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,n=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)Zs([h,c])&&n.push([[h[0]-o,h[1]+l],[...c]],[[h[0]+o,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(n,r)}}}class AT extends ln{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class $T{constructor(t){this.helper=t}fillPolygons(t,r){const i=Bi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const n=s/4;for(const o of t){const l=Zs(o),h=l/s,c=Math.ceil(h)-1,u=l-c*s,p=(o[0][0]+o[1][0])/2-s/4,d=Math.min(o[0][1],o[1][1]);for(let f=0;f<c;f++){const y=d+u+f*s,m=p-n+2*Math.random()*n,C=y-n+2*Math.random()*n,b=this.helper.ellipse(m,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class ET{constructor(t){this.helper=t}fillPolygons(t,r){const i=Bi(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((n=>{const o=Zs(n),l=Math.floor(o/(i+s)),h=(o+s-l*(i+s))/2;let c=n[0],u=n[1];c[0]>u[0]&&(c=n[1],u=n[0]);const p=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d<l;d++){const f=d*(i+s),y=f+i,m=[c[0]+f*Math.cos(p)+h*Math.cos(p),c[1]+f*Math.sin(p)+h*Math.sin(p)],C=[c[0]+y*Math.cos(p)+h*Math.cos(p),c[1]+y*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}})),a}}class OT{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Bi(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const n=Zs(a),o=Math.round(n/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let u=0;u<o;u++){const p=2*u*r,d=2*(u+1)*r,f=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],m=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[y[0]+f*Math.cos(c+Math.PI/4),y[1]+f*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}})),s}}const Dt={};class IT{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const DT=0,la=1,bl=2,Ii={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function ha(e,t){return e.type===t}function hn(e){const t=[],r=(function(n){const o=new Array;for(;n!=="";)if(n.match(/^([ \t\r\n,]+)/))n=n.substr(RegExp.$1.length);else if(n.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:DT,text:RegExp.$1},n=n.substr(RegExp.$1.length);else{if(!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:la,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return o[o.length]={type:bl,text:""},o})(e);let i="BOD",s=0,a=r[s];for(;!ha(a,bl);){let n=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return hn("M0,0"+e);s++,n=Ii[a.text],i=a.text}else ha(a,la)?n=Ii[i]:(s++,n=Ii[a.text],i=a.text);if(!(s+n<r.length))throw new Error("Path data ended short");for(let l=s;l<s+n;l++){const h=r[l];if(!ha(h,la))throw new Error("Param not a number: "+i+","+h.text);o[o.length]=+h.text}if(typeof Ii[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),s+=n,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Xd(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:n,data:o}of e)switch(n){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,s]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((h,c)=>c%2?h+r:h+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((h,c)=>c%2?h+r:h+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((h,c)=>c%2?h+r:h+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Ud(e){const t=[];let r="",i=0,s=0,a=0,n=0,o=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,n]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],o=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-o),p=s+(s-l)):(u=i,p=s),t.push({key:"C",data:[u,p,...c]}),o=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[u,p]=c;let d=0,f=0;r==="Q"||r==="T"?(d=i+(i-o),f=s+(s-l)):(d=i,f=s);const y=i+2*(d-i)/3,m=s+2*(f-s)/3,C=u+2*(d-u)/3,b=p+2*(f-p)/3;t.push({key:"C",data:[y,m,C,b,u,p]}),o=d,l=f,i=u,s=p;break}case"Q":{const[u,p,d,f]=c,y=i+2*(u-i)/3,m=s+2*(p-s)/3,C=d+2*(u-d)/3,b=f+2*(p-f)/3;t.push({key:"C",data:[y,m,C,b,d,f]}),o=u,l=p,i=d,s=f;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],f=c[3],y=c[4],m=c[5],C=c[6];u===0||p===0?(t.push({key:"C",data:[i,s,m,C,m,C]}),i=m,s=C):(i!==m||s!==C)&&(Gd(i,s,m,C,u,p,d,f,y).forEach((function(b){t.push({key:"C",data:b})})),i=m,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=n}r=h}return t}function Wr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Gd(e,t,r,i,s,a,n,o,l,h){const c=(u=n,Math.PI*u/180);var u;let p=[],d=0,f=0,y=0,m=0;if(h)[d,f,y,m]=h;else{[e,t]=Wr(e,t,-c),[r,i]=Wr(r,i,-c);const N=(e-r)/2,I=(t-i)/2;let M=N*N/(s*s)+I*I/(a*a);M>1&&(M=Math.sqrt(M),s*=M,a*=M);const L=s*s,E=a*a,F=L*E-L*I*I-E*N*N,q=L*I*I+E*N*N,z=(o===l?-1:1)*Math.sqrt(Math.abs(F/q));y=z*s*I/a+(e+r)/2,m=z*-a*N/s+(t+i)/2,d=Math.asin(parseFloat(((t-m)/a).toFixed(9))),f=Math.asin(parseFloat(((i-m)/a).toFixed(9))),e<y&&(d=Math.PI-d),r<y&&(f=Math.PI-f),d<0&&(d=2*Math.PI+d),f<0&&(f=2*Math.PI+f),l&&d>f&&(d-=2*Math.PI),!l&&f>d&&(f-=2*Math.PI)}let C=f-d;if(Math.abs(C)>120*Math.PI/180){const N=f,I=r,M=i;f=l&&f>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=Gd(r=y+s*Math.cos(f),i=m+a*Math.sin(f),I,M,s,a,n,0,l,[f,N,y,m])}C=f-d;const b=Math.cos(d),k=Math.sin(d),_=Math.cos(f),w=Math.sin(f),v=Math.tan(C/4),T=4/3*s*v,B=4/3*a*v,R=[e,t],D=[e+T*k,t-B*b],O=[r+T*w,i-B*_],W=[r,i];if(D[0]=2*R[0]-D[0],D[1]=2*R[1]-D[1],h)return[D,O,W].concat(p);{p=[D,O,W].concat(p);const N=[];for(let I=0;I<p.length;I+=3){const M=Wr(p[I][0],p[I][1],c),L=Wr(p[I+1][0],p[I+1][1],c),E=Wr(p[I+2][0],p[I+2][1],c);N.push([M[0],M[1],L[0],L[1],E[0],E[1]])}return N}}const PT={randOffset:function(e,t){return K(e,t)},randOffsetWithRange:function(e,t,r){return Ss(e,t,r)},ellipse:function(e,t,r,i,s){const a=Zd(r,i,s);return Ja(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return Me(e,t,r,i,s,!0)}};function Vd(e,t,r,i,s){return{type:"path",ops:Me(e,t,r,i,s)}}function Gi(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...Me(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...Me(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Vd(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function RT(e,t,r,i,s){return(function(a,n){return Gi(a,!0,n)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function kl(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Di(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Di(r[0],1.5*(1+.22*t.roughness),_l(t));for(let a=1;a<r.length;a++){const n=r[a];if(n.length){const o=Di(n,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Di(n,1.5*(1+.22*t.roughness),_l(t));for(const h of o)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Zd(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let n=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return n+=K(n*l,r),o+=K(o*l,r),{increment:a,rx:n,ry:o}}function Ja(e,t,r,i){const[s,a]=Sl(i.increment,e,t,i.rx,i.ry,1,i.increment*Ss(.1,Ss(.4,1,r),r),r);let n=vs(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=Sl(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=vs(o,null,r);n=n.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:n}}}function Tl(e,t,r,i,s,a,n,o,l){const h=e,c=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=K(.01*u,l),p+=K(.01*p,l);let d=s,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);const y=2*Math.PI/l.curveStepCount,m=Math.min(y/2,(f-d)/2),C=vl(m,h,c,u,p,d,f,1,l);if(!l.disableMultiStroke){const b=vl(m,h,c,u,p,d,f,1.5,l);C.push(...b)}return n&&(o?C.push(...Me(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...Me(h,c,h+u*Math.cos(f),c+p*Math.sin(f),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+p*Math.sin(d)]})),{type:"path",ops:C}}function wl(e,t){const r=Ud(Xd(hn(e))),i=[];let s=[0,0],a=[0,0];for(const{key:n,data:o}of r)switch(n){case"M":a=[o[0],o[1]],s=[o[0],o[1]];break;case"L":i.push(...Me(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,h,c,u,p,d]=o;i.push(...qT(l,h,c,u,p,d,a,t)),a=[p,d];break}case"Z":i.push(...Me(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function ca(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+K(s,t),i[0][1]+K(s,t)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+K(s,t),i[n][1]+K(s,t)]})}}return{type:"fillPath",ops:r}}function ar(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Dt[s])switch(s){case"zigzag":Dt[s]||(Dt[s]=new MT(i));break;case"cross-hatch":Dt[s]||(Dt[s]=new AT(i));break;case"dots":Dt[s]||(Dt[s]=new $T(i));break;case"dashed":Dt[s]||(Dt[s]=new ET(i));break;case"zigzag-line":Dt[s]||(Dt[s]=new OT(i));break;default:s="hachure",Dt[s]||(Dt[s]=new ln(i))}return Dt[s]})(t,PT).fillPolygons(e,t)}function _l(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Qd(e){return e.randomizer||(e.randomizer=new IT(e.seed||0)),e.randomizer.next()}function Ss(e,t,r,i=1){return r.roughness*i*(Qd(r)*(t-e)+e)}function K(e,t,r=1){return Ss(-e,e,t,r)}function Me(e,t,r,i,s,a=!1){const n=a?s.disableMultiStrokeFill:s.disableMultiStroke,o=to(e,t,r,i,s,!0,!1);if(n)return o;const l=to(e,t,r,i,s,!0,!0);return o.concat(l)}function to(e,t,r,i,s,a,n){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>o&&(c=l/10);const u=c/2,p=.2+.2*Qd(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,f=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=K(d,s,h),f=K(f,s,h);const y=[],m=()=>K(u,s,h),C=()=>K(c,s,h),b=s.preserveVertices;return n?y.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):y.push({op:"move",data:[e+(b?0:K(c,s,h)),t+(b?0:K(c,s,h))]}),n?y.push({op:"bcurveTo",data:[d+e+(r-e)*p+m(),f+t+(i-t)*p+m(),d+e+2*(r-e)*p+m(),f+t+2*(i-t)*p+m(),r+(b?0:m()),i+(b?0:m())]}):y.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),f+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),f+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),y}function Di(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+K(t,r),e[0][1]+K(t,r)]),i.push([e[0][0]+K(t,r),e[0][1]+K(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+K(t,r),e[s][1]+K(t,r)]),s===e.length-1&&i.push([e[s][0]+K(t,r),e[s][1]+K(t,r)]);return vs(i,null,r)}function vs(e,t,r){const i=e.length,s=[];if(i>3){const a=[],n=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(n*e[o+1][0]-n*e[o-1][0])/6,l[1]+(n*e[o+1][1]-n*e[o-1][1])/6],a[2]=[e[o+1][0]+(n*e[o][0]-n*e[o+2][0])/6,e[o+1][1]+(n*e[o][1]-n*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...to(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Sl(e,t,r,i,s,a,n,o){const l=[],h=[];if(o.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=K(.5,o)-Math.PI/2;h.push([K(a,o)+t+.9*i*Math.cos(c-e),K(a,o)+r+.9*s*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let p=c;p<u;p+=e){const d=[K(a,o)+t+i*Math.cos(p),K(a,o)+r+s*Math.sin(p)];l.push(d),h.push(d)}h.push([K(a,o)+t+i*Math.cos(c+2*Math.PI+.5*n),K(a,o)+r+s*Math.sin(c+2*Math.PI+.5*n)]),h.push([K(a,o)+t+.98*i*Math.cos(c+n),K(a,o)+r+.98*s*Math.sin(c+n)]),h.push([K(a,o)+t+.9*i*Math.cos(c+.5*n),K(a,o)+r+.9*s*Math.sin(c+.5*n)])}return[h,l]}function vl(e,t,r,i,s,a,n,o,l){const h=a+K(.1,l),c=[];c.push([K(o,l)+t+.9*i*Math.cos(h-e),K(o,l)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=n;u+=e)c.push([K(o,l)+t+i*Math.cos(u),K(o,l)+r+s*Math.sin(u)]);return c.push([t+i*Math.cos(n),r+s*Math.sin(n)]),c.push([t+i*Math.cos(n),r+s*Math.sin(n)]),vs(c,null,l)}function qT(e,t,r,i,s,a,n,o){const l=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let c=[0,0];const u=o.disableMultiStroke?1:2,p=o.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[n[0],n[1]]}):l.push({op:"move",data:[n[0]+(p?0:K(h[0],o)),n[1]+(p?0:K(h[0],o))]}),c=p?[s,a]:[s+K(h[d],o),a+K(h[d],o)],l.push({op:"bcurveTo",data:[e+K(h[d],o),t+K(h[d],o),r+K(h[d],o),i+K(h[d],o),c[0],c[1]]});return l}function Hr(e){return[...e]}function Bl(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Hr(e[0]),Hr(e[1]),Hr(e[2]),Hr(e[2]));else{const s=[];s.push(e[0],e[0]);for(let o=1;o<e.length;o++)s.push(e[o]),o===e.length-1&&s.push(e[o]);const a=[],n=1-t;i.push(Hr(s[0]));for(let o=1;o+2<s.length;o++){const l=s[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(n*s[o+1][0]-n*s[o-1][0])/6,l[1]+(n*s[o+1][1]-n*s[o-1][1])/6],a[2]=[s[o+1][0]+(n*s[o][0]-n*s[o+2][0])/6,s[o+1][1]+(n*s[o][1]-n*s[o+2][1])/6],a[3]=[s[o+1][0],s[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function Vi(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function NT(e,t,r){const i=Vi(t,r);if(i===0)return Vi(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Vi(e,Re(t,r,s))}function Re(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function eo(e,t,r,i){const s=i||[];if((function(o,l){const h=o[l+0],c=o[l+1],u=o[l+2],p=o[l+3];let d=3*c[0]-2*h[0]-p[0];d*=d;let f=3*c[1]-2*h[1]-p[1];f*=f;let y=3*u[0]-2*p[0]-h[0];y*=y;let m=3*u[1]-2*p[1]-h[1];return m*=m,d<y&&(d=y),f<m&&(f=m),d+f})(e,t)<r){const o=e[t+0];s.length?(a=s[s.length-1],n=o,Math.sqrt(Vi(a,n))>1&&s.push(o)):s.push(o),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],p=Re(l,h,.5),d=Re(h,c,.5),f=Re(c,u,.5),y=Re(p,d,.5),m=Re(d,f,.5),C=Re(y,m,.5);eo([l,p,y,C],0,r,s),eo([C,m,f,u],0,r,s)}var a,n;return s}function zT(e,t){return Bs(e,0,e.length,t)}function Bs(e,t,r,i,s){const a=s||[],n=e[t],o=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=NT(e[c],n,o);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(Bs(e,t,h+1,i,a),Bs(e,h,r,i,a)):(a.length||a.push(n),a.push(o)),a}function ua(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)eo(e,3*a,t,i);return r&&r>0?Bs(i,0,i.length,r):i}const zt="none";class Ls{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const n=this._o(a);return this._d("line",[Vd(t,r,i,s,n)],n)}rectangle(t,r,i,s,a){const n=this._o(a),o=[],l=RT(t,r,i,s,n);if(n.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];n.fillStyle==="solid"?o.push(ca([h],n)):o.push(ar([h],n))}return n.stroke!==zt&&o.push(l),this._d("rectangle",o,n)}ellipse(t,r,i,s,a){const n=this._o(a),o=[],l=Zd(i,s,n),h=Ja(t,r,n,l);if(n.fill)if(n.fillStyle==="solid"){const c=Ja(t,r,n,l).opset;c.type="fillPath",o.push(c)}else o.push(ar([h.estimatedPoints],n));return n.stroke!==zt&&o.push(h.opset),this._d("ellipse",o,n)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Gi(t,!1,i)],i)}arc(t,r,i,s,a,n,o=!1,l){const h=this._o(l),c=[],u=Tl(t,r,i,s,a,n,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const d=Tl(t,r,i,s,a,n,!0,!1,p);d.type="fillPath",c.push(d)}else c.push((function(p,d,f,y,m,C,b){const k=p,_=d;let w=Math.abs(f/2),v=Math.abs(y/2);w+=K(.01*w,b),v+=K(.01*v,b);let T=m,B=C;for(;T<0;)T+=2*Math.PI,B+=2*Math.PI;B-T>2*Math.PI&&(T=0,B=2*Math.PI);const R=(B-T)/b.curveStepCount,D=[];for(let O=T;O<=B;O+=R)D.push([k+w*Math.cos(O),_+v*Math.sin(O)]);return D.push([k+w*Math.cos(B),_+v*Math.sin(B)]),D.push([k,_]),ar([D],b)})(t,r,i,s,a,n,h));return h.stroke!==zt&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=kl(t,i);if(i.fill&&i.fill!==zt)if(i.fillStyle==="solid"){const n=kl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{const n=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const h of l)h.length<3?n.push(...h):h.length===3?n.push(...ua(Bl([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):n.push(...ua(Bl(h),10,(1+i.roughness)/2))}n.length&&s.push(ar([n],i))}return i.stroke!==zt&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Gi(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(ca([t],i)):s.push(ar([t],i))),i.stroke!==zt&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==zt,n=i.stroke!==zt,o=!!(i.simplification&&i.simplification<1),l=(function(c,u,p){const d=Ud(Xd(hn(c))),f=[];let y=[],m=[0,0],C=[];const b=()=>{C.length>=4&&y.push(...ua(C,u)),C=[]},k=()=>{b(),y.length&&(f.push(y),y=[])};for(const{key:w,data:v}of d)switch(w){case"M":k(),m=[v[0],v[1]],y.push(m);break;case"L":b(),y.push([v[0],v[1]]);break;case"C":if(!C.length){const T=y.length?y[y.length-1]:m;C.push([T[0],T[1]])}C.push([v[0],v[1]]),C.push([v[2],v[3]]),C.push([v[4],v[5]]);break;case"Z":b(),y.push([m[0],m[1]])}if(k(),!p)return f;const _=[];for(const w of f){const v=zT(w,p);v.length&&_.push(v)}return _})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=wl(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=wl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(ca(l,i));else s.push(ar(l,i));return n&&(o?l.forEach((c=>{s.push(Gi(c,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((n=>+n.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let n=null;switch(a.type){case"path":n={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:zt};break;case"fillPath":n={d:this.opsToPath(a),stroke:zt,strokeWidth:0,fill:i.fill||zt};break;case"fillSketch":n=this.fillSketch(a,i)}n&&s.push(n)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||zt,strokeWidth:i,fill:zt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class WT{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ls(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,n,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,a,o),s.restore();break}case"fillSketch":this.fillSketch(s,n,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const n=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(n[0],n[1]);break;case"bcurveTo":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":t.lineTo(n[0],n[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n),n}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n),n}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n),n}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,n,o=!1,l){const h=this.gen.arc(t,r,i,s,a,n,o,l);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Pi="http://www.w3.org/2000/svg";class HT{constructor(t,r){this.svg=t,this.gen=new Ls(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Pi,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=s.createElementNS(Pi,"path"),l.setAttribute("d",this.opsToPath(o,n)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Pi,"path"),l.setAttribute("d",this.opsToPath(o,n)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Pi,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n)}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n)}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,n,o=!1,l){const h=this.gen.arc(t,r,i,s,a,n,o,l);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Y={canvas:(e,t)=>new WT(e,t),svg:(e,t)=>new HT(e,t),generator:e=>new Ls(e),newSeed:()=>Ls.newSeed()},Q=g(async(e,t,r)=>{var d,f;let i;const s=t.useHtmlLabels||Ce((d=ht())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),n=a.insert("g").attr("class","label").attr("style",St(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await be(n,Zt(Qe(o),ht()),{useHtmlLabels:s,width:t.width||((f=ht().flowchart)==null?void 0:f.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},ht());let u=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const y=c.children[0],m=it(c);await md(y,o),u=y.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height)}return s?n.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):n.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:p,label:n}},"labelHelper"),da=g(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??It(ht()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await be(s,Zt(Qe(t),ht()),{useHtmlLabels:i,width:r.width||((h=(l=ht())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let n=a.getBBox();const o=r.padding/2;if(It(ht())){const c=a.children[0],u=it(a);n=c.getBoundingClientRect(),u.attr("width",n.width),u.attr("height",n.height)}return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:o,label:s}},"insertLabel"),U=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Z=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function at(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(at,"createPathFromPoints");function Ae(e,t,r,i,s,a){const n=[],l=r-e,h=i-t,c=l/a,u=2*Math.PI/c,p=t+h/2;for(let d=0;d<=50;d++){const f=d/50,y=e+f*l,m=p+s*Math.sin(u*(y-e));n.push({x:y,y:m})}return n}g(Ae,"generateFullSineWavePoints");function yi(e,t,r,i,s,a){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),f=t+r*Math.sin(p);n.push({x:-d,y:-f})}return n}g(yi,"generateCirclePoints");function ro(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),n=g((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:n(s,"fill"),"fill-opacity":n(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:n(a,"stroke"),"stroke-width":n(a,"stroke-width")??"1","stroke-opacity":n(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}g(ro,"mergePaths");var YT=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,n=e.width/2,o=e.height/2,l,h;return Math.abs(a)*n>Math.abs(s)*o?(a<0&&(o=-o),l=a===0?0:o*s/a,h=o):(s<0&&(n=-n),l=n,h=s===0?0:n*a/s),{x:r+l,y:i+h}},"intersectRect"),Dr=YT,jT=g(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const n=ht(),o=It(n);return await be(e,a,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},n)},"createLabel"),Se=jT,Ee=g((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Kd=g(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:h,backgroundStyles:c}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=It(r),d=u.insert("g").attr("class","cluster-label ");let f;t.labelType==="markdown"?f=await be(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):f=await Se(d,t.label,t.labelStyle||"",!1,!0);let y=f.getBBox();if(It(r)){const T=f.children[0],B=it(f);y=T.getBoundingClientRect(),B.attr("width",y.width),B.attr("height",y.height)}const m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;P.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const T=Y.svg(u),B=j(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),R=T.path(Ee(b,k,m,C,0),B);_=u.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",c.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:w}=Zo(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+w})`),o){const T=d.select("span");T&&T.attr("style",o)}const v=_.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=y.height-t.padding/2,t.intersect=function(T){return Dr(t,T)},{cluster:u,labelBBox:y}},"rect"),XT=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(o){return Dr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),UT=g(async(e,t)=>{const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:n,compositeTitleBackground:o,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),u=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const d=await Se(u,t.label,t.labelStyle,void 0,!0);let f=d.getBBox();if(It(r)){const R=d.children[0],D=it(d);f=R.getBoundingClientRect(),D.attr("width",f.width),D.attr("height",f.height)}const y=0*t.padding,m=y/2,C=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+y;t.width<=f.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+y,k=t.height+y-f.height-6,_=t.x-C/2,w=t.y-b/2;t.width=C;const v=t.y-t.height/2-m+f.height+2;let T;if(t.look==="handDrawn"){const R=t.cssClasses.includes("statediagram-cluster-alt"),D=Y.svg(h),O=t.rx||t.ry?D.path(Ee(_,w,C,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:s}):D.rectangle(_,w,C,b,{seed:s});T=h.insert(()=>O,":first-child");const W=D.rectangle(_,v,C,k,{fill:R?a:n,fillStyle:R?"hachure":"solid",stroke:l,seed:s});T=h.insert(()=>O,":first-child"),p=h.insert(()=>W)}else T=c.insert("rect",":first-child"),T.attr("class","outer").attr("x",_).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",_).attr("y",v).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-f.width/2}, ${w+1-(It(r)?0:3)})`);const B=T.node().getBBox();return t.height=B.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(R){return Dr(t,R)},{cluster:h,labelBBox:f}},"roundedWithTitle"),GT=g(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:h,backgroundStyles:c}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=It(r),d=u.insert("g").attr("class","cluster-label "),f=await be(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let y=f.getBBox();if(It(r)){const T=f.children[0],B=it(f);y=T.getBoundingClientRect(),B.attr("width",y.width),B.attr("height",y.height)}const m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;P.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const T=Y.svg(u),B=j(t,{roughness:.7,fill:a,stroke:n,fillWeight:4,seed:s}),R=T.path(Ee(b,k,m,C,t.rx),B);_=u.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",c.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:w}=Zo(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+w})`),o){const T=d.select("span");T&&T.attr("style",o)}const v=_.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=y.height-t.padding/2,t.intersect=function(T){return Dr(t,T)},{cluster:u,labelBBox:y}},"kanbanSection"),VT=g((e,t)=>{const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,n=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=n.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,p=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const m=Y.svg(n).rectangle(u,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});d=n.insert(()=>m,":first-child")}else{d=o.insert("rect",":first-child");let y="outer";t.look,y="divider",d.attr("class",y).attr("x",u).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const f=d.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return Dr(t,y)},{cluster:n,labelBBox:{}}},"divider"),ZT=Kd,QT={rect:Kd,squareRect:ZT,roundedWithTitle:UT,noteGroup:XT,divider:VT,kanbanSection:GT},Jd=new Map,KT=g(async(e,t)=>{const r=t.shape||"rect",i=await QT[r](e,t);return Jd.set(t.id,i),i},"insertCluster"),RB=g(()=>{Jd=new Map},"clear");function tp(e,t){return e.intersect(t)}g(tp,"intersectNode");var JT=tp;function ep(e,t,r,i){var s=e.x,a=e.y,n=s-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*n*n),h=Math.abs(t*r*n/l);i.x<s&&(h=-h);var c=Math.abs(t*r*o/l);return i.y<a&&(c=-c),{x:s+h,y:a+c}}g(ep,"intersectEllipse");var rp=ep;function ip(e,t,r){return rp(e,t,t,r)}g(ip,"intersectCircle");var tw=ip;function sp(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,n=t.x*e.y-e.x*t.y,o=s*r.x+a*r.y+n,l=s*i.x+a*i.y+n,h=1e-6;if(o!==0&&l!==0&&io(o,l))return;const c=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=c*e.x+u*e.y+p,f=c*t.x+u*t.y+p;if(Math.abs(d)<h&&Math.abs(f)<h&&io(d,f))return;const y=s*u-c*a;if(y===0)return;const m=Math.abs(y/2);let C=a*p-u*n;const b=C<0?(C-m)/y:(C+m)/y;C=c*n-s*p;const k=C<0?(C-m)/y:(C+m)/y;return{x:b,y:k}}}g(sp,"intersectLine");function io(e,t){return e*t>0}g(io,"sameSign");var ew=sp;function ap(e,t,r){let i=e.x,s=e.y,a=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){n=Math.min(n,c.x),o=Math.min(o,c.y)}):(n=Math.min(n,t.x),o=Math.min(o,t.y));let l=i-e.width/2-n,h=s-e.height/2-o;for(let c=0;c<t.length;c++){let u=t[c],p=t[c<t.length-1?c+1:0],d=ew(e,r,{x:l+u.x,y:h+u.y},{x:l+p.x,y:h+p.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(c,u){let p=c.x-r.x,d=c.y-r.y,f=Math.sqrt(p*p+d*d),y=u.x-r.x,m=u.y-r.y,C=Math.sqrt(y*y+m*m);return f<C?-1:f===C?0:1}),a[0]):e}g(ap,"intersectPolygon");var rw=ap,H={node:JT,circle:tw,ellipse:rp,polygon:rw,rect:Dr};function op(e,t){const{labelStyles:r}=X(t);t.labelStyle=r;const i=Z(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=1,{cssStyles:o}=t,l=Y.svg(a),h=j(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,n*2,h),u=a.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",St(o)),U(t,u),t.intersect=function(p){return P.info("Circle intersect",t,n,p),H.circle(t,n,p)},a}g(op,"anchor");function so(e,t,r,i,s,a,n){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/s,f=p/a,y=Math.sqrt(d**2+f**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-y**2),C=l+m*a*Math.sin(c)*(n?-1:1),b=h-m*s*Math.cos(c)*(n?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let w=Math.atan2((i-b)/a,(r-C)/s)-k;n&&w<0&&(w+=2*Math.PI),!n&&w>0&&(w-=2*Math.PI);const v=[];for(let T=0;T<20;T++){const B=T/19,R=k+B*w,D=C+s*Math.cos(R),O=b+a*Math.sin(R);v.push({x:D,y:O})}return v}g(so,"generateArcPoints");function np(e,t,r){const[i,s]=[t,r].sort((a,n)=>n-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(np,"calculateArcSagitta");async function lp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=g(R=>R+n,"calcTotalHeight"),l=g(R=>{const D=R/2;return[D/(2.5+R/50),D]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await Q(e,t,Z(t)),u=o(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),f=np(u,p,d),m=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+f-f,C=u,{cssStyles:b}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...so(-m/2,-C/2,-m/2,C/2,p,d,!1),{x:m/2,y:C/2},...so(m/2,C/2,m/2,-C/2,p,d,!0)],_=Y.svg(h),w=j(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=at(k),T=_.path(v,w),B=h.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${p/2}, 0)`),U(t,B),t.intersect=function(R){return H.polygon(t,k,R)},h}g(lp,"bowTieRect");function ke(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(ke,"insertPolygonShape");var Ri=12;async function hp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:l}=await Q(e,t,Z(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Ri),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),u=0,p=h,d=-c,f=0,y=[{x:u+Ri,y:d},{x:p,y:d},{x:p,y:f},{x:u,y:f},{x:u,y:d+Ri},{x:u+Ri,y:d}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Y.svg(o),k=j(t,{}),_=at(y),w=b.path(_,k);m=o.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&m.attr("style",C)}else m=ke(o,h,c,y);return i&&m.attr("style",i),U(t,m),t.intersect=function(b){return H.polygon(t,y,b)},o}g(hp,"card");function cp(e,t){const{nodeStyles:r}=X(t);t.label="";const i=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),n=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=Y.svg(i),l=j(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=at(n),c=o.path(h,l),u=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return H.polygon(t,n,p)},i}g(cp,"choice");async function cn(e,t,r){const{labelStyles:i,nodeStyles:s}=X(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,halfPadding:o}=await Q(e,t,Z(t)),l=16,h=(r==null?void 0:r.padding)??o,c=t.look==="neo"?n.width/2+l*2:n.width/2+h;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=Y.svg(a),f=j(t,{}),y=d.circle(0,0,c*2,f);u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",St(p))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return U(t,u),t.calcIntersect=function(d,f){const y=d.width/2;return H.circle(d,y,f)},t.intersect=function(d){return P.info("Circle intersect",t,c,d),H.circle(t,c,d)},a}g(cn,"circle");function up(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},n={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
|
|
228
|
+
M ${s.x},${s.y} L ${n.x},${n.y}`}g(up,"createLine");function dp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:n}=t,o=Y.svg(s),l=j(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=o.circle(0,0,a*2,l),c=up(a),u=o.path(c,l),p=s.insert(()=>h,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),U(t,p),t.intersect=function(d){return P.info("crossedCircle intersect",t,{radius:a,point:d}),H.circle(t,a,d)},s}g(dp,"crossedCircle");function de(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),f=t+r*Math.sin(p);n.push({x:-d,y:-f})}return n}g(de,"generateCirclePoints");async function pp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Q(e,t,Z(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+o,c=a.height+l,u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...de(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...de(h/2+u*2,-u,u,20,-180,-270),...de(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...de(h/2,c/2,u,20,0,90)],f=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...de(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...de(h/2+h*.1,-u,u,20,-180,-270),...de(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...de(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],y=Y.svg(s),m=j(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=at(d).replace("Z",""),k=y.path(b,m),_=at(f),w=y.path(_,{...m}),v=s.insert("g",":first-child");return v.insert(()=>w,":first-child").attr("stroke-opacity",0),v.insert(()=>k,":first-child"),v.attr("class","text"),p&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${u}, 0)`),n.attr("transform",`translate(${-h/2+u-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),U(t,v),t.intersect=function(T){return H.polygon(t,f,T)},s}g(pp,"curlyBraceLeft");function pe(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),f=t+r*Math.sin(p);n.push({x:d,y:f})}return n}g(pe,"generateCirclePoints");async function gp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Q(e,t,Z(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...pe(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...pe(h/2+u*2,-u,u,20,-180,-270),...pe(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...pe(h/2,c/2,u,20,0,90)],f=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...pe(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...pe(h/2+u*2,-u,u,20,-180,-270),...pe(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...pe(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],y=Y.svg(s),m=j(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=at(d).replace("Z",""),k=y.path(b,m),_=at(f),w=y.path(_,{...m}),v=s.insert("g",":first-child");return v.insert(()=>w,":first-child").attr("stroke-opacity",0),v.insert(()=>k,":first-child"),v.attr("class","text"),p&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-u}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),U(t,v),t.intersect=function(T){return H.polygon(t,f,T)},s}g(gp,"curlyBraceRight");function vt(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),f=t+r*Math.sin(p);n.push({x:-d,y:-f})}return n}g(vt,"generateCirclePoints");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Q(e,t,Z(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...vt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...vt(h/2+u*2,-u,u,20,-180,-270),...vt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...vt(h/2,c/2,u,20,0,90)],f=[...vt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...vt(-h/2-u/2,-u,u,20,0,90),...vt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...vt(-h/2+u+u/2,c/2,u,30,-180,-270)],y=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...vt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...vt(h/2+u*2,-u,u,20,-180,-270),...vt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...vt(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...vt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...vt(-h/2-u/2,-u,u,20,0,90),...vt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...vt(-h/2+u+u/2,c/2,u,30,-180,-270)],m=Y.svg(s),C=j(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=at(d).replace("Z",""),_=m.path(k,C),v=at(f).replace("Z",""),T=m.path(v,C),B=at(y),R=m.path(B,{...C}),D=s.insert("g",":first-child");return D.insert(()=>R,":first-child").attr("stroke-opacity",0),D.insert(()=>_,":first-child"),D.insert(()=>T,":first-child"),D.attr("class","text"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${u-u/4}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),U(t,D),t.intersect=function(O){return H.polygon(t,y,O)},s}g(fp,"curlyBraces");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=20,l=5,{shapeSvg:h,bbox:c}=await Q(e,t,Z(t)),u=Math.max(o,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+n*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:f}=t,y=Y.svg(h),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=u,b=p,k=C-d,_=b/4,w=[{x:k,y:0},{x:_,y:0},{x:0,y:b/2},{x:_,y:b},{x:k,y:b},...yi(-k,-b/2,d,50,270,90)],v=at(w),T=y.path(v,m),B=h.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(${-u/2}, ${-p/2})`),U(t,B),t.intersect=function(R){return H.polygon(t,w,R)},h}g(yp,"curvedTrapezoid");var iw=g((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),sw=g((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),aw=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ll=8,Fl=8;async function mp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,n=t.look==="neo"?24:s;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-n,t.width<Fl&&(t.width=Fl);const b=m/2/(2.5+m/50);t.height=(t.height??0)-a-b*3,t.height<Ll&&(t.height=Ll)}const{shapeSvg:o,bbox:l,label:h}=await Q(e,t,Z(t)),c=(t.width?t.width:l.width)+n,u=c/2,p=u/(2.5+c/50),d=(t.height?t.height:l.height)+a+p;let f;const{cssStyles:y}=t;if(t.look==="handDrawn"){const m=Y.svg(o),C=sw(0,0,c,d,u,p),b=aw(0,p,c,d,u,p),k=j(t,{}),_=m.path(C,k),w=m.path(b,j(t,{fill:"none"}));f=o.insert(()=>w,":first-child"),f=o.insert(()=>_,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{const m=iw(0,0,c,d,u,p);f=o.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",St(y)).attr("style",i)}return f.attr("label-offset-y",p),f.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),U(t,f),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(m){const C=H.rect(t,m),b=C.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-p)){let k=p*p*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=p-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},o}g(mp,"cylinder");async function Cp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await Q(e,t,Z(t)),h=o.width+s,c=o.height+a,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:f}=t,y=Y.svg(n),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:p,y:d+u},{x:-p,y:d+u},{x:-p,y:-d},{x:p,y:-d},{x:p,y:d},{x:-p,y:d},{x:-p,y:d+u}],b=y.polygon(C.map(_=>[_.x,_.y]),m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(o.x-(o.left??0))}, ${d+u+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,k),t.intersect=function(_){return H.rect(t,_)},n}g(Cp,"dividedRectangle");async function xp(e,t){var d,f;const{labelStyles:r,nodeStyles:i}=X(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,n=t.look==="neo"?16:a,{shapeSvg:o,bbox:l}=await Q(e,t,Z(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(n??0),c=h-s;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const y=Y.svg(o),m=j(t,{roughness:.2,strokeWidth:2.5}),C=j(t,{roughness:.2,strokeWidth:1.5}),b=y.circle(0,0,h*2,m),k=y.circle(0,0,c*2,C);u=o.insert("g",":first-child"),u.attr("class",St(t.cssClasses)).attr("style",St(p)),(d=u.node())==null||d.appendChild(b),(f=u.node())==null||f.appendChild(k)}else{u=o.insert("g",":first-child");const y=u.insert("circle",":first-child"),m=u.insert("circle");u.attr("class","basic label-container").attr("style",i),y.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return U(t,u),t.intersect=function(y){return P.info("DoubleCircle intersect",t,h,y),H.circle(t,h,y)},o}g(xp,"doublecircle");function bp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=X(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),n=7,{cssStyles:o}=t,l=Y.svg(a),{nodeBorder:h}=r,c=j(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,n*2,c),p=a.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),U(t,p),t.intersect=function(d){return P.info("filledCircle intersect",t,{radius:n,point:d}),H.circle(t,n,d)},a}g(bp,"filledCircle");var Ml=10,Al=10;async function kp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Ml&&(t.height=Ml),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<Al&&(t.width=Al));const{shapeSvg:n,bbox:o,label:l}=await Q(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+o.height,u=c,p=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:d}=t,f=Y.svg(n),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=at(p),C=f.path(m,y),b=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,U(t,b),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-c/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(k){return P.info("Triangle intersect",t,p,k),H.polygon(t,p,k)},n}g(kp,"flippedTriangle");function Tp(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=X(t);t.label="";const n=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,p=Y.svg(n),d=j(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=p.rectangle(c,u,l,h,d),y=n.insert(()=>f,":first-child");o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),U(t,y);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return H.rect(t,C)},n}g(Tp,"forkJoin");async function wp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=15,a=10,n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-o*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-n*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await Q(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+n*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+o*2,p=u/2,{cssStyles:d}=t,f=Y.svg(l),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...yi(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],C=at(m),b=f.path(C,y),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),U(t,k),t.intersect=function(_){return P.info("Pill intersect",t,{radius:p,point:_}),H.polygon(t,m,_)},l}g(wp,"halfRoundedRectangle");var ow=g((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function _p(e,t){const{labelStyles:r,nodeStyles:i}=X(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,n=70,o=32,l=t.look==="neo"?n:a,h=t.look==="neo"?o:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await Q(e,t,Z(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,f=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,y=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-p/2},{x:f-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Y.svg(c),k=j(t,{}),_=ow(0,0,f,p,d),w=b.path(_,k);m=c.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),C&&m.attr("style",C)}else m=ke(c,f,p,y);return i&&m.attr("style",i),t.width=f,t.height=p,U(t,m),t.intersect=function(b){return H.polygon(t,y,b)},c}g(_p,"hexagon");async function Sp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await Q(e,t,Z(t)),a=Math.max(30,(t==null?void 0:t.width)??0),n=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,l=Y.svg(s),h=j(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:n},{x:a,y:n}],u=at(c),p=l.path(u,h),d=s.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-n/2})`),U(t,d),t.intersect=function(f){return P.info("Pill intersect",t,{points:c}),H.polygon(t,c,f)},s}g(Sp,"hourglass");async function vp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=X(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,label:u}=await Q(e,t,"icon-shape default"),p=t.pos==="t",d=o,f=o,{nodeBorder:y}=r,{stylesMap:m}=Ir(t),C=-f/2,b=-d/2,k=t.label?8:0,_=Y.svg(h),w=j(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=_.rectangle(C,b,f,d,w),T=Math.max(f,c.width),B=d+c.height+k,R=_.rectangle(-T/2,-B/2,T,B,{...w,fill:"transparent",stroke:"none"}),D=h.insert(()=>v,":first-child"),O=h.insert(()=>R);if(t.icon){const W=h.append("g");W.html(`<g>${await vi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const N=W.node().getBBox(),I=N.width,M=N.height,L=N.x,E=N.y;W.attr("transform",`translate(${-I/2-L},${p?c.height/2+k/2-M/2-E:-c.height/2-k/2-M/2-E})`),W.attr("style",`color: ${m.get("stroke")??y};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-B/2:B/2-c.height})`),D.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),U(t,O),t.intersect=function(W){if(P.info("iconSquare intersect",t,W),!t.label)return H.rect(t,W);const N=t.x??0,I=t.y??0,M=t.height??0;let L=[];return p?L=[{x:N-c.width/2,y:I-M/2},{x:N+c.width/2,y:I-M/2},{x:N+c.width/2,y:I-M/2+c.height+k},{x:N+f/2,y:I-M/2+c.height+k},{x:N+f/2,y:I+M/2},{x:N-f/2,y:I+M/2},{x:N-f/2,y:I-M/2+c.height+k},{x:N-c.width/2,y:I-M/2+c.height+k}]:L=[{x:N-f/2,y:I-M/2},{x:N+f/2,y:I-M/2},{x:N+f/2,y:I-M/2+d},{x:N+c.width/2,y:I-M/2+d},{x:N+c.width/2/2,y:I+M/2},{x:N-c.width/2,y:I+M/2},{x:N-c.width/2,y:I-M/2+d},{x:N-f/2,y:I-M/2+d}],H.polygon(t,L,W)},h}g(vp,"icon");async function Bp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=X(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,label:u}=await Q(e,t,"icon-shape default"),p=20,d=t.label?8:0,f=t.pos==="t",{nodeBorder:y,mainBkg:m}=r,{stylesMap:C}=Ir(t),b=Y.svg(h),k=j(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=C.get("fill");k.stroke=_??m;const w=h.append("g");t.icon&&w.html(`<g>${await vi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=w.node().getBBox(),T=v.width,B=v.height,R=v.x,D=v.y,O=Math.max(T,B)*Math.SQRT2+p*2,W=b.circle(0,0,O,k),N=Math.max(O,c.width),I=O+c.height+d,M=b.rectangle(-N/2,-I/2,N,I,{...k,fill:"transparent",stroke:"none"}),L=h.insert(()=>W,":first-child"),E=h.insert(()=>M);return w.attr("transform",`translate(${-T/2-R},${f?c.height/2+d/2-B/2-D:-c.height/2-d/2-B/2-D})`),w.attr("style",`color: ${C.get("stroke")??y};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${f?-I/2:I/2-c.height})`),L.attr("transform",`translate(0,${f?c.height/2+d/2:-c.height/2-d/2})`),U(t,E),t.intersect=function(F){return P.info("iconSquare intersect",t,F),H.rect(t,F)},h}g(Bp,"iconCircle");async function Lp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=X(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await Q(e,t,"icon-shape default"),d=t.pos==="t",f=o+u*2,y=o+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=Ir(t),k=-y/2,_=-f/2,w=t.label?8:0,v=Y.svg(h),T=j(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=b.get("fill");T.stroke=B??C;const R=v.path(Ee(k,_,y,f,5),T),D=Math.max(y,c.width),O=f+c.height+w,W=v.rectangle(-D/2,-O/2,D,O,{...T,fill:"transparent",stroke:"none"}),N=h.insert(()=>R,":first-child").attr("class","icon-shape2"),I=h.insert(()=>W);if(t.icon){const M=h.append("g");M.html(`<g>${await vi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=M.node().getBBox(),E=L.width,F=L.height,q=L.x,z=L.y;M.attr("transform",`translate(${-E/2-q},${d?c.height/2+w/2-F/2-z:-c.height/2-w/2-F/2-z})`),M.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),N.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),U(t,I),t.intersect=function(M){if(P.info("iconSquare intersect",t,M),!t.label)return H.rect(t,M);const L=t.x??0,E=t.y??0,F=t.height??0;let q=[];return d?q=[{x:L-c.width/2,y:E-F/2},{x:L+c.width/2,y:E-F/2},{x:L+c.width/2,y:E-F/2+c.height+w},{x:L+y/2,y:E-F/2+c.height+w},{x:L+y/2,y:E+F/2},{x:L-y/2,y:E+F/2},{x:L-y/2,y:E-F/2+c.height+w},{x:L-c.width/2,y:E-F/2+c.height+w}]:q=[{x:L-y/2,y:E-F/2},{x:L+y/2,y:E-F/2},{x:L+y/2,y:E-F/2+f},{x:L+c.width/2,y:E-F/2+f},{x:L+c.width/2/2,y:E+F/2},{x:L-c.width/2,y:E+F/2},{x:L-c.width/2,y:E-F/2+f},{x:L-y/2,y:E-F/2+f}],H.polygon(t,q,M)},h}g(Lp,"iconRounded");async function Fp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=X(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await Q(e,t,"icon-shape default"),d=t.pos==="t",f=o+u*2,y=o+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=Ir(t),k=-y/2,_=-f/2,w=t.label?8:0,v=Y.svg(h),T=j(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=b.get("fill");T.stroke=B??C;const R=v.path(Ee(k,_,y,f,.1),T),D=Math.max(y,c.width),O=f+c.height+w,W=v.rectangle(-D/2,-O/2,D,O,{...T,fill:"transparent",stroke:"none"}),N=h.insert(()=>R,":first-child"),I=h.insert(()=>W);if(t.icon){const M=h.append("g");M.html(`<g>${await vi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=M.node().getBBox(),E=L.width,F=L.height,q=L.x,z=L.y;M.attr("transform",`translate(${-E/2-q},${d?c.height/2+w/2-F/2-z:-c.height/2-w/2-F/2-z})`),M.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),N.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),U(t,I),t.intersect=function(M){if(P.info("iconSquare intersect",t,M),!t.label)return H.rect(t,M);const L=t.x??0,E=t.y??0,F=t.height??0;let q=[];return d?q=[{x:L-c.width/2,y:E-F/2},{x:L+c.width/2,y:E-F/2},{x:L+c.width/2,y:E-F/2+c.height+w},{x:L+y/2,y:E-F/2+c.height+w},{x:L+y/2,y:E+F/2},{x:L-y/2,y:E+F/2},{x:L-y/2,y:E-F/2+c.height+w},{x:L-c.width/2,y:E-F/2+c.height+w}]:q=[{x:L-y/2,y:E-F/2},{x:L+y/2,y:E-F/2},{x:L+y/2,y:E-F/2+f},{x:L+c.width/2,y:E-F/2+f},{x:L+c.width/2/2,y:E+F/2},{x:L-c.width/2,y:E+F/2},{x:L-c.width/2,y:E-F/2+f},{x:L-y/2,y:E-F/2+f}],H.polygon(t,q,M)},h}g(Fp,"iconSquare");async function Mp(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:n}=X(t);t.labelStyle=n;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,o??0);const{shapeSvg:u,bbox:p,label:d}=await Q(e,t,"image-shape default"),f=t.pos==="t",y=-h/2,m=-c/2,C=t.label?8:0,b=Y.svg(u),k=j(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=b.rectangle(y,m,h,c,k),w=Math.max(h,p.width),v=c+p.height+C,T=b.rectangle(-w/2,-v/2,w,v,{...k,fill:"none",stroke:"none"}),B=u.insert(()=>_,":first-child"),R=u.insert(()=>T);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",h),D.attr("height",c),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-h/2},${f?v/2-c:-v/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${f?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),B.attr("transform",`translate(0,${f?p.height/2+C/2:-p.height/2-C/2})`),U(t,R),t.intersect=function(D){if(P.info("iconSquare intersect",t,D),!t.label)return H.rect(t,D);const O=t.x??0,W=t.y??0,N=t.height??0;let I=[];return f?I=[{x:O-p.width/2,y:W-N/2},{x:O+p.width/2,y:W-N/2},{x:O+p.width/2,y:W-N/2+p.height+C},{x:O+h/2,y:W-N/2+p.height+C},{x:O+h/2,y:W+N/2},{x:O-h/2,y:W+N/2},{x:O-h/2,y:W-N/2+p.height+C},{x:O-p.width/2,y:W-N/2+p.height+C}]:I=[{x:O-h/2,y:W-N/2},{x:O+h/2,y:W-N/2},{x:O+h/2,y:W-N/2+c},{x:O+p.width/2,y:W-N/2+c},{x:O+p.width/2/2,y:W+N/2},{x:O-p.width/2,y:W+N/2},{x:O-p.width/2,y:W-N/2+c},{x:O-h/2,y:W-N/2+c}],H.polygon(t,I,D)},u}g(Mp,"imageSquare");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await Q(e,t,Z(t)),h=Math.max(l.width+(n??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Y.svg(o),y=j(t,{}),m=at(u),C=f.path(m,y);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=ke(o,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,U(t,p),t.intersect=function(f){return H.polygon(t,u,f)},o}g(Ap,"inv_trapezoid");async function Li(e,t,r){const{labelStyles:i,nodeStyles:s}=X(t);t.labelStyle=i;const{shapeSvg:a,bbox:n}=await Q(e,t,Z(t)),o=Math.max(n.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(n.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-o/2,c=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:f}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const y=Y.svg(a),m=j(t,{}),C=p||d?y.path(Ee(h,c,o,l,p||0),m):y.rectangle(h,c,o,l,m);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",St(f))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",St(p)).attr("ry",St(d)).attr("x",h).attr("y",c).attr("width",o).attr("height",l);return U(t,u),t.calcIntersect=function(y,m){return H.rect(y,m)},t.intersect=function(y){return H.rect(t,y)},a}g(Li,"drawRect");async function $p(e,t){const{shapeSvg:r,bbox:i,label:s}=await Q(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),U(t,a),t.intersect=function(l){return H.rect(t,l)},r}g($p,"labelRect");async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await Q(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+n,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Y.svg(o),y=j(t,{}),m=at(u),C=f.path(m,y);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=ke(o,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,U(t,p),t.intersect=function(f){return H.polygon(t,u,f)},o}g(Ep,"lean_left");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await Q(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+n,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Y.svg(o),y=j(t,{}),m=at(u),C=f.path(m,y);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=ke(o,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,U(t,p),t.intersect=function(f){return H.polygon(t,u,f)},o}g(Op,"lean_right");function Ip(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:n,y:0},{x:0,y:o+l/2},{x:n-2*l,y:o+l/2},{x:0,y:2*o},{x:n,y:o-l/2},{x:2*l,y:o-l/2}],c=Y.svg(s),u=j(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=at(h),d=c.path(p,u),f=s.insert(()=>d,":first-child");return f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),f.attr("transform",`translate(-${n/2},${-o})`),U(t,f),t.intersect=function(y){return P.info("lightningBolt intersect",t,y),H.polygon(t,h,y)},s}g(Ip,"lightningBolt");var nw=g((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),lw=g((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),hw=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),$l=10,El=10;async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<El&&(t.width=El);const k=C/2/(2.5+C/50);t.height=(t.height??0)-n-k*3,t.height<$l&&(t.height=$l)}const{shapeSvg:o,bbox:l,label:h}=await Q(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=c/2,p=u/(2.5+c/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+n*2,f=d*.1;let y;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=Y.svg(o),b=lw(0,0,c,d,u,p,f),k=hw(0,p,c,d,u,p),_=j(t,{}),w=C.path(b,_),v=C.path(k,_);o.insert(()=>v,":first-child").attr("class","line"),y=o.insert(()=>w,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=nw(0,0,c,d,u,p,f);y=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",St(m)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),U(t,y),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=H.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let _=p*p*(1-k*k/(u*u));_>0&&(_=Math.sqrt(_)),_=p-_,C.y-(t.y??0)>0&&(_=-_),b.y+=_}return b},o}g(Dp,"linedCylinder");async function Pp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;if(t.width||t.height){const _=t.width;t.width=(_??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10)}const{shapeSvg:o,bbox:l,label:h}=await Q(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(n??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:f}=t,y=Y.svg(o),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...Ae(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,p,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],b=y.polygon(C.map(_=>[_.x,_.y]),m),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),U(t,k),t.intersect=function(_){return H.polygon(t,C,_)},o}g(Pp,"linedWaveEdgedRect");async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*o,10),t.height=Math.max(((t==null?void 0:t.height)??0)-n*2-2*o,10));const{shapeSvg:l,bbox:h,label:c}=await Q(e,t,Z(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*o,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+n*2+2*o,d=u-2*o,f=p-2*o,y=-d/2,m=-f/2,{cssStyles:C}=t,b=Y.svg(l),k=j(t,{}),_=[{x:y-o,y:m+o},{x:y-o,y:m+f+o},{x:y+d-o,y:m+f+o},{x:y+d-o,y:m+f},{x:y+d,y:m+f},{x:y+d,y:m+f-o},{x:y+d+o,y:m+f-o},{x:y+d+o,y:m-o},{x:y+o,y:m-o},{x:y+o,y:m},{x:y,y:m},{x:y,y:m+o}],w=[{x:y,y:m+o},{x:y+d-o,y:m+o},{x:y+d-o,y:m+f},{x:y+d,y:m+f},{x:y+d,y:m},{x:y,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=at(_);let T=b.path(v,k);const B=at(w);let R=b.path(B,k);t.look!=="handDrawn"&&(T=ro(T),R=ro(R));const D=l.insert("g",":first-child");return D.insert(()=>T),D.insert(()=>R),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-o-(h.x-(h.left??0))}, ${-(h.height/2)+o-(h.y-(h.top??0))})`),U(t,D),t.intersect=function(O){return H.polygon(t,_,O)},l}g(Rp,"multiRect");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Q(e,t,Z(t)),o=t.padding??0,l=t.look==="neo"?16:o,h=t.look==="neo"?12:o;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?p/4:p/8,f=p+(c?d/2:-d/2),y=-u/2,m=-f/2,C=10,{cssStyles:b}=t,k=Ae(y-C,m+f+C,y+u-C,m+f+C,d,.8),_=k==null?void 0:k[k.length-1],w=[{x:y-C,y:m+C},{x:y-C,y:m+f+C},...k,{x:y+u-C,y:_.y-C},{x:y+u,y:_.y-C},{x:y+u,y:_.y-2*C},{x:y+u+C,y:_.y-2*C},{x:y+u+C,y:m-C},{x:y+C,y:m-C},{x:y+C,y:m},{x:y,y:m},{x:y,y:m+C}],v=[{x:y,y:m+C},{x:y+u-C,y:m+C},{x:y+u-C,y:_.y-C},{x:y+u,y:_.y-C},{x:y+u,y:m},{x:y,y:m}],T=Y.svg(s),B=j(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const R=at(w),D=T.path(R,B),O=at(v),W=T.path(O,B),N=s.insert(()=>D,":first-child");return N.insert(()=>W),N.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(0,${-d/2})`),n.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),U(t,N),t.intersect=function(I){return H.polygon(t,w,I)},s}g(qp,"multiWaveEdgedRectangle");async function Np(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=X(t);t.labelStyle=i,t.useHtmlLabels||It(mt())||(t.centerLabel=!0);const{shapeSvg:n,bbox:o,label:l}=await Q(e,t,Z(t)),h=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,p=-c/2,{cssStyles:d}=t,f=Y.svg(n),y=j(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=f.rectangle(u,p,h,c,y),C=n.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),U(t,C),t.intersect=function(b){return H.rect(t,b)},n}g(Np,"note");var cw=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await Q(e,t,Z(t)),n=a.width+(t.padding??0),o=a.height+(t.padding??0),l=n+o,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=Y.svg(s),f=j(t,{}),y=cw(0,0,l),m=d.path(y,f);u=s.insert(()=>m,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=ke(s,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),U(t,u),t.calcIntersect=function(d,f){const y=d.width,m=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],C=H.polygon(d,m,f);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}g(zp,"question");async function Wp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,n=t.look==="neo"?12:s??0,{shapeSvg:o,bbox:l,label:h}=await Q(e,t,Z(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),p=-c/2,d=-u/2,f=d/2,y=[{x:p+f,y:d},{x:p,y:0},{x:p+f,y:-d},{x:-p,y:-d},{x:-p,y:d}],{cssStyles:m}=t,C=Y.svg(o),b=j(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=at(y),_=C.path(k,b),w=o.insert(()=>_,":first-child");return w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-f/2},0)`),h.attr("transform",`translate(${-f/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),U(t,w),t.intersect=function(v){return H.polygon(t,y,v)},o}g(Wp,"rect_left_inv_arrow");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await Se(o,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(It(ht())){const B=c.children[0],R=it(c);u=B.getBoundingClientRect(),R.attr("width",u.width),R.attr("height",u.height)}P.info("Text 2",l);const p=l||[],d=c.getBBox(),f=await Se(o,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),y=f.children[0],m=it(f);u=y.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height);const C=(t.padding||0)/2;it(f).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),it(c).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),_=-u.width/2-C,w=-u.height/2-C;let v,T;if(t.look==="handDrawn"){const B=Y.svg(a),R=j(t,{}),D=B.path(Ee(_,w,b,k,t.rx||0),R),O=B.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,R);T=a.insert(()=>(P.debug("Rough node insert CXC",D),O),":first-child"),v=a.insert(()=>(P.debug("Rough node insert CXC",D),D),":first-child")}else v=n.insert("rect",":first-child"),T=n.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return U(t,v),t.intersect=function(B){return H.rect(t,B)},a}g(Hp,"rectWithTitle");async function Yp(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Li(e,t,s)}g(Yp,"roundedRect");var De=8;async function jp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await Q(e,t,Z(t)),h=((t==null?void 0:t.width)??o.width)+s*2+(t.look==="neo"?De:De*2),c=((t==null?void 0:t.height)??o.height)+a*2,u=h-De,p=c,d=De-h/2,f=-c/2,{cssStyles:y}=t,m=Y.svg(n),C=j(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:f},{x:d+u,y:f},{x:d+u,y:f+p},{x:d-De,y:f+p},{x:d-De,y:f},{x:d,y:f},{x:d,y:f+p}],k=m.polygon(b.map(w=>[w.x,w.y]),C),_=n.insert(()=>k,":first-child");return _.attr("class","basic label-container outer-path").attr("style",St(y)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${De/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),U(t,_),t.intersect=function(w){return H.rect(t,w)},n}g(jp,"shadedProcess");async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-n*2,10));const{shapeSvg:o,bbox:l,label:h}=await Q(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2)*1.5,p=c,d=u/1.5,f=-p/2,y=-d/2,{cssStyles:m}=t,C=Y.svg(o),b=j(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:f,y},{x:f,y:y+d},{x:f+p,y:y+d},{x:f+p,y:y-d/2}],_=at(k),w=C.path(_,b),v=o.insert(()=>w,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),U(t,v),t.intersect=function(T){return H.polygon(t,k,T)},o}g(Xp,"slopedRect");async function Up(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Li(e,t,a)}g(Up,"squareRect");async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,n=t.look==="neo"?12:s,{shapeSvg:o,bbox:l}=await Q(e,t,Z(t)),h=l.height+(t.look==="neo"?n*2:n),c=l.width+h/4+(t.look==="neo"?a*2:a),u=h/2,{cssStyles:p}=t,d=Y.svg(o),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...yi(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...yi(c/2-u,0,u,50,270,450)],m=at(y),C=d.path(m,f),b=o.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),U(t,b),t.intersect=function(k){return H.polygon(t,y,k)},o}g(Gp,"stadium");async function Vp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Li(e,t,r)}g(Vp,"state");function Zp(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=X(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:n,stateBorder:o,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=Y.svg(c),p=j(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:n,strokeWidth:2}),f=o??l,y=(t.width??0)*5/14,m=u.circle(0,0,y,{...p,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const _=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",w=_?`${_}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return U(t,C),t.intersect=function(_){return H.circle(t,(t.width??0)/2,_)},c}g(Zp,"stateEnd");function Qp(e,t,{config:{themeVariables:r}}){var o,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const c=Y.svg(a).circle(0,0,t.width,x2(i));n=a.insert(()=>c),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((l=(o=e.node())==null?void 0:o.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${c})`)}return U(t,n),t.intersect=function(h){return H.circle(t,(t.width??7)/2,h)},a}g(Qp,"stateStart");var or=8;async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,n=t.look==="neo"?12:s,{shapeSvg:o,bbox:l}=await Q(e,t,Z(t)),h=((t==null?void 0:t.width)??l.width)+2*or+a,c=((t==null?void 0:t.height)??l.height)+n,u=h-2*or,p=c,d=-h/2,f=-c/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const m=Y.svg(o),C=j(t,{}),b=m.rectangle(d,f,u+16,p,C),k=m.line(d+or,f,d+or,f+p,C),_=m.line(d+or+u,f,d+or+u,f+p,C);o.insert(()=>k,":first-child"),o.insert(()=>_,":first-child");const w=o.insert(()=>b,":first-child"),{cssStyles:v}=t;w.attr("class","basic label-container").attr("style",St(v)),U(t,w)}else{const m=ke(o,u,p,y);i&&m.attr("style",i),U(t,m)}return t.intersect=function(m){return H.polygon(t,y,m)},o}g(Kp,"subroutine");var pa=.2;async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-n*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-pa*(t.height+n*2),10));const{shapeSvg:o,bbox:l}=await Q(e,t,Z(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,c=pa*h,u=pa*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,f=h,y=-d/2,m=-f/2,{cssStyles:C}=t,b=Y.svg(o),k=j(t,{}),_=[{x:y-c/2,y:m},{x:y+d+c/2,y:m},{x:y+d+c/2,y:m+f},{x:y-c/2,y:m+f}],w=[{x:y+d-c/2,y:m+f},{x:y+d+c/2,y:m+f},{x:y+d+c/2,y:m+f-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=at(_),T=b.path(v,k),B=at(w),R=b.path(B,{...k,fillStyle:"solid"}),D=o.insert(()=>R,":first-child");return D.insert(()=>T,":first-child"),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),U(t,D),t.intersect=function(O){return H.polygon(t,_,O)},o}g(Jp,"taggedRect");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Q(e,t,Z(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*o,u=.2*l,p=l+h,{cssStyles:d}=t,f=Y.svg(s),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-o/2-o/2*.1,y:p/2},...Ae(-o/2-o/2*.1,p/2,o/2+o/2*.1,p/2,h,.8),{x:o/2+o/2*.1,y:-p/2},{x:-o/2-o/2*.1,y:-p/2}],C=-o/2+o/2*.1,b=-p/2-u*.4,k=[{x:C+o-c,y:(b+l)*1.3},{x:C+o,y:b+l-u},{x:C+o,y:(b+l)*.9},...Ae(C+o,(b+l)*1.25,C+o-c,(b+l)*1.3,-l*.02,.5)],_=at(m),w=f.path(_,y),v=at(k),T=f.path(v,{...y,fillStyle:"solid"}),B=s.insert(()=>T,":first-child");return B.insert(()=>w,":first-child"),B.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-h/2})`),n.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),U(t,B),t.intersect=function(R){return H.polygon(t,m,R)},s}g(tg,"taggedWaveEdgedRectangle");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await Q(e,t,Z(t)),n=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-n/2,h=-o/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",n).attr("height",o),U(t,c),t.intersect=function(u){return H.rect(t,u)},s}g(eg,"text");var uw=g((e,t,r,i,s,a)=>`M${e},${t}
|
|
229
|
+
a${s},${a} 0,0,1 0,${-i}
|
|
230
|
+
l${r},0
|
|
231
|
+
a${s},${a} 0,0,1 0,${i}
|
|
232
|
+
M${r},${-i}
|
|
233
|
+
a${s},${a} 0,0,0 0,${i}
|
|
234
|
+
l${-r},0`,"createCylinderPathD"),dw=g((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),pw=g((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Ol=5,Il=10;async function rg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const y=t.height??0;t.height=(t.height??0)-a,t.height<Ol&&(t.height=Ol);const C=y/2/(2.5+y/50);t.width=(t.width??0)-a-C*3,t.width<Il&&(t.width=Il)}const{shapeSvg:n,bbox:o,label:l}=await Q(e,t,Z(t)),h=(t.height?t.height:o.height)+a,c=h/2,u=c/(2.5+h/50),p=(t.width?t.width:o.width)+u+a,{cssStyles:d}=t;let f;if(t.look==="handDrawn"){const y=Y.svg(n),m=dw(0,0,p,h,u,c),C=pw(0,0,p,h,u,c),b=y.path(m,j(t,{})),k=y.path(C,j(t,{fill:"none"}));f=n.insert(()=>k,":first-child"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const y=uw(0,0,p,h,u,c);f=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",St(d)).attr("style",i),f.attr("class","basic label-container outer-path"),d&&f.selectAll("path").attr("style",d),i&&f.selectAll("path").attr("style",i)}return f.attr("label-offset-x",u),f.attr("transform",`translate(${-p/2}, ${h/2} )`),l.attr("transform",`translate(${-(o.width/2)-u-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),U(t,f),t.intersect=function(y){const m=H.rect(t,y),C=m.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,y.x-(t.x??0)>0&&(b=-b),m.x+=b}return m},n}g(rg,"tiltedCylinder");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await Q(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+n,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Y.svg(o),y=j(t,{}),m=at(u),C=f.path(m,y);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=ke(o,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,U(t,p),t.intersect=function(f){return H.polygon(t,u,f)},o}g(ig,"trapezoid");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-n*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:h,bbox:c}=await Q(e,t,Z(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2,{cssStyles:d}=t,f=Y.svg(h),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-u/2*.8,y:-p/2},{x:u/2*.8,y:-p/2},{x:u/2,y:-p/2*.6},{x:u/2,y:p/2},{x:-u/2,y:p/2},{x:-u/2,y:-p/2*.6}],C=at(m),b=f.path(C,y),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),U(t,k),t.intersect=function(_){return H.polygon(t,m,_)},h}g(sg,"trapezoidalPentagon");var Dl=10,Pl=10;async function ag(e,t){var _;const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<Pl&&(t.width=Pl),t.height=(t==null?void 0:t.height)??0,t.height<Dl&&(t.height=Dl));const{shapeSvg:n,bbox:o,label:l}=await Q(e,t,Z(t)),h=Ce((_=ht().flowchart)==null?void 0:_.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:c+o.height,p=u,d=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-u}],{cssStyles:f}=t,y=Y.svg(n),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=at(d),b=y.path(C,m),k=n.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=u,U(t,k),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${u/2-(o.height+(t.padding??0)/(h?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(w){return P.info("Triangle intersect",t,d,w),H.polygon(t,d,w)},n}g(ag,"triangle");async function og(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await Q(e,t,Z(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(n??0)*2,d=t.look==="neo"?p/4:p/8,f=p+(o?d:-d),{cssStyles:y}=t,C=14-u,b=C>0?C/2:0,k=Y.svg(l),_=j(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=[{x:-u/2-b,y:f/2},...Ae(-u/2-b,f/2,u/2+b,f/2,d,.8),{x:u/2+b,y:-f/2},{x:-u/2-b,y:-f/2}],v=at(w),T=k.path(v,_),B=l.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-d-(h.y-(h.top??0))})`),U(t,B),t.intersect=function(R){return H.polygon(t,w,R)},l}g(og,"waveEdgedRectangle");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const _=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-_*(20/9)),t.width=t.width-a*2}const{shapeSvg:o,bbox:l}=await Q(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n,u=c/8,p=c+u*2,{cssStyles:d}=t,f=Y.svg(o),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-h/2,y:p/2},...Ae(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...Ae(h/2,-p/2,-h/2,-p/2,u,-1)],C=at(m),b=f.path(C,y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),U(t,k),t.intersect=function(_){return H.polygon(t,m,_)},o}g(ng,"waveRectangle");var Ct=10;async function lg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Ct,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Ct,10));const{shapeSvg:n,bbox:o,label:l}=await Q(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s*2+Ct,c=(t!=null&&t.height?t==null?void 0:t.height:o.height)+a*2+Ct,u=h-Ct,p=c-Ct,d=-u/2,f=-p/2,{cssStyles:y}=t,m=Y.svg(n),C=j(t,{}),b=[{x:d-Ct,y:f-Ct},{x:d-Ct,y:f+p},{x:d+u,y:f+p},{x:d+u,y:f-Ct}],k=`M${d-Ct},${f-Ct} L${d+u},${f-Ct} L${d+u},${f+p} L${d-Ct},${f+p} L${d-Ct},${f-Ct}
|
|
235
|
+
M${d-Ct},${f} L${d+u},${f}
|
|
236
|
+
M${d},${f-Ct} L${d},${f+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=m.path(k,C),w=n.insert(()=>_,":first-child");return w.attr("transform",`translate(${Ct/2}, ${Ct/2})`),w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(o.width/2)+Ct/2-(o.x-(o.left??0))}, ${-(o.height/2)+Ct/2-(o.y-(o.top??0))})`),U(t,w),t.intersect=function(v){return H.polygon(t,b,v)},n}g(lg,"windowPane");var Rl=new Set(["redux-color","redux-dark-color"]),gw=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function un(e,t){var bt,$t,Jt,te;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=mt(),{rowEven:a,rowOdd:n,nodeBorder:o,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:V}=mt(),{background:rt}=V,gt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${rt}`]};await un(e,gt)}const h=mt();t.useHtmlLabels=h.htmlLabels;let c=((bt=h.er)==null?void 0:bt.diagramPadding)??10,u=(($t=h.er)==null?void 0:$t.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:f}=X(t);if(r.attributes.length===0&&t.label){const V={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};me(t.label,h)+V.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const rt=await Li(e,t,V);if(i!=null&&Rl.has(i)){const gt=r.colorIndex??0;rt.attr("data-color-id",`color-${gt%l.length}`)}if(!Ce(h.htmlLabels)){const gt=rt.select("text"),_t=(Jt=gt.node())==null?void 0:Jt.getBBox();gt.attr("transform",`translate(${-_t.width/2}, 0)`)}return rt}h.htmlLabels||(c*=1.25,u*=1.25);let y=Z(t);y||(y="node default");const m=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await lr(m,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],_=[];let w=0,v=0,T=0,B=0,R=!0,D=!0;for(const V of r.attributes){const rt=await lr(m,V.type,h,0,b,["attribute-type"],d);w=Math.max(w,rt.width+c);const gt=await lr(m,V.name,h,0,b,["attribute-name"],d);v=Math.max(v,gt.width+c);const _t=await lr(m,V.keys.join(),h,0,b,["attribute-keys"],d);T=Math.max(T,_t.width+c);const Oe=await lr(m,V.comment,h,0,b,["attribute-comment"],d);B=Math.max(B,Oe.width+c);const Te=Math.max(rt.height,gt.height,_t.height,Oe.height)+u;_.push({yOffset:b,rowHeight:Te}),b+=Te}let O=4;T<=c&&(R=!1,T=0,O--),B<=c&&(D=!1,B=0,O--);const W=m.node().getBBox();if(C.width+c*2-(w+v+T+B)>0){const V=C.width+c*2-(w+v+T+B);w+=V/O,v+=V/O,T>0&&(T+=V/O),B>0&&(B+=V/O)}const N=w+v+T+B,I=Y.svg(m),M=j(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let L=0;_.length>0&&(L=_.reduce((V,rt)=>V+((rt==null?void 0:rt.rowHeight)??0),0));const E=Math.max(W.width+c*2,(t==null?void 0:t.width)||0,N),F=Math.max((L??0)+C.height,(t==null?void 0:t.height)||0),q=-E/2,z=-F/2;if(m.selectAll("g:not(:first-child)").each((V,rt,gt)=>{const _t=it(gt[rt]),Oe=_t.attr("transform");let Te=0,gn=0;if(Oe){const Js=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Oe);Js&&(Te=parseFloat(Js[1]),gn=parseFloat(Js[2]),_t.attr("class").includes("attribute-name")?Te+=w:_t.attr("class").includes("attribute-keys")?Te+=w+v:_t.attr("class").includes("attribute-comment")&&(Te+=w+v+T))}_t.attr("transform",`translate(${q+c/2+Te}, ${gn+z+C.height+u/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(z+u/2)+")"),i!=null&&Rl.has(i)){const V=r.colorIndex??0;m.attr("data-color-id",`color-${V%l.length}`)}const et=I.rectangle(q,z,E,F,M),st=m.insert(()=>et,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[V,rt]of _.entries()){const _t=(V+1)%2===0&&rt.yOffset!==0,Oe=I.rectangle(q,C.height+z+(rt==null?void 0:rt.yOffset),E,rt==null?void 0:rt.rowHeight,{...M,fill:_t?a:n,stroke:o});m.insert(()=>Oe,"g.label").attr("style",p.join("")).attr("class",`row-rect-${_t?"even":"odd"}`)}const lt=1e-4;let nt=hr(q,C.height+z,E+q,C.height+z,lt),ut=I.polygon(nt.map(V=>[V.x,V.y]),M);if(m.insert(()=>ut).attr("class","divider"),nt=hr(w+q,C.height+z,w+q,F+z,lt),ut=I.polygon(nt.map(V=>[V.x,V.y]),M),m.insert(()=>ut).attr("class","divider"),R){const V=w+v+q;nt=hr(V,C.height+z,V,F+z,lt),ut=I.polygon(nt.map(rt=>[rt.x,rt.y]),M),m.insert(()=>ut).attr("class","divider")}if(D){const V=w+v+T+q;nt=hr(V,C.height+z,V,F+z,lt),ut=I.polygon(nt.map(rt=>[rt.x,rt.y]),M),m.insert(()=>ut).attr("class","divider")}for(const V of k){const rt=C.height+z+V;nt=hr(q,rt,E+q,rt,lt),ut=I.polygon(nt.map(gt=>[gt.x,gt.y]),M),m.insert(()=>ut).attr("class","divider")}if(U(t,st),f&&t.look!=="handDrawn")if(i!=null&&gw.has(i))m.selectAll("path").attr("style",f);else{const V=f.split(";"),rt=(te=V==null?void 0:V.filter(gt=>gt.includes("stroke")))==null?void 0:te.map(gt=>`${gt}`).join("; ");m.selectAll("path").attr("style",rt??""),m.selectAll(".row-rect-even path").attr("style",f)}return t.intersect=function(V){return H.rect(t,V)},m}g(un,"erBox");async function lr(e,t,r,i=0,s=0,a=[],n=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",n);t!==Cn(t)&&(t=Cn(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await be(o,t,{width:me(t,r)+100,style:n,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(Ce(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=it(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}g(lr,"addText");function hr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}g(hr,"lineToPolygon");async function hg(e,t,r,i,s=r.class.padding??12){const a=i?0:3,n=e.insert("g").attr("class",Z(t)).attr("id",t.domId||t.id);let o=null,l=null,h=null,c=null,u=0,p=0,d=0;if(o=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Qr(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=n.insert("g").attr("class","label-group text"),await Qr(l,t,0,["font-weight: bolder"]);const f=l.node().getBBox();p=f.height,h=n.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const k=await Qr(h,b,y,[b.parseClassifier()]);y+=k+a}d=h.node().getBBox().height,d<=0&&(d=s/2),c=n.insert("g").attr("class","methods-group text");let m=0;for(const b of t.methods){const k=await Qr(c,b,m,[b.parseClassifier()]);m+=k+a}let C=n.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-f.width/2}, ${u})`),C=n.node().getBBox(),h.attr("transform",`translate(0, ${u+p+s*2})`),C=n.node().getBBox(),c.attr("transform",`translate(0, ${u+p+(d?d+s*4:s*2)})`),C=n.node().getBBox(),{shapeSvg:n,bbox:C}}g(hg,"textHelper");async function Qr(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=mt();let n="useHtmlLabels"in t?t.useHtmlLabels:Ce(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!n&&o.startsWith("\\")&&(o=o.substring(1)),ai(o)&&(n=!0);const l=await be(s,xo(Qe(o)),{width:me(o,a)+50,classes:"markdown-node-label",useHtmlLabels:n},a);let h,c=1;if(n){const u=l.children[0],p=it(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const f=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(y=>new Promise(m=>{function C(){var b;if(y.style.display="flex",y.style.flexDirection="column",f){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(k,10)*5+"px";y.style.minWidth=w,y.style.maxWidth=w}else y.style.width="100%";m(y)}g(C,"setupImage"),setTimeout(()=>{y.complete&&C()}),y.addEventListener("error",C),y.addEventListener("load",C)})))}h=u.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&it(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}g(Qr,"addText");async function cg(e,t){var I,M;const r=ht(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,n=a,o=t.useHtmlLabels??Ce(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await hg(e,t,r,o,n),{labelStyles:u,nodeStyles:p}=X(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((I=l.styles)==null?void 0:I.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const f=l.members.length===0&&l.methods.length===0&&!((M=r.class)!=null&&M.hideEmptyMembersBox),y=Y.svg(h),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=n:l.members.length>0&&l.methods.length===0&&(b+=n*2);const _=-C/2,w=-b/2;let v=f?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(v=a*2);const T=y.rectangle(_-a,w-a-(f?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+v,m),B=h.insert(()=>T,":first-child");B.attr("class","basic label-container outer-path");const R=B.node().getBBox(),D=h.select(".annotation-group").node().getBBox().height-(f?a/2:0)||0,O=h.select(".label-group").node().getBBox().height-(f?a/2:0)||0,W=h.select(".members-group").node().getBBox().height-(f?a/2:0)||0,N=(D+O+w+a-(w-a-(f?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((L,E,F)=>{var nt,ut;const q=it(F[E]),z=q.attr("transform");let et=0;if(z){const $t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);$t&&(et=parseFloat($t[2]))}let st=et+w+a-(f?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(q.attr("class").includes("methods-group")){const bt=Math.max(W,n/2);k?st=Math.max(N,D+O+bt+w+n*2+a)+n*2:st=D+O+bt+w+n*4+a}l.members.length===0&&l.methods.length===0&&((nt=r.class)!=null&&nt.hideEmptyMembersBox)&&(l.annotations.length>0?st=et-n:st=et),o||(st-=4);let lt=_;(q.attr("class").includes("label-group")||q.attr("class").includes("annotation-group"))&&(lt=-((ut=q.node())==null?void 0:ut.getBBox().width)/2||0,h.selectAll("text").each(function(bt,$t,Jt){window.getComputedStyle(Jt[$t]).textAnchor==="middle"&&(lt=0)})),q.attr("transform",`translate(${lt}, ${st})`)}),l.members.length>0||l.methods.length>0||f){const L=D+O+w+a,E=y.line(R.x,L,R.x+R.width,L+.001,m);h.insert(()=>E).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(f||l.members.length>0||l.methods.length>0){const L=D+O+W+w+n*2+a,E=y.line(R.x,k?Math.max(N,L):L,R.x+R.width,(k?Math.max(N,L):L)+.001,m);h.insert(()=>E).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),B.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!o){const L=RegExp(/color\s*:\s*([^;]*)/),E=L.exec(d);if(E){const F=E[0].replace("color","fill");h.selectAll("tspan").attr("style",F)}else if(u){const F=L.exec(u);if(F){const q=F[0].replace("color","fill");h.selectAll("tspan").attr("style",q)}}}return U(t,B),t.intersect=function(L){return H.rect(t,L)},h}g(cg,"classBox");async function ug(e,t){var R,D;const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t,a=t,n=20,o=20,l="verifyMethod"in t,h=Z(t),{themeVariables:c}=ht(),{borderColorArray:u,requirementEdgeLabelBackground:p}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let f;l?f=await re(d,`<<${s.type}>>`,0,t.labelStyle):f=await re(d,"<<Element>>",0,t.labelStyle);let y=f;const m=await re(d,s.name,y,t.labelStyle+"; font-weight: bold;");if(y+=m+o,l){const O=await re(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,y,t.labelStyle);y+=O;const W=await re(d,`${s.text?`Text: ${s.text}`:""}`,y,t.labelStyle);y+=W;const N=await re(d,`${s.risk?`Risk: ${s.risk}`:""}`,y,t.labelStyle);y+=N,await re(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,y,t.labelStyle)}else{const O=await re(d,`${a.type?`Type: ${a.type}`:""}`,y,t.labelStyle);y+=O,await re(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,y,t.labelStyle)}const C=(((R=d.node())==null?void 0:R.getBBox().width)??200)+n,b=(((D=d.node())==null?void 0:D.getBBox().height)??200)+n,k=-C/2,_=-b/2,w=Y.svg(d),v=j(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=w.rectangle(k,_,C,b,v),B=d.insert(()=>T,":first-child");if(B.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const O=t.colorIndex??0;d.attr("data-color-id",`color-${O%u.length}`)}if(d.selectAll(".label").each((O,W,N)=>{const I=it(N[W]),M=I.attr("transform");let L=0,E=0;if(M){const et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(M);et&&(L=parseFloat(et[1]),E=parseFloat(et[2]))}const F=E-b/2;let q=k+n/2;(W===0||W===1)&&(q=L),I.attr("transform",`translate(${q}, ${F+n})`)}),y>f+m+o){const O=_+f+m+o;let W;if(t.look==="neo"){const M=[[k,O],[k+C,O],[k+C,O+.001],[k,O+.001]];W=w.polygon(M,v)}else W=w.line(k,O,k+C,O,v);d.insert(()=>W).attr("class","divider")}return U(t,B),t.intersect=function(O){return H.rect(t,O)},i&&t.look!=="handDrawn"&&(p||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}g(ug,"requirementBox");async function re(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=ht(),n=a.htmlLabels??!0,o=await be(s,xo(Qe(t)),{width:me(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let l;if(n){const h=o.children[0],c=it(o);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=o.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=o.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(re,"addText");var fw=g(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function dg(e,t,{config:r}){var W,N;const{labelStyles:i,nodeStyles:s}=X(t);t.labelStyle=i||"";const a=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:h}=await Q(e,t,Z(t)),c=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((W=r==null?void 0:r.kanban)!=null&&W.ticketBaseUrl)&&(u=(N=r==null?void 0:r.kanban)==null?void 0:N.ticketBaseUrl.replace("#TICKET#",t.ticket),p=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let f,y;p?{label:f,bbox:y}=await da(p,"ticket"in t&&t.ticket||"",d):{label:f,bbox:y}=await da(o,"ticket"in t&&t.ticket||"",d);const{label:m,bbox:C}=await da(o,"assigned"in t&&t.assigned||"",d);t.width=n;const b=10,k=(t==null?void 0:t.width)||0,_=Math.max(y.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+_,v=-k/2,T=-w/2;h.attr("transform","translate("+(c-k/2)+", "+(-_-l.height/2)+")"),f.attr("transform","translate("+(c-k/2)+", "+(-_+l.height/2)+")"),m.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-_+l.height/2)+")");let B;const{rx:R,ry:D}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const I=Y.svg(o),M=j(t,{}),L=R||D?I.path(Ee(v,T,k,w,R||0),M):I.rectangle(v,T,k,w,M);B=o.insert(()=>L,":first-child"),B.attr("class","basic label-container").attr("style",O||null)}else{B=o.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",s).attr("rx",R??5).attr("ry",D??5).attr("x",v).attr("y",T).attr("width",k).attr("height",w);const I="priority"in t&&t.priority;if(I){const M=o.append("line"),L=v+2,E=T+Math.floor((R??0)/2),F=T+w-Math.floor((R??0)/2);M.attr("x1",L).attr("y1",E).attr("x2",L).attr("y2",F).attr("stroke-width","4").attr("stroke",fw(I))}}return U(t,B),t.height=w,t.intersect=function(I){return H.rect(t,I)},o}g(dg,"kanbanItem");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await Q(e,t,Z(t)),l=a.width+10*n,h=a.height+8*n,c=.15*l,{cssStyles:u}=t,p=a.width+20,d=a.height+20,f=Math.max(l,p),y=Math.max(h,d);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let m;const C=`M0 0
|
|
237
|
+
a${c},${c} 1 0,0 ${f*.25},${-1*y*.1}
|
|
238
|
+
a${c},${c} 1 0,0 ${f*.25},0
|
|
239
|
+
a${c},${c} 1 0,0 ${f*.25},0
|
|
240
|
+
a${c},${c} 1 0,0 ${f*.25},${y*.1}
|
|
241
|
+
|
|
242
|
+
a${c},${c} 1 0,0 ${f*.15},${y*.33}
|
|
243
|
+
a${c*.8},${c*.8} 1 0,0 0,${y*.34}
|
|
244
|
+
a${c},${c} 1 0,0 ${-1*f*.15},${y*.33}
|
|
245
|
+
|
|
246
|
+
a${c},${c} 1 0,0 ${-1*f*.25},${y*.15}
|
|
247
|
+
a${c},${c} 1 0,0 ${-1*f*.25},0
|
|
248
|
+
a${c},${c} 1 0,0 ${-1*f*.25},0
|
|
249
|
+
a${c},${c} 1 0,0 ${-1*f*.25},${-1*y*.15}
|
|
250
|
+
|
|
251
|
+
a${c},${c} 1 0,0 ${-1*f*.1},${-1*y*.33}
|
|
252
|
+
a${c*.8},${c*.8} 1 0,0 0,${-1*y*.34}
|
|
253
|
+
a${c},${c} 1 0,0 ${f*.1},${-1*y*.33}
|
|
254
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=Y.svg(s),k=j(t,{}),_=b.path(C,k);m=s.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",St(u))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return m.attr("transform",`translate(${-f/2}, ${-y/2})`),U(t,m),t.calcIntersect=function(b,k){return H.rect(b,k)},t.intersect=function(b){return P.info("Bang intersect",t,b),H.rect(t,b)},s}g(pg,"bang");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await Q(e,t,Z(t)),l=a.width+2*n,h=a.height+2*n,c=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:f}=t;let y;const m=`M0 0
|
|
255
|
+
a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
|
|
256
|
+
a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
|
|
257
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
258
|
+
|
|
259
|
+
a${c},${c} 1 0,1 ${l*.15},${h*.35}
|
|
260
|
+
a${d},${d} 1 0,1 ${-1*l*.15},${h*.65}
|
|
261
|
+
|
|
262
|
+
a${u},${c} 1 0,1 ${-1*l*.25},${l*.15}
|
|
263
|
+
a${p},${p} 1 0,1 ${-1*l*.5},0
|
|
264
|
+
a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
265
|
+
|
|
266
|
+
a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
|
|
267
|
+
a${d},${d} 1 0,1 ${l*.1},${-1*h*.65}
|
|
268
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=Y.svg(s),b=j(t,{}),k=C.path(m,b);y=s.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",St(f))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-l/2}, ${-h/2})`),U(t,y),t.calcIntersect=function(C,b){return H.rect(C,b)},t.intersect=function(C){return P.info("Cloud intersect",t,C),H.rect(t,C)},s}g(gg,"cloud");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await Q(e,t,Z(t)),l=a.width+8*n,h=a.height+2*n,c=5,u=t.look==="neo"?`
|
|
269
|
+
M${-l/2} ${h/2-c}
|
|
270
|
+
v${-h+2*c}
|
|
271
|
+
q0,-${c} ${c},-${c}
|
|
272
|
+
h${l-2*c}
|
|
273
|
+
q${c},0 ${c},${c}
|
|
274
|
+
v${h-c}
|
|
275
|
+
H${-l/2}
|
|
276
|
+
Z
|
|
277
|
+
`:`
|
|
278
|
+
M${-l/2} ${h/2-c}
|
|
279
|
+
v${-h+2*c}
|
|
280
|
+
q0,-${c} ${c},-${c}
|
|
281
|
+
h${l-2*c}
|
|
282
|
+
q${c},0 ${c},${c}
|
|
283
|
+
v${h-2*c}
|
|
284
|
+
q0,${c} ${-c},${c}
|
|
285
|
+
h${-(l-2*c)}
|
|
286
|
+
q${-c},0 ${-c},${-c}
|
|
287
|
+
Z
|
|
288
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>o.node()),U(t,p),t.calcIntersect=function(d,f){return H.rect(d,f)},t.intersect=function(d){return H.rect(t,d)},s}g(fg,"defaultMindmapNode");async function yg(e,t){const r={padding:t.padding??0};return cn(e,t,r)}g(yg,"mindmapCircle");var yw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Up},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Yp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Gp},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Kp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:mp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:cn},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:pg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:gg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:zp},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:_p},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Op},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ep},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ig},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Ap},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:xp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:eg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:hp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:jp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Qp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Zp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Tp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Sp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:pp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:gp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:fp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ip},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:og},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:wp},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:rg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Dp},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:yp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Cp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ag},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:lg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:bp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:sg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:kp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Xp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:qp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Rp},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:lp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:dp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Jp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ng},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Wp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Pp}],mw=g(()=>{const t=[...Object.entries({state:Vp,choice:cp,note:Np,rectWithTitle:Hp,labelRect:$p,iconSquare:Fp,iconCircle:Bp,icon:vp,iconRounded:Lp,imageSquare:Mp,anchor:op,kanbanItem:dg,mindmapCircle:yg,defaultMindmapNode:fg,classBox:cg,erBox:un,requirementBox:ug}),...yw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),mg=mw();function Cw(e){return e in mg}g(Cw,"isValidShape");var Qs=new Map;async function Cg(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?mg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;r.config.securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",St(t.look)),t.tooltip&&s.attr("title",t.tooltip),Qs.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(Cg,"insertNode");var qB=g((e,t)=>{Qs.set(t.id,e)},"setNodeElem"),NB=g(()=>{Qs.clear()},"clear"),zB=g(e=>{const t=Qs.get(e.id);P.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),xw=g((e,t,r,i,s,a=!1,n)=>{t.arrowTypeStart&&ql(e,"start",t.arrowTypeStart,r,i,s,a,n),t.arrowTypeEnd&&ql(e,"end",t.arrowTypeEnd,r,i,s,a,n)},"addEdgeMarkers"),bw={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},kw=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],ql=g((e,t,r,i,s,a,n=!1,o)=>{var f;const l=bw[r],h=l&&kw.includes(l.type);if(!l){P.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${s}_${a}-${c}${t==="start"?"Start":"End"}${n&&h?"-margin":""}`;if(o&&o.trim()!==""){const y=o.replace(/[^\dA-Za-z]/g,"_"),m=`${d}_${y}`;if(!document.getElementById(m)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=m,b.querySelectorAll("path, circle, line").forEach(_=>{_.setAttribute("stroke",o),l.fill&&_.setAttribute("fill",o)}),(f=C.parentNode)==null||f.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),Tw=g(e=>{var t,r;return typeof e=="string"?e:(r=(t=ht())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Fs=new Map,Bt=new Map,WB=g(()=>{Fs.clear(),Bt.clear()},"clear"),Yr=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),ww=g(async(e,t)=>{const r=ht();let i=It(r);const{labelStyles:s}=X(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",h=await be(e,t.label,{style:Yr(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);n.node().appendChild(h),P.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],f=it(h);c=d.getBoundingClientRect(),u=c,f.attr("width",c.width),f.attr("height",c.height)}else{const d=it(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}n.attr("transform",Rr(u,i)),Fs.set(t.id,a),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),f=d.insert("g").attr("class","inner"),y=await Se(f,t.startLabelLeft,Yr(t.labelStyle)||"",!1,!1);p=y;let m=y.getBBox();if(i){const C=y.children[0],b=it(y);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}f.attr("transform",Rr(m,i)),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).startLeft=d,Kr(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),f=d.insert("g").attr("class","inner"),y=await Se(f,t.startLabelRight,Yr(t.labelStyle)||"",!1,!1);p=y,f.node().appendChild(y);let m=y.getBBox();if(i){const C=y.children[0],b=it(y);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}f.attr("transform",Rr(m,i)),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).startRight=d,Kr(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),f=d.insert("g").attr("class","inner"),y=await Se(f,t.endLabelLeft,Yr(t.labelStyle)||"",!1,!1);p=y;let m=y.getBBox();if(i){const C=y.children[0],b=it(y);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}f.attr("transform",Rr(m,i)),d.node().appendChild(y),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).endLeft=d,Kr(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),f=d.insert("g").attr("class","inner"),y=await Se(f,t.endLabelRight,Yr(t.labelStyle)||"",!1,!1);p=y;let m=y.getBBox();if(i){const C=y.children[0],b=it(y);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}f.attr("transform",Rr(m,i)),d.node().appendChild(y),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).endRight=d,Kr(p,t.endLabelRight)}return h},"insertEdgeLabel");function Kr(e,t){It(ht())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(Kr,"setTerminalWidth");var _w=g((e,t)=>{P.debug("Moving label abc88 ",e.id,e.label,Fs.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ht(),{subGraphTitleTotalMargin:s}=Zo(i);if(e.label){const a=Fs.get(e.id);let n=e.x,o=e.y;if(r){const l=Gt.calcLabelPosition(r);P.debug("Moving label "+e.label+" from (",n,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(n=l.x,o=l.y)}a.attr("transform",`translate(${n}, ${o+s/2})`)}if(e.startLabelLeft){const a=Bt.get(e.id).startLeft;let n=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.startLabelRight){const a=Bt.get(e.id).startRight;let n=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelLeft){const a=Bt.get(e.id).endLeft;let n=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelRight){const a=Bt.get(e.id).endRight;let n=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}},"positionEdgeLabel"),Sw=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),n=e.width/2,o=e.height/2;return s>=n||a>=o},"outsideNode"),vw=g((e,t,r)=>{P.debug(`intersection calc abc89:
|
|
289
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
290
|
+
insidePoint : ${JSON.stringify(r)}
|
|
291
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),n=e.width/2;let o=r.x<t.x?n-a:n+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*n>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;o=c*u/h;const p={x:r.x<t.x?r.x+o:r.x-c+o,y:r.y<t.y?r.y+h-u:r.y-h+u};return o===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),h===0&&(p.y=t.y),P.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${o}`,p),p}else{r.x<t.x?o=t.x-n-i:o=i-n-t.x;let u=h*o/c,p=r.x<t.x?r.x+c-o:r.x-c+o,d=r.y<t.y?r.y+u:r.y-u;return P.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${o}`,{_x:p,_y:d}),o===0&&(p=t.x,d=t.y),c===0&&(p=t.x),h===0&&(d=t.y),{x:p,y:d}}},"intersection"),Nl=g((e,t)=>{P.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(P.info("abc88 checking point",a,t),!Sw(t,a)&&!s){const n=vw(t,i,a);P.debug("abc88 inside",a,i,n),P.debug("abc88 intersection",n,t);let o=!1;r.forEach(l=>{o=o||l.x===n.x&&l.y===n.y}),r.some(l=>l.x===n.x&&l.y===n.y)?P.warn("abc88 no intersect",n,r):r.push(n),s=!0}else P.warn("abc88 outside",a,i),i=a,s||r.push(a)}),P.debug("returning points",r),r},"cutPathAtIntersect");function xg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],n=e[i+1];(s.x===a.x&&a.y===n.y&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===n.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(xg,"extractCornerPoints");var zl=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),n=r/a;return{x:t.x-n*i,y:t.y-n*s}},"findAdjacentPoint"),Bw=g(function(e){const{cornerPointPositions:t}=xg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],n=e[i],o=zl(s,n,5),l=zl(a,n,5),h=l.x-o.x,c=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let p={x:n.x,y:n.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){P.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;n.x===o.x?p={x:h<0?o.x-d+u:o.x+d-u,y:c<0?o.y-u:o.y+u}:p={x:h<0?o.x-u:o.x+u,y:c<0?o.y-d+u:o.y+d-u}}else P.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),Lw=g((e,t,r)=>{const i=e-t-r,s=2,a=2,n=s+a,o=Math.floor(i/n),l=Array(o).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Fw=g(function(e,t,r,i,s,a,n,o=!1){var E;if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=ht();let h=t.points,c=!1;const u=s;var p=a;const d=[];for(const F in t.cssCompiledStyles)Cd(F)||d.push(t.cssCompiledStyles[F]);P.debug("UIO intersect check",t.points,p.x,u.x),p.intersect&&u.intersect&&!o&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),P.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const f=btoa(JSON.stringify(h));t.toCluster&&(P.info("to cluster abc88",r.get(t.toCluster)),h=Nl(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(P.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Nl(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let y=h.filter(F=>!Number.isNaN(F.y));const m=Tw(t.curve);m!=="rounded"&&(y=Bw(y));let C=ri;switch(m){case"linear":C=ri;break;case"basis":C=Fa;break;case"cardinal":C=Kh;break;case"bumpX":C=Uh;break;case"bumpY":C=Gh;break;case"catmullRom":C=tc;break;case"monotoneX":C=oc;break;case"monotoneY":C=nc;break;case"natural":C=hc;break;case"step":C=cc;break;case"stepAfter":C=dc;break;case"stepBefore":C=uc;break;case"rounded":C=ri;break;default:C=Fa}const{x:b,y:k}=wb(t),_=ox().x(b).y(k).curve(C);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let v,T=m==="rounded"?bg(kg(y,t),5):_(y);const B=Array.isArray(t.style)?t.style:[t.style];let R=B.find(F=>F==null?void 0:F.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let O=!1;if(t.look==="handDrawn"){const F=Y.svg(e);Object.assign([],y);const q=F.path(T,{roughness:.3,seed:l});w+=" transition",v=it(q).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",B?B.reduce((et,st)=>et+";"+st,""):"");let z=v.attr("d");v.attr("d",z),e.node().appendChild(v.node())}else{const F=d.join(";"),q=B?B.reduce((ut,bt)=>ut+bt+";",""):"",z=(F?F+";"+q+";":q)+";"+(B?B.reduce((ut,bt)=>ut+";"+bt,""):"");v=e.append("path").attr("d",T).attr("id",`${n}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",z),R=(E=z.match(/stroke:([^;]+)/))==null?void 0:E[1],O=t.animate===!0||!!t.animation||F.includes("animation");const et=v.node(),st=typeof et.getTotalLength=="function"?et.getTotalLength():0,lt=jn[t.arrowTypeStart]||0,nt=jn[t.arrowTypeEnd]||0;if(t.look==="neo"&&!O){const bt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Lw(st,lt,nt):`0 ${lt} ${st-lt-nt} ${nt}`}; stroke-dashoffset: 0;`;v.attr("style",bt+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",f),v.attr("data-look",St(t.look)),t.showPoints&&y.forEach(F=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",F.x).attr("cy",F.y)});let W="";(ht().flowchart.arrowMarkerAbsolute||ht().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",t.arrowTypeStart),P.info("arrowTypeEnd",t.arrowTypeEnd);const N=!O&&(t==null?void 0:t.look)==="neo";xw(v,t,W,n,i,N,R);const I=Math.floor(h.length/2),M=h[I];Gt.isLabelCoordinateInPath(M,v.attr("d"))||(c=!0);let L={};return c&&(L.updatedPath=h),L.originalPath=t.points,L},"insertEdge");function bg(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const n=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${n.x},${n.y}`;else if(a===i-1)r+=`L${n.x},${n.y}`;else{const h=n.x-o.x,c=n.y-o.y,u=l.x-n.x,p=l.y-n.y,d=Math.hypot(h,c),f=Math.hypot(u,p);if(d<s||f<s){r+=`L${n.x},${n.y}`;continue}const y=h/d,m=c/d,C=u/f,b=p/f,k=y*C+m*b,_=Math.max(-1,Math.min(1,k)),w=Math.acos(_);if(w<s||Math.abs(Math.PI-w)<s){r+=`L${n.x},${n.y}`;continue}const v=Math.min(t/Math.sin(w/2),d/2,f/2),T=n.x-y*v,B=n.y-m*v,R=n.x+C*v,D=n.y+b*v;r+=`L${T},${B}`,r+=`Q${n.x},${n.y} ${R},${D}`}}return r}g(bg,"generateRoundedPath");function ao(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}g(ao,"calculateDeltaAndAngle");function kg(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Ft[t.arrowTypeStart]){const s=Ft[t.arrowTypeStart],a=e[0],n=e[1],{angle:o}=ao(a,n),l=s*Math.cos(o),h=s*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&Ft[t.arrowTypeEnd]){const s=Ft[t.arrowTypeEnd],a=e[i-1],n=e[i-2],{angle:o}=ao(n,a),l=s*Math.cos(o),h=s*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}g(kg,"applyMarkerOffsetsToPoints");var Mw=g((e,t,r,i)=>{t.forEach(s=>{Jw[s](e,r,i)})},"insertMarkers"),Aw=g((e,t,r)=>{P.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),$w=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ew=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Ow=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Iw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Dw=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Pw=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Rw=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),qw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Nw=g((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),zw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Ww=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Hw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Yw=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),jw=g((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),Xw=g((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");o.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),Uw=g((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),Gw=g((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");o.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),Vw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
292
|
+
L20,10
|
|
293
|
+
M20,10
|
|
294
|
+
L0,20`)},"requirement_arrow"),Zw=g((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
295
|
+
L20,10
|
|
296
|
+
M20,10
|
|
297
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Qw=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Kw=g((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),Jw={extension:Aw,composition:$w,aggregation:Ew,dependency:Ow,lollipop:Iw,point:Dw,circle:Pw,cross:Rw,barb:qw,barbNeo:Nw,only_one:zw,zero_or_one:Ww,one_or_more:Hw,zero_or_more:Yw,only_one_neo:jw,zero_or_one_neo:Xw,one_or_more_neo:Uw,zero_or_more_neo:Gw,requirement_arrow:Vw,requirement_contains:Qw,requirement_arrow_neo:Zw,requirement_contains_neo:Kw},t_=Mw,e_={common:xi,getConfig:mt,insertCluster:KT,insertEdge:Fw,insertEdgeLabel:ww,insertMarkers:t_,insertNode:Cg,interpolateToCurve:Yo,labelHelper:Q,log:P,positionEdgeLabel:_w},mi={},Tg=g(e=>{for(const t of e)mi[t.name]=t},"registerLayoutLoaders"),r_=g(()=>{Tg([{name:"dagre",loader:g(async()=>await ot(()=>import("./dagre-KV5264BT-CwDQ9l6b.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),"loader")},{name:"cose-bilkent",loader:g(async()=>await ot(()=>import("./cose-bilkent-S5V4N54A-ZT0ZeYB-.js"),__vite__mapDeps([10,11,6,7,8,9])),"loader")}])},"registerDefaultLayoutLoaders");r_();var HB=g(async(e,t)=>{if(!(e.layoutAlgorithm in mi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const u=c.domId||c.id;c.domId=`${e.diagramId}-${u}`}const r=mi[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:n,gradientStart:o,gradientStop:l}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),n){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,e_,{algorithm:r.algorithm})},"render"),YB=g((e="",{fallback:t="dagre"}={})=>{if(e in mi)return e;if(t in mi)return P.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),i_=Qu(Object.keys,Object),s_=Object.prototype,a_=s_.hasOwnProperty;function o_(e){if(!Hs(e))return i_(e);var t=[];for(var r in Object(e))a_.call(e,r)&&r!="constructor"&&t.push(r);return t}var oo=rr(he,"DataView"),no=rr(he,"Promise"),lo=rr(he,"Set"),ho=rr(he,"WeakMap"),Wl="[object Map]",n_="[object Object]",Hl="[object Promise]",Yl="[object Set]",jl="[object WeakMap]",Xl="[object DataView]",l_=er(oo),h_=er(fi),c_=er(no),u_=er(lo),d_=er(ho),qe=Er;(oo&&qe(new oo(new ArrayBuffer(1)))!=Xl||fi&&qe(new fi)!=Wl||no&&qe(no.resolve())!=Hl||lo&&qe(new lo)!=Yl||ho&&qe(new ho)!=jl)&&(qe=function(e){var t=Er(e),r=t==n_?e.constructor:void 0,i=r?er(r):"";if(i)switch(i){case l_:return Xl;case h_:return Wl;case c_:return Hl;case u_:return Yl;case d_:return jl}return t});var p_="[object Map]",g_="[object Set]",f_=Object.prototype,y_=f_.hasOwnProperty;function Ul(e){if(e==null)return!0;if(Ys(e)&&(xs(e)||typeof e=="string"||typeof e.splice=="function"||Wo(e)||Ho(e)||Cs(e)))return!e.length;var t=qe(e);if(t==p_||t==g_)return!e.size;if(Hs(e))return!o_(e).length;for(var r in e)if(y_.call(e,r))return!1;return!0}var wg="c4",m_=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),C_=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./c4Diagram-AHTNJAMY-G40SkaxF.js");return{diagram:t}},__vite__mapDeps([12,13,6,7,8,9]));return{id:wg,diagram:e}},"loader"),x_={id:wg,detector:m_,loader:C_},b_=x_,_g="flowchart",k_=g((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),T_=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-DrcBxT9C.js");return{diagram:t}},__vite__mapDeps([14,15,13,16,17,8,6,7,9,18]));return{id:_g,diagram:e}},"loader"),w_={id:_g,detector:k_,loader:T_},__=w_,Sg="flowchart-v2",S_=g((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),v_=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-DrcBxT9C.js");return{diagram:t}},__vite__mapDeps([14,15,13,16,17,8,6,7,9,18]));return{id:Sg,diagram:e}},"loader"),B_={id:Sg,detector:S_,loader:v_},L_=B_,vg="er",F_=g(e=>/^\s*erDiagram/.test(e),"detector"),M_=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./erDiagram-SMLLAGMA-ByJh9pMp.js");return{diagram:t}},__vite__mapDeps([19,16,17,18,6,7,8,9]));return{id:vg,diagram:e}},"loader"),A_={id:vg,detector:F_,loader:M_},$_=A_,Bg="gitGraph",E_=g(e=>/^\s*gitGraph/.test(e),"detector"),O_=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./gitGraphDiagram-UUTBAWPF-DAo6LzCC.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,6,7,4,2,8,9]));return{id:Bg,diagram:e}},"loader"),I_={id:Bg,detector:E_,loader:O_},D_=I_,Lg="gantt",P_=g(e=>/^\s*gantt/.test(e),"detector"),R_=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./ganttDiagram-T4ZO3ILL-mN4NOW1U.js");return{diagram:t}},__vite__mapDeps([24,6,7,25,26,27,8,9]));return{id:Lg,diagram:e}},"loader"),q_={id:Lg,detector:P_,loader:R_},N_=q_,Fg="info",z_=g(e=>/^\s*info/.test(e),"detector"),W_=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./infoDiagram-42DDH7IO-DIpCJx1X.js");return{diagram:t}},__vite__mapDeps([28,23,6,7,4,2,8,9]));return{id:Fg,diagram:e}},"loader"),H_={id:Fg,detector:z_,loader:W_},Mg="pie",Y_=g(e=>/^\s*pie/.test(e),"detector"),j_=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./pieDiagram-DEJITSTG-D5qj26lg.js");return{diagram:t}},__vite__mapDeps([29,21,23,6,7,4,2,30,31,26,8,9]));return{id:Mg,diagram:e}},"loader"),X_={id:Mg,detector:Y_,loader:j_},Ag="quadrantChart",U_=g(e=>/^\s*quadrantChart/.test(e),"detector"),G_=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./quadrantDiagram-34T5L4WZ-BUkrkdNG.js");return{diagram:t}},__vite__mapDeps([32,25,26,27,6,7,8,9]));return{id:Ag,diagram:e}},"loader"),V_={id:Ag,detector:U_,loader:G_},Z_=V_,$g="xychart",Q_=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),K_=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./xychartDiagram-5P7HB3ND-D7oIwksS.js");return{diagram:t}},__vite__mapDeps([33,26,31,25,27,6,7,8,9]));return{id:$g,diagram:e}},"loader"),J_={id:$g,detector:Q_,loader:K_},tS=J_,Eg="requirement",eS=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),rS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./requirementDiagram-MS252O5E-6SO8vXf5.js");return{diagram:t}},__vite__mapDeps([34,16,17,6,7,8,9]));return{id:Eg,diagram:e}},"loader"),iS={id:Eg,detector:eS,loader:rS},sS=iS,Og="sequence",aS=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),oS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./sequenceDiagram-FGHM5R23-DSJN8bds.js");return{diagram:t}},__vite__mapDeps([35,13,22,6,7,8,9]));return{id:Og,diagram:e}},"loader"),nS={id:Og,detector:aS,loader:oS},lS=nS,Ig="class",hS=g((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),cS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./classDiagram-6PBFFD2Q-Qq_hSpx1.js");return{diagram:t}},__vite__mapDeps([36,37,15,13,16,17,8,6,7,9]));return{id:Ig,diagram:e}},"loader"),uS={id:Ig,detector:hS,loader:cS},dS=uS,Dg="classDiagram",pS=g((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),gS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./classDiagram-v2-HSJHXN6E-Qq_hSpx1.js");return{diagram:t}},__vite__mapDeps([38,37,15,13,16,17,8,6,7,9]));return{id:Dg,diagram:e}},"loader"),fS={id:Dg,detector:pS,loader:gS},yS=fS,Pg="state",mS=g((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),CS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./stateDiagram-FHFEXIEX-Cn4Rn5T-.js");return{diagram:t}},__vite__mapDeps([39,40,16,17,1,2,3,4,6,7,8,9]));return{id:Pg,diagram:e}},"loader"),xS={id:Pg,detector:mS,loader:CS},bS=xS,Rg="stateDiagram",kS=g((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),TS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./stateDiagram-v2-QKLJ7IA2-CEMHmyFQ.js");return{diagram:t}},__vite__mapDeps([41,40,16,17,6,7,8,9]));return{id:Rg,diagram:e}},"loader"),wS={id:Rg,detector:kS,loader:TS},_S=wS,qg="journey",SS=g(e=>/^\s*journey/.test(e),"detector"),vS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./journeyDiagram-VCZTEJTY-DTxQPxwN.js");return{diagram:t}},__vite__mapDeps([42,15,13,30,6,7,8,9]));return{id:qg,diagram:e}},"loader"),BS={id:qg,detector:SS,loader:vS},LS=BS,FS=g((e,t,r)=>{P.debug(`rendering svg for syntax error
|
|
298
|
+
`);const i=fx(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),yh(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Ng={draw:FS},MS=Ng,AS={db:{},renderer:Ng,parser:{parse:g(()=>{},"parse")}},$S=AS,zg="flowchart-elk",ES=g((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),OS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-DrcBxT9C.js");return{diagram:t}},__vite__mapDeps([14,15,13,16,17,8,6,7,9,18]));return{id:zg,diagram:e}},"loader"),IS={id:zg,detector:ES,loader:OS},DS=IS,Wg="timeline",PS=g(e=>/^\s*timeline/.test(e),"detector"),RS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./timeline-definition-GMOUNBTQ-v8yp7Wsn.js");return{diagram:t}},__vite__mapDeps([43,30,6,7,8,9]));return{id:Wg,diagram:e}},"loader"),qS={id:Wg,detector:PS,loader:RS},NS=qS,Hg="mindmap",zS=g(e=>/^\s*mindmap/.test(e),"detector"),WS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./mindmap-definition-QFDTVHPH-D5KUUhQn.js");return{diagram:t}},__vite__mapDeps([44,16,17,6,7,8,9]));return{id:Hg,diagram:e}},"loader"),HS={id:Hg,detector:zS,loader:WS},YS=HS,Yg="kanban",jS=g(e=>/^\s*kanban/.test(e),"detector"),XS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./kanban-definition-6JOO6SKY-fryTe3NV.js");return{diagram:t}},__vite__mapDeps([45,15,6,7,8,9]));return{id:Yg,diagram:e}},"loader"),US={id:Yg,detector:jS,loader:XS},GS=US,jg="sankey",VS=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),ZS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./sankeyDiagram-XADWPNL6-Bu3WwTPe.js");return{diagram:t}},__vite__mapDeps([46,31,26,6,7,8,9]));return{id:jg,diagram:e}},"loader"),QS={id:jg,detector:VS,loader:ZS},KS=QS,Xg="packet",JS=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),tv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-TYMM5635-BeezZrTd.js");return{diagram:t}},__vite__mapDeps([47,21,23,6,7,4,2,8,9]));return{id:Xg,diagram:e}},"loader"),ev={id:Xg,detector:JS,loader:tv},Ug="radar",rv=g(e=>/^\s*radar-beta/.test(e),"detector"),iv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-MMDJMWI5-Cftn-Qdy.js");return{diagram:t}},__vite__mapDeps([48,21,23,6,7,4,2,8,9]));return{id:Ug,diagram:e}},"loader"),sv={id:Ug,detector:rv,loader:iv},Gg="block",av=g(e=>/^\s*block(-beta)?/.test(e),"detector"),ov=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./blockDiagram-DXYQGD6D-Dy3byd3t.js");return{diagram:t}},__vite__mapDeps([49,15,5,1,2,18,6,7,8,9]));return{id:Gg,diagram:e}},"loader"),nv={id:Gg,detector:av,loader:ov},lv=nv,Vg="treeView",hv=g(e=>/^\s*treeView-beta/.test(e),"detector"),cv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-5BDNPKRD-CSCXklZU.js");return{diagram:t}},__vite__mapDeps([50,21,22,23,6,7,4,2,8,9]));return{id:Vg,diagram:e}},"loader"),uv={id:Vg,detector:hv,loader:cv},dv=uv,Zg="architecture",pv=g(e=>/^\s*architecture/.test(e),"detector"),gv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./architectureDiagram-Q4EWVU46-DZn-XLQV.js");return{diagram:t}},__vite__mapDeps([51,21,23,6,7,4,2,11,8,9]));return{id:Zg,diagram:e}},"loader"),fv={id:Zg,detector:pv,loader:gv},yv=fv,Qg="ishikawa",mv=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Cv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./ishikawaDiagram-UXIWVN3A-DZbNsvGT.js");return{diagram:t}},__vite__mapDeps([52,6,7,8,9]));return{id:Qg,diagram:e}},"loader"),xv={id:Qg,detector:mv,loader:Cv},Kg="venn",bv=g(e=>/^\s*venn-beta/.test(e),"detector"),kv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./vennDiagram-DHZGUBPP-CRF3cJL1.js");return{diagram:t}},__vite__mapDeps([53,6,7,8,9]));return{id:Kg,diagram:e}},"loader"),Tv={id:Kg,detector:bv,loader:kv},wv=Tv,Jg="treemap",_v=g(e=>/^\s*treemap/.test(e),"detector"),Sv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-G4DWMVQ6-CjjGYG0E.js");return{diagram:t}},__vite__mapDeps([54,17,21,23,6,7,4,2,27,31,26,8,9]));return{id:Jg,diagram:e}},"loader"),vv={id:Jg,detector:_v,loader:Sv},tf="wardley-beta",Bv=g(e=>/^\s*wardley-beta/i.test(e),"detector"),Lv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./wardleyDiagram-NUSXRM2D-Dsk2SPYg.js");return{diagram:t}},__vite__mapDeps([55,21,23,6,7,4,2,8,9]));return{id:tf,diagram:e}},"loader"),Fv={id:tf,detector:Bv,loader:Lv},Mv=Fv,Gl=!1,Ks=g(()=>{Gl||(Gl=!0,ts("error",$S,e=>e.toLowerCase().trim()==="error"),ts("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),fa(DS,YS,yv),fa(b_,GS,yS,dS,$_,N_,H_,X_,sS,lS,L_,__,NS,D_,_S,bS,LS,Z_,KS,ev,tS,lv,dv,sv,xv,vv,wv,Mv))},"addDiagrams"),Av=g(async()=>{P.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Xe).map(async([r,{detector:i,loader:s}])=>{if(s)try{xa(r)}catch{try{const{diagram:a,id:n}=await s();ts(n,a,i)}catch(a){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Xe[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(const r of t)P.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),$v="graphics-document document";function ef(e,t){e.attr("role",$v),t!==""&&e.attr("aria-roledescription",t)}g(ef,"setA11yDiagramInfo");function rf(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(rf,"addSVGa11yTitleDescription");var je,co=(je=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var h,c;const i=mt(),s=go(t,i);t=C2(t)+`
|
|
299
|
+
`;try{xa(s)}catch{const u=Of(s);if(!u)throw new rh(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();ts(p,d)}const{db:a,parser:n,renderer:o,init:l}=xa(s);return n.parser&&(n.parser.yy=a),(h=a.clear)==null||h.call(a),l==null||l(i),r.title&&((c=a.setDiagramTitle)==null||c.call(a,r.title)),await n.parse(t),new je(s,t,a,n,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(je,"Diagram"),je),Vl=[],Ev=g(()=>{Vl.forEach(e=>{e()}),Vl=[]},"attachFunctions"),Ov=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function sf(e){const t=e.match(eh);if(!t)return{text:e,metadata:{}};let r=Tb(t[1],{schema:kb})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}g(sf,"extractFrontMatter");var Iv=g(e=>e.replace(/\r\n?/g,`
|
|
300
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Dv=g(e=>{const{text:t,metadata:r}=sf(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),Pv=g(e=>{const t=Gt.detectInit(e)??{},r=Gt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:a2(e),directive:t}},"processDirectives");function dn(e){const t=Iv(e),r=Dv(t),i=Pv(r.text),s=Vo(r.config,i.directive);return e=Ov(i.text),{code:e,title:r.title,config:s}}g(dn,"preprocessDiagram");function af(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(af,"toBase64");var Rv=5e4,qv="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Nv="sandbox",zv="loose",Wv="http://www.w3.org/2000/svg",Hv="http://www.w3.org/1999/xlink",Yv="http://www.w3.org/1999/xhtml",jv="100%",Xv="100%",Uv="border:0;margin:0;",Gv="margin:0",Vv="allow-top-navigation-by-user-activation allow-popups",Zv='The "iframe" tag is not supported by your browser.',Qv=["foreignobject"],Kv=["dominant-baseline"];function pn(e){const t=dn(e);return Ki(),l0(t.config??{}),t}g(pn,"processAndSetConfigs");async function of(e,t){Ks();try{const{code:r,config:i}=pn(e);return{diagramType:(await lf(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}g(of,"parse");var Zl=g((e,t,r=[])=>`
|
|
301
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Jv=g((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
302
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
303
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
304
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const n=It(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{Ul(o.styles)||n.forEach(l=>{r+=Zl(o.id,l,o.styles)}),Ul(o.textStyles)||(r+=Zl(o.id,"tspan",((o==null?void 0:o.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),tB=g((e,t,r,i)=>{const s=Jv(e,r),a=B0(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return Cf(bf(`${i}{${a}}`),xf)},"createUserStyles"),eB=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Qe(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),rB=g((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":Xv,i=af(`<body style="${Gv}">${e}</body>`);return`<iframe style="width:${jv};height:${r};${Uv}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${Vv}">
|
|
305
|
+
${Zv}
|
|
306
|
+
</iframe>`},"putIntoIFrame"),Ql=g((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const n=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Wv);return s&&n.attr("xmlns:xlink",s),n.append("g"),e},"appendDivSvgG");function uo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(uo,"sandboxedIframe");var iB=g((e,t,r,i)=>{var s,a,n;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(n=e.getElementById(i))==null||n.remove()},"removeExistingElements"),sB=g(async function(e,t,r){var W,N,I,M,L,E;Ks();const i=pn(t);t=i.code;const s=mt();P.debug(s),t.length>((s==null?void 0:s.maxTextSize)??Rv)&&(t=qv);const a="#"+e,n="i"+e,o="#"+n,l="d"+e,h="#"+l,c=g(()=>{const q=it(p?o:h).node();q&&"remove"in q&&q.remove()},"removeTempElements");let u=it("body");const p=s.securityLevel===Nv,d=s.securityLevel===zv,f=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const F=uo(it(r),n);u=it(F.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=it(r);Ql(u,e,l,`font-family: ${f}`,Hv)}else{if(iB(document,e,l,n),p){const F=uo(it("body"),n);u=it(F.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=it("body");Ql(u,e,l)}let y,m;try{y=await co.fromText(t,{title:i.title})}catch(F){if(s.suppressErrorRendering)throw c(),F;y=await co.fromText("error"),m=F}const C=u.select(h).node(),b=y.type,k=C.firstChild,_=k.firstChild,w=(N=(W=y.renderer).getClasses)==null?void 0:N.call(W,t,y),v=tB(s,b,w,a),T=document.createElement("style");T.innerHTML=v,k.insertBefore(T,_);try{await y.renderer.draw(t,e,"11.14.0",y)}catch(F){throw s.suppressErrorRendering?c():MS.draw(t,e,"11.14.0"),F}const B=u.select(`${h} svg`),R=(M=(I=y.db).getAccTitle)==null?void 0:M.call(I),D=(E=(L=y.db).getAccDescription)==null?void 0:E.call(L);hf(b,B,R,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Yv);let O=u.select(h).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),O=eB(O,p,Ce(s.arrowMarkerAbsolute)),p){const F=u.select(h+" svg").node();O=rB(O,F)}else d||(O=Br.sanitize(O,{ADD_TAGS:Qv,ADD_ATTR:Kv,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Ev(),m)throw m;return c(),{diagramType:b,svg:O,bindFunctions:y.db.bindFunctions}},"render");function nf(e={}){var i;const t=Tt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),o0(t),t!=null&&t.theme&&t.theme in ge?t.themeVariables=ge[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ge.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?a0(t):nh();po(r.logLevel),Ks()}g(nf,"initialize");var lf=g((e,t={})=>{const{code:r}=dn(e);return co.fromText(r,t)},"getDiagramFromText");function hf(e,t,r,i){ef(t,e),rf(t,r,i,t.attr("id"))}g(hf,"addA11yInfo");var Je=Object.freeze({render:sB,parse:of,getDiagramFromText:lf,initialize:nf,getConfig:mt,setConfig:lh,getSiteConfig:nh,updateSiteConfig:n0,reset:g(()=>{Ki()},"reset"),globalReset:g(()=>{Ki(Lr)},"globalReset"),defaultConfig:Lr});po(mt().logLevel);Ki(mt());var aB=g((e,t,r)=>{P.warn(e),Go(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),cf=g(async function(e={querySelector:".mermaid"}){try{await oB(e)}catch(t){if(Go(t)&&P.error(t.str),Wt.parseError&&Wt.parseError(t),!e.suppressErrors)throw P.error("Use the suppressErrors option to suppress these errors"),t}},"run"),oB=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Je.getConfig();P.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");P.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(P.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Je.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Gt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const o=[];for(const l of Array.from(s)){if(P.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;n=l.innerHTML,n=Ad(Gt.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=Gt.detectInit(n);c&&P.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await gf(h,n,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){aB(u,o,Wt.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),uf=g(function(e){Je.initialize(e)},"initialize"),nB=g(async function(e,t,r){P.warn("mermaid.init is deprecated. Please use run instead."),e&&uf(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await cf(i)},"init"),lB=g(async(e,{lazyLoad:t=!0}={})=>{Ks(),fa(...e),t===!1&&await Av()},"registerExternalDiagrams"),df=g(function(){if(Wt.startOnLoad){const{startOnLoad:e}=Je.getConfig();e&&Wt.run().catch(t=>P.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",df,!1);var hB=g(function(e){Wt.parseError=e},"setParseErrorHandler"),Ms=[],ga=!1,pf=g(async()=>{if(!ga){for(ga=!0;Ms.length>0;){const e=Ms.shift();if(e)try{await e()}catch(t){P.error("Error executing queue",t)}}ga=!1}},"executeQueue"),cB=g(async(e,t)=>new Promise((r,i)=>{const s=g(()=>new Promise((a,n)=>{Je.parse(e,t).then(o=>{a(o),r(o)},o=>{var l;P.error("Error parsing",o),(l=Wt.parseError)==null||l.call(Wt,o),n(o),i(o)})}),"performCall");Ms.push(s),pf().catch(i)}),"parse"),gf=g((e,t,r)=>new Promise((i,s)=>{const a=g(()=>new Promise((n,o)=>{Je.render(e,t,r).then(l=>{n(l),i(l)},l=>{var h;P.error("Error parsing",l),(h=Wt.parseError)==null||h.call(Wt,l),o(l),s(l)})}),"performCall");Ms.push(a),pf().catch(s)}),"render"),uB=g(()=>Object.keys(Xe).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Wt={startOnLoad:!0,mermaidAPI:Je,parse:cB,render:gf,init:nB,run:cf,registerExternalDiagrams:lB,registerLayoutLoaders:Tg,initialize:uf,parseError:void 0,contentLoaded:df,setParseErrorHandler:hB,detectType:go,registerIconPacks:ST,getRegisteredDiagramsMetadata:uB},dB=Wt;/*! Check if previously processed *//*!
|
|
307
|
+
* Wait for document loaded before starting the execution
|
|
308
|
+
*/const jB=Object.freeze(Object.defineProperty({__proto__:null,default:dB},Symbol.toStringTag,{value:"Module"}));export{rx as $,ve as A,Sf as B,mt as C,D0 as D,Vo as E,oh as F,c2 as G,fx as H,Nf as I,kb as J,ai as K,CB as L,js as M,y0 as N,fh as O,Cn as P,ox as Q,Fa as R,h2 as S,Ci as T,Qt as U,$ as V,A as W,_0 as X,mh as Y,e2 as Z,g as _,M0 as a,I1 as a$,Bo as a0,_B as a1,BB as a2,sr as a3,Rn as a4,Pn as a5,FB as a6,LB as a7,vB as a8,TB as a9,ww as aA,BT as aB,th as aC,ix as aD,mB as aE,Ys as aF,xs as aG,nd as aH,vi as aI,ST as aJ,_T as aK,wo as aL,_e as aM,li as aN,An as aO,Dm as aP,Fk as aQ,ad as aR,Ku as aS,E1 as aT,ys as aU,O1 as aV,_i as aW,qe as aX,_k as aY,sl as aZ,tr as a_,wB as aa,SB as ab,AB as ac,MB as ad,KT as ae,Cg as af,zB as ag,wb as ah,It as ai,be as aj,Rr as ak,Zo as al,pd as am,Qe as an,md as ao,tt as ap,se as aq,Y as ar,t_ as as,NB as at,WB as au,RB as av,U as aw,qB as ax,Fw as ay,_w as az,F0 as b,Wo as b0,$1 as b1,R1 as b2,Or as b3,Lk as b4,Qk as b5,H1 as b6,Yk as b7,No as b8,Ul as b9,zo as bA,t2 as bB,jB as bC,X as ba,Cd as bb,qt as bc,Fm as bd,To as be,Ah as bf,ki as bg,Oh as bh,kB as bi,_f as bj,Er as bk,Ik as bl,o_ as bm,wi as bn,Cs as bo,$e as bp,Ns as bq,Jn as br,Ho as bs,td as bt,sd as bu,M1 as bv,lo as bw,Zk as bx,Hk as by,Kk as bz,ht as c,it as d,yh as e,Tt as f,$0 as g,me as h,Zt as i,vb as j,xi as k,P as l,fd as m,xB as n,YB as o,E0 as p,O0 as q,HB as r,A0 as s,Tb as t,Gt as u,Cw as v,p2 as w,$B as x,L0 as y,bB as z};
|