orbitchat 3.7.1 → 3.7.2
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/ChartRenderer-D0AWpQRu.js +78 -0
- package/dist/assets/MermaidRenderer-BbPt4jtD.js +313 -0
- package/dist/assets/MusicRenderer-Brav4mm2.js +18 -0
- package/dist/assets/SVGRenderer-Ct8XMIcE.js +6 -0
- package/dist/assets/_baseUniq-mJPwzBOI.js +1 -0
- package/dist/assets/architectureDiagram-Q4EWVU46-CZuqFwTR.js +36 -0
- package/dist/assets/{blockDiagram-WCTKOSBZ-OMFbT-zL.js → blockDiagram-DXYQGD6D-DaC_VKzI.js} +6 -6
- package/dist/assets/c4Diagram-AHTNJAMY-CJePgNba.js +10 -0
- package/dist/assets/channel-CX3imDlU.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-Buu8ixXv.js → chunk-4BX2VUAB-LD_Hd6_z.js} +1 -1
- package/dist/assets/chunk-4TB4RGXK-BGO2PowE.js +206 -0
- package/dist/assets/{chunk-55IACEB6-DbeU332v.js → chunk-55IACEB6-0YS5Dbzd.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-B5ikf2wh.js → chunk-EDXVE4YY-BaUXHlqA.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-BAD8J6zQ.js → chunk-FMBD7UC4-CXSeyusx.js} +1 -1
- package/dist/assets/chunk-OYMX7WX6-BJqKAaXp.js +231 -0
- package/dist/assets/{chunk-QZHKN3VN-BxbbMXal.js → chunk-QZHKN3VN-3-SvIa7S.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-CaklpesZ.js → chunk-YZCP3GAM-Cm0anOcW.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-o2YNBl67.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-o2YNBl67.js +1 -0
- package/dist/assets/clone-EE9raDlI.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DawRCVCV.js → cose-bilkent-S5V4N54A-4fUnkROm.js} +1 -1
- package/dist/assets/{cytoscape.esm-CyJtwmzi.js → cytoscape.esm-BiciSPf8.js} +4 -4
- package/dist/assets/dagre-KV5264BT-DUWGBIgm.js +4 -0
- package/dist/assets/diagram-5BDNPKRD-C9_Rqs6o.js +10 -0
- package/dist/assets/diagram-G4DWMVQ6-DJgL3XtB.js +24 -0
- package/dist/assets/diagram-MMDJMWI5-DJyz-Y76.js +43 -0
- package/dist/assets/diagram-TYMM5635-DRXfDOY1.js +24 -0
- package/dist/assets/erDiagram-SMLLAGMA-ltzBzX-J.js +85 -0
- package/dist/assets/flowDiagram-DWJPFMVM-CuSvL41f.js +162 -0
- package/dist/assets/ganttDiagram-T4ZO3ILL-D695mEJV.js +292 -0
- package/dist/assets/gitGraphDiagram-UUTBAWPF-BaBzMGpC.js +106 -0
- package/dist/assets/graph-CXZA4XaC.js +1 -0
- package/dist/assets/{index-Bb88CEAr.js → index-B8QgKg2_.js} +40 -40
- package/dist/assets/index-BO4rLId3.css +1 -0
- package/dist/assets/index-C1TQE8f6.js +615 -0
- package/dist/assets/infoDiagram-42DDH7IO-C554WkLo.js +2 -0
- package/dist/assets/{ishikawaDiagram-PHBUUO56-Du0o-6Uv.js → ishikawaDiagram-UXIWVN3A-D1ixBTTi.js} +2 -2
- package/dist/assets/journeyDiagram-VCZTEJTY-Rk6UiBUm.js +139 -0
- package/dist/assets/{kanban-definition-K7BYSVSG-CAXJ4k6J.js → kanban-definition-6JOO6SKY-BLc8Saxe.js} +6 -6
- package/dist/assets/layout-a0Clawsj.js +1 -0
- package/dist/assets/min-B5vChzpW.js +1 -0
- package/dist/assets/mindmap-definition-QFDTVHPH-CGYrptTT.js +96 -0
- package/dist/assets/pieDiagram-DEJITSTG-DwV0tEAW.js +30 -0
- package/dist/assets/purify.es-BlZidd4c.js +2 -0
- package/dist/assets/{quadrantDiagram-337W2JSQ-DesNYo4P.js → quadrantDiagram-34T5L4WZ-DvHIwgsa.js} +1 -1
- package/dist/assets/requirementDiagram-MS252O5E-DgSgWjaP.js +84 -0
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-BKfpwmcQ.js → sankeyDiagram-XADWPNL6-k3HRQmAt.js} +1 -1
- package/dist/assets/sequenceDiagram-FGHM5R23-BLd2_BAi.js +157 -0
- package/dist/assets/stateDiagram-FHFEXIEX-DDDK8elV.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-Dts2YAxm.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-Dj2EEEZe.js +120 -0
- package/dist/assets/{vennDiagram-LZ73GAT5-BU7WoILH.js → vennDiagram-DHZGUBPP-C8NSdF_G.js} +5 -5
- package/dist/assets/wardley-RL74JXVD-BQtHLuaO.js +162 -0
- package/dist/assets/wardleyDiagram-NUSXRM2D-Dt3gXCVo.js +20 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-BKUiyZNZ.js +7 -0
- package/dist/index.html +2 -2
- package/dist/sitemap.xml +8 -20
- package/package.json +2 -2
- package/dist/assets/ChartRenderer-SjxcbqcB.js +0 -78
- package/dist/assets/MermaidRenderer-CJ6oqOaF.js +0 -259
- package/dist/assets/MusicRenderer-CGcrvGbN.js +0 -18
- package/dist/assets/SVGRenderer-DMO1XuDI.js +0 -6
- package/dist/assets/_basePickBy-D6kOdKxs.js +0 -1
- package/dist/assets/_baseUniq-DJdp6dOC.js +0 -1
- package/dist/assets/architectureDiagram-2XIMDMQ5-DqNjzGsn.js +0 -36
- package/dist/assets/c4Diagram-IC4MRINW-B9v6F-c_.js +0 -10
- package/dist/assets/channel-DwUfMnky.js +0 -1
- package/dist/assets/chunk-NQ4KR5QH-BcbMd4mm.js +0 -220
- package/dist/assets/chunk-WL4C6EOR-DElQSHwB.js +0 -189
- package/dist/assets/classDiagram-VBA2DB6C-C_Apy6at.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-C_Apy6at.js +0 -1
- package/dist/assets/clone-CEphPa77.js +0 -1
- package/dist/assets/dagre-KLK3FWXG-BmMlFeE2.js +0 -4
- package/dist/assets/diagram-E7M64L7V-Cs74MQEF.js +0 -24
- package/dist/assets/diagram-IFDJBPK2-9QV5ymek.js +0 -43
- package/dist/assets/diagram-P4PSJMXO-BL2tj5xx.js +0 -24
- package/dist/assets/erDiagram-INFDFZHY-BQv7meJG.js +0 -70
- package/dist/assets/flowDiagram-PKNHOUZH-DCqIcqOS.js +0 -162
- package/dist/assets/ganttDiagram-A5KZAMGK-CncKmf1H.js +0 -292
- package/dist/assets/gitGraphDiagram-K3NZZRJ6-BiNgBgUL.js +0 -65
- package/dist/assets/graph-DPr6Bckz.js +0 -1
- package/dist/assets/index-I5aUUwG5.js +0 -618
- package/dist/assets/index-Iwp3pMca.css +0 -1
- package/dist/assets/infoDiagram-LFFYTUFH-BFYuft6E.js +0 -2
- package/dist/assets/journeyDiagram-4ABVD52K-Bn0-BkAI.js +0 -139
- package/dist/assets/layout--T9Dyzc0.js +0 -1
- package/dist/assets/mindmap-definition-YRQLILUH-BNy8j9xK.js +0 -68
- package/dist/assets/pieDiagram-SKSYHLDU-DSj-XSAz.js +0 -30
- package/dist/assets/purify.es-Bc-0F0ao.js +0 -2
- package/dist/assets/requirementDiagram-Z7DCOOCP-Bar-SpuL.js +0 -73
- package/dist/assets/sequenceDiagram-2WXFIKYE-DcwF2Fu7.js +0 -145
- package/dist/assets/stateDiagram-RAJIS63D-B9eynNzx.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-IaaFnyD6.js +0 -1
- package/dist/assets/timeline-definition-YZTLITO2-tQ5jILjS.js +0 -61
- package/dist/assets/treemap-KZPCXAKY-D7P8fXnT.js +0 -162
- package/dist/assets/xychartDiagram-JWTSCODW-99qUfPL4.js +0 -7
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C1TQE8f6.js","assets/index-BO4rLId3.css","assets/dagre-KV5264BT-DUWGBIgm.js","assets/graph-CXZA4XaC.js","assets/_baseUniq-mJPwzBOI.js","assets/layout-a0Clawsj.js","assets/min-B5vChzpW.js","assets/clone-EE9raDlI.js","assets/purify.es-BlZidd4c.js","assets/step-EjIQ8UIn.js","assets/cose-bilkent-S5V4N54A-4fUnkROm.js","assets/cytoscape.esm-BiciSPf8.js","assets/c4Diagram-AHTNJAMY-CJePgNba.js","assets/chunk-YZCP3GAM-Cm0anOcW.js","assets/flowDiagram-DWJPFMVM-CuSvL41f.js","assets/chunk-FMBD7UC4-CXSeyusx.js","assets/chunk-55IACEB6-0YS5Dbzd.js","assets/chunk-EDXVE4YY-BaUXHlqA.js","assets/channel-CX3imDlU.js","assets/erDiagram-SMLLAGMA-ltzBzX-J.js","assets/gitGraphDiagram-UUTBAWPF-BaBzMGpC.js","assets/chunk-4BX2VUAB-LD_Hd6_z.js","assets/chunk-QZHKN3VN-3-SvIa7S.js","assets/wardley-RL74JXVD-BQtHLuaO.js","assets/ganttDiagram-T4ZO3ILL-D695mEJV.js","assets/time-h5EapSZu.js","assets/linear-CKzVTQ0r.js","assets/init-Dmth1JHB.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-C554WkLo.js","assets/pieDiagram-DEJITSTG-DwV0tEAW.js","assets/arc-BSnyvXPh.js","assets/ordinal-DILIJJjt.js","assets/quadrantDiagram-34T5L4WZ-DvHIwgsa.js","assets/xychartDiagram-5P7HB3ND-BKUiyZNZ.js","assets/band-CquvqAHh.js","assets/requirementDiagram-MS252O5E-DgSgWjaP.js","assets/sequenceDiagram-FGHM5R23-BLd2_BAi.js","assets/classDiagram-6PBFFD2Q-o2YNBl67.js","assets/chunk-4TB4RGXK-BGO2PowE.js","assets/classDiagram-v2-HSJHXN6E-o2YNBl67.js","assets/stateDiagram-FHFEXIEX-DDDK8elV.js","assets/chunk-OYMX7WX6-BJqKAaXp.js","assets/stateDiagram-v2-QKLJ7IA2-Dts2YAxm.js","assets/journeyDiagram-VCZTEJTY-Rk6UiBUm.js","assets/timeline-definition-GMOUNBTQ-Dj2EEEZe.js","assets/mindmap-definition-QFDTVHPH-CGYrptTT.js","assets/kanban-definition-6JOO6SKY-BLc8Saxe.js","assets/sankeyDiagram-XADWPNL6-k3HRQmAt.js","assets/diagram-TYMM5635-DRXfDOY1.js","assets/diagram-MMDJMWI5-DJyz-Y76.js","assets/blockDiagram-DXYQGD6D-DaC_VKzI.js","assets/diagram-5BDNPKRD-C9_Rqs6o.js","assets/architectureDiagram-Q4EWVU46-CZuqFwTR.js","assets/ishikawaDiagram-UXIWVN3A-D1ixBTTi.js","assets/vennDiagram-DHZGUBPP-C8NSdF_G.js","assets/diagram-G4DWMVQ6-DJgL3XtB.js","assets/wardleyDiagram-NUSXRM2D-Dt3gXCVo.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Vg=Object.defineProperty;var Gg=(e,t,r)=>t in e?Vg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pt=(e,t,r)=>Gg(e,typeof t!="symbol"?t+"":t,r);import{g as Zg,c as Kg,_ as ot,r as Xt,j as vt}from"./index-C1TQE8f6.js";import{p as Lr}from"./purify.es-BlZidd4c.js";import{y as ze,z as hn,A as cn,B as Qg,D as Dl,E as Qi,e as un,F as Pl,G as Rl,H as ql,I as Wl,J as zl,K as Nl,L as Jg,M as qi,N as Hl,O as jl,P as tf,Q as ef,c as ds,l as rf}from"./step-EjIQ8UIn.js";var Yl={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Kg,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",n="second",o="minute",l="hour",h="day",c="week",u="month",p="quarter",d="year",m="date",f="Invalid Date",y=/^(\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(D){var M=["th","st","nd","rd"],L=D%100;return"["+D+(M[(L-20)%10]||M[L]||M[0])+"]"}},k=function(D,M,L){var $=String(D);return!$||$.length>=M?D:""+Array(M+1-$.length).join(L)+D},S={s:k,z:function(D){var M=-D.utcOffset(),L=Math.abs(M),$=Math.floor(L/60),F=L%60;return(M<=0?"+":"-")+k($,2,"0")+":"+k(F,2,"0")},m:function D(M,L){if(M.date()<L.date())return-D(L,M);var $=12*(L.year()-M.year())+(L.month()-M.month()),F=M.clone().add($,u),q=L-F<0,z=M.clone().add($+(q?-1:1),u);return+(-($+(L-F)/(q?F-z:z-F))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:u,y:d,w:c,d:h,D:m,h:l,m:o,s:n,ms:s,Q:p}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},w="en",B={};B[w]=b;var T="$isDayjsObject",v=function(D){return D instanceof N||!(!D||!D[T])},R=function D(M,L,$){var F;if(!M)return w;if(typeof M=="string"){var q=M.toLowerCase();B[q]&&(F=q),L&&(B[q]=L,F=q);var z=M.split("-");if(!F&&z.length>1)return D(z[0])}else{var et=M.name;B[et]=M,F=et}return!$&&F&&(w=F),F||!$&&w},I=function(D,M){if(v(D))return D.clone();var L=typeof M=="object"?M:{};return L.date=D,L.args=arguments,new N(L)},O=S;O.l=R,O.i=v,O.w=function(D,M){return I(D,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var N=function(){function D(L){this.$L=R(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[T]=!0}var M=D.prototype;return M.parse=function(L){this.$d=function($){var F=$.date,q=$.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(y);if(z){var et=z[2]-1||0,at=(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,at)):new Date(z[1],et,z[3]||1,z[4]||0,z[5]||0,z[6]||0,at)}}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()!==f},M.isSame=function(L,$){var F=I(L);return this.startOf($)<=F&&F<=this.endOf($)},M.isAfter=function(L,$){return I(L)<this.startOf($)},M.isBefore=function(L,$){return this.endOf($)<I(L)},M.$g=function(L,$,F){return O.u(L)?this[$]:this.set(F,L)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(L,$){var F=this,q=!!O.u($)||$,z=O.p(L),et=function(ae,G){var rt=O.w(F.$u?Date.UTC(F.$y,G,ae):new Date(F.$y,G,ae),F);return q?rt:rt.endOf(h)},at=function(ae,G){return O.w(F.toDate()[ae].apply(F.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(G)),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 It=this.$locale().weekStart||0,ie=(lt<It?lt+7:lt)-It;return et(q?ut-ie:ut+(6-ie),nt);case h:case m:return at(bt+"Hours",0);case l:return at(bt+"Minutes",1);case o:return at(bt+"Seconds",2);case n:return at(bt+"Milliseconds",3);default:return this.clone()}},M.endOf=function(L){return this.startOf(L,!1)},M.$set=function(L,$){var F,q=O.p(L),z="set"+(this.$u?"UTC":""),et=(F={},F[h]=z+"Date",F[m]=z+"Date",F[u]=z+"Month",F[d]=z+"FullYear",F[l]=z+"Hours",F[o]=z+"Minutes",F[n]=z+"Seconds",F[s]=z+"Milliseconds",F)[q],at=q===h?this.$D+($-this.$W):$;if(q===u||q===d){var lt=this.clone().set(m,1);lt.$d[et](at),lt.init(),this.$d=lt.set(m,Math.min(this.$D,lt.daysInMonth())).$d}else et&&this.$d[et](at);return this.init(),this},M.set=function(L,$){return this.clone().$set(L,$)},M.get=function(L){return this[O.p(L)]()},M.add=function(L,$){var F,q=this;L=Number(L);var z=O.p($),et=function(nt){var ut=I(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 at=(F={},F[o]=i,F[l]=a,F[n]=r,F)[z]||1,lt=this.$d.getTime()+L*at;return O.w(lt,this)},M.subtract=function(L,$){return this.add(-1*L,$)},M.format=function(L){var $=this,F=this.$locale();if(!this.isValid())return F.invalidDate||f;var q=L||"YYYY-MM-DDTHH:mm:ssZ",z=O.z(this),et=this.$H,at=this.$m,lt=this.$M,nt=F.weekdays,ut=F.months,bt=F.meridiem,It=function(G,rt,gt,St){return G&&(G[rt]||G($,q))||gt[rt].slice(0,St)},ie=function(G){return O.s(et%12||12,G,"0")},ae=bt||function(G,rt,gt){var St=G<12?"AM":"PM";return gt?St.toLowerCase():St};return q.replace(C,function(G,rt){return rt||function(gt){switch(gt){case"YY":return String($.$y).slice(-2);case"YYYY":return O.s($.$y,4,"0");case"M":return lt+1;case"MM":return O.s(lt+1,2,"0");case"MMM":return It(F.monthsShort,lt,ut,3);case"MMMM":return It(ut,lt);case"D":return $.$D;case"DD":return O.s($.$D,2,"0");case"d":return String($.$W);case"dd":return It(F.weekdaysMin,$.$W,nt,2);case"ddd":return It(F.weekdaysShort,$.$W,nt,3);case"dddd":return nt[$.$W];case"H":return String(et);case"HH":return O.s(et,2,"0");case"h":return ie(1);case"hh":return ie(2);case"a":return ae(et,at,!0);case"A":return ae(et,at,!1);case"m":return String(at);case"mm":return O.s(at,2,"0");case"s":return String($.$s);case"ss":return O.s($.$s,2,"0");case"SSS":return O.s($.$ms,3,"0");case"Z":return z}return null}(G)||z.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(L,$,F){var q,z=this,et=O.p($),at=I(L),lt=(at.utcOffset()-this.utcOffset())*i,nt=this-at,ut=function(){return O.m(z,at)};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/a;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 B[this.$L]},M.locale=function(L,$){if(!L)return this.$L;var F=this.clone(),q=R(L,$,!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()},D}(),W=N.prototype;return I.prototype=W,[["$ms",s],["$s",n],["$m",o],["$H",l],["$W",h],["$M",u],["$y",d],["$D",m]].forEach(function(D){W[D[1]]=function(M){return this.$g(M,D[0],D[1])}}),I.extend=function(D,M){return D.$i||(D(M,N,I),D.$i=!0),I},I.locale=R,I.isDayjs=v,I.unix=function(D){return I(1e3*D)},I.en=B[w],I.Ls=B,I.p={},I})})(Yl);var af=Yl.exports;const sf=Zg(af);var Xl=Object.defineProperty,g=(e,t)=>Xl(e,"name",{value:t,configurable:!0}),of=(e,t)=>{for(var r in t)Xl(e,r,{get:t[r],enumerable:!0})},ge={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")},lo=g(function(e="fatal"){let t=ge.fatal;typeof e=="string"?e.toLowerCase()in ge&&(t=ge[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=ge.fatal&&(P.fatal=console.error?console.error.bind(console,Ut("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ut("FATAL"))),t<=ge.error&&(P.error=console.error?console.error.bind(console,Ut("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ut("ERROR"))),t<=ge.warn&&(P.warn=console.warn?console.warn.bind(console,Ut("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ut("WARN"))),t<=ge.info&&(P.info=console.info?console.info.bind(console,Ut("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ut("INFO"))),t<=ge.debug&&(P.debug=console.debug?console.debug.bind(console,Ut("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("DEBUG"))),t<=ge.trace&&(P.trace=console.debug?console.debug.bind(console,Ut("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("TRACE")))},"setLogLevel"),Ut=g(e=>`%c${sf().format("ss.SSS")} : ${e} : `,"format");const Wi={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r: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 a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return Wi.hue2rgb(s,a,e+1/3)*255;case"g":return Wi.hue2rgb(s,a,e)*255;case"b":return Wi.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),n=(a+s)/2;if(i==="l")return n*100;if(a===s)return 0;const o=a-s,l=n>.5?o/(2-a-s):o/(a+s);if(i==="s")return l*100;switch(a){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}}},nf={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},lf={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},tt={channel:Wi,lang:nf,unit:lf},Le={};for(let e=0;e<=255;e++)Le[e]=tt.unit.dec2hex(e);const Mt={ALL:0,RGB:1,HSL:2};class hf{constructor(){this.type=Mt.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=Mt.ALL}is(t){return this.type===t}}class cf{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new hf}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Mt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=tt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=tt.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=tt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=tt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=tt.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=tt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Mt.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(Mt.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(Mt.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(Mt.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(Mt.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(Mt.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Mt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Mt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Mt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Mt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Mt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Mt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ma=new cf({r:0,g:0,b:0,a:0},"transparent"),dr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(dr.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,n=a>4,o=n?1:17,l=n?8:4,h=s?0:-1,c=n?255:15;return Ma.set({r:(i>>l*(h+3)&c)*o,g:(i>>l*(h+2)&c)*o,b:(i>>l*(h+1)&c)*o,a:s?(i&c)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${Le[Math.round(t)]}${Le[Math.round(r)]}${Le[Math.round(i)]}${Le[Math.round(a*255)]}`:`#${Le[Math.round(t)]}${Le[Math.round(r)]}${Le[Math.round(i)]}`}},je={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(je.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(je.re);if(!r)return;const[,i,a,s,n,o]=r;return Ma.set({h:je._hue2deg(i),s:tt.channel.clamp.s(parseFloat(a)),l:tt.channel.clamp.l(parseFloat(s)),a:n?tt.channel.clamp.a(o?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%, ${a})`:`hsl(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%)`}},ii={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=ii.colors[e];if(t)return dr.parse(t)},stringify:e=>{const t=dr.stringify(e);for(const r in ii.colors)if(ii.colors[r]===t)return r}},Gr={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(Gr.re);if(!r)return;const[,i,a,s,n,o,l,h,c]=r;return Ma.set({r:tt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:tt.channel.clamp.g(n?parseFloat(s)*2.55:parseFloat(s)),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}=e;return a<1?`rgba(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)}, ${tt.lang.round(a)})`:`rgb(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)})`}},le={format:{keyword:ii,hex:dr,rgb:Gr,rgba:Gr,hsl:je,hsla:je},parse:e=>{if(typeof e!="string")return e;const t=dr.parse(e)||Gr.parse(e)||je.parse(e)||ii.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Mt.HSL)||e.data.r===void 0?je.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Gr.stringify(e):dr.stringify(e)},Ul=(e,t)=>{const r=le.parse(e);for(const i in t)r[i]=tt.channel.clamp[i](t[i]);return le.stringify(r)},Ae=(e,t,r=0,i=1)=>{if(typeof e!="number")return Ul(e,{a:t});const a=Ma.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 le.stringify(a)},uf=e=>{const{r:t,g:r,b:i}=le.parse(e),a=.2126*tt.channel.toLinear(t)+.7152*tt.channel.toLinear(r)+.0722*tt.channel.toLinear(i);return tt.lang.round(a)},df=e=>uf(e)>=.5,ee=e=>!df(e),Vl=(e,t,r)=>{const i=le.parse(e),a=i[t],s=tt.channel.clamp[t](a+r);return a!==s&&(i[t]=s),le.stringify(i)},E=(e,t)=>Vl(e,"l",t),A=(e,t)=>Vl(e,"l",-t),x=(e,t)=>{const r=le.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return Ul(e,i)},pf=(e,t,r=50)=>{const{r:i,g:a,b:s,a:n}=le.parse(e),{r:o,g:l,b:h,a:c}=le.parse(t),u=r/100,p=u*2-1,d=n-c,f=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,y=1-f,C=i*f+o*y,b=a*f+l*y,k=s*f+h*y,S=n*u+c*(1-u);return Ae(C,b,k,S)},_=(e,t=100)=>{const r=le.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,pf(r,e,t)};var Gl=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ai=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,gf=/\s*%%.*\n/gm,gr,Zl=(gr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(gr,"UnknownDiagramError"),gr),Ve={},ho=g(function(e,t){e=e.replace(Gl,"").replace(ai,"").replace(gf,`
|
|
3
|
+
`);for(const[r,{detector:i}]of Object.entries(Ve))if(i(e,t))return r;throw new Zl(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ps=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)Kl(t,r,i)},"registerLazyLoadedDiagrams"),Kl=g((e,t,r)=>{Ve[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),Ve[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),ff=g(e=>Ve[e].loader,"getDiagramLoader"),gs=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>gs(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),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(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=gs(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Tt=gs,ce="#ffffff",ue="#f2f2f2",J=g((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),fr,mf=(fr=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,a,s,n,o,l,h,c,u,p,d,m,f,y,C,b,k,S,w,B,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||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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||_(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||E(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||E(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||E(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 v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=A(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=A(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||_(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||E(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||A(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||x(this.mainBkg,{h:180,s:-15,l:t*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||x(this.mainBkg,{h:180,s:-15,l:t*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||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:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.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||ee(this.quadrant1Fill)?E(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:((m=this.xyChart)==null?void 0:m.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:((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:((S=this.xyChart)==null?void 0:S.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.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=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(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||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue,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(fr,"Theme"),fr),yf=g(e=>{const t=new mf;return t.calculate(e),t},"getThemeVariables"),mr,Cf=(mr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=E(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=E(_("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ae(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=Ae(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ae(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||E(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,a,s,n,o,l,h,c,u,p,d,m,f,y,C,b,k,S,w,B;this.secondBkg=E(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=E(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=E(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=_(this.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]||_(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScalePeer"+T]=this["cScalePeer"+T]||E(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)]??E(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||ee(this.quadrant1Fill)?E(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:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.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:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.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:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.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=E(this.secondaryColor,20),this.git1=E(this.pie2||this.secondaryColor,20),this.git2=E(this.pie3||this.tertiaryColor,20),this.git3=E(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=E(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=E(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=E(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=E(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||E(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||E(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(mr,"Theme"),mr),xf=g(e=>{const t=new Cf;return t.calculate(e),t},"getThemeVariables"),yr,bf=(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=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(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=Ae(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,a,s,n,o,l,h,c,u,p,d,m,f,y,C,b,k,S,w,B;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||_(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||_(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||E(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||E(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||ee(this.quadrant1Fill)?E(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:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.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:((m=this.xyChart)==null?void 0:m.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.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:((S=this.xyChart)==null?void 0:S.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.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=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(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(_(this.git0),25),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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),kf=g(e=>{const t=new bf;return t.calculate(e),t},"getThemeVariables"),Cr,Tf=(Cr=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=E("#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=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.primaryColor),this.lineColor=_(this.background),this.textColor=_(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,a,s,n,o,l,h,c,u,p,d,m,f,y,C,b,k,S,w,B;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||E(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||E(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||ee(this.quadrant1Fill)?E(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:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.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:((m=this.xyChart)==null?void 0:m.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.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:((S=this.xyChart)==null?void 0:S.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.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=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(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||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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),wf=g(e=>{const t=new Tf;return t.calculate(e),t},"getThemeVariables"),xr,Sf=(xr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=E(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=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(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||E(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,a,s,n,o,l,h,c,u,p,d,m,f,y,C,b,k,S,w,B;this.secondBkg=E(this.contrast,55),this.border2=this.contrast,this.actorBorder=E(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]||_(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this.darkMode?this["cScalePeer"+T]=this["cScalePeer"+T]||E(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=E(this.contrast,30),this.sectionBkgColor2=E(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=E(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||ee(this.quadrant1Fill)?E(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:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.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:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.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:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.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||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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),vf=g(e=>{const t=new Sf;return t.calculate(e),t},"getThemeVariables"),br,Bf=(br=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 s,n,o,l,h,c,u,p,d,m,f;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||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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||_(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||E(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=A(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=A(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||_(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||E(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||A(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(8+y*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||ee(this.quadrant1Fill)?E(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:((s=this.xyChart)==null?void 0:s.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:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(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||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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),_f=g(e=>{const t=new Bf;return t.calculate(e),t},"getThemeVariables"),kr,Lf=(kr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=E(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=E(_("#323D47"),10),this.border1="#ccc",this.border2=Ae(255,255,255,.25),this.arrowheadColor=_(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,a,s,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||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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||_(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||E(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]||_(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||E(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||ee(this.quadrant1Fill)?E(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:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.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=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(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||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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),Ff=g(e=>{const t=new Lf;return t.calculate(e),t},"getThemeVariables"),Tr,Mf=(Tr=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 s,n,o,l,h,c,u,p,d,m,f;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||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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||_(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||E(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=this.mainBkg;if(this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=A(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=A(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||_(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||E(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||A(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(8+y*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||ee(this.quadrant1Fill)?E(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:((s=this.xyChart)==null?void 0:s.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:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(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||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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),Af=g(e=>{const t=new Mf;return t.calculate(e),t},"getThemeVariables"),wr,Ef=(wr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=E(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=E(_("#323D47"),10),this.border1="#ccc",this.border2=Ae(255,255,255,.25),this.arrowheadColor=_(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,a,s,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||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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||_(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||E(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]||_(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||E(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||ee(this.quadrant1Fill)?E(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:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.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=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(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||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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),$f=g(e=>{const t=new Ef;return t.calculate(e),t},"getThemeVariables"),Sr,Of=(Sr=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 s,n,o,l,h,c,u,p,d,m,f;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||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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||_(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||E(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||_(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||E(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||A(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(8+y*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||ee(this.quadrant1Fill)?E(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:((s=this.xyChart)==null?void 0:s.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:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(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||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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(Sr,"Theme"),Sr),If=g(e=>{const t=new Of;return t.calculate(e),t},"getThemeVariables"),vr,Df=(vr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=E(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=E(_("#323D47"),10),this.border1="#ccc",this.border2=Ae(255,255,255,.25),this.arrowheadColor=_(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,a,s,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||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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||_(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||E(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]||_(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||E(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||ee(this.quadrant1Fill)?E(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:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.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=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(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||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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(vr,"Theme"),vr),Pf=g(e=>{const t=new Df;return t.calculate(e),t},"getThemeVariables"),Ce={base:{getThemeVariables:yf},dark:{getThemeVariables:xf},default:{getThemeVariables:kf},forest:{getThemeVariables:wf},neutral:{getThemeVariables:vf},neo:{getThemeVariables:_f},"neo-dark":{getThemeVariables:Ff},redux:{getThemeVariables:Af},"redux-dark":{getThemeVariables:$f},"redux-color":{getThemeVariables:If},"redux-dark-color":{getThemeVariables:Pf}},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},Ql={...Nt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ce.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}},Jl=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Jl(e[i],"")]:[...r,t+i],[]),"keyify"),Rf=new Set(Jl(Ql,"")),th=Ql,Ji=g(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ji(t));return}for(const t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Rf.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),Ji(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(P.debug("sanitizing css option",t),e[t]=qf(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"),qf=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"),Fr=Object.freeze(th),Te=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Wt=Tt({},Fr),ta,Ge=[],si=Tt({},Fr),Aa=g((e,t)=>{let r=Tt({},e),i={};for(const a of t)ih(a),i=Tt(i,a);if(r=Tt(r,i),i.theme&&i.theme in Ce){const a=Tt({},ta),s=Tt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ce&&(r.themeVariables=Ce[r.theme].getThemeVariables(s))}return si=r,sh(si),si},"updateCurrentConfig"),Wf=g(e=>(Wt=Tt({},Fr),Wt=Tt(Wt,e),e.theme&&Ce[e.theme]&&(Wt.themeVariables=Ce[e.theme].getThemeVariables(e.themeVariables)),Aa(Wt,Ge),Wt),"setSiteConfig"),zf=g(e=>{ta=Tt({},e)},"saveConfigFromInitialize"),Nf=g(e=>(Wt=Tt(Wt,e),Aa(Wt,Ge),Wt),"updateSiteConfig"),eh=g(()=>Tt({},Wt),"getSiteConfig"),rh=g(e=>(sh(e),Tt(si,e),yt()),"setConfig"),yt=g(()=>Tt({},si),"getConfig"),ih=g(e=>{e&&(["secure",...Wt.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"&&ih(e[t])}))},"sanitize"),Hf=g(e=>{var t;Ji(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ge.push(e),Aa(Wt,Ge)},"addDirective"),ea=g((e=Wt)=>{Ge=[],Aa(e,Ge)},"reset"),jf={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."},dn={},ah=g(e=>{dn[e]||(P.warn(jf[e]),dn[e]=!0)},"issueWarning"),sh=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ah("LAZY_LOAD_DEPRECATED")},"checkConfig"),UB=g(()=>{let e={};ta&&(e=Tt(e,ta));for(const t of Ge)e=Tt(e,t);return e},"getUserDefinedConfig"),Rt=g(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&ah("FLOWCHART_HTML_LABELS_DEPRECATED"),Te(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),bi=/<br\s*\/?>/gi,Yf=g(e=>e?lh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Xf=(()=>{let e=!1;return()=>{e||(oh(),e=!0)}})();function oh(){const e="data-temp-href-target";Lr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Lr.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(oh,"setupDompurifyHooks");var nh=g(e=>(Xf(),Lr.sanitize(e)),"removeScript"),pn=g((e,t)=>{if(Rt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=nh(e):r!=="loose"&&(e=lh(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Zf(e))}return e},"sanitizeMore"),te=g((e,t)=>e&&(t.dompurifyConfig?e=Lr.sanitize(pn(e,t),t.dompurifyConfig).toString():e=Lr.sanitize(pn(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Uf=g((e,t)=>typeof e=="string"?te(e,t):e.flat().map(r=>te(r,t)),"sanitizeTextOrArray"),Vf=g(e=>bi.test(e),"hasBreaks"),Gf=g(e=>e.split(bi),"splitBreaks"),Zf=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),lh=g(e=>e.replace(bi,"#br#"),"breakToPlaceholder"),Kf=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"),Qf=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Jf=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),gn=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const s=t[i-1],n=t[i+1];tm(s,n)&&(a=s+","+n,i++,r.pop())}r.push(em(a))}return r.join("")},"parseGenericTypes"),fs=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),tm=g((e,t)=>{const r=fs(e,"~"),i=fs(t,"~");return r===1&&i===1},"shouldCombineSets"),em=g(e=>{const t=fs(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),fn=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ms=/\$\$(.*)\$\$/g,hi=g(e=>{var t;return(((t=e.match(ms))==null?void 0:t.length)??0)>0},"hasKatex"),VB=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await hh(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 a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),rm=g(async(e,t)=>{if(!hi(e))return e;if(!(fn()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ms,"MathML is unsupported in this environment.");{const{default:r}=await ot(async()=>{const{default:a}=await import("./index-C1TQE8f6.js").then(s=>s.k);return{default:a}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!fn()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(bi).map(a=>hi(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(ms,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),hh=g(async(e,t)=>te(await rm(e,t),t),"renderKatexSanitized"),ki={getRows:Yf,sanitizeText:te,sanitizeTextOrArray:Uf,hasBreaks:Vf,splitBreaks:Gf,lineBreakRegex:bi,removeScript:nh,getUrl:Kf,evaluate:Te,getMax:Qf,getMin:Jf},im=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),am=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"),ch=g(function(e,t,r,i){const a=am(t,r,i);im(e,a)},"configureSvgSize"),sm=g(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,n=a.height;P.info(`SVG bounds: ${s}x${n}`,a);let o=0,l=0;P.info(`Graph bounds: ${o}x${l}`,e),o=s+r*2,l=n+r*2,P.info(`Calculated bounds: ${o}x${l}`),ch(t,l,o,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),zi={},om=g((e,t,r,i)=>{let a="";return e in zi&&zi[e]?a=zi[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
|
+
${a}
|
|
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"),nm=g((e,t)=>{t!==void 0&&(zi[e]=t)},"addStylesForDiagram"),lm=om,uh={};of(uh,{clear:()=>hm,getAccDescription:()=>pm,getAccTitle:()=>um,getDiagramTitle:()=>fm,setAccDescription:()=>dm,setAccTitle:()=>cm,setDiagramTitle:()=>gm});var co="",uo="",po="",go=g(e=>te(e,yt()),"sanitizeText"),hm=g(()=>{co="",po="",uo=""},"clear"),cm=g(e=>{co=go(e).replace(/^\s+/g,"")},"setAccTitle"),um=g(()=>co,"getAccTitle"),dm=g(e=>{po=go(e).replace(/\n\s+/g,`
|
|
122
|
+
`)},"setAccDescription"),pm=g(()=>po,"getAccDescription"),gm=g(e=>{uo=go(e)},"setDiagramTitle"),fm=g(()=>uo,"getDiagramTitle"),mn=P,mm=lo,ht=yt,GB=rh,ZB=Fr,fo=g(e=>te(e,ht()),"sanitizeText"),ym=sm,Cm=g(()=>uh,"getCommonDb"),ra={},ia=g((e,t,r)=>{var i;ra[e]&&mn.warn(`Diagram with id ${e} already registered. Overwriting.`),ra[e]=t,r&&Kl(e,r),nm(e,t.styles),(i=t.injectUtils)==null||i.call(t,mn,mm,ht,fo,ym,Cm(),()=>{})},"registerDiagram"),ys=g(e=>{if(e in ra)return ra[e];throw new xm(e)},"getDiagram"),Br,xm=(Br=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(Br,"DiagramNotFoundError"),Br),bm={value:()=>{}};function dh(){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 Ni(r)}function Ni(e){this._=e}function km(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",a=r.indexOf(".");if(a>=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ni.prototype=dh.prototype={constructor:Ni,on:function(e,t){var r=this._,i=km(e+"",r),a,s=-1,n=i.length;if(arguments.length<2){for(;++s<n;)if((a=(e=i[s]).type)&&(a=Tm(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<n;)if(a=(e=i[s]).type)r[a]=yn(r[a],e.name,t);else if(t==null)for(a in r)r[a]=yn(r[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ni(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,s;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,a=s.length;i<a;++i)s[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],a=0,s=i.length;a<s;++a)i[a].value.apply(t,r)}};function Tm(e,t){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===t)return a.value}function yn(e,t,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=bm,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Cs="http://www.w3.org/1999/xhtml";const Cn={svg:"http://www.w3.org/2000/svg",xhtml:Cs,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ea(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Cn.hasOwnProperty(t)?{space:Cn[t],local:e}:e}function wm(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Cs&&t.documentElement.namespaceURI===Cs?t.createElement(e):t.createElementNS(r,e)}}function Sm(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ph(e){var t=Ea(e);return(t.local?Sm:wm)(t)}function vm(){}function mo(e){return e==null?vm:function(){return this.querySelector(e)}}function Bm(e){typeof e!="function"&&(e=mo(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],n=s.length,o=i[a]=new Array(n),l,h,c=0;c<n;++c)(l=s[c])&&(h=e.call(l,l.__data__,c,s))&&("__data__"in l&&(h.__data__=l.__data__),o[c]=h);return new Yt(i,this._parents)}function _m(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Lm(){return[]}function gh(e){return e==null?Lm:function(){return this.querySelectorAll(e)}}function Fm(e){return function(){return _m(e.apply(this,arguments))}}function Mm(e){typeof e=="function"?e=Fm(e):e=gh(e);for(var t=this._groups,r=t.length,i=[],a=[],s=0;s<r;++s)for(var n=t[s],o=n.length,l,h=0;h<o;++h)(l=n[h])&&(i.push(e.call(l,l.__data__,h,n)),a.push(l));return new Yt(i,a)}function fh(e){return function(){return this.matches(e)}}function mh(e){return function(t){return t.matches(e)}}var Am=Array.prototype.find;function Em(e){return function(){return Am.call(this.children,e)}}function $m(){return this.firstElementChild}function Om(e){return this.select(e==null?$m:Em(typeof e=="function"?e:mh(e)))}var Im=Array.prototype.filter;function Dm(){return Array.from(this.children)}function Pm(e){return function(){return Im.call(this.children,e)}}function Rm(e){return this.selectAll(e==null?Dm:Pm(typeof e=="function"?e:mh(e)))}function qm(e){typeof e!="function"&&(e=fh(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],n=s.length,o=i[a]=[],l,h=0;h<n;++h)(l=s[h])&&e.call(l,l.__data__,h,s)&&o.push(l);return new Yt(i,this._parents)}function yh(e){return new Array(e.length)}function Wm(){return new Yt(this._enter||this._groups.map(yh),this._parents)}function aa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}aa.prototype={constructor:aa,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 zm(e){return function(){return e}}function Nm(e,t,r,i,a,s){for(var n=0,o,l=t.length,h=s.length;n<h;++n)(o=t[n])?(o.__data__=s[n],i[n]=o):r[n]=new aa(e,s[n]);for(;n<l;++n)(o=t[n])&&(a[n]=o)}function Hm(e,t,r,i,a,s,n){var o,l,h=new Map,c=t.length,u=s.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)?a[o]=l:h.set(d,l));for(o=0;o<u;++o)d=n.call(e,s[o],o,s)+"",(l=h.get(d))?(i[o]=l,l.__data__=s[o],h.delete(d)):r[o]=new aa(e,s[o]);for(o=0;o<c;++o)(l=t[o])&&h.get(p[o])===l&&(a[o]=l)}function jm(e){return e.__data__}function Ym(e,t){if(!arguments.length)return Array.from(this,jm);var r=t?Hm:Nm,i=this._parents,a=this._groups;typeof e!="function"&&(e=zm(e));for(var s=a.length,n=new Array(s),o=new Array(s),l=new Array(s),h=0;h<s;++h){var c=i[h],u=a[h],p=u.length,d=Xm(e.call(c,c&&c.__data__,h,i)),m=d.length,f=o[h]=new Array(m),y=n[h]=new Array(m),C=l[h]=new Array(p);r(c,u,f,y,C,d,t);for(var b=0,k=0,S,w;b<m;++b)if(S=f[b]){for(b>=k&&(k=b+1);!(w=y[k])&&++k<m;);S._next=w||null}}return n=new Yt(n,i),n._enter=o,n._exit=l,n}function Xm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Um(){return new Yt(this._exit||this._groups.map(yh),this._parents)}function Vm(e,t,r){var i=this.enter(),a=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),r==null?s.remove():r(s),i&&a?i.merge(a).order():a}function Gm(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,a=r.length,s=i.length,n=Math.min(a,s),o=new Array(a),l=0;l<n;++l)for(var h=r[l],c=i[l],u=h.length,p=o[l]=new Array(u),d,m=0;m<u;++m)(d=h[m]||c[m])&&(p[m]=d);for(;l<a;++l)o[l]=r[l];return new Yt(o,this._parents)}function Zm(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],a=i.length-1,s=i[a],n;--a>=0;)(n=i[a])&&(s&&n.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(n,s),s=n);return this}function Km(e){e||(e=Qm);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s){for(var n=r[s],o=n.length,l=a[s]=new Array(o),h,c=0;c<o;++c)(h=n[c])&&(l[c]=h);l.sort(t)}return new Yt(a,this._parents).order()}function Qm(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Jm(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ty(){return Array.from(this)}function ey(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,s=i.length;a<s;++a){var n=i[a];if(n)return n}return null}function ry(){let e=0;for(const t of this)++e;return e}function iy(){return!this.node()}function ay(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var a=t[r],s=0,n=a.length,o;s<n;++s)(o=a[s])&&e.call(o,o.__data__,s,a);return this}function sy(e){return function(){this.removeAttribute(e)}}function oy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ny(e,t){return function(){this.setAttribute(e,t)}}function ly(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function hy(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function cy(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 uy(e,t){var r=Ea(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?oy:sy:typeof t=="function"?r.local?cy:hy:r.local?ly:ny)(r,t))}function Ch(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function dy(e){return function(){this.style.removeProperty(e)}}function py(e,t,r){return function(){this.style.setProperty(e,t,r)}}function gy(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function fy(e,t,r){return arguments.length>1?this.each((t==null?dy:typeof t=="function"?gy:py)(e,t,r??"")):Mr(this.node(),e)}function Mr(e,t){return e.style.getPropertyValue(t)||Ch(e).getComputedStyle(e,null).getPropertyValue(t)}function my(e){return function(){delete this[e]}}function yy(e,t){return function(){this[e]=t}}function Cy(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function xy(e,t){return arguments.length>1?this.each((t==null?my:typeof t=="function"?Cy:yy)(e,t)):this.node()[e]}function xh(e){return e.trim().split(/^|\s+/)}function yo(e){return e.classList||new bh(e)}function bh(e){this._node=e,this._names=xh(e.getAttribute("class")||"")}bh.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 kh(e,t){for(var r=yo(e),i=-1,a=t.length;++i<a;)r.add(t[i])}function Th(e,t){for(var r=yo(e),i=-1,a=t.length;++i<a;)r.remove(t[i])}function by(e){return function(){kh(this,e)}}function ky(e){return function(){Th(this,e)}}function Ty(e,t){return function(){(t.apply(this,arguments)?kh:Th)(this,e)}}function wy(e,t){var r=xh(e+"");if(arguments.length<2){for(var i=yo(this.node()),a=-1,s=r.length;++a<s;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?Ty:t?by:ky)(r,t))}function Sy(){this.textContent=""}function vy(e){return function(){this.textContent=e}}function By(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function _y(e){return arguments.length?this.each(e==null?Sy:(typeof e=="function"?By:vy)(e)):this.node().textContent}function Ly(){this.innerHTML=""}function Fy(e){return function(){this.innerHTML=e}}function My(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ay(e){return arguments.length?this.each(e==null?Ly:(typeof e=="function"?My:Fy)(e)):this.node().innerHTML}function Ey(){this.nextSibling&&this.parentNode.appendChild(this)}function $y(){return this.each(Ey)}function Oy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Iy(){return this.each(Oy)}function Dy(e){var t=typeof e=="function"?e:ph(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Py(){return null}function Ry(e,t){var r=typeof e=="function"?e:ph(e),i=t==null?Py:typeof t=="function"?t:mo(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function qy(){var e=this.parentNode;e&&e.removeChild(this)}function Wy(){return this.each(qy)}function zy(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ny(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Hy(e){return this.select(e?Ny:zy)}function jy(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Yy(e){return function(t){e.call(this,t,this.__data__)}}function Xy(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 Uy(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,a=t.length,s;r<a;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function Vy(e,t,r){return function(){var i=this.__on,a,s=Yy(t);if(i){for(var n=0,o=i.length;n<o;++n)if((a=i[n]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=s,a.options=r),a.value=t;return}}this.addEventListener(e.type,s,r),a={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(a):this.__on=[a]}}function Gy(e,t,r){var i=Xy(e+""),a,s=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(a=0,c=o[l];a<s;++a)if((n=i[a]).type===c.type&&n.name===c.name)return c.value}return}for(o=t?Vy:Uy,a=0;a<s;++a)this.each(o(i[a],t,r));return this}function wh(e,t,r){var i=Ch(e),a=i.CustomEvent;typeof a=="function"?a=new a(t,r):(a=i.document.createEvent("Event"),r?(a.initEvent(t,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function Zy(e,t){return function(){return wh(this,e,t)}}function Ky(e,t){return function(){return wh(this,e,t.apply(this,arguments))}}function Qy(e,t){return this.each((typeof t=="function"?Ky:Zy)(e,t))}function*Jy(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,s=i.length,n;a<s;++a)(n=i[a])&&(yield n)}var Sh=[null];function Yt(e,t){this._groups=e,this._parents=t}function Ti(){return new Yt([[document.documentElement]],Sh)}function tC(){return this}Yt.prototype=Ti.prototype={constructor:Yt,select:Bm,selectAll:Mm,selectChild:Om,selectChildren:Rm,filter:qm,data:Ym,enter:Wm,exit:Um,join:Vm,merge:Gm,selection:tC,order:Zm,sort:Km,call:Jm,nodes:ty,node:ey,size:ry,empty:iy,each:ay,attr:uy,style:fy,property:xy,classed:wy,text:_y,html:Ay,raise:$y,lower:Iy,append:Dy,insert:Ry,remove:Wy,clone:Hy,datum:jy,on:Gy,dispatch:Qy,[Symbol.iterator]:Jy};function it(e){return typeof e=="string"?new Yt([[document.querySelector(e)]],[document.documentElement]):new Yt([[e]],Sh)}var xn=180/Math.PI,xs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vh(e,t,r,i,a,s){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:a,translateY:s,rotate:Math.atan2(t,e)*xn,skewX:Math.atan(l)*xn,scaleX:n,scaleY:o}}var Mi;function eC(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?xs:vh(t.a,t.b,t.c,t.d,t.e,t.f)}function rC(e){return e==null||(Mi||(Mi=document.createElementNS("http://www.w3.org/2000/svg","g")),Mi.setAttribute("transform",e),!(e=Mi.transform.baseVal.consolidate()))?xs:(e=e.matrix,vh(e.a,e.b,e.c,e.d,e.e,e.f))}function Bh(e,t,r,i){function a(h){return h.length?h.pop()+" ":""}function s(h,c,u,p,d,m){if(h!==u||c!==p){var f=d.push("translate(",null,t,null,r);m.push({i:f-4,x:ze(h,u)},{i:f-2,x:ze(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(a(u)+"rotate(",null,i)-2,x:ze(h,c)})):c&&u.push(a(u)+"rotate("+c+i)}function o(h,c,u,p){h!==c?p.push({i:u.push(a(u)+"skewX(",null,i)-2,x:ze(h,c)}):c&&u.push(a(u)+"skewX("+c+i)}function l(h,c,u,p,d,m){if(h!==u||c!==p){var f=d.push(a(d)+"scale(",null,",",null,")");m.push({i:f-4,x:ze(h,u)},{i:f-2,x:ze(c,p)})}else(u!==1||p!==1)&&d.push(a(d)+"scale("+u+","+p+")")}return function(h,c){var u=[],p=[];return h=e(h),c=e(c),s(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 m=-1,f=p.length,y;++m<f;)u[(y=p[m]).i]=y.x(d);return u.join("")}}}var iC=Bh(eC,"px, ","px)","deg)"),aC=Bh(rC,", ",")",")"),Ar=0,Zr=0,zr=0,_h=1e3,sa,Kr,oa=0,Ze=0,$a=0,ci=typeof performance=="object"&&performance.now?performance:Date,Lh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Co(){return Ze||(Lh(sC),Ze=ci.now()+$a)}function sC(){Ze=0}function na(){this._call=this._time=this._next=null}na.prototype=Fh.prototype={constructor:na,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Co():+r)+(t==null?0:+t),!this._next&&Kr!==this&&(Kr?Kr._next=this:sa=this,Kr=this),this._call=e,this._time=r,bs()},stop:function(){this._call&&(this._call=null,this._time=1/0,bs())}};function Fh(e,t,r){var i=new na;return i.restart(e,t,r),i}function oC(){Co(),++Ar;for(var e=sa,t;e;)(t=Ze-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ar}function bn(){Ze=(oa=ci.now())+$a,Ar=Zr=0;try{oC()}finally{Ar=0,lC(),Ze=0}}function nC(){var e=ci.now(),t=e-oa;t>_h&&($a-=t,oa=e)}function lC(){for(var e,t=sa,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:sa=r);Kr=e,bs(i)}function bs(e){if(!Ar){Zr&&(Zr=clearTimeout(Zr));var t=e-Ze;t>24?(e<1/0&&(Zr=setTimeout(bn,e-ci.now()-$a)),zr&&(zr=clearInterval(zr))):(zr||(oa=ci.now(),zr=setInterval(nC,_h)),Ar=1,Lh(bn))}}function kn(e,t,r){var i=new na;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,r),i}var hC=dh("start","end","cancel","interrupt"),cC=[],Mh=0,Tn=1,ks=2,Hi=3,wn=4,Ts=5,ji=6;function Oa(e,t,r,i,a,s){var n=e.__transition;if(!n)e.__transition={};else if(r in n)return;uC(e,r,{name:t,index:i,group:a,on:hC,tween:cC,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Mh})}function xo(e,t){var r=re(e,t);if(r.state>Mh)throw new Error("too late; already scheduled");return r}function de(e,t){var r=re(e,t);if(r.state>Hi)throw new Error("too late; already running");return r}function re(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function uC(e,t,r){var i=e.__transition,a;i[t]=r,r.timer=Fh(s,0,r.time);function s(h){r.state=Tn,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!==Tn)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===Hi)return kn(n);d.state===wn?(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(kn(function(){r.state===Hi&&(r.state=wn,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=ks,r.on.call("start",e,e.__data__,r.index,r.group),r.state===ks){for(r.state=Hi,a=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))&&(a[++u]=d);a.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=Ts,1),u=-1,p=a.length;++u<p;)a[u].call(e,c);r.state===Ts&&(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 dC(e,t){var r=e.__transition,i,a,s=!0,n;if(r){t=t==null?null:t+"";for(n in r){if((i=r[n]).name!==t){s=!1;continue}a=i.state>ks&&i.state<Ts,i.state=ji,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[n]}s&&delete e.__transition}}function pC(e){return this.each(function(){dC(this,e)})}function gC(e,t){var r,i;return function(){var a=de(this,e),s=a.tween;if(s!==r){i=r=s;for(var n=0,o=i.length;n<o;++n)if(i[n].name===t){i=i.slice(),i.splice(n,1);break}}a.tween=i}}function fC(e,t,r){var i,a;if(typeof r!="function")throw new Error;return function(){var s=de(this,e),n=s.tween;if(n!==i){a=(i=n).slice();for(var o={name:t,value:r},l=0,h=a.length;l<h;++l)if(a[l].name===t){a[l]=o;break}l===h&&a.push(o)}s.tween=a}}function mC(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=re(this.node(),r).tween,a=0,s=i.length,n;a<s;++a)if((n=i[a]).name===e)return n.value;return null}return this.each((t==null?gC:fC)(r,e,t))}function bo(e,t,r){var i=e._id;return e.each(function(){var a=de(this,i);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return re(a,i).value[t]}}function Ah(e,t){var r;return(typeof t=="number"?ze:t instanceof hn?cn:(r=hn(t))?(t=r,cn):Qg)(e,t)}function yC(e){return function(){this.removeAttribute(e)}}function CC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xC(e,t,r){var i,a=r+"",s;return function(){var n=this.getAttribute(e);return n===a?null:n===i?s:s=t(i=n,r)}}function bC(e,t,r){var i,a=r+"",s;return function(){var n=this.getAttributeNS(e.space,e.local);return n===a?null:n===i?s:s=t(i=n,r)}}function kC(e,t,r){var i,a,s;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===a?s:(a=l,s=t(i=n,o)))}}function TC(e,t,r){var i,a,s;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===a?s:(a=l,s=t(i=n,o)))}}function wC(e,t){var r=Ea(e),i=r==="transform"?aC:Ah;return this.attrTween(e,typeof t=="function"?(r.local?TC:kC)(r,i,bo(this,"attr."+e,t)):t==null?(r.local?CC:yC)(r):(r.local?bC:xC)(r,i,t))}function SC(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function vC(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function BC(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&vC(e,s)),r}return a._value=t,a}function _C(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&SC(e,s)),r}return a._value=t,a}function LC(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=Ea(e);return this.tween(r,(i.local?BC:_C)(i,t))}function FC(e,t){return function(){xo(this,e).delay=+t.apply(this,arguments)}}function MC(e,t){return t=+t,function(){xo(this,e).delay=t}}function AC(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?FC:MC)(t,e)):re(this.node(),t).delay}function EC(e,t){return function(){de(this,e).duration=+t.apply(this,arguments)}}function $C(e,t){return t=+t,function(){de(this,e).duration=t}}function OC(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?EC:$C)(t,e)):re(this.node(),t).duration}function IC(e,t){if(typeof t!="function")throw new Error;return function(){de(this,e).ease=t}}function DC(e){var t=this._id;return arguments.length?this.each(IC(t,e)):re(this.node(),t).ease}function PC(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;de(this,e).ease=r}}function RC(e){if(typeof e!="function")throw new Error;return this.each(PC(this._id,e))}function qC(e){typeof e!="function"&&(e=fh(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],n=s.length,o=i[a]=[],l,h=0;h<n;++h)(l=s[h])&&e.call(l,l.__data__,h,s)&&o.push(l);return new be(i,this._parents,this._name,this._id)}function WC(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,a=r.length,s=Math.min(i,a),n=new Array(i),o=0;o<s;++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 be(n,this._parents,this._name,this._id)}function zC(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 NC(e,t,r){var i,a,s=zC(t)?xo:de;return function(){var n=s(this,e),o=n.on;o!==i&&(a=(i=o).copy()).on(t,r),n.on=a}}function HC(e,t){var r=this._id;return arguments.length<2?re(this.node(),r).on.on(e):this.each(NC(r,e,t))}function jC(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function YC(){return this.on("end.remove",jC(this._id))}function XC(e){var t=this._name,r=this._id;typeof e!="function"&&(e=mo(e));for(var i=this._groups,a=i.length,s=new Array(a),n=0;n<a;++n)for(var o=i[n],l=o.length,h=s[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,Oa(h[p],t,r,p,h,re(c,r)));return new be(s,this._parents,t,r)}function UC(e){var t=this._name,r=this._id;typeof e!="function"&&(e=gh(e));for(var i=this._groups,a=i.length,s=[],n=[],o=0;o<a;++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,m=re(c,r),f=0,y=p.length;f<y;++f)(d=p[f])&&Oa(d,t,r,f,p,m);s.push(p),n.push(c)}return new be(s,n,t,r)}var VC=Ti.prototype.constructor;function GC(){return new VC(this._groups,this._parents)}function ZC(e,t){var r,i,a;return function(){var s=Mr(this,e),n=(this.style.removeProperty(e),Mr(this,e));return s===n?null:s===r&&n===i?a:a=t(r=s,i=n)}}function Eh(e){return function(){this.style.removeProperty(e)}}function KC(e,t,r){var i,a=r+"",s;return function(){var n=Mr(this,e);return n===a?null:n===i?s:s=t(i=n,r)}}function QC(e,t,r){var i,a,s;return function(){var n=Mr(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Mr(this,e))),n===l?null:n===i&&l===a?s:(a=l,s=t(i=n,o))}}function JC(e,t){var r,i,a,s="style."+t,n="end."+s,o;return function(){var l=de(this,e),h=l.on,c=l.value[s]==null?o||(o=Eh(t)):void 0;(h!==r||a!==c)&&(i=(r=h).copy()).on(n,a=c),l.on=i}}function t0(e,t,r){var i=(e+="")=="transform"?iC:Ah;return t==null?this.styleTween(e,ZC(e,i)).on("end.style."+e,Eh(e)):typeof t=="function"?this.styleTween(e,QC(e,i,bo(this,"style."+e,t))).each(JC(this._id,e)):this.styleTween(e,KC(e,i,t),r).on("end.style."+e,null)}function e0(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function r0(e,t,r){var i,a;function s(){var n=t.apply(this,arguments);return n!==a&&(i=(a=n)&&e0(e,n,r)),i}return s._value=t,s}function i0(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,r0(e,t,r??""))}function a0(e){return function(){this.textContent=e}}function s0(e){return function(){var t=e(this);this.textContent=t??""}}function o0(e){return this.tween("text",typeof e=="function"?s0(bo(this,"text",e)):a0(e==null?"":e+""))}function n0(e){return function(t){this.textContent=e.call(this,t)}}function l0(e){var t,r;function i(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&n0(a)),t}return i._value=e,i}function h0(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,l0(e))}function c0(){for(var e=this._name,t=this._id,r=$h(),i=this._groups,a=i.length,s=0;s<a;++s)for(var n=i[s],o=n.length,l,h=0;h<o;++h)if(l=n[h]){var c=re(l,t);Oa(l,e,r,h,n,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new be(i,this._parents,e,r)}function u0(){var e,t,r=this,i=r._id,a=r.size();return new Promise(function(s,n){var o={value:n},l={value:function(){--a===0&&s()}};r.each(function(){var h=de(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}),a===0&&s()})}var d0=0;function be(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function $h(){return++d0}var fe=Ti.prototype;be.prototype={constructor:be,select:XC,selectAll:UC,selectChild:fe.selectChild,selectChildren:fe.selectChildren,filter:qC,merge:WC,selection:GC,transition:c0,call:fe.call,nodes:fe.nodes,node:fe.node,size:fe.size,empty:fe.empty,each:fe.each,on:HC,attr:wC,attrTween:LC,style:t0,styleTween:i0,text:o0,textTween:h0,remove:YC,tween:mC,delay:AC,duration:OC,ease:DC,easeVarying:RC,end:u0,[Symbol.iterator]:fe[Symbol.iterator]};function p0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var g0={time:null,delay:0,duration:250,ease:p0};function f0(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 m0(e){var t,r;e instanceof be?(t=e._id,e=e._name):(t=$h(),(r=g0).time=Co(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,s=0;s<a;++s)for(var n=i[s],o=n.length,l,h=0;h<o;++h)(l=n[h])&&Oa(l,e,t,h,n,r||f0(l,t));return new be(i,this._parents,e,t)}Ti.prototype.interrupt=pC;Ti.prototype.transition=m0;function Oh(e,t){this._basis=new Dl(e),this._beta=t}Oh.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],a=t[0],s=e[r]-i,n=t[r]-a,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*s),this._beta*t[o]+(1-this._beta)*(a+l*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const y0=function e(t){function r(i){return t===1?new Dl(i):new Oh(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function la(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 ko(e,t){this._context=e,this._k=(1-t)/6}ko.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:la(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:la(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 Ih=function e(t){function r(i){return new ko(i,t)}return r.tension=function(i){return e(+i)},r}(0);function To(e,t){this._context=e,this._k=(1-t)/6}To.prototype={areaStart:Qi,areaEnd:Qi,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:la(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 C0=function e(t){function r(i){return new To(i,t)}return r.tension=function(i){return e(+i)},r}(0);function wo(e,t){this._context=e,this._k=(1-t)/6}wo.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:la(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 x0=function e(t){function r(i){return new wo(i,t)}return r.tension=function(i){return e(+i)},r}(0);function So(e,t,r){var i=e._x1,a=e._y1,s=e._x2,n=e._y2;if(e._l01_a>un){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,a=(a*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>un){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);s=(s*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,a,s,n,e._x2,e._y2)}function Dh(e,t){this._context=e,this._alpha=t}Dh.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:So(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 Ph=function e(t){function r(i){return t?new Dh(i,t):new ko(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Rh(e,t){this._context=e,this._alpha=t}Rh.prototype={areaStart:Qi,areaEnd:Qi,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:So(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 b0=function e(t){function r(i){return t?new Rh(i,t):new To(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function qh(e,t){this._context=e,this._alpha=t}qh.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:So(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 k0=function e(t){function r(i){return t?new qh(i,t):new wo(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Qr(e,t,r){this.k=e,this.x=t,this.y=r}Qr.prototype={constructor:Qr,scale:function(e){return e===1?this:new Qr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Qr(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+")"}};Qr.prototype;var T0=g(e=>{var a;const{securityLevel:t}=ht();let r=it("body");if(t==="sandbox"){const n=((a=it(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=it(n.body)}return r.select(`#${e}`)},"selectSvgElement");function vo(e){return typeof e>"u"||e===null}g(vo,"isNothing");function Wh(e){return typeof e=="object"&&e!==null}g(Wh,"isObject");function zh(e){return Array.isArray(e)?e:vo(e)?[]:[e]}g(zh,"toArray");function Nh(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}g(Nh,"extend");function Hh(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(Hh,"repeat");function jh(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(jh,"isNegativeZero");var w0=vo,S0=Wh,v0=zh,B0=Hh,_0=jh,L0=Nh,wt={isNothing:w0,isObject:S0,toArray:v0,repeat:B0,isNegativeZero:_0,extend:L0};function Bo(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(Bo,"formatError");function Er(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Bo(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(Er,"YAMLException$1");Er.prototype=Object.create(Error.prototype);Er.prototype.constructor=Er;Er.prototype.toString=g(function(t){return this.name+": "+Bo(this,t)},"toString");var zt=Er;function Yi(e,t,r,i,a){var s="",n="",o=Math.floor(a/2)-1;return i-t>o&&(s=" ... ",t=i-o+s.length),r-i>o&&(n=" ...",r=i+o-n.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+n,pos:i-t+s.length}}g(Yi,"getLine");function Xi(e,t){return wt.repeat(" ",t-e.length)+e}g(Xi,"padStart");function Yh(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],a=[],s,n=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&n<0&&(n=i.length-2);n<0&&(n=i.length-1);var o="",l,h,c=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(n-l<0);l++)h=Yi(e.buffer,i[n-l],a[n-l],e.position-(i[n]-i[n-l]),u),o=wt.repeat(" ",t.indent)+Xi((e.line-l+1).toString(),c)+" | "+h.str+`
|
|
125
|
+
`+o;for(h=Yi(e.buffer,i[n],a[n],e.position,u),o+=wt.repeat(" ",t.indent)+Xi((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>=a.length);l++)h=Yi(e.buffer,i[n+l],a[n+l],e.position-(i[n]-i[n+l]),u),o+=wt.repeat(" ",t.indent)+Xi((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
128
|
+
`;return o.replace(/\n$/,"")}g(Yh,"makeSnippet");var F0=Yh,M0=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],A0=["scalar","sequence","mapping"];function Xh(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(Xh,"compileStyleAliases");function Uh(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(M0.indexOf(r)===-1)throw new zt('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=Xh(t.styleAliases||null),A0.indexOf(this.kind)===-1)throw new zt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(Uh,"Type$1");var $t=Uh;function ws(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(s,n){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(a=n)}),r[a]=i}),r}g(ws,"compileList");function Vh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(Vh,"compileMap");function ha(e){return this.extend(e)}g(ha,"Schema$1");ha.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof $t)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 zt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof $t))throw new zt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new zt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new zt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof $t))throw new zt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(ha.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=ws(a,"implicit"),a.compiledExplicit=ws(a,"explicit"),a.compiledTypeMap=Vh(a.compiledImplicit,a.compiledExplicit),a},"extend");var E0=ha,$0=new $t("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),O0=new $t("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),I0=new $t("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),D0=new E0({explicit:[$0,O0,I0]});function Gh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(Gh,"resolveYamlNull");function Zh(){return null}g(Zh,"constructYamlNull");function Kh(e){return e===null}g(Kh,"isNull");var P0=new $t("tag:yaml.org,2002:null",{kind:"scalar",resolve:Gh,construct:Zh,predicate:Kh,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 Qh(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(Qh,"resolveYamlBoolean");function Jh(e){return e==="true"||e==="True"||e==="TRUE"}g(Jh,"constructYamlBoolean");function tc(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(tc,"isBoolean");var R0=new $t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Qh,construct:Jh,predicate:tc,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 ec(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(ec,"isHexCode");function rc(e){return 48<=e&&e<=55}g(rc,"isOctCode");function ic(e){return 48<=e&&e<=57}g(ic,"isDecCode");function ac(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!ec(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!rc(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!ic(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}g(ac,"resolveYamlInteger");function sc(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(sc,"constructYamlInteger");function oc(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!wt.isNegativeZero(e)}g(oc,"isInteger");var q0=new $t("tag:yaml.org,2002:int",{kind:"scalar",resolve:ac,construct:sc,predicate:oc,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"]}}),W0=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function nc(e){return!(e===null||!W0.test(e)||e[e.length-1]==="_")}g(nc,"resolveYamlFloat");function lc(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(lc,"constructYamlFloat");var z0=/^[-+]?[0-9]+e/;function hc(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),z0.test(r)?r.replace("e",".e"):r}g(hc,"representYamlFloat");function cc(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||wt.isNegativeZero(e))}g(cc,"isFloat");var N0=new $t("tag:yaml.org,2002:float",{kind:"scalar",resolve:nc,construct:lc,predicate:cc,represent:hc,defaultStyle:"lowercase"}),uc=D0.extend({implicit:[P0,R0,q0,N0]}),H0=uc,dc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),pc=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 gc(e){return e===null?!1:dc.exec(e)!==null||pc.exec(e)!==null}g(gc,"resolveYamlTimestamp");function fc(e){var t,r,i,a,s,n,o,l=0,h=null,c,u,p;if(t=dc.exec(e),t===null&&(t=pc.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(s=+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,a,s,n,o,l)),h&&p.setTime(p.getTime()-h),p}g(fc,"constructYamlTimestamp");function mc(e){return e.toISOString()}g(mc,"representYamlTimestamp");var j0=new $t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:gc,construct:fc,instanceOf:Date,represent:mc});function yc(e){return e==="<<"||e===null}g(yc,"resolveYamlMerge");var Y0=new $t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:yc}),_o=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
129
|
+
\r`;function Cc(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=_o;for(r=0;r<a;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(Cc,"resolveYamlBinary");function xc(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=_o,n=0,o=[];for(t=0;t<a;t++)t%4===0&&t&&(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)),n=n<<6|s.indexOf(i.charAt(t));return r=a%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 bc(e){var t="",r=0,i,a,s=e.length,n=_o;for(i=0;i<s;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 a=s%3,a===0?(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]):a===2?(t+=n[r>>10&63],t+=n[r>>4&63],t+=n[r<<2&63],t+=n[64]):a===1&&(t+=n[r>>2&63],t+=n[r<<4&63],t+=n[64],t+=n[64]),t}g(bc,"representYamlBinary");function kc(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(kc,"isBinary");var X0=new $t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Cc,construct:xc,predicate:kc,represent:bc}),U0=Object.prototype.hasOwnProperty,V0=Object.prototype.toString;function Tc(e){if(e===null)return!0;var t=[],r,i,a,s,n,o=e;for(r=0,i=o.length;r<i;r+=1){if(a=o[r],n=!1,V0.call(a)!=="[object Object]")return!1;for(s in a)if(U0.call(a,s))if(!n)n=!0;else return!1;if(!n)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}g(Tc,"resolveYamlOmap");function wc(e){return e!==null?e:[]}g(wc,"constructYamlOmap");var G0=new $t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Tc,construct:wc}),Z0=Object.prototype.toString;function Sc(e){if(e===null)return!0;var t,r,i,a,s,n=e;for(s=new Array(n.length),t=0,r=n.length;t<r;t+=1){if(i=n[t],Z0.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}g(Sc,"resolveYamlPairs");function vc(e){if(e===null)return[];var t,r,i,a,s,n=e;for(s=new Array(n.length),t=0,r=n.length;t<r;t+=1)i=n[t],a=Object.keys(i),s[t]=[a[0],i[a[0]]];return s}g(vc,"constructYamlPairs");var K0=new $t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Sc,construct:vc}),Q0=Object.prototype.hasOwnProperty;function Bc(e){if(e===null)return!0;var t,r=e;for(t in r)if(Q0.call(r,t)&&r[t]!==null)return!1;return!0}g(Bc,"resolveYamlSet");function _c(e){return e!==null?e:{}}g(_c,"constructYamlSet");var J0=new $t("tag:yaml.org,2002:set",{kind:"mapping",resolve:Bc,construct:_c}),Lc=H0.extend({implicit:[j0,Y0],explicit:[X0,G0,K0,J0]}),$e=Object.prototype.hasOwnProperty,ca=1,Fc=2,Mc=3,ua=4,Ja=1,tx=2,Sn=3,ex=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,rx=/[\x85\u2028\u2029]/,ix=/[,\[\]\{\}]/,Ac=/^(?:!|!!|![a-z\-]+!)$/i,Ec=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ss(e){return Object.prototype.toString.call(e)}g(Ss,"_class");function Qt(e){return e===10||e===13}g(Qt,"is_EOL");function Ee(e){return e===9||e===32}g(Ee,"is_WHITE_SPACE");function Dt(e){return e===9||e===32||e===10||e===13}g(Dt,"is_WS_OR_EOL");function Ye(e){return e===44||e===91||e===93||e===123||e===125}g(Ye,"is_FLOW_INDICATOR");function $c(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g($c,"fromHexCode");function Oc(e){return e===120?2:e===117?4:e===85?8:0}g(Oc,"escapedHexLen");function Ic(e){return 48<=e&&e<=57?e-48:-1}g(Ic,"fromDecimalCode");function vs(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(vs,"simpleEscapeSequence");function Dc(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(Dc,"charFromCodepoint");function Lo(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(Lo,"setProperty");var Pc=new Array(256),Rc=new Array(256);for(qe=0;qe<256;qe++)Pc[qe]=vs(qe)?1:0,Rc[qe]=vs(qe);var qe;function qc(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Lc,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(qc,"State$1");function Fo(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=F0(r),new zt(t,r)}g(Fo,"generateError");function V(e,t){throw Fo(e,t)}g(V,"throwError");function ui(e,t){e.onWarning&&e.onWarning.call(null,Fo(e,t))}g(ui,"throwWarning");var vn={YAML:g(function(t,r,i){var a,s,n;t.version!==null&&V(t,"duplication of %YAML directive"),i.length!==1&&V(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&V(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),n=parseInt(a[2],10),s!==1&&V(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&ui(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var a,s;i.length!==2&&V(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],Ac.test(a)||V(t,"ill-formed tag handle (first argument) of the TAG directive"),$e.call(t.tagMap,a)&&V(t,'there is a previously declared suffix for "'+a+'" tag handle'),Ec.test(s)||V(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{V(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s},"handleTagDirective")};function xe(e,t,r,i){var a,s,n,o;if(t<r){if(o=e.input.slice(t,r),i)for(a=0,s=o.length;a<s;a+=1)n=o.charCodeAt(a),n===9||32<=n&&n<=1114111||V(e,"expected valid JSON character");else ex.test(o)&&V(e,"the stream contains non-printable characters");e.result+=o}}g(xe,"captureSegment");function Bs(e,t,r,i){var a,s,n,o;for(wt.isObject(r)||V(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),n=0,o=a.length;n<o;n+=1)s=a[n],$e.call(t,s)||(Lo(t,s,r[s]),i[s]=!0)}g(Bs,"mergeMappings");function Xe(e,t,r,i,a,s,n,o,l){var h,c;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),h=0,c=a.length;h<c;h+=1)Array.isArray(a[h])&&V(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Ss(a[h])==="[object Object]"&&(a[h]="[object Object]");if(typeof a=="object"&&Ss(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,c=s.length;h<c;h+=1)Bs(e,t,s[h],r);else Bs(e,t,s,r);else!e.json&&!$e.call(r,a)&&$e.call(t,a)&&(e.line=n||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,V(e,"duplicated mapping key")),Lo(t,a,s),delete r[a];return t}g(Xe,"storeMappingPair");function Ia(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++):V(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(Ia,"readLineBreak");function xt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Ee(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(Qt(a))for(Ia(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&ui(e,"deficient indentation"),i}g(xt,"skipSeparationSpace");function wi(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||Dt(r)))}g(wi,"testDocumentSeparator");function Da(e,t){t===1?e.result+=" ":t>1&&(e.result+=wt.repeat(`
|
|
131
|
+
`,t-1))}g(Da,"writeFoldedLines");function Wc(e,t,r){var i,a,s,n,o,l,h,c,u=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),Dt(d)||Ye(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)&&(a=e.input.charCodeAt(e.position+1),Dt(a)||r&&Ye(a)))return!1;for(e.kind="scalar",e.result="",s=n=e.position,o=!1;d!==0;){if(d===58){if(a=e.input.charCodeAt(e.position+1),Dt(a)||r&&Ye(a))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Dt(i))break}else{if(e.position===e.lineStart&&wi(e)||r&&Ye(d))break;if(Qt(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&&(xe(e,s,n,!1),Da(e,e.line-l),s=n=e.position,o=!1),Ee(d)||(n=e.position+1),d=e.input.charCodeAt(++e.position)}return xe(e,s,n,!1),e.result?!0:(e.kind=u,e.result=p,!1)}g(Wc,"readPlainScalar");function zc(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(xe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else Qt(r)?(xe(e,i,a,!0),Da(e,xt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&wi(e)?V(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);V(e,"unexpected end of the stream within a single quoted scalar")}g(zc,"readSingleQuotedScalar");function Nc(e,t){var r,i,a,s,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 xe(e,r,e.position,!0),e.position++,!0;if(o===92){if(xe(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Qt(o))xt(e,!1,t);else if(o<256&&Pc[o])e.result+=Rc[o],e.position++;else if((n=Oc(o))>0){for(a=n,s=0;a>0;a--)o=e.input.charCodeAt(++e.position),(n=$c(o))>=0?s=(s<<4)+n:V(e,"expected hexadecimal character");e.result+=Dc(s),e.position++}else V(e,"unknown escape sequence");r=i=e.position}else Qt(o)?(xe(e,r,i,!0),Da(e,xt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&wi(e)?V(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}V(e,"unexpected end of the stream within a double quoted scalar")}g(Nc,"readDoubleQuotedScalar");function Hc(e,t){var r=!0,i,a,s,n=e.tag,o,l=e.anchor,h,c,u,p,d,m=Object.create(null),f,y,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&&V(e,"expected the node content, but found ','"):V(e,"missed comma between flow collection entries"),y=f=C=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Dt(h)&&(u=p=!0,e.position++,xt(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,Ke(e,t,ca,!1,!0),y=e.tag,f=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),Ke(e,t,ca,!1,!0),C=e.result),d?Xe(e,o,m,y,f,C,i,a,s):u?o.push(Xe(e,null,m,y,f,C,i,a,s)):o.push(f),xt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}V(e,"unexpected end of the stream within a flow collection")}g(Hc,"readFlowCollection");function jc(e,t){var r,i,a=Ja,s=!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)Ja===a?a=u===43?Sn:tx:V(e,"repeat of a chomping mode identifier");else if((c=Ic(u))>=0)c===0?V(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?V(e,"repeat of an indentation width identifier"):(o=t+c-1,n=!0);else break;if(Ee(u)){do u=e.input.charCodeAt(++e.position);while(Ee(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Qt(u)&&u!==0)}for(;u!==0;){for(Ia(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),Qt(u)){l++;continue}if(e.lineIndent<o){a===Sn?e.result+=wt.repeat(`
|
|
132
|
+
`,s?1+l:l):a===Ja&&s&&(e.result+=`
|
|
133
|
+
`);break}for(i?Ee(u)?(h=!0,e.result+=wt.repeat(`
|
|
134
|
+
`,s?1+l:l)):h?(h=!1,e.result+=wt.repeat(`
|
|
135
|
+
`,l+1)):l===0?s&&(e.result+=" "):e.result+=wt.repeat(`
|
|
136
|
+
`,l):e.result+=wt.repeat(`
|
|
137
|
+
`,s?1+l:l),s=!0,n=!0,l=0,r=e.position;!Qt(u)&&u!==0;)u=e.input.charCodeAt(++e.position);xe(e,r,e.position,!1)}return!0}g(jc,"readBlockScalar");function _s(e,t){var r,i=e.tag,a=e.anchor,s=[],n,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,V(e,"tab characters must not be used in indentation")),!(l!==45||(n=e.input.charCodeAt(e.position+1),!Dt(n))));){if(o=!0,e.position++,xt(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Ke(e,t,Mc,!1,!0),s.push(e.result),xt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)V(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}g(_s,"readBlockSequence");function Yc(e,t,r){var i,a,s,n,o,l,h=e.tag,c=e.anchor,u={},p=Object.create(null),d=null,m=null,f=null,y=!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(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,V(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Dt(i))b===63?(y&&(Xe(e,u,p,d,m,null,n,o,l),d=m=f=null),C=!0,y=!0,a=!0):y?(y=!1,a=!0):V(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,!Ke(e,r,Fc,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);Ee(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Dt(b)||V(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Xe(e,u,p,d,m,null,n,o,l),d=m=f=null),C=!0,y=!1,a=!1,d=e.tag,m=e.result;else if(C)V(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)V(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===s||e.lineIndent>t)&&(y&&(n=e.line,o=e.lineStart,l=e.position),Ke(e,t,ua,!0,a)&&(y?m=e.result:f=e.result),y||(Xe(e,u,p,d,m,f,n,o,l),d=m=f=null),xt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)V(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Xe(e,u,p,d,m,null,n,o,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}g(Yc,"readBlockMapping");function Xc(e){var t,r=!1,i=!1,a,s,n;if(n=e.input.charCodeAt(e.position),n!==33)return!1;if(e.tag!==null&&V(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,a="!!",n=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do n=e.input.charCodeAt(++e.position);while(n!==0&&n!==62);e.position<e.length?(s=e.input.slice(t,e.position),n=e.input.charCodeAt(++e.position)):V(e,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!Dt(n);)n===33&&(i?V(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Ac.test(a)||V(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),n=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),ix.test(s)&&V(e,"tag suffix cannot contain flow indicator characters")}s&&!Ec.test(s)&&V(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{V(e,"tag name is malformed: "+s)}return r?e.tag=s:$e.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:V(e,'undeclared tag handle "'+a+'"'),!0}g(Xc,"readTagProperty");function Uc(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&V(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Dt(r)&&!Ye(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&V(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(Uc,"readAnchorProperty");function Vc(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&&!Dt(i)&&!Ye(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&V(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),$e.call(e.anchorMap,r)||V(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],xt(e,!0,-1),!0}g(Vc,"readAlias");function Ke(e,t,r,i,a){var s,n,o,l=1,h=!1,c=!1,u,p,d,m,f,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=n=o=ua===r||Mc===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(;Xc(e)||Uc(e);)xt(e,!0,-1)?(h=!0,o=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=h||a),(l===1||ua===r)&&(ca===r||Fc===r?f=t:f=t+1,y=e.position-e.lineStart,l===1?o&&(_s(e,y)||Yc(e,y,f))||Hc(e,f)?c=!0:(n&&jc(e,f)||zc(e,f)||Nc(e,f)?c=!0:Vc(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&V(e,"alias node should not have any properties")):Wc(e,f,ca===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=o&&_s(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&V(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if(m=e.implicitTypes[u],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if($e.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=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){m=d[u];break}m||V(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&V(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):V(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(Ke,"composeNode");function Gc(e){var t=e.position,r,i,a,s=!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(s=!0,n=e.input.charCodeAt(++e.position),r=e.position;n!==0&&!Dt(n);)n=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&V(e,"directive name must not be less than one character in length");n!==0;){for(;Ee(n);)n=e.input.charCodeAt(++e.position);if(n===35){do n=e.input.charCodeAt(++e.position);while(n!==0&&!Qt(n));break}if(Qt(n))break;for(r=e.position;n!==0&&!Dt(n);)n=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}n!==0&&Ia(e),$e.call(vn,i)?vn[i](e,i,a):ui(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)):s&&V(e,"directives end mark is expected"),Ke(e,e.lineIndent-1,ua,!1,!0),xt(e,!0,-1),e.checkLineBreaks&&rx.test(e.input.slice(t,e.position))&&ui(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&wi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,xt(e,!0,-1));return}if(e.position<e.length-1)V(e,"end of the stream or a document separator is expected");else return}g(Gc,"readDocument");function Mo(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 qc(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,V(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;)Gc(r);return r.documents}g(Mo,"loadDocuments");function ax(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Mo(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}g(ax,"loadAll$1");function Zc(e,t){var r=Mo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new zt("expected a single document in the stream, but found more")}}g(Zc,"load$1");var sx=Zc,ox={load:sx},Kc=Object.prototype.toString,Qc=Object.prototype.hasOwnProperty,Ao=65279,nx=9,di=10,lx=13,hx=32,cx=33,ux=34,Ls=35,dx=37,px=38,gx=39,fx=42,Jc=44,mx=45,da=58,yx=61,Cx=62,xx=63,bx=64,tu=91,eu=93,kx=96,ru=123,Tx=124,iu=125,Ot={};Ot[0]="\\0";Ot[7]="\\a";Ot[8]="\\b";Ot[9]="\\t";Ot[10]="\\n";Ot[11]="\\v";Ot[12]="\\f";Ot[13]="\\r";Ot[27]="\\e";Ot[34]='\\"';Ot[92]="\\\\";Ot[133]="\\N";Ot[160]="\\_";Ot[8232]="\\L";Ot[8233]="\\P";var wx=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Sx=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function au(e,t){var r,i,a,s,n,o,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,s=i.length;a<s;a+=1)n=i[a],o=String(t[n]),n.slice(0,2)==="!!"&&(n="tag:yaml.org,2002:"+n.slice(2)),l=e.compiledTypeMap.fallback[n],l&&Qc.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[n]=o;return r}g(au,"compileStyleMap");function su(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 zt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+wt.repeat("0",i-t.length)+t}g(su,"encodeHex");var vx=1,pi=2;function ou(e){this.schema=e.schema||Lc,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==='"'?pi:vx,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(ou,"State");function Fs(e,t){for(var r=wt.repeat(" ",t),i=0,a=-1,s="",n,o=e.length;i<o;)a=e.indexOf(`
|
|
139
|
+
`,i),a===-1?(n=e.slice(i),i=o):(n=e.slice(i,a+1),i=a+1),n.length&&n!==`
|
|
140
|
+
`&&(s+=r),s+=n;return s}g(Fs,"indentString");function pa(e,t){return`
|
|
141
|
+
`+wt.repeat(" ",e.indent*t)}g(pa,"generateNextLine");function nu(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}g(nu,"testImplicitResolving");function gi(e){return e===hx||e===nx}g(gi,"isWhitespace");function $r(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ao||65536<=e&&e<=1114111}g($r,"isPrintable");function Ms(e){return $r(e)&&e!==Ao&&e!==lx&&e!==di}g(Ms,"isNsCharOrWhitespace");function As(e,t,r){var i=Ms(e),a=i&&!gi(e);return(r?i:i&&e!==Jc&&e!==tu&&e!==eu&&e!==ru&&e!==iu)&&e!==Ls&&!(t===da&&!a)||Ms(t)&&!gi(t)&&e===Ls||t===da&&a}g(As,"isPlainSafe");function lu(e){return $r(e)&&e!==Ao&&!gi(e)&&e!==mx&&e!==xx&&e!==da&&e!==Jc&&e!==tu&&e!==eu&&e!==ru&&e!==iu&&e!==Ls&&e!==px&&e!==fx&&e!==cx&&e!==Tx&&e!==yx&&e!==Cx&&e!==gx&&e!==ux&&e!==dx&&e!==bx&&e!==kx}g(lu,"isPlainSafeFirst");function hu(e){return!gi(e)&&e!==da}g(hu,"isPlainSafeLast");function ur(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(ur,"codePointAt");function Eo(e){var t=/^\n* /;return t.test(e)}g(Eo,"needIndentIndicator");var cu=1,Es=2,uu=3,du=4,lr=5;function pu(e,t,r,i,a,s,n,o){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,m=-1,f=lu(ur(e,0))&&hu(ur(e,e.length-1));if(t||n)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=ur(e,l),!$r(h))return lr;f=f&&As(h,c,o),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=ur(e,l),h===di)u=!0,d&&(p=p||l-m-1>i&&e[m+1]!==" ",m=l);else if(!$r(h))return lr;f=f&&As(h,c,o),c=h}p=p||d&&l-m-1>i&&e[m+1]!==" "}return!u&&!p?f&&!n&&!a(e)?cu:s===pi?lr:Es:r>9&&Eo(e)?lr:n?s===pi?lr:Es:p?du:uu}g(pu,"chooseScalarStyle");function gu(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===pi?'""':"''";if(!e.noCompatMode&&(wx.indexOf(t)!==-1||Sx.test(t)))return e.quotingType===pi?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return nu(e,h)}switch(g(l,"testAmbiguity"),pu(t,o,e.indent,n,l,e.quotingType,e.forceQuotes&&!i,a)){case cu:return t;case Es:return"'"+t.replace(/'/g,"''")+"'";case uu:return"|"+$s(t,e.indent)+Os(Fs(t,s));case du:return">"+$s(t,e.indent)+Os(Fs(fu(t,n),s));case lr:return'"'+mu(t)+'"';default:throw new zt("impossible error: invalid scalar style")}}()}g(gu,"writeScalar");function $s(e,t){var r=Eo(e)?String(t):"",i=e[e.length-1]===`
|
|
142
|
+
`,a=i&&(e[e.length-2]===`
|
|
143
|
+
`||e===`
|
|
144
|
+
`),s=a?"+":i?"":"-";return r+s+`
|
|
145
|
+
`}g($s,"blockHeader");function Os(e){return e[e.length-1]===`
|
|
146
|
+
`?e.slice(0,-1):e}g(Os,"dropEndingNewline");function fu(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,Is(e.slice(0,h),t)}(),a=e[0]===`
|
|
148
|
+
`||e[0]===" ",s,n;n=r.exec(e);){var o=n[1],l=n[2];s=l[0]===" ",i+=o+(!a&&!s&&l!==""?`
|
|
149
|
+
`:"")+Is(l,t),a=s}return i}g(fu,"foldString");function Is(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,s,n=0,o=0,l="";i=r.exec(e);)o=i.index,o-a>t&&(s=n>a?n:o,l+=`
|
|
150
|
+
`+e.slice(a,s),a=s+1),n=o;return l+=`
|
|
151
|
+
`,e.length-a>t&&n>a?l+=e.slice(a,n)+`
|
|
152
|
+
`+e.slice(n+1):l+=e.slice(a),l.slice(1)}g(Is,"foldLine");function mu(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=ur(e,a),i=Ot[r],!i&&$r(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||su(r);return t}g(mu,"escapeString");function yu(e,t,r){var i="",a=e.tag,s,n,o;for(s=0,n=r.length;s<n;s+=1)o=r[s],e.replacer&&(o=e.replacer.call(r,String(s),o)),(he(e,t,o,!1,!1)||typeof o>"u"&&he(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}g(yu,"writeFlowSequence");function Ds(e,t,r,i){var a="",s=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)),(he(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&he(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=pa(e,t)),e.dump&&di===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}g(Ds,"writeBlockSequence");function Cu(e,t,r){var i="",a=e.tag,s=Object.keys(r),n,o,l,h,c;for(n=0,o=s.length;n<o;n+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=s[n],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),he(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),he(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=a,e.dump="{"+i+"}"}g(Cu,"writeFlowMapping");function xu(e,t,r,i){var a="",s=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 zt("sortKeys must be a boolean or a function");for(o=0,l=n.length;o<l;o+=1)p="",(!i||a!=="")&&(p+=pa(e,t)),h=n[o],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),he(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&di===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=pa(e,t)),he(e,t+1,c,!0,u)&&(e.dump&&di===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,a+=p));e.tag=s,e.dump=a||"{}"}g(xu,"writeBlockMapping");function Ps(e,t,r){var i,a,s,n,o,l;for(a=r?e.explicitTypes:e.implicitTypes,s=0,n=a.length;s<n;s+=1)if(o=a[s],(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,Kc.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(Qc.call(o.represent,l))i=o.represent[l](t,l);else throw new zt("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(Ps,"detectType");function he(e,t,r,i,a,s,n){e.tag=null,e.dump=r,Ps(e,r,!1)||Ps(e,r,!0);var o=Kc.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)&&(a=!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,a),p&&(e.dump="&ref_"+u+e.dump)):(Cu(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?Ds(e,t-1,e.dump,a):Ds(e,t,e.dump,a),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!=="?"&&gu(e,e.dump,t,s,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new zt("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(he,"writeNode");function bu(e,t){var r=[],i=[],a,s;for(ga(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}g(bu,"getDuplicateReferences");function ga(e,t,r){var i,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)ga(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)ga(e[i[a]],t,r)}g(ga,"inspectNode");function Bx(e,t){t=t||{};var r=new ou(t);r.noRefs||bu(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),he(r,0,i,!0,!0)?r.dump+`
|
|
153
|
+
`:""}g(Bx,"dump$1");function _x(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(_x,"renamed");var Lx=uc,Fx=ox.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 Nr=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"),Et={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},Bn={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Jr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=mt(e),t=mt(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],n=a-r,o=s-i;return{angle:Math.atan(o/n),deltaX:n,deltaY:o}}g(Jr,"calculateDeltaAndAngle");var mt=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Mx=g(e=>({x:g(function(t,r,i){let a=0;const s=mt(i[0]).x<mt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:d,deltaX:m}=Jr(i[0],i[1]);a=Et[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:d,deltaX:m}=Jr(i[i.length-1],i[i.length-2]);a=Et[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const n=Math.abs(mt(t).x-mt(i[i.length-1]).x),o=Math.abs(mt(t).y-mt(i[i.length-1]).y),l=Math.abs(mt(t).x-mt(i[0]).x),h=Math.abs(mt(t).y-mt(i[0]).y),c=Et[e.arrowTypeStart],u=Et[e.arrowTypeEnd],p=1;if(n<u&&n>0&&o<u){let d=u+p-n;d*=s==="right"?-1:1,a-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=s==="right"?-1:1,a+=d}return mt(t).x+a},"x"),y:g(function(t,r,i){let a=0;const s=mt(i[0]).y<mt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:d,deltaY:m}=Jr(i[0],i[1]);a=Et[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:d,deltaY:m}=Jr(i[i.length-1],i[i.length-2]);a=Et[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const n=Math.abs(mt(t).y-mt(i[i.length-1]).y),o=Math.abs(mt(t).x-mt(i[i.length-1]).x),l=Math.abs(mt(t).y-mt(i[0]).y),h=Math.abs(mt(t).x-mt(i[0]).x),c=Et[e.arrowTypeStart],u=Et[e.arrowTypeEnd],p=1;if(n<u&&n>0&&o<u){let d=u+p-n;d*=s==="up"?-1:1,a-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=s==="up"?-1:1,a+=d}return mt(t).y+a},"y")}),"getLineFunctionsWithOffset"),ku={},Bt={};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.BLANK_URL=Bt.relativeFirstCharacters=Bt.whitespaceEscapeCharsRegex=Bt.urlSchemeRegex=Bt.ctrlCharactersRegex=Bt.htmlCtrlEntityRegex=Bt.htmlEntitiesRegex=Bt.invalidProtocolRegex=void 0;Bt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Bt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Bt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Bt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Bt.urlSchemeRegex=/^.+(:|:)/gim;Bt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Bt.relativeFirstCharacters=[".","/"];Bt.BLANK_URL="about:blank";Object.defineProperty(ku,"__esModule",{value:!0});var Ax=ku.sanitizeUrl=Ix,At=Bt;function Ex(e){return At.relativeFirstCharacters.indexOf(e[0])>-1}function $x(e){var t=e.replace(At.ctrlCharactersRegex,"");return t.replace(At.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function Ox(e){return URL.canParse(e)}function _n(e){try{return decodeURIComponent(e)}catch{return e}}function Ix(e){if(!e)return At.BLANK_URL;var t,r=_n(e.trim());do r=$x(r).replace(At.htmlCtrlEntityRegex,"").replace(At.ctrlCharactersRegex,"").replace(At.whitespaceEscapeCharsRegex,"").trim(),r=_n(r),t=r.match(At.ctrlCharactersRegex)||r.match(At.htmlEntitiesRegex)||r.match(At.htmlCtrlEntityRegex)||r.match(At.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return At.BLANK_URL;if(Ex(i))return i;var a=i.trimStart(),s=a.match(At.urlSchemeRegex);if(!s)return i;var n=s[0].toLowerCase().trim();if(At.invalidProtocolRegex.test(n))return At.BLANK_URL;var o=a.replace(/\\/g,"/");if(n==="mailto:"||n.includes("://"))return o;if(n==="http:"||n==="https:"){if(!Ox(o))return At.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}var Tu=typeof global=="object"&&global&&global.Object===Object&&global,Dx=typeof self=="object"&&self&&self.Object===Object&&self,pe=Tu||Dx||Function("return this")(),fa=pe.Symbol,wu=Object.prototype,Px=wu.hasOwnProperty,Rx=wu.toString,Hr=fa?fa.toStringTag:void 0;function qx(e){var t=Px.call(e,Hr),r=e[Hr];try{e[Hr]=void 0;var i=!0}catch{}var a=Rx.call(e);return i&&(t?e[Hr]=r:delete e[Hr]),a}var Wx=Object.prototype,zx=Wx.toString;function Nx(e){return zx.call(e)}var Hx="[object Null]",jx="[object Undefined]",Ln=fa?fa.toStringTag:void 0;function Dr(e){return e==null?e===void 0?jx:Hx:Ln&&Ln in Object(e)?qx(e):Nx(e)}function rr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Yx="[object AsyncFunction]",Xx="[object Function]",Ux="[object GeneratorFunction]",Vx="[object Proxy]";function $o(e){if(!rr(e))return!1;var t=Dr(e);return t==Xx||t==Ux||t==Yx||t==Vx}var ts=pe["__core-js_shared__"],Fn=function(){var e=/[^.]+$/.exec(ts&&ts.keys&&ts.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Gx(e){return!!Fn&&Fn in e}var Zx=Function.prototype,Kx=Zx.toString;function ir(e){if(e!=null){try{return Kx.call(e)}catch{}try{return e+""}catch{}}return""}var Qx=/[\\^$.*+?()[\]{}|]/g,Jx=/^\[object .+?Constructor\]$/,tb=Function.prototype,eb=Object.prototype,rb=tb.toString,ib=eb.hasOwnProperty,ab=RegExp("^"+rb.call(ib).replace(Qx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sb(e){if(!rr(e)||Gx(e))return!1;var t=$o(e)?ab:Jx;return t.test(ir(e))}function ob(e,t){return e==null?void 0:e[t]}function ar(e,t){var r=ob(e,t);return sb(r)?r:void 0}var fi=ar(Object,"create");function nb(){this.__data__=fi?fi(null):{},this.size=0}function lb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var hb="__lodash_hash_undefined__",cb=Object.prototype,ub=cb.hasOwnProperty;function db(e){var t=this.__data__;if(fi){var r=t[e];return r===hb?void 0:r}return ub.call(t,e)?t[e]:void 0}var pb=Object.prototype,gb=pb.hasOwnProperty;function fb(e){var t=this.__data__;return fi?t[e]!==void 0:gb.call(t,e)}var mb="__lodash_hash_undefined__";function yb(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fi&&t===void 0?mb:t,this}function Qe(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])}}Qe.prototype.clear=nb;Qe.prototype.delete=lb;Qe.prototype.get=db;Qe.prototype.has=fb;Qe.prototype.set=yb;function Cb(){this.__data__=[],this.size=0}function Pa(e,t){return e===t||e!==e&&t!==t}function Ra(e,t){for(var r=e.length;r--;)if(Pa(e[r][0],t))return r;return-1}var xb=Array.prototype,bb=xb.splice;function kb(e){var t=this.__data__,r=Ra(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():bb.call(t,r,1),--this.size,!0}function Tb(e){var t=this.__data__,r=Ra(t,e);return r<0?void 0:t[r][1]}function wb(e){return Ra(this.__data__,e)>-1}function Sb(e,t){var r=this.__data__,i=Ra(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function we(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])}}we.prototype.clear=Cb;we.prototype.delete=kb;we.prototype.get=Tb;we.prototype.has=wb;we.prototype.set=Sb;var mi=ar(pe,"Map");function vb(){this.size=0,this.__data__={hash:new Qe,map:new(mi||we),string:new Qe}}function Bb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function qa(e,t){var r=e.__data__;return Bb(t)?r[typeof t=="string"?"string":"hash"]:r.map}function _b(e){var t=qa(this,e).delete(e);return this.size-=t?1:0,t}function Lb(e){return qa(this,e).get(e)}function Fb(e){return qa(this,e).has(e)}function Mb(e,t){var r=qa(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function De(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])}}De.prototype.clear=vb;De.prototype.delete=_b;De.prototype.get=Lb;De.prototype.has=Fb;De.prototype.set=Mb;var Ab="Expected a function";function Si(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ab);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);var n=e.apply(this,i);return r.cache=s.set(a,n)||s,n};return r.cache=new(Si.Cache||De),r}Si.Cache=De;function Eb(){this.__data__=new we,this.size=0}function $b(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Ob(e){return this.__data__.get(e)}function Ib(e){return this.__data__.has(e)}var Db=200;function Pb(e,t){var r=this.__data__;if(r instanceof we){var i=r.__data__;if(!mi||i.length<Db-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new De(i)}return r.set(e,t),this.size=r.size,this}function Pr(e){var t=this.__data__=new we(e);this.size=t.size}Pr.prototype.clear=Eb;Pr.prototype.delete=$b;Pr.prototype.get=Ob;Pr.prototype.has=Ib;Pr.prototype.set=Pb;var ma=function(){try{var e=ar(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Oo(e,t,r){t=="__proto__"&&ma?ma(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Rs(e,t,r){(r!==void 0&&!Pa(e[t],r)||r===void 0&&!(t in e))&&Oo(e,t,r)}function Rb(e){return function(t,r,i){for(var a=-1,s=Object(t),n=i(t),o=n.length;o--;){var l=n[++a];if(r(s[l],l,s)===!1)break}return t}}var qb=Rb(),Su=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mn=Su&&typeof module=="object"&&module&&!module.nodeType&&module,Wb=Mn&&Mn.exports===Su,An=Wb?pe.Buffer:void 0,En=An?An.allocUnsafe:void 0;function zb(e,t){if(t)return e.slice();var r=e.length,i=En?En(r):new e.constructor(r);return e.copy(i),i}var $n=pe.Uint8Array;function Nb(e){var t=new e.constructor(e.byteLength);return new $n(t).set(new $n(e)),t}function Hb(e,t){var r=t?Nb(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function jb(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var On=Object.create,Yb=function(){function e(){}return function(t){if(!rr(t))return{};if(On)return On(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function vu(e,t){return function(r){return e(t(r))}}var Bu=vu(Object.getPrototypeOf,Object),Xb=Object.prototype;function Wa(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Xb;return e===r}function Ub(e){return typeof e.constructor=="function"&&!Wa(e)?Yb(Bu(e)):{}}function vi(e){return e!=null&&typeof e=="object"}var Vb="[object Arguments]";function In(e){return vi(e)&&Dr(e)==Vb}var _u=Object.prototype,Gb=_u.hasOwnProperty,Zb=_u.propertyIsEnumerable,ya=In(function(){return arguments}())?In:function(e){return vi(e)&&Gb.call(e,"callee")&&!Zb.call(e,"callee")},Ca=Array.isArray,Kb=9007199254740991;function Lu(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Kb}function za(e){return e!=null&&Lu(e.length)&&!$o(e)}function Qb(e){return vi(e)&&za(e)}function Jb(){return!1}var Fu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dn=Fu&&typeof module=="object"&&module&&!module.nodeType&&module,t1=Dn&&Dn.exports===Fu,Pn=t1?pe.Buffer:void 0,e1=Pn?Pn.isBuffer:void 0,Io=e1||Jb,r1="[object Object]",i1=Function.prototype,a1=Object.prototype,Mu=i1.toString,s1=a1.hasOwnProperty,o1=Mu.call(Object);function n1(e){if(!vi(e)||Dr(e)!=r1)return!1;var t=Bu(e);if(t===null)return!0;var r=s1.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Mu.call(r)==o1}var l1="[object Arguments]",h1="[object Array]",c1="[object Boolean]",u1="[object Date]",d1="[object Error]",p1="[object Function]",g1="[object Map]",f1="[object Number]",m1="[object Object]",y1="[object RegExp]",C1="[object Set]",x1="[object String]",b1="[object WeakMap]",k1="[object ArrayBuffer]",T1="[object DataView]",w1="[object Float32Array]",S1="[object Float64Array]",v1="[object Int8Array]",B1="[object Int16Array]",_1="[object Int32Array]",L1="[object Uint8Array]",F1="[object Uint8ClampedArray]",M1="[object Uint16Array]",A1="[object Uint32Array]",ft={};ft[w1]=ft[S1]=ft[v1]=ft[B1]=ft[_1]=ft[L1]=ft[F1]=ft[M1]=ft[A1]=!0;ft[l1]=ft[h1]=ft[k1]=ft[c1]=ft[T1]=ft[u1]=ft[d1]=ft[p1]=ft[g1]=ft[f1]=ft[m1]=ft[y1]=ft[C1]=ft[x1]=ft[b1]=!1;function E1(e){return vi(e)&&Lu(e.length)&&!!ft[Dr(e)]}function $1(e){return function(t){return e(t)}}var Au=typeof exports=="object"&&exports&&!exports.nodeType&&exports,oi=Au&&typeof module=="object"&&module&&!module.nodeType&&module,O1=oi&&oi.exports===Au,es=O1&&Tu.process,Rn=function(){try{var e=oi&&oi.require&&oi.require("util").types;return e||es&&es.binding&&es.binding("util")}catch{}}(),qn=Rn&&Rn.isTypedArray,Do=qn?$1(qn):E1;function qs(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var I1=Object.prototype,D1=I1.hasOwnProperty;function P1(e,t,r){var i=e[t];(!(D1.call(e,t)&&Pa(i,r))||r===void 0&&!(t in e))&&Oo(e,t,r)}function R1(e,t,r,i){var a=!r;r||(r={});for(var s=-1,n=t.length;++s<n;){var o=t[s],l=void 0;l===void 0&&(l=e[o]),a?Oo(r,o,l):P1(r,o,l)}return r}function q1(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var W1=9007199254740991,z1=/^(?:0|[1-9]\d*)$/;function Eu(e,t){var r=typeof e;return t=t??W1,!!t&&(r=="number"||r!="symbol"&&z1.test(e))&&e>-1&&e%1==0&&e<t}var N1=Object.prototype,H1=N1.hasOwnProperty;function j1(e,t){var r=Ca(e),i=!r&&ya(e),a=!r&&!i&&Io(e),s=!r&&!i&&!a&&Do(e),n=r||i||a||s,o=n?q1(e.length,String):[],l=o.length;for(var h in e)(t||H1.call(e,h))&&!(n&&(h=="length"||a&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Eu(h,l)))&&o.push(h);return o}function Y1(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var X1=Object.prototype,U1=X1.hasOwnProperty;function V1(e){if(!rr(e))return Y1(e);var t=Wa(e),r=[];for(var i in e)i=="constructor"&&(t||!U1.call(e,i))||r.push(i);return r}function $u(e){return za(e)?j1(e,!0):V1(e)}function G1(e){return R1(e,$u(e))}function Z1(e,t,r,i,a,s,n){var o=qs(e,r),l=qs(t,r),h=n.get(l);if(h){Rs(e,r,h);return}var c=s?s(o,l,r+"",e,t,n):void 0,u=c===void 0;if(u){var p=Ca(l),d=!p&&Io(l),m=!p&&!d&&Do(l);c=l,p||d||m?Ca(o)?c=o:Qb(o)?c=jb(o):d?(u=!1,c=zb(l,!0)):m?(u=!1,c=Hb(l,!0)):c=[]:n1(l)||ya(l)?(c=o,ya(o)?c=G1(o):(!rr(o)||$o(o))&&(c=Ub(l))):u=!1}u&&(n.set(l,c),a(c,l,i,s,n),n.delete(l)),Rs(e,r,c)}function Ou(e,t,r,i,a){e!==t&&qb(t,function(s,n){if(a||(a=new Pr),rr(s))Z1(e,t,n,r,Ou,i,a);else{var o=i?i(qs(e,n),s,n+"",e,t,a):void 0;o===void 0&&(o=s),Rs(e,n,o)}},$u)}function Iu(e){return e}function K1(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 Wn=Math.max;function Q1(e,t,r){return t=Wn(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=Wn(i.length-t,0),n=Array(s);++a<s;)n[a]=i[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=i[a];return o[t]=r(n),K1(e,this,o)}}function J1(e){return function(){return e}}var tk=ma?function(e,t){return ma(e,"toString",{configurable:!0,enumerable:!1,value:J1(t),writable:!0})}:Iu,ek=800,rk=16,ik=Date.now;function ak(e){var t=0,r=0;return function(){var i=ik(),a=rk-(i-r);if(r=i,a>0){if(++t>=ek)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var sk=ak(tk);function ok(e,t){return sk(Q1(e,t,Iu),e+"")}function nk(e,t,r){if(!rr(r))return!1;var i=typeof t;return(i=="number"?za(r)&&Eu(t,r.length):i=="string"&&t in r)?Pa(r[t],e):!1}function lk(e){return ok(function(t,r){var i=-1,a=r.length,s=a>1?r[a-1]:void 0,n=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,n&&nk(r[0],r[1],n)&&(s=a<3?void 0:s,a=1),t=Object(t);++i<a;){var o=r[i];o&&e(t,o,i,s)}return t})}var hk=lk(function(e,t,r){Ou(e,t,r)}),ck="",uk={curveBasis:ds,curveBasisClosed:ef,curveBasisOpen:tf,curveBumpX:jl,curveBumpY:Hl,curveBundle:y0,curveCardinalClosed:C0,curveCardinalOpen:x0,curveCardinal:Ih,curveCatmullRomClosed:b0,curveCatmullRomOpen:k0,curveCatmullRom:Ph,curveLinear:qi,curveLinearClosed:Jg,curveMonotoneX:Nl,curveMonotoneY:zl,curveNatural:Wl,curveStep:ql,curveStepAfter:Rl,curveStepBefore:Pl},dk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,pk=g(function(e,t){const r=Du(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(o=>o.args);Ji(n),i=Tt(i,[...n])}else i=r.args;if(!i)return;let a=ho(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),Du=g(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${dk.source})(?=[}][%]{2}).*
|
|
158
|
+
`,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const n=[];for(;(s=ai.exec(e))!==null;)if(s.index===ai.lastIndex&&ai.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const o=s[1]?s[1]:s[2],l=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;n.push({type:o,args:l})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(a){return P.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),gk=g(function(e){return e.replace(ai,"")},"removeDirectives"),fk=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Po(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return uk[r]??t}g(Po,"interpolateToCurve");function Pu(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Ax(r):r}g(Pu,"formatUrl");var mk=g((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let n=0;n<i;n++)if(s=s[r[n]],!s){P.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function Ro(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(Ro,"distance");function Ru(e){let t,r=0;e.forEach(a=>{r+=Ro(a,t),t=a});const i=r/2;return qo(e,i)}g(Ru,"traverseEdge");function qu(e){return e.length===1?e[0]:Ru(e)}g(qu,"calcLabelPosition");var zn=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),qo=g((e,t)=>{let r,i=t;for(const a of e){if(r){const s=Ro(a,r);if(s===0)return r;if(s<i)i-=s;else{const n=i/s;if(n<=0)return r;if(n>=1)return{x:a.x,y:a.y};if(n>0&&n<1)return{x:zn((1-n)*r.x+n*a.x,5),y:zn((1-n)*r.y+n*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),yk=g((e,t,r)=>{P.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=qo(t,25),s=e?10:5,n=Math.atan2(t[0].y-a.y,t[0].x-a.x),o={x:0,y:0};return o.x=Math.sin(n)*s+(t[0].x+a.x)/2,o.y=-Math.cos(n)*s+(t[0].y+a.y)/2,o},"calcCardinalityPosition");function Wu(e,t,r){const i=structuredClone(r);P.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=qo(i,a),n=10+e*.5,o=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*n+(i[0].x+s.x)/2,l.y=-Math.cos(o+Math.PI)*n+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*n+(i[0].x+s.x)/2-5,l.y=-Math.cos(o-Math.PI)*n+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*n+(i[0].x+s.x)/2-5,l.y=-Math.cos(o)*n+(i[0].y+s.y)/2-5):(l.x=Math.sin(o)*n+(i[0].x+s.x)/2,l.y=-Math.cos(o)*n+(i[0].y+s.y)/2),l}g(Wu,"calcTerminalLabelPosition");function zu(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(zu,"getStylesFromArray");var Nn=0,Ck=g(()=>(Nn++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Nn),"generateId");function Nu(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(Nu,"makeRandomHex");var xk=g(e=>Nu(e.length),"random"),bk=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"),kk=g(function(e,t){const r=t.text.replace(ki.lineBreakRegex," "),[,i]=Na(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),Tk=Si((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ki.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((n,o)=>{const l=ke(`${n} `,r),h=ke(s,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=wk(n,t,"-",r);a.push(s,...p),s=d}else h+l>=t?(a.push(s),s=n):s=[s,n].filter(Boolean).join(" ");o+1===i.length&&a.push(s)}),a.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),wk=Si((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let n="";return a.forEach((o,l)=>{const h=`${n}${o}`;if(ke(h,i)>=t){const u=l+1,p=a.length===u,d=`${h}${r}`;s.push(p?h:d),n=""}else n=h}),{hyphenatedStrings:s,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Hu(e,t){return Wo(e,t).height}g(Hu,"calculateTextHeight");function ke(e,t){return Wo(e,t).width}g(ke,"calculateTextWidth");var Wo=Si((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=Na(r),n=["sans-serif",i],o=e.split(ki.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 m={width:0,height:0,lineHeight:0};for(const f of o){const y=bk();y.text=f||ck;const C=kk(c,y).style("font-size",s).style("font-weight",a).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");m.width=Math.round(Math.max(m.width,b.width)),d=Math.round(b.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}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}`),_r,Sk=(_r=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(_r,"InitIDGenerator"),_r),Ai,vk=g(function(e){return Ai=Ai||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ai.innerHTML=e,unescape(Ai.textContent)},"entityDecode");function zo(e){return"str"in e}g(zo,"isDetailedError");var Bk=g((e,t,r,i)=>{var s;if(!i)return;const a=(s=e.node())==null?void 0:s.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Na=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 No(e,t){return hk({},e,t)}g(No,"cleanAndMerge");var Kt={assignWithDepth:Tt,wrapLabel:Tk,calculateTextHeight:Hu,calculateTextWidth:ke,calculateTextDimensions:Wo,cleanAndMerge:No,detectInit:pk,detectDirective:Du,isSubstringInArray:fk,interpolateToCurve:Po,calcLabelPosition:qu,calcCardinalityPosition:yk,calcTerminalLabelPosition:Wu,formatUrl:Pu,getStylesFromArray:zu,generateId:Ck,random:xk,runFunc:mk,entityDecode:vk,insertTitle:Bk,isLabelCoordinateInPath:ju,parseFontSize:Na,InitIDGenerator:Sk},_k=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"),Je=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),KB=g((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function _t(e){return e??null}g(_t,"handleUndefinedAttr");function ju(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}g(ju,"isLabelCoordinateInPath");var Ho=g(({flowchart:e})=>{var a,s;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Yu(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(a=>new Promise(s=>{function n(){if(a.style.display="flex",a.style.flexDirection="column",i){const o=ht().fontSize?ht().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=th.fontSize]=Na(o),c=h*l+"px";a.style.minWidth=c,a.style.maxWidth=c}else a.style.width="100%";s(a)}g(n,"setupImage"),setTimeout(()=>{a.complete&&n()}),a.addEventListener("error",n),a.addEventListener("load",n)})))}g(Yu,"configureLabelImages");var Lk=g(e=>{const{handDrawnSeed:t}=ht();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Rr=g(e=>{const t=Fk([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Fk=g(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),Xu=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}=Rr(e),r=[],i=[],a=[],s=[];return t.forEach(n=>{const o=n[0];Xu(o)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),o.includes("stroke")&&a.push(n.join(":")+" !important"),o==="fill"&&s.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),Y=g((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=ht(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:n}=Rr(e);return Object.assign({roughness:.7,fill:n.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:n.get("stroke")||a,seed:i,strokeWidth:((l=n.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:Mk(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),Mk=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const Ak=Object.freeze({left:0,top:0,width:16,height:16}),xa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Uu=Object.freeze({...Ak,...xa}),Ek=Object.freeze({...Uu,body:"",hidden:!1}),$k=Object.freeze({width:null,height:null}),Ok=Object.freeze({...$k,...xa}),Ik=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const o=a.pop(),l=a.pop(),h={provider:a.length>0?a[0]:i,prefix:l,name:o};return rs(h)?h:null}const s=a[0],n=s.split("-");if(n.length>1){const o={provider:i,prefix:n.shift(),name:n.join("-")};return rs(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:s};return rs(o,r)?o:null}return null},rs=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Dk(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 Hn(e,t){const r=Dk(e,t);for(const i in Ek)i in xa?i in e&&!(i in r)&&(r[i]=xa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Pk(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(n){if(r[n])return a[n]=[];if(!(n in a)){a[n]=null;const o=i[n]&&i[n].parent,l=o&&s(o);l&&(a[n]=[o].concat(l))}return a[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function jn(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function n(o){s=Hn(i[o]||a[o],s)}return n(t),r.forEach(n),Hn(e,s)}function Rk(e,t){if(e.icons[t])return jn(e,t,[]);const r=Pk(e,[t])[t];return r?jn(e,t,r):null}const qk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Wk=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Yn(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(qk);if(i===null||!i.length)return e;const a=[];let s=i.shift(),n=Wk.test(s);for(;;){if(n){const o=parseFloat(s);isNaN(o)?a.push(s):a.push(Math.ceil(o*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");n=!n}}function zk(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const n=e.indexOf(">",s);if(n===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function Nk(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Hk(e,t,r){const i=zk(e);return Nk(i.defs,t+i.content+r)}const jk=e=>e==="unset"||e==="undefined"||e==="none";function Yk(e,t){const r={...Uu,...e},i={...Ok,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(f=>{const y=[],C=f.hFlip,b=f.vFlip;let k=f.rotate;C?b?k+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let S;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:S=a.height/2+a.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:S=a.width/2+a.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}k%2===1&&(a.left!==a.top&&(S=a.left,a.left=a.top,a.top=S),a.width!==a.height&&(S=a.width,a.width=a.height,a.height=S)),y.length&&(s=Hk(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const n=i.width,o=i.height,l=a.width,h=a.height;let c,u;n===null?(u=o===null?"1em":o==="auto"?h:o,c=Yn(u,l/h)):(c=n==="auto"?l:n,u=o===null?Yn(c,h/l):o==="auto"?h:o);const p={},d=(f,y)=>{jk(y)||(p[f]=y.toString())};d("width",c),d("height",u);const m=[a.left,a.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:s}}const Xk=/\sid="(\S+)"/g,Xn=new Map;function Uk(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Xn.get(e)||0;return Xn.set(e,t+1),t?`${e}${t}`:e}function Vk(e){const t=[];let r;for(;r=Xk.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const s=Uk(a),n=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Gk(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 jo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var sr=jo();function Vu(e){sr=e}var ni={exec:()=>null};function ct(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,s)=>{let n=typeof s=="string"?s:s.source;return n=n.replace(Pt.caret,"$1"),r=r.replace(a,n),i},getRegex:()=>new RegExp(r,t)};return i}var Zk=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Pt={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")},Kk=/^(?:[ \t]*(?:\n|$))+/,Qk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Jk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Bi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,t2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yo=/(?:[*+-]|\d{1,9}[.)])/,Gu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Zu=ct(Gu).replace(/bull/g,Yo).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(),e2=ct(Gu).replace(/bull/g,Yo).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(),Xo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,r2=/^[^\n]+/,Uo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,i2=ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Uo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),a2=ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yo).getRegex(),Ha="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",Vo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,s2=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",Vo).replace("tag",Ha).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ku=ct(Xo).replace("hr",Bi).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",Ha).getRegex(),o2=ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ku).getRegex(),Go={blockquote:o2,code:Qk,def:i2,fences:Jk,heading:t2,hr:Bi,html:s2,lheading:Zu,list:a2,newline:Kk,paragraph:Ku,table:ni,text:r2},Un=ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Bi).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",Ha).getRegex(),n2={...Go,lheading:e2,table:Un,paragraph:ct(Xo).replace("hr",Bi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Un).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",Ha).getRegex()},l2={...Go,html:ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Vo).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:ni,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ct(Xo).replace("hr",Bi).replace("heading",` *#{1,6} *[^
|
|
159
|
+
]`).replace("lheading",Zu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},h2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,c2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qu=/^( {2,}|\\)\n(?!\s*$)/,u2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ja=/[\p{P}\p{S}]/u,Zo=/[\s\p{P}\p{S}]/u,Ju=/[^\s\p{P}\p{S}]/u,d2=ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zo).getRegex(),td=/(?!~)[\p{P}\p{S}]/u,p2=/(?!~)[\s\p{P}\p{S}]/u,g2=/(?:[^\s\p{P}\p{S}]|~)/u,f2=ct(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Zk?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ed=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,m2=ct(ed,"u").replace(/punct/g,ja).getRegex(),y2=ct(ed,"u").replace(/punct/g,td).getRegex(),rd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",C2=ct(rd,"gu").replace(/notPunctSpace/g,Ju).replace(/punctSpace/g,Zo).replace(/punct/g,ja).getRegex(),x2=ct(rd,"gu").replace(/notPunctSpace/g,g2).replace(/punctSpace/g,p2).replace(/punct/g,td).getRegex(),b2=ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ju).replace(/punctSpace/g,Zo).replace(/punct/g,ja).getRegex(),k2=ct(/\\(punct)/,"gu").replace(/punct/g,ja).getRegex(),T2=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(),w2=ct(Vo).replace("(?:-->|$)","-->").getRegex(),S2=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",w2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ba=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,v2=ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ba).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),id=ct(/^!?\[(label)\]\[(ref)\]/).replace("label",ba).replace("ref",Uo).getRegex(),ad=ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",Uo).getRegex(),B2=ct("reflink|nolink(?!\\()","g").replace("reflink",id).replace("nolink",ad).getRegex(),Vn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ko={_backpedal:ni,anyPunctuation:k2,autolink:T2,blockSkip:f2,br:Qu,code:c2,del:ni,emStrongLDelim:m2,emStrongRDelimAst:C2,emStrongRDelimUnd:b2,escape:h2,link:v2,nolink:ad,punctuation:d2,reflink:id,reflinkSearch:B2,tag:S2,text:u2,url:ni},_2={...Ko,link:ct(/^!?\[(label)\]\((.*?)\)/).replace("label",ba).getRegex(),reflink:ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ba).getRegex()},Ws={...Ko,emStrongRDelimAst:x2,emStrongLDelim:y2,url:ct(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Vn).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",Vn).getRegex()},L2={...Ws,br:ct(Qu).replace("{2,}","*").getRegex(),text:ct(Ws.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ei={normal:Go,gfm:n2,pedantic:l2},jr={normal:Ko,gfm:Ws,breaks:L2,pedantic:_2},F2={"&":"&","<":"<",">":">",'"':""","'":"'"},Gn=e=>F2[e];function se(e,t){if(t){if(Pt.escapeTest.test(e))return e.replace(Pt.escapeReplace,Gn)}else if(Pt.escapeTestNoEncode.test(e))return e.replace(Pt.escapeReplaceNoEncode,Gn);return e}function Zn(e){try{e=encodeURI(e).replace(Pt.percentDecode,"%")}catch{return null}return e}function Kn(e,t){var s;let r=e.replace(Pt.findPipe,(n,o,l)=>{let h=!1,c=o;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Pt.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(Pt.slashPipe,"|");return i}function Yr(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function M2(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 Qn(e,t,r,i,a){let s=t.href,n=t.title||null,o=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function A2(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
|
|
160
|
+
`).map(s=>{let n=s.match(r.other.beginningSpace);if(n===null)return s;let[o]=n;return o.length>=a.length?s.slice(a.length):s}).join(`
|
|
161
|
+
`)}var ka=class{constructor(t){pt(this,"options");pt(this,"rules");pt(this,"lexer");this.options=t||sr}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:Yr(i,`
|
|
162
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=A2(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:a}}}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 a=Yr(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.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:Yr(r[0],`
|
|
163
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Yr(r[0],`
|
|
164
|
+
`).split(`
|
|
165
|
+
`),a="",s="",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,"");a=a?`${a}
|
|
168
|
+
${c}`:c,s=s?`${s}
|
|
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 m=d,f=m.raw+`
|
|
170
|
+
`+i.join(`
|
|
171
|
+
`),y=this.blockquote(f);n[n.length-1]=y,a=a.substring(0,a.length-m.raw.length)+y.raw,s=s.substring(0,s.length-m.text.length)+y.text;break}else if((d==null?void 0:d.type)==="list"){let m=d,f=m.raw+`
|
|
172
|
+
`+i.join(`
|
|
173
|
+
`),y=this.list(f);n[n.length-1]=y,a=a.substring(0,a.length-d.raw.length)+y.raw,s=s.substring(0,s.length-m.raw.length)+y.raw,i=f.substring(n.at(-1).raw.length).split(`
|
|
174
|
+
`);continue}}return{type:"blockquote",raw:a,tokens:n,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?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],m=!p.trim(),f=0;if(this.options.pedantic?(f=2,u=p.trimStart()):m?f=r[1].length+1:(f=r[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,u=p.slice(f),f+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(c+=d+`
|
|
177
|
+
`,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(f),k=this.rules.other.hrRegex(f),S=this.rules.other.fencesBeginRegex(f),w=this.rules.other.headingBeginRegex(f),B=this.rules.other.htmlBeginRegex(f);for(;t;){let T=t.split(`
|
|
178
|
+
`,1)[0],v;if(d=T,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),v=d):v=d.replace(this.rules.other.tabCharGlobal," "),S.test(d)||w.test(d)||B.test(d)||b.test(d)||k.test(d))break;if(v.search(this.rules.other.nonSpaceChar)>=f||!d.trim())u+=`
|
|
179
|
+
`+v.slice(f);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(p)||w.test(p)||k.test(p))break;u+=`
|
|
180
|
+
`+d}!m&&!d.trim()&&(m=!0),c+=T+`
|
|
181
|
+
`,t=t.substring(T.length+1),p=v.slice(f)}}s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(C=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:c,task:!!y,checked:C,loose:!1,text:u,tokens:[]}),s.raw+=c}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let h=0;h<s.items.length;h++)if(this.lexer.state.top=!1,s.items[h].tokens=this.lexer.blockTokens(s.items[h].text,[]),!s.loose){let c=s.items[h].tokens.filter(p=>p.type==="space"),u=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));s.loose=u}if(s.loose)for(let h=0;h<s.items.length;h++)s.items[h].loose=!0;return s}}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," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=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:a,title:s}}}table(t){var o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Kn(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(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===a.length){for(let l of a)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 s)n.rows.push(Kn(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=Yr(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=M2(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 a=r[2],s="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(a);n&&(a=n[1],s=n[3])}else s=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),Qn(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.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 a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[a.toLowerCase()];if(!s){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return Qn(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...a[0]].length-1,n,o,l=s,h=0,c=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+s);(a=c.exec(r))!=null;){if(n=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!n)continue;if(o=[...n].length,a[3]||a[4]){l+=o;continue}else if((a[5]||a[6])&&s%3&&!((s+o)%3)){h+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+h);let u=[...a[0]][0].length,p=t.slice(0,s+a.index+u+o);if(Math.min(s,o)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}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," "),a=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&s&&(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,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let a,s;if(r[2]==="@")a=r[0],s="mailto:"+a;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]);a=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}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}}}},Gt=class zs{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||sr,this.options.tokenizer=this.options.tokenizer||new ka,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:Pt,block:Ei.normal,inline:jr.normal};this.options.pedantic?(r.block=Ei.pedantic,r.inline=jr.pedantic):this.options.gfm&&(r.block=Ei.gfm,this.options.breaks?r.inline=jr.breaks:r.inline=jr.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ei,inline:jr}}static lex(t,r){return new zs(r).lex(t)}static lexInline(t,r){return new zs(r).inlineTokens(t)}lex(t){t=t.replace(Pt.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 a,s,n;for(this.options.pedantic&&(t=t.replace(Pt.tabCharGlobal," ").replace(Pt.spaceLine,""));t;){let o;if((s=(a=this.options.extensions)==null?void 0:a.block)!=null&&s.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,a=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=a[2]?a[2].length:0,i=i.slice(0,a.index+s)+"["+"a".repeat(a[0].length-s-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(f=>(d=f.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 f=r.at(-1);d.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=d.raw,f.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 m=t;if((p=this.options.extensions)!=null&&p.startInline){let f=1/0,y=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},y),typeof C=="number"&&C>=0&&(f=Math.min(f,C))}),f<1/0&&f>=0&&(m=t.substring(0,f+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(o=d.raw.slice(-1)),n=!0;let f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=d.raw,f.text+=d.text):r.push(d);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},Ta=class{constructor(t){pt(this,"options");pt(this,"parser");this.options=t||sr}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let a=(n=(r||"").match(Pt.notSpaceStart))==null?void 0:n[0],s=t.replace(Pt.endingNewline,"")+`
|
|
198
|
+
`;return a?'<pre><code class="language-'+se(a)+'">'+(i?s:se(s,!0))+`</code></pre>
|
|
199
|
+
`:"<pre><code>"+(i?s:se(s,!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,a="";for(let o=0;o<t.items.length;o++){let l=t.items[o];a+=this.listitem(l)}let s=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+s+n+`>
|
|
205
|
+
`+a+"</"+s+`>
|
|
206
|
+
`}listitem(t){var i;let r="";if(t.task){let a=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=a+" "+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=a+" "+se(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}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 s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let a="";for(let s=0;s<t.rows.length;s++){let n=t.rows[s];i="";for(let o=0;o<n.length;o++)i+=this.tablecell(n[o]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
209
|
+
<thead>
|
|
210
|
+
`+r+`</thead>
|
|
211
|
+
`+a+`</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>${se(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 a=this.parser.parseInline(i),s=Zn(t);if(s===null)return a;t=s;let n='<a href="'+t+'"';return r&&(n+=' title="'+se(r)+'"'),n+=">"+a+"</a>",n}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let s=Zn(t);if(s===null)return se(i);t=s;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${se(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:se(t.text)}},Qo=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""}},Zt=class Ns{constructor(t){pt(this,"options");pt(this,"renderer");pt(this,"textRenderer");this.options=t||sr,this.options.renderer=this.options.renderer||new Ta,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Qo}static parse(t,r){return new Ns(r).parse(t)}static parseInline(t,r){return new Ns(r).parseInline(t)}parse(t,r=!0){var a,s;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[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 a,s;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[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}},Ri,ti=(Ri=class{constructor(t){pt(this,"options");pt(this,"block");this.options=t||sr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Gt.lex:Gt.lexInline}provideParser(){return this.block?Zt.parse:Zt.parseInline}},pt(Ri,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),pt(Ri,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ri),E2=class{constructor(...t){pt(this,"defaults",jo());pt(this,"options",this.setOptions);pt(this,"parse",this.parseMarkdown(!0));pt(this,"parseInline",this.parseMarkdown(!1));pt(this,"Parser",Zt);pt(this,"Renderer",Ta);pt(this,"TextRenderer",Qo);pt(this,"Lexer",Gt);pt(this,"Tokenizer",ka);pt(this,"Hooks",ti);this.use(...t)}walkTokens(t,r){var a,s;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;(s=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&s[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 a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let n=r.renderers[s.name];n?r.renderers[s.name]=function(...o){let l=s.renderer.apply(this,o);return l===!1&&(l=n.apply(this,o)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[s.level];n?n.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),a.extensions=r),i.renderer){let s=this.defaults.renderer||new Ta(this.defaults);for(let n in i.renderer){if(!(n in s))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,l=i.renderer[o],h=s[o];s[o]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=h.apply(s,c)),u||""}}a.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new ka(this.defaults);for(let n in i.tokenizer){if(!(n in s))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,l=i.tokenizer[o],h=s[o];s[o]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=h.apply(s,c)),u}}a.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new ti;for(let n in i.hooks){if(!(n in s))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,l=i.hooks[o],h=s[o];ti.passThroughHooks.has(n)?s[o]=c=>{if(this.defaults.async&&ti.passThroughHooksRespectAsync.has(n))return(async()=>{let p=await l.call(s,c);return h.call(s,p)})();let u=l.call(s,c);return h.call(s,u)}:s[o]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(s,c);return p===!1&&(p=await h.apply(s,c)),p})();let u=l.apply(s,c);return u===!1&&(u=h.apply(s,c)),u}}a.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,n=i.walkTokens;a.walkTokens=function(o){let l=[];return l.push(n.call(this,o)),s&&(l=l.concat(s.call(this,o))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Gt.lex(t,r??this.defaults)}parser(t,r){return Zt.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},s={...this.defaults,...a},n=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.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(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?Gt.lex:Gt.lexInline)(o,s),h=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(h,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser():t?Zt.parse:Zt.parseInline)(h,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(n);try{s.hooks&&(r=s.hooks.preprocess(r));let o=(s.hooks?s.hooks.provideLexer():t?Gt.lex:Gt.lexInline)(r,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?Zt.parse:Zt.parseInline)(o,s);return s.hooks&&(l=s.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 a="<p>An error occurred:</p><pre>"+se(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},tr=new E2;function dt(e,t){return tr.parse(e,t)}dt.options=dt.setOptions=function(e){return tr.setOptions(e),dt.defaults=tr.defaults,Vu(dt.defaults),dt};dt.getDefaults=jo;dt.defaults=sr;dt.use=function(...e){return tr.use(...e),dt.defaults=tr.defaults,Vu(dt.defaults),dt};dt.walkTokens=function(e,t){return tr.walkTokens(e,t)};dt.parseInline=tr.parseInline;dt.Parser=Zt;dt.parser=Zt.parse;dt.Renderer=Ta;dt.TextRenderer=Qo;dt.Lexer=Gt;dt.lexer=Gt.lex;dt.Tokenizer=ka;dt.Hooks=ti;dt.parse=dt;dt.options;dt.setOptions;dt.use;dt.walkTokens;dt.parseInline;Zt.parse;Gt.lex;function sd(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 a=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(a.length){var s=new RegExp(`
|
|
218
|
+
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(o){return o.replace(s,`
|
|
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 $2={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},Hs=new Map,od=new Map,O2=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)od.set(t.name,t.loader);else if("icons"in t)Hs.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"),nd=g(async(e,t)=>{const r=Ik(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 a=Hs.get(i);if(!a){const n=od.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await n(),prefix:i},Hs.set(i,a)}catch(o){throw P.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=Rk(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),I2=g(async e=>{try{return await nd(e),!0}catch{return!1}},"isIconAvailable"),_i=g(async(e,t,r)=>{let i;try{i=await nd(e,t==null?void 0:t.fallbackPrefix)}catch(n){P.error(n),i=$2}const a=Yk(i,t),s=Gk(Vk(a.body),{...a.attributes,...r});return te(s,yt())},"getIconSVG");function ld(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
223
|
+
`).replace(/\n{2,}/g,`
|
|
224
|
+
`);return sd(i)}g(ld,"preprocessMarkdown");function hd(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(hd,"nonMarkdownToLines");function cd(e,t={}){const r=ld(e,t),i=dt.lexer(r),a=[[]];let s=0;function n(o,l="normal"){o.type==="text"?o.text.split(`
|
|
225
|
+
`).forEach((c,u)=>{u!==0&&(s++,a.push([])),c.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&a[s].push({content:p,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{n(h,o.type)}):o.type==="html"&&a[s].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"?a[s].push({content:o.text,type:"normal"}):a[s].push({content:o.raw,type:"normal"})}),a}g(cd,"markdownToLines");function ud(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(ud,"nonMarkdownToHTML");function dd(e,{markdownAutoWrap:t}={}){const r=dt.lexer(e);function i(a){var s,n,o;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(s=a.tokens)==null?void 0:s.map(i).join("")}</strong>`:a.type==="em"?`<em>${(n=a.tokens)==null?void 0:n.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(o=a.tokens)==null?void 0:o.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(P.warn(`Unsupported markdown: ${a.type}`),a.raw)}return g(i,"output"),r.map(i).join("")}g(dd,"markdownToHTML");function pd(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(pd,"splitTextToChars");function gd(e,t){const r=pd(t.content);return Jo(e,[],r,t.type)}g(gd,"splitWordToFitWidth");function Jo(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,n=[...t,a];return e([{content:n.join(""),type:i}])?Jo(e,n,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(Jo,"splitWordToFitWidthRecursion");function fd(e,t){if(e.some(({content:r})=>r.includes(`
|
|
226
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return wa(e,t)}g(fd,"splitLineToFitWidth");function wa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},n=[...i];if(a!==""&&n.push({content:a,type:"normal"}),n.push(s),t(n))return wa(e,t,r,n);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[o,l]=gd(t,s);r.push([o]),l.content&&e.unshift(l)}return wa(e,t,r)}g(wa,"splitLineToFitWidthRecursion");function js(e,t){t&&e.attr("style",t)}g(js,"applyStyle");var Jn=16384;async function md(e,t,r,i,a=!1,s=yt()){const n=e.append("foreignObject");n.attr("width",`${Math.min(10*r,Jn)}px`),n.attr("height",`${Math.min(10*r,Jn)}px`);const o=n.append("xhtml:div"),l=hi(t.label)?await hh(t.label.replace(ki.lineBreakRegex,`
|
|
227
|
+
`),s):te(t.label,s),h=t.isNode?"nodeLabel":"edgeLabel",c=o.append("span");c.html(l),js(c,t.labelStyle),c.attr("class",`${h} ${i}`),js(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"),a&&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(md,"addHtmlSpan");function Ya(e,t,r,i=!1){const a=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}g(Ya,"createTspan");function yd(e,t,r){const i=e.append("text"),a=Ya(i,1,t);Xa(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}g(yd,"computeWidthOfText");function D2(e,t,r){var n;const i=e.append("text"),a=Ya(i,1,t);Xa(a,[{content:r,type:"normal"}]);const s=(n=a.node())==null?void 0:n.getBoundingClientRect();return s&&i.remove(),s}g(D2,"computeDimensionOfText");function Cd(e,t,r,i=!1,a=!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");a&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=g(d=>yd(n,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:fd(c,u);for(const d of p){const m=Ya(l,h,1.1,a);Xa(m,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(Cd,"createFormattedText");function Ys(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(Ys,"decodeHTMLEntities");function Xa(e,t){e.text(""),t.forEach((r,i)=>{const a=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?a.text(Ys(r.content)):a.text(" "+Ys(r.content))})}g(Xa,"updateTextContentAndStyles");async function xd(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,n)=>(r.push((async()=>{const o=`${s}:${n}`;return await I2(o)?await _i(o,void 0,{class:"label-icon"}):`<i class='${te(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(xd,"replaceIconSubstring");var Se=g(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,markdown:n=!0,isNode:o=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(P.debug("XYZ createText",t,r,i,a,s,o,"addSvgBackground: ",h),s){const u=n?dd(t,c):ud(t),p=await xd(Je(u),c),d=t.replace(/\\\\/g,"\\"),m={isNode:o,label:hi(t)?d:p,labelStyle:r.replace("fill:","color:")};return await md(e,m,l,a,h,c)}else{const u=Je(t.replace(/<br\s*\/?>/g,"<br/>")),p=n?cd(u.replace("<br>","<br/>"),c):hd(u),d=Cd(l,e,p,t?h:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");it(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");it(d).select("rect").attr("style",m.replace(/background:/g,"fill:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");it(d).select("text").attr("style",f)}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 is(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,n=Math.cos(s),o=Math.sin(s);for(const l of e){const[h,c]=l;l[0]=(h-i)*n-(c-a)*o+i,l[1]=(h-i)*o+(c-a)*n+a}}}function P2(e,t){return e[0]===t[0]&&e[1]===t[1]}function R2(e,t,r,i=1){const a=r,s=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(a)for(const h of n)is(h,o,a);const l=function(h,c,u){const p=[];for(const b of h){const k=[...b];P2(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 m=[];for(const b of p)for(let k=0;k<b.length-1;k++){const S=b[k],w=b[k+1];if(S[1]!==w[1]){const B=Math.min(S[1],w[1]);m.push({ymin:B,ymax:Math.max(S[1],w[1]),x:B===S[1]?S[0]:w[0],islope:(w[0]-S[0])/(w[1]-S[1])})}}if(m.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)),!m.length)return d;let f=[],y=m[0].ymin,C=0;for(;f.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>y);k++)b=k;m.splice(0,b+1).forEach(k=>{f.push({s:y,edge:k})})}if(f=f.filter(b=>!(b.edge.ymax<=y)),f.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)&&f.length>1)for(let b=0;b<f.length;b+=2){const k=b+1;if(k>=f.length)break;const S=f[b].edge,w=f[k].edge;d.push([[Math.round(S.x),y],[Math.round(w.x),y]])}y+=u,f.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),C++}return d}(n,s,i);if(a){for(const h of n)is(h,o,-a);(function(h,c,u){const p=[];h.forEach(d=>p.push(...d)),is(p,c,u)})(l,o,-a)}return l}function Li(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),R2(e,a,i,s||1)}class tn{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Li(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function Ua(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 q2 extends tn{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Li(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,n=[],o=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[h,c]of a)Ua([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 W2 extends tn{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class z2{constructor(t){this.helper=t}fillPolygons(t,r){const i=Li(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const n=a/4;for(const o of t){const l=Ua(o),h=l/a,c=Math.ceil(h)-1,u=l-c*a,p=(o[0][0]+o[1][0])/2-a/4,d=Math.min(o[0][1],o[1][1]);for(let m=0;m<c;m++){const f=d+u+m*a,y=p-n+2*Math.random()*n,C=f-n+2*Math.random()*n,b=this.helper.ellipse(y,C,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class N2{constructor(t){this.helper=t}fillPolygons(t,r){const i=Li(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,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach(n=>{const o=Ua(n),l=Math.floor(o/(i+a)),h=(o+a-l*(i+a))/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 m=d*(i+a),f=m+i,y=[c[0]+m*Math.cos(p)+h*Math.cos(p),c[1]+m*Math.sin(p)+h*Math.sin(p)],C=[c[0]+f*Math.cos(p)+h*Math.cos(p),c[1]+f*Math.sin(p)+h*Math.sin(p)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}}),s}}class H2{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,s=Li(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(s=>{const n=Ua(s),o=Math.round(n/(2*r));let l=s[0],h=s[1];l[0]>h[0]&&(l=s[1],h=s[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,m=Math.sqrt(2*Math.pow(r,2)),f=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],y=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[f[0]+m*Math.cos(c+Math.PI/4),f[1]+m*Math.sin(c+Math.PI/4)];a.push(...this.helper.doubleLineOps(f[0],f[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}}),a}}const qt={};class j2{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Y2=0,as=1,tl=2,$i={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 ss(e,t){return e.type===t}function en(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:Y2,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:as,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return o[o.length]={type:tl,text:""},o}(e);let i="BOD",a=0,s=r[a];for(;!ss(s,tl);){let n=0;const o=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return en("M0,0"+e);a++,n=$i[s.text],i=s.text}else ss(s,as)?n=$i[i]:(a++,n=$i[s.text],i=s.text);if(!(a+n<r.length))throw new Error("Path data ended short");for(let l=a;l<a+n;l++){const h=r[l];if(!ss(h,as))throw new Error("Param not a number: "+i+","+h.text);o[o.length]=+h.text}if(typeof $i[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),a+=n,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function bd(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:n,data:o}of e)switch(n){case"M":s.push({key:"M",data:[...o]}),[t,r]=o,[i,a]=o;break;case"m":t+=o[0],r+=o[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],s.push({key:"L",data:[t,r]});break;case"C":s.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);s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.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);s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],s.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":s.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],s.push({key:"V",data:[r]});break;case"S":s.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);s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function kd(e){const t=[];let r="",i=0,a=0,s=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,a]=c,[s,n]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],a=c[5],o=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,a]});break;case"V":a=c[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-o),p=a+(a-l)):(u=i,p=a),t.push({key:"C",data:[u,p,...c]}),o=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{const[u,p]=c;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-o),m=a+(a-l)):(d=i,m=a);const f=i+2*(d-i)/3,y=a+2*(m-a)/3,C=u+2*(d-u)/3,b=p+2*(m-p)/3;t.push({key:"C",data:[f,y,C,b,u,p]}),o=d,l=m,i=u,a=p;break}case"Q":{const[u,p,d,m]=c,f=i+2*(u-i)/3,y=a+2*(p-a)/3,C=d+2*(u-d)/3,b=m+2*(p-m)/3;t.push({key:"C",data:[f,y,C,b,d,m]}),o=u,l=p,i=d,a=m;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],m=c[3],f=c[4],y=c[5],C=c[6];u===0||p===0?(t.push({key:"C",data:[i,a,y,C,y,C]}),i=y,a=C):(i!==y||a!==C)&&(Td(i,a,y,C,u,p,d,m,f).forEach(function(b){t.push({key:"C",data:b})}),i=y,a=C);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=n}r=h}return t}function Xr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Td(e,t,r,i,a,s,n,o,l,h){const c=(u=n,Math.PI*u/180);var u;let p=[],d=0,m=0,f=0,y=0;if(h)[d,m,f,y]=h;else{[e,t]=Xr(e,t,-c),[r,i]=Xr(r,i,-c);const W=(e-r)/2,D=(t-i)/2;let M=W*W/(a*a)+D*D/(s*s);M>1&&(M=Math.sqrt(M),a*=M,s*=M);const L=a*a,$=s*s,F=L*$-L*D*D-$*W*W,q=L*D*D+$*W*W,z=(o===l?-1:1)*Math.sqrt(Math.abs(F/q));f=z*a*D/s+(e+r)/2,y=z*-s*W/a+(t+i)/2,d=Math.asin(parseFloat(((t-y)/s).toFixed(9))),m=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<f&&(d=Math.PI-d),r<f&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),l&&d>m&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const W=m,D=r,M=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=Td(r=f+a*Math.cos(m),i=y+s*Math.sin(m),D,M,a,s,n,0,l,[m,W,f,y])}C=m-d;const b=Math.cos(d),k=Math.sin(d),S=Math.cos(m),w=Math.sin(m),B=Math.tan(C/4),T=4/3*a*B,v=4/3*s*B,R=[e,t],I=[e+T*k,t-v*b],O=[r+T*w,i-v*S],N=[r,i];if(I[0]=2*R[0]-I[0],I[1]=2*R[1]-I[1],h)return[I,O,N].concat(p);{p=[I,O,N].concat(p);const W=[];for(let D=0;D<p.length;D+=3){const M=Xr(p[D][0],p[D][1],c),L=Xr(p[D+1][0],p[D+1][1],c),$=Xr(p[D+2][0],p[D+2][1],c);W.push([M[0],M[1],L[0],L[1],$[0],$[1]])}return W}}const X2={randOffset:function(e,t){return Q(e,t)},randOffsetWithRange:function(e,t,r){return Sa(e,t,r)},ellipse:function(e,t,r,i,a){const s=Sd(r,i,a);return Xs(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return Oe(e,t,r,i,a,!0)}};function wd(e,t,r,i,a){return{type:"path",ops:Oe(e,t,r,i,a)}}function Ui(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...Oe(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...Oe(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?wd(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function U2(e,t,r,i,a){return function(s,n){return Ui(s,!0,n)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function el(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Oi(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Oi(r[0],1.5*(1+.22*t.roughness),al(t));for(let s=1;s<r.length;s++){const n=r[s];if(n.length){const o=Oi(n,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Oi(n,1.5*(1+.22*t.roughness),al(t));for(const h of o)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&a.push(h)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function Sd(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/a;let n=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return n+=Q(n*l,r),o+=Q(o*l,r),{increment:s,rx:n,ry:o}}function Xs(e,t,r,i){const[a,s]=sl(i.increment,e,t,i.rx,i.ry,1,i.increment*Sa(.1,Sa(.4,1,r),r),r);let n=va(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=sl(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=va(o,null,r);n=n.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:n}}}function rl(e,t,r,i,a,s,n,o,l){const h=e,c=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=Q(.01*u,l),p+=Q(.01*p,l);let d=a,m=s;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(m-d)/2),C=ol(y,h,c,u,p,d,m,1,l);if(!l.disableMultiStroke){const b=ol(y,h,c,u,p,d,m,1.5,l);C.push(...b)}return n&&(o?C.push(...Oe(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...Oe(h,c,h+u*Math.cos(m),c+p*Math.sin(m),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 il(e,t){const r=kd(bd(en(e))),i=[];let a=[0,0],s=[0,0];for(const{key:n,data:o}of r)switch(n){case"M":s=[o[0],o[1]],a=[o[0],o[1]];break;case"L":i.push(...Oe(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]];break;case"C":{const[l,h,c,u,p,d]=o;i.push(...V2(l,h,c,u,p,d,s,t)),s=[p,d];break}case"Z":i.push(...Oe(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function os(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+Q(a,t),i[0][1]+Q(a,t)]});for(let n=1;n<s;n++)r.push({op:"lineTo",data:[i[n][0]+Q(a,t),i[n][1]+Q(a,t)]})}}return{type:"fillPath",ops:r}}function or(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!qt[a])switch(a){case"zigzag":qt[a]||(qt[a]=new q2(i));break;case"cross-hatch":qt[a]||(qt[a]=new W2(i));break;case"dots":qt[a]||(qt[a]=new z2(i));break;case"dashed":qt[a]||(qt[a]=new N2(i));break;case"zigzag-line":qt[a]||(qt[a]=new H2(i));break;default:a="hachure",qt[a]||(qt[a]=new tn(i))}return qt[a]}(t,X2).fillPolygons(e,t)}function al(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function vd(e){return e.randomizer||(e.randomizer=new j2(e.seed||0)),e.randomizer.next()}function Sa(e,t,r,i=1){return r.roughness*i*(vd(r)*(t-e)+e)}function Q(e,t,r=1){return Sa(-e,e,t,r)}function Oe(e,t,r,i,a,s=!1){const n=s?a.disableMultiStrokeFill:a.disableMultiStroke,o=Us(e,t,r,i,a,!0,!1);if(n)return o;const l=Us(e,t,r,i,a,!0,!0);return o.concat(l)}function Us(e,t,r,i,a,s,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=a.maxRandomnessOffset||0;c*c*100>o&&(c=l/10);const u=c/2,p=.2+.2*vd(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,m=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=Q(d,a,h),m=Q(m,a,h);const f=[],y=()=>Q(u,a,h),C=()=>Q(c,a,h),b=a.preserveVertices;return n?f.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):f.push({op:"move",data:[e+(b?0:Q(c,a,h)),t+(b?0:Q(c,a,h))]}),n?f.push({op:"bcurveTo",data:[d+e+(r-e)*p+y(),m+t+(i-t)*p+y(),d+e+2*(r-e)*p+y(),m+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}):f.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),m+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),m+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),f}function Oi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]),i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+Q(t,r),e[a][1]+Q(t,r)]),a===e.length-1&&i.push([e[a][0]+Q(t,r),e[a][1]+Q(t,r)]);return va(i,null,r)}function va(e,t,r){const i=e.length,a=[];if(i>3){const s=[],n=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];s[0]=[l[0],l[1]],s[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],s[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],s[3]=[e[o+1][0],e[o+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...Us(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function sl(e,t,r,i,a,s,n,o){const l=[],h=[];if(o.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+a*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+a*Math.sin(0)]),h.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const c=Q(.5,o)-Math.PI/2;h.push([Q(s,o)+t+.9*i*Math.cos(c-e),Q(s,o)+r+.9*a*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let p=c;p<u;p+=e){const d=[Q(s,o)+t+i*Math.cos(p),Q(s,o)+r+a*Math.sin(p)];l.push(d),h.push(d)}h.push([Q(s,o)+t+i*Math.cos(c+2*Math.PI+.5*n),Q(s,o)+r+a*Math.sin(c+2*Math.PI+.5*n)]),h.push([Q(s,o)+t+.98*i*Math.cos(c+n),Q(s,o)+r+.98*a*Math.sin(c+n)]),h.push([Q(s,o)+t+.9*i*Math.cos(c+.5*n),Q(s,o)+r+.9*a*Math.sin(c+.5*n)])}return[h,l]}function ol(e,t,r,i,a,s,n,o,l){const h=s+Q(.1,l),c=[];c.push([Q(o,l)+t+.9*i*Math.cos(h-e),Q(o,l)+r+.9*a*Math.sin(h-e)]);for(let u=h;u<=n;u+=e)c.push([Q(o,l)+t+i*Math.cos(u),Q(o,l)+r+a*Math.sin(u)]);return c.push([t+i*Math.cos(n),r+a*Math.sin(n)]),c.push([t+i*Math.cos(n),r+a*Math.sin(n)]),va(c,null,l)}function V2(e,t,r,i,a,s,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:Q(h[0],o)),n[1]+(p?0:Q(h[0],o))]}),c=p?[a,s]:[a+Q(h[d],o),s+Q(h[d],o)],l.push({op:"bcurveTo",data:[e+Q(h[d],o),t+Q(h[d],o),r+Q(h[d],o),i+Q(h[d],o),c[0],c[1]]});return l}function Ur(e){return[...e]}function nl(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(Ur(e[0]),Ur(e[1]),Ur(e[2]),Ur(e[2]));else{const a=[];a.push(e[0],e[0]);for(let o=1;o<e.length;o++)a.push(e[o]),o===e.length-1&&a.push(e[o]);const s=[],n=1-t;i.push(Ur(a[0]));for(let o=1;o+2<a.length;o++){const l=a[o];s[0]=[l[0],l[1]],s[1]=[l[0]+(n*a[o+1][0]-n*a[o-1][0])/6,l[1]+(n*a[o+1][1]-n*a[o-1][1])/6],s[2]=[a[o+1][0]+(n*a[o][0]-n*a[o+2][0])/6,a[o+1][1]+(n*a[o][1]-n*a[o+2][1])/6],s[3]=[a[o+1][0],a[o+1][1]],i.push(s[1],s[2],s[3])}}return i}function Vi(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function G2(e,t,r){const i=Vi(t,r);if(i===0)return Vi(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),Vi(e,Ne(t,r,a))}function Ne(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Vs(e,t,r,i){const a=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 m=3*c[1]-2*h[1]-p[1];m*=m;let f=3*u[0]-2*p[0]-h[0];f*=f;let y=3*u[1]-2*p[1]-h[1];return y*=y,d<f&&(d=f),m<y&&(m=y),d+m}(e,t)<r){const o=e[t+0];a.length?(s=a[a.length-1],n=o,Math.sqrt(Vi(s,n))>1&&a.push(o)):a.push(o),a.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],p=Ne(l,h,.5),d=Ne(h,c,.5),m=Ne(c,u,.5),f=Ne(p,d,.5),y=Ne(d,m,.5),C=Ne(f,y,.5);Vs([l,p,f,C],0,r,a),Vs([C,y,m,u],0,r,a)}var s,n;return a}function Z2(e,t){return Ba(e,0,e.length,t)}function Ba(e,t,r,i,a){const s=a||[],n=e[t],o=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=G2(e[c],n,o);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(Ba(e,t,h+1,i,s),Ba(e,h,r,i,s)):(s.length||s.push(n),s.push(o)),s}function ns(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)Vs(e,3*s,t,i);return r&&r>0?Ba(i,0,i.length,r):i}const Ht="none";class _a{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,a,s){const n=this._o(s);return this._d("line",[wd(t,r,i,a,n)],n)}rectangle(t,r,i,a,s){const n=this._o(s),o=[],l=U2(t,r,i,a,n);if(n.fill){const h=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];n.fillStyle==="solid"?o.push(os([h],n)):o.push(or([h],n))}return n.stroke!==Ht&&o.push(l),this._d("rectangle",o,n)}ellipse(t,r,i,a,s){const n=this._o(s),o=[],l=Sd(i,a,n),h=Xs(t,r,n,l);if(n.fill)if(n.fillStyle==="solid"){const c=Xs(t,r,n,l).opset;c.type="fillPath",o.push(c)}else o.push(or([h.estimatedPoints],n));return n.stroke!==Ht&&o.push(h.opset),this._d("ellipse",o,n)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ui(t,!1,i)],i)}arc(t,r,i,a,s,n,o=!1,l){const h=this._o(l),c=[],u=rl(t,r,i,a,s,n,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const d=rl(t,r,i,a,s,n,!0,!1,p);d.type="fillPath",c.push(d)}else c.push(function(p,d,m,f,y,C,b){const k=p,S=d;let w=Math.abs(m/2),B=Math.abs(f/2);w+=Q(.01*w,b),B+=Q(.01*B,b);let T=y,v=C;for(;T<0;)T+=2*Math.PI,v+=2*Math.PI;v-T>2*Math.PI&&(T=0,v=2*Math.PI);const R=(v-T)/b.curveStepCount,I=[];for(let O=T;O<=v;O+=R)I.push([k+w*Math.cos(O),S+B*Math.sin(O)]);return I.push([k+w*Math.cos(v),S+B*Math.sin(v)]),I.push([k,S]),or([I],b)}(t,r,i,a,s,n,h));return h.stroke!==Ht&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),a=[],s=el(t,i);if(i.fill&&i.fill!==Ht)if(i.fillStyle==="solid"){const n=el(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.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(...ns(nl([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):n.push(...ns(nl(h),10,(1+i.roughness)/2))}n.length&&a.push(or([n],i))}return i.stroke!==Ht&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=Ui(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(os([t],i)):a.push(or([t],i))),i.stroke!==Ht&&a.push(s),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Ht,n=i.stroke!==Ht,o=!!(i.simplification&&i.simplification<1),l=function(c,u,p){const d=kd(bd(en(c))),m=[];let f=[],y=[0,0],C=[];const b=()=>{C.length>=4&&f.push(...ns(C,u)),C=[]},k=()=>{b(),f.length&&(m.push(f),f=[])};for(const{key:w,data:B}of d)switch(w){case"M":k(),y=[B[0],B[1]],f.push(y);break;case"L":b(),f.push([B[0],B[1]]);break;case"C":if(!C.length){const T=f.length?f[f.length-1]:y;C.push([T[0],T[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),f.push([y[0],y[1]])}if(k(),!p)return m;const S=[];for(const w of m){const B=Z2(w,p);B.length&&S.push(B)}return S}(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=il(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const c=il(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else a.push(os(l,i));else a.push(or(l,i));return n&&(o?l.forEach(c=>{a.push(Ui(c,!1,i))}):a.push(h)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map(n=>+n.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let n=null;switch(s.type){case"path":n={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ht};break;case"fillPath":n={d:this.opsToPath(s),stroke:Ht,strokeWidth:0,fill:i.fill||Ht};break;case"fillSketch":n=this.fillSketch(s,i)}n&&a.push(n)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ht,strokeWidth:i,fill:Ht}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class K2{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,n,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,n,s,o),a.restore();break}case"fillSketch":this.fillSketch(a,n,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const n=typeof i=="number"&&i>=0?s.data.map(o=>+o.toFixed(i)):s.data;switch(s.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(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const n=this.gen.line(t,r,i,a,s);return this.draw(n),n}rectangle(t,r,i,a,s){const n=this.gen.rectangle(t,r,i,a,s);return this.draw(n),n}ellipse(t,r,i,a,s){const n=this.gen.ellipse(t,r,i,a,s);return this.draw(n),n}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}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,a,s,n,o=!1,l){const h=this.gen.arc(t,r,i,a,s,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 Ii="http://www.w3.org/2000/svg";class Q2{constructor(t,r){this.svg=t,this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(Ii,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=a.createElementNS(Ii,"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=a.createElementNS(Ii,"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(a,o,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(Ii,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const n=this.gen.line(t,r,i,a,s);return this.draw(n)}rectangle(t,r,i,a,s){const n=this.gen.rectangle(t,r,i,a,s);return this.draw(n)}ellipse(t,r,i,a,s){const n=this.gen.ellipse(t,r,i,a,s);return this.draw(n)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}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,a,s,n,o=!1,l){const h=this.gen.arc(t,r,i,a,s,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 j={canvas:(e,t)=>new K2(e,t),svg:(e,t)=>new Q2(e,t),generator:e=>new _a(e),newSeed:()=>_a.newSeed()},K=g(async(e,t,r)=>{var d,m;let i;const a=t.useHtmlLabels||Te((d=ht())==null?void 0:d.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),n=s.insert("g").attr("class","label").attr("style",_t(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 Se(n,te(Je(o),ht()),{useHtmlLabels:a,width:t.width||((m=ht().flowchart)==null?void 0:m.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(a){const f=c.children[0],y=it(c);await Yu(f,o),u=f.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}return a?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:s,bbox:u,halfPadding:p,label:n}},"labelHelper"),ls=g(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??Rt(ht()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Se(a,te(Je(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=s.getBBox();const o=r.padding/2;if(Rt(ht())){const c=s.children[0],u=it(s);n=c.getBoundingClientRect(),u.attr("width",n.width),u.attr("height",n.height)}return i?a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):a.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:o,label:a}},"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 st(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(st,"createPathFromPoints");function Ie(e,t,r,i,a,s){const n=[],l=r-e,h=i-t,c=l/s,u=2*Math.PI/c,p=t+h/2;for(let d=0;d<=50;d++){const m=d/50,f=e+m*l,y=p+a*Math.sin(u*(f-e));n.push({x:f,y})}return n}g(Ie,"generateFullSineWavePoints");function yi(e,t,r,i,a,s){const n=[],o=a*Math.PI/180,c=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);n.push({x:-d,y:-m})}return n}g(yi,"generateCirclePoints");function Gs(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 a=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),n=g((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(a){const l={fill:n(a,"fill"),"fill-opacity":n(a,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(s){const l={stroke:n(s,"stroke"),"stroke-width":n(s,"stroke-width")??"1","stroke-opacity":n(s,"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(Gs,"mergePaths");var J2=g((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,n=e.width/2,o=e.height/2,l,h;return Math.abs(s)*n>Math.abs(a)*o?(s<0&&(o=-o),l=s===0?0:o*a/s,h=o):(a<0&&(n=-n),l=n,h=a===0?0:n*s/a),{x:r+l,y:i+h}},"intersectRect"),qr=J2,tT=g(async(e,t,r,i=!1,a=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const n=ht(),o=Rt(n);return await Se(e,s,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},n)},"createLabel"),Fe=tT,Pe=g((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),Bd=g(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=ht(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,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=Rt(r),d=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Se(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await Fe(d,t.label,t.labelStyle||"",!1,!0);let f=m.getBBox();if(Rt(r)){const T=m.children[0],v=it(m);f=T.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;P.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const T=j.svg(u),v=Y(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:a}),R=T.path(Pe(b,k,y,C,0),v);S=u.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=u.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:w}=Ho(r);if(d.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+w})`),o){const T=d.select("span");T&&T.attr("style",o)}const B=S.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=f.height-t.padding/2,t.intersect=function(T){return qr(t,T)},{cluster:u,labelBBox:f}},"rect"),eT=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),a=0*t.padding,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(o){return qr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),rT=g(async(e,t)=>{const r=ht(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,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 Fe(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(Rt(r)){const R=d.children[0],I=it(d);m=R.getBoundingClientRect(),I.attr("width",m.width),I.attr("height",m.height)}const f=0*t.padding,y=f/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+f;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+f,k=t.height+f-m.height-6,S=t.x-C/2,w=t.y-b/2;t.width=C;const B=t.y-t.height/2-y+m.height+2;let T;if(t.look==="handDrawn"){const R=t.cssClasses.includes("statediagram-cluster-alt"),I=j.svg(h),O=t.rx||t.ry?I.path(Pe(S,w,C,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:a}):I.rectangle(S,w,C,b,{seed:a});T=h.insert(()=>O,":first-child");const N=I.rectangle(S,B,C,k,{fill:R?s:n,fillStyle:R?"hachure":"solid",stroke:l,seed:a});T=h.insert(()=>O,":first-child"),p=h.insert(()=>N)}else T=c.insert("rect",":first-child"),T.attr("class","outer").attr("x",S).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",S).attr("y",B).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-m.width/2}, ${w+1-(Rt(r)?0:3)})`);const v=T.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(R){return qr(t,R)},{cluster:h,labelBBox:m}},"roundedWithTitle"),iT=g(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=ht(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,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=Rt(r),d=u.insert("g").attr("class","cluster-label "),m=await Se(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let f=m.getBBox();if(Rt(r)){const T=m.children[0],v=it(m);f=T.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;P.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const T=j.svg(u),v=Y(t,{roughness:.7,fill:s,stroke:n,fillWeight:4,seed:a}),R=T.path(Pe(b,k,y,C,t.rx),v);S=u.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=u.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:w}=Ho(r);if(d.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+w})`),o){const T=d.select("span");T&&T.attr("style",o)}const B=S.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=f.height-t.padding/2,t.intersect=function(T){return qr(t,T)},{cluster:u,labelBBox:f}},"kanbanSection"),aT=g((e,t)=>{const r=ht(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=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 y=j.svg(n).rectangle(u,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});d=n.insert(()=>y,":first-child")}else{d=o.insert("rect",":first-child");let f="outer";t.look,f="divider",d.attr("class",f).attr("x",u).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(f){return qr(t,f)},{cluster:n,labelBBox:{}}},"divider"),sT=Bd,oT={rect:Bd,squareRect:sT,roundedWithTitle:rT,noteGroup:eT,divider:aT,kanbanSection:iT},_d=new Map,nT=g(async(e,t)=>{const r=t.shape||"rect",i=await oT[r](e,t);return _d.set(t.id,i),i},"insertCluster"),i_=g(()=>{_d=new Map},"clear");function Ld(e,t){return e.intersect(t)}g(Ld,"intersectNode");var lT=Ld;function Fd(e,t,r,i){var a=e.x,s=e.y,n=a-i.x,o=s-i.y,l=Math.sqrt(t*t*o*o+r*r*n*n),h=Math.abs(t*r*n/l);i.x<a&&(h=-h);var c=Math.abs(t*r*o/l);return i.y<s&&(c=-c),{x:a+h,y:s+c}}g(Fd,"intersectEllipse");var Md=Fd;function Ad(e,t,r){return Md(e,t,t,r)}g(Ad,"intersectCircle");var hT=Ad;function Ed(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,n=t.x*e.y-e.x*t.y,o=a*r.x+s*r.y+n,l=a*i.x+s*i.y+n,h=1e-6;if(o!==0&&l!==0&&Zs(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,m=c*t.x+u*t.y+p;if(Math.abs(d)<h&&Math.abs(m)<h&&Zs(d,m))return;const f=a*u-c*s;if(f===0)return;const y=Math.abs(f/2);let C=s*p-u*n;const b=C<0?(C-y)/f:(C+y)/f;C=c*n-a*p;const k=C<0?(C-y)/f:(C+y)/f;return{x:b,y:k}}}g(Ed,"intersectLine");function Zs(e,t){return e*t>0}g(Zs,"sameSign");var cT=Ed;function $d(e,t,r){let i=e.x,a=e.y,s=[],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=a-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=cT(e,r,{x:l+u.x,y:h+u.y},{x:l+p.x,y:h+p.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(c,u){let p=c.x-r.x,d=c.y-r.y,m=Math.sqrt(p*p+d*d),f=u.x-r.x,y=u.y-r.y,C=Math.sqrt(f*f+y*y);return m<C?-1:m===C?0:1}),s[0]):e}g($d,"intersectPolygon");var uT=$d,H={node:lT,circle:hT,ellipse:Md,polygon:uT,rect:qr};function Od(e,t){const{labelStyles:r}=X(t);t.labelStyle=r;const i=Z(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),n=1,{cssStyles:o}=t,l=j.svg(s),h=Y(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,n*2,h),u=s.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",_t(o)),U(t,u),t.intersect=function(p){return P.info("Circle intersect",t,n,p),H.circle(t,n,p)},s}g(Od,"anchor");function Ks(e,t,r,i,a,s,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/a,m=p/s,f=Math.sqrt(d**2+m**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-f**2),C=l+y*s*Math.sin(c)*(n?-1:1),b=h-y*a*Math.cos(c)*(n?-1:1),k=Math.atan2((t-b)/s,(e-C)/a);let w=Math.atan2((i-b)/s,(r-C)/a)-k;n&&w<0&&(w+=2*Math.PI),!n&&w>0&&(w-=2*Math.PI);const B=[];for(let T=0;T<20;T++){const v=T/19,R=k+v*w,I=C+a*Math.cos(R),O=b+s*Math.sin(R);B.push({x:I,y:O})}return B}g(Ks,"generateArcPoints");function Id(e,t,r){const[i,a]=[t,r].sort((s,n)=>n-s);return a*(1-Math.sqrt(1-(e/i/2)**2))}g(Id,"calculateArcSagitta");async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a,o=g(R=>R+n,"calcTotalHeight"),l=g(R=>{const I=R/2;return[I/(2.5+R/50),I]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await K(e,t,Z(t)),u=o(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),m=Id(u,p,d),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2+m-m,C=u,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...Ks(-y/2,-C/2,-y/2,C/2,p,d,!1),{x:y/2,y:C/2},...Ks(y/2,C/2,y/2,-C/2,p,d,!0)],S=j.svg(h),w=Y(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=st(k),T=S.path(B,w),v=h.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),U(t,v),t.intersect=function(R){return H.polygon(t,k,R)},h}g(Dd,"bowTieRect");function ve(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(ve,"insertPolygonShape");var Di=12;async function Pd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?28:a,n=t.look==="neo"?24:a,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s+Di),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),u=0,p=h,d=-c,m=0,f=[{x:u+Di,y:d},{x:p,y:d},{x:p,y:m},{x:u,y:m},{x:u,y:d+Di},{x:u+Di,y:d}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=j.svg(o),k=Y(t,{}),S=st(f),w=b.path(S,k);y=o.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=ve(o,h,c,f);return i&&y.attr("style",i),U(t,y),t.intersect=function(b){return H.polygon(t,f,b)},o}g(Pd,"card");function Rd(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:a}=t,s=Math.max(28,t.width??0),n=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],o=j.svg(i),l=Y(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=st(n),c=o.path(h,l),u=i.insert(()=>c,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),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(Rd,"choice");async function rn(e,t,r){const{labelStyles:i,nodeStyles:a}=X(t);t.labelStyle=i;const{shapeSvg:s,bbox:n,halfPadding:o}=await K(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=j.svg(s),m=Y(t,{}),f=d.circle(0,0,c*2,m);u=s.insert(()=>f,":first-child"),u.attr("class","basic label-container").attr("style",_t(p))}else u=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return U(t,u),t.calcIntersect=function(d,m){const f=d.width/2;return H.circle(d,f,m)},t.intersect=function(d){return P.info("Circle intersect",t,c,d),H.circle(t,c,d)},s}g(rn,"circle");function qd(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},s={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 ${s.x},${s.y} L ${o.x},${o.y}
|
|
228
|
+
M ${a.x},${a.y} L ${n.x},${n.y}`}g(qd,"createLine");function Wd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:n}=t,o=j.svg(a),l=Y(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=o.circle(0,0,s*2,l),c=qd(s),u=o.path(c,l),p=a.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:s,point:d}),H.circle(t,s,d)},a}g(Wd,"crossedCircle");function me(e,t,r,i=100,a=0,s=180){const n=[],o=a*Math.PI/180,c=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);n.push({x:-d,y:-m})}return n}g(me,"generateCirclePoints");async function zd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await K(e,t,Z(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+o,c=s.height+l,u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...me(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...me(h/2+u*2,-u,u,20,-180,-270),...me(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...me(h/2,c/2,u,20,0,90)],m=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...me(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...me(h/2+h*.1,-u,u,20,-180,-270),...me(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...me(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],f=j.svg(a),y=Y(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=st(d).replace("Z",""),k=f.path(b,y),S=st(m),w=f.path(S,{...y}),B=a.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${u}, 0)`),n.attr("transform",`translate(${-h/2+u-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),U(t,B),t.intersect=function(T){return H.polygon(t,m,T)},a}g(zd,"curlyBraceLeft");function ye(e,t,r,i=100,a=0,s=180){const n=[],o=a*Math.PI/180,c=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);n.push({x:d,y:m})}return n}g(ye,"generateCirclePoints");async function Nd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await K(e,t,Z(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+(t.look==="neo"?o*2:o),c=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...ye(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...ye(h/2+u*2,-u,u,20,-180,-270),...ye(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...ye(h/2,c/2,u,20,0,90)],m=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...ye(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...ye(h/2+u*2,-u,u,20,-180,-270),...ye(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...ye(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],f=j.svg(a),y=Y(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=st(d).replace("Z",""),k=f.path(b,y),S=st(m),w=f.path(S,{...y}),B=a.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-u}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),U(t,B),t.intersect=function(T){return H.polygon(t,m,T)},a}g(Nd,"curlyBraceRight");function Lt(e,t,r,i=100,a=0,s=180){const n=[],o=a*Math.PI/180,c=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);n.push({x:-d,y:-m})}return n}g(Lt,"generateCirclePoints");async function Hd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await K(e,t,Z(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+(t.look==="neo"?o*2:o),c=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...Lt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Lt(h/2+u*2,-u,u,20,-180,-270),...Lt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Lt(h/2,c/2,u,20,0,90)],m=[...Lt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Lt(-h/2-u/2,-u,u,20,0,90),...Lt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Lt(-h/2+u+u/2,c/2,u,30,-180,-270)],f=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Lt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Lt(h/2+u*2,-u,u,20,-180,-270),...Lt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Lt(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},...Lt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Lt(-h/2-u/2,-u,u,20,0,90),...Lt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Lt(-h/2+u+u/2,c/2,u,30,-180,-270)],y=j.svg(a),C=Y(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=st(d).replace("Z",""),S=y.path(k,C),B=st(m).replace("Z",""),T=y.path(B,C),v=st(f),R=y.path(v,{...C}),I=a.insert("g",":first-child");return I.insert(()=>R,":first-child").attr("stroke-opacity",0),I.insert(()=>S,":first-child"),I.insert(()=>T,":first-child"),I.attr("class","text"),p&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(${u-u/4}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),U(t,I),t.intersect=function(O){return H.polygon(t,f,O)},a}g(Hd,"curlyBraces");async function jd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a,o=20,l=5,{shapeSvg:h,bbox:c}=await K(e,t,Z(t)),u=Math.max(o,(c.width+s*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:m}=t,f=j.svg(h),y=Y(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=u,b=p,k=C-d,S=b/4,w=[{x:k,y:0},{x:S,y:0},{x:0,y:b/2},{x:S,y:b},{x:k,y:b},...yi(-k,-b/2,d,50,270,90)],B=st(w),T=f.path(B,y),v=h.insert(()=>T,":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(${-u/2}, ${-p/2})`),U(t,v),t.intersect=function(R){return H.polygon(t,w,R)},h}g(jd,"curvedTrapezoid");var dT=g((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),pT=g((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),gT=g((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ll=8,hl=8;async function Yd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?24:a,n=t.look==="neo"?24:a;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-n,t.width<hl&&(t.width=hl);const b=y/2/(2.5+y/50);t.height=(t.height??0)-s-b*3,t.height<ll&&(t.height=ll)}const{shapeSvg:o,bbox:l,label:h}=await K(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)+s+p;let m;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=j.svg(o),C=pT(0,0,c,d,u,p),b=gT(0,p,c,d,u,p),k=Y(t,{}),S=y.path(C,k),w=y.path(b,Y(t,{fill:"none"}));m=o.insert(()=>w,":first-child"),m=o.insert(()=>S,":first-child"),m.attr("class","basic label-container"),f&&m.attr("style",f)}else{const y=dT(0,0,c,d,u,p);m=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",_t(f)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),U(t,m),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(y){const C=H.rect(t,y),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,y.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},o}g(Yd,"cylinder");async function Xd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=o.width+a,c=o.height+s,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:m}=t,f=j.svg(n),y=Y(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.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=f.polygon(C.map(S=>[S.x,S.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),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(S){return H.rect(t,S)},n}g(Xd,"dividedRectangle");async function Ud(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=X(t),a=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,n=t.look==="neo"?16:s,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(n??0),c=h-a;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const f=j.svg(o),y=Y(t,{roughness:.2,strokeWidth:2.5}),C=Y(t,{roughness:.2,strokeWidth:1.5}),b=f.circle(0,0,h*2,y),k=f.circle(0,0,c*2,C);u=o.insert("g",":first-child"),u.attr("class",_t(t.cssClasses)).attr("style",_t(p)),(d=u.node())==null||d.appendChild(b),(m=u.node())==null||m.appendChild(k)}else{u=o.insert("g",":first-child");const f=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return U(t,u),t.intersect=function(f){return P.info("DoubleCircle intersect",t,h,f),H.circle(t,h,f)},o}g(Ud,"doublecircle");function Vd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=X(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),n=7,{cssStyles:o}=t,l=j.svg(s),{nodeBorder:h}=r,c=Y(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,n*2,c),p=s.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),a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),U(t,p),t.intersect=function(d){return P.info("filledCircle intersect",t,{radius:n,point:d}),H.circle(t,n,d)},s}g(Vd,"filledCircle");var cl=10,ul=10;async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<cl&&(t.height=cl),t.width=((t==null?void 0:t.width)??0)-s-s/2,t.width<ul&&(t.width=ul));const{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(s??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,m=j.svg(n),f=Y(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=st(p),C=m.path(y,f),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(Gd,"flippedTriangle");function Zd(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=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=j.svg(n),d=Y(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=p.rectangle(c,u,l,h,d),f=n.insert(()=>m,":first-child");o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),U(t,f);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return H.rect(t,C)},n}g(Zd,"forkJoin");async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=15,s=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<s&&(t.height=s),t.width=((t==null?void 0:t.width)??0)-n*2,t.width<a&&(t.width=a));const{shapeSvg:l,bbox:h}=await K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(a,h.width))+n*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(s,h.height))+o*2,p=u/2,{cssStyles:d}=t,m=j.svg(l),f=Y(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{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=st(y),b=m.path(C,f),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(S){return P.info("Pill intersect",t,{radius:p,point:S}),H.polygon(t,y,S)},l}g(Kd,"halfRoundedRectangle");var fT=g((e,t,r,i,a)=>[`M${e+a},${t}`,`L${e+r-a},${t}`,`L${e+r},${t-i/2}`,`L${e+r-a},${t-i}`,`L${e+a},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Qd(e,t){const{labelStyles:r,nodeStyles:i}=X(t),a=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,n=70,o=32,l=t.look==="neo"?n:s,h=t.look==="neo"?o:s;if(t.width||t.height){const k=(t.height??0)/a;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await K(e,t,Z(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/a,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,f=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-p/2},{x:m-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=j.svg(c),k=Y(t,{}),S=fT(0,0,m,p,d),w=b.path(S,k);y=c.insert(()=>w,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),C&&y.attr("style",C)}else y=ve(c,m,p,f);return i&&y.attr("style",i),t.width=m,t.height=p,U(t,y),t.intersect=function(b){return H.polygon(t,f,b)},c}g(Qd,"hexagon");async function Jd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await K(e,t,Z(t)),s=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=j.svg(a),h=Y(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:s,y:0},{x:0,y:n},{x:s,y:n}],u=st(c),p=l.path(u,h),d=a.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(${-s/2}, ${-n/2})`),U(t,d),t.intersect=function(m){return P.info("Pill intersect",t,{points:c}),H.polygon(t,c,m)},a}g(Jd,"hourglass");async function tp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=X(t);t.labelStyle=a;const s=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(s,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,label:u}=await K(e,t,"icon-shape default"),p=t.pos==="t",d=o,m=o,{nodeBorder:f}=r,{stylesMap:y}=Rr(t),C=-m/2,b=-d/2,k=t.label?8:0,S=j.svg(h),w=Y(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=S.rectangle(C,b,m,d,w),T=Math.max(m,c.width),v=d+c.height+k,R=S.rectangle(-T/2,-v/2,T,v,{...w,fill:"transparent",stroke:"none"}),I=h.insert(()=>B,":first-child"),O=h.insert(()=>R);if(t.icon){const N=h.append("g");N.html(`<g>${await _i(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const W=N.node().getBBox(),D=W.width,M=W.height,L=W.x,$=W.y;N.attr("transform",`translate(${-D/2-L},${p?c.height/2+k/2-M/2-$:-c.height/2-k/2-M/2-$})`),N.attr("style",`color: ${y.get("stroke")??f};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-v/2:v/2-c.height})`),I.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),U(t,O),t.intersect=function(N){if(P.info("iconSquare intersect",t,N),!t.label)return H.rect(t,N);const W=t.x??0,D=t.y??0,M=t.height??0;let L=[];return p?L=[{x:W-c.width/2,y:D-M/2},{x:W+c.width/2,y:D-M/2},{x:W+c.width/2,y:D-M/2+c.height+k},{x:W+m/2,y:D-M/2+c.height+k},{x:W+m/2,y:D+M/2},{x:W-m/2,y:D+M/2},{x:W-m/2,y:D-M/2+c.height+k},{x:W-c.width/2,y:D-M/2+c.height+k}]:L=[{x:W-m/2,y:D-M/2},{x:W+m/2,y:D-M/2},{x:W+m/2,y:D-M/2+d},{x:W+c.width/2,y:D-M/2+d},{x:W+c.width/2/2,y:D+M/2},{x:W-c.width/2,y:D+M/2},{x:W-c.width/2,y:D-M/2+d},{x:W-m/2,y:D-M/2+d}],H.polygon(t,L,N)},h}g(tp,"icon");async function ep(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=X(t);t.labelStyle=a;const s=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(s,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,label:u}=await K(e,t,"icon-shape default"),p=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:f,mainBkg:y}=r,{stylesMap:C}=Rr(t),b=j.svg(h),k=Y(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=C.get("fill");k.stroke=S??y;const w=h.append("g");t.icon&&w.html(`<g>${await _i(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const B=w.node().getBBox(),T=B.width,v=B.height,R=B.x,I=B.y,O=Math.max(T,v)*Math.SQRT2+p*2,N=b.circle(0,0,O,k),W=Math.max(O,c.width),D=O+c.height+d,M=b.rectangle(-W/2,-D/2,W,D,{...k,fill:"transparent",stroke:"none"}),L=h.insert(()=>N,":first-child"),$=h.insert(()=>M);return w.attr("transform",`translate(${-T/2-R},${m?c.height/2+d/2-v/2-I:-c.height/2-d/2-v/2-I})`),w.attr("style",`color: ${C.get("stroke")??f};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-D/2:D/2-c.height})`),L.attr("transform",`translate(0,${m?c.height/2+d/2:-c.height/2-d/2})`),U(t,$),t.intersect=function(F){return P.info("iconSquare intersect",t,F),H.rect(t,F)},h}g(ep,"iconCircle");async function rp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=X(t);t.labelStyle=a;const s=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(s,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 K(e,t,"icon-shape default"),d=t.pos==="t",m=o+u*2,f=o+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=Rr(t),k=-f/2,S=-m/2,w=t.label?8:0,B=j.svg(h),T=Y(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=b.get("fill");T.stroke=v??C;const R=B.path(Pe(k,S,f,m,5),T),I=Math.max(f,c.width),O=m+c.height+w,N=B.rectangle(-I/2,-O/2,I,O,{...T,fill:"transparent",stroke:"none"}),W=h.insert(()=>R,":first-child").attr("class","icon-shape2"),D=h.insert(()=>N);if(t.icon){const M=h.append("g");M.html(`<g>${await _i(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=M.node().getBBox(),$=L.width,F=L.height,q=L.x,z=L.y;M.attr("transform",`translate(${-$/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")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),W.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),U(t,D),t.intersect=function(M){if(P.info("iconSquare intersect",t,M),!t.label)return H.rect(t,M);const L=t.x??0,$=t.y??0,F=t.height??0;let q=[];return d?q=[{x:L-c.width/2,y:$-F/2},{x:L+c.width/2,y:$-F/2},{x:L+c.width/2,y:$-F/2+c.height+w},{x:L+f/2,y:$-F/2+c.height+w},{x:L+f/2,y:$+F/2},{x:L-f/2,y:$+F/2},{x:L-f/2,y:$-F/2+c.height+w},{x:L-c.width/2,y:$-F/2+c.height+w}]:q=[{x:L-f/2,y:$-F/2},{x:L+f/2,y:$-F/2},{x:L+f/2,y:$-F/2+m},{x:L+c.width/2,y:$-F/2+m},{x:L+c.width/2/2,y:$+F/2},{x:L-c.width/2,y:$+F/2},{x:L-c.width/2,y:$-F/2+m},{x:L-f/2,y:$-F/2+m}],H.polygon(t,q,M)},h}g(rp,"iconRounded");async function ip(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=X(t);t.labelStyle=a;const s=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(s,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 K(e,t,"icon-shape default"),d=t.pos==="t",m=o+u*2,f=o+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=Rr(t),k=-f/2,S=-m/2,w=t.label?8:0,B=j.svg(h),T=Y(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=b.get("fill");T.stroke=v??C;const R=B.path(Pe(k,S,f,m,.1),T),I=Math.max(f,c.width),O=m+c.height+w,N=B.rectangle(-I/2,-O/2,I,O,{...T,fill:"transparent",stroke:"none"}),W=h.insert(()=>R,":first-child"),D=h.insert(()=>N);if(t.icon){const M=h.append("g");M.html(`<g>${await _i(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=M.node().getBBox(),$=L.width,F=L.height,q=L.x,z=L.y;M.attr("transform",`translate(${-$/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")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),W.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),U(t,D),t.intersect=function(M){if(P.info("iconSquare intersect",t,M),!t.label)return H.rect(t,M);const L=t.x??0,$=t.y??0,F=t.height??0;let q=[];return d?q=[{x:L-c.width/2,y:$-F/2},{x:L+c.width/2,y:$-F/2},{x:L+c.width/2,y:$-F/2+c.height+w},{x:L+f/2,y:$-F/2+c.height+w},{x:L+f/2,y:$+F/2},{x:L-f/2,y:$+F/2},{x:L-f/2,y:$-F/2+c.height+w},{x:L-c.width/2,y:$-F/2+c.height+w}]:q=[{x:L-f/2,y:$-F/2},{x:L+f/2,y:$-F/2},{x:L+f/2,y:$-F/2+m},{x:L+c.width/2,y:$-F/2+m},{x:L+c.width/2/2,y:$+F/2},{x:L-c.width/2,y:$+F/2},{x:L-c.width/2,y:$-F/2+m},{x:L-f/2,y:$-F/2+m}],H.polygon(t,q,M)},h}g(ip,"iconSquare");async function ap(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;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)??a),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)??s;t.width=Math.max(h,o??0);const{shapeSvg:u,bbox:p,label:d}=await K(e,t,"image-shape default"),m=t.pos==="t",f=-h/2,y=-c/2,C=t.label?8:0,b=j.svg(u),k=Y(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=b.rectangle(f,y,h,c,k),w=Math.max(h,p.width),B=c+p.height+C,T=b.rectangle(-w/2,-B/2,w,B,{...k,fill:"none",stroke:"none"}),v=u.insert(()=>S,":first-child"),R=u.insert(()=>T);if(t.img){const I=u.append("image");I.attr("href",t.img),I.attr("width",h),I.attr("height",c),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-h/2},${m?B/2-c:-B/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),v.attr("transform",`translate(0,${m?p.height/2+C/2:-p.height/2-C/2})`),U(t,R),t.intersect=function(I){if(P.info("iconSquare intersect",t,I),!t.label)return H.rect(t,I);const O=t.x??0,N=t.y??0,W=t.height??0;let D=[];return m?D=[{x:O-p.width/2,y:N-W/2},{x:O+p.width/2,y:N-W/2},{x:O+p.width/2,y:N-W/2+p.height+C},{x:O+h/2,y:N-W/2+p.height+C},{x:O+h/2,y:N+W/2},{x:O-h/2,y:N+W/2},{x:O-h/2,y:N-W/2+p.height+C},{x:O-p.width/2,y:N-W/2+p.height+C}]:D=[{x:O-h/2,y:N-W/2},{x:O+h/2,y:N-W/2},{x:O+h/2,y:N-W/2+c},{x:O+p.width/2,y:N-W/2+c},{x:O+p.width/2/2,y:N+W/2},{x:O-p.width/2,y:N+W/2},{x:O-p.width/2,y:N-W/2+c},{x:O-h/2,y:N-W/2+c}],H.polygon(t,D,I)},u}g(ap,"imageSquare");async function sp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=a,n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=Math.max(l.width+(n??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(s??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 m=j.svg(o),f=Y(t,{}),y=st(u),C=m.path(y,f);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=ve(o,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,U(t,p),t.intersect=function(m){return H.polygon(t,u,m)},o}g(sp,"inv_trapezoid");async function Fi(e,t,r){const{labelStyles:i,nodeStyles:a}=X(t);t.labelStyle=i;const{shapeSvg:s,bbox:n}=await K(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:m}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const f=j.svg(s),y=Y(t,{}),C=p||d?f.path(Pe(h,c,o,l,p||0),y):f.rectangle(h,c,o,l,y);u=s.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",_t(m))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",_t(p)).attr("ry",_t(d)).attr("x",h).attr("y",c).attr("width",o).attr("height",l);return U(t,u),t.calcIntersect=function(f,y){return H.rect(f,y)},t.intersect=function(f){return H.rect(t,f)},s}g(Fi,"drawRect");async function op(e,t){const{shapeSvg:r,bbox:i,label:a}=await K(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),U(t,s),t.intersect=function(l){return H.rect(t,l)},r}g(op,"labelRect");async function np(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=a,n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+s,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 m=j.svg(o),f=Y(t,{}),y=st(u),C=m.path(y,f);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=ve(o,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,U(t,p),t.intersect=function(m){return H.polygon(t,u,m)},o}g(np,"lean_left");async function lp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=a,n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+s,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 m=j.svg(o),f=Y(t,{}),y=st(u),C=m.path(y,f);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=ve(o,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,U(t,p),t.intersect=function(m){return H.polygon(t,u,m)},o}g(lp,"lean_right");function hp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),{cssStyles:s}=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=j.svg(a),u=Y(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=st(h),d=c.path(p,u),m=a.insert(()=>d,":first-child");return m.attr("class","outer-path"),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${n/2},${-o})`),U(t,m),t.intersect=function(f){return P.info("lightningBolt intersect",t,f),H.polygon(t,h,f)},a}g(hp,"lightningBolt");var mT=g((e,t,r,i,a,s,n)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+n}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),yT=g((e,t,r,i,a,s,n)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+n}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),CT=g((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),dl=10,pl=10;async function cp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?24:a;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-s,t.width<pl&&(t.width=pl);const k=C/2/(2.5+C/50);t.height=(t.height??0)-n-k*3,t.height<dl&&(t.height=dl)}const{shapeSvg:o,bbox:l,label:h}=await K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*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,m=d*.1;let f;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=j.svg(o),b=yT(0,0,c,d,u,p,m),k=CT(0,p,c,d,u,p),S=Y(t,{}),w=C.path(b,S),B=C.path(k,S);o.insert(()=>B,":first-child").attr("class","line"),f=o.insert(()=>w,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{const C=mT(0,0,c,d,u,p,m);f=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",_t(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)+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 S=p*p*(1-k*k/(u*u));S>0&&(S=Math.sqrt(S)),S=p-S,C.y-(t.y??0)>0&&(S=-S),b.y+=S}return b},o}g(cp,"linedCylinder");async function up(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-s*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 K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(s??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:m}=t,f=j.svg(o),y=Y(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...Ie(-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=f.polygon(C.map(S=>[S.x,S.y]),y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),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(S){return H.polygon(t,C,S)},o}g(up,"linedWaveEdgedRect");async function dp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*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 K(e,t,Z(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+2*o,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+n*2+2*o,d=u-2*o,m=p-2*o,f=-d/2,y=-m/2,{cssStyles:C}=t,b=j.svg(l),k=Y(t,{}),S=[{x:f-o,y:y+o},{x:f-o,y:y+m+o},{x:f+d-o,y:y+m+o},{x:f+d-o,y:y+m},{x:f+d,y:y+m},{x:f+d,y:y+m-o},{x:f+d+o,y:y+m-o},{x:f+d+o,y:y-o},{x:f+o,y:y-o},{x:f+o,y},{x:f,y},{x:f,y:y+o}],w=[{x:f,y:y+o},{x:f+d-o,y:y+o},{x:f+d-o,y:y+m},{x:f+d,y:y+m},{x:f+d,y},{x:f,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=st(S);let T=b.path(B,k);const v=st(w);let R=b.path(v,k);t.look!=="handDrawn"&&(T=Gs(T),R=Gs(R));const I=l.insert("g",":first-child");return I.insert(()=>T),I.insert(()=>R),I.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&I.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,I),t.intersect=function(O){return H.polygon(t,S,O)},l}g(dp,"multiRect");async function pp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await K(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(s.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(s.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?p/4:p/8,m=p+(c?d/2:-d/2),f=-u/2,y=-m/2,C=10,{cssStyles:b}=t,k=Ie(f-C,y+m+C,f+u-C,y+m+C,d,.8),S=k==null?void 0:k[k.length-1],w=[{x:f-C,y:y+C},{x:f-C,y:y+m+C},...k,{x:f+u-C,y:S.y-C},{x:f+u,y:S.y-C},{x:f+u,y:S.y-2*C},{x:f+u+C,y:S.y-2*C},{x:f+u+C,y:y-C},{x:f+C,y:y-C},{x:f+C,y},{x:f,y},{x:f,y:y+C}],B=[{x:f,y:y+C},{x:f+u-C,y:y+C},{x:f+u-C,y:S.y-C},{x:f+u,y:S.y-C},{x:f+u,y},{x:f,y}],T=j.svg(a),v=Y(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const R=st(w),I=T.path(R,v),O=st(B),N=T.path(O,v),W=a.insert(()=>I,":first-child");return W.insert(()=>N),W.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(0,${-d/2})`),n.attr("transform",`translate(${-(s.width/2)-C-(s.x-(s.left??0))}, ${-(s.height/2)+C-d/2-(s.y-(s.top??0))})`),U(t,W),t.intersect=function(D){return H.polygon(t,w,D)},a}g(pp,"multiWaveEdgedRectangle");async function gp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=X(t);t.labelStyle=i,t.useHtmlLabels||Rt(yt())||(t.centerLabel=!0);const{shapeSvg:n,bbox:o,label:l}=await K(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,m=j.svg(n),f=Y(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=m.rectangle(u,p,h,c,f),C=n.insert(()=>y,":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),a&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",a),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(gp,"note");var xT=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 fp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,Z(t)),n=s.width+(t.padding??0),o=s.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=j.svg(a),m=Y(t,{}),f=xT(0,0,l),y=d.path(f,m);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=ve(a,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,m){const f=d.width,y=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}],C=H.polygon(d,y,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},a}g(fp,"question");async function mp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?21:a??0,n=t.look==="neo"?12:a??0,{shapeSvg:o,bbox:l,label:h}=await K(e,t,Z(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),p=-c/2,d=-u/2,m=d/2,f=[{x:p+m,y:d},{x:p,y:0},{x:p+m,y:-d},{x:-p,y:-d},{x:-p,y:d}],{cssStyles:y}=t,C=j.svg(o),b=Y(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=st(f),S=C.path(k,b),w=o.insert(()=>S,":first-child");return 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),w.attr("transform",`translate(${-m/2},0)`),h.attr("transform",`translate(${-m/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),U(t,w),t.intersect=function(B){return H.polygon(t,f,B)},o}g(mp,"rect_left_inv_arrow");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),n=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await Fe(o,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(Rt(ht())){const v=c.children[0],R=it(c);u=v.getBoundingClientRect(),R.attr("width",u.width),R.attr("height",u.height)}P.info("Text 2",l);const p=l||[],d=c.getBBox(),m=await Fe(o,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),f=m.children[0],y=it(m);u=f.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const C=(t.padding||0)/2;it(m).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),S=-u.width/2-C,w=-u.height/2-C;let B,T;if(t.look==="handDrawn"){const v=j.svg(s),R=Y(t,{}),I=v.path(Pe(S,w,b,k,t.rx||0),R),O=v.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=s.insert(()=>(P.debug("Rough node insert CXC",I),O),":first-child"),B=s.insert(()=>(P.debug("Rough node insert CXC",I),I),":first-child")}else B=n.insert("rect",":first-child"),T=n.insert("line"),B.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,B),t.intersect=function(v){return H.rect(t,v)},s}g(yp,"rectWithTitle");async function Cp(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,a={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Fi(e,t,a)}g(Cp,"roundedRect");var We=8;async function xp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.width)??o.width)+a*2+(t.look==="neo"?We:We*2),c=((t==null?void 0:t.height)??o.height)+s*2,u=h-We,p=c,d=We-h/2,m=-c/2,{cssStyles:f}=t,y=j.svg(n),C=Y(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+p},{x:d-We,y:m+p},{x:d-We,y:m},{x:d,y:m},{x:d,y:m+p}],k=y.polygon(b.map(w=>[w.x,w.y]),C),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path").attr("style",_t(f)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${We/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),U(t,S),t.intersect=function(w){return H.rect(t,w)},n}g(xp,"shadedProcess");async function bp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*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 K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2)*1.5,p=c,d=u/1.5,m=-p/2,f=-d/2,{cssStyles:y}=t,C=j.svg(o),b=Y(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y:f},{x:m,y:f+d},{x:m+p,y:f+d},{x:m+p,y:f-d/2}],S=st(k),w=C.path(S,b),B=o.insert(()=>w,":first-child");return B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.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,B),t.intersect=function(T){return H.polygon(t,k,T)},o}g(bp,"slopedRect");async function kp(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,a=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:a};return Fi(e,t,s)}g(kp,"squareRect");async function Tp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?20:a,n=t.look==="neo"?12:a,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=l.height+(t.look==="neo"?n*2:n),c=l.width+h/4+(t.look==="neo"?s*2:s),u=h/2,{cssStyles:p}=t,d=j.svg(o),m=Y(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const f=[{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)],y=st(f),C=d.path(y,m),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,f,k)},o}g(Tp,"stadium");async function wp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Fi(e,t,r)}g(wp,"state");function Sp(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:a}=X(t);t.labelStyle=i;const{cssStyles:s}=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=j.svg(c),p=Y(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:n,strokeWidth:2}),m=o??l,f=(t.width??0)*5/14,y=u.circle(0,0,f,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),s&&C.selectAll("path").attr("style",s),a&&C.selectAll("path").attr("style",a),t.width<25&&h&&t.look!=="handDrawn"){const S=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",w=S?`${S}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return U(t,C),t.intersect=function(S){return H.circle(t,(t.width??0)/2,S)},c}g(Sp,"stateEnd");function vp(e,t,{config:{themeVariables:r}}){var o,l;const{lineColor:i,nodeShadow:a}=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 s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const c=j.svg(s).circle(0,0,t.width,Lk(i));n=s.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=s.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&&a&&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)},s}g(vp,"stateStart");var nr=8;async function Bp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=(t==null?void 0:t.padding)??8,s=t.look==="neo"?28:a,n=t.look==="neo"?12:a,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.width)??l.width)+2*nr+s,c=((t==null?void 0:t.height)??l.height)+n,u=h-2*nr,p=c,d=-h/2,m=-c/2,f=[{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 y=j.svg(o),C=Y(t,{}),b=y.rectangle(d,m,u+16,p,C),k=y.line(d+nr,m,d+nr,m+p,C),S=y.line(d+nr+u,m,d+nr+u,m+p,C);o.insert(()=>k,":first-child"),o.insert(()=>S,":first-child");const w=o.insert(()=>b,":first-child"),{cssStyles:B}=t;w.attr("class","basic label-container").attr("style",_t(B)),U(t,w)}else{const y=ve(o,u,p,f);i&&y.attr("style",i),U(t,y)}return t.intersect=function(y){return H.polygon(t,f,y)},o}g(Bp,"subroutine");var hs=.2;async function _p(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a;(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)-s*2-hs*(t.height+n*2),10));const{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,c=hs*h,u=hs*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2+c-c,m=h,f=-d/2,y=-m/2,{cssStyles:C}=t,b=j.svg(o),k=Y(t,{}),S=[{x:f-c/2,y},{x:f+d+c/2,y},{x:f+d+c/2,y:y+m},{x:f-c/2,y:y+m}],w=[{x:f+d-c/2,y:y+m},{x:f+d+c/2,y:y+m},{x:f+d+c/2,y:y+m-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=st(S),T=b.path(B,k),v=st(w),R=b.path(v,{...k,fillStyle:"solid"}),I=o.insert(()=>R,":first-child");return I.insert(()=>T,":first-child"),I.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),U(t,I),t.intersect=function(O){return H.polygon(t,S,O)},o}g(_p,"taggedRect");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await K(e,t,Z(t)),o=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.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,m=j.svg(a),f=Y(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:p/2},...Ie(-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},...Ie(C+o,(b+l)*1.25,C+o-c,(b+l)*1.3,-l*.02,.5)],S=st(y),w=m.path(S,f),B=st(k),T=m.path(B,{...f,fillStyle:"solid"}),v=a.insert(()=>T,":first-child");return v.insert(()=>w,":first-child"),v.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-h/2})`),n.attr("transform",`translate(${-o/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-h/2-(s.y-(s.top??0))})`),U(t,v),t.intersect=function(R){return H.polygon(t,y,R)},a}g(Lp,"taggedWaveEdgedRectangle");async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,Z(t)),n=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-n/2,h=-o/2,c=a.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)},a}g(Fp,"text");var bT=g((e,t,r,i,a,s)=>`M${e},${t}
|
|
229
|
+
a${a},${s} 0,0,1 0,${-i}
|
|
230
|
+
l${r},0
|
|
231
|
+
a${a},${s} 0,0,1 0,${i}
|
|
232
|
+
M${r},${-i}
|
|
233
|
+
a${a},${s} 0,0,0 0,${i}
|
|
234
|
+
l${-r},0`,"createCylinderPathD"),kT=g((e,t,r,i,a,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),TT=g((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),gl=5,fl=10;async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?12:a/2;if(t.width||t.height){const f=t.height??0;t.height=(t.height??0)-s,t.height<gl&&(t.height=gl);const C=f/2/(2.5+f/50);t.width=(t.width??0)-s-C*3,t.width<fl&&(t.width=fl)}const{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=(t.height?t.height:o.height)+s,c=h/2,u=c/(2.5+h/50),p=(t.width?t.width:o.width)+u+s,{cssStyles:d}=t;let m;if(t.look==="handDrawn"){const f=j.svg(n),y=kT(0,0,p,h,u,c),C=TT(0,0,p,h,u,c),b=f.path(y,Y(t,{})),k=f.path(C,Y(t,{fill:"none"}));m=n.insert(()=>k,":first-child"),m=n.insert(()=>b,":first-child"),m.attr("class","basic label-container"),d&&m.attr("style",d)}else{const f=bT(0,0,p,h,u,c);m=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",_t(d)).attr("style",i),m.attr("class","basic label-container outer-path"),d&&m.selectAll("path").attr("style",d),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",u),m.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,m),t.intersect=function(f){const y=H.rect(t,f),C=y.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.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,f.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}g(Mp,"tiltedCylinder");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=(t.look==="neo",a),n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+s,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 m=j.svg(o),f=Y(t,{}),y=st(u),C=m.path(y,f);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=ve(o,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,U(t,p),t.intersect=function(m){return H.polygon(t,u,m)},o}g(Ap,"trapezoid");async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a,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)-s*2,t.width<o&&(t.width=o));const{shapeSvg:h,bbox:c}=await K(e,t,Z(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2,{cssStyles:d}=t,m=j.svg(h),f=Y(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{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=st(y),b=m.path(C,f),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(S){return H.polygon(t,y,S)},h}g(Ep,"trapezoidalPentagon");var ml=10,yl=10;async function $p(e,t){var S;const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-s)/2,t.width<yl&&(t.width=yl),t.height=(t==null?void 0:t.height)??0,t.height<ml&&(t.height=ml));const{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=Te((S=ht().flowchart)==null?void 0:S.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s,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:m}=t,f=j.svg(n),y=Y(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=st(d),b=f.path(C,y),k=n.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),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($p,"triangle");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-s*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 K(e,t,Z(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(s??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,m=p+(o?d:-d),{cssStyles:f}=t,C=14-u,b=C>0?C/2:0,k=j.svg(l),S=Y(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=[{x:-u/2-b,y:m/2},...Ie(-u/2-b,m/2,u/2+b,m/2,d,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],B=st(w),T=k.path(B,S),v=l.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.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,v),t.intersect=function(R){return H.polygon(t,w,R)},l}g(Op,"waveEdgedRectangle");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?20:a;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 S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-S*(20/9)),t.width=t.width-s*2}const{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*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,m=j.svg(o),f=Y(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-h/2,y:p/2},...Ie(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...Ie(h/2,-p/2,-h/2,-p/2,u,-1)],C=st(y),b=m.path(C,f),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(S){return H.polygon(t,y,S)},o}g(Ip,"waveRectangle");var Ct=10;async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Ct,10),t.height=Math.max(((t==null?void 0:t.height)??0)-s*2-Ct,10));const{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+a*2+Ct,c=(t!=null&&t.height?t==null?void 0:t.height:o.height)+s*2+Ct,u=h-Ct,p=c-Ct,d=-u/2,m=-p/2,{cssStyles:f}=t,y=j.svg(n),C=Y(t,{}),b=[{x:d-Ct,y:m-Ct},{x:d-Ct,y:m+p},{x:d+u,y:m+p},{x:d+u,y:m-Ct}],k=`M${d-Ct},${m-Ct} L${d+u},${m-Ct} L${d+u},${m+p} L${d-Ct},${m+p} L${d-Ct},${m-Ct}
|
|
235
|
+
M${d-Ct},${m} L${d+u},${m}
|
|
236
|
+
M${d},${m-Ct} L${d},${m+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=y.path(k,C),w=n.insert(()=>S,":first-child");return w.attr("transform",`translate(${Ct/2}, ${Ct/2})`),w.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),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(B){return H.polygon(t,b,B)},n}g(Dp,"windowPane");var Cl=new Set(["redux-color","redux-dark-color"]),wT=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function an(e,t){var bt,It,ie,ae;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:a}=yt(),{rowEven:s,rowOdd:n,nodeBorder:o,borderColorArray:l}=a;if(t.look==="handDrawn"){const{themeVariables:G}=yt(),{background:rt}=G,gt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${rt}`]};await an(e,gt)}const h=yt();t.useHtmlLabels=h.htmlLabels;let c=((bt=h.er)==null?void 0:bt.diagramPadding)??10,u=((It=h.er)==null?void 0:It.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:m}=X(t);if(r.attributes.length===0&&t.label){const G={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};ke(t.label,h)+G.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const rt=await Fi(e,t,G);if(i!=null&&Cl.has(i)){const gt=r.colorIndex??0;rt.attr("data-color-id",`color-${gt%l.length}`)}if(!Te(h.htmlLabels)){const gt=rt.select("text"),St=(ie=gt.node())==null?void 0:ie.getBBox();gt.attr("transform",`translate(${-St.width/2}, 0)`)}return rt}h.htmlLabels||(c*=1.25,u*=1.25);let f=Z(t);f||(f="node default");const y=e.insert("g").attr("class",f).attr("id",t.domId||t.id),C=await hr(y,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],S=[];let w=0,B=0,T=0,v=0,R=!0,I=!0;for(const G of r.attributes){const rt=await hr(y,G.type,h,0,b,["attribute-type"],d);w=Math.max(w,rt.width+c);const gt=await hr(y,G.name,h,0,b,["attribute-name"],d);B=Math.max(B,gt.width+c);const St=await hr(y,G.keys.join(),h,0,b,["attribute-keys"],d);T=Math.max(T,St.width+c);const Re=await hr(y,G.comment,h,0,b,["attribute-comment"],d);v=Math.max(v,Re.width+c);const Be=Math.max(rt.height,gt.height,St.height,Re.height)+u;S.push({yOffset:b,rowHeight:Be}),b+=Be}let O=4;T<=c&&(R=!1,T=0,O--),v<=c&&(I=!1,v=0,O--);const N=y.node().getBBox();if(C.width+c*2-(w+B+T+v)>0){const G=C.width+c*2-(w+B+T+v);w+=G/O,B+=G/O,T>0&&(T+=G/O),v>0&&(v+=G/O)}const W=w+B+T+v,D=j.svg(y),M=Y(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let L=0;S.length>0&&(L=S.reduce((G,rt)=>G+((rt==null?void 0:rt.rowHeight)??0),0));const $=Math.max(N.width+c*2,(t==null?void 0:t.width)||0,W),F=Math.max((L??0)+C.height,(t==null?void 0:t.height)||0),q=-$/2,z=-F/2;if(y.selectAll("g:not(:first-child)").each((G,rt,gt)=>{const St=it(gt[rt]),Re=St.attr("transform");let Be=0,ln=0;if(Re){const Qa=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Re);Qa&&(Be=parseFloat(Qa[1]),ln=parseFloat(Qa[2]),St.attr("class").includes("attribute-name")?Be+=w:St.attr("class").includes("attribute-keys")?Be+=w+B:St.attr("class").includes("attribute-comment")&&(Be+=w+B+T))}St.attr("transform",`translate(${q+c/2+Be}, ${ln+z+C.height+u/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(z+u/2)+")"),i!=null&&Cl.has(i)){const G=r.colorIndex??0;y.attr("data-color-id",`color-${G%l.length}`)}const et=D.rectangle(q,z,$,F,M),at=y.insert(()=>et,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[G,rt]of S.entries()){const St=(G+1)%2===0&&rt.yOffset!==0,Re=D.rectangle(q,C.height+z+(rt==null?void 0:rt.yOffset),$,rt==null?void 0:rt.rowHeight,{...M,fill:St?s:n,stroke:o});y.insert(()=>Re,"g.label").attr("style",p.join("")).attr("class",`row-rect-${St?"even":"odd"}`)}const lt=1e-4;let nt=cr(q,C.height+z,$+q,C.height+z,lt),ut=D.polygon(nt.map(G=>[G.x,G.y]),M);if(y.insert(()=>ut).attr("class","divider"),nt=cr(w+q,C.height+z,w+q,F+z,lt),ut=D.polygon(nt.map(G=>[G.x,G.y]),M),y.insert(()=>ut).attr("class","divider"),R){const G=w+B+q;nt=cr(G,C.height+z,G,F+z,lt),ut=D.polygon(nt.map(rt=>[rt.x,rt.y]),M),y.insert(()=>ut).attr("class","divider")}if(I){const G=w+B+T+q;nt=cr(G,C.height+z,G,F+z,lt),ut=D.polygon(nt.map(rt=>[rt.x,rt.y]),M),y.insert(()=>ut).attr("class","divider")}for(const G of k){const rt=C.height+z+G;nt=cr(q,rt,$+q,rt,lt),ut=D.polygon(nt.map(gt=>[gt.x,gt.y]),M),y.insert(()=>ut).attr("class","divider")}if(U(t,at),m&&t.look!=="handDrawn")if(i!=null&&wT.has(i))y.selectAll("path").attr("style",m);else{const G=m.split(";"),rt=(ae=G==null?void 0:G.filter(gt=>gt.includes("stroke")))==null?void 0:ae.map(gt=>`${gt}`).join("; ");y.selectAll("path").attr("style",rt??""),y.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(G){return H.rect(t,G)},y}g(an,"erBox");async function hr(e,t,r,i=0,a=0,s=[],n=""){const o=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",n);t!==gn(t)&&(t=gn(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await Se(o,t,{width:ke(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(Te(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(hr,"addText");function cr(e,t,r,i,a){return e===r?[{x:e-a/2,y:t},{x:e+a/2,y:t},{x:r+a/2,y:i},{x:r-a/2,y:i}]:[{x:e,y:t-a/2},{x:e,y:t+a/2},{x:r,y:i+a/2},{x:r,y:i-a/2}]}g(cr,"lineToPolygon");async function Pp(e,t,r,i,a=r.class.padding??12){const s=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 ei(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=n.insert("g").attr("class","label-group text"),await ei(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,h=n.insert("g").attr("class","members-group text");let f=0;for(const b of t.members){const k=await ei(h,b,f,[b.parseClassifier()]);f+=k+s}d=h.node().getBBox().height,d<=0&&(d=a/2),c=n.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await ei(c,b,y,[b.parseClassifier()]);y+=k+s}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(${-m.width/2}, ${u})`),C=n.node().getBBox(),h.attr("transform",`translate(0, ${u+p+a*2})`),C=n.node().getBBox(),c.attr("transform",`translate(0, ${u+p+(d?d+a*4:a*2)})`),C=n.node().getBBox(),{shapeSvg:n,bbox:C}}g(Pp,"textHelper");async function ei(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=yt();let n="useHtmlLabels"in t?t.useHtmlLabels:Te(s.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!n&&o.startsWith("\\")&&(o=o.substring(1)),hi(o)&&(n=!0);const l=await Se(a,fo(Je(o)),{width:ke(o,s)+50,classes:"markdown-node-label",useHtmlLabels:n},s);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 m=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(f=>new Promise(y=>{function C(){var b;if(f.style.display="flex",f.style.flexDirection="column",m){const k=((b=s.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(k,10)*5+"px";f.style.minWidth=w,f.style.maxWidth=w}else f.style.width="100%";y(f)}g(C,"setupImage"),setTimeout(()=>{f.complete&&C()}),f.addEventListener("error",C),f.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 a.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}g(ei,"addText");async function Rp(e,t){var D,M;const r=ht(),{themeVariables:i}=r,{useGradient:a}=i,s=r.class.padding??12,n=s,o=t.useHtmlLabels??Te(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Pp(e,t,r,o,n),{labelStyles:u,nodeStyles:p}=X(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((D=l.styles)==null?void 0:D.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((M=r.class)!=null&&M.hideEmptyMembersBox),f=j.svg(h),y=Y(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.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 S=-C/2,w=-b/2;let B=m?s*2:l.members.length===0&&l.methods.length===0?-s:0;k&&(B=s*2);const T=f.rectangle(S-s,w-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0),C+2*s,b+2*s+B,y),v=h.insert(()=>T,":first-child");v.attr("class","basic label-container outer-path");const R=v.node().getBBox(),I=h.select(".annotation-group").node().getBBox().height-(m?s/2:0)||0,O=h.select(".label-group").node().getBBox().height-(m?s/2:0)||0,N=h.select(".members-group").node().getBBox().height-(m?s/2:0)||0,W=(I+O+w+s-(w-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(h.selectAll(".text").each((L,$,F)=>{var nt,ut;const q=it(F[$]),z=q.attr("transform");let et=0;if(z){const It=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);It&&(et=parseFloat(It[2]))}let at=et+w+s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(q.attr("class").includes("methods-group")){const bt=Math.max(N,n/2);k?at=Math.max(W,I+O+bt+w+n*2+s)+n*2:at=I+O+bt+w+n*4+s}l.members.length===0&&l.methods.length===0&&((nt=r.class)!=null&&nt.hideEmptyMembersBox)&&(l.annotations.length>0?at=et-n:at=et),o||(at-=4);let lt=S;(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,It,ie){window.getComputedStyle(ie[It]).textAnchor==="middle"&&(lt=0)})),q.attr("transform",`translate(${lt}, ${at})`)}),l.members.length>0||l.methods.length>0||m){const L=I+O+w+s,$=f.line(R.x,L,R.x+R.width,L+.001,y);h.insert(()=>$).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const L=I+O+N+w+n*2+s,$=f.line(R.x,k?Math.max(W,L):L,R.x+R.width,(k?Math.max(W,L):L)+.001,y);h.insert(()=>$).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),v.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*([^;]*)/),$=L.exec(d);if($){const F=$[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,v),t.intersect=function(L){return H.rect(t,L)},h}g(Rp,"classBox");async function qp(e,t){var R,I;const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const a=t,s=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 m;l?m=await oe(d,`<<${a.type}>>`,0,t.labelStyle):m=await oe(d,"<<Element>>",0,t.labelStyle);let f=m;const y=await oe(d,a.name,f,t.labelStyle+"; font-weight: bold;");if(f+=y+o,l){const O=await oe(d,`${a.requirementId?`ID: ${a.requirementId}`:""}`,f,t.labelStyle);f+=O;const N=await oe(d,`${a.text?`Text: ${a.text}`:""}`,f,t.labelStyle);f+=N;const W=await oe(d,`${a.risk?`Risk: ${a.risk}`:""}`,f,t.labelStyle);f+=W,await oe(d,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,f,t.labelStyle)}else{const O=await oe(d,`${s.type?`Type: ${s.type}`:""}`,f,t.labelStyle);f+=O,await oe(d,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,f,t.labelStyle)}const C=(((R=d.node())==null?void 0:R.getBBox().width)??200)+n,b=(((I=d.node())==null?void 0:I.getBBox().height)??200)+n,k=-C/2,S=-b/2,w=j.svg(d),B=Y(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const T=w.rectangle(k,S,C,b,B),v=d.insert(()=>T,":first-child");if(v.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,N,W)=>{const D=it(W[N]),M=D.attr("transform");let L=0,$=0;if(M){const et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(M);et&&(L=parseFloat(et[1]),$=parseFloat(et[2]))}const F=$-b/2;let q=k+n/2;(N===0||N===1)&&(q=L),D.attr("transform",`translate(${q}, ${F+n})`)}),f>m+y+o){const O=S+m+y+o;let N;if(t.look==="neo"){const M=[[k,O],[k+C,O],[k+C,O+.001],[k,O+.001]];N=w.polygon(M,B)}else N=w.line(k,O,k+C,O,B);d.insert(()=>N).attr("class","divider")}return U(t,v),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(qp,"requirementBox");async function oe(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=ht(),n=s.htmlLabels??!0,o=await Se(a,fo(Je(t)),{width:ke(t,s)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},s);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 a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(oe,"addText");var ST=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 Wp(e,t,{config:r}){var N,W;const{labelStyles:i,nodeStyles:a}=X(t);t.labelStyle=i||"";const s=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:h}=await K(e,t,Z(t)),c=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((N=r==null?void 0:r.kanban)!=null&&N.ticketBaseUrl)&&(u=(W=r==null?void 0:r.kanban)==null?void 0:W.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 m,f;p?{label:m,bbox:f}=await ls(p,"ticket"in t&&t.ticket||"",d):{label:m,bbox:f}=await ls(o,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:C}=await ls(o,"assigned"in t&&t.assigned||"",d);t.width=n;const b=10,k=(t==null?void 0:t.width)||0,S=Math.max(f.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+S,B=-k/2,T=-w/2;h.attr("transform","translate("+(c-k/2)+", "+(-S-l.height/2)+")"),m.attr("transform","translate("+(c-k/2)+", "+(-S+l.height/2)+")"),y.attr("transform","translate("+(c+k/2-C.width-2*s)+", "+(-S+l.height/2)+")");let v;const{rx:R,ry:I}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const D=j.svg(o),M=Y(t,{}),L=R||I?D.path(Pe(B,T,k,w,R||0),M):D.rectangle(B,T,k,w,M);v=o.insert(()=>L,":first-child"),v.attr("class","basic label-container").attr("style",O||null)}else{v=o.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",a).attr("rx",R??5).attr("ry",I??5).attr("x",B).attr("y",T).attr("width",k).attr("height",w);const D="priority"in t&&t.priority;if(D){const M=o.append("line"),L=B+2,$=T+Math.floor((R??0)/2),F=T+w-Math.floor((R??0)/2);M.attr("x1",L).attr("y1",$).attr("x2",L).attr("y2",F).attr("stroke-width","4").attr("stroke",ST(D))}}return U(t,v),t.height=w,t.intersect=function(D){return H.rect(t,D)},o}g(Wp,"kanbanItem");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:o}=await K(e,t,Z(t)),l=s.width+10*n,h=s.height+8*n,c=.15*l,{cssStyles:u}=t,p=s.width+20,d=s.height+20,m=Math.max(l,p),f=Math.max(h,d);o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const C=`M0 0
|
|
237
|
+
a${c},${c} 1 0,0 ${m*.25},${-1*f*.1}
|
|
238
|
+
a${c},${c} 1 0,0 ${m*.25},0
|
|
239
|
+
a${c},${c} 1 0,0 ${m*.25},0
|
|
240
|
+
a${c},${c} 1 0,0 ${m*.25},${f*.1}
|
|
241
|
+
|
|
242
|
+
a${c},${c} 1 0,0 ${m*.15},${f*.33}
|
|
243
|
+
a${c*.8},${c*.8} 1 0,0 0,${f*.34}
|
|
244
|
+
a${c},${c} 1 0,0 ${-1*m*.15},${f*.33}
|
|
245
|
+
|
|
246
|
+
a${c},${c} 1 0,0 ${-1*m*.25},${f*.15}
|
|
247
|
+
a${c},${c} 1 0,0 ${-1*m*.25},0
|
|
248
|
+
a${c},${c} 1 0,0 ${-1*m*.25},0
|
|
249
|
+
a${c},${c} 1 0,0 ${-1*m*.25},${-1*f*.15}
|
|
250
|
+
|
|
251
|
+
a${c},${c} 1 0,0 ${-1*m*.1},${-1*f*.33}
|
|
252
|
+
a${c*.8},${c*.8} 1 0,0 0,${-1*f*.34}
|
|
253
|
+
a${c},${c} 1 0,0 ${m*.1},${-1*f*.33}
|
|
254
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=j.svg(a),k=Y(t,{}),S=b.path(C,k);y=a.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",_t(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-m/2}, ${-f/2})`),U(t,y),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)},a}g(zp,"bang");async function Np(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:o}=await K(e,t,Z(t)),l=s.width+2*n,h=s.height+2*n,c=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:m}=t;let f;const y=`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=j.svg(a),b=Y(t,{}),k=C.path(y,b);f=a.insert(()=>k,":first-child"),f.attr("class","basic label-container").attr("style",_t(m))}else f=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),f.attr("transform",`translate(${-l/2}, ${-h/2})`),U(t,f),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)},a}g(Np,"cloud");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:o}=await K(e,t,Z(t)),l=s.width+8*n,h=s.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=a.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.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(${-s.width/2}, ${-s.height/2})`),a.append(()=>o.node()),U(t,p),t.calcIntersect=function(d,m){return H.rect(d,m)},t.intersect=function(d){return H.rect(t,d)},a}g(Hp,"defaultMindmapNode");async function jp(e,t){const r={padding:t.padding??0};return rn(e,t,r)}g(jp,"mindmapCircle");var vT=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:kp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Cp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Tp},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Bp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Yd},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:rn},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:zp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Np},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:fp},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Qd},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:lp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:np},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ap},{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:sp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Ud},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Fp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Pd},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:xp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:vp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Sp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Zd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Jd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:zd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Nd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Hd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:hp},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Op},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Kd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Mp},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:cp},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:jd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Xd},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:$p},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Dp},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Vd},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Ep},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Gd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:bp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:pp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:dp},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Dd},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Wd},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Lp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:_p},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ip},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:mp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:up}],BT=g(()=>{const t=[...Object.entries({state:wp,choice:Rd,note:gp,rectWithTitle:yp,labelRect:op,iconSquare:ip,iconCircle:ep,icon:tp,iconRounded:rp,imageSquare:ap,anchor:Od,kanbanItem:Wp,mindmapCircle:jp,defaultMindmapNode:Hp,classBox:Rp,erBox:an,requirementBox:qp}),...vT.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Yp=BT();function _T(e){return e in Yp}g(_T,"isValidShape");var Va=new Map;async function Xp(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Yp[t.shape]:void 0;if(!s)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),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return i.attr("data-look",_t(t.look)),t.tooltip&&a.attr("title",t.tooltip),Va.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(Xp,"insertNode");var a_=g((e,t)=>{Va.set(t.id,e)},"setNodeElem"),s_=g(()=>{Va.clear()},"clear"),o_=g(e=>{const t=Va.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"),LT=g((e,t,r,i,a,s=!1,n)=>{t.arrowTypeStart&&xl(e,"start",t.arrowTypeStart,r,i,a,s,n),t.arrowTypeEnd&&xl(e,"end",t.arrowTypeEnd,r,i,a,s,n)},"addEdgeMarkers"),FT={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}},MT=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],xl=g((e,t,r,i,a,s,n=!1,o)=>{var m;const l=FT[r],h=l&&MT.includes(l.type);if(!l){P.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${a}_${s}-${c}${t==="start"?"Start":"End"}${n&&h?"-margin":""}`;if(o&&o.trim()!==""){const f=o.replace(/[^\dA-Za-z]/g,"_"),y=`${d}_${f}`;if(!document.getElementById(y)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=y,b.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",o),l.fill&&S.setAttribute("fill",o)}),(m=C.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),AT=g(e=>{var t,r;return typeof e=="string"?e:(r=(t=ht())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),La=new Map,Ft=new Map,n_=g(()=>{La.clear(),Ft.clear()},"clear"),Vr=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),ET=g(async(e,t)=>{const r=ht();let i=Rt(r);const{labelStyles:a}=X(t);t.labelStyle=a;const s=e.insert("g").attr("class","edgeLabel"),n=s.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",h=await Se(e,t.label,{style:Vr(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],m=it(h);c=d.getBoundingClientRect(),u=c,m.attr("width",c.width),m.attr("height",c.height)}else{const d=it(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}n.attr("transform",Nr(u,i)),La.set(t.id,s),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),f=await Fe(m,t.startLabelLeft,Vr(t.labelStyle)||"",!1,!1);p=f;let y=f.getBBox();if(i){const C=f.children[0],b=it(f);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Nr(y,i)),Ft.get(t.id)||Ft.set(t.id,{}),Ft.get(t.id).startLeft=d,ri(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),f=await Fe(m,t.startLabelRight,Vr(t.labelStyle)||"",!1,!1);p=f,m.node().appendChild(f);let y=f.getBBox();if(i){const C=f.children[0],b=it(f);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Nr(y,i)),Ft.get(t.id)||Ft.set(t.id,{}),Ft.get(t.id).startRight=d,ri(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),f=await Fe(m,t.endLabelLeft,Vr(t.labelStyle)||"",!1,!1);p=f;let y=f.getBBox();if(i){const C=f.children[0],b=it(f);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Nr(y,i)),d.node().appendChild(f),Ft.get(t.id)||Ft.set(t.id,{}),Ft.get(t.id).endLeft=d,ri(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),f=await Fe(m,t.endLabelRight,Vr(t.labelStyle)||"",!1,!1);p=f;let y=f.getBBox();if(i){const C=f.children[0],b=it(f);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Nr(y,i)),d.node().appendChild(f),Ft.get(t.id)||Ft.set(t.id,{}),Ft.get(t.id).endRight=d,ri(p,t.endLabelRight)}return h},"insertEdgeLabel");function ri(e,t){Rt(ht())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(ri,"setTerminalWidth");var $T=g((e,t)=>{P.debug("Moving label abc88 ",e.id,e.label,La.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ht(),{subGraphTitleTotalMargin:a}=Ho(i);if(e.label){const s=La.get(e.id);let n=e.x,o=e.y;if(r){const l=Kt.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)}s.attr("transform",`translate(${n}, ${o+a/2})`)}if(e.startLabelLeft){const s=Ft.get(e.id).startLeft;let n=e.x,o=e.y;if(r){const l=Kt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);n=l.x,o=l.y}s.attr("transform",`translate(${n}, ${o})`)}if(e.startLabelRight){const s=Ft.get(e.id).startRight;let n=e.x,o=e.y;if(r){const l=Kt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);n=l.x,o=l.y}s.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelLeft){const s=Ft.get(e.id).endLeft;let n=e.x,o=e.y;if(r){const l=Kt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);n=l.x,o=l.y}s.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelRight){const s=Ft.get(e.id).endRight;let n=e.x,o=e.y;if(r){const l=Kt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=l.x,o=l.y}s.attr("transform",`translate(${n}, ${o})`)}},"positionEdgeLabel"),OT=g((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),n=e.width/2,o=e.height/2;return a>=n||s>=o},"outsideNode"),IT=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,a=e.y,s=Math.abs(i-r.x),n=e.width/2;let o=r.x<t.x?n-s:n+s;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*n>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-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"),bl=g((e,t)=>{P.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(P.info("abc88 checking point",s,t),!OT(t,s)&&!a){const n=IT(t,i,s);P.debug("abc88 inside",s,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),a=!0}else P.warn("abc88 outside",s,i),i=s,a||r.push(s)}),P.debug("returning points",r),r},"cutPathAtIntersect");function Up(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],n=e[i+1];(a.x===s.x&&s.y===n.y&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===n.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-n.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(Up,"extractCornerPoints");var kl=g(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),n=r/s;return{x:t.x-n*i,y:t.y-n*a}},"findAdjacentPoint"),DT=g(function(e){const{cornerPointPositions:t}=Up(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],n=e[i],o=kl(a,n,5),l=kl(s,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(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){P.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.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(s.x-a.x),Math.abs(s.y-a.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),PT=g((e,t,r)=>{const i=e-t-r,a=2,s=2,n=a+s,o=Math.floor(i/n),l=Array(o).fill(`${a} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),RT=g(function(e,t,r,i,a,s,n,o=!1){var $;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=a;var p=s;const d=[];for(const F in t.cssCompiledStyles)Xu(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 m=btoa(JSON.stringify(h));t.toCluster&&(P.info("to cluster abc88",r.get(t.toCluster)),h=bl(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=bl(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let f=h.filter(F=>!Number.isNaN(F.y));const y=AT(t.curve);y!=="rounded"&&(f=DT(f));let C=qi;switch(y){case"linear":C=qi;break;case"basis":C=ds;break;case"cardinal":C=Ih;break;case"bumpX":C=jl;break;case"bumpY":C=Hl;break;case"catmullRom":C=Ph;break;case"monotoneX":C=Nl;break;case"monotoneY":C=zl;break;case"natural":C=Wl;break;case"step":C=ql;break;case"stepAfter":C=Rl;break;case"stepBefore":C=Pl;break;case"rounded":C=qi;break;default:C=ds}const{x:b,y:k}=Mx(t),S=rf().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 B,T=y==="rounded"?Vp(Gp(f,t),5):S(f);const v=Array.isArray(t.style)?t.style:[t.style];let R=v.find(F=>F==null?void 0:F.startsWith("stroke:")),I="";t.animate&&(I="edge-animation-fast"),t.animation&&(I="edge-animation-"+t.animation);let O=!1;if(t.look==="handDrawn"){const F=j.svg(e);Object.assign([],f);const q=F.path(T,{roughness:.3,seed:l});w+=" transition",B=it(q).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",v?v.reduce((et,at)=>et+";"+at,""):"");let z=B.attr("d");B.attr("d",z),e.node().appendChild(B.node())}else{const F=d.join(";"),q=v?v.reduce((ut,bt)=>ut+bt+";",""):"",z=(F?F+";"+q+";":q)+";"+(v?v.reduce((ut,bt)=>ut+";"+bt,""):"");B=e.append("path").attr("d",T).attr("id",`${n}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",z),R=($=z.match(/stroke:([^;]+)/))==null?void 0:$[1],O=t.animate===!0||!!t.animation||F.includes("animation");const et=B.node(),at=typeof et.getTotalLength=="function"?et.getTotalLength():0,lt=Bn[t.arrowTypeStart]||0,nt=Bn[t.arrowTypeEnd]||0;if(t.look==="neo"&&!O){const bt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?PT(at,lt,nt):`0 ${lt} ${at-lt-nt} ${nt}`}; stroke-dashoffset: 0;`;B.attr("style",bt+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",m),B.attr("data-look",_t(t.look)),t.showPoints&&f.forEach(F=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",F.x).attr("cy",F.y)});let N="";(ht().flowchart.arrowMarkerAbsolute||ht().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",t.arrowTypeStart),P.info("arrowTypeEnd",t.arrowTypeEnd);const W=!O&&(t==null?void 0:t.look)==="neo";LT(B,t,N,n,i,W,R);const D=Math.floor(h.length/2),M=h[D];Kt.isLabelCoordinateInPath(M,B.attr("d"))||(c=!0);let L={};return c&&(L.updatedPath=h),L.originalPath=t.points,L},"insertEdge");function Vp(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const n=e[s],o=e[s-1],l=e[s+1];if(s===0)r+=`M${n.x},${n.y}`;else if(s===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),m=Math.hypot(u,p);if(d<a||m<a){r+=`L${n.x},${n.y}`;continue}const f=h/d,y=c/d,C=u/m,b=p/m,k=f*C+y*b,S=Math.max(-1,Math.min(1,k)),w=Math.acos(S);if(w<a||Math.abs(Math.PI-w)<a){r+=`L${n.x},${n.y}`;continue}const B=Math.min(t/Math.sin(w/2),d/2,m/2),T=n.x-f*B,v=n.y-y*B,R=n.x+C*B,I=n.y+b*B;r+=`L${T},${v}`,r+=`Q${n.x},${n.y} ${R},${I}`}}return r}g(Vp,"generateRoundedPath");function Qs(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(Qs,"calculateDeltaAndAngle");function Gp(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Et[t.arrowTypeStart]){const a=Et[t.arrowTypeStart],s=e[0],n=e[1],{angle:o}=Qs(s,n),l=a*Math.cos(o),h=a*Math.sin(o);r[0].x=s.x+l,r[0].y=s.y+h}const i=e.length;if(i>=2&&Et[t.arrowTypeEnd]){const a=Et[t.arrowTypeEnd],s=e[i-1],n=e[i-2],{angle:o}=Qs(n,s),l=a*Math.cos(o),h=a*Math.sin(o);r[i-1].x=s.x-l,r[i-1].y=s.y-h}return r}g(Gp,"applyMarkerOffsetsToPoints");var qT=g((e,t,r,i)=>{t.forEach(a=>{lw[a](e,r,i)})},"insertMarkers"),WT=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"),zT=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"),NT=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"),HT=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"),jT=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"),YT=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"),XT=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"),UT=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"),VT=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"),GT=g((e,t,r)=>{const i=yt(),{themeVariables:a}=i,{transitionColor:s}=a;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",`${s}`)},"barbNeo"),ZT=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"),KT=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 a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),QT=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"),JT=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 a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),tw=g((e,t,r)=>{const i=yt(),{themeVariables:a}=i,{strokeWidth:s}=a;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",`${s}`),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",`${s}`)},"only_one_neo"),ew=g((e,t,r)=>{const i=yt(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:n}=a,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",`${s}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);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",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),rw=g((e,t,r)=>{const i=yt(),{themeVariables:a}=i,{strokeWidth:s}=a;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",`${s}`),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",`${s}`)},"one_or_more_neo"),iw=g((e,t,r)=>{const i=yt(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:n}=a,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",`${s}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);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",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),aw=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"),sw=g((e,t,r)=>{const i=yt(),{themeVariables:a}=i,{strokeWidth:s}=a;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",`${s}`).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"),ow=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"),nw=g((e,t,r)=>{const i=yt(),{themeVariables:a}=i,{strokeWidth:s}=a,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",`${s}`)},"requirement_contains_neo"),lw={extension:WT,composition:zT,aggregation:NT,dependency:HT,lollipop:jT,point:YT,circle:XT,cross:UT,barb:VT,barbNeo:GT,only_one:ZT,zero_or_one:KT,one_or_more:QT,zero_or_more:JT,only_one_neo:tw,zero_or_one_neo:ew,one_or_more_neo:rw,zero_or_more_neo:iw,requirement_arrow:aw,requirement_contains:ow,requirement_arrow_neo:sw,requirement_contains_neo:nw},hw=qT,cw={common:ki,getConfig:yt,insertCluster:nT,insertEdge:RT,insertEdgeLabel:ET,insertMarkers:hw,insertNode:Xp,interpolateToCurve:Po,labelHelper:K,log:P,positionEdgeLabel:$T},Ci={},Zp=g(e=>{for(const t of e)Ci[t.name]=t},"registerLayoutLoaders"),uw=g(()=>{Zp([{name:"dagre",loader:g(async()=>await ot(()=>import("./dagre-KV5264BT-DUWGBIgm.js"),__vite__mapDeps([2,3,4,5,6,7,0,1,8,9])),"loader")},{name:"cose-bilkent",loader:g(async()=>await ot(()=>import("./cose-bilkent-S5V4N54A-4fUnkROm.js"),__vite__mapDeps([10,11,0,1,8,9])),"loader")}])},"registerDefaultLayoutLoaders");uw();var l_=g(async(e,t)=>{if(!(e.layoutAlgorithm in Ci))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=Ci[e.layoutAlgorithm],i=await r.loader(),{theme:a,themeVariables:s}=e.config,{useGradient:n,gradientStart:o,gradientStop:l}=s,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",`${a!=null&&a.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",`${a!=null&&a.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,cw,{algorithm:r.algorithm})},"render"),h_=g((e="",{fallback:t="dagre"}={})=>{if(e in Ci)return e;if(t in Ci)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"),Kp="comm",Qp="rule",Jp="decl",dw="@import",pw="@namespace",gw="@keyframes",fw="@layer",mw=Math.abs,li=String.fromCharCode;function tg(e){return e.trim()}function Js(e,t,r){return e.replace(t,r)}function pr(e,t){return e.charCodeAt(t)|0}function Or(e,t,r){return e.slice(t,r)}function ne(e){return e.length}function yw(e){return e.length}function Pi(e,t){return t.push(e),e}var Ga=1,Ir=1,eg=0,Vt=0,kt=0,Wr="";function sn(e,t,r,i,a,s,n,o){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:Ga,column:Ir,length:n,return:"",siblings:o}}function Cw(){return kt}function xw(){return kt=Vt>0?pr(Wr,--Vt):0,Ir--,kt===10&&(Ir=1,Ga--),kt}function Jt(){return kt=Vt<eg?pr(Wr,Vt++):0,Ir++,kt===10&&(Ir=1,Ga++),kt}function Me(){return pr(Wr,Vt)}function Gi(){return Vt}function Za(e,t){return Or(Wr,e,t)}function xi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function bw(e){return Ga=Ir=1,eg=ne(Wr=e),Vt=0,[]}function kw(e){return Wr="",e}function cs(e){return tg(Za(Vt-1,to(e===91?e+2:e===40?e+1:e)))}function Tw(e){for(;(kt=Me())&&kt<33;)Jt();return xi(e)>2||xi(kt)>3?"":" "}function ww(e,t){for(;--t&&Jt()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Za(e,Gi()+(t<6&&Me()==32&&Jt()==32))}function to(e){for(;Jt();)switch(kt){case e:return Vt;case 34:case 39:e!==34&&e!==39&&to(kt);break;case 40:e===41&&to(e);break;case 92:Jt();break}return Vt}function Sw(e,t){for(;Jt()&&e+kt!==57;)if(e+kt===84&&Me()===47)break;return"/*"+Za(t,Vt-1)+"*"+li(e===47?e:Jt())}function vw(e){for(;!xi(Me());)Jt();return Za(e,Vt)}function Bw(e){return kw(Zi("",null,null,null,[""],e=bw(e),0,[0],e))}function Zi(e,t,r,i,a,s,n,o,l){for(var h=0,c=0,u=n,p=0,d=0,m=0,f=1,y=1,C=1,b=0,k=0,S="",w=a,B=s,T=i,v=S;y;)switch(m=k,k=Jt()){case 40:m!=108&&pr(v,u-1)==58?(b++,v+="("):v+=cs(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=cs(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=li(k);break}v+=Tw(m);break;case 92:v+=ww(Gi()-1,7);continue;case 47:switch(Me()){case 42:case 47:Pi(_w(Sw(Jt(),Gi()),t,r,l),l),(xi(m||1)==5||xi(Me()||1)==5)&&ne(v)&&Or(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*f:o[h++]=ne(v)*C;case 125*f:case 59:case 0:if(b>0&&k){v+=li(k);break}switch(k){case 0:case 125:y=0;case 59+c:C==-1&&(v=Js(v,/\f/g,"")),d>0&&(ne(v)-u||f===0)&&Pi(d>32?wl(v+";",i,r,u-1,l):wl(Js(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(Pi(T=Tl(v,t,r,h,c,a,o,S,w=[],B=[],u,s),s),k===123)if(c===0)Zi(v,t,T,T,w,s,u,o,B);else{switch(p){case 99:if(pr(v,3)===110)break;case 108:if(pr(v,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Zi(e,T,T,i&&Pi(Tl(e,T,T,0,0,a,o,S,a,w=[],u,B),B),a,B,u,o,i?w:B):Zi(v,T,T,T,[""],B,0,o,B)}}h=c=d=0,f=C=1,S=v="",u=n;break;case 58:u=1+ne(v),d=m;default:if(f<1){if(k==123)--f;else if(k==125&&f++==0&&xw()==125)continue}switch(v+=li(k),k*f){case 38:C=c>0?1:(v+="\f",-1);break;case 44:if(b>0)break;o[h++]=(ne(v)-1)*C,C=1;break;case 64:Me()===45&&(v+=cs(Jt())),p=Me(),c=u=ne(S=v+=vw(Gi())),k++;break;case 45:m===45&&ne(v)==2&&(f=0)}}return s}function Tl(e,t,r,i,a,s,n,o,l,h,c,u){for(var p=a-1,d=a===0?s:[""],m=yw(d),f=0,y=0,C=0;f<i;++f)for(var b=0,k=Or(e,p+1,p=mw(y=n[f])),S=e;b<m;++b)(S=tg(y>0?d[b]+" "+k:Js(k,/&\f/g,d[b])))&&(l[C++]=S);return sn(e,t,r,a===0?Qp:o,l,h,c,u)}function _w(e,t,r,i){return sn(e,t,r,Kp,li(Cw()),Or(e,2,-2),0,i)}function wl(e,t,r,i,a){return sn(e,t,r,Jp,Or(e,0,i),Or(e,i+1,-1),i,a)}function eo(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Lw(e,t,r,i){switch(e.type){case fw:if(e.children.length)break;case dw:case pw:case Jp:return e.return=e.return||e.value;case Kp:return"";case gw:return e.return=e.value+"{"+eo(e.children,i)+"}";case Qp:if(!ne(e.value=e.props.join(",")))return""}return ne(r=eo(e.children,i))?e.return=e.value+"{"+r+"}":""}var Fw=vu(Object.keys,Object),Mw=Object.prototype,Aw=Mw.hasOwnProperty;function Ew(e){if(!Wa(e))return Fw(e);var t=[];for(var r in Object(e))Aw.call(e,r)&&r!="constructor"&&t.push(r);return t}var ro=ar(pe,"DataView"),io=ar(pe,"Promise"),ao=ar(pe,"Set"),so=ar(pe,"WeakMap"),Sl="[object Map]",$w="[object Object]",vl="[object Promise]",Bl="[object Set]",_l="[object WeakMap]",Ll="[object DataView]",Ow=ir(ro),Iw=ir(mi),Dw=ir(io),Pw=ir(ao),Rw=ir(so),He=Dr;(ro&&He(new ro(new ArrayBuffer(1)))!=Ll||mi&&He(new mi)!=Sl||io&&He(io.resolve())!=vl||ao&&He(new ao)!=Bl||so&&He(new so)!=_l)&&(He=function(e){var t=Dr(e),r=t==$w?e.constructor:void 0,i=r?ir(r):"";if(i)switch(i){case Ow:return Ll;case Iw:return Sl;case Dw:return vl;case Pw:return Bl;case Rw:return _l}return t});var qw="[object Map]",Ww="[object Set]",zw=Object.prototype,Nw=zw.hasOwnProperty;function Fl(e){if(e==null)return!0;if(za(e)&&(Ca(e)||typeof e=="string"||typeof e.splice=="function"||Io(e)||Do(e)||ya(e)))return!e.length;var t=He(e);if(t==qw||t==Ww)return!e.size;if(Wa(e))return!Ew(e).length;for(var r in e)if(Nw.call(e,r))return!1;return!0}var rg="c4",Hw=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),jw=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./c4Diagram-AHTNJAMY-CJePgNba.js");return{diagram:t}},__vite__mapDeps([12,13,0,1,8,9]));return{id:rg,diagram:e}},"loader"),Yw={id:rg,detector:Hw,loader:jw},Xw=Yw,ig="flowchart",Uw=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"),Vw=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CuSvL41f.js");return{diagram:t}},__vite__mapDeps([14,15,13,16,17,8,18,0,1,9]));return{id:ig,diagram:e}},"loader"),Gw={id:ig,detector:Uw,loader:Vw},Zw=Gw,ag="flowchart-v2",Kw=g((e,t)=>{var r,i,a;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)&&((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),Qw=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CuSvL41f.js");return{diagram:t}},__vite__mapDeps([14,15,13,16,17,8,18,0,1,9]));return{id:ag,diagram:e}},"loader"),Jw={id:ag,detector:Kw,loader:Qw},tS=Jw,sg="er",eS=g(e=>/^\s*erDiagram/.test(e),"detector"),rS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./erDiagram-SMLLAGMA-ltzBzX-J.js");return{diagram:t}},__vite__mapDeps([19,16,17,18,0,1,8,9]));return{id:sg,diagram:e}},"loader"),iS={id:sg,detector:eS,loader:rS},aS=iS,og="gitGraph",sS=g(e=>/^\s*gitGraph/.test(e),"detector"),oS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./gitGraphDiagram-UUTBAWPF-BaBzMGpC.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,0,1,6,4,8,9]));return{id:og,diagram:e}},"loader"),nS={id:og,detector:sS,loader:oS},lS=nS,ng="gantt",hS=g(e=>/^\s*gantt/.test(e),"detector"),cS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./ganttDiagram-T4ZO3ILL-D695mEJV.js");return{diagram:t}},__vite__mapDeps([24,0,1,25,26,9,27,28,8]));return{id:ng,diagram:e}},"loader"),uS={id:ng,detector:hS,loader:cS},dS=uS,lg="info",pS=g(e=>/^\s*info/.test(e),"detector"),gS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./infoDiagram-42DDH7IO-C554WkLo.js");return{diagram:t}},__vite__mapDeps([29,23,0,1,6,4,8,9]));return{id:lg,diagram:e}},"loader"),fS={id:lg,detector:pS,loader:gS},hg="pie",mS=g(e=>/^\s*pie/.test(e),"detector"),yS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./pieDiagram-DEJITSTG-DwV0tEAW.js");return{diagram:t}},__vite__mapDeps([30,21,23,0,1,6,4,31,9,32,27,8]));return{id:hg,diagram:e}},"loader"),CS={id:hg,detector:mS,loader:yS},cg="quadrantChart",xS=g(e=>/^\s*quadrantChart/.test(e),"detector"),bS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./quadrantDiagram-34T5L4WZ-DvHIwgsa.js");return{diagram:t}},__vite__mapDeps([33,26,9,27,28,0,1,8]));return{id:cg,diagram:e}},"loader"),kS={id:cg,detector:xS,loader:bS},TS=kS,ug="xychart",wS=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),SS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./xychartDiagram-5P7HB3ND-BKUiyZNZ.js");return{diagram:t}},__vite__mapDeps([34,35,27,32,26,9,28,0,1,8]));return{id:ug,diagram:e}},"loader"),vS={id:ug,detector:wS,loader:SS},BS=vS,dg="requirement",_S=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),LS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./requirementDiagram-MS252O5E-DgSgWjaP.js");return{diagram:t}},__vite__mapDeps([36,16,17,0,1,8,9]));return{id:dg,diagram:e}},"loader"),FS={id:dg,detector:_S,loader:LS},MS=FS,pg="sequence",AS=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),ES=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./sequenceDiagram-FGHM5R23-BLd2_BAi.js");return{diagram:t}},__vite__mapDeps([37,13,22,0,1,8,9]));return{id:pg,diagram:e}},"loader"),$S={id:pg,detector:AS,loader:ES},OS=$S,gg="class",IS=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"),DS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./classDiagram-6PBFFD2Q-o2YNBl67.js");return{diagram:t}},__vite__mapDeps([38,39,15,13,16,17,8,0,1,9]));return{id:gg,diagram:e}},"loader"),PS={id:gg,detector:IS,loader:DS},RS=PS,fg="classDiagram",qS=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"),WS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./classDiagram-v2-HSJHXN6E-o2YNBl67.js");return{diagram:t}},__vite__mapDeps([40,39,15,13,16,17,8,0,1,9]));return{id:fg,diagram:e}},"loader"),zS={id:fg,detector:qS,loader:WS},NS=zS,mg="state",HS=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"),jS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./stateDiagram-FHFEXIEX-DDDK8elV.js");return{diagram:t}},__vite__mapDeps([41,42,16,17,3,4,5,6,9,0,1,8]));return{id:mg,diagram:e}},"loader"),YS={id:mg,detector:HS,loader:jS},XS=YS,yg="stateDiagram",US=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"),VS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./stateDiagram-v2-QKLJ7IA2-Dts2YAxm.js");return{diagram:t}},__vite__mapDeps([43,42,16,17,0,1,8,9]));return{id:yg,diagram:e}},"loader"),GS={id:yg,detector:US,loader:VS},ZS=GS,Cg="journey",KS=g(e=>/^\s*journey/.test(e),"detector"),QS=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./journeyDiagram-VCZTEJTY-Rk6UiBUm.js");return{diagram:t}},__vite__mapDeps([44,15,13,31,9,0,1,8]));return{id:Cg,diagram:e}},"loader"),JS={id:Cg,detector:KS,loader:QS},tv=JS,ev=g((e,t,r)=>{P.debug(`rendering svg for syntax error
|
|
298
|
+
`);const i=T0(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),ch(i,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),xg={draw:ev},rv=xg,iv={db:{},renderer:xg,parser:{parse:g(()=>{},"parse")}},av=iv,bg="flowchart-elk",sv=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"),ov=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CuSvL41f.js");return{diagram:t}},__vite__mapDeps([14,15,13,16,17,8,18,0,1,9]));return{id:bg,diagram:e}},"loader"),nv={id:bg,detector:sv,loader:ov},lv=nv,kg="timeline",hv=g(e=>/^\s*timeline/.test(e),"detector"),cv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./timeline-definition-GMOUNBTQ-Dj2EEEZe.js");return{diagram:t}},__vite__mapDeps([45,31,9,0,1,8]));return{id:kg,diagram:e}},"loader"),uv={id:kg,detector:hv,loader:cv},dv=uv,Tg="mindmap",pv=g(e=>/^\s*mindmap/.test(e),"detector"),gv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./mindmap-definition-QFDTVHPH-CGYrptTT.js");return{diagram:t}},__vite__mapDeps([46,16,17,0,1,8,9]));return{id:Tg,diagram:e}},"loader"),fv={id:Tg,detector:pv,loader:gv},mv=fv,wg="kanban",yv=g(e=>/^\s*kanban/.test(e),"detector"),Cv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./kanban-definition-6JOO6SKY-BLc8Saxe.js");return{diagram:t}},__vite__mapDeps([47,15,0,1,8,9]));return{id:wg,diagram:e}},"loader"),xv={id:wg,detector:yv,loader:Cv},bv=xv,Sg="sankey",kv=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Tv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./sankeyDiagram-XADWPNL6-k3HRQmAt.js");return{diagram:t}},__vite__mapDeps([48,32,27,0,1,8,9]));return{id:Sg,diagram:e}},"loader"),wv={id:Sg,detector:kv,loader:Tv},Sv=wv,vg="packet",vv=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),Bv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-TYMM5635-DRXfDOY1.js");return{diagram:t}},__vite__mapDeps([49,21,23,0,1,6,4,8,9]));return{id:vg,diagram:e}},"loader"),_v={id:vg,detector:vv,loader:Bv},Bg="radar",Lv=g(e=>/^\s*radar-beta/.test(e),"detector"),Fv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-MMDJMWI5-DJyz-Y76.js");return{diagram:t}},__vite__mapDeps([50,21,23,0,1,6,4,8,9]));return{id:Bg,diagram:e}},"loader"),Mv={id:Bg,detector:Lv,loader:Fv},_g="block",Av=g(e=>/^\s*block(-beta)?/.test(e),"detector"),Ev=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./blockDiagram-DXYQGD6D-DaC_VKzI.js");return{diagram:t}},__vite__mapDeps([51,15,7,3,4,18,9,0,1,8]));return{id:_g,diagram:e}},"loader"),$v={id:_g,detector:Av,loader:Ev},Ov=$v,Lg="treeView",Iv=g(e=>/^\s*treeView-beta/.test(e),"detector"),Dv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-5BDNPKRD-C9_Rqs6o.js");return{diagram:t}},__vite__mapDeps([52,21,22,23,0,1,6,4,8,9]));return{id:Lg,diagram:e}},"loader"),Pv={id:Lg,detector:Iv,loader:Dv},Rv=Pv,Fg="architecture",qv=g(e=>/^\s*architecture/.test(e),"detector"),Wv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./architectureDiagram-Q4EWVU46-CZuqFwTR.js");return{diagram:t}},__vite__mapDeps([53,21,23,0,1,6,4,11,8,9]));return{id:Fg,diagram:e}},"loader"),zv={id:Fg,detector:qv,loader:Wv},Nv=zv,Mg="ishikawa",Hv=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),jv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./ishikawaDiagram-UXIWVN3A-D1ixBTTi.js");return{diagram:t}},__vite__mapDeps([54,0,1,8,9]));return{id:Mg,diagram:e}},"loader"),Yv={id:Mg,detector:Hv,loader:jv},Ag="venn",Xv=g(e=>/^\s*venn-beta/.test(e),"detector"),Uv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./vennDiagram-DHZGUBPP-C8NSdF_G.js");return{diagram:t}},__vite__mapDeps([55,0,1,8,9]));return{id:Ag,diagram:e}},"loader"),Vv={id:Ag,detector:Xv,loader:Uv},Gv=Vv,Eg="treemap",Zv=g(e=>/^\s*treemap/.test(e),"detector"),Kv=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-G4DWMVQ6-DJgL3XtB.js");return{diagram:t}},__vite__mapDeps([56,17,21,23,0,1,6,4,28,32,27,8,9]));return{id:Eg,diagram:e}},"loader"),Qv={id:Eg,detector:Zv,loader:Kv},$g="wardley-beta",Jv=g(e=>/^\s*wardley-beta/i.test(e),"detector"),tB=g(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./wardleyDiagram-NUSXRM2D-Dt3gXCVo.js");return{diagram:t}},__vite__mapDeps([57,21,23,0,1,6,4,8,9]));return{id:$g,diagram:e}},"loader"),eB={id:$g,detector:Jv,loader:tB},rB=eB,Ml=!1,Ka=g(()=>{Ml||(Ml=!0,ia("error",av,e=>e.toLowerCase().trim()==="error"),ia("---",{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("---")),ps(lv,mv,Nv),ps(Xw,bv,NS,RS,aS,dS,fS,CS,MS,OS,tS,Zw,dv,lS,ZS,XS,tv,TS,Sv,_v,BS,Ov,Rv,Mv,Yv,Qv,Gv,rB))},"addDiagrams"),iB=g(async()=>{P.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ve).map(async([r,{detector:i,loader:a}])=>{if(a)try{ys(r)}catch{try{const{diagram:s,id:n}=await a();ia(n,s,i)}catch(s){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ve[r],s}}}))).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"),aB="graphics-document document";function Og(e,t){e.attr("role",aB),t!==""&&e.attr("aria-roledescription",t)}g(Og,"setA11yDiagramInfo");function Ig(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}g(Ig,"addSVGa11yTitleDescription");var Ue,oo=(Ue=class{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static async fromText(t,r={}){var h,c;const i=yt(),a=ho(t,i);t=_k(t)+`
|
|
299
|
+
`;try{ys(a)}catch{const u=ff(a);if(!u)throw new Zl(`Diagram ${a} not found.`);const{id:p,diagram:d}=await u();ia(p,d)}const{db:s,parser:n,renderer:o,init:l}=ys(a);return n.parser&&(n.parser.yy=s),(h=s.clear)==null||h.call(s),l==null||l(i),r.title&&((c=s.setDiagramTitle)==null||c.call(s,r.title)),await n.parse(t),new Ue(a,t,s,n,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(Ue,"Diagram"),Ue),Al=[],sB=g(()=>{Al.forEach(e=>{e()}),Al=[]},"attachFunctions"),oB=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Dg(e){const t=e.match(Gl);if(!t)return{text:e,metadata:{}};let r=Fx(t[1],{schema:Lx})??{};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(Dg,"extractFrontMatter");var nB=g(e=>e.replace(/\r\n?/g,`
|
|
300
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),lB=g(e=>{const{text:t,metadata:r}=Dg(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),hB=g(e=>{const t=Kt.detectInit(e)??{},r=Kt.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:gk(e),directive:t}},"processDirectives");function on(e){const t=nB(e),r=lB(t),i=hB(r.text),a=No(r.config,i.directive);return e=oB(i.text),{code:e,title:r.title,config:a}}g(on,"preprocessDiagram");function Pg(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(Pg,"toBase64");var cB=5e4,uB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",dB="sandbox",pB="loose",gB="http://www.w3.org/2000/svg",fB="http://www.w3.org/1999/xlink",mB="http://www.w3.org/1999/xhtml",yB="100%",CB="100%",xB="border:0;margin:0;",bB="margin:0",kB="allow-top-navigation-by-user-activation allow-popups",TB='The "iframe" tag is not supported by your browser.',wB=["foreignobject"],SB=["dominant-baseline"];function nn(e){const t=on(e);return ea(),Hf(t.config??{}),t}g(nn,"processAndSetConfigs");async function Rg(e,t){Ka();try{const{code:r,config:i}=nn(e);return{diagramType:(await Wg(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}g(Rg,"parse");var El=g((e,t,r=[])=>`
|
|
301
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),vB=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=Rt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{Fl(o.styles)||n.forEach(l=>{r+=El(o.id,l,o.styles)}),Fl(o.textStyles)||(r+=El(o.id,"tspan",((o==null?void 0:o.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),BB=g((e,t,r,i)=>{const a=vB(e,r),s=lm(t,a,{...e.themeVariables,theme:e.theme,look:e.look},i);return eo(Bw(`${i}{${s}}`),Lw)},"createUserStyles"),_B=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=Je(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),LB=g((e="",t)=>{var a,s;const r=(s=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":CB,i=Pg(`<body style="${bB}">${e}</body>`);return`<iframe style="width:${yB};height:${r};${xB}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${kB}">
|
|
305
|
+
${TB}
|
|
306
|
+
</iframe>`},"putIntoIFrame"),$l=g((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const n=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",gB);return a&&n.attr("xmlns:xlink",a),n.append("g"),e},"appendDivSvgG");function no(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(no,"sandboxedIframe");var FB=g((e,t,r,i)=>{var a,s,n;(a=e.getElementById(t))==null||a.remove(),(s=e.getElementById(r))==null||s.remove(),(n=e.getElementById(i))==null||n.remove()},"removeExistingElements"),MB=g(async function(e,t,r){var N,W,D,M,L,$;Ka();const i=nn(t);t=i.code;const a=yt();P.debug(a),t.length>((a==null?void 0:a.maxTextSize)??cB)&&(t=uB);const s="#"+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=a.securityLevel===dB,d=a.securityLevel===pB,m=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const F=no(it(r),n);u=it(F.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=it(r);$l(u,e,l,`font-family: ${m}`,fB)}else{if(FB(document,e,l,n),p){const F=no(it("body"),n);u=it(F.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=it("body");$l(u,e,l)}let f,y;try{f=await oo.fromText(t,{title:i.title})}catch(F){if(a.suppressErrorRendering)throw c(),F;f=await oo.fromText("error"),y=F}const C=u.select(h).node(),b=f.type,k=C.firstChild,S=k.firstChild,w=(W=(N=f.renderer).getClasses)==null?void 0:W.call(N,t,f),B=BB(a,b,w,s),T=document.createElement("style");T.innerHTML=B,k.insertBefore(T,S);try{await f.renderer.draw(t,e,"11.14.0",f)}catch(F){throw a.suppressErrorRendering?c():rv.draw(t,e,"11.14.0"),F}const v=u.select(`${h} svg`),R=(M=(D=f.db).getAccTitle)==null?void 0:M.call(D),I=($=(L=f.db).getAccDescription)==null?void 0:$.call(L);zg(b,v,R,I),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",mB);let O=u.select(h).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),O=_B(O,p,Te(a.arrowMarkerAbsolute)),p){const F=u.select(h+" svg").node();O=LB(O,F)}else d||(O=Lr.sanitize(O,{ADD_TAGS:wB,ADD_ATTR:SB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(sB(),y)throw y;return c(),{diagramType:b,svg:O,bindFunctions:f.db.bindFunctions}},"render");function qg(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),zf(t),t!=null&&t.theme&&t.theme in Ce?t.themeVariables=Ce[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ce.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Wf(t):eh();lo(r.logLevel),Ka()}g(qg,"initialize");var Wg=g((e,t={})=>{const{code:r}=on(e);return oo.fromText(r,t)},"getDiagramFromText");function zg(e,t,r,i){Og(t,e),Ig(t,r,i,t.attr("id"))}g(zg,"addA11yInfo");var er=Object.freeze({render:MB,parse:Rg,getDiagramFromText:Wg,initialize:qg,getConfig:yt,setConfig:rh,getSiteConfig:eh,updateSiteConfig:Nf,reset:g(()=>{ea()},"reset"),globalReset:g(()=>{ea(Fr)},"globalReset"),defaultConfig:Fr});lo(yt().logLevel);ea(yt());var AB=g((e,t,r)=>{P.warn(e),zo(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"),Ng=g(async function(e={querySelector:".mermaid"}){try{await EB(e)}catch(t){if(zo(t)&&P.error(t.str),jt.parseError&&jt.parseError(t),!e.suppressErrors)throw P.error("Use the suppressErrors option to suppress these errors"),t}},"run"),EB=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=er.getConfig();P.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");P.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(P.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),er.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new Kt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const o=[];for(const l of Array.from(a)){if(P.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;n=l.innerHTML,n=sd(Kt.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=Kt.detectInit(n);c&&P.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await Xg(h,n,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){AB(u,o,jt.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Hg=g(function(e){er.initialize(e)},"initialize"),$B=g(async function(e,t,r){P.warn("mermaid.init is deprecated. Please use run instead."),e&&Hg(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Ng(i)},"init"),OB=g(async(e,{lazyLoad:t=!0}={})=>{Ka(),ps(...e),t===!1&&await iB()},"registerExternalDiagrams"),jg=g(function(){if(jt.startOnLoad){const{startOnLoad:e}=er.getConfig();e&&jt.run().catch(t=>P.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",jg,!1);var IB=g(function(e){jt.parseError=e},"setParseErrorHandler"),Fa=[],us=!1,Yg=g(async()=>{if(!us){for(us=!0;Fa.length>0;){const e=Fa.shift();if(e)try{await e()}catch(t){P.error("Error executing queue",t)}}us=!1}},"executeQueue"),DB=g(async(e,t)=>new Promise((r,i)=>{const a=g(()=>new Promise((s,n)=>{er.parse(e,t).then(o=>{s(o),r(o)},o=>{var l;P.error("Error parsing",o),(l=jt.parseError)==null||l.call(jt,o),n(o),i(o)})}),"performCall");Fa.push(a),Yg().catch(i)}),"parse"),Xg=g((e,t,r)=>new Promise((i,a)=>{const s=g(()=>new Promise((n,o)=>{er.render(e,t,r).then(l=>{n(l),i(l)},l=>{var h;P.error("Error parsing",l),(h=jt.parseError)==null||h.call(jt,l),o(l),a(l)})}),"performCall");Fa.push(s),Yg().catch(a)}),"render"),PB=g(()=>Object.keys(Ve).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),jt={startOnLoad:!0,mermaidAPI:er,parse:DB,render:Xg,init:$B,run:Ng,registerExternalDiagrams:OB,registerLayoutLoaders:Zp,initialize:Hg,parseError:void 0,contentLoaded:jg,setParseErrorHandler:IB,detectType:ho,registerIconPacks:O2,getRegisteredDiagramsMetadata:PB},Ki=jt;/*! Check if previously processed *//*!
|
|
307
|
+
* Wait for document loaded before starting the execution
|
|
308
|
+
*/const Ug={light:{background:"#ffffff",primaryColor:"#e0e7ff",secondaryColor:"#ddd6fe",tertiaryColor:"#fce7f3",primaryTextColor:"#111827",secondaryTextColor:"#4b5563",primaryBorderColor:"#6366f1",lineColor:"#111827",pie1:"#3b82f6",pie2:"#8b5cf6",pie3:"#ec4899",pie4:"#f59e0b",pie5:"#10b981",pie6:"#06b6d4",pie7:"#6366f1",pie8:"#ef4444",pieStrokeColor:"#ffffff",pieStrokeWidth:"2px",pieTitleTextColor:"#111827",pieLegendTextColor:"#374151"},dark:{background:"#1e293b",primaryColor:"#3b82f6",secondaryColor:"#8b5cf6",tertiaryColor:"#6366f1",primaryTextColor:"#f1f5f9",secondaryTextColor:"#cbd5e1",primaryBorderColor:"#60a5fa",lineColor:"#f1f5f9",pie1:"#60a5fa",pie2:"#a78bfa",pie3:"#f472b6",pie4:"#fbbf24",pie5:"#34d399",pie6:"#22d3ee",pie7:"#818cf8",pie8:"#f87171",pieStrokeColor:"#1e293b",pieStrokeWidth:"2px",pieTitleTextColor:"#f1f5f9",pieLegendTextColor:"#e2e8f0"}};let Ol=!1;const RB=()=>{if(!(typeof window>"u"||Ol))try{Ki.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",themeVariables:Ug.light}),Ol=!0}catch(e){console.warn("Failed to initialize Mermaid:",e)}},qB=e=>{let t="Failed to render Mermaid diagram";if(e instanceof Error){const r=e.message||"";if(r.includes("Syntax error")){const i=r.match(/line\s+(\d+)/i),a=r.match(/token\s+['"]([^'"]+)['"]/i),s=[];i&&s.push(`Line ${i[1]}`),a&&s.push(`Unexpected token: ${a[1]}`),t=`Syntax error${s.length?` (${s.join(", ")})`:""}`}else r&&(t=r.length>160?`${r.substring(0,157)}...`:r)}else typeof e=="string"&&(t=e);return t},_e=(e,t)=>{if(typeof window>"u"||!e)return;const r=window.getComputedStyle(e).getPropertyValue(t);if(!r)return;const i=r.trim();return i.length?i:void 0},WB=(e,t)=>{const r=Ug[e];if(typeof window>"u"||!t)return r;const i={background:_e(t,"--md-bg-primary"),primaryColor:_e(t,"--md-bg-secondary"),secondaryColor:_e(t,"--md-bg-tertiary"),tertiaryColor:_e(t,"--md-bg-primary"),primaryTextColor:_e(t,"--md-text-primary"),secondaryTextColor:_e(t,"--md-text-secondary"),primaryBorderColor:_e(t,"--md-border-color"),lineColor:_e(t,"--md-text-primary")},a=Object.entries(i).filter(([,s])=>typeof s=="string"&&s.length);return a.length?{...r,...Object.fromEntries(a)}:r},Il=e=>{if(!e)return null;const t=e.getAttribute("data-theme");return t==="dark"?"dark":t==="light"?"light":e.classList.contains("dark")?"dark":e.classList.contains("light")?"light":null},zB=({code:e})=>{const t=Xt.useRef(null),r=Xt.useRef(null),i=Xt.useRef(0),[a,s]=Xt.useState(null),[n,o]=Xt.useState(null),[l,h]=Xt.useState(null),[c,u]=Xt.useState(!1),[p,d]=Xt.useState("light"),m=Xt.useRef("light");Xt.useEffect(()=>{var R;if(typeof window>"u")return;const C=t.current;if(!C)return;const b=C.closest(".markdown-content")??C,k=(R=window.matchMedia)==null?void 0:R.call(window,"(prefers-color-scheme: dark)"),S=()=>{const I=!!(k!=null&&k.matches);return Il(b)??Il(document.documentElement)??(I?"dark":"light")},w=()=>{const I=S();I!==m.current&&(m.current=I,d(I))};w();const B=new MutationObserver(w);B.observe(b,{attributes:!0,attributeFilter:["class","data-theme"]});let T=null;b!==document.documentElement&&(T=new MutationObserver(w),T.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}));const v=()=>w();return k==null||k.addEventListener("change",v),()=>{B.disconnect(),T==null||T.disconnect(),k==null||k.removeEventListener("change",v)}},[]),Xt.useEffect(()=>{if(!e.trim()){o(null),s(null),h(null);return}return(async()=>{var k;const b=++i.current;try{RB();const S=`mermaid-${Math.random().toString(36).substring(2,11)}`;await Ki.parse(e);const w=((k=t.current)==null?void 0:k.closest(".markdown-content"))??t.current,B=WB(p,w);Ki.initialize({startOnLoad:!1,theme:p==="dark"?"dark":"default",securityLevel:"loose",themeVariables:B,flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis",padding:15,nodeSpacing:50,rankSpacing:50},sequence:{useMaxWidth:!0,diagramMarginX:30,diagramMarginY:15,actorMargin:50,width:120,height:40,boxMargin:8,boxTextMargin:4,noteMargin:10,messageMargin:35,mirrorActors:!0,actorFontSize:13,messageFontSize:12,noteFontSize:12,wrap:!0,wrapPadding:10},gantt:{useMaxWidth:!0,barHeight:24,barGap:4,topPadding:40,leftPadding:80,gridLineStartPadding:40,fontSize:12,sectionFontSize:13,numberSectionStyles:4},er:{useMaxWidth:!0,fontSize:12,entityPadding:15},pie:{useMaxWidth:!0,textPosition:.75},journey:{useMaxWidth:!0,diagramMarginX:30,diagramMarginY:20,leftMargin:100,width:120,height:50,boxMargin:8,boxTextMargin:4,noteMargin:10,messageMargin:30},gitGraph:{useMaxWidth:!0,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0}},class:{useMaxWidth:!0,padding:10},state:{useMaxWidth:!0,padding:8,dividerMargin:10},mindmap:{useMaxWidth:!0,padding:10},timeline:{useMaxWidth:!0,padding:10},quadrantChart:{useMaxWidth:!0},sankey:{useMaxWidth:!0}});const T=await Ki.render(S,e);if(i.current!==b)return;o(T.svg),h(()=>T.bindFunctions?T.bindFunctions:null),s(null)}catch(S){if(i.current!==b)return;s(qB(S)),o(null),h(null),u(!1)}})(),()=>{i.current+=1}},[e,p]),Xt.useEffect(()=>{if(!(!n||!l||!r.current))try{l(r.current)}catch(C){console.warn("Failed to bind Mermaid interactions:",C)}},[n,l]);const f=()=>vt.jsxs("div",{className:"graph-error",children:[vt.jsxs("div",{className:"graph-error-header",children:[vt.jsx("div",{className:"graph-error-icon",children:"⚠️"}),vt.jsxs("div",{className:"graph-error-content",children:[vt.jsx("div",{className:"graph-error-title",children:"Mermaid Diagram Error"}),vt.jsx("div",{className:"graph-error-message",children:a})]})]}),vt.jsxs("button",{className:"graph-error-toggle",onClick:()=>u(!c),type:"button",children:[c?"Hide":"Show"," Details"]}),c&&vt.jsxs("details",{className:"graph-error-details",open:!0,children:[vt.jsx("summary",{style:{cursor:"pointer",marginBottom:"8px",fontWeight:500},children:"Mermaid Code"}),vt.jsx("pre",{style:{marginTop:"8px",fontSize:"0.8em",opacity:.8,padding:"8px",background:"rgba(0, 0, 0, 0.05)",borderRadius:"4px",overflow:"auto",maxHeight:"200px"},children:vt.jsx("code",{children:e})})]})]}),y=()=>a?f():n?vt.jsx("div",{ref:r,className:"mermaid-svg-container",style:{display:"flex",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",overflowX:"auto",overflowY:"visible"},dangerouslySetInnerHTML:{__html:n}}):vt.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"30px 20px",color:"var(--md-text-secondary, #6b7280)",minHeight:"120px"},children:[vt.jsx("svg",{style:{animation:"spin 1s linear infinite",marginBottom:"10px",width:"28px",height:"28px"},viewBox:"0 0 24 24",fill:"none",children:vt.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"32",strokeLinecap:"round"})}),vt.jsx("span",{style:{fontWeight:500,fontSize:"14px"},children:"Rendering diagram..."}),vt.jsx("style",{children:`
|
|
309
|
+
@keyframes spin {
|
|
310
|
+
from { transform: rotate(0deg); }
|
|
311
|
+
to { transform: rotate(360deg); }
|
|
312
|
+
}
|
|
313
|
+
`})]});return vt.jsx("div",{className:"graph-container mermaid-container",ref:t,style:{padding:"16px",minHeight:"100px"},children:y()})},c_=Object.freeze(Object.defineProperty({__proto__:null,MermaidRenderer:zB},Symbol.toStringTag,{value:"Module"}));export{Xp as $,Ae as A,of as B,yt as C,ym as D,No as E,th as F,xk as G,T0 as H,kf as I,Lx as J,D2 as K,hi as L,VB as M,Na as N,Kf as O,hh as P,gn as Q,Ck as R,bi as S,ee as T,E as U,A as V,sm as W,uh as X,nT as Y,ck as Z,g as _,um as a,Lu as a$,o_ as a0,Mx as a1,Rt as a2,Se as a3,Nr as a4,Ho as a5,zu as a6,Je as a7,Yu as a8,tt as a9,vi as aA,He as aB,$1 as aC,Rn as aD,rr as aE,jb as aF,Io as aG,zb as aH,Ub as aI,Pr as aJ,P1 as aK,ok as aL,Qb as aM,J1 as aN,$o as aO,Fl as aP,X as aQ,Xu as aR,Dr as aS,j1 as aT,Ew as aU,Si as aV,ya as aW,De as aX,Pa as aY,$n as aZ,Do as a_,le as aa,j as ab,hw as ac,s_ as ad,n_ as ae,i_ as af,U as ag,a_ as ah,RT as ai,$T as aj,ET as ak,Vl as al,UB as am,za as an,Ca as ao,Iu as ap,_i as aq,O2 as ar,$2 as as,sf as at,R1 as au,$u as av,Bu as aw,Nb as ax,fa as ay,Hb as az,cm as b,Eu as b0,qb as b1,ao as b2,sk as b3,Q1 as b4,nk as b5,Oo as b6,hk as b7,c_ as b8,ht as c,it as d,ch as e,Tt as f,pm as g,ke as h,te as i,Ax as j,ki as k,P as l,Hu as m,GB as n,h_ as o,gm as p,fm as q,l_ as r,dm as s,Fx as t,Kt as u,_T as v,Tk as w,KB as x,hm as y,ZB as z};
|