agent-tower 0.5.2-beta.5 → 0.5.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/web/assets/{AgentDemoPage-DYU0dSD9.js → AgentDemoPage-DAdN5g19.js} +1 -1
- package/dist/web/assets/{DemoPage-CaV94VWQ.js → DemoPage-Xc4QRNUj.js} +1 -1
- package/dist/web/assets/{GeneralSettingsPage-CyBUcF5g.js → GeneralSettingsPage-DWKl6BHA.js} +1 -1
- package/dist/web/assets/{McpSettingsPage-CzE9eriX.js → McpSettingsPage-BHEMUq7Z.js} +1 -1
- package/dist/web/assets/{MemberAvatar-ChVx4wRa.js → MemberAvatar-b_WKLu8w.js} +1 -1
- package/dist/web/assets/{NotificationSettingsPage-C68vNTcP.js → NotificationSettingsPage-C2KeYegv.js} +1 -1
- package/dist/web/assets/{ProfileSettingsPage-CRz5C2OS.js → ProfileSettingsPage-CVOCVwVK.js} +1 -1
- package/dist/web/assets/{ProjectKanbanPage-Tmp1bu4q.js → ProjectKanbanPage-J_5GxZQ7.js} +30 -29
- package/dist/web/assets/{ProjectSettingsPage-CVTWLRxT.js → ProjectSettingsPage-CP3V8oAJ.js} +1 -1
- package/dist/web/assets/{ProviderSettingsPage-DRUxVjQu.js → ProviderSettingsPage-DQ_IDUUZ.js} +1 -1
- package/dist/web/assets/{SettingsMasterDetail-CTXxGe3o.js → SettingsMasterDetail-Cx9Ylq9N.js} +1 -1
- package/dist/web/assets/{TeamSettingsPage-DjP8gj71.js → TeamSettingsPage-BHE2x82g.js} +1 -1
- package/dist/web/assets/arc-D31VhUJX.js +1 -0
- package/dist/web/assets/architectureDiagram-3BPJPVTR-Ak9jpJ8q.js +36 -0
- package/dist/web/assets/{arrow-left-D8mdzO_t.js → arrow-left-DcUokonk.js} +1 -1
- package/dist/web/assets/blockDiagram-GPEHLZMM-DEDpa_4t.js +132 -0
- package/dist/web/assets/c4Diagram-AAUBKEIU-BgS3ci_x.js +10 -0
- package/dist/web/assets/channel-BLjA9Brq.js +1 -0
- package/dist/web/assets/check-DyTLNLlk.js +1 -0
- package/dist/web/assets/{chevron-down-DBS9-_Q3.js → chevron-down-DuDzRplH.js} +1 -1
- package/dist/web/assets/{chevron-right-pRSZZk-l.js → chevron-right-BezhysME.js} +1 -1
- package/dist/web/assets/{chevron-up-Bv9reJY4.js → chevron-up-DtQ85g91.js} +1 -1
- package/dist/web/assets/chunk-2J33WTMH-BnpAjP2E.js +1 -0
- package/dist/web/assets/chunk-4BX2VUAB-DNUdFpBR.js +1 -0
- package/dist/web/assets/chunk-55IACEB6-CTj6ihx_.js +1 -0
- package/dist/web/assets/chunk-727SXJPM-yKiHVB7X.js +206 -0
- package/dist/web/assets/chunk-AQP2D5EJ-njbMVjqc.js +231 -0
- package/dist/web/assets/chunk-FMBD7UC4-h0jEUL75.js +15 -0
- package/dist/web/assets/chunk-ND2GUHAM-DjMFJZNr.js +1 -0
- package/dist/web/assets/chunk-QZHKN3VN-odAhWIp4.js +1 -0
- package/dist/web/assets/{circle-alert-DdGuxtmq.js → circle-alert-IhLKVEi9.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-DHqakOiv.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-DHqakOiv.js +1 -0
- package/dist/web/assets/{code-block-OCS4YCEC-k5CJUaBc.js → code-block-OCS4YCEC-4ofbxqu2.js} +1 -1
- package/dist/web/assets/{confirm-dialog-Bit5jNx2.js → confirm-dialog-Amksh2QM.js} +1 -1
- package/dist/web/assets/cose-bilkent-S5V4N54A-Ds62_zKQ.js +1 -0
- package/dist/web/assets/cytoscape.esm-D3_iZ_3b.js +321 -0
- package/dist/web/assets/dagre-BM42HDAG-De9CyhMh.js +4 -0
- package/dist/web/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/web/assets/diagram-2AECGRRQ-Db7DRtzA.js +43 -0
- package/dist/web/assets/diagram-5GNKFQAL-DXeGI1-M.js +10 -0
- package/dist/web/assets/diagram-KO2AKTUF-Llle6qEC.js +3 -0
- package/dist/web/assets/diagram-LMA3HP47-BcK1LGRh.js +24 -0
- package/dist/web/assets/diagram-OG6HWLK6-0_sJ3YRD.js +24 -0
- package/dist/web/assets/erDiagram-TEJ5UH35-BjT0k23c.js +85 -0
- package/dist/web/assets/flowDiagram-I6XJVG4X-kaKS6P_m.js +162 -0
- package/dist/web/assets/{folder-picker-DSfmubl6.js → folder-picker-CbAfVBHD.js} +1 -1
- package/dist/web/assets/ganttDiagram-6RSMTGT7-CW8IoCY6.js +292 -0
- package/dist/web/assets/gitGraphDiagram-PVQCEYII-C5-QVJMh.js +106 -0
- package/dist/web/assets/graph--OzhPTMs.js +1 -0
- package/dist/web/assets/{index-B48HCCvn.js → index-Bd5HU-dB.js} +2 -2
- package/dist/web/assets/index-Du7RXa9t.js +303 -0
- package/dist/web/assets/infoDiagram-5YYISTIA-CG7QnPme.js +2 -0
- package/dist/web/assets/init-Gi6I4Gst.js +1 -0
- package/dist/web/assets/{input-CapacyJb.js → input-BxcpVmsb.js} +1 -1
- package/dist/web/assets/ishikawaDiagram-YF4QCWOH-DitLiYai.js +70 -0
- package/dist/web/assets/journeyDiagram-JHISSGLW-EKXFhiai.js +139 -0
- package/dist/web/assets/kanban-definition-UN3LZRKU-Ckbr1P9R.js +89 -0
- package/dist/web/assets/katex-HP8lGamR.js +257 -0
- package/dist/web/assets/{layers-CifLa7KP.js → layers-Dqjek9Kd.js} +1 -1
- package/dist/web/assets/layout-SsrduOYp.js +1 -0
- package/dist/web/assets/linear-HA2k3O-l.js +1 -0
- package/dist/web/assets/{loader-circle-CRx0_e2Z.js → loader-circle-B4v8mirO.js} +1 -1
- package/dist/web/assets/{mermaid-NOHMQCX5-TDWqrpYr.js → mermaid-NOHMQCX5-C2N-Y-YP.js} +5 -5
- package/dist/web/assets/{message-square-BQB-4uFy.js → message-square-B-2bz9LU.js} +1 -1
- package/dist/web/assets/mindmap-definition-RKZ34NQL-ByCTUtXz.js +96 -0
- package/dist/web/assets/{modal-B6TZLhQ2.js → modal-C6m1dmin.js} +1 -1
- package/dist/web/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/web/assets/{pencil-D0ZsDzqo.js → pencil-DzjmtIoi.js} +1 -1
- package/dist/web/assets/pieDiagram-4H26LBE5-DeQnXQoJ.js +30 -0
- package/dist/web/assets/quadrantDiagram-W4KKPZXB--ocdxSbH.js +7 -0
- package/dist/web/assets/requirementDiagram-4Y6WPE33-CJq21gDX.js +84 -0
- package/dist/web/assets/{rotate-ccw-Cm5Zx65C.js → rotate-ccw-BhUVdZv6.js} +1 -1
- package/dist/web/assets/sankeyDiagram-5OEKKPKP-U373GNMv.js +40 -0
- package/dist/web/assets/{select-YFykpbyQ.js → select-CCf5nwYs.js} +1 -1
- package/dist/web/assets/sequenceDiagram-3UESZ5HK-BuH8el8s.js +162 -0
- package/dist/web/assets/stateDiagram-AJRCARHV-CqZ_L1ch.js +1 -0
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-DkD_6IX-.js +1 -0
- package/dist/web/assets/{switch-D5RS57YU.js → switch-DsjSr4nv.js} +1 -1
- package/dist/web/assets/{terminal-r3vqhdyt.js → terminal-JXRig8oL.js} +1 -1
- package/dist/web/assets/{textarea-PjCFOxmD.js → textarea-BzeEPT1A.js} +1 -1
- package/dist/web/assets/timeline-definition-PNZ67QCA-BIrIbCOG.js +120 -0
- package/dist/web/assets/{upload-BkWqEmQd.js → upload-BwkqnAVE.js} +1 -1
- package/dist/web/assets/{use-profiles-Ch0Rlrh-.js → use-profiles-DcyUHq0p.js} +1 -1
- package/dist/web/assets/{use-providers-CSQgeUSp.js → use-providers-BWgjPVX8.js} +1 -1
- package/dist/web/assets/vennDiagram-CIIHVFJN-Dmk1mluX.js +34 -0
- package/dist/web/assets/wardley-L42UT6IY-CEY4M7Op.js +161 -0
- package/dist/web/assets/wardleyDiagram-YWT4CUSO-CiK-Q213.js +78 -0
- package/dist/web/assets/xychartDiagram-2RQKCTM6-C5rj3Hpu.js +7 -0
- package/dist/web/index.html +1 -1
- package/node_modules/@prisma/client/.prisma/client/edge.js +2 -2
- package/node_modules/@prisma/client/.prisma/client/index.js +2 -2
- package/package.json +1 -1
- package/dist/web/assets/check-CadkXmJ-.js +0 -1
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-De9CyhMh.js","assets/graph--OzhPTMs.js","assets/layout-SsrduOYp.js","assets/index-Bd5HU-dB.js","assets/index-LbQD7FZK.css","assets/cose-bilkent-S5V4N54A-Ds62_zKQ.js","assets/cytoscape.esm-D3_iZ_3b.js","assets/c4Diagram-AAUBKEIU-BgS3ci_x.js","assets/chunk-ND2GUHAM-DjMFJZNr.js","assets/flowDiagram-I6XJVG4X-kaKS6P_m.js","assets/chunk-FMBD7UC4-h0jEUL75.js","assets/chunk-55IACEB6-CTj6ihx_.js","assets/chunk-2J33WTMH-BnpAjP2E.js","assets/channel-BLjA9Brq.js","assets/erDiagram-TEJ5UH35-BjT0k23c.js","assets/gitGraphDiagram-PVQCEYII-C5-QVJMh.js","assets/chunk-4BX2VUAB-DNUdFpBR.js","assets/chunk-QZHKN3VN-odAhWIp4.js","assets/wardley-L42UT6IY-CEY4M7Op.js","assets/ganttDiagram-6RSMTGT7-CW8IoCY6.js","assets/linear-HA2k3O-l.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-CG7QnPme.js","assets/pieDiagram-4H26LBE5-DeQnXQoJ.js","assets/arc-D31VhUJX.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB--ocdxSbH.js","assets/xychartDiagram-2RQKCTM6-C5rj3Hpu.js","assets/requirementDiagram-4Y6WPE33-CJq21gDX.js","assets/sequenceDiagram-3UESZ5HK-BuH8el8s.js","assets/classDiagram-4FO5ZUOK-DHqakOiv.js","assets/chunk-727SXJPM-yKiHVB7X.js","assets/classDiagram-v2-Q7XG4LA2-DHqakOiv.js","assets/stateDiagram-AJRCARHV-CqZ_L1ch.js","assets/chunk-AQP2D5EJ-njbMVjqc.js","assets/stateDiagram-v2-BHNVJYJU-DkD_6IX-.js","assets/journeyDiagram-JHISSGLW-EKXFhiai.js","assets/timeline-definition-PNZ67QCA-BIrIbCOG.js","assets/mindmap-definition-RKZ34NQL-ByCTUtXz.js","assets/kanban-definition-UN3LZRKU-Ckbr1P9R.js","assets/sankeyDiagram-5OEKKPKP-U373GNMv.js","assets/diagram-LMA3HP47-BcK1LGRh.js","assets/diagram-2AECGRRQ-Db7DRtzA.js","assets/blockDiagram-GPEHLZMM-DEDpa_4t.js","assets/diagram-5GNKFQAL-DXeGI1-M.js","assets/architectureDiagram-3BPJPVTR-Ak9jpJ8q.js","assets/diagram-KO2AKTUF-Llle6qEC.js","assets/ishikawaDiagram-YF4QCWOH-DitLiYai.js","assets/vennDiagram-CIIHVFJN-Dmk1mluX.js","assets/diagram-OG6HWLK6-0_sJ3YRD.js","assets/wardleyDiagram-YWT4CUSO-CiK-Q213.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{R as Sy,aj as pt}from"./index-Bd5HU-dB.js";var No={exports:{}},_y=No.exports,rh;function vy(){return rh||(rh=1,(function(e,t){(function(r,i){e.exports=i()})(_y,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|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 A=["th","st","nd","rd"],L=D%100;return"["+D+(A[(L-20)%10]||A[L]||A[0])+"]"}},k=function(D,A,L){var O=String(D);return!O||O.length>=A?D:""+Array(A+1-O.length).join(L)+D},w={s:k,z:function(D){var A=-D.utcOffset(),L=Math.abs(A),O=Math.floor(L/60),P=L%60;return(A<=0?"+":"-")+k(O,2,"0")+":"+k(P,2,"0")},m:function D(A,L){if(A.date()<L.date())return-D(L,A);var O=12*(L.year()-A.year())+(L.month()-A.month()),P=A.clone().add(O,d),H=L-P<0,U=A.clone().add(O+(H?-1:1),d);return+(-(O+(L-P)/(H?P-U:U-P))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:d,y:u,w:h,d:c,D:g,h:l,m:n,s:a,ms:s,Q:f}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},S="en",_={};_[S]=b;var E="$isDayjsObject",B=function(D){return D instanceof W||!(!D||!D[E])},q=function D(A,L,O){var P;if(!A)return S;if(typeof A=="string"){var H=A.toLowerCase();_[H]&&(P=H),L&&(_[H]=L,P=H);var U=A.split("-");if(!P&&U.length>1)return D(U[0])}else{var tt=A.name;_[tt]=A,P=tt}return!O&&P&&(S=P),P||!O&&S},I=function(D,A){if(B(D))return D.clone();var L=typeof A=="object"?A:{};return L.date=D,L.args=arguments,new W(L)},R=w;R.l=q,R.i=B,R.w=function(D,A){return I(D,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var W=(function(){function D(L){this.$L=q(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[E]=!0}var A=D.prototype;return A.parse=function(L){this.$d=(function(O){var P=O.date,H=O.utc;if(P===null)return new Date(NaN);if(R.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var U=P.match(y);if(U){var tt=U[2]-1||0,gt=(U[7]||"0").substring(0,3);return H?new Date(Date.UTC(U[1],tt,U[3]||1,U[4]||0,U[5]||0,U[6]||0,gt)):new Date(U[1],tt,U[3]||1,U[4]||0,U[5]||0,U[6]||0,gt)}}return new Date(P)})(L),this.init()},A.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()},A.$utils=function(){return R},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(L,O){var P=I(L);return this.startOf(O)<=P&&P<=this.endOf(O)},A.isAfter=function(L,O){return I(L)<this.startOf(O)},A.isBefore=function(L,O){return this.endOf(O)<I(L)},A.$g=function(L,O,P){return R.u(L)?this[O]:this.set(P,L)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(L,O){var P=this,H=!!R.u(O)||O,U=R.p(L),tt=function(vt,St){var lt=R.w(P.$u?Date.UTC(P.$y,St,vt):new Date(P.$y,St,vt),P);return H?lt:lt.endOf(c)},gt=function(vt,St){return R.w(P.toDate()[vt].apply(P.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(St)),P)},dt=this.$W,ut=this.$M,bt=this.$D,st="set"+(this.$u?"UTC":"");switch(U){case u:return H?tt(1,0):tt(31,11);case d:return H?tt(1,ut):tt(0,ut+1);case h:var ct=this.$locale().weekStart||0,Tt=(dt<ct?dt+7:dt)-ct;return tt(H?bt-Tt:bt+(6-Tt),ut);case c:case g:return gt(st+"Hours",0);case l:return gt(st+"Minutes",1);case n:return gt(st+"Seconds",2);case a:return gt(st+"Milliseconds",3);default:return this.clone()}},A.endOf=function(L){return this.startOf(L,!1)},A.$set=function(L,O){var P,H=R.p(L),U="set"+(this.$u?"UTC":""),tt=(P={},P[c]=U+"Date",P[g]=U+"Date",P[d]=U+"Month",P[u]=U+"FullYear",P[l]=U+"Hours",P[n]=U+"Minutes",P[a]=U+"Seconds",P[s]=U+"Milliseconds",P)[H],gt=H===c?this.$D+(O-this.$W):O;if(H===d||H===u){var dt=this.clone().set(g,1);dt.$d[tt](gt),dt.init(),this.$d=dt.set(g,Math.min(this.$D,dt.daysInMonth())).$d}else tt&&this.$d[tt](gt);return this.init(),this},A.set=function(L,O){return this.clone().$set(L,O)},A.get=function(L){return this[R.p(L)]()},A.add=function(L,O){var P,H=this;L=Number(L);var U=R.p(O),tt=function(ut){var bt=I(H);return R.w(bt.date(bt.date()+Math.round(ut*L)),H)};if(U===d)return this.set(d,this.$M+L);if(U===u)return this.set(u,this.$y+L);if(U===c)return tt(1);if(U===h)return tt(7);var gt=(P={},P[n]=i,P[l]=o,P[a]=r,P)[U]||1,dt=this.$d.getTime()+L*gt;return R.w(dt,this)},A.subtract=function(L,O){return this.add(-1*L,O)},A.format=function(L){var O=this,P=this.$locale();if(!this.isValid())return P.invalidDate||m;var H=L||"YYYY-MM-DDTHH:mm:ssZ",U=R.z(this),tt=this.$H,gt=this.$m,dt=this.$M,ut=P.weekdays,bt=P.months,st=P.meridiem,ct=function(St,lt,le,wt){return St&&(St[lt]||St(O,H))||le[lt].slice(0,wt)},Tt=function(St){return R.s(tt%12||12,St,"0")},vt=st||function(St,lt,le){var wt=St<12?"AM":"PM";return le?wt.toLowerCase():wt};return H.replace(C,(function(St,lt){return lt||(function(le){switch(le){case"YY":return String(O.$y).slice(-2);case"YYYY":return R.s(O.$y,4,"0");case"M":return dt+1;case"MM":return R.s(dt+1,2,"0");case"MMM":return ct(P.monthsShort,dt,bt,3);case"MMMM":return ct(bt,dt);case"D":return O.$D;case"DD":return R.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return ct(P.weekdaysMin,O.$W,ut,2);case"ddd":return ct(P.weekdaysShort,O.$W,ut,3);case"dddd":return ut[O.$W];case"H":return String(tt);case"HH":return R.s(tt,2,"0");case"h":return Tt(1);case"hh":return Tt(2);case"a":return vt(tt,gt,!0);case"A":return vt(tt,gt,!1);case"m":return String(gt);case"mm":return R.s(gt,2,"0");case"s":return String(O.$s);case"ss":return R.s(O.$s,2,"0");case"SSS":return R.s(O.$ms,3,"0");case"Z":return U}return null})(St)||U.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(L,O,P){var H,U=this,tt=R.p(O),gt=I(L),dt=(gt.utcOffset()-this.utcOffset())*i,ut=this-gt,bt=function(){return R.m(U,gt)};switch(tt){case u:H=bt()/12;break;case d:H=bt();break;case f:H=bt()/3;break;case h:H=(ut-dt)/6048e5;break;case c:H=(ut-dt)/864e5;break;case l:H=ut/o;break;case n:H=ut/i;break;case a:H=ut/r;break;default:H=ut}return P?H:R.a(H)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return _[this.$L]},A.locale=function(L,O){if(!L)return this.$L;var P=this.clone(),H=q(L,O,!0);return H&&(P.$L=H),P},A.clone=function(){return R.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},D})(),z=W.prototype;return I.prototype=z,[["$ms",s],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",g]].forEach((function(D){z[D[1]]=function(A){return this.$g(A,D[0],D[1])}})),I.extend=function(D,A){return D.$i||(D(A,W,I),D.$i=!0),I},I.locale=q,I.isDayjs=B,I.unix=function(D){return I(1e3*D)},I.en=_[S],I.Ls=_,I.p={},I}))})(No)),No.exports}var By=vy();const Ly=Sy(By);var qc=Object.defineProperty,p=(e,t)=>qc(e,"name",{value:t,configurable:!0}),Fy=(e,t)=>{for(var r in t)qc(e,r,{get:t[r],enumerable:!0})},Pe={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},N={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Mn=p(function(e="fatal"){let t=Pe.fatal;typeof e=="string"?e.toLowerCase()in Pe&&(t=Pe[e]):typeof e=="number"&&(t=e),N.trace=()=>{},N.debug=()=>{},N.info=()=>{},N.warn=()=>{},N.error=()=>{},N.fatal=()=>{},t<=Pe.fatal&&(N.fatal=console.error?console.error.bind(console,ce("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ce("FATAL"))),t<=Pe.error&&(N.error=console.error?console.error.bind(console,ce("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ce("ERROR"))),t<=Pe.warn&&(N.warn=console.warn?console.warn.bind(console,ce("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ce("WARN"))),t<=Pe.info&&(N.info=console.info?console.info.bind(console,ce("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ce("INFO"))),t<=Pe.debug&&(N.debug=console.debug?console.debug.bind(console,ce("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ce("DEBUG"))),t<=Pe.trace&&(N.trace=console.debug?console.debug.bind(console,ce("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ce("TRACE")))},"setLogLevel"),ce=p(e=>`%c${Ly().format("ss.SSS")} : ${e} : `,"format");const qo={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 o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return qo.hue2rgb(s,o,e+1/3)*255;case"g":return qo.hue2rgb(s,o,e)*255;case"b":return qo.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,l=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return l*100;switch(o){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Ay={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},Ey={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:qo,lang:Ay,unit:Ey},Je={};for(let e=0;e<=255;e++)Je[e]=at.unit.dec2hex(e);const Ut={ALL:0,RGB:1,HSL:2};class My{constructor(){this.type=Ut.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=Ut.ALL}is(t){return this.type===t}}class $y{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new My}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ut.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ut.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ut.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ut.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ut.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ut.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ut.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const As=new $y({r:0,g:0,b:0,a:0},"transparent"),Xr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Xr.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return As.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${Je[Math.round(t)]}${Je[Math.round(r)]}${Je[Math.round(i)]}${Je[Math.round(o*255)]}`:`#${Je[Math.round(t)]}${Je[Math.round(r)]}${Je[Math.round(i)]}`}},xr={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(xr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(xr.re);if(!r)return;const[,i,o,s,a,n]=r;return As.set({h:xr._hue2deg(i),s:at.channel.clamp.s(parseFloat(o)),l:at.channel.clamp.l(parseFloat(s)),a:a?at.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${o})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},ji={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=ji.colors[e];if(t)return Xr.parse(t)},stringify:e=>{const t=Xr.stringify(e);for(const r in ji.colors)if(ji.colors[r]===t)return r}},Pi={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(Pi.re);if(!r)return;const[,i,o,s,a,n,l,c,h]=r;return As.set({r:at.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(o)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Ee={format:{keyword:ji,hex:Xr,rgb:Pi,rgba:Pi,hsl:xr,hsla:xr},parse:e=>{if(typeof e!="string")return e;const t=Xr.parse(e)||Pi.parse(e)||xr.parse(e)||ji.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ut.HSL)||e.data.r===void 0?xr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Pi.stringify(e):Xr.stringify(e)},zc=(e,t)=>{const r=Ee.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Ee.stringify(r)},or=(e,t,r=0,i=1)=>{if(typeof e!="number")return zc(e,{a:t});const o=As.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Ee.stringify(o)},Oy=e=>{const{r:t,g:r,b:i}=Ee.parse(e),o=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(o)},Iy=e=>Oy(e)>=.5,ke=e=>!Iy(e),Wc=(e,t,r)=>{const i=Ee.parse(e),o=i[t],s=at.channel.clamp[t](o+r);return o!==s&&(i[t]=s),Ee.stringify(i)},M=(e,t)=>Wc(e,"l",t),$=(e,t)=>Wc(e,"l",-t),x=(e,t)=>{const r=Ee.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return zc(e,i)},Dy=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=Ee.parse(e),{r:n,g:l,b:c,a:h}=Ee.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,C=i*m+n*y,b=o*m+l*y,k=s*m+c*y,w=a*d+h*(1-d);return or(C,b,k,w)},v=(e,t=100)=>{const r=Ee.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Dy(r,e,t)};function ih(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Py(e){if(Array.isArray(e))return e}function Ry(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,n=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(i=s.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,o=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return n}}function Ny(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qy(e,t){return Py(e)||Ry(e,t)||zy(e,t)||Ny()}function zy(e,t){if(e){if(typeof e=="string")return ih(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ih(e,t):void 0}}const Hc=Object.entries,oh=Object.setPrototypeOf,Wy=Object.isFrozen,Hy=Object.getPrototypeOf,Yy=Object.getOwnPropertyDescriptor;let Ht=Object.freeze,Yt=Object.seal,Wr=Object.create,Yc=typeof Reflect<"u"&&Reflect,Ea=Yc.apply,Ma=Yc.construct;Ht||(Ht=function(t){return t});Yt||(Yt=function(t){return t});Ea||(Ea=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];return t.apply(r,o)});Ma||(Ma=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return new t(...i)});const Bi=Ot(Array.prototype.forEach),Uy=Ot(Array.prototype.lastIndexOf),sh=Ot(Array.prototype.pop),Rr=Ot(Array.prototype.push),jy=Ot(Array.prototype.splice),er=Array.isArray,Ri=Ot(String.prototype.toLowerCase),ca=Ot(String.prototype.toString),ah=Ot(String.prototype.match),Li=Ot(String.prototype.replace),nh=Ot(String.prototype.indexOf),Gy=Ot(String.prototype.trim),Xy=Ot(Number.prototype.toString),Vy=Ot(Boolean.prototype.toString),lh=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),hh=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),Qt=Ot(Object.prototype.hasOwnProperty),Fi=Ot(Object.prototype.toString),qt=Ot(RegExp.prototype.test),pr=Zy(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return Ea(e,t,i)}}function Zy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ma(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ri;if(oh&&oh(e,null),!er(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=r(o);s!==o&&(Wy(t)||(t[i]=s),o=s)}e[o]=!0}return e}function Ky(e){for(let t=0;t<e.length;t++)Qt(e,t)||(e[t]=null);return e}function Kt(e){const t=Wr(null);for(const i of Hc(e)){var r=qy(i,2);const o=r[0],s=r[1];Qt(e,o)&&(er(s)?t[o]=Ky(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=Kt(s):t[o]=s)}return t}function Qy(e){switch(typeof e){case"string":return e;case"number":return Xy(e);case"boolean":return Vy(e);case"bigint":return lh?lh(e):"0";case"symbol":return hh?hh(e):"Symbol()";case"undefined":return Fi(e);case"function":case"object":{if(e===null)return Fi(e);const t=e,r=ve(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Fi(i)}return Fi(e)}default:return Fi(e)}}function ve(e,t){for(;e!==null;){const i=Yy(e,t);if(i){if(i.get)return Ot(i.get);if(typeof i.value=="function")return Ot(i.value)}e=Hy(e)}function r(){return null}return r}function Jy(e){try{return qt(e,""),!0}catch{return!1}}const ch=Ht(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),da=Ht(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ua=Ht(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),t0=Ht(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fa=Ht(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),e0=Ht(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dh=Ht(["#text"]),uh=Ht(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),pa=Ht(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fh=Ht(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Bo=Ht(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),r0=Yt(/{{[\w\W]*|^[\w\W]*}}/g),i0=Yt(/<%[\w\W]*|^[\w\W]*%>/g),o0=Yt(/\${[\w\W]*/g),s0=Yt(/^data-[\-\w.\u00B7-\uFFFF]+$/),a0=Yt(/^aria-[\-\w]+$/),ph=Yt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),n0=Yt(/^(?:\w+script|data):/i),l0=Yt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),h0=Yt(/^html$/i),c0=Yt(/^[a-z][.\w]*(-[.\w]+)+$/i),gh=Yt(/<[/\w!]/g),d0=Yt(/<[/\w]/g),u0=Yt(/<\/no(script|embed|frames)/i),f0=Yt(/\/>/i),_e={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},p0=function(){return typeof window>"u"?null:window},g0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(i=r.getAttribute(o));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},mh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Qe=function(t,r,i,o){return Qt(t,r)&&er(t[r])?mt(o.base?Kt(o.base):{},t[r],o.transform):i};function Uc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p0();const t=j=>Uc(j);if(t.version="3.4.10",t.removed=[],!e||!e.document||e.document.nodeType!==_e.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,o=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,f=n.prototype,u=ve(f,"cloneNode"),g=ve(f,"remove"),m=ve(f,"nextSibling"),y=ve(f,"childNodes"),C=ve(f,"parentNode"),b=ve(f,"shadowRoot"),k=ve(f,"attributes"),w=a&&a.prototype?ve(a.prototype,"nodeType"):null,S=a&&a.prototype?ve(a.prototype,"nodeName"):null;if(typeof s=="function"){const j=r.createElement("template");j.content&&j.content.ownerDocument&&(r=j.content.ownerDocument)}let _,E="",B,q=!1,I=0;const R=function(){if(I>0)throw pr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},W=function(T){R(),I++;try{return _.createHTML(T)}finally{I--}},z=function(T){R(),I++;try{return _.createScriptURL(T)}finally{I--}},D=function(){return q||(B=g0(d,o),q=!0),B},A=r,L=A.implementation,O=A.createNodeIterator,P=A.createDocumentFragment,H=A.getElementsByTagName,U=i.importNode;let tt=mh();t.isSupported=typeof Hc=="function"&&typeof C=="function"&&L&&L.createHTMLDocument!==void 0;const gt=r0,dt=i0,ut=o0,bt=s0,st=a0,ct=n0,Tt=l0,vt=c0;let St=ph,lt=null;const le=mt({},[...ch,...da,...ua,...fa,...dh]);let wt=null;const dr=mt({},[...uh,...pa,...fh,...Bo]);let Lt=Object.seal(Wr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wi=null,Ol=null;const Ve=Object.seal(Wr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Il=!0,Vs=!0,Dl=!1,Pl=!0,Ze=!1,Si=!0,ur=!1,Zs=!1,Ks=!1,$r=!1,bo=!1,ko=!1,Rl=!0,Nl=!1;const ql="user-content-";let Qs=!0,Js=!1,Or={},we=null;const ta=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let zl=null;const Wl=mt({},["audio","video","img","source","image","track"]);let ea=null;const Hl=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),To="http://www.w3.org/1998/Math/MathML",wo="http://www.w3.org/2000/svg",Se="http://www.w3.org/1999/xhtml";let Ir=Se,ra=!1,ia=null;const ly=mt({},[To,wo,Se],ca),Yl=Ht(["mi","mo","mn","ms","mtext"]);let oa=mt({},Yl);const Ul=Ht(["annotation-xml"]);let sa=mt({},Ul);const hy=mt({},["title","style","font","a","script"]);let _i=null;const cy=["application/xhtml+xml","text/html"],dy="text/html";let Ft=null,Dr=null;const uy=r.createElement("form"),jl=function(T){return T instanceof RegExp||T instanceof Function},aa=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Dr&&Dr===T)return;(!T||typeof T!="object")&&(T={}),T=Kt(T),_i=cy.indexOf(T.PARSER_MEDIA_TYPE)===-1?dy:T.PARSER_MEDIA_TYPE,Ft=_i==="application/xhtml+xml"?ca:Ri,lt=Qe(T,"ALLOWED_TAGS",le,{transform:Ft}),wt=Qe(T,"ALLOWED_ATTR",dr,{transform:Ft}),ia=Qe(T,"ALLOWED_NAMESPACES",ly,{transform:ca}),ea=Qe(T,"ADD_URI_SAFE_ATTR",Hl,{transform:Ft,base:Hl}),zl=Qe(T,"ADD_DATA_URI_TAGS",Wl,{transform:Ft,base:Wl}),we=Qe(T,"FORBID_CONTENTS",ta,{transform:Ft}),wi=Qe(T,"FORBID_TAGS",Kt({}),{transform:Ft}),Ol=Qe(T,"FORBID_ATTR",Kt({}),{transform:Ft}),Or=Qt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Kt(T.USE_PROFILES):T.USE_PROFILES:!1,Il=T.ALLOW_ARIA_ATTR!==!1,Vs=T.ALLOW_DATA_ATTR!==!1,Dl=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Pl=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ze=T.SAFE_FOR_TEMPLATES||!1,Si=T.SAFE_FOR_XML!==!1,ur=T.WHOLE_DOCUMENT||!1,$r=T.RETURN_DOM||!1,bo=T.RETURN_DOM_FRAGMENT||!1,ko=T.RETURN_TRUSTED_TYPE||!1,Ks=T.FORCE_BODY||!1,Rl=T.SANITIZE_DOM!==!1,Nl=T.SANITIZE_NAMED_PROPS||!1,Qs=T.KEEP_CONTENT!==!1,Js=T.IN_PLACE||!1,St=Jy(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:ph,Ir=typeof T.NAMESPACE=="string"?T.NAMESPACE:Se,oa=Qt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Kt(T.MATHML_TEXT_INTEGRATION_POINTS):mt({},Yl),sa=Qt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Kt(T.HTML_INTEGRATION_POINTS):mt({},Ul);const F=Qt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Kt(T.CUSTOM_ELEMENT_HANDLING):Wr(null);if(Lt=Wr(null),Qt(F,"tagNameCheck")&&jl(F.tagNameCheck)&&(Lt.tagNameCheck=F.tagNameCheck),Qt(F,"attributeNameCheck")&&jl(F.attributeNameCheck)&&(Lt.attributeNameCheck=F.attributeNameCheck),Qt(F,"allowCustomizedBuiltInElements")&&typeof F.allowCustomizedBuiltInElements=="boolean"&&(Lt.allowCustomizedBuiltInElements=F.allowCustomizedBuiltInElements),Yt(Lt),Ze&&(Vs=!1),bo&&($r=!0),Or&&(lt=mt({},dh),wt=Wr(null),Or.html===!0&&(mt(lt,ch),mt(wt,uh)),Or.svg===!0&&(mt(lt,da),mt(wt,pa),mt(wt,Bo)),Or.svgFilters===!0&&(mt(lt,ua),mt(wt,pa),mt(wt,Bo)),Or.mathMl===!0&&(mt(lt,fa),mt(wt,fh),mt(wt,Bo))),Ve.tagCheck=null,Ve.attributeCheck=null,Qt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?Ve.tagCheck=T.ADD_TAGS:er(T.ADD_TAGS)&&(lt===le&&(lt=Kt(lt)),mt(lt,T.ADD_TAGS,Ft))),Qt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?Ve.attributeCheck=T.ADD_ATTR:er(T.ADD_ATTR)&&(wt===dr&&(wt=Kt(wt)),mt(wt,T.ADD_ATTR,Ft))),Qt(T,"ADD_URI_SAFE_ATTR")&&er(T.ADD_URI_SAFE_ATTR)&&mt(ea,T.ADD_URI_SAFE_ATTR,Ft),Qt(T,"FORBID_CONTENTS")&&er(T.FORBID_CONTENTS)&&(we===ta&&(we=Kt(we)),mt(we,T.FORBID_CONTENTS,Ft)),Qt(T,"ADD_FORBID_CONTENTS")&&er(T.ADD_FORBID_CONTENTS)&&(we===ta&&(we=Kt(we)),mt(we,T.ADD_FORBID_CONTENTS,Ft)),Qs&&(lt["#text"]=!0),ur&&mt(lt,["html","head","body"]),lt.table&&(mt(lt,["tbody"]),delete wi.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw pr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Y=_;_=T.TRUSTED_TYPES_POLICY;try{E=W("")}catch(Q){throw _=Y,Q}}else T.TRUSTED_TYPES_POLICY===null?(_=void 0,E=""):(_===void 0&&(_=D()),_&&typeof E=="string"&&(E=W("")));(tt.uponSanitizeElement.length>0||tt.uponSanitizeAttribute.length>0)&<===le&&(lt=Kt(lt)),tt.uponSanitizeAttribute.length>0&&wt===dr&&(wt=Kt(wt)),Ht&&Ht(T),Dr=T},Gl=mt({},[...da,...ua,...t0]),Xl=mt({},[...fa,...e0]),fy=function(T,F,Y){return F.namespaceURI===Se?T==="svg":F.namespaceURI===To?T==="svg"&&(Y==="annotation-xml"||oa[Y]):!!Gl[T]},py=function(T,F,Y){return F.namespaceURI===Se?T==="math":F.namespaceURI===wo?T==="math"&&sa[Y]:!!Xl[T]},gy=function(T,F,Y){return F.namespaceURI===wo&&!sa[Y]||F.namespaceURI===To&&!oa[Y]?!1:!Xl[T]&&(hy[T]||!Gl[T])},my=function(T){let F=C(T);(!F||!F.tagName)&&(F={namespaceURI:Ir,tagName:"template"});const Y=Ri(T.tagName),Q=Ri(F.tagName);return ia[T.namespaceURI]?T.namespaceURI===wo?fy(Y,F,Q):T.namespaceURI===To?py(Y,F,Q):T.namespaceURI===Se?gy(Y,F,Q):!!(_i==="application/xhtml+xml"&&ia[T.namespaceURI]):!1},Ke=function(T){Rr(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(g(T),!C(T))throw pr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Vl=function(T){const F=y(T);if(F){const Q=[];Bi(F,ht=>{Rr(Q,ht)}),Bi(Q,ht=>{try{g(ht)}catch{}})}const Y=k(T);if(Y)for(let Q=Y.length-1;Q>=0;--Q){const ht=Y[Q],yt=ht&&ht.name;if(typeof yt=="string")try{T.removeAttribute(yt)}catch{}}},fr=function(T,F){try{Rr(t.removed,{attribute:F.getAttributeNode(T),from:F})}catch{Rr(t.removed,{attribute:null,from:F})}if(F.removeAttribute(T),T==="is")if($r||bo)try{Ke(F)}catch{}else try{F.setAttribute(T,"")}catch{}},yy=function(T){const F=k(T);if(F)for(let Y=F.length-1;Y>=0;--Y){const Q=F[Y],ht=Q&&Q.name;if(!(typeof ht!="string"||wt[Ft(ht)]))try{T.removeAttribute(ht)}catch{}}},Cy=function(T){const F=[T];for(;F.length>0;){const Y=F.pop();(w?w(Y):Y.nodeType)===_e.element&&yy(Y);const ht=y(Y);if(ht)for(let yt=ht.length-1;yt>=0;--yt)F.push(ht[yt])}},Zl=function(T){let F=null,Y=null;if(Ks)T="<remove></remove>"+T;else{const yt=ah(T,/^[\r\n\t ]+/);Y=yt&&yt[0]}_i==="application/xhtml+xml"&&Ir===Se&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const Q=_?W(T):T;if(Ir===Se)try{F=new h().parseFromString(Q,_i)}catch{}if(!F||!F.documentElement){F=L.createDocument(Ir,"template",null);try{F.documentElement.innerHTML=ra?E:Q}catch{}}const ht=F.body||F.documentElement;return T&&Y&&ht.insertBefore(r.createTextNode(Y),ht.childNodes[0]||null),Ir===Se?H.call(F,ur?"html":"body")[0]:ur?F.documentElement:ht},Kl=function(T){return O.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},So=function(T){return T=Li(T,gt," "),T=Li(T,dt," "),T=Li(T,ut," "),T},na=function(T){var F;T.normalize();const Y=O.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let Q=Y.nextNode();for(;Q;)Q.data=So(Q.data),Q=Y.nextNode();const ht=(F=T.querySelectorAll)===null||F===void 0?void 0:F.call(T,"template");ht&&Bi(ht,yt=>{Pr(yt.content)&&na(yt.content)})},_o=function(T){const F=S?S(T):null;return typeof F!="string"||Ft(F)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==w(T)||T.childNodes!==y(T)},Pr=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===_e.documentFragment}catch{return!1}},vi=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function De(j,T,F){j.length!==0&&Bi(j,Y=>{Y.call(t,T,F,Dr)})}const xy=function(T,F){return!!(Si&&T.hasChildNodes()&&!vi(T.firstElementChild)&&qt(gh,T.textContent)&&qt(gh,T.innerHTML)||Si&&T.namespaceURI===Se&&F==="style"&&vi(T.firstElementChild)||T.nodeType===_e.processingInstruction||Si&&T.nodeType===_e.comment&&qt(d0,T.data))},by=function(T,F){if(!wi[F]&&th(F)&&(Lt.tagNameCheck instanceof RegExp&&qt(Lt.tagNameCheck,F)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(F)))return!1;if(Qs&&!we[F]){const Y=C(T),Q=y(T);if(Q&&Y){const ht=Q.length;for(let yt=ht-1;yt>=0;--yt){const Rt=Js?Q[yt]:u(Q[yt],!0);Y.insertBefore(Rt,m(T))}}}return Ke(T),!0},Ql=function(T){if(De(tt.beforeSanitizeElements,T,null),_o(T))return Ke(T),!0;const F=Ft(S?S(T):T.nodeName);if(De(tt.uponSanitizeElement,T,{tagName:F,allowedTags:lt}),xy(T,F))return Ke(T),!0;if(wi[F]||!(Ve.tagCheck instanceof Function&&Ve.tagCheck(F))&&!lt[F])return by(T,F);if((w?w(T):T.nodeType)===_e.element&&!my(T)||(F==="noscript"||F==="noembed"||F==="noframes")&&qt(u0,T.innerHTML))return Ke(T),!0;if(Ze&&T.nodeType===_e.text){const Q=So(T.textContent);T.textContent!==Q&&(Rr(t.removed,{element:T.cloneNode()}),T.textContent=Q)}return De(tt.afterSanitizeElements,T,null),!1},Jl=function(T,F,Y){if(Ol[F]||Rl&&(F==="id"||F==="name")&&(Y in r||Y in uy))return!1;const Q=wt[F]||Ve.attributeCheck instanceof Function&&Ve.attributeCheck(F,T);if(!(Vs&&qt(bt,F))){if(!(Il&&qt(st,F))){if(Q){if(!ea[F]){if(!qt(St,Li(Y,Tt,""))){if(!((F==="src"||F==="xlink:href"||F==="href")&&T!=="script"&&nh(Y,"data:")===0&&zl[T])){if(!(Dl&&!qt(ct,Li(Y,Tt,"")))){if(Y)return!1}}}}}else if(!(th(T)&&(Lt.tagNameCheck instanceof RegExp&&qt(Lt.tagNameCheck,T)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(T))&&(Lt.attributeNameCheck instanceof RegExp&&qt(Lt.attributeNameCheck,F)||Lt.attributeNameCheck instanceof Function&&Lt.attributeNameCheck(F,T))||F==="is"&&Lt.allowCustomizedBuiltInElements&&(Lt.tagNameCheck instanceof RegExp&&qt(Lt.tagNameCheck,Y)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(Y))))return!1}}return!0},ky=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),th=function(T){return!ky[Ri(T)]&&qt(vt,T)},Ty=function(T,F,Y,Q){if(_&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Y)switch(d.getAttributeType(T,F)){case"TrustedHTML":return W(Q);case"TrustedScriptURL":return z(Q)}return Q},wy=function(T,F,Y,Q){try{Y?T.setAttributeNS(Y,F,Q):T.setAttribute(F,Q),_o(T)?Ke(T):sh(t.removed)}catch{fr(F,T)}},eh=function(T){De(tt.beforeSanitizeAttributes,T,null);const F=T.attributes;if(!F||_o(T))return;const Y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:wt,forceKeepAttr:void 0};let Q=F.length;const ht=Ft(T.nodeName);for(;Q--;){const yt=F[Q],Rt=yt.name,Mt=yt.namespaceURI,he=yt.value,ue=Ft(Rt),ha=he;let Vt=Rt==="value"?ha:Gy(ha);if(Y.attrName=ue,Y.attrValue=Vt,Y.keepAttr=!0,Y.forceKeepAttr=void 0,De(tt.uponSanitizeAttribute,T,Y),Vt=Y.attrValue,Nl&&(ue==="id"||ue==="name")&&nh(Vt,ql)!==0&&(fr(Rt,T),Vt=ql+Vt),Si&&qt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Vt)){fr(Rt,T);continue}if(ue==="attributename"&&ah(Vt,"href")){fr(Rt,T);continue}if(!Y.forceKeepAttr){if(!Y.keepAttr){fr(Rt,T);continue}if(!Pl&&qt(f0,Vt)){fr(Rt,T);continue}if(Ze&&(Vt=So(Vt)),!Jl(ht,ue,Vt)){fr(Rt,T);continue}Vt=Ty(ht,ue,Mt,Vt),Vt!==ha&&wy(T,Rt,Mt,Vt)}}De(tt.afterSanitizeAttributes,T,null)},vo=function(T){let F=null;const Y=Kl(T);for(De(tt.beforeSanitizeShadowDOM,T,null);F=Y.nextNode();)if(De(tt.uponSanitizeShadowNode,F,null),Ql(F),eh(F),Pr(F.content)&&vo(F.content),(w?w(F):F.nodeType)===_e.element){const ht=b(F);Pr(ht)&&(la(ht),vo(ht))}De(tt.afterSanitizeShadowDOM,T,null)},la=function(T){const F=[{node:T,shadow:null}];for(;F.length>0;){const Y=F.pop();if(Y.shadow){vo(Y.shadow);continue}const Q=Y.node,yt=(w?w(Q):Q.nodeType)===_e.element,Rt=y(Q);if(Rt)for(let Mt=Rt.length-1;Mt>=0;--Mt)F.push({node:Rt[Mt],shadow:null});if(yt){const Mt=S?S(Q):null;if(typeof Mt=="string"&&Ft(Mt)==="template"){const he=Q.content;Pr(he)&&F.push({node:he,shadow:null})}}if(yt){const Mt=b(Q);Pr(Mt)&&F.push({node:null,shadow:Mt},{node:Mt,shadow:null})}}};return t.sanitize=function(j){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=null,Y=null,Q=null,ht=null;if(ra=!j,ra&&(j="<!-->"),typeof j!="string"&&!vi(j)&&(j=Qy(j),typeof j!="string"))throw pr("dirty is not a string, aborting");if(!t.isSupported)return j;Zs||aa(T),t.removed=[];const yt=Js&&typeof j!="string"&&vi(j);if(yt){const he=S?S(j):j.nodeName;if(typeof he=="string"){const ue=Ft(he);if(!lt[ue]||wi[ue])throw pr("root node is forbidden and cannot be sanitized in-place")}if(_o(j))throw pr("root node is clobbered and cannot be sanitized in-place");try{la(j)}catch(ue){throw Vl(j),ue}}else if(vi(j))F=Zl("<!---->"),Y=F.ownerDocument.importNode(j,!0),Y.nodeType===_e.element&&Y.nodeName==="BODY"||Y.nodeName==="HTML"?F=Y:F.appendChild(Y),la(Y);else{if(!$r&&!Ze&&!ur&&j.indexOf("<")===-1)return _&&ko?W(j):j;if(F=Zl(j),!F)return $r?null:ko?E:""}F&&Ks&&Ke(F.firstChild);const Rt=Kl(yt?j:F);try{for(;Q=Rt.nextNode();)Ql(Q),eh(Q),Pr(Q.content)&&vo(Q.content)}catch(he){throw yt&&Vl(j),he}if(yt)return Bi(t.removed,he=>{he.element&&Cy(he.element)}),Ze&&na(j),j;if($r){if(Ze&&na(F),bo)for(ht=P.call(F.ownerDocument);F.firstChild;)ht.appendChild(F.firstChild);else ht=F;return(wt.shadowroot||wt.shadowrootmode)&&(ht=U.call(i,ht,!0)),ht}let Mt=ur?F.outerHTML:F.innerHTML;return ur&<["!doctype"]&&F.ownerDocument&&F.ownerDocument.doctype&&F.ownerDocument.doctype.name&&qt(h0,F.ownerDocument.doctype.name)&&(Mt="<!DOCTYPE "+F.ownerDocument.doctype.name+`>
|
|
4
|
+
`+Mt),Ze&&(Mt=So(Mt)),_&&ko?W(Mt):Mt},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};aa(j),Zs=!0},t.clearConfig=function(){Dr=null,Zs=!1,_=B,E=""},t.isValidAttribute=function(j,T,F){Dr||aa({});const Y=Ft(j),Q=Ft(T);return Jl(Y,Q,F)},t.addHook=function(j,T){typeof T=="function"&&Rr(tt[j],T)},t.removeHook=function(j,T){if(T!==void 0){const F=Uy(tt[j],T);return F===-1?void 0:jy(tt[j],F,1)[0]}return sh(tt[j])},t.removeHooks=function(j){tt[j]=[]},t.removeAllHooks=function(){tt=mh()},t}var di=Uc(),jc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Gi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,m0=/\s*%%.*\n/gm,Kr,Gc=(Kr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Kr,"UnknownDiagramError"),Kr),_r={},$n=p(function(e,t){e=e.replace(jc,"").replace(Gi,"").replace(m0,`
|
|
5
|
+
`);for(const[r,{detector:i}]of Object.entries(_r))if(i(e,t))return r;throw new Gc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),$a=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Xc(t,r,i)},"registerLazyLoadedDiagrams"),Xc=p((e,t,r)=>{_r[e]&&N.warn(`Detector with key ${e} already exists. Overwriting.`),_r[e]={detector:t,loader:r},N.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),y0=p(e=>_r[e].loader,"getDiagramLoader"),Oa=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Oa(e,s,o)),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]=Oa(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Dt=Oa,$e="#ffffff",Oe="#f2f2f2",ot=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Qr,C0=(Qr=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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(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||M(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||$(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||$(this.mainBkg,10)):(this.rowOdd=this.rowOdd||M(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||M(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||v(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||M(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||$(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||x(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||x(this.mainBkg,{h:180,s:-15,l:t*(8+r*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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe,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]})}},p(Qr,"Theme"),Qr),x0=p(e=>{const t=new C0;return t.calculate(e),t},"getThemeVariables"),Jr,b0=(Jr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=M(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=M(v("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=or(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=$("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=$(this.sectionBkgColor,10),this.taskBorderColor=or(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=or(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||M(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||$(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(){this.secondBkg=M(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=M(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=M(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=v(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]||v(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||M(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)]??M(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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},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?$(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=M(this.secondaryColor,20),this.git1=M(this.pie2||this.secondaryColor,20),this.git2=M(this.pie3||this.tertiaryColor,20),this.git3=M(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=M(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=M(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=M(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=M(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||M("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||M("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||M("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||M("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||M(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||M(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||M(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||M(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]})}},p(Jr,"Theme"),Jr),k0=p(e=>{const t=new b0;return t.calculate(e),t},"getThemeVariables"),ti,T0=(ti=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=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ot(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=or(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(){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||$(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||$(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=$(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||$(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||v(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||v(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||M(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||M(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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||$(v(this.git0),25),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}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]})}},p(ti,"Theme"),ti),w0=p(e=>{const t=new T0;return t.calculate(e),t},"getThemeVariables"),ei,S0=(ei=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=M("#cde498",10),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.primaryColor),this.lineColor=v(this.background),this.textColor=v(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(){this.actorBorder=$(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||$(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||$(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=$(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||$(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||M(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||M(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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}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]})}},p(ei,"Theme"),ei),_0=p(e=>{const t=new S0;return t.calculate(e),t},"getThemeVariables"),ri,v0=(ri=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=M(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(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||M(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(){this.secondBkg=M(this.contrast,55),this.border2=this.contrast,this.actorBorder=M(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]||v(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||M(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||$(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=M(this.contrast,30),this.sectionBkgColor2=M(this.contrast,30),this.taskBorderColor=$(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=M(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=$(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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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.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||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}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]})}},p(ri,"Theme"),ri),B0=p(e=>{const t=new v0;return t.calculate(e),t},"getThemeVariables"),ii,L0=(ii=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=ot(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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(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||M(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 s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=$(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=$(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||v(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||M(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||$(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(8+s*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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}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]})}},p(ii,"Theme"),ii),F0=p(e=>{const t=new L0;return t.calculate(e),t},"getThemeVariables"),oi,A0=(oi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=M(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=M(v("#323D47"),10),this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor=v(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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(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||M(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||v(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||M(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||$(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||x(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||x(this.mainBkg,{h:180,s:-15,l:t*(8+r*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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}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]})}},p(oi,"Theme"),oi),E0=p(e=>{const t=new A0;return t.calculate(e),t},"getThemeVariables"),si,M0=(si=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=ot("#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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(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||M(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 s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=this.mainBkg;if(this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=$(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=$(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||v(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||M(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||$(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(8+s*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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}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]})}},p(si,"Theme"),si),$0=p(e=>{const t=new M0;return t.calculate(e),t},"getThemeVariables"),ai,O0=(ai=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=M(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=M(v("#323D47"),10),this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor=v(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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(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||M(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||v(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||M(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||$(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||x(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||x(this.mainBkg,{h:180,s:-15,l:t*(8+r*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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}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]})}},p(ai,"Theme"),ai),I0=p(e=>{const t=new O0;return t.calculate(e),t},"getThemeVariables"),ni,D0=(ni=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=ot(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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(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||M(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 s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||v(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||M(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||$(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(8+s*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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}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]})}},p(ni,"Theme"),ni),P0=p(e=>{const t=new D0;return t.calculate(e),t},"getThemeVariables"),li,R0=(li=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=M(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=M(v("#323D47"),10),this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor=v(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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(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||M(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||v(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||M(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||$(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=$(this["cScale"+r],75);const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||x(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||x(this.mainBkg,{h:180,s:-15,l:t*(8+r*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||ke(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}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]})}},p(li,"Theme"),li),N0=p(e=>{const t=new R0;return t.calculate(e),t},"getThemeVariables"),ze={base:{getThemeVariables:x0},dark:{getThemeVariables:k0},default:{getThemeVariables:w0},forest:{getThemeVariables:_0},neutral:{getThemeVariables:B0},neo:{getThemeVariables:F0},"neo-dark":{getThemeVariables:E0},redux:{getThemeVariables:$0},"redux-dark":{getThemeVariables:I0},"redux-color":{getThemeVariables:P0},"redux-dark-color":{getThemeVariables:N0}},Zt={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,hierarchicalNamespaces:!0},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},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,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},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},Vc={...Zt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ze.default.getThemeVariables(),sequence:{...Zt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Zt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Zt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Zt.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Zt.pie,useWidth:984},xyChart:{...Zt.xyChart,useWidth:void 0},requirement:{...Zt.requirement,useWidth:void 0},packet:{...Zt.packet},eventmodeling:{...Zt.eventmodeling},treeView:{...Zt.treeView,useWidth:void 0},radar:{...Zt.radar},ishikawa:{...Zt.ishikawa},sankey:{...Zt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Zt.venn}},Zc=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Zc(e[i],"")]:[...r,t+i],[]),"keyify"),q0=new Set(Zc(Vc,"")),Kc=Vc,Jo=p(e=>{if(N.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Jo(t));return}for(const t of Object.keys(e)){if(N.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!q0.has(t)||e[t]==null){N.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const o of Object.keys(e[t]))(typeof e[t][o]!="string"||!i.test(e[t][o]))&&(N.debug("sanitize deleting invalid color:",o,e[t][o]),delete e[t][o])}else N.debug("sanitizing object",t),Jo(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(N.debug("sanitizing css option",t),e[t]=Qc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}N.debug("After sanitization",e)}},"sanitizeDirective"),Qc=p(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"),ui=Object.freeze(Kc),je=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ie=Dt({},ui),ts,vr=[],Xi=Dt({},ui),Es=p((e,t)=>{let r=Dt({},e),i={};for(const o of t)ed(o),i=Dt(i,o);if(r=Dt(r,i),i.theme&&i.theme in ze){const o=Dt({},ts),s=Dt(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in ze&&(r.themeVariables=ze[r.theme].getThemeVariables(s))}return Xi=r,id(Xi),Xi},"updateCurrentConfig"),z0=p(e=>(ie=Dt({},ui),ie=Dt(ie,e),e.theme&&ze[e.theme]&&(ie.themeVariables=ze[e.theme].getThemeVariables(e.themeVariables)),Es(ie,vr),ie),"setSiteConfig"),W0=p(e=>{ts=Dt({},e)},"saveConfigFromInitialize"),H0=p(e=>(ie=Dt(ie,e),Es(ie,vr),ie),"updateSiteConfig"),Jc=p(()=>Dt({},ie),"getSiteConfig"),td=p(e=>(id(e),Dt(Xi,e),Bt()),"setConfig"),Bt=p(()=>Dt({},Xi),"getConfig"),ed=p(e=>{e&&(["secure",...ie.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(N.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"&&ed(e[t])}))},"sanitize"),Y0=p(e=>{Jo(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),vr.push(e),Es(ie,vr)},"addDirective"),es=p((e=ie)=>{vr=[],Es(e,vr)},"reset"),U0={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."},yh={},rd=p(e=>{yh[e]||(N.warn(U0[e]),yh[e]=!0)},"issueWarning"),id=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&rd("LAZY_LOAD_DEPRECATED")},"checkConfig"),aL=p(()=>{let e={};ts&&(e=Dt(e,ts));for(const t of vr)e=Dt(e,t);return e},"getUserDefinedConfig"),ee=p(e=>(e.flowchart?.htmlLabels!=null&&rd("FLOWCHART_HTML_LABELS_DEPRECATED"),je(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),co=/<br\s*\/?>/gi,j0=p(e=>e?ad(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),G0=(()=>{let e=!1;return()=>{e||(od(),e=!0)}})();function od(){const e="data-temp-href-target";di.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),di.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"))})}p(od,"setupDompurifyHooks");var sd=p(e=>(G0(),di.sanitize(e)),"removeScript"),Ch=p((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=sd(e):r!=="loose"&&(e=ad(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=K0(e))}return e},"sanitizeMore"),be=p((e,t)=>e&&(t.dompurifyConfig?e=di.sanitize(Ch(e,t),t.dompurifyConfig).toString():e=di.sanitize(Ch(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),X0=p((e,t)=>typeof e=="string"?be(e,t):e.flat().map(r=>be(r,t)),"sanitizeTextOrArray"),V0=p(e=>co.test(e),"hasBreaks"),Z0=p(e=>e.split(co),"splitBreaks"),K0=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ad=p(e=>e.replace(co,"#br#"),"breakToPlaceholder"),Q0=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),J0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),tC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),xh=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let o=t[i];if(o===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];eC(s,a)&&(o=s+","+a,i++,r.pop())}r.push(rC(o))}return r.join("")},"parseGenericTypes"),Ia=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),eC=p((e,t)=>{const r=Ia(e,"~"),i=Ia(t,"~");return r===1&&i===1},"shouldCombineSets"),rC=p(e=>{const t=Ia(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let o=i.indexOf("~"),s=i.lastIndexOf("~");for(;o!==-1&&s!==-1&&o!==s;)i[o]="<",i[s]=">",o=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),bh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Da=/\$\$(.*)\$\$/g,Qi=p(e=>(e.match(Da)?.length??0)>0,"hasKatex"),nL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await nd(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),iC=p(async(e,t)=>{if(!Qi(e))return e;if(!(bh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Da,"MathML is unsupported in this environment.");{const{default:r}=await pt(async()=>{const{default:o}=await import("./katex-HP8lGamR.js");return{default:o}},[]),i=t.forceLegacyMathML||!bh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(co).map(o=>Qi(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Da,(o,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),nd=p(async(e,t)=>be(await iC(e,t),t),"renderKatexSanitized"),uo={getRows:j0,sanitizeText:be,sanitizeTextOrArray:X0,hasBreaks:V0,splitBreaks:Z0,lineBreakRegex:co,removeScript:sd,getUrl:Q0,evaluate:je,getMax:J0,getMin:tC},oC=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),sC=p(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"),ld=p(function(e,t,r,i){const o=sC(t,r,i);oC(e,o)},"configureSvgSize"),aC=p(function(e,t,r,i){const o=t.node().getBBox(),s=o.width,a=o.height;N.info(`SVG bounds: ${s}x${a}`,o);let n=0,l=0;N.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=a+r*2,N.info(`Calculated bounds: ${n}x${l}`),ld(t,l,n,i);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),zo={};function Pa(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
6
|
+
`)}p(Pa,"cssStyleSheetToString");var nC=p((e,t,r,i)=>{let o="";return e in zo&&zo[e]?o=zo[e]({...r,svgId:i}):N.warn(`No theme found for ${e}`),` & {
|
|
7
|
+
font-family: ${r.fontFamily};
|
|
8
|
+
font-size: ${r.fontSize};
|
|
9
|
+
fill: ${r.textColor}
|
|
10
|
+
}
|
|
11
|
+
@keyframes edge-animation-frame {
|
|
12
|
+
from {
|
|
13
|
+
stroke-dashoffset: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
@keyframes dash {
|
|
17
|
+
to {
|
|
18
|
+
stroke-dashoffset: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
& .edge-animation-slow {
|
|
22
|
+
stroke-dasharray: 9,5 !important;
|
|
23
|
+
stroke-dashoffset: 900;
|
|
24
|
+
animation: dash 50s linear infinite;
|
|
25
|
+
stroke-linecap: round;
|
|
26
|
+
}
|
|
27
|
+
& .edge-animation-fast {
|
|
28
|
+
stroke-dasharray: 9,5 !important;
|
|
29
|
+
stroke-dashoffset: 900;
|
|
30
|
+
animation: dash 20s linear infinite;
|
|
31
|
+
stroke-linecap: round;
|
|
32
|
+
}
|
|
33
|
+
/* Classes common for multiple diagrams */
|
|
34
|
+
|
|
35
|
+
& .error-icon {
|
|
36
|
+
fill: ${r.errorBkgColor};
|
|
37
|
+
}
|
|
38
|
+
& .error-text {
|
|
39
|
+
fill: ${r.errorTextColor};
|
|
40
|
+
stroke: ${r.errorTextColor};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
& .edge-thickness-normal {
|
|
44
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
45
|
+
}
|
|
46
|
+
& .edge-thickness-thick {
|
|
47
|
+
stroke-width: 3.5px
|
|
48
|
+
}
|
|
49
|
+
& .edge-pattern-solid {
|
|
50
|
+
stroke-dasharray: 0;
|
|
51
|
+
}
|
|
52
|
+
& .edge-thickness-invisible {
|
|
53
|
+
stroke-width: 0;
|
|
54
|
+
fill: none;
|
|
55
|
+
}
|
|
56
|
+
& .edge-pattern-dashed{
|
|
57
|
+
stroke-dasharray: 3;
|
|
58
|
+
}
|
|
59
|
+
.edge-pattern-dotted {
|
|
60
|
+
stroke-dasharray: 2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& .marker {
|
|
64
|
+
fill: ${r.lineColor};
|
|
65
|
+
stroke: ${r.lineColor};
|
|
66
|
+
}
|
|
67
|
+
& .marker.cross {
|
|
68
|
+
stroke: ${r.lineColor};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
& svg {
|
|
72
|
+
font-family: ${r.fontFamily};
|
|
73
|
+
font-size: ${r.fontSize};
|
|
74
|
+
}
|
|
75
|
+
& p {
|
|
76
|
+
margin: 0
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
${o}
|
|
80
|
+
.node .neo-node {
|
|
81
|
+
stroke: ${r.nodeBorder};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
85
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
86
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
[data-look="neo"].node path {
|
|
91
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
92
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
[data-look="neo"].node .outer-path {
|
|
96
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-look="neo"].node .neo-line path {
|
|
100
|
+
stroke: ${r.nodeBorder};
|
|
101
|
+
filter: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-look="neo"].node circle{
|
|
105
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
106
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[data-look="neo"].node circle .state-start{
|
|
110
|
+
fill: #000000;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[data-look="neo"].icon-shape .icon {
|
|
114
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
115
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
119
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
120
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
${t}
|
|
124
|
+
`},"getStyles"),lC=p((e,t)=>{t!==void 0&&(zo[e]=t)},"addStylesForDiagram"),hC=nC,hd={};Fy(hd,{clear:()=>cC,getAccDescription:()=>pC,getAccTitle:()=>uC,getDiagramTitle:()=>mC,setAccDescription:()=>fC,setAccTitle:()=>dC,setDiagramTitle:()=>gC});var On="",In="",Dn="",Pn=p(e=>be(e,Bt()),"sanitizeText"),cC=p(()=>{On="",Dn="",In=""},"clear"),dC=p(e=>{On=Pn(e).replace(/^\s+/g,"")},"setAccTitle"),uC=p(()=>On,"getAccTitle"),fC=p(e=>{Dn=Pn(e).replace(/\n\s+/g,`
|
|
125
|
+
`)},"setAccDescription"),pC=p(()=>Dn,"getAccDescription"),gC=p(e=>{In=Pn(e)},"setDiagramTitle"),mC=p(()=>In,"getDiagramTitle"),kh=N,yC=Mn,Ct=Bt,lL=td,hL=ui,Rn=p(e=>be(e,Ct()),"sanitizeText"),CC=aC,xC=p(()=>hd,"getCommonDb"),rs={},is=p((e,t,r)=>{rs[e]&&kh.warn(`Diagram with id ${e} already registered. Overwriting.`),rs[e]=t,r&&Xc(e,r),lC(e,t.styles),t.injectUtils?.(kh,yC,Ct,Rn,CC,xC(),()=>{})},"registerDiagram"),Ra=p(e=>{if(e in rs)return rs[e];throw new bC(e)},"getDiagram"),hi,bC=(hi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(hi,"DiagramNotFoundError"),hi),kC={value:()=>{}};function cd(){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 Wo(r)}function Wo(e){this._=e}function TC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Wo.prototype=cd.prototype={constructor:Wo,on:function(e,t){var r=this._,i=TC(e+"",r),o,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((o=(e=i[s]).type)&&(o=wC(r[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(o=(e=i[s]).type)r[o]=Th(r[o],e.name,t);else if(t==null)for(o in r)r[o]=Th(r[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Wo(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,s;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,o=s.length;i<o;++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],o=0,s=i.length;o<s;++o)i[o].value.apply(t,r)}};function wC(e,t){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===t)return o.value}function Th(e,t,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=kC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Na="http://www.w3.org/1999/xhtml";const wh={svg:"http://www.w3.org/2000/svg",xhtml:Na,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ms(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),wh.hasOwnProperty(t)?{space:wh[t],local:e}:e}function SC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Na&&t.documentElement.namespaceURI===Na?t.createElement(e):t.createElementNS(r,e)}}function _C(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function dd(e){var t=Ms(e);return(t.local?_C:SC)(t)}function vC(){}function Nn(e){return e==null?vC:function(){return this.querySelector(e)}}function BC(e){typeof e!="function"&&(e=Nn(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=new Array(a),l,c,h=0;h<a;++h)(l=s[h])&&(c=e.call(l,l.__data__,h,s))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new ne(i,this._parents)}function LC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function FC(){return[]}function ud(e){return e==null?FC:function(){return this.querySelectorAll(e)}}function AC(e){return function(){return LC(e.apply(this,arguments))}}function EC(e){typeof e=="function"?e=AC(e):e=ud(e);for(var t=this._groups,r=t.length,i=[],o=[],s=0;s<r;++s)for(var a=t[s],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),o.push(l));return new ne(i,o)}function fd(e){return function(){return this.matches(e)}}function pd(e){return function(t){return t.matches(e)}}var MC=Array.prototype.find;function $C(e){return function(){return MC.call(this.children,e)}}function OC(){return this.firstElementChild}function IC(e){return this.select(e==null?OC:$C(typeof e=="function"?e:pd(e)))}var DC=Array.prototype.filter;function PC(){return Array.from(this.children)}function RC(e){return function(){return DC.call(this.children,e)}}function NC(e){return this.selectAll(e==null?PC:RC(typeof e=="function"?e:pd(e)))}function qC(e){typeof e!="function"&&(e=fd(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&n.push(l);return new ne(i,this._parents)}function gd(e){return new Array(e.length)}function zC(){return new ne(this._enter||this._groups.map(gd),this._parents)}function os(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}os.prototype={constructor:os,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 WC(e){return function(){return e}}function HC(e,t,r,i,o,s){for(var a=0,n,l=t.length,c=s.length;a<c;++a)(n=t[a])?(n.__data__=s[a],i[a]=n):r[a]=new os(e,s[a]);for(;a<l;++a)(n=t[a])&&(o[a]=n)}function YC(e,t,r,i,o,s,a){var n,l,c=new Map,h=t.length,d=s.length,f=new Array(h),u;for(n=0;n<h;++n)(l=t[n])&&(f[n]=u=a.call(l,l.__data__,n,t)+"",c.has(u)?o[n]=l:c.set(u,l));for(n=0;n<d;++n)u=a.call(e,s[n],n,s)+"",(l=c.get(u))?(i[n]=l,l.__data__=s[n],c.delete(u)):r[n]=new os(e,s[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(f[n])===l&&(o[n]=l)}function UC(e){return e.__data__}function jC(e,t){if(!arguments.length)return Array.from(this,UC);var r=t?YC:HC,i=this._parents,o=this._groups;typeof e!="function"&&(e=WC(e));for(var s=o.length,a=new Array(s),n=new Array(s),l=new Array(s),c=0;c<s;++c){var h=i[c],d=o[c],f=d.length,u=GC(e.call(h,h&&h.__data__,c,i)),g=u.length,m=n[c]=new Array(g),y=a[c]=new Array(g),C=l[c]=new Array(f);r(h,d,m,y,C,u,t);for(var b=0,k=0,w,S;b<g;++b)if(w=m[b]){for(b>=k&&(k=b+1);!(S=y[k])&&++k<g;);w._next=S||null}}return a=new ne(a,i),a._enter=n,a._exit=l,a}function GC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function XC(){return new ne(this._exit||this._groups.map(gd),this._parents)}function VC(e,t,r){var i=this.enter(),o=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),r==null?s.remove():r(s),i&&o?i.merge(o).order():o}function ZC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,o=r.length,s=i.length,a=Math.min(o,s),n=new Array(o),l=0;l<a;++l)for(var c=r[l],h=i[l],d=c.length,f=n[l]=new Array(d),u,g=0;g<d;++g)(u=c[g]||h[g])&&(f[g]=u);for(;l<o;++l)n[l]=r[l];return new ne(n,this._parents)}function KC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],o=i.length-1,s=i[o],a;--o>=0;)(a=i[o])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function QC(e){e||(e=JC);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s){for(var a=r[s],n=a.length,l=o[s]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new ne(o,this._parents).order()}function JC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function tx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ex(){return Array.from(this)}function rx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],o=0,s=i.length;o<s;++o){var a=i[o];if(a)return a}return null}function ix(){let e=0;for(const t of this)++e;return e}function ox(){return!this.node()}function sx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var o=t[r],s=0,a=o.length,n;s<a;++s)(n=o[s])&&e.call(n,n.__data__,s,o);return this}function ax(e){return function(){this.removeAttribute(e)}}function nx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function lx(e,t){return function(){this.setAttribute(e,t)}}function hx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function cx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function dx(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 ux(e,t){var r=Ms(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?nx:ax:typeof t=="function"?r.local?dx:cx:r.local?hx:lx)(r,t))}function md(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function fx(e){return function(){this.style.removeProperty(e)}}function px(e,t,r){return function(){this.style.setProperty(e,t,r)}}function gx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function mx(e,t,r){return arguments.length>1?this.each((t==null?fx:typeof t=="function"?gx:px)(e,t,r??"")):fi(this.node(),e)}function fi(e,t){return e.style.getPropertyValue(t)||md(e).getComputedStyle(e,null).getPropertyValue(t)}function yx(e){return function(){delete this[e]}}function Cx(e,t){return function(){this[e]=t}}function xx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function bx(e,t){return arguments.length>1?this.each((t==null?yx:typeof t=="function"?xx:Cx)(e,t)):this.node()[e]}function yd(e){return e.trim().split(/^|\s+/)}function qn(e){return e.classList||new Cd(e)}function Cd(e){this._node=e,this._names=yd(e.getAttribute("class")||"")}Cd.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 xd(e,t){for(var r=qn(e),i=-1,o=t.length;++i<o;)r.add(t[i])}function bd(e,t){for(var r=qn(e),i=-1,o=t.length;++i<o;)r.remove(t[i])}function kx(e){return function(){xd(this,e)}}function Tx(e){return function(){bd(this,e)}}function wx(e,t){return function(){(t.apply(this,arguments)?xd:bd)(this,e)}}function Sx(e,t){var r=yd(e+"");if(arguments.length<2){for(var i=qn(this.node()),o=-1,s=r.length;++o<s;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof t=="function"?wx:t?kx:Tx)(r,t))}function _x(){this.textContent=""}function vx(e){return function(){this.textContent=e}}function Bx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Lx(e){return arguments.length?this.each(e==null?_x:(typeof e=="function"?Bx:vx)(e)):this.node().textContent}function Fx(){this.innerHTML=""}function Ax(e){return function(){this.innerHTML=e}}function Ex(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Mx(e){return arguments.length?this.each(e==null?Fx:(typeof e=="function"?Ex:Ax)(e)):this.node().innerHTML}function $x(){this.nextSibling&&this.parentNode.appendChild(this)}function Ox(){return this.each($x)}function Ix(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Dx(){return this.each(Ix)}function Px(e){var t=typeof e=="function"?e:dd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Rx(){return null}function Nx(e,t){var r=typeof e=="function"?e:dd(e),i=t==null?Rx:typeof t=="function"?t:Nn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function qx(){var e=this.parentNode;e&&e.removeChild(this)}function zx(){return this.each(qx)}function Wx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Hx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Yx(e){return this.select(e?Hx:Wx)}function Ux(e){return arguments.length?this.property("__data__",e):this.node().__data__}function jx(e){return function(t){e.call(this,t,this.__data__)}}function Gx(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 Xx(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,o=t.length,s;r<o;++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 Vx(e,t,r){return function(){var i=this.__on,o,s=jx(t);if(i){for(var a=0,n=i.length;a<n;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=r),o.value=t;return}}this.addEventListener(e.type,s,r),o={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(o):this.__on=[o]}}function Zx(e,t,r){var i=Gx(e+""),o,s=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(o=0,h=n[l];o<s;++o)if((a=i[o]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?Vx:Xx,o=0;o<s;++o)this.each(n(i[o],t,r));return this}function kd(e,t,r){var i=md(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,r):(o=i.document.createEvent("Event"),r?(o.initEvent(t,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Kx(e,t){return function(){return kd(this,e,t)}}function Qx(e,t){return function(){return kd(this,e,t.apply(this,arguments))}}function Jx(e,t){return this.each((typeof t=="function"?Qx:Kx)(e,t))}function*tb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],o=0,s=i.length,a;o<s;++o)(a=i[o])&&(yield a)}var Td=[null];function ne(e,t){this._groups=e,this._parents=t}function fo(){return new ne([[document.documentElement]],Td)}function eb(){return this}ne.prototype=fo.prototype={constructor:ne,select:BC,selectAll:EC,selectChild:IC,selectChildren:NC,filter:qC,data:jC,enter:zC,exit:XC,join:VC,merge:ZC,selection:eb,order:KC,sort:QC,call:tx,nodes:ex,node:rx,size:ix,empty:ox,each:sx,attr:ux,style:mx,property:bx,classed:Sx,text:Lx,html:Mx,raise:Ox,lower:Dx,append:Px,insert:Nx,remove:zx,clone:Yx,datum:Ux,on:Zx,dispatch:Jx,[Symbol.iterator]:tb};function nt(e){return typeof e=="string"?new ne([[document.querySelector(e)]],[document.documentElement]):new ne([[e]],Td)}function zn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function wd(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function po(){}var Ji=.7,ss=1/Ji,Vr="\\s*([+-]?\\d+)\\s*",to="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ae="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rb=/^#([0-9a-f]{3,8})$/,ib=new RegExp(`^rgb\\(${Vr},${Vr},${Vr}\\)$`),ob=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),sb=new RegExp(`^rgba\\(${Vr},${Vr},${Vr},${to}\\)$`),ab=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${to}\\)$`),nb=new RegExp(`^hsl\\(${to},${Ae},${Ae}\\)$`),lb=new RegExp(`^hsla\\(${to},${Ae},${Ae},${to}\\)$`),Sh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};zn(po,eo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_h,formatHex:_h,formatHex8:hb,formatHsl:cb,formatRgb:vh,toString:vh});function _h(){return this.rgb().formatHex()}function hb(){return this.rgb().formatHex8()}function cb(){return Sd(this).formatHsl()}function vh(){return this.rgb().formatRgb()}function eo(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=rb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Bh(t):r===3?new se(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Lo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Lo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ib.exec(e))?new se(t[1],t[2],t[3],1):(t=ob.exec(e))?new se(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sb.exec(e))?Lo(t[1],t[2],t[3],t[4]):(t=ab.exec(e))?Lo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nb.exec(e))?Ah(t[1],t[2]/100,t[3]/100,1):(t=lb.exec(e))?Ah(t[1],t[2]/100,t[3]/100,t[4]):Sh.hasOwnProperty(e)?Bh(Sh[e]):e==="transparent"?new se(NaN,NaN,NaN,0):null}function Bh(e){return new se(e>>16&255,e>>8&255,e&255,1)}function Lo(e,t,r,i){return i<=0&&(e=t=r=NaN),new se(e,t,r,i)}function db(e){return e instanceof po||(e=eo(e)),e?(e=e.rgb(),new se(e.r,e.g,e.b,e.opacity)):new se}function qa(e,t,r,i){return arguments.length===1?db(e):new se(e,t,r,i??1)}function se(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}zn(se,qa,wd(po,{brighter(e){return e=e==null?ss:Math.pow(ss,e),new se(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ji:Math.pow(Ji,e),new se(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new se(wr(this.r),wr(this.g),wr(this.b),as(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Lh,formatHex:Lh,formatHex8:ub,formatRgb:Fh,toString:Fh}));function Lh(){return`#${br(this.r)}${br(this.g)}${br(this.b)}`}function ub(){return`#${br(this.r)}${br(this.g)}${br(this.b)}${br((isNaN(this.opacity)?1:this.opacity)*255)}`}function Fh(){const e=as(this.opacity);return`${e===1?"rgb(":"rgba("}${wr(this.r)}, ${wr(this.g)}, ${wr(this.b)}${e===1?")":`, ${e})`}`}function as(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function br(e){return e=wr(e),(e<16?"0":"")+e.toString(16)}function Ah(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new me(e,t,r,i)}function Sd(e){if(e instanceof me)return new me(e.h,e.s,e.l,e.opacity);if(e instanceof po||(e=eo(e)),!e)return new me;if(e instanceof me)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,o=Math.min(t,r,i),s=Math.max(t,r,i),a=NaN,n=s-o,l=(s+o)/2;return n?(t===s?a=(r-i)/n+(r<i)*6:r===s?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?s+o:2-s-o,a*=60):n=l>0&&l<1?0:a,new me(a,n,l,e.opacity)}function fb(e,t,r,i){return arguments.length===1?Sd(e):new me(e,t,r,i??1)}function me(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}zn(me,fb,wd(po,{brighter(e){return e=e==null?ss:Math.pow(ss,e),new me(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ji:Math.pow(Ji,e),new me(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,o=2*r-i;return new se(ga(e>=240?e-240:e+120,o,i),ga(e,o,i),ga(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new me(Eh(this.h),Fo(this.s),Fo(this.l),as(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=as(this.opacity);return`${e===1?"hsl(":"hsla("}${Eh(this.h)}, ${Fo(this.s)*100}%, ${Fo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Eh(e){return e=(e||0)%360,e<0?e+360:e}function Fo(e){return Math.max(0,Math.min(1,e||0))}function ga(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Wn=e=>()=>e;function _d(e,t){return function(r){return e+r*t}}function pb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function cL(e,t){var r=t-e;return r?_d(e,r>180||r<-180?r-360*Math.round(r/360):r):Wn(isNaN(e)?t:e)}function gb(e){return(e=+e)==1?vd:function(t,r){return r-t?pb(t,r,e):Wn(isNaN(t)?r:t)}}function vd(e,t){var r=t-e;return r?_d(e,r):Wn(isNaN(e)?t:e)}const Mh=(function e(t){var r=gb(t);function i(o,s){var a=r((o=qa(o)).r,(s=qa(s)).r),n=r(o.g,s.g),l=r(o.b,s.b),c=vd(o.opacity,s.opacity);return function(h){return o.r=a(h),o.g=n(h),o.b=l(h),o.opacity=c(h),o+""}}return i.gamma=e,i})(1);function tr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var za=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ma=new RegExp(za.source,"g");function mb(e){return function(){return e}}function yb(e){return function(t){return e(t)+""}}function Cb(e,t){var r=za.lastIndex=ma.lastIndex=0,i,o,s,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=za.exec(e))&&(o=ma.exec(t));)(s=o.index)>r&&(s=t.slice(r,s),n[a]?n[a]+=s:n[++a]=s),(i=i[0])===(o=o[0])?n[a]?n[a]+=o:n[++a]=o:(n[++a]=null,l.push({i:a,x:tr(i,o)})),r=ma.lastIndex;return r<t.length&&(s=t.slice(r),n[a]?n[a]+=s:n[++a]=s),n.length<2?l[0]?yb(l[0].x):mb(t):(t=l.length,function(c){for(var h=0,d;h<t;++h)n[(d=l[h]).i]=d.x(c);return n.join("")})}var $h=180/Math.PI,Wa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Bd(e,t,r,i,o,s){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*$h,skewX:Math.atan(l)*$h,scaleX:a,scaleY:n}}var Ao;function xb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Wa:Bd(t.a,t.b,t.c,t.d,t.e,t.f)}function bb(e){return e==null||(Ao||(Ao=document.createElementNS("http://www.w3.org/2000/svg","g")),Ao.setAttribute("transform",e),!(e=Ao.transform.baseVal.consolidate()))?Wa:(e=e.matrix,Bd(e.a,e.b,e.c,e.d,e.e,e.f))}function Ld(e,t,r,i){function o(c){return c.length?c.pop()+" ":""}function s(c,h,d,f,u,g){if(c!==d||h!==f){var m=u.push("translate(",null,t,null,r);g.push({i:m-4,x:tr(c,d)},{i:m-2,x:tr(h,f)})}else(d||f)&&u.push("translate("+d+t+f+r)}function a(c,h,d,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,i)-2,x:tr(c,h)})):h&&d.push(o(d)+"rotate("+h+i)}function n(c,h,d,f){c!==h?f.push({i:d.push(o(d)+"skewX(",null,i)-2,x:tr(c,h)}):h&&d.push(o(d)+"skewX("+h+i)}function l(c,h,d,f,u,g){if(c!==d||h!==f){var m=u.push(o(u)+"scale(",null,",",null,")");g.push({i:m-4,x:tr(c,d)},{i:m-2,x:tr(h,f)})}else(d!==1||f!==1)&&u.push(o(u)+"scale("+d+","+f+")")}return function(c,h){var d=[],f=[];return c=e(c),h=e(h),s(c.translateX,c.translateY,h.translateX,h.translateY,d,f),a(c.rotate,h.rotate,d,f),n(c.skewX,h.skewX,d,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,d,f),c=h=null,function(u){for(var g=-1,m=f.length,y;++g<m;)d[(y=f[g]).i]=y.x(u);return d.join("")}}}var kb=Ld(xb,"px, ","px)","deg)"),Tb=Ld(bb,", ",")",")"),pi=0,Ni=0,Ai=0,Fd=1e3,ns,qi,ls=0,Br=0,$s=0,ro=typeof performance=="object"&&performance.now?performance:Date,Ad=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Hn(){return Br||(Ad(wb),Br=ro.now()+$s)}function wb(){Br=0}function hs(){this._call=this._time=this._next=null}hs.prototype=Ed.prototype={constructor:hs,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Hn():+r)+(t==null?0:+t),!this._next&&qi!==this&&(qi?qi._next=this:ns=this,qi=this),this._call=e,this._time=r,Ha()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ha())}};function Ed(e,t,r){var i=new hs;return i.restart(e,t,r),i}function Sb(){Hn(),++pi;for(var e=ns,t;e;)(t=Br-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pi}function Oh(){Br=(ls=ro.now())+$s,pi=Ni=0;try{Sb()}finally{pi=0,vb(),Br=0}}function _b(){var e=ro.now(),t=e-ls;t>Fd&&($s-=t,ls=e)}function vb(){for(var e,t=ns,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:ns=r);qi=e,Ha(i)}function Ha(e){if(!pi){Ni&&(Ni=clearTimeout(Ni));var t=e-Br;t>24?(e<1/0&&(Ni=setTimeout(Oh,e-ro.now()-$s)),Ai&&(Ai=clearInterval(Ai))):(Ai||(ls=ro.now(),Ai=setInterval(_b,Fd)),pi=1,Ad(Oh))}}function Ih(e,t,r){var i=new hs;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,r),i}var Bb=cd("start","end","cancel","interrupt"),Lb=[],Md=0,Dh=1,Ya=2,Ho=3,Ph=4,Ua=5,Yo=6;function Os(e,t,r,i,o,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Fb(e,r,{name:t,index:i,group:o,on:Bb,tween:Lb,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Md})}function Yn(e,t){var r=Te(e,t);if(r.state>Md)throw new Error("too late; already scheduled");return r}function Ie(e,t){var r=Te(e,t);if(r.state>Ho)throw new Error("too late; already running");return r}function Te(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Fb(e,t,r){var i=e.__transition,o;i[t]=r,r.timer=Ed(s,0,r.time);function s(c){r.state=Dh,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,d,f,u;if(r.state!==Dh)return l();for(h in i)if(u=i[h],u.name===r.name){if(u.state===Ho)return Ih(a);u.state===Ph?(u.state=Yo,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[h]):+h<t&&(u.state=Yo,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[h])}if(Ih(function(){r.state===Ho&&(r.state=Ph,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=Ya,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Ya){for(r.state=Ho,o=new Array(f=r.tween.length),h=0,d=-1;h<f;++h)(u=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(o[++d]=u);o.length=d+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Ua,1),d=-1,f=o.length;++d<f;)o[d].call(e,h);r.state===Ua&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Yo,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Ab(e,t){var r=e.__transition,i,o,s=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){s=!1;continue}o=i.state>Ya&&i.state<Ua,i.state=Yo,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}s&&delete e.__transition}}function Eb(e){return this.each(function(){Ab(this,e)})}function Mb(e,t){var r,i;return function(){var o=Ie(this,e),s=o.tween;if(s!==r){i=r=s;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}o.tween=i}}function $b(e,t,r){var i,o;if(typeof r!="function")throw new Error;return function(){var s=Ie(this,e),a=s.tween;if(a!==i){o=(i=a).slice();for(var n={name:t,value:r},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=n;break}l===c&&o.push(n)}s.tween=o}}function Ob(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Te(this.node(),r).tween,o=0,s=i.length,a;o<s;++o)if((a=i[o]).name===e)return a.value;return null}return this.each((t==null?Mb:$b)(r,e,t))}function Un(e,t,r){var i=e._id;return e.each(function(){var o=Ie(this,i);(o.value||(o.value={}))[t]=r.apply(this,arguments)}),function(o){return Te(o,i).value[t]}}function $d(e,t){var r;return(typeof t=="number"?tr:t instanceof eo?Mh:(r=eo(t))?(t=r,Mh):Cb)(e,t)}function Ib(e){return function(){this.removeAttribute(e)}}function Db(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pb(e,t,r){var i,o=r+"",s;return function(){var a=this.getAttribute(e);return a===o?null:a===i?s:s=t(i=a,r)}}function Rb(e,t,r){var i,o=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===i?s:s=t(i=a,r)}}function Nb(e,t,r){var i,o,s;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===o?s:(o=l,s=t(i=a,n)))}}function qb(e,t,r){var i,o,s;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===o?s:(o=l,s=t(i=a,n)))}}function zb(e,t){var r=Ms(e),i=r==="transform"?Tb:$d;return this.attrTween(e,typeof t=="function"?(r.local?qb:Nb)(r,i,Un(this,"attr."+e,t)):t==null?(r.local?Db:Ib)(r):(r.local?Rb:Pb)(r,i,t))}function Wb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Hb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Yb(e,t){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Hb(e,s)),r}return o._value=t,o}function Ub(e,t){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Wb(e,s)),r}return o._value=t,o}function jb(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=Ms(e);return this.tween(r,(i.local?Yb:Ub)(i,t))}function Gb(e,t){return function(){Yn(this,e).delay=+t.apply(this,arguments)}}function Xb(e,t){return t=+t,function(){Yn(this,e).delay=t}}function Vb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Gb:Xb)(t,e)):Te(this.node(),t).delay}function Zb(e,t){return function(){Ie(this,e).duration=+t.apply(this,arguments)}}function Kb(e,t){return t=+t,function(){Ie(this,e).duration=t}}function Qb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Zb:Kb)(t,e)):Te(this.node(),t).duration}function Jb(e,t){if(typeof t!="function")throw new Error;return function(){Ie(this,e).ease=t}}function tk(e){var t=this._id;return arguments.length?this.each(Jb(t,e)):Te(this.node(),t).ease}function ek(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ie(this,e).ease=r}}function rk(e){if(typeof e!="function")throw new Error;return this.each(ek(this._id,e))}function ik(e){typeof e!="function"&&(e=fd(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&n.push(l);return new He(i,this._parents,this._name,this._id)}function ok(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,o=r.length,s=Math.min(i,o),a=new Array(i),n=0;n<s;++n)for(var l=t[n],c=r[n],h=l.length,d=a[n]=new Array(h),f,u=0;u<h;++u)(f=l[u]||c[u])&&(d[u]=f);for(;n<i;++n)a[n]=t[n];return new He(a,this._parents,this._name,this._id)}function sk(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 ak(e,t,r){var i,o,s=sk(t)?Yn:Ie;return function(){var a=s(this,e),n=a.on;n!==i&&(o=(i=n).copy()).on(t,r),a.on=o}}function nk(e,t){var r=this._id;return arguments.length<2?Te(this.node(),r).on.on(e):this.each(ak(r,e,t))}function lk(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function hk(){return this.on("end.remove",lk(this._id))}function ck(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Nn(e));for(var i=this._groups,o=i.length,s=new Array(o),a=0;a<o;++a)for(var n=i[a],l=n.length,c=s[a]=new Array(l),h,d,f=0;f<l;++f)(h=n[f])&&(d=e.call(h,h.__data__,f,n))&&("__data__"in h&&(d.__data__=h.__data__),c[f]=d,Os(c[f],t,r,f,c,Te(h,r)));return new He(s,this._parents,t,r)}function dk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ud(e));for(var i=this._groups,o=i.length,s=[],a=[],n=0;n<o;++n)for(var l=i[n],c=l.length,h,d=0;d<c;++d)if(h=l[d]){for(var f=e.call(h,h.__data__,d,l),u,g=Te(h,r),m=0,y=f.length;m<y;++m)(u=f[m])&&Os(u,t,r,m,f,g);s.push(f),a.push(h)}return new He(s,a,t,r)}var uk=fo.prototype.constructor;function fk(){return new uk(this._groups,this._parents)}function pk(e,t){var r,i,o;return function(){var s=fi(this,e),a=(this.style.removeProperty(e),fi(this,e));return s===a?null:s===r&&a===i?o:o=t(r=s,i=a)}}function Od(e){return function(){this.style.removeProperty(e)}}function gk(e,t,r){var i,o=r+"",s;return function(){var a=fi(this,e);return a===o?null:a===i?s:s=t(i=a,r)}}function mk(e,t,r){var i,o,s;return function(){var a=fi(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),fi(this,e))),a===l?null:a===i&&l===o?s:(o=l,s=t(i=a,n))}}function yk(e,t){var r,i,o,s="style."+t,a="end."+s,n;return function(){var l=Ie(this,e),c=l.on,h=l.value[s]==null?n||(n=Od(t)):void 0;(c!==r||o!==h)&&(i=(r=c).copy()).on(a,o=h),l.on=i}}function Ck(e,t,r){var i=(e+="")=="transform"?kb:$d;return t==null?this.styleTween(e,pk(e,i)).on("end.style."+e,Od(e)):typeof t=="function"?this.styleTween(e,mk(e,i,Un(this,"style."+e,t))).each(yk(this._id,e)):this.styleTween(e,gk(e,i,t),r).on("end.style."+e,null)}function xk(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function bk(e,t,r){var i,o;function s(){var a=t.apply(this,arguments);return a!==o&&(i=(o=a)&&xk(e,a,r)),i}return s._value=t,s}function kk(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,bk(e,t,r??""))}function Tk(e){return function(){this.textContent=e}}function wk(e){return function(){var t=e(this);this.textContent=t??""}}function Sk(e){return this.tween("text",typeof e=="function"?wk(Un(this,"text",e)):Tk(e==null?"":e+""))}function _k(e){return function(t){this.textContent=e.call(this,t)}}function vk(e){var t,r;function i(){var o=e.apply(this,arguments);return o!==r&&(t=(r=o)&&_k(o)),t}return i._value=e,i}function Bk(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,vk(e))}function Lk(){for(var e=this._name,t=this._id,r=Id(),i=this._groups,o=i.length,s=0;s<o;++s)for(var a=i[s],n=a.length,l,c=0;c<n;++c)if(l=a[c]){var h=Te(l,t);Os(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new He(i,this._parents,e,r)}function Fk(){var e,t,r=this,i=r._id,o=r.size();return new Promise(function(s,a){var n={value:a},l={value:function(){--o===0&&s()}};r.each(function(){var c=Ie(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),o===0&&s()})}var Ak=0;function He(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Id(){return++Ak}var Re=fo.prototype;He.prototype={constructor:He,select:ck,selectAll:dk,selectChild:Re.selectChild,selectChildren:Re.selectChildren,filter:ik,merge:ok,selection:fk,transition:Lk,call:Re.call,nodes:Re.nodes,node:Re.node,size:Re.size,empty:Re.empty,each:Re.each,on:nk,attr:zb,attrTween:jb,style:Ck,styleTween:kk,text:Sk,textTween:Bk,remove:hk,tween:Ob,delay:Vb,duration:Qb,ease:tk,easeVarying:rk,end:Fk,[Symbol.iterator]:Re[Symbol.iterator]};function Ek(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Mk={time:null,delay:0,duration:250,ease:Ek};function $k(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 Ok(e){var t,r;e instanceof He?(t=e._id,e=e._name):(t=Id(),(r=Mk).time=Hn(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,s=0;s<o;++s)for(var a=i[s],n=a.length,l,c=0;c<n;++c)(l=a[c])&&Os(l,e,t,c,a,r||$k(l,t));return new He(i,this._parents,e,t)}fo.prototype.interrupt=Eb;fo.prototype.transition=Ok;const ja=Math.PI,Ga=2*ja,yr=1e-6,Ik=Ga-yr;function Dd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Dk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Dd;const r=10**t;return function(i){this._+=i[0];for(let o=1,s=i.length;o<s;++o)this._+=Math.round(arguments[o]*r)/r+i[o]}}class Pk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Dd:Dk(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,o){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+o}`}bezierCurveTo(t,r,i,o,s,a){this._append`C${+t},${+r},${+i},${+o},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,i,o,s){if(t=+t,r=+r,i=+i,o=+o,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,n=this._y1,l=i-t,c=o-r,h=a-t,d=n-r,f=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>yr)if(!(Math.abs(d*l-c*h)>yr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let u=i-a,g=o-n,m=l*l+c*c,y=u*u+g*g,C=Math.sqrt(m),b=Math.sqrt(f),k=s*Math.tan((ja-Math.acos((m+f-y)/(2*C*b)))/2),w=k/b,S=k/C;Math.abs(w-1)>yr&&this._append`L${t+w*h},${r+w*d}`,this._append`A${s},${s},0,0,${+(d*u>h*g)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,o,s,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(o),l=i*Math.sin(o),c=t+n,h=r+l,d=1^a,f=a?o-s:s-o;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>yr||Math.abs(this._y1-h)>yr)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Ga+Ga),f>Ik?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:f>yr&&this._append`A${i},${i},0,${+(f>=ja)},${d},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}}function Nr(e){return function(){return e}}const dL=Math.abs,uL=Math.atan2,fL=Math.cos,pL=Math.max,gL=Math.min,mL=Math.sin,yL=Math.sqrt,Rh=1e-12,jn=Math.PI,Nh=jn/2,CL=2*jn;function xL(e){return e>1?0:e<-1?jn:Math.acos(e)}function bL(e){return e>=1?Nh:e<=-1?-Nh:Math.asin(e)}function Rk(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Pk(t)}function Nk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Pd(e){this._context=e}Pd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Vi(e){return new Pd(e)}function qk(e){return e[0]}function zk(e){return e[1]}function Wk(e,t){var r=Nr(!0),i=null,o=Vi,s=null,a=Rk(n);e=typeof e=="function"?e:e===void 0?qk:Nr(e),t=typeof t=="function"?t:t===void 0?zk:Nr(t);function n(l){var c,h=(l=Nk(l)).length,d,f=!1,u;for(i==null&&(s=o(u=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(d,c,l),+t(d,c,l));if(u)return s=null,u+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Nr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Nr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Nr(!!l),n):r},n.curve=function(l){return arguments.length?(o=l,i!=null&&(s=o(i)),n):o},n.context=function(l){return arguments.length?(l==null?i=s=null:s=o(i=l),n):i},n}class Rd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Nd(e){return new Rd(e,!0)}function qd(e){return new Rd(e,!1)}function ar(){}function cs(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Is(e){this._context=e}Is.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:cs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:cs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xa(e){return new Is(e)}function zd(e){this._context=e}zd.prototype={areaStart:ar,areaEnd:ar,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:cs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hk(e){return new zd(e)}function Wd(e){this._context=e}Wd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:cs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Yk(e){return new Wd(e)}function Hd(e,t){this._basis=new Is(e),this._beta=t}Hd.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],o=t[0],s=e[r]-i,a=t[r]-o,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*s),this._beta*t[n]+(1-this._beta)*(o+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Uk=(function e(t){function r(i){return t===1?new Is(i):new Hd(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ds(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 Gn(e,t){this._context=e,this._k=(1-t)/6}Gn.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:ds(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:ds(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 Yd=(function e(t){function r(i){return new Gn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Xn(e,t){this._context=e,this._k=(1-t)/6}Xn.prototype={areaStart:ar,areaEnd:ar,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:ds(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 jk=(function e(t){function r(i){return new Xn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Vn(e,t){this._context=e,this._k=(1-t)/6}Vn.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:ds(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 Gk=(function e(t){function r(i){return new Vn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Zn(e,t,r){var i=e._x1,o=e._y1,s=e._x2,a=e._y2;if(e._l01_a>Rh){var n=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*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Rh){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,o,s,a,e._x2,e._y2)}function Ud(e,t){this._context=e,this._alpha=t}Ud.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:Zn(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 jd=(function e(t){function r(i){return t?new Ud(i,t):new Gn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Gd(e,t){this._context=e,this._alpha=t}Gd.prototype={areaStart:ar,areaEnd:ar,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:Zn(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 Xk=(function e(t){function r(i){return t?new Gd(i,t):new Xn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Xd(e,t){this._context=e,this._alpha=t}Xd.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:Zn(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 Vk=(function e(t){function r(i){return t?new Xd(i,t):new Vn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Vd(e){this._context=e}Vd.prototype={areaStart:ar,areaEnd:ar,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Zk(e){return new Vd(e)}function qh(e){return e<0?-1:1}function zh(e,t,r){var i=e._x1-e._x0,o=t-e._x1,s=(e._y1-e._y0)/(i||o<0&&-0),a=(r-e._y1)/(o||i<0&&-0),n=(s*o+a*i)/(i+o);return(qh(s)+qh(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(n))||0}function Wh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ya(e,t,r){var i=e._x0,o=e._y0,s=e._x1,a=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,o+n*t,s-n,a-n*r,s,a)}function us(e){this._context=e}us.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ya(this,this._t0,Wh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ya(this,Wh(this,r=zh(this,e,t)),r);break;default:ya(this,this._t0,r=zh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Zd(e){this._context=new Kd(e)}(Zd.prototype=Object.create(us.prototype)).point=function(e,t){us.prototype.point.call(this,t,e)};function Kd(e){this._context=e}Kd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,o,s){this._context.bezierCurveTo(t,e,i,r,s,o)}};function Qd(e){return new us(e)}function Jd(e){return new Zd(e)}function tu(e){this._context=e}tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Hh(e),o=Hh(t),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],o[0][s],i[1][s],o[1][s],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Hh(e){var t,r=e.length-1,i,o=new Array(r),s=new Array(r),a=new Array(r);for(o[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,s[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=o[t]/s[t-1],s[t]-=i,a[t]-=i*a[t-1];for(o[r-1]=a[r-1]/s[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/s[t];for(s[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-o[t+1];return[o,s]}function eu(e){return new tu(e)}function Ds(e,t){this._context=e,this._t=t}Ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function ru(e){return new Ds(e,.5)}function iu(e){return new Ds(e,0)}function ou(e){return new Ds(e,1)}function zi(e,t,r){this.k=e,this.x=t,this.y=r}zi.prototype={constructor:zi,scale:function(e){return e===1?this:new zi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new zi(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+")"}};zi.prototype;var Kk=p(e=>{const{securityLevel:t}=Ct();let r=nt("body");if(t==="sandbox"){const s=nt(`#i${e}`).node()?.contentDocument??document;r=nt(s.body)}return r.select(`#${e}`)},"selectSvgElement");function Kn(e){return typeof e>"u"||e===null}p(Kn,"isNothing");function su(e){return typeof e=="object"&&e!==null}p(su,"isObject");function au(e){return Array.isArray(e)?e:Kn(e)?[]:[e]}p(au,"toArray");function nu(e,t){var r,i,o,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)o=s[r],e[o]=t[o];return e}p(nu,"extend");function lu(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(lu,"repeat");function hu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(hu,"isNegativeZero");var Qk=Kn,Jk=su,t1=au,e1=lu,r1=hu,i1=nu,Pt={isNothing:Qk,isObject:Jk,toArray:t1,repeat:e1,isNegativeZero:r1,extend:i1};function Qn(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+=`
|
|
126
|
+
|
|
127
|
+
`+e.mark.snippet),i+" "+r):i}p(Qn,"formatError");function gi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Qn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(gi,"YAMLException$1");gi.prototype=Object.create(Error.prototype);gi.prototype.constructor=gi;gi.prototype.toString=p(function(t){return this.name+": "+Qn(this,t)},"toString");var oe=gi;function Uo(e,t,r,i,o){var s="",a="",n=Math.floor(o/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+s.length}}p(Uo,"getLine");function jo(e,t){return Pt.repeat(" ",t-e.length)+e}p(jo,"padStart");function cu(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],o=[],s,a=-1;s=r.exec(e.buffer);)o.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,o.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=Uo(e.buffer,i[a-l],o[a-l],e.position-(i[a]-i[a-l]),d),n=Pt.repeat(" ",t.indent)+jo((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
128
|
+
`+n;for(c=Uo(e.buffer,i[a],o[a],e.position,d),n+=Pt.repeat(" ",t.indent)+jo((e.line+1).toString(),h)+" | "+c.str+`
|
|
129
|
+
`,n+=Pt.repeat("-",t.indent+h+3+c.pos)+`^
|
|
130
|
+
`,l=1;l<=t.linesAfter&&!(a+l>=o.length);l++)c=Uo(e.buffer,i[a+l],o[a+l],e.position-(i[a]-i[a+l]),d),n+=Pt.repeat(" ",t.indent)+jo((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
131
|
+
`;return n.replace(/\n$/,"")}p(cu,"makeSnippet");var o1=cu,s1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],a1=["scalar","sequence","mapping"];function du(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(du,"compileStyleAliases");function uu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(s1.indexOf(r)===-1)throw new oe('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=du(t.styleAliases||null),a1.indexOf(this.kind)===-1)throw new oe('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(uu,"Type$1");var Gt=uu;function Va(e,t){var r=[];return e[t].forEach(function(i){var o=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(o=a)}),r[o]=i}),r}p(Va,"compileList");function fu(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(fu,"compileMap");function fs(e){return this.extend(e)}p(fs,"Schema$1");fs.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Gt)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 oe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Gt))throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new oe("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 oe("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 Gt))throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(fs.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(i),o.compiledImplicit=Va(o,"implicit"),o.compiledExplicit=Va(o,"explicit"),o.compiledTypeMap=fu(o.compiledImplicit,o.compiledExplicit),o},"extend");var n1=fs,l1=new Gt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),h1=new Gt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),c1=new Gt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),d1=new n1({explicit:[l1,h1,c1]});function pu(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(pu,"resolveYamlNull");function gu(){return null}p(gu,"constructYamlNull");function mu(e){return e===null}p(mu,"isNull");var u1=new Gt("tag:yaml.org,2002:null",{kind:"scalar",resolve:pu,construct:gu,predicate:mu,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function yu(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")}p(yu,"resolveYamlBoolean");function Cu(e){return e==="true"||e==="True"||e==="TRUE"}p(Cu,"constructYamlBoolean");function xu(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(xu,"isBoolean");var f1=new Gt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:yu,construct:Cu,predicate:xu,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function bu(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(bu,"isHexCode");function ku(e){return 48<=e&&e<=55}p(ku,"isOctCode");function Tu(e){return 48<=e&&e<=57}p(Tu,"isDecCode");function wu(e){if(e===null)return!1;var t=e.length,r=0,i=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;i=!0}return i&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!bu(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!ku(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!Tu(e.charCodeAt(r)))return!1;i=!0}return!(!i||o==="_")}p(wu,"resolveYamlInteger");function Su(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)}p(Su,"constructYamlInteger");function _u(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Pt.isNegativeZero(e)}p(_u,"isInteger");var p1=new Gt("tag:yaml.org,2002:int",{kind:"scalar",resolve:wu,construct:Su,predicate:_u,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(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"]}}),g1=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function vu(e){return!(e===null||!g1.test(e)||e[e.length-1]==="_")}p(vu,"resolveYamlFloat");function Bu(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)}p(Bu,"constructYamlFloat");var m1=/^[-+]?[0-9]+e/;function Lu(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(Pt.isNegativeZero(e))return"-0.0";return r=e.toString(10),m1.test(r)?r.replace("e",".e"):r}p(Lu,"representYamlFloat");function Fu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Pt.isNegativeZero(e))}p(Fu,"isFloat");var y1=new Gt("tag:yaml.org,2002:float",{kind:"scalar",resolve:vu,construct:Bu,predicate:Fu,represent:Lu,defaultStyle:"lowercase"}),Au=d1.extend({implicit:[u1,f1,p1,y1]}),C1=Au,Eu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Mu=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 $u(e){return e===null?!1:Eu.exec(e)!==null||Mu.exec(e)!==null}p($u,"resolveYamlTimestamp");function Ou(e){var t,r,i,o,s,a,n,l=0,c=null,h,d,f;if(t=Eu.exec(e),t===null&&(t=Mu.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,i,o));if(s=+t[4],a=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],d=+(t[11]||0),c=(h*60+d)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,o,s,a,n,l)),c&&f.setTime(f.getTime()-c),f}p(Ou,"constructYamlTimestamp");function Iu(e){return e.toISOString()}p(Iu,"representYamlTimestamp");var x1=new Gt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:$u,construct:Ou,instanceOf:Date,represent:Iu});function Du(e){return e==="<<"||e===null}p(Du,"resolveYamlMerge");var b1=new Gt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Du}),Jn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
132
|
+
\r`;function Pu(e){if(e===null)return!1;var t,r,i=0,o=e.length,s=Jn;for(r=0;r<o;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Pu,"resolveYamlBinary");function Ru(e){var t,r,i=e.replace(/[\r\n=]/g,""),o=i.length,s=Jn,a=0,n=[];for(t=0;t<o;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|s.indexOf(i.charAt(t));return r=o%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}p(Ru,"constructYamlBinary");function Nu(e){var t="",r=0,i,o,s=e.length,a=Jn;for(i=0;i<s;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return o=s%3,o===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):o===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):o===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}p(Nu,"representYamlBinary");function qu(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(qu,"isBinary");var k1=new Gt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Pu,construct:Ru,predicate:qu,represent:Nu}),T1=Object.prototype.hasOwnProperty,w1=Object.prototype.toString;function zu(e){if(e===null)return!0;var t=[],r,i,o,s,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(o=n[r],a=!1,w1.call(o)!=="[object Object]")return!1;for(s in o)if(T1.call(o,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}p(zu,"resolveYamlOmap");function Wu(e){return e!==null?e:[]}p(Wu,"constructYamlOmap");var S1=new Gt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:zu,construct:Wu}),_1=Object.prototype.toString;function Hu(e){if(e===null)return!0;var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],_1.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;s[t]=[o[0],i[o[0]]]}return!0}p(Hu,"resolveYamlPairs");function Yu(e){if(e===null)return[];var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],o=Object.keys(i),s[t]=[o[0],i[o[0]]];return s}p(Yu,"constructYamlPairs");var v1=new Gt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Hu,construct:Yu}),B1=Object.prototype.hasOwnProperty;function Uu(e){if(e===null)return!0;var t,r=e;for(t in r)if(B1.call(r,t)&&r[t]!==null)return!1;return!0}p(Uu,"resolveYamlSet");function ju(e){return e!==null?e:{}}p(ju,"constructYamlSet");var L1=new Gt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Uu,construct:ju}),Gu=C1.extend({implicit:[x1,b1],explicit:[k1,S1,v1,L1]}),nr=Object.prototype.hasOwnProperty,ps=1,Xu=2,Vu=3,gs=4,Ca=1,F1=2,Yh=3,A1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,E1=/[\x85\u2028\u2029]/,M1=/[,\[\]\{\}]/,Zu=/^(?:!|!!|![a-z\-]+!)$/i,Ku=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Za(e){return Object.prototype.toString.call(e)}p(Za,"_class");function Ce(e){return e===10||e===13}p(Ce,"is_EOL");function sr(e){return e===9||e===32}p(sr,"is_WHITE_SPACE");function Jt(e){return e===9||e===32||e===10||e===13}p(Jt,"is_WS_OR_EOL");function kr(e){return e===44||e===91||e===93||e===123||e===125}p(kr,"is_FLOW_INDICATOR");function Qu(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Qu,"fromHexCode");function Ju(e){return e===120?2:e===117?4:e===85?8:0}p(Ju,"escapedHexLen");function tf(e){return 48<=e&&e<=57?e-48:-1}p(tf,"fromDecimalCode");function Ka(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
133
|
+
`: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":""}p(Ka,"simpleEscapeSequence");function ef(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(ef,"charFromCodepoint");function tl(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(tl,"setProperty");var rf=new Array(256),of=new Array(256);for(gr=0;gr<256;gr++)rf[gr]=Ka(gr)?1:0,of[gr]=Ka(gr);var gr;function sf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Gu,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=[]}p(sf,"State$1");function el(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=o1(r),new oe(t,r)}p(el,"generateError");function J(e,t){throw el(e,t)}p(J,"throwError");function io(e,t){e.onWarning&&e.onWarning.call(null,el(e,t))}p(io,"throwWarning");var Uh={YAML:p(function(t,r,i){var o,s,a;t.version!==null&&J(t,"duplication of %YAML directive"),i.length!==1&&J(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),o===null&&J(t,"ill-formed argument of the YAML directive"),s=parseInt(o[1],10),a=parseInt(o[2],10),s!==1&&J(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&io(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var o,s;i.length!==2&&J(t,"TAG directive accepts exactly two arguments"),o=i[0],s=i[1],Zu.test(o)||J(t,"ill-formed tag handle (first argument) of the TAG directive"),nr.call(t.tagMap,o)&&J(t,'there is a previously declared suffix for "'+o+'" tag handle'),Ku.test(s)||J(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{J(t,"tag prefix is malformed: "+s)}t.tagMap[o]=s},"handleTagDirective")};function We(e,t,r,i){var o,s,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(o=0,s=n.length;o<s;o+=1)a=n.charCodeAt(o),a===9||32<=a&&a<=1114111||J(e,"expected valid JSON character");else A1.test(n)&&J(e,"the stream contains non-printable characters");e.result+=n}}p(We,"captureSegment");function Qa(e,t,r,i){var o,s,a,n;for(Pt.isObject(r)||J(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),a=0,n=o.length;a<n;a+=1)s=o[a],nr.call(t,s)||(tl(t,s,r[s]),i[s]=!0)}p(Qa,"mergeMappings");function Tr(e,t,r,i,o,s,a,n,l){var c,h;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),c=0,h=o.length;c<h;c+=1)Array.isArray(o[c])&&J(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Za(o[c])==="[object Object]"&&(o[c]="[object Object]");if(typeof o=="object"&&Za(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)Qa(e,t,s[c],r);else Qa(e,t,s,r);else!e.json&&!nr.call(r,o)&&nr.call(t,o)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,J(e,"duplicated mapping key")),tl(t,o,s),delete r[o];return t}p(Tr,"storeMappingPair");function Ps(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++):J(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Ps,"readLineBreak");function Et(e,t,r){for(var i=0,o=e.input.charCodeAt(e.position);o!==0;){for(;sr(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(Ce(o))for(Ps(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&io(e,"deficient indentation"),i}p(Et,"skipSeparationSpace");function go(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||Jt(r)))}p(go,"testDocumentSeparator");function Rs(e,t){t===1?e.result+=" ":t>1&&(e.result+=Pt.repeat(`
|
|
134
|
+
`,t-1))}p(Rs,"writeFoldedLines");function af(e,t,r){var i,o,s,a,n,l,c,h,d=e.kind,f=e.result,u;if(u=e.input.charCodeAt(e.position),Jt(u)||kr(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(o=e.input.charCodeAt(e.position+1),Jt(o)||r&&kr(o)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,n=!1;u!==0;){if(u===58){if(o=e.input.charCodeAt(e.position+1),Jt(o)||r&&kr(o))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Jt(i))break}else{if(e.position===e.lineStart&&go(e)||r&&kr(u))break;if(Ce(u))if(l=e.line,c=e.lineStart,h=e.lineIndent,Et(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(We(e,s,a,!1),Rs(e,e.line-l),s=a=e.position,n=!1),sr(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return We(e,s,a,!1),e.result?!0:(e.kind=d,e.result=f,!1)}p(af,"readPlainScalar");function nf(e,t){var r,i,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(We(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,o=e.position;else return!0;else Ce(r)?(We(e,i,o,!0),Rs(e,Et(e,!1,t)),i=o=e.position):e.position===e.lineStart&&go(e)?J(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);J(e,"unexpected end of the stream within a single quoted scalar")}p(nf,"readSingleQuotedScalar");function lf(e,t){var r,i,o,s,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return We(e,r,e.position,!0),e.position++,!0;if(n===92){if(We(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Ce(n))Et(e,!1,t);else if(n<256&&rf[n])e.result+=of[n],e.position++;else if((a=Ju(n))>0){for(o=a,s=0;o>0;o--)n=e.input.charCodeAt(++e.position),(a=Qu(n))>=0?s=(s<<4)+a:J(e,"expected hexadecimal character");e.result+=ef(s),e.position++}else J(e,"unknown escape sequence");r=i=e.position}else Ce(n)?(We(e,r,i,!0),Rs(e,Et(e,!1,t)),r=i=e.position):e.position===e.lineStart&&go(e)?J(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}J(e,"unexpected end of the stream within a double quoted scalar")}p(lf,"readDoubleQuotedScalar");function hf(e,t){var r=!0,i,o,s,a=e.tag,n,l=e.anchor,c,h,d,f,u,g=Object.create(null),m,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,u=!1,n=[];else if(b===123)h=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Et(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=a,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&J(e,"expected the node content, but found ','"):J(e,"missed comma between flow collection entries"),y=m=C=null,d=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Jt(c)&&(d=f=!0,e.position++,Et(e,!0,t))),i=e.line,o=e.lineStart,s=e.position,Lr(e,t,ps,!1,!0),y=e.tag,m=e.result,Et(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),Et(e,!0,t),Lr(e,t,ps,!1,!0),C=e.result),u?Tr(e,n,g,y,m,C,i,o,s):d?n.push(Tr(e,null,g,y,m,C,i,o,s)):n.push(m),Et(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}J(e,"unexpected end of the stream within a flow collection")}p(hf,"readFlowCollection");function cf(e,t){var r,i,o=Ca,s=!1,a=!1,n=t,l=0,c=!1,h,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Ca===o?o=d===43?Yh:F1:J(e,"repeat of a chomping mode identifier");else if((h=tf(d))>=0)h===0?J(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?J(e,"repeat of an indentation width identifier"):(n=t+h-1,a=!0);else break;if(sr(d)){do d=e.input.charCodeAt(++e.position);while(sr(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Ce(d)&&d!==0)}for(;d!==0;){for(Ps(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>n&&(n=e.lineIndent),Ce(d)){l++;continue}if(e.lineIndent<n){o===Yh?e.result+=Pt.repeat(`
|
|
135
|
+
`,s?1+l:l):o===Ca&&s&&(e.result+=`
|
|
136
|
+
`);break}for(i?sr(d)?(c=!0,e.result+=Pt.repeat(`
|
|
137
|
+
`,s?1+l:l)):c?(c=!1,e.result+=Pt.repeat(`
|
|
138
|
+
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Pt.repeat(`
|
|
139
|
+
`,l):e.result+=Pt.repeat(`
|
|
140
|
+
`,s?1+l:l),s=!0,a=!0,l=0,r=e.position;!Ce(d)&&d!==0;)d=e.input.charCodeAt(++e.position);We(e,r,e.position,!1)}return!0}p(cf,"readBlockScalar");function Ja(e,t){var r,i=e.tag,o=e.anchor,s=[],a,n=!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,J(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!Jt(a))));){if(n=!0,e.position++,Et(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Lr(e,t,Vu,!1,!0),s.push(e.result),Et(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)J(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=o,e.kind="sequence",e.result=s,!0):!1}p(Ja,"readBlockSequence");function df(e,t,r){var i,o,s,a,n,l,c=e.tag,h=e.anchor,d={},f=Object.create(null),u=null,g=null,m=null,y=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,J(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Jt(i))b===63?(y&&(Tr(e,d,f,u,g,null,a,n,l),u=g=m=null),C=!0,y=!0,o=!0):y?(y=!1,o=!0):J(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(a=e.line,n=e.lineStart,l=e.position,!Lr(e,r,Xu,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);sr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Jt(b)||J(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Tr(e,d,f,u,g,null,a,n,l),u=g=m=null),C=!0,y=!1,o=!1,u=e.tag,g=e.result;else if(C)J(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(C)J(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(a=e.line,n=e.lineStart,l=e.position),Lr(e,t,gs,!0,o)&&(y?g=e.result:m=e.result),y||(Tr(e,d,f,u,g,m,a,n,l),u=g=m=null),Et(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)J(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Tr(e,d,f,u,g,null,a,n,l),C&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=d),C}p(df,"readBlockMapping");function uf(e){var t,r=!1,i=!1,o,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&J(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,o="!!",a=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):J(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Jt(a);)a===33&&(i?J(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Zu.test(o)||J(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),M1.test(s)&&J(e,"tag suffix cannot contain flow indicator characters")}s&&!Ku.test(s)&&J(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{J(e,"tag name is malformed: "+s)}return r?e.tag=s:nr.call(e.tagMap,o)?e.tag=e.tagMap[o]+s:o==="!"?e.tag="!"+s:o==="!!"?e.tag="tag:yaml.org,2002:"+s:J(e,'undeclared tag handle "'+o+'"'),!0}p(uf,"readTagProperty");function ff(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&J(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Jt(r)&&!kr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(ff,"readAnchorProperty");function pf(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&&!Jt(i)&&!kr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),nr.call(e.anchorMap,r)||J(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Et(e,!0,-1),!0}p(pf,"readAlias");function Lr(e,t,r,i,o){var s,a,n,l=1,c=!1,h=!1,d,f,u,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=n=gs===r||Vu===r,i&&Et(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;uf(e)||ff(e);)Et(e,!0,-1)?(c=!0,n=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||o),(l===1||gs===r)&&(ps===r||Xu===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(Ja(e,y)||df(e,y,m))||hf(e,m)?h=!0:(a&&cf(e,m)||nf(e,m)||lf(e,m)?h=!0:pf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&J(e,"alias node should not have any properties")):af(e,m,ps===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&Ja(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"&&J(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(g=e.implicitTypes[d],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(nr.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,f=u.length;d<f;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){g=u[d];break}g||J(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&J(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):J(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(Lr,"composeNode");function gf(e){var t=e.position,r,i,o,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Et(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Jt(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),o=[],i.length<1&&J(e,"directive name must not be less than one character in length");a!==0;){for(;sr(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Ce(a));break}if(Ce(a))break;for(r=e.position;a!==0&&!Jt(a);)a=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}a!==0&&Ps(e),nr.call(Uh,i)?Uh[i](e,i,o):io(e,'unknown document directive "'+i+'"')}if(Et(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,Et(e,!0,-1)):s&&J(e,"directives end mark is expected"),Lr(e,e.lineIndent-1,gs,!1,!0),Et(e,!0,-1),e.checkLineBreaks&&E1.test(e.input.slice(t,e.position))&&io(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&go(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Et(e,!0,-1));return}if(e.position<e.length-1)J(e,"end of the stream or a document separator is expected");else return}p(gf,"readDocument");function rl(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
141
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new sf(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,J(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;)gf(r);return r.documents}p(rl,"loadDocuments");function $1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=rl(e,r);if(typeof t!="function")return i;for(var o=0,s=i.length;o<s;o+=1)t(i[o])}p($1,"loadAll$1");function mf(e,t){var r=rl(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new oe("expected a single document in the stream, but found more")}}p(mf,"load$1");var O1=mf,I1={load:O1},yf=Object.prototype.toString,Cf=Object.prototype.hasOwnProperty,il=65279,D1=9,oo=10,P1=13,R1=32,N1=33,q1=34,tn=35,z1=37,W1=38,H1=39,Y1=42,xf=44,U1=45,ms=58,j1=61,G1=62,X1=63,V1=64,bf=91,kf=93,Z1=96,Tf=123,K1=124,wf=125,Xt={};Xt[0]="\\0";Xt[7]="\\a";Xt[8]="\\b";Xt[9]="\\t";Xt[10]="\\n";Xt[11]="\\v";Xt[12]="\\f";Xt[13]="\\r";Xt[27]="\\e";Xt[34]='\\"';Xt[92]="\\\\";Xt[133]="\\N";Xt[160]="\\_";Xt[8232]="\\L";Xt[8233]="\\P";var Q1=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],J1=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Sf(e,t){var r,i,o,s,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),o=0,s=i.length;o<s;o+=1)a=i[o],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&Cf.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}p(Sf,"compileStyleMap");function _f(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 oe("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Pt.repeat("0",i-t.length)+t}p(_f,"encodeHex");var t2=1,so=2;function vf(e){this.schema=e.schema||Gu,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Pt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Sf(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==='"'?so:t2,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}p(vf,"State");function en(e,t){for(var r=Pt.repeat(" ",t),i=0,o=-1,s="",a,n=e.length;i<n;)o=e.indexOf(`
|
|
142
|
+
`,i),o===-1?(a=e.slice(i),i=n):(a=e.slice(i,o+1),i=o+1),a.length&&a!==`
|
|
143
|
+
`&&(s+=r),s+=a;return s}p(en,"indentString");function ys(e,t){return`
|
|
144
|
+
`+Pt.repeat(" ",e.indent*t)}p(ys,"generateNextLine");function Bf(e,t){var r,i,o;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}p(Bf,"testImplicitResolving");function ao(e){return e===R1||e===D1}p(ao,"isWhitespace");function mi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==il||65536<=e&&e<=1114111}p(mi,"isPrintable");function rn(e){return mi(e)&&e!==il&&e!==P1&&e!==oo}p(rn,"isNsCharOrWhitespace");function on(e,t,r){var i=rn(e),o=i&&!ao(e);return(r?i:i&&e!==xf&&e!==bf&&e!==kf&&e!==Tf&&e!==wf)&&e!==tn&&!(t===ms&&!o)||rn(t)&&!ao(t)&&e===tn||t===ms&&o}p(on,"isPlainSafe");function Lf(e){return mi(e)&&e!==il&&!ao(e)&&e!==U1&&e!==X1&&e!==ms&&e!==xf&&e!==bf&&e!==kf&&e!==Tf&&e!==wf&&e!==tn&&e!==W1&&e!==Y1&&e!==N1&&e!==K1&&e!==j1&&e!==G1&&e!==H1&&e!==q1&&e!==z1&&e!==V1&&e!==Z1}p(Lf,"isPlainSafeFirst");function Ff(e){return!ao(e)&&e!==ms}p(Ff,"isPlainSafeLast");function jr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(jr,"codePointAt");function ol(e){var t=/^\n* /;return t.test(e)}p(ol,"needIndentIndicator");var Af=1,sn=2,Ef=3,Mf=4,Hr=5;function $f(e,t,r,i,o,s,a,n){var l,c=0,h=null,d=!1,f=!1,u=i!==-1,g=-1,m=Lf(jr(e,0))&&Ff(jr(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=jr(e,l),!mi(c))return Hr;m=m&&on(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=jr(e,l),c===oo)d=!0,u&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!mi(c))return Hr;m=m&&on(c,h,n),h=c}f=f||u&&l-g-1>i&&e[g+1]!==" "}return!d&&!f?m&&!a&&!o(e)?Af:s===so?Hr:sn:r>9&&ol(e)?Hr:a?s===so?Hr:sn:f?Mf:Ef}p($f,"chooseScalarStyle");function Of(e,t,r,i,o){e.dump=(function(){if(t.length===0)return e.quotingType===so?'""':"''";if(!e.noCompatMode&&(Q1.indexOf(t)!==-1||J1.test(t)))return e.quotingType===so?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Bf(e,c)}switch(p(l,"testAmbiguity"),$f(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,o)){case Af:return t;case sn:return"'"+t.replace(/'/g,"''")+"'";case Ef:return"|"+an(t,e.indent)+nn(en(t,s));case Mf:return">"+an(t,e.indent)+nn(en(If(t,a),s));case Hr:return'"'+Df(t)+'"';default:throw new oe("impossible error: invalid scalar style")}})()}p(Of,"writeScalar");function an(e,t){var r=ol(e)?String(t):"",i=e[e.length-1]===`
|
|
145
|
+
`,o=i&&(e[e.length-2]===`
|
|
146
|
+
`||e===`
|
|
147
|
+
`),s=o?"+":i?"":"-";return r+s+`
|
|
148
|
+
`}p(an,"blockHeader");function nn(e){return e[e.length-1]===`
|
|
149
|
+
`?e.slice(0,-1):e}p(nn,"dropEndingNewline");function If(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
|
|
150
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,ln(e.slice(0,c),t)})(),o=e[0]===`
|
|
151
|
+
`||e[0]===" ",s,a;a=r.exec(e);){var n=a[1],l=a[2];s=l[0]===" ",i+=n+(!o&&!s&&l!==""?`
|
|
152
|
+
`:"")+ln(l,t),o=s}return i}p(If,"foldString");function ln(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,o=0,s,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-o>t&&(s=a>o?a:n,l+=`
|
|
153
|
+
`+e.slice(o,s),o=s+1),a=n;return l+=`
|
|
154
|
+
`,e.length-o>t&&a>o?l+=e.slice(o,a)+`
|
|
155
|
+
`+e.slice(a+1):l+=e.slice(o),l.slice(1)}p(ln,"foldLine");function Df(e){for(var t="",r=0,i,o=0;o<e.length;r>=65536?o+=2:o++)r=jr(e,o),i=Xt[r],!i&&mi(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=i||_f(r);return t}p(Df,"escapeString");function Pf(e,t,r){var i="",o=e.tag,s,a,n;for(s=0,a=r.length;s<a;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(Me(e,t,n,!1,!1)||typeof n>"u"&&Me(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=o,e.dump="["+i+"]"}p(Pf,"writeFlowSequence");function hn(e,t,r,i){var o="",s=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(Me(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Me(e,t+1,null,!0,!0,!1,!0))&&((!i||o!=="")&&(o+=ys(e,t)),e.dump&&oo===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}p(hn,"writeBlockSequence");function Rf(e,t,r){var i="",o=e.tag,s=Object.keys(r),a,n,l,c,h;for(a=0,n=s.length;a<n;a+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[a],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Me(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Me(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=o,e.dump="{"+i+"}"}p(Rf,"writeFlowMapping");function Nf(e,t,r,i){var o="",s=e.tag,a=Object.keys(r),n,l,c,h,d,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new oe("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)f="",(!i||o!=="")&&(f+=ys(e,t)),c=a[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Me(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&oo===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=ys(e,t)),Me(e,t+1,h,!0,d)&&(e.dump&&oo===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,o+=f));e.tag=s,e.dump=o||"{}"}p(Nf,"writeBlockMapping");function cn(e,t,r){var i,o,s,a,n,l;for(o=r?e.explicitTypes:e.implicitTypes,s=0,a=o.length;s<a;s+=1)if(n=o[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,yf.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Cf.call(n.represent,l))i=n.represent[l](t,l);else throw new oe("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(cn,"detectType");function Me(e,t,r,i,o,s,a){e.tag=null,e.dump=r,cn(e,r,!1)||cn(e,r,!0);var n=yf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",d,f;if(h&&(d=e.duplicates.indexOf(r),f=d!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(o=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Nf(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(Rf(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?hn(e,t-1,e.dump,o):hn(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(Pf(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Of(e,e.dump,t,s,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new oe("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(Me,"writeNode");function qf(e,t){var r=[],i=[],o,s;for(Cs(e,r,i),o=0,s=i.length;o<s;o+=1)t.duplicates.push(r[i[o]]);t.usedDuplicates=new Array(s)}p(qf,"getDuplicateReferences");function Cs(e,t,r){var i,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)Cs(e[o],t,r);else for(i=Object.keys(e),o=0,s=i.length;o<s;o+=1)Cs(e[i[o]],t,r)}p(Cs,"inspectNode");function e2(e,t){t=t||{};var r=new vf(t);r.noRefs||qf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Me(r,0,i,!0,!0)?r.dump+`
|
|
156
|
+
`:""}p(e2,"dump$1");function r2(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.")}}p(r2,"renamed");var i2=Au,o2=I1.load;var Ei=p((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"),jt={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},jh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Wi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_t(e),t=_t(t);const[r,i]=[e.x,e.y],[o,s]=[t.x,t.y],a=o-r,n=s-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}p(Wi,"calculateDeltaAndAngle");var _t=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),s2=p(e=>({x:p(function(t,r,i){let o=0;const s=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(jt,e.arrowTypeStart)){const{angle:u,deltaX:g}=Wi(i[0],i[1]);o=jt[e.arrowTypeStart]*Math.cos(u)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(jt,e.arrowTypeEnd)){const{angle:u,deltaX:g}=Wi(i[i.length-1],i[i.length-2]);o=jt[e.arrowTypeEnd]*Math.cos(u)*(g>=0?1:-1)}const a=Math.abs(_t(t).x-_t(i[i.length-1]).x),n=Math.abs(_t(t).y-_t(i[i.length-1]).y),l=Math.abs(_t(t).x-_t(i[0]).x),c=Math.abs(_t(t).y-_t(i[0]).y),h=jt[e.arrowTypeStart],d=jt[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=s==="right"?-1:1,o-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=s==="right"?-1:1,o+=u}return _t(t).x+o},"x"),y:p(function(t,r,i){let o=0;const s=_t(i[0]).y<_t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(jt,e.arrowTypeStart)){const{angle:u,deltaY:g}=Wi(i[0],i[1]);o=jt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(jt,e.arrowTypeEnd)){const{angle:u,deltaY:g}=Wi(i[i.length-1],i[i.length-2]);o=jt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(g>=0?1:-1)}const a=Math.abs(_t(t).y-_t(i[i.length-1]).y),n=Math.abs(_t(t).x-_t(i[i.length-1]).x),l=Math.abs(_t(t).y-_t(i[0]).y),c=Math.abs(_t(t).x-_t(i[0]).x),h=jt[e.arrowTypeStart],d=jt[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=s==="up"?-1:1,o-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=s==="up"?-1:1,o+=u}return _t(t).y+o},"y")}),"getLineFunctionsWithOffset"),Eo={},It={},Gh;function a2(){return Gh||(Gh=1,Object.defineProperty(It,"__esModule",{value:!0}),It.BLANK_URL=It.relativeFirstCharacters=It.whitespaceEscapeCharsRegex=It.urlSchemeRegex=It.ctrlCharactersRegex=It.htmlCtrlEntityRegex=It.htmlEntitiesRegex=It.invalidProtocolRegex=void 0,It.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,It.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,It.htmlCtrlEntityRegex=/&(newline|tab);/gi,It.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,It.urlSchemeRegex=/^.+(:|:)/gim,It.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,It.relativeFirstCharacters=[".","/"],It.BLANK_URL="about:blank"),It}var Xh;function n2(){if(Xh)return Eo;Xh=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.sanitizeUrl=s;var e=a2();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function o(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var n,l=o(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=o(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var f=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var u=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return u;if(f==="http:"||f==="https:"){if(!i(u))return e.BLANK_URL;var g=new URL(u);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return u}return Eo}var l2=n2();function xa(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function h2(){}function zf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function sl(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const c2="[object RegExp]",Wf="[object String]",Hf="[object Number]",Yf="[object Boolean]",Uf="[object Arguments]",d2="[object Symbol]",u2="[object Date]",f2="[object Map]",p2="[object Set]",g2="[object Array]",m2="[object ArrayBuffer]",y2="[object Object]",C2="[object DataView]",x2="[object Uint8Array]",b2="[object Uint8ClampedArray]",k2="[object Uint16Array]",T2="[object Uint32Array]",w2="[object Int8Array]",S2="[object Int16Array]",_2="[object Int32Array]",v2="[object Float32Array]",B2="[object Float64Array]",Vh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function al(e){return typeof Vh.Buffer<"u"&&Vh.Buffer.isBuffer(e)}function L2(e){return Number.isSafeInteger(e)&&e>=0}function jf(e){return e!=null&&typeof e!="function"&&L2(e.length)}function F2(e){return e==="__proto__"}function nl(e){return e==null||typeof e!="object"&&typeof e!="function"}function ll(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function A2(e,t){return Gr(e,void 0,e,new Map,t)}function Gr(e,t,r,i=new Map,o=void 0){const s=o?.(e,t,r,i);if(s!==void 0)return s;if(nl(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Gr(e[n],n,r,i,o);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,Gr(l,n,r,i,o));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(Gr(n,void 0,r,i,o));return a}if(al(e))return e.subarray();if(ll(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Gr(e[n],n,r,i,o);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),fe(a,e,r,i,o),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),fe(a,e,r,i,o),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),fe(a,e,r,i,o),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,fe(a,e,r,i,o),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),fe(a,e,r,i,o),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),fe(a,e,r,i,o),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),fe(a,e,r,i,o),a}if(typeof e=="object"&&E2(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),fe(a,e,r,i,o),a}return e}function fe(e,t,r=e,i,o){const s=[...Object.keys(t),...zf(t)];for(let a=0;a<s.length;a++){const n=s[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Gr(t[n],n,r,i,o))}}function E2(e){switch(sl(e)){case Uf:case g2:case m2:case C2:case Yf:case u2:case v2:case B2:case w2:case S2:case _2:case f2:case Hf:case y2:case c2:case p2:case Wf:case d2:case x2:case b2:case k2:case T2:return!0;default:return!1}}function M2(e,t){return A2(e,(r,i,o,s)=>{if(typeof e=="object"){if(sl(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return s.set(e,a),fe(a,e,o,s),a}switch(Object.prototype.toString.call(e)){case Hf:case Wf:case Yf:{const a=new e.constructor(e?.valueOf());return fe(a,e),a}case Uf:{const a={};return fe(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Zh(e){return M2(e)}function dn(e){return e!==null&&typeof e=="object"&&sl(e)==="[object Arguments]"}function un(e){return typeof e=="object"&&e!==null}function $2(e){return un(e)&&jf(e)}function mo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const o=t?t.apply(this,i):i[0],s=r.cache;if(s.has(o))return s.get(o);const a=e.apply(this,i);return r.cache=s.set(o,a)||s,a};return r.cache=new(mo.Cache||Map),r}mo.Cache=Map;function Go(e){return ll(e)}function O2(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function I2(e){if(nl(e))return e;if(Array.isArray(e)||ll(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function D2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let o=e;for(let s=0;s<r.length;s++){const a=r[s];o=Xo(o,a,i,new Map)}return o}function Xo(e,t,r,i){if(nl(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return I2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let s=0;s<t.length;s++)t[s]=t[s]??void 0}const o=[...Object.keys(t),...zf(t)];for(let s=0;s<o.length;s++){const a=o[s];if(F2(a))continue;let n=t[a],l=e[a];if(dn(n)&&(n={...n}),dn(l)&&(l={...l}),al(n)&&(n=Zh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let f=0;f<d.length;f++){const u=d[f];h[u]=l[u]}l=h}else if($2(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||un(l)&&un(n)&&(xa(l)||xa(n)||Go(l)||Go(n))?e[a]=Xo(l,n,r,i):l==null&&xa(n)?e[a]=Xo({},n,r,i):l==null&&Go(n)?e[a]=Zh(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function P2(e,...t){return D2(e,...t,h2)}function Kh(e){if(e==null)return!0;if(jf(e))return typeof e.splice!="function"&&typeof e!="string"&&!al(e)&&!Go(e)&&!dn(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return O2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var R2="",N2={curveBasis:Xa,curveBasisClosed:Hk,curveBasisOpen:Yk,curveBumpX:Nd,curveBumpY:qd,curveBundle:Uk,curveCardinalClosed:jk,curveCardinalOpen:Gk,curveCardinal:Yd,curveCatmullRomClosed:Xk,curveCatmullRomOpen:Vk,curveCatmullRom:jd,curveLinear:Vi,curveLinearClosed:Zk,curveMonotoneX:Qd,curveMonotoneY:Jd,curveNatural:eu,curveStep:ru,curveStepAfter:ou,curveStepBefore:iu},q2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,z2=p(function(e,t){const r=Gf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);Jo(a),i=Dt(i,[...a])}else i=r.args;if(!i)return;let o=$n(e,t);const s="config";return i[s]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),i[o]=i[s],delete i[s]),i},"detectInit"),Gf=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${q2.source})(?=[}][%]{2}).*
|
|
157
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),N.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const o=[];for(;(i=Gi.exec(e))!==null;)if(i.index===Gi.lastIndex&&Gi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:s,args:a})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return N.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),W2=p(function(e){return e.replace(Gi,"")},"removeDirectives"),H2=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function hl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return N2[r]??t}p(hl,"interpolateToCurve");function Xf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?l2.sanitizeUrl(r):r}p(Xf,"formatUrl");var Y2=p((e,...t)=>{const r=e.split("."),i=r.length-1,o=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){N.error(`Function name: ${e} not found in window`);return}s[o](...t)},"runFunc");function cl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(cl,"distance");function Vf(e){let t,r=0;e.forEach(o=>{r+=cl(o,t),t=o});const i=r/2;return dl(e,i)}p(Vf,"traverseEdge");function Zf(e){return e.length===1?e[0]:Vf(e)}p(Zf,"calcLabelPosition");var Qh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),dl=p((e,t)=>{let r,i=t;for(const o of e){if(r){const s=cl(o,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:o.x,y:o.y};if(a>0&&a<1)return{x:Qh((1-a)*r.x+a*o.x,5),y:Qh((1-a)*r.y+a*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),U2=p((e,t,r)=>{N.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const o=dl(t,25),s=e?10:5,a=Math.atan2(t[0].y-o.y,t[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(a)*s+(t[0].x+o.x)/2,n.y=-Math.cos(a)*s+(t[0].y+o.y)/2,n},"calcCardinalityPosition");function Kf(e,t,r){const i=structuredClone(r);N.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const o=25+e,s=dl(i,o),a=10+e*.5,n=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(n+Math.PI)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2),l}p(Kf,"calcTerminalLabelPosition");function Qf(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}}p(Qf,"getStylesFromArray");var Jh=0,j2=p(()=>(Jh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Jh),"generateId");function Jf(e){let t="";const r="0123456789abcdef",i=r.length;for(let o=0;o<e;o++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Jf,"makeRandomHex");var G2=p(e=>Jf(e.length),"random"),X2=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),V2=p(function(e,t){const r=t.text.replace(uo.lineBreakRegex," "),[,i]=Ns(t.fontSize),o=e.append("text");o.attr("x",t.x),o.attr("y",t.y),o.style("text-anchor",t.anchor),o.style("font-family",t.fontFamily),o.style("font-size",i),o.style("font-weight",t.fontWeight),o.attr("fill",t.fill),t.class!==void 0&&o.attr("class",t.class);const s=o.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),o},"drawSimpleText"),Z2=mo((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),uo.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),o=[];let s="";return i.forEach((a,n)=>{const l=Ye(`${a} `,r),c=Ye(s,r);if(l>t){const{hyphenatedStrings:f,remainingWord:u}=K2(a,t,"-",r);o.push(s,...f),s=u}else c+l>=t?(o.push(s),s=a):s=[s,a].filter(Boolean).join(" ");n+1===i.length&&o.push(s)}),o.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),K2=mo((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...e],s=[];let a="";return o.forEach((n,l)=>{const c=`${a}${n}`;if(Ye(c,i)>=t){const d=l+1,f=o.length===d,u=`${c}${r}`;s.push(f?c:u),a=""}else a=c}),{hyphenatedStrings:s,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function tp(e,t){return ul(e,t).height}p(tp,"calculateTextHeight");function Ye(e,t){return ul(e,t).width}p(Ye,"calculateTextWidth");var ul=mo((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=t;if(!e)return{width:0,height:0};const[,s]=Ns(r),a=["sans-serif",i],n=e.split(uo.lineBreakRegex),l=[],c=nt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of a){let u=0;const g={width:0,height:0,lineHeight:0};for(const m of n){const y=X2();y.text=m||R2;const C=V2(h,y).style("font-size",s).style("font-weight",o).style("font-family",f),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),u=Math.round(b.height),g.height+=u,g.lineHeight=Math.round(Math.max(g.lineHeight,u))}l.push(g)}h.remove();const d=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[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ci,Q2=(ci=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(ci,"InitIDGenerator"),ci),Mo,J2=p(function(e){return Mo=Mo||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Mo.innerHTML=e,unescape(Mo.textContent)},"entityDecode");function fl(e){return"str"in e}p(fl,"isDetailedError");var tT=p((e,t,r,i)=>{if(!i)return;const o=e.node()?.getBBox();o&&e.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ns=p(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 pl(e,t){return P2({},e,t)}p(pl,"cleanAndMerge");var ye={assignWithDepth:Dt,wrapLabel:Z2,calculateTextHeight:tp,calculateTextWidth:Ye,calculateTextDimensions:ul,cleanAndMerge:pl,detectInit:z2,detectDirective:Gf,isSubstringInArray:H2,interpolateToCurve:hl,calcLabelPosition:Zf,calcCardinalityPosition:U2,calcTerminalLabelPosition:Kf,formatUrl:Xf,getStylesFromArray:Qf,generateId:j2,random:G2,runFunc:Y2,entityDecode:J2,insertTitle:tT,isLabelCoordinateInPath:ep,parseFontSize:Ns,InitIDGenerator:Q2},eT=p(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"),Fr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),kL=p((e,t,{counter:r=0,prefix:i,suffix:o},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${o?`_${o}`:""}`,"getEdgeId");function Nt(e){return e??null}p(Nt,"handleUndefinedAttr");function ep(e,t){const r=Math.round(e.x),i=Math.round(e.y),o=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return o.includes(r.toString())||o.includes(i.toString())}p(ep,"isLabelCoordinateInPath");var gl=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function rp(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(o=>new Promise(s=>{function a(){if(o.style.display="flex",o.style.flexDirection="column",i){const n=Ct().fontSize?Ct().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=Kc.fontSize]=Ns(n),h=c*l+"px";o.style.minWidth=h,o.style.maxWidth=h}else o.style.width="100%";s(o)}p(a,"setupImage"),setTimeout(()=>{o.complete&&a()}),o.addEventListener("error",a),o.addEventListener("load",a)})))}p(rp,"configureLabelImages");var rT=p(e=>{const{handDrawnSeed:t}=Ct();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),xi=p(e=>{const t=iT([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),iT=p(e=>{const t=new Map;return e.forEach(r=>{const[i,o]=r.split(":");t.set(i.trim(),o?.trim())}),t},"styles2Map"),ip=p(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"),Z=p(e=>{const{stylesArray:t}=xi(e),r=[],i=[],o=[],s=[];return t.forEach(a=>{const n=a[0];ip(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&o.push(a.join(":")+" !important"),n==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:o,backgroundStyles:s}},"styles2String"),V=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=Ct(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:a}=xi(e);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||o,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:oT(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),oT=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const o=isNaN(t[0])?0:t[0];return[o,o]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const sT=Object.freeze({left:0,top:0,width:16,height:16}),xs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),op=Object.freeze({...sT,...xs}),aT=Object.freeze({...op,body:"",hidden:!1}),nT=Object.freeze({width:null,height:null}),lT=Object.freeze({...nT,...xs}),hT=(e,t,r,i="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const n=o.pop(),l=o.pop(),c={provider:o.length>0?o[0]:i,prefix:l,name:n};return ba(c)?c:null}const s=o[0],a=s.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return ba(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return ba(n,r)?n:null}return null},ba=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function cT(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 tc(e,t){const r=cT(e,t);for(const i in aT)i in xs?i in e&&!(i in r)&&(r[i]=xs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function dT(e,t){const r=e.icons,i=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(r[a])return o[a]=[];if(!(a in o)){o[a]=null;const n=i[a]&&i[a].parent,l=n&&s(n);l&&(o[a]=[n].concat(l))}return o[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),o}function ec(e,t,r){const i=e.icons,o=e.aliases||Object.create(null);let s={};function a(n){s=tc(i[n]||o[n],s)}return a(t),r.forEach(a),tc(e,s)}function uT(e,t){if(e.icons[t])return ec(e,t,[]);const r=dT(e,[t])[t];return r?ec(e,t,r):null}const fT=/(-?[0-9.]*[0-9]+[0-9.]*)/g,pT=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function rc(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(fT);if(i===null||!i.length)return e;const o=[];let s=i.shift(),a=pT.test(s);for(;;){if(a){const n=parseFloat(s);isNaN(n)?o.push(s):o.push(Math.ceil(n*t*r)/r)}else o.push(s);if(s=i.shift(),s===void 0)return o.join("");a=!a}}function gT(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const o=e.indexOf(">",i),s=e.indexOf("</"+t);if(o===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;r+=e.slice(o+1,s).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function mT(e,t){return e?"<defs>"+e+"</defs>"+t:t}function yT(e,t,r){const i=gT(e);return mT(i.defs,t+i.content+r)}const CT=e=>e==="unset"||e==="undefined"||e==="none";function xT(e,t){const r={...op,...e},i={...lT,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(m=>{const y=[],C=m.hFlip,b=m.vFlip;let k=m.rotate;C?b?k+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):b&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=o.height/2+o.top,y.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:w=o.width/2+o.left,y.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(o.left!==o.top&&(w=o.left,o.left=o.top,o.top=w),o.width!==o.height&&(w=o.width,o.width=o.height,o.height=w)),y.length&&(s=yT(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=o.width,c=o.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=rc(d,l/c)):(h=a==="auto"?l:a,d=n===null?rc(h,c/l):n==="auto"?c:n);const f={},u=(m,y)=>{CT(y)||(f[m]=y.toString())};u("width",h),u("height",d);const g=[o.left,o.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:s}}const bT=/\sid="(\S+)"/g,ic=new Map;function kT(e){e=e.replace(/[0-9]+$/,"")||"a";const t=ic.get(e)||0;return ic.set(e,t+1),t?`${e}${t}`:e}function TT(e){const t=[];let r;for(;r=bT.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const s=kT(o),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function wT(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 ml(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=ml();function sp(e){Mr=e}var Zi={exec:()=>null};function xt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(o,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(te.caret,"$1"),r=r.replace(o,a),i},getRegex:()=>new RegExp(r,t)};return i}var ST=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),te={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")},_T=/^(?:[ \t]*(?:\n|$))+/,vT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,BT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,LT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,yl=/(?:[*+-]|\d{1,9}[.)])/,ap=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,np=xt(ap).replace(/bull/g,yl).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(),FT=xt(ap).replace(/bull/g,yl).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(),Cl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,AT=/^[^\n]+/,xl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ET=xt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",xl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),MT=xt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,yl).getRegex(),qs="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",bl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$T=xt("^ {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",bl).replace("tag",qs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lp=xt(Cl).replace("hr",yo).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",qs).getRegex(),OT=xt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lp).getRegex(),kl={blockquote:OT,code:vT,def:ET,fences:BT,heading:LT,hr:yo,html:$T,lheading:np,list:MT,newline:_T,paragraph:lp,table:Zi,text:AT},oc=xt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yo).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",qs).getRegex(),IT={...kl,lheading:FT,table:oc,paragraph:xt(Cl).replace("hr",yo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",oc).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",qs).getRegex()},DT={...kl,html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bl).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:Zi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(Cl).replace("hr",yo).replace("heading",` *#{1,6} *[^
|
|
158
|
+
]`).replace("lheading",np).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},PT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,RT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hp=/^( {2,}|\\)\n(?!\s*$)/,NT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,zs=/[\p{P}\p{S}]/u,Tl=/[\s\p{P}\p{S}]/u,cp=/[^\s\p{P}\p{S}]/u,qT=xt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Tl).getRegex(),dp=/(?!~)[\p{P}\p{S}]/u,zT=/(?!~)[\s\p{P}\p{S}]/u,WT=/(?:[^\s\p{P}\p{S}]|~)/u,HT=xt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ST?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),up=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,YT=xt(up,"u").replace(/punct/g,zs).getRegex(),UT=xt(up,"u").replace(/punct/g,dp).getRegex(),fp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",jT=xt(fp,"gu").replace(/notPunctSpace/g,cp).replace(/punctSpace/g,Tl).replace(/punct/g,zs).getRegex(),GT=xt(fp,"gu").replace(/notPunctSpace/g,WT).replace(/punctSpace/g,zT).replace(/punct/g,dp).getRegex(),XT=xt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,cp).replace(/punctSpace/g,Tl).replace(/punct/g,zs).getRegex(),VT=xt(/\\(punct)/,"gu").replace(/punct/g,zs).getRegex(),ZT=xt(/^<(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(),KT=xt(bl).replace("(?:-->|$)","-->").getRegex(),QT=xt("^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",KT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,JT=xt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",bs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pp=xt(/^!?\[(label)\]\[(ref)\]/).replace("label",bs).replace("ref",xl).getRegex(),gp=xt(/^!?\[(ref)\](?:\[\])?/).replace("ref",xl).getRegex(),tw=xt("reflink|nolink(?!\\()","g").replace("reflink",pp).replace("nolink",gp).getRegex(),sc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,wl={_backpedal:Zi,anyPunctuation:VT,autolink:ZT,blockSkip:HT,br:hp,code:RT,del:Zi,emStrongLDelim:YT,emStrongRDelimAst:jT,emStrongRDelimUnd:XT,escape:PT,link:JT,nolink:gp,punctuation:qT,reflink:pp,reflinkSearch:tw,tag:QT,text:NT,url:Zi},ew={...wl,link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",bs).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bs).getRegex()},fn={...wl,emStrongRDelimAst:GT,emStrongLDelim:UT,url:xt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",sc).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:xt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",sc).getRegex()},rw={...fn,br:xt(hp).replace("{2,}","*").getRegex(),text:xt(fn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},$o={normal:kl,gfm:IT,pedantic:DT},Mi={normal:wl,gfm:fn,breaks:rw,pedantic:ew},iw={"&":"&","<":"<",">":">",'"':""","'":"'"},ac=e=>iw[e];function Be(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,ac)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,ac);return e}function nc(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function lc(e,t){let r=e.replace(te.findPipe,(s,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(te.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(te.slashPipe,"|");return i}function $i(e,t,r){let i=e.length;if(i===0)return"";let o=0;for(;o<i&&e.charAt(i-o-1)===t;)o++;return e.slice(0,i-o)}function ow(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 hc(e,t,r,i,o){let s=t.href,a=t.title||null,n=e[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function sw(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let o=i[1];return t.split(`
|
|
159
|
+
`).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[n]=a;return n.length>=o.length?s.slice(o.length):s}).join(`
|
|
160
|
+
`)}var ks=class{options;rules;lexer;constructor(t){this.options=t||Mr}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:$i(i,`
|
|
161
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],o=sw(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:o}}}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 o=$i(i,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(i=o.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:$i(r[0],`
|
|
162
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=$i(r[0],`
|
|
163
|
+
`).split(`
|
|
164
|
+
`),o="",s="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
165
|
+
`),d=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
166
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
|
|
167
|
+
${h}`:h,s=s?`${s}
|
|
168
|
+
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,i.length===0)break;let u=a.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let g=u,m=g.raw+`
|
|
169
|
+
`+i.join(`
|
|
170
|
+
`),y=this.blockquote(m);a[a.length-1]=y,o=o.substring(0,o.length-g.raw.length)+y.raw,s=s.substring(0,s.length-g.text.length)+y.text;break}else if(u?.type==="list"){let g=u,m=g.raw+`
|
|
171
|
+
`+i.join(`
|
|
172
|
+
`),y=this.list(m);a[a.length-1]=y,o=o.substring(0,o.length-u.raw.length)+y.raw,s=s.substring(0,s.length-g.raw.length)+y.raw,i=m.substring(a.at(-1).raw.length).split(`
|
|
173
|
+
`);continue}}return{type:"blockquote",raw:o,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),o=i.length>1,s={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
|
|
174
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
|
|
175
|
+
`,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(u)&&(h+=u+`
|
|
176
|
+
`,t=t.substring(u.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),w=this.rules.other.fencesBeginRegex(m),S=this.rules.other.headingBeginRegex(m),_=this.rules.other.htmlBeginRegex(m);for(;t;){let E=t.split(`
|
|
177
|
+
`,1)[0],B;if(u=E,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),B=u):B=u.replace(this.rules.other.tabCharGlobal," "),w.test(u)||S.test(u)||_.test(u)||b.test(u)||k.test(u))break;if(B.search(this.rules.other.nonSpaceChar)>=m||!u.trim())d+=`
|
|
178
|
+
`+B.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||S.test(f)||k.test(f))break;d+=`
|
|
179
|
+
`+u}!g&&!u.trim()&&(g=!0),h+=E+`
|
|
180
|
+
`,t=t.substring(E.length+1),f=B.slice(m)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(C=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:h,task:!!y,checked:C,loose:!1,text:d,tokens:[]}),s.raw+=h}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 c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(f=>f.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].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," "),o=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:o,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=lc(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
181
|
+
`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===o.length){for(let n of o)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of s)a.rows.push(lc(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}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)===`
|
|
182
|
+
`?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 a=$i(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=ow(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(o);a&&(o=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?o=o.slice(1):o=o.slice(1,-1)),hc(r,{href:o&&o.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 o=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return hc(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...o[0]].length-1,a,n,l=s,c=0,h=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(o=h.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(n=[...a].length,o[3]||o[4]){l+=n;continue}else if((o[5]||o[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...o[0]][0].length,f=t.slice(0,s+o.index+d+n);if(Math.min(s,n)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let u=f.slice(2,-2);return{type:"strong",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return o&&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,o;return r[2]==="@"?(i=r[1],o="mailto:"+i):(i=r[1],o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=r[0],o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}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}}}},pe=class pn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Mr,this.options.tokenizer=this.options.tokenizer||new ks,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:te,block:$o.normal,inline:Mi.normal};this.options.pedantic?(r.block=$o.pedantic,r.inline=Mi.pedantic):this.options.gfm&&(r.block=$o.gfm,this.options.breaks?r.inline=Mi.breaks:r.inline=Mi.gfm),this.tokenizer.rules=r}static get rules(){return{block:$o,inline:Mi}}static lex(t,r){return new pn(r).lex(t)}static lexInline(t,r){return new pn(r).inlineTokens(t)}lex(t){t=t.replace(te.carriageReturn,`
|
|
183
|
+
`),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){for(this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));t;){let o;if(this.options.extensions?.block?.some(a=>(o=a.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 a=r.at(-1);o.raw.length===1&&a!==void 0?a.raw+=`
|
|
184
|
+
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
185
|
+
`)?"":`
|
|
186
|
+
`)+o.raw,a.text+=`
|
|
187
|
+
`+o.text,this.inlineQueue.at(-1).src=a.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 a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
188
|
+
`)?"":`
|
|
189
|
+
`)+o.raw,a.text+=`
|
|
190
|
+
`+o.raw,this.inlineQueue.at(-1).src=a.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 s=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
191
|
+
`)?"":`
|
|
192
|
+
`)+o.raw,a.text+=`
|
|
193
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o),i=s.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
194
|
+
`)?"":`
|
|
195
|
+
`)+o.raw,a.text+=`
|
|
196
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,o=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=o[2]?o[2].length:0,i=i.slice(0,o.index+s)+"["+"a".repeat(o[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(u=>{f=u.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);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 r}},Ts=class{options;parser;constructor(t){this.options=t||Mr}space(t){return""}code({text:t,lang:r,escaped:i}){let o=(r||"").match(te.notSpaceStart)?.[0],s=t.replace(te.endingNewline,"")+`
|
|
197
|
+
`;return o?'<pre><code class="language-'+Be(o)+'">'+(i?s:Be(s,!0))+`</code></pre>
|
|
198
|
+
`:"<pre><code>"+(i?s:Be(s,!0))+`</code></pre>
|
|
199
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
200
|
+
${this.parser.parse(t)}</blockquote>
|
|
201
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
202
|
+
`}hr(t){return`<hr>
|
|
203
|
+
`}list(t){let r=t.ordered,i=t.start,o="";for(let n=0;n<t.items.length;n++){let l=t.items[n];o+=this.listitem(l)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
|
|
204
|
+
`+o+"</"+s+`>
|
|
205
|
+
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+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=i+" "+Be(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
206
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
207
|
+
`}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 o="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);o+=this.tablerow({text:i})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
|
|
208
|
+
<thead>
|
|
209
|
+
`+r+`</thead>
|
|
210
|
+
`+o+`</table>
|
|
211
|
+
`}tablerow({text:t}){return`<tr>
|
|
212
|
+
${t}</tr>
|
|
213
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
214
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Be(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let o=this.parser.parseInline(i),s=nc(t);if(s===null)return o;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+Be(r)+'"'),a+=">"+o+"</a>",a}image({href:t,title:r,text:i,tokens:o}){o&&(i=this.parser.parseInline(o,this.parser.textRenderer));let s=nc(t);if(s===null)return Be(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Be(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Be(t.text)}},Sl=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""}},ge=class gn{options;renderer;textRenderer;constructor(t){this.options=t||Mr,this.options.renderer=this.options.renderer||new Ts,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Sl}static parse(t,r){return new gn(r).parse(t)}static parseInline(t,r){return new gn(r).parseInline(t)}parse(t,r=!0){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=s,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=s;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;o+1<t.length&&t[o+1].type==="text";)n=t[++o],l+=`
|
|
215
|
+
`+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=n||"";continue}}let a=s;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},Hi=class{options;block;constructor(t){this.options=t||Mr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?pe.lex:pe.lexInline}provideParser(){return this.block?ge.parse:ge.parseInline}},aw=class{defaults=ml();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ge;Renderer=Ts;TextRenderer=Sl;Lexer=pe;Tokenizer=ks;Hooks=Hi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let a of s.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of s.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let n=s[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let o={...i};if(o.async=this.defaults.async||o.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),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 a=r[s.level];a?a.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)}),o.extensions=r),i.renderer){let s=this.defaults.renderer||new Ts(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d||""}}o.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new ks(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}o.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new Hi;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=s[n];Hi.passThroughHooks.has(a)?s[n]=h=>{if(this.defaults.async&&Hi.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(s,h);return c.call(s,f)})();let d=l.call(s,h);return c.call(s,d)}:s[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(s,h);return f===!1&&(f=await c.apply(s,h)),f})();let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}o.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,a=i.walkTokens;o.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),s&&(l=l.concat(s.call(this,n))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return pe.lex(t,r??this.defaults)}parser(t,r){return ge.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let o={...i},s={...this.defaults,...o},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&o.async===!1)return a(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 a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(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 n=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?pe.lex:pe.lexInline)(n,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?ge.parse:ge.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?pe.lex:pe.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?ge.parse:ge.parseInline)(n,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
216
|
+
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Be(i.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(i);throw i}}},Ar=new aw;function kt(e,t){return Ar.parse(e,t)}kt.options=kt.setOptions=function(e){return Ar.setOptions(e),kt.defaults=Ar.defaults,sp(kt.defaults),kt};kt.getDefaults=ml;kt.defaults=Mr;kt.use=function(...e){return Ar.use(...e),kt.defaults=Ar.defaults,sp(kt.defaults),kt};kt.walkTokens=function(e,t){return Ar.walkTokens(e,t)};kt.parseInline=Ar.parseInline;kt.Parser=ge;kt.parser=ge.parse;kt.Renderer=Ts;kt.TextRenderer=Sl;kt.Lexer=pe;kt.lexer=pe.lex;kt.Tokenizer=ks;kt.Hooks=Hi;kt.parse=kt;kt.options;kt.setOptions;kt.use;kt.walkTokens;kt.parseInline;ge.parse;pe.lex;function mp(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 o=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,f;return(f=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):n},[]);if(o.length){var s=new RegExp(`
|
|
217
|
+
[ ]{`.concat(Math.min.apply(Math,o),"}"),"g");i=i.map(function(n){return n.replace(s,`
|
|
218
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
|
|
219
|
+
`)&&(d=String(n).split(`
|
|
220
|
+
`).map(function(f,u){return u===0?f:"".concat(h).concat(f)}).join(`
|
|
221
|
+
`)),a+=d+i[l+1]}),a}var nw={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},mn=new Map,yp=new Map,lw=p(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(N.debug("Registering icon pack:",t.name),"loader"in t)yp.set(t.name,t.loader);else if("icons"in t)mn.set(t.name,t.icons);else throw N.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Cp=p(async(e,t)=>{const r=hT(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 o=mn.get(i);if(!o){const a=yp.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await a(),prefix:i},mn.set(i,o)}catch(n){throw N.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=uT(o,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),hw=p(async e=>{try{return await Cp(e),!0}catch{return!1}},"isIconAvailable"),Co=p(async(e,t,r)=>{let i;try{i=await Cp(e,t?.fallbackPrefix)}catch(a){N.error(a),i=nw}const o=xT(i,t),s=wT(TT(o.body),{...o.attributes,...r});return be(s,Bt())},"getIconSVG");function xp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
222
|
+
`).replace(/\n{2,}/g,`
|
|
223
|
+
`);return mp(i)}p(xp,"preprocessMarkdown");function bp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}p(bp,"nonMarkdownToLines");function kp(e,t={}){const r=xp(e,t),i=kt.lexer(r),o=[[]];let s=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
|
|
224
|
+
`).forEach((h,d)=>{d!==0&&(s++,o.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&o[s].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&o[s].push({content:n.text,type:"normal"})}return p(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?o[s].push({content:n.text,type:"normal"}):o[s].push({content:n.raw,type:"normal"})}),o}p(kp,"markdownToLines");function Tp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Tp,"nonMarkdownToHTML");function wp(e,{markdownAutoWrap:t}={}){const r=kt.lexer(e);function i(o){return o.type==="text"?t===!1?o.text.replace(/\n */g,"<br/>").replace(/ /g," "):o.text.replace(/\n */g,"<br/>"):o.type==="strong"?`<strong>${o.tokens?.map(i).join("")}</strong>`:o.type==="em"?`<em>${o.tokens?.map(i).join("")}</em>`:o.type==="paragraph"?`<p>${o.tokens?.map(i).join("")}</p>`:o.type==="space"?"":o.type==="html"?`${o.text}`:o.type==="escape"?o.text:(N.warn(`Unsupported markdown: ${o.type}`),o.raw)}return p(i,"output"),r.map(i).join("")}p(wp,"markdownToHTML");function Sp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Sp,"splitTextToChars");function _p(e,t){const r=Sp(t.content);return _l(e,[],r,t.type)}p(_p,"splitWordToFitWidth");function _l(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[o,...s]=r,a=[...t,o];return e([{content:a.join(""),type:i}])?_l(e,a,s,i):(t.length===0&&o&&(t.push(o),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(_l,"splitWordToFitWidthRecursion");function vp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
225
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ws(e,t)}p(vp,"splitLineToFitWidth");function ws(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let o="";e[0].content===" "&&(o=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(o!==""&&a.push({content:o,type:"normal"}),a.push(s),t(a))return ws(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=_p(t,s);r.push([n]),l.content&&e.unshift(l)}return ws(e,t,r)}p(ws,"splitLineToFitWidthRecursion");function yn(e,t){t&&e.attr("style",t)}p(yn,"applyStyle");var cc=16384;async function Bp(e,t,r,i,o=!1,s=Bt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,cc)}px`),a.attr("height",`${Math.min(10*r,cc)}px`);const n=a.append("xhtml:div"),l=Qi(t.label)?await nd(t.label.replace(uo.lineBreakRegex,`
|
|
226
|
+
`),s):be(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),yn(h,t.labelStyle),h.attr("class",`${c} ${i}`),yn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),a.node()}p(Bp,"addHtmlSpan");function Ws(e,t,r,i=!1){const o=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}p(Ws,"createTspan");function Lp(e,t,r){const i=e.append("text"),o=Ws(i,1,t);Hs(o,r);const s=o.node().getComputedTextLength();return i.remove(),s}p(Lp,"computeWidthOfText");function cw(e,t,r){const i=e.append("text"),o=Ws(i,1,t);Hs(o,[{content:r,type:"normal"}]);const s=o.node()?.getBoundingClientRect();return s&&i.remove(),s}p(cw,"computeDimensionOfText");function Fp(e,t,r,i=!1,o=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=p(u=>Lp(a,1.1,u)<=e,"checkWidth"),f=d(h)?[h]:vp(h,d);for(const u of f){const g=Ws(l,c,1.1,o);Hs(g,u),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}p(Fp,"createFormattedText");function Cn(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}})}p(Cn,"decodeHTMLEntities");function Hs(e,t){e.text(""),t.forEach((r,i)=>{const o=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?o.text(Cn(r.content)):o.text(" "+Cn(r.content))})}p(Hs,"updateTextContentAndStyles");async function Ap(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,s,a)=>(r.push((async()=>{const n=`${s}:${a}`;return await hw(n)?await Co(n,void 0,{class:"label-icon"}):`<i class='${be(o,t).replace(":"," ")}'></i>`})()),o));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Ap,"replaceIconSubstring");var Ge=p(async(e,t="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:s=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(N.debug("XYZ createText",t,r,i,o,s,n,"addSvgBackground: ",c),s){const d=a?wp(t,h):Tp(t),f=await Ap(Fr(d),h),u=t.replace(/\\\\/g,"\\"),g={isNode:n,label:Qi(t)?u:f,labelStyle:r.replace("fill:","color:")};return await Bp(e,g,l,o,c,h)}else{const d=Fr(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?kp(d.replace("<br>","<br/>"),h):bp(d),u=Fp(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");nt(u).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");nt(u).select("rect").attr("style",g.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");nt(u).select("text").attr("style",m)}return i?nt(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):nt(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function ka(e,t,r){if(e&&e.length){const[i,o]=t,s=Math.PI/180*r,a=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-o)*n+i,l[1]=(c-i)*n+(h-o)*a+o}}}function dw(e,t){return e[0]===t[0]&&e[1]===t[1]}function uw(e,t,r,i=1){const o=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(o)for(const c of a)ka(c,n,o);const l=(function(c,h,d){const f=[];for(const b of c){const k=[...b];dw(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const u=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let k=0;k<b.length-1;k++){const w=b[k],S=b[k+1];if(w[1]!==S[1]){const _=Math.min(w[1],S[1]);g.push({ymin:_,ymax:Math.max(w[1],S[1]),x:_===w[1]?w[0]:S[0],islope:(S[0]-w[0])/(S[1]-w[1])})}}if(g.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))),!g.length)return u;let m=[],y=g[0].ymin,C=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>y);k++)b=k;g.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||C%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const w=m[b].edge,S=m[k].edge;u.push([[Math.round(w.x),y],[Math.round(S.x),y]])}y+=d,m.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),C++}return u})(a,s,i);if(o){for(const c of a)ka(c,n,-o);(function(c,h,d){const f=[];c.forEach((u=>f.push(...u))),ka(f,h,d)})(l,n,-o)}return l}function xo(e,t){var r;const i=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.round(Math.max(o,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=o),uw(e,o,i,s||1)}let vl=class{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=xo(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const o of t)i.push(...this.helper.doubleLineOps(o[0][0],o[0][1],o[1][0],o[1][1],r));return i}};function Ys(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 fw extends vl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const o=xo(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of o)Ys([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class pw extends vl{fillPolygons(t,r){const i=this._fillPolygons(t,r),o=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,o);return i.ops=i.ops.concat(s.ops),i}}class gw{constructor(t){this.helper=t}fillPolygons(t,r){const i=xo(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let o=r.hachureGap;o<0&&(o=4*r.strokeWidth),o=Math.max(o,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const a=o/4;for(const n of t){const l=Ys(n),c=l/o,h=Math.ceil(c)-1,d=l-h*o,f=(n[0][0]+n[1][0])/2-o/4,u=Math.min(n[0][1],n[1][1]);for(let g=0;g<h;g++){const m=u+d+g*o,y=f-a+2*Math.random()*a,C=m-a+2*Math.random()*a,b=this.helper.ellipse(y,C,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class mw{constructor(t){this.helper=t}fillPolygons(t,r){const i=xo(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,o=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((a=>{const n=Ys(a),l=Math.floor(n/(i+o)),c=(n+o-l*(i+o))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const f=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let u=0;u<l;u++){const g=u*(i+o),m=g+i,y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],C=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),s}}class yw{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,o=r.zigzagOffset<0?i:r.zigzagOffset,s=xo(t,r=Object.assign({},r,{hachureGap:i+o}));return{type:"fillSketch",ops:this.zigzagLines(s,o,r)}}zigzagLines(t,r,i){const o=[];return t.forEach((s=>{const a=Ys(s),n=Math.round(a/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const f=2*d*r,u=2*(d+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],C=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];o.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),o}}const re={};class Cw{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const xw=0,Ta=1,dc=2,Oo={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 wa(e,t){return e.type===t}function Bl(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:xw,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Ta,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:dc,text:""},n})(e);let i="BOD",o=0,s=r[o];for(;!wa(s,dc);){let a=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Bl("M0,0"+e);o++,a=Oo[s.text],i=s.text}else wa(s,Ta)?a=Oo[i]:(o++,a=Oo[s.text],i=s.text);if(!(o+a<r.length))throw new Error("Path data ended short");for(let l=o;l<o+a;l++){const c=r[l];if(!wa(c,Ta))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Oo[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),o+=a,s=r[o],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Ep(e){let t=0,r=0,i=0,o=0;const s=[];for(const{key:a,data:n}of e)switch(a){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,o]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,o=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=o}return s}function Mp(e){const t=[];let r="",i=0,o=0,s=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,o]=h,[s,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],o=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,o]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,o]});break;case"V":o=h[0],t.push({key:"L",data:[i,o]});break;case"S":{let d=0,f=0;r==="C"||r==="S"?(d=i+(i-n),f=o+(o-l)):(d=i,f=o),t.push({key:"C",data:[d,f,...h]}),n=h[0],l=h[1],i=h[2],o=h[3];break}case"T":{const[d,f]=h;let u=0,g=0;r==="Q"||r==="T"?(u=i+(i-n),g=o+(o-l)):(u=i,g=o);const m=i+2*(u-i)/3,y=o+2*(g-o)/3,C=d+2*(u-d)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,C,b,d,f]}),n=u,l=g,i=d,o=f;break}case"Q":{const[d,f,u,g]=h,m=i+2*(d-i)/3,y=o+2*(f-o)/3,C=u+2*(d-u)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,C,b,u,g]}),n=d,l=f,i=u,o=g;break}case"A":{const d=Math.abs(h[0]),f=Math.abs(h[1]),u=h[2],g=h[3],m=h[4],y=h[5],C=h[6];d===0||f===0?(t.push({key:"C",data:[i,o,y,C,y,C]}),i=y,o=C):(i!==y||o!==C)&&($p(i,o,y,C,d,f,u,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,o=C);break}case"Z":t.push({key:"Z",data:[]}),i=s,o=a}r=c}return t}function Oi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function $p(e,t,r,i,o,s,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let f=[],u=0,g=0,m=0,y=0;if(c)[u,g,m,y]=c;else{[e,t]=Oi(e,t,-h),[r,i]=Oi(r,i,-h);const z=(e-r)/2,D=(t-i)/2;let A=z*z/(o*o)+D*D/(s*s);A>1&&(A=Math.sqrt(A),o*=A,s*=A);const L=o*o,O=s*s,P=L*O-L*D*D-O*z*z,H=L*D*D+O*z*z,U=(n===l?-1:1)*Math.sqrt(Math.abs(P/H));m=U*o*D/s+(e+r)/2,y=U*-s*z/o+(t+i)/2,u=Math.asin(parseFloat(((t-y)/s).toFixed(9))),g=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<m&&(u=Math.PI-u),r<m&&(g=Math.PI-g),u<0&&(u=2*Math.PI+u),g<0&&(g=2*Math.PI+g),l&&u>g&&(u-=2*Math.PI),!l&&g>u&&(g-=2*Math.PI)}let C=g-u;if(Math.abs(C)>120*Math.PI/180){const z=g,D=r,A=i;g=l&&g>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,f=$p(r=m+o*Math.cos(g),i=y+s*Math.sin(g),D,A,o,s,a,0,l,[g,z,m,y])}C=g-u;const b=Math.cos(u),k=Math.sin(u),w=Math.cos(g),S=Math.sin(g),_=Math.tan(C/4),E=4/3*o*_,B=4/3*s*_,q=[e,t],I=[e+E*k,t-B*b],R=[r+E*S,i-B*w],W=[r,i];if(I[0]=2*q[0]-I[0],I[1]=2*q[1]-I[1],c)return[I,R,W].concat(f);{f=[I,R,W].concat(f);const z=[];for(let D=0;D<f.length;D+=3){const A=Oi(f[D][0],f[D][1],h),L=Oi(f[D+1][0],f[D+1][1],h),O=Oi(f[D+2][0],f[D+2][1],h);z.push([A[0],A[1],L[0],L[1],O[0],O[1]])}return z}}const bw={randOffset:function(e,t){return it(e,t)},randOffsetWithRange:function(e,t,r){return Ss(e,t,r)},ellipse:function(e,t,r,i,o){const s=Ip(r,i,o);return xn(e,t,o,s).opset},doubleLineOps:function(e,t,r,i,o){return lr(e,t,r,i,o,!0)}};function Op(e,t,r,i,o){return{type:"path",ops:lr(e,t,r,i,o)}}function Vo(e,t,r){const i=(e||[]).length;if(i>2){const o=[];for(let s=0;s<i-1;s++)o.push(...lr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&o.push(...lr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:o}}return i===2?Op(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function kw(e,t,r,i,o){return(function(s,a){return Vo(s,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],o)}function uc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Io(r[0],1*(1+.2*t.roughness),t),o=t.disableMultiStroke?[]:Io(r[0],1.5*(1+.22*t.roughness),gc(t));for(let s=1;s<r.length;s++){const a=r[s];if(a.length){const n=Io(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Io(a,1.5*(1+.22*t.roughness),gc(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&o.push(c)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function Ip(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/o;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=it(a*l,r),n+=it(n*l,r),{increment:s,rx:a,ry:n}}function xn(e,t,r,i){const[o,s]=mc(i.increment,e,t,i.rx,i.ry,1,i.increment*Ss(.1,Ss(.4,1,r),r),r);let a=_s(o,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=mc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=_s(n,null,r);a=a.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:a}}}function fc(e,t,r,i,o,s,a,n,l){const c=e,h=t;let d=Math.abs(r/2),f=Math.abs(i/2);d+=it(.01*d,l),f+=it(.01*f,l);let u=o,g=s;for(;u<0;)u+=2*Math.PI,g+=2*Math.PI;g-u>2*Math.PI&&(u=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-u)/2),C=yc(y,c,h,d,f,u,g,1,l);if(!l.disableMultiStroke){const b=yc(y,c,h,d,f,u,g,1.5,l);C.push(...b)}return a&&(n?C.push(...lr(c,h,c+d*Math.cos(u),h+f*Math.sin(u),l),...lr(c,h,c+d*Math.cos(g),h+f*Math.sin(g),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(u),h+f*Math.sin(u)]})),{type:"path",ops:C}}function pc(e,t){const r=Mp(Ep(Bl(e))),i=[];let o=[0,0],s=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":s=[n[0],n[1]],o=[n[0],n[1]];break;case"L":i.push(...lr(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,c,h,d,f,u]=n;i.push(...Tw(l,c,h,d,f,u,s,t)),s=[f,u];break}case"Z":i.push(...lr(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]]}return{type:"path",ops:i}}function Sa(e,t){const r=[];for(const i of e)if(i.length){const o=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+it(o,t),i[0][1]+it(o,t)]});for(let a=1;a<s;a++)r.push({op:"lineTo",data:[i[a][0]+it(o,t),i[a][1]+it(o,t)]})}}return{type:"fillPath",ops:r}}function qr(e,t){return(function(r,i){let o=r.fillStyle||"hachure";if(!re[o])switch(o){case"zigzag":re[o]||(re[o]=new fw(i));break;case"cross-hatch":re[o]||(re[o]=new pw(i));break;case"dots":re[o]||(re[o]=new gw(i));break;case"dashed":re[o]||(re[o]=new mw(i));break;case"zigzag-line":re[o]||(re[o]=new yw(i));break;default:o="hachure",re[o]||(re[o]=new vl(i))}return re[o]})(t,bw).fillPolygons(e,t)}function gc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Dp(e){return e.randomizer||(e.randomizer=new Cw(e.seed||0)),e.randomizer.next()}function Ss(e,t,r,i=1){return r.roughness*i*(Dp(r)*(t-e)+e)}function it(e,t,r=1){return Ss(-e,e,t,r)}function lr(e,t,r,i,o,s=!1){const a=s?o.disableMultiStrokeFill:o.disableMultiStroke,n=bn(e,t,r,i,o,!0,!1);if(a)return n;const l=bn(e,t,r,i,o,!0,!0);return n.concat(l)}function bn(e,t,r,i,o,s,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=o.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,f=.2+.2*Dp(o);let u=o.bowing*o.maxRandomnessOffset*(i-t)/200,g=o.bowing*o.maxRandomnessOffset*(e-r)/200;u=it(u,o,c),g=it(g,o,c);const m=[],y=()=>it(d,o,c),C=()=>it(h,o,c),b=o.preserveVertices;return a?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:it(h,o,c)),t+(b?0:it(h,o,c))]}),a?m.push({op:"bcurveTo",data:[u+e+(r-e)*f+y(),g+t+(i-t)*f+y(),u+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[u+e+(r-e)*f+C(),g+t+(i-t)*f+C(),u+e+2*(r-e)*f+C(),g+t+2*(i-t)*f+C(),r+(b?0:C()),i+(b?0:C())]}),m}function Io(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+it(t,r),e[0][1]+it(t,r)]),i.push([e[0][0]+it(t,r),e[0][1]+it(t,r)]);for(let o=1;o<e.length;o++)i.push([e[o][0]+it(t,r),e[o][1]+it(t,r)]),o===e.length-1&&i.push([e[o][0]+it(t,r),e[o][1]+it(t,r)]);return _s(i,null,r)}function _s(e,t,r){const i=e.length,o=[];if(i>3){const s=[],a=1-r.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],s[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],o.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?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&o.push(...bn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return o}function mc(e,t,r,i,o,s,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+o*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+o*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+o*Math.sin(0)]),c.push([t+i*Math.cos(e),r+o*Math.sin(e)])}else{const h=it(.5,n)-Math.PI/2;c.push([it(s,n)+t+.9*i*Math.cos(h-e),it(s,n)+r+.9*o*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let f=h;f<d;f+=e){const u=[it(s,n)+t+i*Math.cos(f),it(s,n)+r+o*Math.sin(f)];l.push(u),c.push(u)}c.push([it(s,n)+t+i*Math.cos(h+2*Math.PI+.5*a),it(s,n)+r+o*Math.sin(h+2*Math.PI+.5*a)]),c.push([it(s,n)+t+.98*i*Math.cos(h+a),it(s,n)+r+.98*o*Math.sin(h+a)]),c.push([it(s,n)+t+.9*i*Math.cos(h+.5*a),it(s,n)+r+.9*o*Math.sin(h+.5*a)])}return[c,l]}function yc(e,t,r,i,o,s,a,n,l){const c=s+it(.1,l),h=[];h.push([it(n,l)+t+.9*i*Math.cos(c-e),it(n,l)+r+.9*o*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([it(n,l)+t+i*Math.cos(d),it(n,l)+r+o*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+o*Math.sin(a)]),h.push([t+i*Math.cos(a),r+o*Math.sin(a)]),_s(h,null,l)}function Tw(e,t,r,i,o,s,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(f?0:it(c[0],n)),a[1]+(f?0:it(c[0],n))]}),h=f?[o,s]:[o+it(c[u],n),s+it(c[u],n)],l.push({op:"bcurveTo",data:[e+it(c[u],n),t+it(c[u],n),r+it(c[u],n),i+it(c[u],n),h[0],h[1]]});return l}function Ii(e){return[...e]}function Cc(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(Ii(e[0]),Ii(e[1]),Ii(e[2]),Ii(e[2]));else{const o=[];o.push(e[0],e[0]);for(let n=1;n<e.length;n++)o.push(e[n]),n===e.length-1&&o.push(e[n]);const s=[],a=1-t;i.push(Ii(o[0]));for(let n=1;n+2<o.length;n++){const l=o[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*o[n+1][0]-a*o[n-1][0])/6,l[1]+(a*o[n+1][1]-a*o[n-1][1])/6],s[2]=[o[n+1][0]+(a*o[n][0]-a*o[n+2][0])/6,o[n+1][1]+(a*o[n][1]-a*o[n+2][1])/6],s[3]=[o[n+1][0],o[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function Zo(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function ww(e,t,r){const i=Zo(t,r);if(i===0)return Zo(e,t);let o=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return o=Math.max(0,Math.min(1,o)),Zo(e,Cr(t,r,o))}function Cr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function kn(e,t,r,i){const o=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],f=n[l+3];let u=3*h[0]-2*c[0]-f[0];u*=u;let g=3*h[1]-2*c[1]-f[1];g*=g;let m=3*d[0]-2*f[0]-c[0];m*=m;let y=3*d[1]-2*f[1]-c[1];return y*=y,u<m&&(u=m),g<y&&(g=y),u+g})(e,t)<r){const n=e[t+0];o.length?(s=o[o.length-1],a=n,Math.sqrt(Zo(s,a))>1&&o.push(n)):o.push(n),o.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],f=Cr(l,c,.5),u=Cr(c,h,.5),g=Cr(h,d,.5),m=Cr(f,u,.5),y=Cr(u,g,.5),C=Cr(m,y,.5);kn([l,f,m,C],0,r,o),kn([C,y,g,d],0,r,o)}var s,a;return o}function Sw(e,t){return vs(e,0,e.length,t)}function vs(e,t,r,i,o){const s=o||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=ww(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(vs(e,t,c+1,i,s),vs(e,c,r,i,s)):(s.length||s.push(a),s.push(n)),s}function _a(e,t=.15,r){const i=[],o=(e.length-1)/3;for(let s=0;s<o;s++)kn(e,3*s,t,i);return r&&r>0?vs(i,0,i.length,r):i}const ae="none";class Bs{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,o,s){const a=this._o(s);return this._d("line",[Op(t,r,i,o,a)],a)}rectangle(t,r,i,o,s){const a=this._o(s),n=[],l=kw(t,r,i,o,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+o],[t,r+o]];a.fillStyle==="solid"?n.push(Sa([c],a)):n.push(qr([c],a))}return a.stroke!==ae&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,o,s){const a=this._o(s),n=[],l=Ip(i,o,a),c=xn(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=xn(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(qr([c.estimatedPoints],a));return a.stroke!==ae&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,o){const s=this.ellipse(t,r,i,i,o);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Vo(t,!1,i)],i)}arc(t,r,i,o,s,a,n=!1,l){const c=this._o(l),h=[],d=fc(t,r,i,o,s,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const u=fc(t,r,i,o,s,a,!0,!1,f);u.type="fillPath",h.push(u)}else h.push((function(f,u,g,m,y,C,b){const k=f,w=u;let S=Math.abs(g/2),_=Math.abs(m/2);S+=it(.01*S,b),_+=it(.01*_,b);let E=y,B=C;for(;E<0;)E+=2*Math.PI,B+=2*Math.PI;B-E>2*Math.PI&&(E=0,B=2*Math.PI);const q=(B-E)/b.curveStepCount,I=[];for(let R=E;R<=B;R+=q)I.push([k+S*Math.cos(R),w+_*Math.sin(R)]);return I.push([k+S*Math.cos(B),w+_*Math.sin(B)]),I.push([k,w]),qr([I],b)})(t,r,i,o,s,a,c));return c.stroke!==ae&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),o=[],s=uc(t,i);if(i.fill&&i.fill!==ae)if(i.fillStyle==="solid"){const a=uc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(..._a(Cc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(..._a(Cc(c),10,(1+i.roughness)/2))}a.length&&o.push(qr([a],i))}return i.stroke!==ae&&o.push(s),this._d("curve",o,i)}polygon(t,r){const i=this._o(r),o=[],s=Vo(t,!0,i);return i.fill&&(i.fillStyle==="solid"?o.push(Sa([t],i)):o.push(qr([t],i))),i.stroke!==ae&&o.push(s),this._d("polygon",o,i)}path(t,r){const i=this._o(r),o=[];if(!t)return this._d("path",o,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==ae,a=i.stroke!==ae,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,f){const u=Mp(Ep(Bl(h))),g=[];let m=[],y=[0,0],C=[];const b=()=>{C.length>=4&&m.push(..._a(C,d)),C=[]},k=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:S,data:_}of u)switch(S){case"M":k(),y=[_[0],_[1]],m.push(y);break;case"L":b(),m.push([_[0],_[1]]);break;case"C":if(!C.length){const E=m.length?m[m.length-1]:y;C.push([E[0],E[1]])}C.push([_[0],_[1]]),C.push([_[2],_[3]]),C.push([_[4],_[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!f)return g;const w=[];for(const S of g){const _=Sw(S,f);_.length&&w.push(_)}return w})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=pc(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=pc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else o.push(Sa(l,i));else o.push(qr(l,i));return a&&(n?l.forEach((h=>{o.push(Vo(h,!1,i))})):o.push(c)),this._d("path",o,i)}opsToPath(t,r){let i="";for(const o of t.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.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,o=[];for(const s of r){let a=null;switch(s.type){case"path":a={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ae};break;case"fillPath":a={d:this.opsToPath(s),stroke:ae,strokeWidth:0,fill:i.fill||ae};break;case"fillSketch":a=this.fillSketch(s,i)}a&&o.push(a)}return o}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ae,strokeWidth:i,fill:ae}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class _w{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Bs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":o.save(),o.strokeStyle=i.stroke==="none"?"transparent":i.stroke,o.lineWidth=i.strokeWidth,i.strokeLineDash&&o.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(o.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(o,a,s),o.restore();break;case"fillPath":{o.save(),o.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(o,a,s,n),o.restore();break}case"fillSketch":this.fillSketch(o,a,i)}}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=o,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,o="nonzero"){t.beginPath();for(const s of r.ops){const a=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(o):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a),a}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a),a}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a),a}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);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,o,s,a,n=!1,l){const c=this.gen.arc(t,r,i,o,s,a,n,l);return this.draw(c),c}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 Do="http://www.w3.org/2000/svg";class vw{constructor(t,r){this.svg=t,this.gen=new Bs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.svg.ownerDocument||window.document,s=o.createElementNS(Do,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=o.createElementNS(Do,"path"),l.setAttribute("d",this.opsToPath(n,a)),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=o.createElementNS(Do,"path"),l.setAttribute("d",this.opsToPath(n,a)),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(o,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2);const s=t.createElementNS(Do,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",o+""),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,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a)}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a)}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a)}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);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,o,s,a,n=!1,l){const c=this.gen.arc(t,r,i,o,s,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var X={canvas:(e,t)=>new _w(e,t),svg:(e,t)=>new vw(e,t),generator:e=>new Bs(e),newSeed:()=>Bs.newSeed()},rt=p(async(e,t,r)=>{let i;const o=t.useHtmlLabels||je(Ct()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",Nt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Ge(a,be(Fr(n),Ct()),{useHtmlLabels:o,width:t.width||Ct().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},Ct());let d=h.getBBox();const f=(t?.padding??0)/2;if(o){const u=h.children[0],g=nt(h);await rp(u,n),d=u.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return o?a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):a.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:s,bbox:d,halfPadding:f,label:a}},"labelHelper"),va=p(async(e,t,r)=>{const i=r.useHtmlLabels??ee(Ct()),o=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Ge(o,be(Fr(t),Ct()),{useHtmlLabels:i,width:r.width||Ct()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=s.getBBox();const n=r.padding/2;if(ee(Ct())){const l=s.children[0],c=nt(s);a=l.getBoundingClientRect(),c.attr("width",a.width),c.attr("height",a.height)}return i?o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):o.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:n,label:o}},"insertLabel"),K=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),et=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ft(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ft,"createPathFromPoints");function hr(e,t,r,i,o,s){const a=[],l=r-e,c=i-t,h=l/s,d=2*Math.PI/h,f=t+c/2;for(let u=0;u<=50;u++){const g=u/50,m=e+g*l,y=f+o*Math.sin(d*(m-e));a.push({x:m,y})}return a}p(hr,"generateFullSineWavePoints");function no(e,t,r,i,o,s){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:-u,y:-g})}return a}p(no,"generateCirclePoints");function Tn(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 o=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),a=p((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(o){const l={fill:a(o,"fill"),"fill-opacity":a(o,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(s){const l={stroke:a(s,"stroke"),"stroke-width":a(s,"stroke-width")??"1","stroke-opacity":a(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(Tn,"mergePaths");var Bw=p((e,t)=>{var r=e.x,i=e.y,o=t.x-r,s=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(s)*a>Math.abs(o)*n?(s<0&&(n=-n),l=s===0?0:n*o/s,c=n):(o<0&&(a=-a),l=a,c=o===0?0:a*s/o),{x:r+l,y:i+c}},"intersectRect"),bi=Bw,Lw=p(async(e,t,r,i=!1,o=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const a=Ct(),n=ee(a);return await Ge(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},a)},"createLabel"),rr=Lw,cr=p((e,t,r,i,o)=>["M",e+o,t,"H",e+r-o,"A",o,o,0,0,1,e+r,t+o,"V",t+i-o,"A",o,o,0,0,1,e+r-o,t+i,"H",e+o,"A",o,o,0,0,1,e,t+i-o,"V",t+o,"A",o,o,0,0,1,e+o,t,"Z"].join(" "),"createRoundedRectPathD"),Pp=p(async(e,t)=>{N.info("Creating subgraph rect for ",t.id,t);const r=Ct(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Z(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ee(r),u=d.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await Ge(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):g=await rr(u,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(ee(r)){const E=g.children[0],B=nt(g);m=E.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;N.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const E=X.svg(d),B=V(t,{roughness:.7,fill:s,stroke:a,fillWeight:3,seed:o}),q=E.path(cr(b,k,y,C,0),B);w=d.insert(()=>(N.debug("Rough node insert CXC",q),q),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=d.insert("rect",":first-child"),w.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:S}=gl(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const E=u.select("span");E&&E.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(E){return bi(t,E)},{cluster:d,labelBBox:m}},"rect"),Fw=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),o=0*t.padding,s=o/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+o).attr("height",t.height+o).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return bi(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Aw=p(async(e,t)=>{const r=Ct(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:s,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const u=await rr(d,t.label,t.labelStyle,void 0,!0);let g=u.getBBox();if(ee(r)){const q=u.children[0],I=nt(u);g=q.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}const m=0*t.padding,y=m/2,C=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-g.height-6,w=t.x-C/2,S=t.y-b/2;t.width=C;const _=t.y-t.height/2-y+g.height+2;let E;if(t.look==="handDrawn"){const q=t.cssClasses.includes("statediagram-cluster-alt"),I=X.svg(c),R=t.rx||t.ry?I.path(cr(w,S,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:o}):I.rectangle(w,S,C,b,{seed:o});E=c.insert(()=>R,":first-child");const W=I.rectangle(w,_,C,k,{fill:q?s:a,fillStyle:q?"hachure":"solid",stroke:l,seed:o});E=c.insert(()=>R,":first-child"),f=c.insert(()=>W)}else E=h.insert("rect",":first-child"),E.attr("class","outer").attr("x",w).attr("y",S).attr("width",C).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",w).attr("y",_).attr("width",C).attr("height",k);d.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(ee(r)?0:3)})`);const B=E.node().getBBox();return t.height=B.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(q){return bi(t,q)},{cluster:c,labelBBox:g}},"roundedWithTitle"),Ew=p(async(e,t)=>{N.info("Creating subgraph rect for ",t.id,t);const r=Ct(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Z(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ee(r),u=d.insert("g").attr("class","cluster-label "),g=await Ge(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(ee(r)){const E=g.children[0],B=nt(g);m=E.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;N.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const E=X.svg(d),B=V(t,{roughness:.7,fill:s,stroke:a,fillWeight:4,seed:o}),q=E.path(cr(b,k,y,C,t.rx),B);w=d.insert(()=>(N.debug("Rough node insert CXC",q),q),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=d.insert("rect",":first-child"),w.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:S}=gl(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const E=u.select("span");E&&E.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(E){return bi(t,E)},{cluster:d,labelBBox:m}},"kanbanSection"),Mw=p((e,t)=>{const r=Ct(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:s}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,f=t.y-h/2;t.width=c;let u;if(t.look==="handDrawn"){const y=X.svg(a).rectangle(d,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:o});u=a.insert(()=>y,":first-child")}else{u=n.insert("rect",":first-child");let m="outer";t.look,m="divider",u.attr("class",m).attr("x",d).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const g=u.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return bi(t,m)},{cluster:a,labelBBox:{}}},"divider"),$w=Pp,Ow={rect:Pp,squareRect:$w,roundedWithTitle:Aw,noteGroup:Fw,divider:Mw,kanbanSection:Ew},Rp=new Map,Iw=p(async(e,t)=>{const r=t.shape||"rect",i=await Ow[r](e,t);return Rp.set(t.id,i),i},"insertCluster"),LL=p(()=>{Rp=new Map},"clear");function Np(e,t){return e.intersect(t)}p(Np,"intersectNode");var Dw=Np;function qp(e,t,r,i){var o=e.x,s=e.y,a=o-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<o&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<s&&(h=-h),{x:o+c,y:s+h}}p(qp,"intersectEllipse");var zp=qp;function Wp(e,t,r){return zp(e,t,t,r)}p(Wp,"intersectCircle");var Pw=Wp;function Hp(e,t,r,i){{const o=t.y-e.y,s=e.x-t.x,a=t.x*e.y-e.x*t.y,n=o*r.x+s*r.y+a,l=o*i.x+s*i.y+a,c=1e-6;if(n!==0&&l!==0&&wn(n,l))return;const h=i.y-r.y,d=r.x-i.x,f=i.x*r.y-r.x*i.y,u=h*e.x+d*e.y+f,g=h*t.x+d*t.y+f;if(Math.abs(u)<c&&Math.abs(g)<c&&wn(u,g))return;const m=o*d-h*s;if(m===0)return;const y=Math.abs(m/2);let C=s*f-d*a;const b=C<0?(C-y)/m:(C+y)/m;C=h*a-o*f;const k=C<0?(C-y)/m:(C+y)/m;return{x:b,y:k}}}p(Hp,"intersectLine");function wn(e,t){return e*t>0}p(wn,"sameSign");var Rw=Hp;function Yp(e,t,r){let i=e.x,o=e.y,s=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=o-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],f=t[h<t.length-1?h+1:0],u=Rw(e,r,{x:l+d.x,y:c+d.y},{x:l+f.x,y:c+f.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(h,d){let f=h.x-r.x,u=h.y-r.y,g=Math.sqrt(f*f+u*u),m=d.x-r.x,y=d.y-r.y,C=Math.sqrt(m*m+y*y);return g<C?-1:g===C?0:1}),s[0]):e}p(Yp,"intersectPolygon");var Nw=Yp,G={node:Dw,circle:Pw,ellipse:zp,polygon:Nw,rect:bi};function Up(e,t){const{labelStyles:r}=Z(t);t.labelStyle=r;const i=et(t);let o=i;i||(o="anchor");const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=X.svg(s),c=V(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=s.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",Nt(n)),K(t,d),t.intersect=function(f){return N.info("Circle intersect",t,a,f),G.circle(t,a,f)},s}p(Up,"anchor");function Sn(e,t,r,i,o,s,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,f=(i-t)/2,u=d/o,g=f/s,m=Math.sqrt(u**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),C=l+y*s*Math.sin(h)*(a?-1:1),b=c-y*o*Math.cos(h)*(a?-1:1),k=Math.atan2((t-b)/s,(e-C)/o);let S=Math.atan2((i-b)/s,(r-C)/o)-k;a&&S<0&&(S+=2*Math.PI),!a&&S>0&&(S-=2*Math.PI);const _=[];for(let E=0;E<20;E++){const B=E/19,q=k+B*S,I=C+o*Math.cos(q),R=b+s*Math.sin(q);_.push({x:I,y:R})}return _}p(Sn,"generateArcPoints");function jp(e,t,r){const[i,o]=[t,r].sort((s,a)=>a-s);return o*(1-Math.sqrt(1-(e/i/2)**2))}p(jp,"calculateArcSagitta");async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=p(q=>q+a,"calcTotalHeight"),l=p(q=>{const I=q/2;return[I/(2.5+q/50),I]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await rt(e,t,et(t)),d=n(t?.height?t?.height:h.height),[f,u]=l(d),g=jp(d,f,u),y=(t?.width?t?.width:h.width)+s*2+g-g,C=d,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...Sn(-y/2,-C/2,-y/2,C/2,f,u,!1),{x:y/2,y:C/2},...Sn(y/2,C/2,y/2,-C/2,f,u,!0)],w=X.svg(c),S=V(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=ft(k),E=w.path(_,S),B=c.insert(()=>E,":first-child");return B.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${f/2}, 0)`),K(t,B),t.intersect=function(q){return G.polygon(t,k,q)},c}p(Gp,"bowTieRect");function Xe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Xe,"insertPolygonShape");var Po=12;async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?28:o,a=t.look==="neo"?24:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.width??l.width)+(t.look==="neo"?s*2:s+Po),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,f=c,u=-h,g=0,m=[{x:d+Po,y:u},{x:f,y:u},{x:f,y:g},{x:d,y:g},{x:d,y:u+Po},{x:d+Po,y:u}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=X.svg(n),k=V(t,{}),w=ft(m),S=b.path(w,k);y=n.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&y.attr("style",C)}else y=Xe(n,c,h,m);return i&&y.attr("style",i),K(t,y),t.intersect=function(b){return G.polygon(t,m,b)},n}p(Xp,"card");function Vp(e,t){const{nodeStyles:r}=Z(t);t.label="";const i=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(28,t.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=X.svg(i),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ft(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return G.polygon(t,a,f)},i}p(Vp,"choice");async function Ll(e,t,r){const{labelStyles:i,nodeStyles:o}=Z(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,halfPadding:n}=await rt(e,t,et(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=X.svg(s),g=V(t,{}),m=u.circle(0,0,h*2,g);d=s.insert(()=>m,":first-child"),d.attr("class","basic label-container").attr("style",Nt(f))}else d=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",h).attr("cx",0).attr("cy",0);return K(t,d),t.calcIntersect=function(u,g){const m=u.width/2;return G.circle(u,m,g)},t.intersect=function(u){return N.info("Circle intersect",t,h,u),G.circle(t,h,u)},s}p(Ll,"circle");function Zp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,o={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
|
|
227
|
+
M ${o.x},${o.y} L ${a.x},${a.y}`}p(Zp,"createLine");function Kp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r,t.label="";const o=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:a}=t,n=X.svg(o),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=Zp(s),d=n.path(h,l),f=o.insert(()=>c,":first-child");return f.insert(()=>d),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),K(t,f),t.intersect=function(u){return N.info("crossedCircle intersect",t,{radius:s,point:u}),G.circle(t,s,u)},o}p(Kp,"crossedCircle");function Ne(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:-u,y:-g})}return a}p(Ne,"generateCirclePoints");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+n,h=s.height+l,d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...Ne(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Ne(c/2+d*2,-d,d,20,-180,-270),...Ne(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Ne(c/2,h/2,d,20,0,90)],g=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Ne(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Ne(c/2+c*.1,-d,d,20,-180,-270),...Ne(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Ne(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],m=X.svg(o),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(u).replace("Z",""),k=m.path(b,y),w=ft(g),S=m.path(w,{...y}),_=o.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,_),t.intersect=function(E){return G.polygon(t,g,E)},o}p(Qp,"curlyBraceLeft");function qe(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:u,y:g})}return a}p(qe,"generateCirclePoints");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...qe(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...qe(c/2+d*2,-d,d,20,-180,-270),...qe(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...qe(c/2,h/2,d,20,0,90)],g=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...qe(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...qe(c/2+d*2,-d,d,20,-180,-270),...qe(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...qe(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],m=X.svg(o),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(u).replace("Z",""),k=m.path(b,y),w=ft(g),S=m.path(w,{...y}),_=o.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,_),t.intersect=function(E){return G.polygon(t,g,E)},o}p(Jp,"curlyBraceRight");function zt(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:-u,y:-g})}return a}p(zt,"generateCirclePoints");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...zt(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...zt(c/2+d*2,-d,d,20,-180,-270),...zt(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...zt(c/2,h/2,d,20,0,90)],g=[...zt(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...zt(-c/2-d/2,-d,d,20,0,90),...zt(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...zt(-c/2+d+d/2,h/2,d,30,-180,-270)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...zt(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...zt(c/2+d*2,-d,d,20,-180,-270),...zt(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...zt(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...zt(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...zt(-c/2-d/2,-d,d,20,0,90),...zt(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...zt(-c/2+d+d/2,h/2,d,30,-180,-270)],y=X.svg(o),C=V(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=ft(u).replace("Z",""),w=y.path(k,C),_=ft(g).replace("Z",""),E=y.path(_,C),B=ft(m),q=y.path(B,{...C}),I=o.insert("g",":first-child");return I.insert(()=>q,":first-child").attr("stroke-opacity",0),I.insert(()=>w,":first-child"),I.insert(()=>E,":first-child"),I.attr("class","text"),f&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,I),t.intersect=function(R){return G.polygon(t,m,R)},o}p(tg,"curlyBraces");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=20,l=5,{shapeSvg:c,bbox:h}=await rt(e,t,et(t)),d=Math.max(n,(h.width+s*2)*1.25,t?.width??0),f=Math.max(l,h.height+a*2,t?.height??0),u=f/2,{cssStyles:g}=t,m=X.svg(c),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=d,b=f,k=C-u,w=b/4,S=[{x:k,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:k,y:b},...no(-k,-b/2,u,50,270,90)],_=ft(S),E=m.path(_,y),B=c.insert(()=>E,":first-child");return B.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(${-d/2}, ${-f/2})`),K(t,B),t.intersect=function(q){return G.polygon(t,S,q)},c}p(eg,"curvedTrapezoid");var qw=p((e,t,r,i,o,s)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),zw=p((e,t,r,i,o,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Ww=p((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),xc=8,bc=8;async function rg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?24:o,a=t.look==="neo"?24:o;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-a,t.width<bc&&(t.width=bc);const b=y/2/(2.5+y/50);t.height=(t.height??0)-s-b*3,t.height<xc&&(t.height=xc)}const{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=(t.width?t.width:l.width)+a,d=h/2,f=d/(2.5+h/50),u=(t.height?t.height:l.height)+s+f;let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=X.svg(n),C=zw(0,0,h,u,d,f),b=Ww(0,f,h,u,d,f),k=V(t,{}),w=y.path(C,k),S=y.path(b,V(t,{fill:"none"}));g=n.insert(()=>S,":first-child"),g=n.insert(()=>w,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{const y=qw(0,0,h,u,d,f);g=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Nt(m)).attr("style",i)}return g.attr("label-offset-y",f),g.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),K(t,g),c.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=G.rect(t,y),b=C.x-(t.x??0);if(d!=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-f)){let k=f*f*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=f-k,y.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}p(rg,"cylinder");async function ki(e,t,r){const{labelStyles:i,nodeStyles:o}=Z(t);t.labelStyle=i;const{shapeSvg:s,bbox:a}=await rt(e,t,et(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:f,ry:u}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(f=r.rx,u=r.ry),t.look==="handDrawn"){const m=X.svg(s),y=V(t,{}),C=f||u?m.path(cr(c,h,n,l,f||0),y):m.rectangle(c,h,n,l,y);d=s.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",Nt(g))}else d=s.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",o).attr("rx",Nt(f)).attr("ry",Nt(u)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return K(t,d),t.calcIntersect=function(m,y){return G.rect(m,y)},t.intersect=function(m){return G.rect(t,m)},s}p(ki,"drawRect");async function ig(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:o,padding:s,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:o??s??0},c=await ki(e,t,l);if(t.look==="handDrawn"){const u=X.svg(c),g=V(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return c;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return c;return c.insert(()=>u.line(C.x,C.y,C.x+C.width,C.y,g),".basic.label-container g.label"),c.insert(()=>u.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,g),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,f=(Number(h.attr("height"))||n)??0;return d>0&&f>0&&h.attr("stroke-dasharray",`${d} ${f}`),c}p(ig,"datastore");async function og(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=n.width+o,h=n.height+s,d=h*.2,f=-c/2,u=-h/2-d/2,{cssStyles:g}=t,m=X.svg(a),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:f,y:u+d},{x:-f,y:u+d},{x:-f,y:-u},{x:f,y:-u},{x:f,y:u},{x:-f,y:u},{x:-f,y:u+d}],b=m.polygon(C.map(w=>[w.x,w.y]),y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),K(t,k),t.intersect=function(w){return G.rect(t,w)},a}p(og,"dividedRectangle");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t),o=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-o;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=X.svg(n),g=V(t,{roughness:.2,strokeWidth:2.5}),m=V(t,{roughness:.2,strokeWidth:1.5}),y=u.circle(0,0,c*2,g),C=u.circle(0,0,h*2,m);d=n.insert("g",":first-child"),d.attr("class",Nt(t.cssClasses)).attr("style",Nt(f)),d.node()?.appendChild(y),d.node()?.appendChild(C)}else{d=n.insert("g",":first-child");const u=d.insert("circle",":first-child"),g=d.insert("circle");d.attr("class","basic label-container").attr("style",i),u.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),g.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return K(t,d),t.intersect=function(u){return N.info("DoubleCircle intersect",t,c,u),G.circle(t,c,u)},n}p(sg,"doublecircle");function ag(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Z(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=X.svg(s),{nodeBorder:c}=r,h=V(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),f=s.insert(()=>d,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),K(t,f),t.intersect=function(u){return N.info("filledCircle intersect",t,{radius:a,point:u}),G.circle(t,a,u)},s}p(ag,"filledCircle");var kc=10,Tc=10;async function ng(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.height=t?.height??0,t.height<kc&&(t.height=kc),t.width=(t?.width??0)-s-s/2,t.width<Tc&&(t.width=Tc));const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=(t?.width?t?.width:n.width)+(s??0),h=t?.height?t?.height:c+n.height,d=h,f=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:u}=t,g=X.svg(a),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ft(f),C=g.path(y,m),b=a.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,K(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return N.info("Triangle intersect",t,f,k),G.polygon(t,f,k)},a}p(ng,"flippedTriangle");function lg(e,t,{dir:r,config:{state:i,themeVariables:o}}){const{nodeStyles:s}=Z(t);t.label="";const a=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,f=X.svg(a),u=V(t,{stroke:o.lineColor,fill:o.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const g=f.rectangle(h,d,l,c,u),m=a.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),K(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return G.rect(t,C)},a}p(lg,"forkJoin");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=15,s=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<s&&(t.height=s),t.width=(t?.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:l,bbox:c}=await rt(e,t,et(t)),h=(t?.width?t?.width:Math.max(o,c.width))+a*2,d=(t?.height?t?.height:Math.max(s,c.height))+n*2,f=d/2,{cssStyles:u}=t,g=X.svg(l),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:-d/2},{x:h/2-f,y:-d/2},...no(-h/2+f,0,f,50,90,270),{x:h/2-f,y:d/2},{x:-h/2,y:d/2}],C=ft(y),b=g.path(C,m),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),K(t,k),t.intersect=function(w){return N.info("Pill intersect",t,{radius:f,point:w}),G.polygon(t,y,w)},l}p(hg,"halfRoundedRectangle");var Hw=p((e,t,r,i,o)=>[`M${e+o},${t}`,`L${e+r-o},${t}`,`L${e+r},${t-i/2}`,`L${e+r-o},${t-i}`,`L${e+o},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t),o=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,a=70,n=32,l=t.look==="neo"?a:s,c=t.look==="neo"?n:s;if(t.width||t.height){const k=(t.height??0)/o;t.width=(t?.width??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await rt(e,t,et(t)),f=(t?.height?t?.height:d.height)+l,u=f/o,g=(t?.width?t?.width:d.width)+2*u+c,m=[{x:u,y:0},{x:g-u,y:0},{x:g,y:-f/2},{x:g-u,y:-f},{x:u,y:-f},{x:0,y:-f/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=X.svg(h),k=V(t,{}),w=Hw(0,0,g,f,u),S=b.path(w,k);y=h.insert(()=>S,":first-child").attr("transform",`translate(${-g/2}, ${f/2})`),C&&y.attr("style",C)}else y=Xe(h,g,f,m);return i&&y.attr("style",i),t.width=g,t.height=f,K(t,y),t.intersect=function(b){return G.polygon(t,m,b)},h}p(cg,"hexagon");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const{shapeSvg:o}=await rt(e,t,et(t)),s=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=X.svg(o),c=V(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],d=ft(h),f=l.path(d,c),u=o.insert(()=>f,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-s/2}, ${-a/2})`),K(t,u),t.intersect=function(g){return N.info("Pill intersect",t,{points:h}),G.polygon(t,h,g)},o}p(dg,"hourglass");async function ug(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Z(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await rt(e,t,"icon-shape default"),f=t.pos==="t",u=n,g=n,{nodeBorder:m}=r,{stylesMap:y}=xi(t),C=-g/2,b=-u/2,k=t.label?8:0,w=X.svg(c),S=V(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=w.rectangle(C,b,g,u,S),E=Math.max(g,h.width),B=u+h.height+k,q=w.rectangle(-E/2,-B/2,E,B,{...S,fill:"transparent",stroke:"none"}),I=c.insert(()=>_,":first-child"),R=c.insert(()=>q);if(t.icon){const W=c.append("g");W.html(`<g>${await Co(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const z=W.node().getBBox(),D=z.width,A=z.height,L=z.x,O=z.y;W.attr("transform",`translate(${-D/2-L},${f?h.height/2+k/2-A/2-O:-h.height/2-k/2-A/2-O})`),W.attr("style",`color: ${y.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-B/2:B/2-h.height})`),I.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),K(t,R),t.intersect=function(W){if(N.info("iconSquare intersect",t,W),!t.label)return G.rect(t,W);const z=t.x??0,D=t.y??0,A=t.height??0;let L=[];return f?L=[{x:z-h.width/2,y:D-A/2},{x:z+h.width/2,y:D-A/2},{x:z+h.width/2,y:D-A/2+h.height+k},{x:z+g/2,y:D-A/2+h.height+k},{x:z+g/2,y:D+A/2},{x:z-g/2,y:D+A/2},{x:z-g/2,y:D-A/2+h.height+k},{x:z-h.width/2,y:D-A/2+h.height+k}]:L=[{x:z-g/2,y:D-A/2},{x:z+g/2,y:D-A/2},{x:z+g/2,y:D-A/2+u},{x:z+h.width/2,y:D-A/2+u},{x:z+h.width/2/2,y:D+A/2},{x:z-h.width/2,y:D+A/2},{x:z-h.width/2,y:D-A/2+u},{x:z-g/2,y:D-A/2+u}],G.polygon(t,L,W)},c}p(ug,"icon");async function fg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Z(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await rt(e,t,"icon-shape default"),f=20,u=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:C}=xi(t),b=X.svg(c),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??y;const S=c.append("g");t.icon&&S.html(`<g>${await Co(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),E=_.width,B=_.height,q=_.x,I=_.y,R=Math.max(E,B)*Math.SQRT2+f*2,W=b.circle(0,0,R,k),z=Math.max(R,h.width),D=R+h.height+u,A=b.rectangle(-z/2,-D/2,z,D,{...k,fill:"transparent",stroke:"none"}),L=c.insert(()=>W,":first-child"),O=c.insert(()=>A);return S.attr("transform",`translate(${-E/2-q},${g?h.height/2+u/2-B/2-I:-h.height/2-u/2-B/2-I})`),S.attr("style",`color: ${C.get("stroke")??m};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-D/2:D/2-h.height})`),L.attr("transform",`translate(0,${g?h.height/2+u/2:-h.height/2-u/2})`),K(t,O),t.intersect=function(P){return N.info("iconSquare intersect",t,P),G.rect(t,P)},c}p(fg,"iconCircle");async function pg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Z(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await rt(e,t,"icon-shape default"),u=t.pos==="t",g=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=xi(t),k=-m/2,w=-g/2,S=t.label?8:0,_=X.svg(c),E=V(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=b.get("fill");E.stroke=B??C;const q=_.path(cr(k,w,m,g,5),E),I=Math.max(m,h.width),R=g+h.height+S,W=_.rectangle(-I/2,-R/2,I,R,{...E,fill:"transparent",stroke:"none"}),z=c.insert(()=>q,":first-child").attr("class","icon-shape2"),D=c.insert(()=>W);if(t.icon){const A=c.append("g");A.html(`<g>${await Co(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=A.node().getBBox(),O=L.width,P=L.height,H=L.x,U=L.y;A.attr("transform",`translate(${-O/2-H},${u?h.height/2+S/2-P/2-U:-h.height/2-S/2-P/2-U})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-R/2:R/2-h.height})`),z.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),K(t,D),t.intersect=function(A){if(N.info("iconSquare intersect",t,A),!t.label)return G.rect(t,A);const L=t.x??0,O=t.y??0,P=t.height??0;let H=[];return u?H=[{x:L-h.width/2,y:O-P/2},{x:L+h.width/2,y:O-P/2},{x:L+h.width/2,y:O-P/2+h.height+S},{x:L+m/2,y:O-P/2+h.height+S},{x:L+m/2,y:O+P/2},{x:L-m/2,y:O+P/2},{x:L-m/2,y:O-P/2+h.height+S},{x:L-h.width/2,y:O-P/2+h.height+S}]:H=[{x:L-m/2,y:O-P/2},{x:L+m/2,y:O-P/2},{x:L+m/2,y:O-P/2+g},{x:L+h.width/2,y:O-P/2+g},{x:L+h.width/2/2,y:O+P/2},{x:L-h.width/2,y:O+P/2},{x:L-h.width/2,y:O-P/2+g},{x:L-m/2,y:O-P/2+g}],G.polygon(t,H,A)},c}p(pg,"iconRounded");async function gg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Z(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await rt(e,t,"icon-shape default"),u=t.pos==="t",g=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=xi(t),k=-m/2,w=-g/2,S=t.label?8:0,_=X.svg(c),E=V(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=b.get("fill");E.stroke=B??C;const q=_.path(cr(k,w,m,g,.1),E),I=Math.max(m,h.width),R=g+h.height+S,W=_.rectangle(-I/2,-R/2,I,R,{...E,fill:"transparent",stroke:"none"}),z=c.insert(()=>q,":first-child"),D=c.insert(()=>W);if(t.icon){const A=c.append("g");A.html(`<g>${await Co(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=A.node().getBBox(),O=L.width,P=L.height,H=L.x,U=L.y;A.attr("transform",`translate(${-O/2-H},${u?h.height/2+S/2-P/2-U:-h.height/2-S/2-P/2-U})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-R/2:R/2-h.height})`),z.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),K(t,D),t.intersect=function(A){if(N.info("iconSquare intersect",t,A),!t.label)return G.rect(t,A);const L=t.x??0,O=t.y??0,P=t.height??0;let H=[];return u?H=[{x:L-h.width/2,y:O-P/2},{x:L+h.width/2,y:O-P/2},{x:L+h.width/2,y:O-P/2+h.height+S},{x:L+m/2,y:O-P/2+h.height+S},{x:L+m/2,y:O+P/2},{x:L-m/2,y:O+P/2},{x:L-m/2,y:O-P/2+h.height+S},{x:L-h.width/2,y:O-P/2+h.height+S}]:H=[{x:L-m/2,y:O-P/2},{x:L+m/2,y:O-P/2},{x:L+m/2,y:O-P/2+g},{x:L+h.width/2,y:O-P/2+g},{x:L+h.width/2/2,y:O+P/2},{x:L-h.width/2,y:O+P/2},{x:L-h.width/2,y:O-P/2+g},{x:L-m/2,y:O-P/2+g}],G.polygon(t,H,A)},c}p(gg,"iconSquare");async function mg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const o=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=o/s;const{labelStyles:a}=Z(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??o),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:f,label:u}=await rt(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,C=t.label?8:0,b=X.svg(d),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(m,y,c,h,k),S=Math.max(c,f.width),_=h+f.height+C,E=b.rectangle(-S/2,-_/2,S,_,{...k,fill:"none",stroke:"none"}),B=d.insert(()=>w,":first-child"),q=d.insert(()=>E);if(t.img){const I=d.append("image");I.attr("href",t.img),I.attr("width",c),I.attr("height",h),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-c/2},${g?_/2-h:-_/2})`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-C/2:h/2-f.height/2+C/2})`),B.attr("transform",`translate(0,${g?f.height/2+C/2:-f.height/2-C/2})`),K(t,q),t.intersect=function(I){if(N.info("iconSquare intersect",t,I),!t.label)return G.rect(t,I);const R=t.x??0,W=t.y??0,z=t.height??0;let D=[];return g?D=[{x:R-f.width/2,y:W-z/2},{x:R+f.width/2,y:W-z/2},{x:R+f.width/2,y:W-z/2+f.height+C},{x:R+c/2,y:W-z/2+f.height+C},{x:R+c/2,y:W+z/2},{x:R-c/2,y:W+z/2},{x:R-c/2,y:W-z/2+f.height+C},{x:R-f.width/2,y:W-z/2+f.height+C}]:D=[{x:R-c/2,y:W-z/2},{x:R+c/2,y:W-z/2},{x:R+c/2,y:W-z/2+h},{x:R+f.width/2,y:W-z/2+h},{x:R+f.width/2/2,y:W+z/2},{x:R-f.width/2,y:W+z/2},{x:R-f.width/2,y:W-z/2+h},{x:R-c/2,y:W-z/2+h}],G.polygon(t,D,I)},d}p(mg,"imageSquare");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=Math.max(l.width+(a??0)*2,t?.width??0),h=Math.max(l.height+(s??0)*2,t?.height??0),d=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(d),C=g.path(y,m);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&f.attr("style",u)}else f=Xe(n,c,h,d);return i&&f.attr("style",i),t.width=c,t.height=h,K(t,f),t.intersect=function(g){return G.polygon(t,d,g)},n}p(yg,"inv_trapezoid");async function Cg(e,t){const{shapeSvg:r,bbox:i,label:o}=await rt(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),K(t,s),t.intersect=function(l){return G.rect(t,l)},r}p(Cg,"labelRect");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(d),C=g.path(y,m);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Xe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,K(t,f),t.intersect=function(g){return G.polygon(t,d,g)},n}p(xg,"lean_left");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(d),C=g.path(y,m);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Xe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,K(t,f),t.intersect=function(g){return G.polygon(t,d,g)},n}p(bg,"lean_right");function kg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const o=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=X.svg(o),d=V(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=ft(c),u=h.path(f,d),g=o.insert(()=>u,":first-child");return g.attr("class","outer-path"),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${a/2},${-n})`),K(t,g),t.intersect=function(m){return N.info("lightningBolt intersect",t,m),G.polygon(t,c,m)},o}p(kg,"lightningBolt");var Yw=p((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Uw=p((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),jw=p((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),wc=10,Sc=10;async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?24:o;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-s,t.width<Sc&&(t.width=Sc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-a-k*3,t.height<wc&&(t.height=wc)}const{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=(t?.width?t?.width:l.width)+s*2,d=h/2,f=d/(2.5+h/50),u=(t?.height?t?.height:l.height)+f+a*2,g=u*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=X.svg(n),b=Uw(0,0,h,u,d,f,g),k=jw(0,f,h,u,d,f),w=V(t,{}),S=C.path(b,w),_=C.path(k,w);n.insert(()=>_,":first-child").attr("class","line"),m=n.insert(()=>S,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const C=Yw(0,0,h,u,d,f,g);m=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Nt(y)).attr("style",i)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),K(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(C){const b=G.rect(t,C),k=b.x-(t.x??0);if(d!=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-f)){let w=f*f*(1-k*k/(d*d));w>0&&(w=Math.sqrt(w)),w=f-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},n}p(Tg,"linedCylinder");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=(t?.width?t?.width:l.width)+(s??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,u=d+f,{cssStyles:g}=t,m=X.svg(n),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:u/2},...hr(-h/2-h/2*.1,u/2,h/2+h/2*.1,u/2,f,.8),{x:h/2+h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:-u/2},{x:-h/2,y:-u/2},{x:-h/2,y:u/2*1.1},{x:-h/2,y:-u/2}],b=m.polygon(C.map(w=>[w.x,w.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),K(t,k),t.intersect=function(w){return G.polygon(t,C,w)},n}p(wg,"linedWaveEdgedRect");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await rt(e,t,et(t)),d=(t?.width?t?.width:c.width)+s*2+2*n,f=(t?.height?t?.height:c.height)+a*2+2*n,u=d-2*n,g=f-2*n,m=-u/2,y=-g/2,{cssStyles:C}=t,b=X.svg(l),k=V(t,{}),w=[{x:m-n,y:y+n},{x:m-n,y:y+g+n},{x:m+u-n,y:y+g+n},{x:m+u-n,y:y+g},{x:m+u,y:y+g},{x:m+u,y:y+g-n},{x:m+u+n,y:y+g-n},{x:m+u+n,y:y-n},{x:m+n,y:y-n},{x:m+n,y},{x:m,y},{x:m,y:y+n}],S=[{x:m,y:y+n},{x:m+u-n,y:y+n},{x:m+u-n,y:y+g},{x:m+u,y:y+g},{x:m+u,y},{x:m,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ft(w);let E=b.path(_,k);const B=ft(S);let q=b.path(B,k);t.look!=="handDrawn"&&(E=Tn(E),q=Tn(q));const I=l.insert("g",":first-child");return I.insert(()=>E),I.insert(()=>q),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),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),K(t,I),t.intersect=function(R){return G.polygon(t,w,R)},l}p(Sg,"multiRect");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(s.width,t?.width??0)+l*2,f=Math.max(s.height,t?.height??0)+c*3,u=t.look==="neo"?f/4:f/8,g=f+(h?u/2:-u/2),m=-d/2,y=-g/2,C=10,{cssStyles:b}=t,k=hr(m-C,y+g+C,m+d-C,y+g+C,u,.8),w=k?.[k.length-1],S=[{x:m-C,y:y+C},{x:m-C,y:y+g+C},...k,{x:m+d-C,y:w.y-C},{x:m+d,y:w.y-C},{x:m+d,y:w.y-2*C},{x:m+d+C,y:w.y-2*C},{x:m+d+C,y:y-C},{x:m+C,y:y-C},{x:m+C,y},{x:m,y},{x:m,y:y+C}],_=[{x:m,y:y+C},{x:m+d-C,y:y+C},{x:m+d-C,y:w.y-C},{x:m+d,y:w.y-C},{x:m+d,y},{x:m,y}],E=X.svg(o),B=V(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const q=ft(S),I=E.path(q,B),R=ft(_),W=E.path(R,B),z=o.insert(()=>I,":first-child");return z.insert(()=>W),z.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-u/2})`),a.attr("transform",`translate(${-(s.width/2)-C-(s.x-(s.left??0))}, ${-(s.height/2)+C-u/2-(s.y-(s.top??0))})`),K(t,z),t.intersect=function(D){return G.polygon(t,S,D)},o}p(_g,"multiWaveEdgedRectangle");async function vg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Z(t);t.labelStyle=i,t.useHtmlLabels||ee(Bt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,f=-h/2,{cssStyles:u}=t,g=X.svg(a),m=V(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(d,f,c,h,m),C=a.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),o&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",o),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,C),t.intersect=function(b){return G.rect(t,b)},a}p(vg,"note");var Gw=p((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 Bg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await rt(e,t,et(t)),a=s.width+(t.padding??0),n=s.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=X.svg(o),g=V(t,{}),m=Gw(0,0,l),y=u.path(m,g);d=o.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&d.attr("style",f)}else d=Xe(o,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),K(t,d),t.calcIntersect=function(u,g){const m=u.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],C=G.polygon(u,y,g);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},o}p(Bg,"question");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?21:o??0,a=t.look==="neo"?12:o??0,{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=(t?.width??l.width)+(t.look==="neo"?s*2:s),d=(t?.height??l.height)+(t.look==="neo"?a*2:a),f=-h/2,u=-d/2,g=u/2,m=[{x:f+g,y:u},{x:f,y:0},{x:f+g,y:-u},{x:-f,y:-u},{x:-f,y:u}],{cssStyles:y}=t,C=X.svg(n),b=V(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=ft(m),w=C.path(k,b),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-g/2},0)`),c.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),K(t,S),t.intersect=function(_){return G.polygon(t,m,_)},n}p(Lg,"rect_left_inv_arrow");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;let o;t.cssClasses?o="node "+t.cssClasses:o="node default";const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await rr(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(ee(Ct())){const B=h.children[0],q=nt(h);d=B.getBoundingClientRect(),q.attr("width",d.width),q.attr("height",d.height)}N.info("Text 2",l);const f=l||[],u=h.getBBox(),g=await rr(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),m=g.children[0],y=nt(g);d=m.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const C=(t.padding||0)/2;nt(g).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),nt(h).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),w=-d.width/2-C,S=-d.height/2-C;let _,E;if(t.look==="handDrawn"){const B=X.svg(s),q=V(t,{}),I=B.path(cr(w,S,b,k,t.rx||0),q),R=B.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,q);E=s.insert(()=>(N.debug("Rough node insert CXC",I),R),":first-child"),_=s.insert(()=>(N.debug("Rough node insert CXC",I),I),":first-child")}else _=a.insert("rect",":first-child"),E=a.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),E.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+u.height+C).attr("y2",-d.height/2-C+u.height+C);return K(t,_),t.intersect=function(B){return G.rect(t,B)},s}p(Fg,"rectWithTitle");async function Ag(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,o={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return ki(e,t,o)}p(Ag,"roundedRect");var mr=8;async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=(t?.width??n.width)+o*2+(t.look==="neo"?mr:mr*2),h=(t?.height??n.height)+s*2,d=c-mr,f=h,u=mr-c/2,g=-h/2,{cssStyles:m}=t,y=X.svg(a),C=V(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:u,y:g},{x:u+d,y:g},{x:u+d,y:g+f},{x:u-mr,y:g+f},{x:u-mr,y:g},{x:u,y:g},{x:u,y:g+f}],k=y.polygon(b.map(S=>[S.x,S.y]),C),w=a.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",Nt(m)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${mr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,w),t.intersect=function(S){return G.rect(t,S)},a}p(Eg,"shadedProcess");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=(t?.width?t?.width:l.width)+s*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,f=h,u=d/1.5,g=-f/2,m=-u/2,{cssStyles:y}=t,C=X.svg(n),b=V(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y:m},{x:g,y:m+u},{x:g+f,y:m+u},{x:g+f,y:m-u/2}],w=ft(k),S=C.path(w,b),_=n.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${u/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),K(t,_),t.intersect=function(E){return G.polygon(t,k,E)},n}p(Mg,"slopedRect");async function $g(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,o=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:o};return ki(e,t,s)}p($g,"squareRect");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?20:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?s*2:s),d=c/2,{cssStyles:f}=t,u=X.svg(n),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...no(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...no(h/2-d,0,d,50,270,450)],y=ft(m),C=u.path(y,g),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),K(t,b),t.intersect=function(k){return G.polygon(t,m,k)},n}p(Og,"stadium");async function Ig(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ki(e,t,r)}p(Ig,"state");function Dg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Z(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=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 h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=X.svg(h),f=V(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const u=d.circle(0,0,t.width,{...f,stroke:a,strokeWidth:2}),g=n??l,m=(t.width??0)*5/14,y=d.circle(0,0,m,{...f,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>u,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),s&&C.selectAll("path").attr("style",s),o&&C.selectAll("path").attr("style",o),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",k=b?`${b}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${k})`)}return K(t,C),t.intersect=function(b){return G.circle(t,(t.width??0)/2,b)},h}p(Dg,"stateEnd");function Pg(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:o}=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 a;if(t.look==="handDrawn"){const l=X.svg(s).circle(0,0,t.width,rT(i));a=s.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=s.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&o&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return K(t,a),t.intersect=function(n){return G.circle(t,(t.width??7)/2,n)},s}p(Pg,"stateStart");var zr=8;async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t?.padding??8,s=t.look==="neo"?28:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.width??l.width)+2*zr+s,h=(t?.height??l.height)+a,d=c-2*zr,f=h,u=-c/2,g=-h/2,m=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const y=X.svg(n),C=V(t,{}),b=y.rectangle(u,g,d+16,f,C),k=y.line(u+zr,g,u+zr,g+f,C),w=y.line(u+zr+d,g,u+zr+d,g+f,C);n.insert(()=>k,":first-child"),n.insert(()=>w,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:_}=t;S.attr("class","basic label-container").attr("style",Nt(_)),K(t,S)}else{const y=Xe(n,d,f,m);i&&y.attr("style",i),K(t,y)}return t.intersect=function(y){return G.polygon(t,m,y)},n}p(Rg,"subroutine");var Ba=.2;async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-s*2-Ba*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.height?t?.height:l.height)+a*2,h=Ba*c,d=Ba*c,u=(t?.width?t?.width:l.width)+s*2+h-h,g=c,m=-u/2,y=-g/2,{cssStyles:C}=t,b=X.svg(n),k=V(t,{}),w=[{x:m-h/2,y},{x:m+u+h/2,y},{x:m+u+h/2,y:y+g},{x:m-h/2,y:y+g}],S=[{x:m+u-h/2,y:y+g},{x:m+u+h/2,y:y+g},{x:m+u+h/2,y:y+g-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ft(w),E=b.path(_,k),B=ft(S),q=b.path(B,{...k,fillStyle:"solid"}),I=n.insert(()=>q,":first-child");return I.insert(()=>E,":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),K(t,I),t.intersect=function(R){return G.polygon(t,w,R)},n}p(Ng,"taggedRect");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,f=l+c,{cssStyles:u}=t,g=X.svg(o),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:f/2},...hr(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],C=-n/2+n/2*.1,b=-f/2-d*.4,k=[{x:C+n-h,y:(b+l)*1.3},{x:C+n,y:b+l-d},{x:C+n,y:(b+l)*.9},...hr(C+n,(b+l)*1.25,C+n-h,(b+l)*1.3,-l*.02,.5)],w=ft(y),S=g.path(w,m),_=ft(k),E=g.path(_,{...m,fillStyle:"solid"}),B=o.insert(()=>E,":first-child");return B.insert(()=>S,":first-child"),B.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),K(t,B),t.intersect=function(q){return G.polygon(t,y,q)},o}p(qg,"taggedWaveEdgedRectangle");async function zg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await rt(e,t,et(t)),a=Math.max(s.width+(t.padding??0),t?.width||0),n=Math.max(s.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=o.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),K(t,h),t.intersect=function(d){return G.rect(t,d)},o}p(zg,"text");var Xw=p((e,t,r,i,o,s)=>`M${e},${t}
|
|
228
|
+
a${o},${s} 0,0,1 0,${-i}
|
|
229
|
+
l${r},0
|
|
230
|
+
a${o},${s} 0,0,1 0,${i}
|
|
231
|
+
M${r},${-i}
|
|
232
|
+
a${o},${s} 0,0,0 0,${i}
|
|
233
|
+
l${-r},0`,"createCylinderPathD"),Vw=p((e,t,r,i,o,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${o},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Zw=p((e,t,r,i,o,s)=>[`M${e+r/2},${-i/2}`,`a${o},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),_c=5,vc=10;async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?12:o/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-s,t.height<_c&&(t.height=_c);const C=m/2/(2.5+m/50);t.width=(t.width??0)-s-C*3,t.width<vc&&(t.width=vc)}const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=(t.height?t.height:n.height)+s,h=c/2,d=h/(2.5+c/50),f=(t.width?t.width:n.width)+d+s,{cssStyles:u}=t;let g;if(t.look==="handDrawn"){const m=X.svg(a),y=Vw(0,0,f,c,d,h),C=Zw(0,0,f,c,d,h),b=m.path(y,V(t,{})),k=m.path(C,V(t,{fill:"none"}));g=a.insert(()=>k,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),u&&g.attr("style",u)}else{const m=Xw(0,0,f,c,d,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Nt(u)).attr("style",i),g.attr("class","basic label-container outer-path"),u&&g.selectAll("path").attr("style",u),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,g),t.intersect=function(m){const y=G.rect(t,m),C=y.y-(t.y??0);if(h!=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-d)){let b=d*d*(1-C*C/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}p(Wg,"tiltedCylinder");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=(t.look==="neo",o),a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(d),C=g.path(y,m);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Xe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,K(t,f),t.intersect=function(g){return G.polygon(t,d,g)},n}p(Hg,"trapezoid");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await rt(e,t,et(t)),d=(t?.width?t?.width:h.width)+s*2,f=(t?.height?t?.height:h.height)+a*2,{cssStyles:u}=t,g=X.svg(c),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2*.8,y:-f/2},{x:d/2*.8,y:-f/2},{x:d/2,y:-f/2*.6},{x:d/2,y:f/2},{x:-d/2,y:f/2},{x:-d/2,y:-f/2*.6}],C=ft(y),b=g.path(C,m),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),K(t,k),t.intersect=function(w){return G.polygon(t,y,w)},c}p(Yg,"trapezoidalPentagon");var Bc=10,Lc=10;async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.width<Lc&&(t.width=Lc),t.height=t?.height??0,t.height<Bc&&(t.height=Bc));const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=je(Ct().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+s,d=t?.height?t?.height:h+n.height,f=d,u=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:g}=t,m=X.svg(a),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=ft(u),b=m.path(C,y),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=d,K(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return N.info("Triangle intersect",t,u,w),G.polygon(t,u,w)},a}p(Ug,"triangle");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await rt(e,t,et(t)),d=(t?.width?t?.width:c.width)+(s??0)*2,f=(t?.height?t?.height:c.height)+(a??0)*2,u=t.look==="neo"?f/4:f/8,g=f+(n?u:-u),{cssStyles:m}=t,C=14-d,b=C>0?C/2:0,k=X.svg(l),w=V(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-d/2-b,y:g/2},...hr(-d/2-b,g/2,d/2+b,g/2,u,.8),{x:d/2+b,y:-g/2},{x:-d/2-b,y:-g/2}],_=ft(S),E=k.path(_,w),B=l.insert(()=>E,":first-child");return B.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-u-(c.y-(c.top??0))})`),K(t,B),t.intersect=function(q){return G.polygon(t,S,q)},l}p(jg,"waveEdgedRectangle");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?20:o;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-w*(20/9)),t.width=t.width-s*2}const{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.width?t?.width:l.width)+s*2,h=(t?.height?t?.height:l.height)+a,d=h/8,f=h+d*2,{cssStyles:u}=t,g=X.svg(n),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:f/2},...hr(-c/2,f/2,c/2,f/2,d,1),{x:c/2,y:-f/2},...hr(c/2,-f/2,-c/2,-f/2,d,-1)],C=ft(y),b=g.path(C,m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),K(t,k),t.intersect=function(w){return G.polygon(t,y,w)},n}p(Gg,"waveRectangle");var At=10;async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-At,10),t.height=Math.max((t?.height??0)-s*2-At,10));const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=(t?.width?t?.width:n.width)+o*2+At,h=(t?.height?t?.height:n.height)+s*2+At,d=c-At,f=h-At,u=-d/2,g=-f/2,{cssStyles:m}=t,y=X.svg(a),C=V(t,{}),b=[{x:u-At,y:g-At},{x:u-At,y:g+f},{x:u+d,y:g+f},{x:u+d,y:g-At}],k=`M${u-At},${g-At} L${u+d},${g-At} L${u+d},${g+f} L${u-At},${g+f} L${u-At},${g-At}
|
|
234
|
+
M${u-At},${g} L${u+d},${g}
|
|
235
|
+
M${u},${g-At} L${u},${g+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=y.path(k,C),S=a.insert(()=>w,":first-child");return S.attr("transform",`translate(${At/2}, ${At/2})`),S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+At/2-(n.x-(n.left??0))}, ${-(n.height/2)+At/2-(n.y-(n.top??0))})`),K(t,S),t.intersect=function(_){return G.polygon(t,b,_)},a}p(Xg,"windowPane");var Fc=new Set(["redux-color","redux-dark-color"]),Kw=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Fl(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:o}=Bt(),{rowEven:s,rowOdd:a,nodeBorder:n,borderColorArray:l}=o;if(t.look==="handDrawn"){const{themeVariables:st}=Bt(),{background:ct}=st,Tt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ct}`]};await Fl(e,Tt)}const c=Bt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:f}=t,{labelStyles:u,nodeStyles:g}=Z(t);if(r.attributes.length===0&&t.label){const st={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ye(t.label,c)+st.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ct=await ki(e,t,st);if(i!=null&&Fc.has(i)){const Tt=r.colorIndex??0;ct.attr("data-color-id",`color-${Tt%l.length}`)}if(!je(c.htmlLabels)){const Tt=ct.select("text"),vt=Tt.node()?.getBBox();Tt.attr("transform",`translate(${-vt.width/2}, 0)`)}return ct}c.htmlLabels||(h*=1.25,d*=1.25);let m=et(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),C=await Yr(y,t.label??"",c,0,0,["name"],u);C.height+=d;let b=0;const k=[],w=[];let S=0,_=0,E=0,B=0,q=!0,I=!0;for(const st of r.attributes){const ct=await Yr(y,st.type,c,0,b,["attribute-type"],u);S=Math.max(S,ct.width+h);const Tt=await Yr(y,st.name,c,0,b,["attribute-name"],u);_=Math.max(_,Tt.width+h);const vt=await Yr(y,st.keys.join(),c,0,b,["attribute-keys"],u);E=Math.max(E,vt.width+h);const St=await Yr(y,st.comment,c,0,b,["attribute-comment"],u);B=Math.max(B,St.width+h);const lt=Math.max(ct.height,Tt.height,vt.height,St.height)+d;w.push({yOffset:b,rowHeight:lt}),b+=lt}let R=4;E<=h&&(q=!1,E=0,R--),B<=h&&(I=!1,B=0,R--);const W=y.node().getBBox();if(C.width+h*2-(S+_+E+B)>0){const st=C.width+h*2-(S+_+E+B);S+=st/R,_+=st/R,E>0&&(E+=st/R),B>0&&(B+=st/R)}const z=S+_+E+B,D=X.svg(y),A=V(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let L=0;w.length>0&&(L=w.reduce((st,ct)=>st+(ct?.rowHeight??0),0));const O=Math.max(W.width+h*2,t?.width||0,z),P=Math.max((L??0)+C.height,t?.height||0),H=-O/2,U=-P/2;if(y.selectAll("g:not(:first-child)").each((st,ct,Tt)=>{const vt=nt(Tt[ct]),St=vt.attr("transform");let lt=0,le=0;if(St){const dr=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(St);dr&&(lt=parseFloat(dr[1]),le=parseFloat(dr[2]),vt.attr("class").includes("attribute-name")?lt+=S:vt.attr("class").includes("attribute-keys")?lt+=S+_:vt.attr("class").includes("attribute-comment")&&(lt+=S+_+E))}vt.attr("transform",`translate(${H+h/2+lt}, ${le+U+C.height+d/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(U+d/2)+")"),i!=null&&Fc.has(i)){const st=r.colorIndex??0;y.attr("data-color-id",`color-${st%l.length}`)}const tt=D.rectangle(H,U,O,P,A),gt=y.insert(()=>tt,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[st,ct]of w.entries()){const vt=(st+1)%2===0&&ct.yOffset!==0,St=D.rectangle(H,C.height+U+ct?.yOffset,O,ct?.rowHeight,{...A,fill:vt?s:a,stroke:n});y.insert(()=>St,"g.label").attr("style",f.join("")).attr("class",`row-rect-${vt?"even":"odd"}`)}const dt=1e-4;let ut=Ur(H,C.height+U,O+H,C.height+U,dt),bt=D.polygon(ut.map(st=>[st.x,st.y]),A);if(y.insert(()=>bt).attr("class","divider"),ut=Ur(S+H,C.height+U,S+H,P+U,dt),bt=D.polygon(ut.map(st=>[st.x,st.y]),A),y.insert(()=>bt).attr("class","divider"),q){const st=S+_+H;ut=Ur(st,C.height+U,st,P+U,dt),bt=D.polygon(ut.map(ct=>[ct.x,ct.y]),A),y.insert(()=>bt).attr("class","divider")}if(I){const st=S+_+E+H;ut=Ur(st,C.height+U,st,P+U,dt),bt=D.polygon(ut.map(ct=>[ct.x,ct.y]),A),y.insert(()=>bt).attr("class","divider")}for(const st of k){const ct=C.height+U+st;ut=Ur(H,ct,O+H,ct,dt),bt=D.polygon(ut.map(Tt=>[Tt.x,Tt.y]),A),y.insert(()=>bt).attr("class","divider")}if(K(t,gt),g&&t.look!=="handDrawn")if(i!=null&&Kw.has(i))y.selectAll("path").attr("style",g);else{const ct=g.split(";")?.filter(Tt=>Tt.includes("stroke"))?.map(Tt=>`${Tt}`).join("; ");y.selectAll("path").attr("style",ct??""),y.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(st){return G.rect(t,st)},y}p(Fl,"erBox");async function Yr(e,t,r,i=0,o=0,s=[],a=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",a);t!==xh(t)&&(t=xh(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await Ge(n,t,{width:Ye(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(je(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=nt(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}p(Yr,"addText");function Ur(e,t,r,i,o){return e===r?[{x:e-o/2,y:t},{x:e+o/2,y:t},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:e,y:t-o/2},{x:e,y:t+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}p(Ur,"lineToPolygon");async function Vg(e,t,r,i,o=r.class.padding??12){const s=i?0:3,a=e.insert("g").attr("class",et(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,f=0,u=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Yi(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Yi(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=a.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await Yi(c,b,m,[b.parseClassifier()]);m+=k+s}u=c.node().getBBox().height,u<=0&&(u=o/2),h=a.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await Yi(h,b,y,[b.parseClassifier()]);y+=k+s}let C=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${d})`),C=a.node().getBBox(),c.attr("transform",`translate(0, ${d+f+o*2})`),C=a.node().getBBox(),h.attr("transform",`translate(0, ${d+f+(u?u+o*4:o*2)})`),C=a.node().getBBox(),{shapeSvg:a,bbox:C}}p(Vg,"textHelper");async function Yi(e,t,r,i=[]){const o=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Bt();let a="useHtmlLabels"in t?t.useHtmlLabels:je(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Qi(n)&&(a=!0);const l=await Ge(o,Rn(Fr(n)),{width:Ye(n,s)+50,classes:"markdown-node-label",useHtmlLabels:a},s);let c,h=1;if(a){const d=l.children[0],f=nt(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const g=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(m=>new Promise(y=>{function C(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=s.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,w=parseInt(b,10)*5+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";y(m)}p(C,"setupImage"),setTimeout(()=>{m.complete&&C()}),m.addEventListener("error",C),m.addEventListener("load",C)})))}c=d.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&nt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return o.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Yi,"addText");async function Zg(e,t){const r=Ct(),{themeVariables:i}=r,{useGradient:o}=i,s=r.class.padding??12,a=s,n=t.useHtmlLabels??je(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Vg(e,t,r,n,a),{labelStyles:d,nodeStyles:f}=Z(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=l.styles?.join(";")||f||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const g=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,m=X.svg(c),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=a:l.members.length>0&&l.methods.length===0&&(b+=a*2);const w=-C/2,S=-b/2;let _=g?s*2:l.members.length===0&&l.methods.length===0?-s:0;k&&(_=s*2);const E=m.rectangle(w-s,S-s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0),C+2*s,b+2*s+_,y),B=c.insert(()=>E,":first-child");B.attr("class","basic label-container outer-path");const q=B.node().getBBox(),I=c.select(".annotation-group").node().getBBox().height-(g?s/2:0)||0,R=c.select(".label-group").node().getBBox().height-(g?s/2:0)||0,W=c.select(".members-group").node().getBBox().height-(g?s/2:0)||0,z=(I+R+S+s-(S-s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(c.selectAll(".text").each((D,A,L)=>{const O=nt(L[A]),P=O.attr("transform");let H=0;if(P){const dt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);dt&&(H=parseFloat(dt[2]))}let U=H+S+s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(O.attr("class").includes("methods-group")){const gt=Math.max(W,a/2);k?U=Math.max(z,I+R+gt+S+a*2+s)+a*2:U=I+R+gt+S+a*4+s}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?U=H-a:U=H),n||(U-=4);let tt=w;(O.attr("class").includes("label-group")||O.attr("class").includes("annotation-group"))&&(tt=-O.node()?.getBBox().width/2||0,c.selectAll("text").each(function(gt,dt,ut){window.getComputedStyle(ut[dt]).textAnchor==="middle"&&(tt=0)})),O.attr("transform",`translate(${tt}, ${U})`)}),l.members.length>0||l.methods.length>0||g){const D=I+R+S+s,A=m.line(q.x,D,q.x+q.width,D+.001,y);c.insert(()=>A).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",u)}if(g||l.members.length>0||l.methods.length>0){const D=I+R+W+S+a*2+s,A=m.line(q.x,k?Math.max(z,D):D,q.x+q.width,(k?Math.max(z,D):D)+.001,y);c.insert(()=>A).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",u),B.select(":nth-child(2)").attr("style",u),c.selectAll(".divider").select("path").attr("style",u),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",u),!n){const D=RegExp(/color\s*:\s*([^;]*)/),A=D.exec(u);if(A){const L=A[0].replace("color","fill");c.selectAll("tspan").attr("style",L)}else if(d){const L=D.exec(d);if(L){const O=L[0].replace("color","fill");c.selectAll("tspan").attr("style",O)}}}return K(t,B),t.intersect=function(D){return G.rect(t,D)},c}p(Zg,"classBox");async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t,s=t,a=20,n=20,l="verifyMethod"in t,c=et(t),{themeVariables:h}=Ct(),{borderColorArray:d,requirementEdgeLabelBackground:f}=h,u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let g;l?g=await Le(u,`<<${o.type}>>`,0,t.labelStyle):g=await Le(u,"<<Element>>",0,t.labelStyle);let m=g;const y=await Le(u,o.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const q=await Le(u,`${o.requirementId?`ID: ${o.requirementId}`:""}`,m,t.labelStyle);m+=q;const I=await Le(u,`${o.text?`Text: ${o.text}`:""}`,m,t.labelStyle);m+=I;const R=await Le(u,`${o.risk?`Risk: ${o.risk}`:""}`,m,t.labelStyle);m+=R,await Le(u,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,m,t.labelStyle)}else{const q=await Le(u,`${s.type?`Type: ${s.type}`:""}`,m,t.labelStyle);m+=q,await Le(u,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,m,t.labelStyle)}const C=(u.node()?.getBBox().width??200)+a,b=(u.node()?.getBBox().height??200)+a,k=-C/2,w=-b/2,S=X.svg(u),_=V(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const E=S.rectangle(k,w,C,b,_),B=u.insert(()=>E,":first-child");if(B.attr("class","basic label-container outer-path").attr("style",i),d?.length){const q=t.colorIndex??0;u.attr("data-color-id",`color-${q%d.length}`)}if(u.selectAll(".label").each((q,I,R)=>{const W=nt(R[I]),z=W.attr("transform");let D=0,A=0;if(z){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);H&&(D=parseFloat(H[1]),A=parseFloat(H[2]))}const L=A-b/2;let O=k+a/2;(I===0||I===1)&&(O=D),W.attr("transform",`translate(${O}, ${L+a})`)}),m>g+y+n){const q=w+g+y+n;let I;if(t.look==="neo"){const z=[[k,q],[k+C,q],[k+C,q+.001],[k,q+.001]];I=S.polygon(z,_)}else I=S.line(k,q,k+C,q,_);u.insert(()=>I).attr("class","divider")}return K(t,B),t.intersect=function(q){return G.rect(t,q)},i&&t.look!=="handDrawn"&&(f||d?.length)&&u.selectAll("path").attr("style",i),u}p(Kg,"requirementBox");async function Le(e,t,r,i=""){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),s=Ct(),a=s.htmlLabels??!0,n=await Ge(o,Rn(Fr(t)),{width:Ye(t,s)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},s);let l;if(a){const c=n.children[0],h=nt(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return o.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(Le,"addText");var Qw=p(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 Qg(e,t,{config:r}){const{labelStyles:i,nodeStyles:o}=Z(t);t.labelStyle=i||"";const s=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=t.padding||10;let d="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await va(f,"ticket"in t&&t.ticket||"",u):{label:g,bbox:m}=await va(n,"ticket"in t&&t.ticket||"",u);const{label:y,bbox:C}=await va(n,"assigned"in t&&t.assigned||"",u);t.width=a;const b=10,k=t?.width||0,w=Math.max(m.height,C.height)/2,S=Math.max(l.height+b*2,t?.height||0)+w,_=-k/2,E=-S/2;c.attr("transform","translate("+(h-k/2)+", "+(-w-l.height/2)+")"),g.attr("transform","translate("+(h-k/2)+", "+(-w+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-C.width-2*s)+", "+(-w+l.height/2)+")");let B;const{rx:q,ry:I}=t,{cssStyles:R}=t;if(t.look==="handDrawn"){const W=X.svg(n),z=V(t,{}),D=q||I?W.path(cr(_,E,k,S,q||0),z):W.rectangle(_,E,k,S,z);B=n.insert(()=>D,":first-child"),B.attr("class","basic label-container").attr("style",R||null)}else{B=n.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",o).attr("rx",q??5).attr("ry",I??5).attr("x",_).attr("y",E).attr("width",k).attr("height",S);const W="priority"in t&&t.priority;if(W){const z=n.append("line"),D=_+2,A=E+Math.floor((q??0)/2),L=E+S-Math.floor((q??0)/2);z.attr("x1",D).attr("y1",A).attr("x2",D).attr("y2",L).attr("stroke-width","4").attr("stroke",Qw(W))}}return K(t,B),t.height=S,t.intersect=function(W){return G.rect(t,W)},n}p(Qg,"kanbanItem");async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await rt(e,t,et(t)),l=s.width+10*a,c=s.height+8*a,h=.15*l,{cssStyles:d}=t,f=s.width+20,u=s.height+20,g=Math.max(l,f),m=Math.max(c,u);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const C=`M0 0
|
|
236
|
+
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
|
|
237
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
238
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
239
|
+
a${h},${h} 1 0,0 ${g*.25},${m*.1}
|
|
240
|
+
|
|
241
|
+
a${h},${h} 1 0,0 ${g*.15},${m*.33}
|
|
242
|
+
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
|
|
243
|
+
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
|
|
244
|
+
|
|
245
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
|
|
246
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
247
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
248
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
|
|
249
|
+
|
|
250
|
+
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
|
|
251
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
|
|
252
|
+
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
|
|
253
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=X.svg(o),k=V(t,{}),w=b.path(C,k);y=o.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",Nt(d))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),K(t,y),t.calcIntersect=function(b,k){return G.rect(b,k)},t.intersect=function(b){return N.info("Bang intersect",t,b),G.rect(t,b)},o}p(Jg,"bang");async function tm(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await rt(e,t,et(t)),l=s.width+2*a,c=s.height+2*a,h=.15*l,d=.25*l,f=.35*l,u=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
|
|
254
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
255
|
+
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|
256
|
+
a${d},${d} 1 0,1 ${l*.35},${l*.2}
|
|
257
|
+
|
|
258
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
259
|
+
a${u},${u} 1 0,1 ${-1*l*.15},${c*.65}
|
|
260
|
+
|
|
261
|
+
a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
262
|
+
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|
263
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
264
|
+
|
|
265
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
266
|
+
a${u},${u} 1 0,1 ${l*.1},${-1*c*.65}
|
|
267
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=X.svg(o),b=V(t,{}),k=C.path(y,b);m=o.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",Nt(g))}else m=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),K(t,m),t.calcIntersect=function(C,b){return G.rect(C,b)},t.intersect=function(C){return N.info("Cloud intersect",t,C),G.rect(t,C)},o}p(tm,"cloud");async function em(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await rt(e,t,et(t)),l=s.width+8*a,c=s.height+2*a,h=5,d=t.look==="neo"?`
|
|
268
|
+
M${-l/2} ${c/2-h}
|
|
269
|
+
v${-c+2*h}
|
|
270
|
+
q0,-${h} ${h},-${h}
|
|
271
|
+
h${l-2*h}
|
|
272
|
+
q${h},0 ${h},${h}
|
|
273
|
+
v${c-h}
|
|
274
|
+
H${-l/2}
|
|
275
|
+
Z
|
|
276
|
+
`:`
|
|
277
|
+
M${-l/2} ${c/2-h}
|
|
278
|
+
v${-c+2*h}
|
|
279
|
+
q0,-${h} ${h},-${h}
|
|
280
|
+
h${l-2*h}
|
|
281
|
+
q${h},0 ${h},${h}
|
|
282
|
+
v${c-2*h}
|
|
283
|
+
q0,${h} ${-h},${h}
|
|
284
|
+
h${-(l-2*h)}
|
|
285
|
+
q${-h},0 ${-h},${-h}
|
|
286
|
+
Z
|
|
287
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=o.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),o.append(()=>n.node()),K(t,f),t.calcIntersect=function(u,g){return G.rect(u,g)},t.intersect=function(u){return G.rect(t,u)},o}p(em,"defaultMindmapNode");async function rm(e,t){const r={padding:t.padding??0};return Ll(e,t,r)}p(rm,"mindmapCircle");var Jw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:$g},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Ag},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Og},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Rg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:rg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ig},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ll},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Jg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:tm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Bg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:cg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:bg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:xg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Hg},{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:yg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:sg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:zg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Xp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Eg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Pg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Dg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:lg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:dg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Qp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Jp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:tg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:kg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:jg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:hg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Wg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Tg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:eg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:og},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Ug},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Xg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ag},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Yg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ng},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Mg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:_g},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Sg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Gp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Kp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:qg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ng},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Gg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Lg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:wg}],tS=p(()=>{const t=[...Object.entries({state:Ig,choice:Vp,note:vg,rectWithTitle:Fg,labelRect:Cg,iconSquare:gg,iconCircle:fg,icon:ug,iconRounded:pg,imageSquare:mg,anchor:Up,kanbanItem:Qg,mindmapCircle:rm,defaultMindmapNode:em,classBox:Zg,erBox:Fl,requirementBox:Kg}),...Jw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(o=>[o,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),im=tS();function eS(e){return e in im}p(eS,"isValidShape");var Us=new Map;async function om(e,t,r){let i,o;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?im[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),o=await s(i,t,r)}else o=await s(e,t,r),i=o;return i.attr("data-look",Nt(t.look)),t.tooltip&&o.attr("title",t.tooltip),Us.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(om,"insertNode");var FL=p((e,t)=>{Us.set(t.id,e)},"setNodeElem"),AL=p(()=>{Us.clear()},"clear"),EL=p(e=>{const t=Us.get(e.id);N.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"),rS=p((e,t,r,i,o,s=!1,a)=>{t.arrowTypeStart&&Ac(e,"start",t.arrowTypeStart,r,i,o,s,a),t.arrowTypeEnd&&Ac(e,"end",t.arrowTypeEnd,r,i,o,s,a)},"addEdgeMarkers"),iS={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}},oS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Ac=p((e,t,r,i,o,s,a=!1,n)=>{const l=iS[r],c=l&&oS.includes(l.type);if(!l){N.warn(`Unknown arrow type: ${r}`);return}const h=l.type,u=`${o}_${s}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const g=n.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${g}`;if(!document.getElementById(m)){const y=document.getElementById(u);if(y){const C=y.cloneNode(!0);C.id=m,C.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",n),l.fill&&k.setAttribute("fill",n)}),y.parentNode?.appendChild(C)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),sS=p(e=>typeof e=="string"?e:Ct()?.flowchart?.curve,"resolveEdgeCurveType"),Ls=new Map,Wt=new Map,ML=p(()=>{Ls.clear(),Wt.clear()},"clear"),Di=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),aS=p(async(e,t)=>{const r=Ct();let i=ee(r);const{labelStyles:o}=Z(t);t.labelStyle=o;const s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Ge(e,t.label,{style:Di(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),N.info("abc82",t,t.labelType);let h=c.getBBox(),d=h;if(i){const u=c.children[0],g=nt(c);h=u.getBoundingClientRect(),d=h,g.attr("width",h.width),g.attr("height",h.height)}else{const u=nt(c).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}a.attr("transform",Ei(d,i)),Ls.set(t.id,s),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),g=u.insert("g").attr("class","inner"),m=await rr(g,t.startLabelLeft,Di(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const C=m.children[0],b=nt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Ei(y,i)),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).startLeft=u,Ui(f,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),g=u.insert("g").attr("class","inner"),m=await rr(g,t.startLabelRight,Di(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const C=m.children[0],b=nt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Ei(y,i)),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).startRight=u,Ui(f,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),g=u.insert("g").attr("class","inner"),m=await rr(u,t.endLabelLeft,Di(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const C=m.children[0],b=nt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Ei(y,i)),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).endLeft=u,Ui(f,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),g=u.insert("g").attr("class","inner"),m=await rr(u,t.endLabelRight,Di(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const C=m.children[0],b=nt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Ei(y,i)),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).endRight=u,Ui(f,t.endLabelRight)}return c},"insertEdgeLabel");function Ui(e,t){ee(Ct())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Ui,"setTerminalWidth");var nS=p((e,t)=>{N.debug("Moving label abc88 ",e.id,e.label,Ls.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Ct(),{subGraphTitleTotalMargin:o}=gl(i);if(e.label){const s=Ls.get(e.id);let a=e.x,n=e.y;if(r){const l=ye.calcLabelPosition(r);N.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}s.attr("transform",`translate(${a}, ${n+o/2})`)}if(e.startLabelLeft){const s=Wt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const s=Wt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const s=Wt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const s=Wt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),lS=p((e,t)=>{const r=e.x,i=e.y,o=Math.abs(t.x-r),s=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return o>=a||s>=n},"outsideNode"),hS=p((e,t,r)=>{N.debug(`intersection calc abc89:
|
|
288
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
289
|
+
insidePoint : ${JSON.stringify(r)}
|
|
290
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,o=e.y,s=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-s:a+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(o-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-o:o-l-t.y;n=h*d/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),N.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,u=r.y<t.y?r.y+d:r.y-d;return N.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:f,_y:u}),n===0&&(f=t.x,u=t.y),h===0&&(f=t.x),c===0&&(u=t.y),{x:f,y:u}}},"intersection"),Ec=p((e,t)=>{N.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],o=!1;return e.forEach(s=>{if(N.info("abc88 checking point",s,t),!lS(t,s)&&!o){const a=hS(t,i,s);N.debug("abc88 inside",s,i,a),N.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?N.warn("abc88 no intersect",a,r):r.push(a),o=!0}else N.warn("abc88 outside",s,i),i=s,o||r.push(s)}),N.debug("returning points",r),r},"cutPathAtIntersect");function sm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const o=e[i-1],s=e[i],a=e[i+1];(o.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5||o.y===s.y&&s.x===a.x&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(sm,"extractCornerPoints");var Mc=p(function(e,t,r){const i=t.x-e.x,o=t.y-e.y,s=Math.sqrt(i*i+o*o),a=r/s;return{x:t.x-a*i,y:t.y-a*o}},"findAdjacentPoint"),cS=p(function(e){const{cornerPointPositions:t}=sm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const o=e[i-1],s=e[i+1],a=e[i],n=Mc(o,a,5),l=Mc(s,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(s.x-o.x)>10&&Math.abs(s.y-o.y)>=10){N.debug("Corner point fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));const u=5;a.x===n.x?f={x:c<0?n.x-u+d:n.x+u-d,y:h<0?n.y-d:n.y+d}:f={x:c<0?n.x-d:n.x+d,y:h<0?n.y-u+d:n.y+u-d}}else N.debug("Corner point skipping fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),dS=p((e,t,r)=>{const i=e-t-r,o=2,s=2,a=o+s,n=Math.floor(i/a),l=Array(n).fill(`${o} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),uS=p(function(e,t,r,i,o,s,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=Ct();let c=t.points,h=!1;const d=o;var f=s;const u=[];for(const O in t.cssCompiledStyles)ip(O)||u.push(t.cssCompiledStyles[O]);N.debug("UIO intersect check",t.points,f.x,d.x),f.intersect&&d.intersect&&!n&&(c=c.slice(1,t.points.length-1),c.unshift(d.intersect(c[0])),N.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(N.info("to cluster abc88",r.get(t.toCluster)),c=Ec(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(N.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Ec(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(O=>!Number.isNaN(O.y));const y=sS(t.curve);y!=="rounded"&&(m=cS(m));let C=Vi;switch(y){case"linear":C=Vi;break;case"basis":C=Xa;break;case"cardinal":C=Yd;break;case"bumpX":C=Nd;break;case"bumpY":C=qd;break;case"catmullRom":C=jd;break;case"monotoneX":C=Qd;break;case"monotoneY":C=Jd;break;case"natural":C=eu;break;case"step":C=ru;break;case"stepAfter":C=ou;break;case"stepBefore":C=iu;break;case"rounded":C=Vi;break;default:C=Xa}const{x:b,y:k}=s2(t),w=Wk().x(b).y(k).curve(C);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let _,E=y==="rounded"?am(nm(m,t),5):w(m);const B=Array.isArray(t.style)?t.style:[t.style];let q=B.find(O=>O?.startsWith("stroke:")),I="";t.animate&&(I="edge-animation-fast"),t.animation&&(I="edge-animation-"+t.animation);let R=!1;if(t.look==="handDrawn"){const O=X.svg(e);Object.assign([],m);const P=O.path(E,{roughness:.3,seed:l});S+=" transition",_=nt(P).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",B?B.reduce((U,tt)=>U+";"+tt,""):"");let H=_.attr("d");_.attr("d",H),e.node().appendChild(_.node())}else{const O=u.join(";"),P=B?B.reduce((ut,bt)=>ut+bt+";",""):"",H=(O?O+";"+P+";":P)+";"+(B?B.reduce((ut,bt)=>ut+";"+bt,""):"");_=e.append("path").attr("d",E).attr("id",`${a}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",H),q=H.match(/stroke:([^;]+)/)?.[1],R=t.animate===!0||!!t.animation||O.includes("animation");const U=_.node(),tt=typeof U.getTotalLength=="function"?U.getTotalLength():0,gt=jh[t.arrowTypeStart]||0,dt=jh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!R){const bt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?dS(tt,gt,dt):`0 ${gt} ${tt-gt-dt} ${dt}`}; stroke-dashoffset: 0;`;_.attr("style",bt+_.attr("style"))}}_.attr("data-edge",!0),_.attr("data-et","edge"),_.attr("data-id",t.id),_.attr("data-points",g),_.attr("data-look",Nt(t.look)),t.showPoints&&m.forEach(O=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",O.x).attr("cy",O.y)});let W="";(Ct().flowchart.arrowMarkerAbsolute||Ct().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),N.info("arrowTypeStart",t.arrowTypeStart),N.info("arrowTypeEnd",t.arrowTypeEnd);const z=!R&&t?.look==="neo";rS(_,t,W,a,i,z,q);const D=Math.floor(c.length/2),A=c[D];ye.isLabelCoordinateInPath(A,_.attr("d"))||(h=!0);let L={};return h&&(L.updatedPath=c),L.originalPath=t.points,L},"insertEdge");function am(e,t){if(e.length<2)return"";let r="";const i=e.length,o=1e-5;for(let s=0;s<i;s++){const a=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${a.x},${a.y}`;else if(s===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,f=l.y-a.y,u=Math.hypot(c,h),g=Math.hypot(d,f);if(u<o||g<o){r+=`L${a.x},${a.y}`;continue}const m=c/u,y=h/u,C=d/g,b=f/g,k=m*C+y*b,w=Math.max(-1,Math.min(1,k)),S=Math.acos(w);if(S<o||Math.abs(Math.PI-S)<o){r+=`L${a.x},${a.y}`;continue}const _=Math.min(t/Math.sin(S/2),u/2,g/2),E=a.x-m*_,B=a.y-y*_,q=a.x+C*_,I=a.y+b*_;r+=`L${E},${B}`,r+=`Q${a.x},${a.y} ${q},${I}`}}return r}p(am,"generateRoundedPath");function _n(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}}p(_n,"calculateDeltaAndAngle");function nm(e,t){const r=e.map(o=>({...o}));if(e.length>=2&&jt[t.arrowTypeStart]){const o=jt[t.arrowTypeStart],s=e[0],a=e[1],{angle:n}=_n(s,a),l=o*Math.cos(n),c=o*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&jt[t.arrowTypeEnd]){const o=jt[t.arrowTypeEnd],s=e[i-1],a=e[i-2],{angle:n}=_n(a,s),l=o*Math.cos(n),c=o*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}p(nm,"applyMarkerOffsetsToPoints");var fS=p((e,t,r,i)=>{t.forEach(o=>{DS[o](e,r,i)})},"insertMarkers"),pS=p((e,t,r)=>{N.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",20).attr("markerHeight",28).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"),gS=p((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"),mS=p((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"),yS=p((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"),CS=p((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"),xS=p((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"),bS=p((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"),kS=p((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"),TS=p((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"),wS=p((e,t,r)=>{const i=Bt(),{themeVariables:o}=i,{transitionColor:s}=o;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"),SS=p((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"),_S=p((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 o=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");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),vS=p((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"),BS=p((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 o=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");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),LS=p((e,t,r)=>{const i=Bt(),{themeVariables:o}=i,{strokeWidth:s}=o;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"),FS=p((e,t,r)=>{const i=Bt(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,n=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");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),n.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",a??"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"),AS=p((e,t,r)=>{const i=Bt(),{themeVariables:o}=i,{strokeWidth:s}=o;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"),ES=p((e,t,r)=>{const i=Bt(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,n=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");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),n.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",a??"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"),MS=p((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
|
|
291
|
+
L20,10
|
|
292
|
+
M20,10
|
|
293
|
+
L0,20`)},"requirement_arrow"),$S=p((e,t,r)=>{const i=Bt(),{themeVariables:o}=i,{strokeWidth:s}=o;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
|
|
294
|
+
L20,10
|
|
295
|
+
M20,10
|
|
296
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),OS=p((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"),IS=p((e,t,r)=>{const i=Bt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=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");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),DS={extension:pS,composition:gS,aggregation:mS,dependency:yS,lollipop:CS,point:xS,circle:bS,cross:kS,barb:TS,barbNeo:wS,only_one:SS,zero_or_one:_S,one_or_more:vS,zero_or_more:BS,only_one_neo:LS,zero_or_one_neo:FS,one_or_more_neo:AS,zero_or_more_neo:ES,requirement_arrow:MS,requirement_contains:OS,requirement_arrow_neo:$S,requirement_contains_neo:IS},PS=fS,RS={common:uo,getConfig:Bt,insertCluster:Iw,insertEdge:uS,insertEdgeLabel:aS,insertMarkers:PS,insertNode:om,interpolateToCurve:hl,labelHelper:rt,log:N,positionEdgeLabel:nS},lo={},lm=p(e=>{for(const t of e)lo[t.name]=t},"registerLayoutLoaders"),NS=p(()=>{lm([{name:"dagre",loader:p(async()=>await pt(()=>import("./dagre-BM42HDAG-De9CyhMh.js"),__vite__mapDeps([0,1,2,3,4])),"loader")},{name:"cose-bilkent",loader:p(async()=>await pt(()=>import("./cose-bilkent-S5V4N54A-Ds62_zKQ.js"),__vite__mapDeps([5,6,3,4])),"loader")}])},"registerDefaultLayoutLoaders");NS();var $L=p(async(e,t)=>{if(!(e.layoutAlgorithm in lo))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=lo[e.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:s}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-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",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-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",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,RS,{algorithm:r.algorithm})},"render"),OL=p((e="",{fallback:t="dagre"}={})=>{if(e in lo)return e;if(t in lo)return N.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"),Al="comm",hm="rule",cm="decl",qS="@media",zS="@import",WS="@supports",HS="@namespace",vn="@keyframes",dm="@layer",YS="@scope",US=Math.abs,Ki=String.fromCharCode;function um(e){return e.trim()}function Bn(e,t,r){return e.replace(t,r)}function Zr(e,t){return e.charCodeAt(t)|0}function yi(e,t,r){return e.slice(t,r)}function Fe(e){return e.length}function fm(e){return e.length}function Ro(e,t){return t.push(e),e}var js=1,Ci=1,pm=0,de=0,$t=0,Ti="";function El(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:js,column:Ci,length:a,return:"",siblings:n}}function jS(){return $t}function GS(){return $t=de>0?Zr(Ti,--de):0,Ci--,$t===10&&(Ci=1,js--),$t}function xe(){return $t=de<pm?Zr(Ti,de++):0,Ci++,$t===10&&(Ci=1,js++),$t}function ir(){return Zr(Ti,de)}function Ko(){return de}function Gs(e,t){return yi(Ti,e,t)}function ho(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 XS(e){return js=Ci=1,pm=Fe(Ti=e),de=0,[]}function VS(e){return Ti="",e}function La(e){return um(Gs(de-1,Ln(e===91?e+2:e===40?e+1:e)))}function ZS(e){for(;($t=ir())&&$t<33;)xe();return ho(e)>2||ho($t)>3?"":" "}function KS(e,t){for(;--t&&xe()&&!($t<48||$t>102||$t>57&&$t<65||$t>70&&$t<97););return Gs(e,Ko()+(t<6&&ir()==32&&xe()==32))}function Ln(e){for(;xe();)switch($t){case e:return de;case 34:case 39:e!==34&&e!==39&&Ln($t);break;case 40:e===41&&Ln(e);break;case 92:xe();break}return de}function QS(e,t){for(;xe()&&e+$t!==57;)if(e+$t===84&&ir()===47)break;return"/*"+Gs(t,de-1)+"*"+Ki(e===47?e:xe())}function JS(e){for(;!ho(ir());)xe();return Gs(e,de)}function t_(e){return VS(Qo("",null,null,null,[""],e=XS(e),0,[0],e))}function Qo(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,g=0,m=1,y=1,C=1,b=0,k=0,w="",S=o,_=s,E=i,B=w;y;)switch(g=k,k=xe()){case 40:g!=108&&Zr(B,d-1)==58?(b++,B+="("):B+=La(k);break;case 41:b--,B+=")";break;case 34:case 39:case 91:B+=La(k);break;case 9:case 10:case 13:case 32:if(b>0){B+=Ki(k);break}B+=ZS(g);break;case 92:B+=KS(Ko()-1,7);continue;case 47:switch(ir()){case 42:case 47:Ro(e_(QS(xe(),Ko()),t,r,l),l),(ho(g||1)==5||ho(ir()||1)==5)&&Fe(B)&&yi(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*m:n[c++]=Fe(B)*C;case 125*m:case 59:case 0:if(b>0&&k){B+=Ki(k);break}switch(k){case 0:case 125:y=0;case 59+h:C==-1&&(B=Bn(B,/\f/g,"")),u>0&&(Fe(B)-d||m===0)&&Ro(u>32?Oc(B+";",i,r,d-1,l):Oc(Bn(B," ","")+";",i,r,d-2,l),l);break;case 59:B+=";";default:if(Ro(E=$c(B,t,r,c,h,o,n,w,S=[],_=[],d,s),s),k===123)if(h===0)Qo(B,t,E,E,S,s,d,n,_);else{switch(f){case 99:if(Zr(B,3)===110)break;case 108:if(Zr(B,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Qo(e,E,E,i&&Ro($c(e,E,E,0,0,o,n,w,o,S=[],d,_),_),o,_,d,n,i?S:_):Qo(B,E,E,E,[""],_,0,n,_)}}c=h=u=0,m=C=1,w=B="",d=a;break;case 58:d=1+Fe(B),u=g;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&GS()==125)continue}switch(B+=Ki(k),k*m){case 38:C=h>0?1:(B+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Fe(B)-1)*C,C=1;break;case 64:ir()===45&&(B+=La(xe())),f=ir(),h=d=Fe(w=B+=JS(Ko())),k++;break;case 45:g===45&&Fe(B)==2&&(m=0)}}return s}function $c(e,t,r,i,o,s,a,n,l,c,h,d){for(var f=o-1,u=o===0?s:[""],g=fm(u),m=0,y=0,C=0;m<i;++m)for(var b=0,k=yi(e,f+1,f=US(y=a[m])),w=e;b<g;++b)(w=um(y>0?u[b]+" "+k:Bn(k,/&\f/g,u[b])))&&(l[C++]=w);return El(e,t,r,o===0?hm:n,l,c,h,d)}function e_(e,t,r,i){return El(e,t,r,Al,Ki(jS()),yi(e,2,-2),0,i)}function Oc(e,t,r,i,o){return El(e,t,r,cm,yi(e,0,i),yi(e,i+1,-1),i,o)}function Fn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function r_(e,t,r,i){switch(e.type){case dm:if(e.children.length)break;case zS:case HS:case cm:return e.return=e.return||e.value;case Al:return"";case vn:return e.return=e.value+"{"+Fn(e.children,i)+"}";case hm:if(!Fe(e.value=e.props.join(",")))return""}return Fe(r=Fn(e.children,i))?e.return=e.value+"{"+r+"}":""}function i_(e){var t=fm(e);return function(r,i,o,s){for(var a="",n=0;n<t;n++)a+=e[n](r,i,o,s)||"";return a}}var gm="c4",o_=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),s_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-BgS3ci_x.js");return{diagram:t}},__vite__mapDeps([7,8,3,4]));return{id:gm,diagram:e}},"loader"),a_={id:gm,detector:o_,loader:s_},n_=a_,mm="flowchart",l_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),h_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-kaKS6P_m.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:mm,diagram:e}},"loader"),c_={id:mm,detector:l_,loader:h_},d_=c_,ym="flowchart-v2",u_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),f_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-kaKS6P_m.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:ym,diagram:e}},"loader"),p_={id:ym,detector:u_,loader:f_},g_=p_,Cm="er",m_=p(e=>/^\s*erDiagram/.test(e),"detector"),y_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-BjT0k23c.js");return{diagram:t}},__vite__mapDeps([14,11,12,13,3,4]));return{id:Cm,diagram:e}},"loader"),C_={id:Cm,detector:m_,loader:y_},x_=C_,xm="gitGraph",b_=p(e=>/^\s*gitGraph/.test(e),"detector"),k_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-C5-QVJMh.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,3,4]));return{id:xm,diagram:e}},"loader"),T_={id:xm,detector:b_,loader:k_},w_=T_,bm="gantt",S_=p(e=>/^\s*gantt/.test(e),"detector"),__=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-CW8IoCY6.js");return{diagram:t}},__vite__mapDeps([19,3,4,20,21,22]));return{id:bm,diagram:e}},"loader"),v_={id:bm,detector:S_,loader:__},B_=v_,km="info",L_=p(e=>/^\s*info/.test(e),"detector"),F_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-CG7QnPme.js");return{diagram:t}},__vite__mapDeps([23,18,3,4]));return{id:km,diagram:e}},"loader"),A_={id:km,detector:L_,loader:F_},Tm="pie",E_=p(e=>/^\s*pie/.test(e),"detector"),M_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-DeQnXQoJ.js");return{diagram:t}},__vite__mapDeps([24,16,18,3,4,25,26,21]));return{id:Tm,diagram:e}},"loader"),$_={id:Tm,detector:E_,loader:M_},wm="quadrantChart",O_=p(e=>/^\s*quadrantChart/.test(e),"detector"),I_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB--ocdxSbH.js");return{diagram:t}},__vite__mapDeps([27,20,21,22,3,4]));return{id:wm,diagram:e}},"loader"),D_={id:wm,detector:O_,loader:I_},P_=D_,Sm="xychart",R_=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),N_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-C5rj3Hpu.js");return{diagram:t}},__vite__mapDeps([28,21,26,20,22,3,4]));return{id:Sm,diagram:e}},"loader"),q_={id:Sm,detector:R_,loader:N_},z_=q_,_m="requirement",W_=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),H_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-CJq21gDX.js");return{diagram:t}},__vite__mapDeps([29,11,12,3,4]));return{id:_m,diagram:e}},"loader"),Y_={id:_m,detector:W_,loader:H_},U_=Y_,vm="sequence",j_=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),G_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-BuH8el8s.js");return{diagram:t}},__vite__mapDeps([30,8,17,3,4]));return{id:vm,diagram:e}},"loader"),X_={id:vm,detector:j_,loader:G_},V_=X_,Bm="class",Z_=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),K_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-DHqakOiv.js");return{diagram:t}},__vite__mapDeps([31,32,10,8,11,12,3,4]));return{id:Bm,diagram:e}},"loader"),Q_={id:Bm,detector:Z_,loader:K_},J_=Q_,Lm="classDiagram",tv=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),ev=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-DHqakOiv.js");return{diagram:t}},__vite__mapDeps([33,32,10,8,11,12,3,4]));return{id:Lm,diagram:e}},"loader"),rv={id:Lm,detector:tv,loader:ev},iv=rv,Fm="state",ov=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),sv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-CqZ_L1ch.js");return{diagram:t}},__vite__mapDeps([34,35,11,12,1,2,3,4]));return{id:Fm,diagram:e}},"loader"),av={id:Fm,detector:ov,loader:sv},nv=av,Am="stateDiagram",lv=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),hv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-DkD_6IX-.js");return{diagram:t}},__vite__mapDeps([36,35,11,12,3,4]));return{id:Am,diagram:e}},"loader"),cv={id:Am,detector:lv,loader:hv},dv=cv,Em="journey",uv=p(e=>/^\s*journey/.test(e),"detector"),fv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-EKXFhiai.js");return{diagram:t}},__vite__mapDeps([37,10,8,25,3,4]));return{id:Em,diagram:e}},"loader"),pv={id:Em,detector:uv,loader:fv},gv=pv,mv=p((e,t,r)=>{N.debug(`rendering svg for syntax error
|
|
297
|
+
`);const i=Kk(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),ld(i,100,512,!0),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),Mm={draw:mv},yv=Mm,Cv={db:{},renderer:Mm,parser:{parse:p(()=>{},"parse")}},xv=Cv,$m="flowchart-elk",bv=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),kv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-kaKS6P_m.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:$m,diagram:e}},"loader"),Tv={id:$m,detector:bv,loader:kv},wv=Tv,Om="timeline",Sv=p(e=>/^\s*timeline/.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-BIrIbCOG.js");return{diagram:t}},__vite__mapDeps([38,25,3,4]));return{id:Om,diagram:e}},"loader"),vv={id:Om,detector:Sv,loader:_v},Bv=vv,Im="mindmap",Lv=p(e=>/^\s*mindmap/.test(e),"detector"),Fv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-ByCTUtXz.js");return{diagram:t}},__vite__mapDeps([39,11,12,3,4]));return{id:Im,diagram:e}},"loader"),Av={id:Im,detector:Lv,loader:Fv},Ev=Av,Dm="kanban",Mv=p(e=>/^\s*kanban/.test(e),"detector"),$v=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-Ckbr1P9R.js");return{diagram:t}},__vite__mapDeps([40,10,3,4]));return{id:Dm,diagram:e}},"loader"),Ov={id:Dm,detector:Mv,loader:$v},Iv=Ov,Pm="sankey",Dv=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Pv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-U373GNMv.js");return{diagram:t}},__vite__mapDeps([41,26,21,3,4]));return{id:Pm,diagram:e}},"loader"),Rv={id:Pm,detector:Dv,loader:Pv},Nv=Rv,Rm="packet",qv=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),zv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-BcK1LGRh.js");return{diagram:t}},__vite__mapDeps([42,16,18,3,4]));return{id:Rm,diagram:e}},"loader"),Wv={id:Rm,detector:qv,loader:zv},Nm="radar",Hv=p(e=>/^\s*radar-beta/.test(e),"detector"),Yv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-Db7DRtzA.js");return{diagram:t}},__vite__mapDeps([43,16,18,3,4]));return{id:Nm,diagram:e}},"loader"),Uv={id:Nm,detector:Hv,loader:Yv},qm="block",jv=p(e=>/^\s*block(-beta)?/.test(e),"detector"),Gv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-DEDpa_4t.js");return{diagram:t}},__vite__mapDeps([44,10,1,13,3,4]));return{id:qm,diagram:e}},"loader"),Xv={id:qm,detector:jv,loader:Gv},Vv=Xv,zm="treeView",Zv=p(e=>/^\s*treeView-beta/.test(e),"detector"),Kv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-DXeGI1-M.js");return{diagram:t}},__vite__mapDeps([45,16,17,18,3,4]));return{id:zm,diagram:e}},"loader"),Qv={id:zm,detector:Zv,loader:Kv},Jv=Qv,Wm="architecture",tB=p(e=>/^\s*architecture/.test(e),"detector"),eB=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-Ak9jpJ8q.js");return{diagram:t}},__vite__mapDeps([46,16,18,3,4,6]));return{id:Wm,diagram:e}},"loader"),rB={id:Wm,detector:tB,loader:eB},iB=rB,Hm="eventmodeling",oB=p(e=>/^\s*eventmodeling/.test(e),"detector"),sB=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-Llle6qEC.js");return{diagram:t}},__vite__mapDeps([47,16,18,3,4]));return{id:Hm,diagram:e}},"loader"),aB={id:Hm,detector:oB,loader:sB},nB=aB,Ym="ishikawa",lB=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),hB=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-DitLiYai.js");return{diagram:t}},__vite__mapDeps([48,3,4]));return{id:Ym,diagram:e}},"loader"),cB={id:Ym,detector:lB,loader:hB},Um="venn",dB=p(e=>/^\s*venn-beta/.test(e),"detector"),uB=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-Dmk1mluX.js");return{diagram:t}},__vite__mapDeps([49,3,4]));return{id:Um,diagram:e}},"loader"),fB={id:Um,detector:dB,loader:uB},pB=fB,jm="treemap",gB=p(e=>/^\s*treemap/.test(e),"detector"),mB=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-0_sJ3YRD.js");return{diagram:t}},__vite__mapDeps([50,12,16,18,3,4,22,26,21]));return{id:jm,diagram:e}},"loader"),yB={id:jm,detector:gB,loader:mB},Gm="wardley-beta",CB=p(e=>/^\s*wardley-beta/i.test(e),"detector"),xB=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-CiK-Q213.js");return{diagram:t}},__vite__mapDeps([51,16,18,3,4]));return{id:Gm,diagram:e}},"loader"),bB={id:Gm,detector:CB,loader:xB},kB=bB,Ic=!1,Xs=p(()=>{Ic||(Ic=!0,is("error",xv,e=>e.toLowerCase().trim()==="error"),is("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),$a(wv,Ev,iB),$a(n_,Iv,iv,J_,x_,B_,A_,$_,U_,V_,g_,d_,Bv,w_,dv,nv,gv,P_,Nv,Wv,z_,Vv,nB,Jv,Uv,cB,yB,pB,kB))},"addDiagrams"),TB=p(async()=>{N.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(_r).map(async([r,{detector:i,loader:o}])=>{if(o)try{Ra(r)}catch{try{const{diagram:s,id:a}=await o();is(a,s,i)}catch(s){throw N.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete _r[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){N.error(`Failed to load ${t.length} external diagrams`);for(const r of t)N.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),wB="graphics-document document";function Xm(e,t){e.attr("role",wB),t!==""&&e.attr("aria-roledescription",t)}p(Xm,"setA11yDiagramInfo");function Vm(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(Vm,"addSVGa11yTitleDescription");var Sr,An=(Sr=class{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static async fromText(t,r={}){const i=Bt(),o=$n(t,i);t=eT(t)+`
|
|
298
|
+
`;try{Ra(o)}catch{const c=y0(o);if(!c)throw new Gc(`Diagram ${o} not found.`);const{id:h,diagram:d}=await c();is(h,d)}const{db:s,parser:a,renderer:n,init:l}=Ra(o);return a.parser&&(a.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new Sr(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Sr,"Diagram"),Sr),Dc=[],SB=p(()=>{Dc.forEach(e=>{e()}),Dc=[]},"attachFunctions"),_B=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Zm(e){const t=e.match(jc);if(!t)return{text:e,metadata:{}};let r=o2(t[1],{schema:i2})??{};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}}p(Zm,"extractFrontMatter");var vB=p(e=>e.replace(/\r\n?/g,`
|
|
299
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),BB=p(e=>{const{text:t,metadata:r}=Zm(e),{displayMode:i,title:o,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:o,config:s,text:t}},"processFrontmatter"),LB=p(e=>{const t=ye.detectInit(e)??{},r=ye.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:W2(e),directive:t}},"processDirectives");function Ml(e){const t=vB(e),r=BB(t),i=LB(r.text),o=pl(r.config,i.directive);return e=_B(i.text),{code:e,title:r.title,config:o}}p(Ml,"preprocessDiagram");function Km(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Km,"toBase64");var FB=5e4,AB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",EB="sandbox",MB="loose",$B="http://www.w3.org/2000/svg",OB="http://www.w3.org/1999/xlink",IB="http://www.w3.org/1999/xhtml",DB="100%",PB="100%",RB="border:0;margin:0;",NB="margin:0",qB="allow-top-navigation-by-user-activation allow-popups",zB='The "iframe" tag is not supported by your browser.',WB=["foreignobject"],HB=["dominant-baseline"];function $l(e){const t=Ml(e);return es(),Y0(t.config??{}),t}p($l,"processAndSetConfigs");async function Qm(e,t){Xs();try{const{code:r,config:i}=$l(e);return{diagramType:(await ty(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Qm,"parse");var Pc=p((e,t,r=[])=>{const i=Qc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),YB=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ee(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Kh(l.styles)||n.forEach(c=>{r.insertRule(Pc(l.id,c,l.styles),r.cssRules.length)}),Kh(l.textStyles)||r.insertRule(Pc(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),i=Pa(o)+`
|
|
300
|
+
`}else i+=`${e.themeCSS}
|
|
301
|
+
`;return i+Pa(r)},"createCssStyles"),UB=p((e,t)=>Fn(t_(`${e}{${t}}`),i_([p(function(i,o,s,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===vn)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[qS,WS,dm,YS,"@container","@starting-style"],vn].includes(i.type)||(N.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Al))},"addNamespace"),r_])),"compileCSS"),jB=p((e,t,r,i)=>{const o=YB(e,r),s=hC(t,o,{...e.themeVariables,theme:e.theme,look:e.look},i);return UB(i,s)},"createUserStyles"),GB=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Fr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),XB=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":PB,i=Km(`<body style="${NB}">${e}</body>`);return`<iframe style="width:${DB};height:${r};${RB}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${qB}">
|
|
302
|
+
${zB}
|
|
303
|
+
</iframe>`},"putIntoIFrame"),Rc=p((e,t,r,i,o)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",$B);return o&&a.attr("xmlns:xlink",o),a.append("g"),e},"appendDivSvgG");function En(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(En,"sandboxedIframe");var VB=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),ZB=p(async function(e,t,r){Xs();const i=$l(t);t=i.code;const o=Bt();N.debug(o),t.length>(o?.maxTextSize??FB)&&(t=AB);const s=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=p(()=>{const z=nt(f?n:c).node();z&&"remove"in z&&z.remove()},"removeTempElements");let d=nt(document.body);const f=o.securityLevel===EB,u=o.securityLevel===MB,g=o.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const W=En(nt(r),a);d=nt(W.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=nt(r);Rc(d,e,l,`font-family: ${g}`,OB)}else{if(VB(document,e,l,a),f){const W=En(nt(document.body),a);d=nt(W.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=nt("body");Rc(d,e,l)}let m,y;try{m=await An.fromText(t,{title:i.title})}catch(W){if(o.suppressErrorRendering)throw h(),W;m=await An.fromText("error"),y=W}const C=d.select(c).node(),b=m.type,k=C.firstChild,w=k.firstChild,S=m.renderer.getClasses?.(t,m),_=jB(o,b,S,s),E=document.createElement("style");E.innerHTML=_,k.insertBefore(E,w);try{await m.renderer.draw(t,e,"11.15.0",m)}catch(W){throw o.suppressErrorRendering?h():yv.draw(t,e,"11.15.0"),W}const B=d.select(`${c} svg`),q=m.db.getAccTitle?.(),I=m.db.getAccDescription?.();ey(b,B,q,I),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",IB);let R=d.select(c).node().innerHTML;if(N.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),R=GB(R,f,je(o.arrowMarkerAbsolute)),f){const W=d.select(c+" svg").node();R=XB(R,W)}else u||(R=di.sanitize(R,{ADD_TAGS:WB,ADD_ATTR:HB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(SB(),y)throw y;return h(),{diagramType:b,svg:R,bindFunctions:m.db.bindFunctions}},"render");function Jm(e={}){const t=Dt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),W0(t),t?.theme&&t.theme in ze?t.themeVariables=ze[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ze.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?z0(t):Jc();Mn(r.logLevel),Xs()}p(Jm,"initialize");var ty=p((e,t={})=>{const{code:r}=Ml(e);return An.fromText(r,t)},"getDiagramFromText");function ey(e,t,r,i){Xm(t,e),Vm(t,r,i,t.attr("id"))}p(ey,"addA11yInfo");var Er=Object.freeze({render:ZB,parse:Qm,getDiagramFromText:ty,initialize:Jm,getConfig:Bt,setConfig:td,getSiteConfig:Jc,updateSiteConfig:H0,reset:p(()=>{es()},"reset"),globalReset:p(()=>{es(ui)},"globalReset"),defaultConfig:ui});Mn(Bt().logLevel);es(Bt());var KB=p((e,t,r)=>{N.warn(e),fl(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"),ry=p(async function(e={querySelector:".mermaid"}){try{await QB(e)}catch(t){if(fl(t)&&N.error(t.str),Ue.parseError&&Ue.parseError(t),!e.suppressErrors)throw N.error("Use the suppressErrors option to suppress these errors"),t}},"run"),QB=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Er.getConfig();N.debug(`${e?"":"No "}Callback function found`);let o;if(r)o=r;else if(t)o=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");N.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(N.debug("Start On Load: "+i?.startOnLoad),Er.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new ye.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(o)){if(N.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;a=l.innerHTML,a=mp(ye.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ye.detectInit(a);h&&N.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:f}=await ay(c,a,l);l.innerHTML=d,e&&await e(c),f&&f(l)}catch(d){KB(d,n,Ue.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),iy=p(function(e){Er.initialize(e)},"initialize"),JB=p(async function(e,t,r){N.warn("mermaid.init is deprecated. Please use run instead."),e&&iy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await ry(i)},"init"),tL=p(async(e,{lazyLoad:t=!0}={})=>{Xs(),$a(...e),t===!1&&await TB()},"registerExternalDiagrams"),oy=p(function(){if(Ue.startOnLoad){const{startOnLoad:e}=Er.getConfig();e&&Ue.run().catch(t=>N.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",oy,!1);var eL=p(function(e){Ue.parseError=e},"setParseErrorHandler"),Fs=[],Fa=!1,sy=p(async()=>{if(!Fa){for(Fa=!0;Fs.length>0;){const e=Fs.shift();if(e)try{await e()}catch(t){N.error("Error executing queue",t)}}Fa=!1}},"executeQueue"),rL=p(async(e,t)=>new Promise((r,i)=>{const o=p(()=>new Promise((s,a)=>{Er.parse(e,t).then(n=>{s(n),r(n)},n=>{N.error("Error parsing",n),Ue.parseError?.(n),a(n),i(n)})}),"performCall");Fs.push(o),sy().catch(i)}),"parse"),ay=p((e,t,r)=>new Promise((i,o)=>{const s=p(()=>new Promise((a,n)=>{Er.render(e,t,r).then(l=>{a(l),i(l)},l=>{N.error("Error parsing",l),Ue.parseError?.(l),n(l),o(l)})}),"performCall");Fs.push(s),sy().catch(o)}),"render"),iL=p(()=>Object.keys(_r).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ue={startOnLoad:!0,mermaidAPI:Er,parse:rL,render:ay,init:JB,run:ry,registerExternalDiagrams:tL,registerLayoutLoaders:lm,initialize:iy,parseError:void 0,contentLoaded:oy,setParseErrorHandler:eL,detectType:$n,registerIconPacks:lw,getRegisteredDiagramsMetadata:iL},Aa=Ue;var Nc={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0};function ny(e={}){let t=!1,r={...Nc,...e.config},i={initialize(o){r={...Nc,...e.config,...o},Aa.initialize(r),t=!0},async render(o,s){return t||(Aa.initialize(r),t=!0),await Aa.render(o,s)}};return{name:"mermaid",type:"diagram",language:"mermaid",getMermaid(o){return o&&i.initialize(o),i}}}var oL=ny();const IL=Object.freeze(Object.defineProperty({__proto__:null,createMermaidPlugin:ny,mermaid:oL},Symbol.toStringTag,{value:"Module"}));export{hd as $,hL as A,or as B,Fy as C,Bt as D,CC as E,pl as F,Kc as G,G2 as H,Kk as I,i2 as J,w0 as K,Qi as L,nL as M,Ns as N,Q0 as O,nd as P,xh as Q,Wk as R,Xa as S,j2 as T,co as U,ke as V,M as W,$ as X,aC as Y,R2 as Z,p as _,uC as a,uS as a$,Rk as a0,jn as a1,fL as a2,mL as a3,Nr as a4,Nh as a5,Rh as a6,CL as a7,yL as a8,gL as a9,f2 as aA,_2 as aB,S2 as aC,w2 as aD,B2 as aE,v2 as aF,u2 as aG,Yf as aH,C2 as aI,m2 as aJ,g2 as aK,Uf as aL,s2 as aM,ee as aN,Ge as aO,Ei as aP,gl as aQ,Qf as aR,Fr as aS,rp as aT,Wc as aU,PS as aV,AL as aW,ML as aX,LL as aY,K as aZ,FL as a_,dL as aa,uL as ab,pL as ac,bL as ad,xL as ae,at as af,Ee as ag,Iw as ah,om as ai,EL as aj,ul as ak,X as al,cw as am,nl as an,sl as ao,Go as ap,T2 as aq,k2 as ar,b2 as as,x2 as at,d2 as au,Wf as av,p2 as aw,c2 as ax,y2 as ay,Hf as az,dC as b,nS as b0,aS as b1,Nk as b2,aL as b3,Co as b4,lw as b5,nw as b6,Wn as b7,tr as b8,eo as b9,Mh as ba,Cb as bb,Z as bc,ip as bd,se as be,db as bf,zn as bg,wd as bh,po as bi,vd as bj,cL as bk,Ly as bl,IL as bm,Ct as c,nt as d,ld as e,Dt as f,pC as g,Ye as h,be as i,l2 as j,uo as k,N as l,tp as m,lL as n,OL as o,gC as p,mC as q,$L as r,fC as s,o2 as t,ye as u,eS as v,Z2 as w,kL as x,di as y,cC as z};
|